blob: 2d73516beef6eeeb5be6a3b4242a682ca29b55c6 [file] [log] [blame]
Elliott Hughes82be86d2017-09-20 17:00:17 -07001#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
Elliott Hughesf344baa2021-12-07 09:12:34 -08003# Generated by GNU Autoconf 2.71 for curl -.
Elliott Hughes82be86d2017-09-20 17:00:17 -07004#
Elliott Hughes34dd5f42021-08-10 13:01:18 -07005# Report bugs to <a suitable curl mailing list: https://curl.se/mail/>.
Elliott Hughes82be86d2017-09-20 17:00:17 -07006#
7#
Elliott Hughesf344baa2021-12-07 09:12:34 -08008# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
9# Inc.
Elliott Hughes82be86d2017-09-20 17:00:17 -070010#
11#
12# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
14#
Elliott Hughes34dd5f42021-08-10 13:01:18 -070015# Copyright (c) 1998 - 2021 Daniel Stenberg, <daniel@haxx.se>
Elliott Hughes82be86d2017-09-20 17:00:17 -070016# This configure script may be copied, distributed and modified under the
17# terms of the curl license; see COPYING for more details
18
19## -------------------------------- ##
20## XC_CONFIGURE_PREAMBLE ver: 1.0 ##
21## -------------------------------- ##
22
23xc_configure_preamble_ver_major='1'
24xc_configure_preamble_ver_minor='0'
25
26#
27# Set IFS to space, tab and newline.
28#
29
30xc_space=' '
31xc_tab=' '
32xc_newline='
33'
34IFS="$xc_space$xc_tab$xc_newline"
35
36#
37# Set internationalization behavior variables.
38#
39
40LANG='C'
41LC_ALL='C'
42LANGUAGE='C'
43export LANG
44export LC_ALL
45export LANGUAGE
46
47#
48# Some useful variables.
49#
50
51xc_msg_warn='configure: WARNING:'
52xc_msg_abrt='Can not continue.'
53xc_msg_err='configure: error:'
54
55#
56# Verify that 'echo' command is available, otherwise abort.
57#
58
59xc_tst_str='unknown'
60(`echo "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success'
61case "x$xc_tst_str" in # ((
62 xsuccess)
63 :
64 ;;
65 *)
66 # Try built-in echo, and fail.
67 echo "$xc_msg_err 'echo' command not found. $xc_msg_abrt" >&2
68 exit 1
69 ;;
70esac
71
72#
73# Verify that 'test' command is available, otherwise abort.
74#
75
76xc_tst_str='unknown'
77(`test -n "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success'
78case "x$xc_tst_str" in # ((
79 xsuccess)
80 :
81 ;;
82 *)
83 echo "$xc_msg_err 'test' command not found. $xc_msg_abrt" >&2
84 exit 1
85 ;;
86esac
87
88#
89# Verify that 'PATH' variable is set, otherwise abort.
90#
91
92xc_tst_str='unknown'
93(`test -n "$PATH" >/dev/null 2>&1`) && xc_tst_str='success'
94case "x$xc_tst_str" in # ((
95 xsuccess)
96 :
97 ;;
98 *)
99 echo "$xc_msg_err 'PATH' variable not set. $xc_msg_abrt" >&2
100 exit 1
101 ;;
102esac
103
104#
105# Verify that 'expr' command is available, otherwise abort.
106#
107
108xc_tst_str='unknown'
109xc_tst_str=`expr "$xc_tst_str" : '.*' 2>/dev/null`
110case "x$xc_tst_str" in # ((
111 x7)
112 :
113 ;;
114 *)
115 echo "$xc_msg_err 'expr' command not found. $xc_msg_abrt" >&2
116 exit 1
117 ;;
118esac
119
120#
121# Verify that 'sed' utility is found within 'PATH', otherwise abort.
122#
123
124xc_tst_str='unknown'
125xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
126 | sed -e 's:unknown:success:' 2>/dev/null`
127case "x$xc_tst_str" in # ((
128 xsuccess)
129 :
130 ;;
131 *)
132 echo "$xc_msg_err 'sed' utility not found in 'PATH'. $xc_msg_abrt" >&2
133 exit 1
134 ;;
135esac
136
137#
138# Verify that 'grep' utility is found within 'PATH', otherwise abort.
139#
140
141xc_tst_str='unknown'
142(`echo "$xc_tst_str" 2>/dev/null \
143 | grep 'unknown' >/dev/null 2>&1`) && xc_tst_str='success'
144case "x$xc_tst_str" in # ((
145 xsuccess)
146 :
147 ;;
148 *)
149 echo "$xc_msg_err 'grep' utility not found in 'PATH'. $xc_msg_abrt" >&2
150 exit 1
151 ;;
152esac
153
154#
155# Verify that 'tr' utility is found within 'PATH', otherwise abort.
156#
157
158xc_tst_str="${xc_tab}98s7u6c5c4e3s2s10"
159xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
160 | tr -d "0123456789$xc_tab" 2>/dev/null`
161case "x$xc_tst_str" in # ((
162 xsuccess)
163 :
164 ;;
165 *)
166 echo "$xc_msg_err 'tr' utility not found in 'PATH'. $xc_msg_abrt" >&2
167 exit 1
168 ;;
169esac
170
171#
172# Verify that 'wc' utility is found within 'PATH', otherwise abort.
173#
174
175xc_tst_str='unknown unknown unknown unknown'
176xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
177 | wc -w 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null`
178case "x$xc_tst_str" in # ((
179 x4)
180 :
181 ;;
182 *)
183 echo "$xc_msg_err 'wc' utility not found in 'PATH'. $xc_msg_abrt" >&2
184 exit 1
185 ;;
186esac
187
188#
189# Verify that 'cat' utility is found within 'PATH', otherwise abort.
190#
191
192xc_tst_str='unknown'
193xc_tst_str=`cat <<_EOT 2>/dev/null \
194 | wc -l 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null
195unknown
196unknown
197unknown
198_EOT`
199case "x$xc_tst_str" in # ((
200 x3)
201 :
202 ;;
203 *)
204 echo "$xc_msg_err 'cat' utility not found in 'PATH'. $xc_msg_abrt" >&2
205 exit 1
206 ;;
207esac
208
209#
210# Auto-detect and set 'PATH_SEPARATOR', unless it is already non-empty set.
211#
212
213# Directory count in 'PATH' when using a colon separator.
214xc_tst_dirs_col='x'
215xc_tst_prev_IFS=$IFS; IFS=':'
216for xc_tst_dir in $PATH; do
217 IFS=$xc_tst_prev_IFS
218 xc_tst_dirs_col="x$xc_tst_dirs_col"
219done
220IFS=$xc_tst_prev_IFS
221xc_tst_dirs_col=`expr "$xc_tst_dirs_col" : '.*'`
222
223# Directory count in 'PATH' when using a semicolon separator.
224xc_tst_dirs_sem='x'
225xc_tst_prev_IFS=$IFS; IFS=';'
226for xc_tst_dir in $PATH; do
227 IFS=$xc_tst_prev_IFS
228 xc_tst_dirs_sem="x$xc_tst_dirs_sem"
229done
230IFS=$xc_tst_prev_IFS
231xc_tst_dirs_sem=`expr "$xc_tst_dirs_sem" : '.*'`
232
233if test $xc_tst_dirs_sem -eq $xc_tst_dirs_col; then
234 # When both counting methods give the same result we do not want to
235 # chose one over the other, and consider auto-detection not possible.
236 if test -z "$PATH_SEPARATOR"; then
Elliott Hughescac39802018-04-27 16:19:43 -0700237 # User should provide the correct 'PATH_SEPARATOR' definition.
238 # Until then, guess that it is colon!
239 echo "$xc_msg_warn path separator not determined, guessing colon" >&2
240 PATH_SEPARATOR=':'
Elliott Hughes82be86d2017-09-20 17:00:17 -0700241 fi
242else
243 # Separator with the greater directory count is the auto-detected one.
244 if test $xc_tst_dirs_sem -gt $xc_tst_dirs_col; then
245 xc_tst_auto_separator=';'
246 else
247 xc_tst_auto_separator=':'
248 fi
249 if test -z "$PATH_SEPARATOR"; then
250 # Simply use the auto-detected one when not already set.
251 PATH_SEPARATOR=$xc_tst_auto_separator
252 elif test "x$PATH_SEPARATOR" != "x$xc_tst_auto_separator"; then
253 echo "$xc_msg_warn 'PATH_SEPARATOR' does not match auto-detected one." >&2
254 fi
255fi
256xc_PATH_SEPARATOR=$PATH_SEPARATOR
257
258xc_configure_preamble_result='yes'
259
260
261## -------------------- ##
262## M4sh Initialization. ##
263## -------------------- ##
264
265# Be more Bourne compatible
266DUALCASE=1; export DUALCASE # for MKS sh
Elliott Hughesf344baa2021-12-07 09:12:34 -0800267as_nop=:
268if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
269then :
Elliott Hughes82be86d2017-09-20 17:00:17 -0700270 emulate sh
271 NULLCMD=:
272 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
273 # is contrary to our usage. Disable this feature.
274 alias -g '${1+"$@"}'='"$@"'
275 setopt NO_GLOB_SUBST
Elliott Hughesf344baa2021-12-07 09:12:34 -0800276else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -0700277 case `(set -o) 2>/dev/null` in #(
278 *posix*) :
279 set -o posix ;; #(
280 *) :
281 ;;
282esac
283fi
284
285
Elliott Hughesf344baa2021-12-07 09:12:34 -0800286
287# Reset variables that may have inherited troublesome values from
288# the environment.
289
290# IFS needs to be set, to space, tab, and newline, in precisely that order.
291# (If _AS_PATH_WALK were called with IFS unset, it would have the
292# side effect of setting IFS to empty, thus disabling word splitting.)
293# Quoting is to prevent editors from complaining about space-tab.
Elliott Hughes82be86d2017-09-20 17:00:17 -0700294as_nl='
295'
296export as_nl
Elliott Hughes82be86d2017-09-20 17:00:17 -0700297IFS=" "" $as_nl"
298
Elliott Hughesf344baa2021-12-07 09:12:34 -0800299PS1='$ '
300PS2='> '
301PS4='+ '
302
303# Ensure predictable behavior from utilities with locale-dependent output.
304LC_ALL=C
305export LC_ALL
306LANGUAGE=C
307export LANGUAGE
308
309# We cannot yet rely on "unset" to work, but we need these variables
310# to be unset--not just set to an empty or harmless value--now, to
311# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
312# also avoids known problems related to "unset" and subshell syntax
313# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
314for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
315do eval test \${$as_var+y} \
316 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
317done
318
319# Ensure that fds 0, 1, and 2 are open.
320if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
321if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
322if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
323
324
325
Elliott Hughes82be86d2017-09-20 17:00:17 -0700326# Find who we are. Look in the path if we contain no directory separator.
327as_myself=
328case $0 in #((
329 *[\\/]* ) as_myself=$0 ;;
330 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
331for as_dir in $PATH
332do
333 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -0800334 case $as_dir in #(((
335 '') as_dir=./ ;;
336 */) ;;
337 *) as_dir=$as_dir/ ;;
338 esac
339 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Elliott Hughes82be86d2017-09-20 17:00:17 -0700340 done
341IFS=$as_save_IFS
342
343 ;;
344esac
345# We did not find ourselves, most probably we were run as `sh COMMAND'
346# in which case we are not to be found in the path.
347if test "x$as_myself" = x; then
348 as_myself=$0
349fi
350if test ! -f "$as_myself"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -0800351 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Elliott Hughes82be86d2017-09-20 17:00:17 -0700352 exit 1
353fi
354
Elliott Hughes82be86d2017-09-20 17:00:17 -0700355
356# Use a proper internal environment variable to ensure we don't fall
357 # into an infinite loop, continuously re-executing ourselves.
358 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
359 _as_can_reexec=no; export _as_can_reexec;
360 # We cannot yet assume a decent shell, so we have to provide a
361# neutralization value for shells without unset; and this also
362# works around shells that cannot unset nonexistent variables.
363# Preserve -v and -x to the replacement shell.
364BASH_ENV=/dev/null
365ENV=/dev/null
366(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
367case $- in # ((((
368 *v*x* | *x*v* ) as_opts=-vx ;;
369 *v* ) as_opts=-v ;;
370 *x* ) as_opts=-x ;;
371 * ) as_opts= ;;
372esac
373exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
374# Admittedly, this is quite paranoid, since all the known shells bail
375# out after a failed `exec'.
Elliott Hughesf344baa2021-12-07 09:12:34 -0800376printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
377exit 255
Elliott Hughes82be86d2017-09-20 17:00:17 -0700378 fi
379 # We don't want this to propagate to other subprocesses.
380 { _as_can_reexec=; unset _as_can_reexec;}
381if test "x$CONFIG_SHELL" = x; then
Elliott Hughesf344baa2021-12-07 09:12:34 -0800382 as_bourne_compatible="as_nop=:
383if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
384then :
Elliott Hughes82be86d2017-09-20 17:00:17 -0700385 emulate sh
386 NULLCMD=:
387 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
388 # is contrary to our usage. Disable this feature.
389 alias -g '\${1+\"\$@\"}'='\"\$@\"'
390 setopt NO_GLOB_SUBST
Elliott Hughesf344baa2021-12-07 09:12:34 -0800391else \$as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -0700392 case \`(set -o) 2>/dev/null\` in #(
393 *posix*) :
394 set -o posix ;; #(
395 *) :
396 ;;
397esac
398fi
399"
400 as_required="as_fn_return () { (exit \$1); }
401as_fn_success () { as_fn_return 0; }
402as_fn_failure () { as_fn_return 1; }
403as_fn_ret_success () { return 0; }
404as_fn_ret_failure () { return 1; }
405
406exitcode=0
407as_fn_success || { exitcode=1; echo as_fn_success failed.; }
408as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
409as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
410as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
Elliott Hughesf344baa2021-12-07 09:12:34 -0800411if ( set x; as_fn_ret_success y && test x = \"\$1\" )
412then :
Elliott Hughes82be86d2017-09-20 17:00:17 -0700413
Elliott Hughesf344baa2021-12-07 09:12:34 -0800414else \$as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -0700415 exitcode=1; echo positional parameters were not saved.
416fi
417test x\$exitcode = x0 || exit 1
Elliott Hughesf344baa2021-12-07 09:12:34 -0800418blah=\$(echo \$(echo blah))
419test x\"\$blah\" = xblah || exit 1
Elliott Hughes82be86d2017-09-20 17:00:17 -0700420test -x / || exit 1"
421 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
422 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
423 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
424 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
425test \$(( 1 + 1 )) = 2 || exit 1
426
427 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
428 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
429 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
430 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
431 PATH=/empty FPATH=/empty; export PATH FPATH
432 test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
433 || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
Elliott Hughesf344baa2021-12-07 09:12:34 -0800434 if (eval "$as_required") 2>/dev/null
435then :
Elliott Hughes82be86d2017-09-20 17:00:17 -0700436 as_have_required=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -0800437else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -0700438 as_have_required=no
439fi
Elliott Hughesf344baa2021-12-07 09:12:34 -0800440 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
441then :
Elliott Hughes82be86d2017-09-20 17:00:17 -0700442
Elliott Hughesf344baa2021-12-07 09:12:34 -0800443else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -0700444 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
445as_found=false
446for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
447do
448 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -0800449 case $as_dir in #(((
450 '') as_dir=./ ;;
451 */) ;;
452 *) as_dir=$as_dir/ ;;
453 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -0700454 as_found=:
455 case $as_dir in #(
456 /*)
457 for as_base in sh bash ksh sh5; do
458 # Try only shells that exist, to save several forks.
Elliott Hughesf344baa2021-12-07 09:12:34 -0800459 as_shell=$as_dir$as_base
Elliott Hughes82be86d2017-09-20 17:00:17 -0700460 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
Elliott Hughesf344baa2021-12-07 09:12:34 -0800461 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
462then :
Elliott Hughes82be86d2017-09-20 17:00:17 -0700463 CONFIG_SHELL=$as_shell as_have_required=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -0800464 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
465then :
Elliott Hughes82be86d2017-09-20 17:00:17 -0700466 break 2
467fi
468fi
469 done;;
470 esac
471 as_found=false
472done
Elliott Hughes82be86d2017-09-20 17:00:17 -0700473IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -0800474if $as_found
475then :
476
477else $as_nop
478 if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
479 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
480then :
481 CONFIG_SHELL=$SHELL as_have_required=yes
482fi
483fi
Elliott Hughes82be86d2017-09-20 17:00:17 -0700484
485
Elliott Hughesf344baa2021-12-07 09:12:34 -0800486 if test "x$CONFIG_SHELL" != x
487then :
Elliott Hughes82be86d2017-09-20 17:00:17 -0700488 export CONFIG_SHELL
489 # We cannot yet assume a decent shell, so we have to provide a
490# neutralization value for shells without unset; and this also
491# works around shells that cannot unset nonexistent variables.
492# Preserve -v and -x to the replacement shell.
493BASH_ENV=/dev/null
494ENV=/dev/null
495(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
496case $- in # ((((
497 *v*x* | *x*v* ) as_opts=-vx ;;
498 *v* ) as_opts=-v ;;
499 *x* ) as_opts=-x ;;
500 * ) as_opts= ;;
501esac
502exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
503# Admittedly, this is quite paranoid, since all the known shells bail
504# out after a failed `exec'.
Elliott Hughesf344baa2021-12-07 09:12:34 -0800505printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
Elliott Hughes82be86d2017-09-20 17:00:17 -0700506exit 255
507fi
508
Elliott Hughesf344baa2021-12-07 09:12:34 -0800509 if test x$as_have_required = xno
510then :
511 printf "%s\n" "$0: This script requires a shell more modern than all"
512 printf "%s\n" "$0: the shells that I found on your system."
513 if test ${ZSH_VERSION+y} ; then
514 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
515 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
Elliott Hughes82be86d2017-09-20 17:00:17 -0700516 else
Elliott Hughesf344baa2021-12-07 09:12:34 -0800517 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and a suitable curl
Elliott Hughes34dd5f42021-08-10 13:01:18 -0700518$0: mailing list: https://curl.se/mail/ about your system,
519$0: including any error possibly output before this
Elliott Hughes82be86d2017-09-20 17:00:17 -0700520$0: message. Then install a modern shell, or manually run
521$0: the script under such a shell if you do have one."
522 fi
523 exit 1
524fi
525fi
526fi
527SHELL=${CONFIG_SHELL-/bin/sh}
528export SHELL
529# Unset more variables known to interfere with behavior of common tools.
530CLICOLOR_FORCE= GREP_OPTIONS=
531unset CLICOLOR_FORCE GREP_OPTIONS
532
533## --------------------- ##
534## M4sh Shell Functions. ##
535## --------------------- ##
536# as_fn_unset VAR
537# ---------------
538# Portably unset VAR.
539as_fn_unset ()
540{
541 { eval $1=; unset $1;}
542}
543as_unset=as_fn_unset
544
Elliott Hughesf344baa2021-12-07 09:12:34 -0800545
Elliott Hughes82be86d2017-09-20 17:00:17 -0700546# as_fn_set_status STATUS
547# -----------------------
548# Set $? to STATUS, without forking.
549as_fn_set_status ()
550{
551 return $1
552} # as_fn_set_status
553
554# as_fn_exit STATUS
555# -----------------
556# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
557as_fn_exit ()
558{
559 set +e
560 as_fn_set_status $1
561 exit $1
562} # as_fn_exit
Elliott Hughesf344baa2021-12-07 09:12:34 -0800563# as_fn_nop
564# ---------
565# Do nothing but, unlike ":", preserve the value of $?.
566as_fn_nop ()
567{
568 return $?
569}
570as_nop=as_fn_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -0700571
572# as_fn_mkdir_p
573# -------------
574# Create "$as_dir" as a directory, including parents if necessary.
575as_fn_mkdir_p ()
576{
577
578 case $as_dir in #(
579 -*) as_dir=./$as_dir;;
580 esac
581 test -d "$as_dir" || eval $as_mkdir_p || {
582 as_dirs=
583 while :; do
584 case $as_dir in #(
Elliott Hughesf344baa2021-12-07 09:12:34 -0800585 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Elliott Hughes82be86d2017-09-20 17:00:17 -0700586 *) as_qdir=$as_dir;;
587 esac
588 as_dirs="'$as_qdir' $as_dirs"
589 as_dir=`$as_dirname -- "$as_dir" ||
590$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
591 X"$as_dir" : 'X\(//\)[^/]' \| \
592 X"$as_dir" : 'X\(//\)$' \| \
593 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Elliott Hughesf344baa2021-12-07 09:12:34 -0800594printf "%s\n" X"$as_dir" |
Elliott Hughes82be86d2017-09-20 17:00:17 -0700595 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
596 s//\1/
597 q
598 }
599 /^X\(\/\/\)[^/].*/{
600 s//\1/
601 q
602 }
603 /^X\(\/\/\)$/{
604 s//\1/
605 q
606 }
607 /^X\(\/\).*/{
608 s//\1/
609 q
610 }
611 s/.*/./; q'`
612 test -d "$as_dir" && break
613 done
614 test -z "$as_dirs" || eval "mkdir $as_dirs"
615 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
616
617
618} # as_fn_mkdir_p
619
620# as_fn_executable_p FILE
621# -----------------------
622# Test if FILE is an executable regular file.
623as_fn_executable_p ()
624{
625 test -f "$1" && test -x "$1"
626} # as_fn_executable_p
627# as_fn_append VAR VALUE
628# ----------------------
629# Append the text in VALUE to the end of the definition contained in VAR. Take
630# advantage of any shell optimizations that allow amortized linear growth over
631# repeated appends, instead of the typical quadratic growth present in naive
632# implementations.
Elliott Hughesf344baa2021-12-07 09:12:34 -0800633if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
634then :
Elliott Hughes82be86d2017-09-20 17:00:17 -0700635 eval 'as_fn_append ()
636 {
637 eval $1+=\$2
638 }'
Elliott Hughesf344baa2021-12-07 09:12:34 -0800639else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -0700640 as_fn_append ()
641 {
642 eval $1=\$$1\$2
643 }
644fi # as_fn_append
645
646# as_fn_arith ARG...
647# ------------------
648# Perform arithmetic evaluation on the ARGs, and store the result in the
649# global $as_val. Take advantage of shells that can avoid forks. The arguments
650# must be portable across $(()) and expr.
Elliott Hughesf344baa2021-12-07 09:12:34 -0800651if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
652then :
Elliott Hughes82be86d2017-09-20 17:00:17 -0700653 eval 'as_fn_arith ()
654 {
655 as_val=$(( $* ))
656 }'
Elliott Hughesf344baa2021-12-07 09:12:34 -0800657else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -0700658 as_fn_arith ()
659 {
660 as_val=`expr "$@" || test $? -eq 1`
661 }
662fi # as_fn_arith
663
Elliott Hughesf344baa2021-12-07 09:12:34 -0800664# as_fn_nop
665# ---------
666# Do nothing but, unlike ":", preserve the value of $?.
667as_fn_nop ()
668{
669 return $?
670}
671as_nop=as_fn_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -0700672
673# as_fn_error STATUS ERROR [LINENO LOG_FD]
674# ----------------------------------------
675# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
676# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
677# script with STATUS, using 1 if that was 0.
678as_fn_error ()
679{
680 as_status=$1; test $as_status -eq 0 && as_status=1
681 if test "$4"; then
682 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Elliott Hughesf344baa2021-12-07 09:12:34 -0800683 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Elliott Hughes82be86d2017-09-20 17:00:17 -0700684 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -0800685 printf "%s\n" "$as_me: error: $2" >&2
Elliott Hughes82be86d2017-09-20 17:00:17 -0700686 as_fn_exit $as_status
687} # as_fn_error
688
689if expr a : '\(a\)' >/dev/null 2>&1 &&
690 test "X`expr 00001 : '.*\(...\)'`" = X001; then
691 as_expr=expr
692else
693 as_expr=false
694fi
695
696if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
697 as_basename=basename
698else
699 as_basename=false
700fi
701
702if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
703 as_dirname=dirname
704else
705 as_dirname=false
706fi
707
708as_me=`$as_basename -- "$0" ||
709$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
710 X"$0" : 'X\(//\)$' \| \
711 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Elliott Hughesf344baa2021-12-07 09:12:34 -0800712printf "%s\n" X/"$0" |
Elliott Hughes82be86d2017-09-20 17:00:17 -0700713 sed '/^.*\/\([^/][^/]*\)\/*$/{
714 s//\1/
715 q
716 }
717 /^X\/\(\/\/\)$/{
718 s//\1/
719 q
720 }
721 /^X\/\(\/\).*/{
722 s//\1/
723 q
724 }
725 s/.*/./; q'`
726
727# Avoid depending upon Character Ranges.
728as_cr_letters='abcdefghijklmnopqrstuvwxyz'
729as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
730as_cr_Letters=$as_cr_letters$as_cr_LETTERS
731as_cr_digits='0123456789'
732as_cr_alnum=$as_cr_Letters$as_cr_digits
733
734
735 as_lineno_1=$LINENO as_lineno_1a=$LINENO
736 as_lineno_2=$LINENO as_lineno_2a=$LINENO
737 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
738 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
739 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
740 sed -n '
741 p
742 /[$]LINENO/=
743 ' <$as_myself |
744 sed '
745 s/[$]LINENO.*/&-/
746 t lineno
747 b
748 :lineno
749 N
750 :loop
751 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
752 t loop
753 s/-\n.*//
754 ' >$as_me.lineno &&
755 chmod +x "$as_me.lineno" ||
Elliott Hughesf344baa2021-12-07 09:12:34 -0800756 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Elliott Hughes82be86d2017-09-20 17:00:17 -0700757
758 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
759 # already done that, so ensure we don't try to do so again and fall
760 # in an infinite loop. This has already happened in practice.
761 _as_can_reexec=no; export _as_can_reexec
762 # Don't try to exec as it changes $[0], causing all sort of problems
763 # (the dirname of $[0] is not the place where we might find the
764 # original and so on. Autoconf is especially sensitive to this).
765 . "./$as_me.lineno"
766 # Exit status is that of the last command.
767 exit
768}
769
Elliott Hughesf344baa2021-12-07 09:12:34 -0800770
771# Determine whether it's possible to make 'echo' print without a newline.
772# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
773# for compatibility with existing Makefiles.
Elliott Hughes82be86d2017-09-20 17:00:17 -0700774ECHO_C= ECHO_N= ECHO_T=
775case `echo -n x` in #(((((
776-n*)
777 case `echo 'xy\c'` in
778 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
779 xy) ECHO_C='\c';;
780 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
781 ECHO_T=' ';;
782 esac;;
783*)
784 ECHO_N='-n';;
785esac
786
Elliott Hughesf344baa2021-12-07 09:12:34 -0800787# For backward compatibility with old third-party macros, we provide
788# the shell variables $as_echo and $as_echo_n. New code should use
789# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
790as_echo='printf %s\n'
791as_echo_n='printf %s'
792
793
Elliott Hughes82be86d2017-09-20 17:00:17 -0700794rm -f conf$$ conf$$.exe conf$$.file
795if test -d conf$$.dir; then
796 rm -f conf$$.dir/conf$$.file
797else
798 rm -f conf$$.dir
799 mkdir conf$$.dir 2>/dev/null
800fi
801if (echo >conf$$.file) 2>/dev/null; then
802 if ln -s conf$$.file conf$$ 2>/dev/null; then
803 as_ln_s='ln -s'
804 # ... but there are two gotchas:
805 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
806 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
807 # In both cases, we have to default to `cp -pR'.
808 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
809 as_ln_s='cp -pR'
810 elif ln conf$$.file conf$$ 2>/dev/null; then
811 as_ln_s=ln
812 else
813 as_ln_s='cp -pR'
814 fi
815else
816 as_ln_s='cp -pR'
817fi
818rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
819rmdir conf$$.dir 2>/dev/null
820
821if mkdir -p . 2>/dev/null; then
822 as_mkdir_p='mkdir -p "$as_dir"'
823else
824 test -d ./-p && rmdir ./-p
825 as_mkdir_p=false
826fi
827
828as_test_x='test -x'
829as_executable_p=as_fn_executable_p
830
831# Sed expression to map a string onto a valid CPP name.
832as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
833
834# Sed expression to map a string onto a valid variable name.
835as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
836
837SHELL=${CONFIG_SHELL-/bin/sh}
838
839
840test -n "$DJDIR" || exec 7<&0 </dev/null
841exec 6>&1
842
843# Name of the host.
844# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
845# so uname gets run too.
846ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
847
848#
849# Initializations.
850#
851ac_default_prefix=/usr/local
852ac_clean_files=
853ac_config_libobj_dir=.
854LIBOBJS=
855cross_compiling=no
856subdirs=
857MFLAGS=
858MAKEFLAGS=
859
860# Identity of this package.
861PACKAGE_NAME='curl'
862PACKAGE_TARNAME='curl'
863PACKAGE_VERSION='-'
864PACKAGE_STRING='curl -'
Elliott Hughes34dd5f42021-08-10 13:01:18 -0700865PACKAGE_BUGREPORT='a suitable curl mailing list: https://curl.se/mail/'
Elliott Hughes82be86d2017-09-20 17:00:17 -0700866PACKAGE_URL=''
867
868ac_unique_file="lib/urldata.h"
869# Factoring default headers for most tests.
870ac_includes_default="\
Elliott Hughesf344baa2021-12-07 09:12:34 -0800871#include <stddef.h>
872#ifdef HAVE_STDIO_H
873# include <stdio.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -0700874#endif
Elliott Hughesf344baa2021-12-07 09:12:34 -0800875#ifdef HAVE_STDLIB_H
Elliott Hughes82be86d2017-09-20 17:00:17 -0700876# include <stdlib.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -0700877#endif
878#ifdef HAVE_STRING_H
Elliott Hughes82be86d2017-09-20 17:00:17 -0700879# include <string.h>
880#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -0700881#ifdef HAVE_INTTYPES_H
882# include <inttypes.h>
883#endif
884#ifdef HAVE_STDINT_H
885# include <stdint.h>
886#endif
Elliott Hughesf344baa2021-12-07 09:12:34 -0800887#ifdef HAVE_STRINGS_H
888# include <strings.h>
889#endif
890#ifdef HAVE_SYS_TYPES_H
891# include <sys/types.h>
892#endif
893#ifdef HAVE_SYS_STAT_H
894# include <sys/stat.h>
895#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -0700896#ifdef HAVE_UNISTD_H
897# include <unistd.h>
898#endif"
899
Elliott Hughesf344baa2021-12-07 09:12:34 -0800900ac_header_c_list=
Elliott Hughes82be86d2017-09-20 17:00:17 -0700901enable_option_checking=no
902ac_subst_vars='am__EXEEXT_FALSE
903am__EXEEXT_TRUE
904LTLIBOBJS
905LIBOBJS
Elliott Hughes0128fe42018-02-27 14:57:55 -0800906SSL_BACKENDS
Elliott Hughes82be86d2017-09-20 17:00:17 -0700907SUPPORT_PROTOCOLS
908SUPPORT_FEATURES
Haibo Huangca2a8022020-07-10 20:17:42 -0700909LIBCURL_NO_SHARED
Elliott Hughes82be86d2017-09-20 17:00:17 -0700910ENABLE_STATIC
911ENABLE_SHARED
912CROSSCOMPILING_FALSE
913CROSSCOMPILING_TRUE
914BLANK_AT_MAKETIME
915CURL_NETWORK_AND_TIME_LIBS
916CURL_NETWORK_LIBS
917LIBCURL_LIBS
Elliott Hughes82be86d2017-09-20 17:00:17 -0700918CFLAG_CURL_SYMBOL_HIDING
919DOING_CURL_SYMBOL_HIDING_FALSE
920DOING_CURL_SYMBOL_HIDING_TRUE
921USE_UNIX_SOCKETS
922BUILD_LIBHOSTNAME_FALSE
923BUILD_LIBHOSTNAME_TRUE
924USE_EMBEDDED_ARES_FALSE
925USE_EMBEDDED_ARES_TRUE
926USE_ARES
927subdirs
928USE_MANUAL_FALSE
929USE_MANUAL_TRUE
930MANOPT
931NROFF
932PERL
Haibo Huang65021c72019-03-27 15:37:23 -0700933FISH_FUNCTIONS_DIR
Elliott Hughes82be86d2017-09-20 17:00:17 -0700934ZSH_FUNCTIONS_DIR
Haibo Huang445085a2019-09-11 13:33:50 -0700935USE_QUICHE
936USE_NGHTTP3
Haibo Huang24c77a12020-04-29 13:49:57 -0700937USE_NGTCP2_CRYPTO_GNUTLS
Haibo Huang445085a2019-09-11 13:33:50 -0700938USE_NGTCP2_CRYPTO_OPENSSL
939USE_NGTCP2
Elliott Hughes82be86d2017-09-20 17:00:17 -0700940USE_NGHTTP2
941IDN_ENABLED
942CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE
943CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE
944CURL_LT_SHLIB_VERSIONED_FLAVOUR
945USE_LIBRTMP
Haibo Huangb51266f2020-03-04 02:22:48 -0800946USE_WOLFSSH
Elliott Hughes0128fe42018-02-27 14:57:55 -0800947USE_LIBSSH
Elliott Hughes82be86d2017-09-20 17:00:17 -0700948USE_LIBSSH2
Elliott Hughes34dd5f42021-08-10 13:01:18 -0700949USE_GSASL_FALSE
950USE_GSASL_TRUE
Elliott Hughes82be86d2017-09-20 17:00:17 -0700951USE_LIBPSL_FALSE
952USE_LIBPSL_TRUE
953CURL_CA_BUNDLE
Alex Deymo486467e2017-12-19 19:04:07 +0100954CURL_WITH_MULTI_SSL
Elliott Hughes82be86d2017-09-20 17:00:17 -0700955SSL_ENABLED
Elliott Hughes82be86d2017-09-20 17:00:17 -0700956NSS_LIBS
957USE_NSS
Elliott Hughes34dd5f42021-08-10 13:01:18 -0700958USE_RUSTLS
Haibo Huangb51266f2020-03-04 02:22:48 -0800959USE_BEARSSL
Elliott Hughesa93fb052018-12-12 14:22:48 -0800960USE_MESALINK
Haibo Huang001784b2019-07-19 05:27:28 -0700961USE_WOLFSSL
Elliott Hughes82be86d2017-09-20 17:00:17 -0700962USE_MBEDTLS
Elliott Hughes82be86d2017-09-20 17:00:17 -0700963HAVE_GNUTLS_SRP
Elliott Hughes82be86d2017-09-20 17:00:17 -0700964USE_GNUTLS
965HAVE_OPENSSL_SRP
966RANDOM_FILE
967SSL_LIBS
Haibo Huang65021c72019-03-27 15:37:23 -0700968USE_SECTRANSP
Elliott Hughes82be86d2017-09-20 17:00:17 -0700969USE_WINDOWS_SSPI
970USE_SCHANNEL
Alex Deymo486467e2017-12-19 19:04:07 +0100971DEFAULT_SSL_BACKEND
972BUILD_STUB_GSS_FALSE
973BUILD_STUB_GSS_TRUE
Haibo Huangb51266f2020-03-04 02:22:48 -0800974IPV6_ENABLED
Elliott Hughes82be86d2017-09-20 17:00:17 -0700975USE_OPENLDAP
Haibo Huangc3c04f42020-08-19 13:00:07 -0700976HAVE_ZSTD
Alex Deymo486467e2017-12-19 19:04:07 +0100977HAVE_BROTLI
Elliott Hughes82be86d2017-09-20 17:00:17 -0700978ZLIB_LIBS
979HAVE_LIBZ_FALSE
980HAVE_LIBZ_TRUE
981HAVE_LIBZ
Haibo Huang65021c72019-03-27 15:37:23 -0700982HAVE_PROTO_BSDSOCKET_H
Haibo Huangb5a52b92020-10-28 22:18:23 -0700983CURL_DISABLE_MQTT
Elliott Hughes82be86d2017-09-20 17:00:17 -0700984CURL_DISABLE_GOPHER
985CURL_DISABLE_SMTP
986CURL_DISABLE_SMB
987CURL_DISABLE_IMAP
988CURL_DISABLE_POP3
989CURL_DISABLE_TFTP
990CURL_DISABLE_TELNET
991CURL_DISABLE_DICT
992CURL_DISABLE_PROXY
Elliott Hughes34dd5f42021-08-10 13:01:18 -0700993USE_HYPER
994PKGCONFIG
Elliott Hughes82be86d2017-09-20 17:00:17 -0700995HAVE_LDAP_SSL
996CURL_DISABLE_LDAPS
997CURL_DISABLE_LDAP
998CURL_DISABLE_FILE
999CURL_DISABLE_FTP
1000CURL_DISABLE_RTSP
1001CURL_DISABLE_HTTP
Elliott Hughes34dd5f42021-08-10 13:01:18 -07001002USE_WIN32_CRYPTO
1003USE_WIN32_SMALL_FILES
1004USE_WIN32_LARGE_FILES
Elliott Hughes82be86d2017-09-20 17:00:17 -07001005DOING_NATIVE_WINDOWS_FALSE
1006DOING_NATIVE_WINDOWS_TRUE
1007BUILD_UNITTESTS_FALSE
1008BUILD_UNITTESTS_TRUE
1009CURLDEBUG_FALSE
1010CURLDEBUG_TRUE
Haibo Huang24c77a12020-04-29 13:49:57 -07001011CURL_CFLAG_EXTRAS
Elliott Hughes82be86d2017-09-20 17:00:17 -07001012USE_EXPLICIT_LIB_DEPS_FALSE
1013USE_EXPLICIT_LIB_DEPS_TRUE
1014REQUIRE_LIB_DEPS
1015CPPFLAG_CURL_STATICLIB
1016USE_CPPFLAG_CURL_STATICLIB_FALSE
1017USE_CPPFLAG_CURL_STATICLIB_TRUE
1018CURL_LT_SHLIB_USE_MIMPURE_TEXT_FALSE
1019CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE
1020CURL_LT_SHLIB_USE_NO_UNDEFINED_FALSE
1021CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE
1022CURL_LT_SHLIB_USE_VERSION_INFO_FALSE
1023CURL_LT_SHLIB_USE_VERSION_INFO_TRUE
1024LT_SYS_LIBRARY_PATH
1025OTOOL64
1026OTOOL
1027LIPO
1028NMEDIT
1029DSYMUTIL
1030MANIFEST_TOOL
1031RANLIB
1032ac_ct_AR
1033LN_S
1034NM
1035ac_ct_DUMPBIN
1036DUMPBIN
1037LD
1038FGREP
1039LIBTOOL
1040OBJDUMP
1041DLLTOOL
1042AS
Elliott Hughes72d948d2018-08-03 14:37:21 -07001043AR_FLAGS
Elliott Hughes82be86d2017-09-20 17:00:17 -07001044host_os
1045host_vendor
1046host_cpu
1047host
1048build_os
1049build_vendor
1050build_cpu
1051build
1052PKGADD_VENDOR
1053PKGADD_NAME
1054PKGADD_PKG
1055VERSIONNUM
1056CURLVERSION
Elliott Hughesf344baa2021-12-07 09:12:34 -08001057CSCOPE
1058ETAGS
1059CTAGS
Elliott Hughes82be86d2017-09-20 17:00:17 -07001060am__fastdepCC_FALSE
1061am__fastdepCC_TRUE
1062CCDEPMODE
1063am__nodep
1064AMDEPBACKSLASH
1065AMDEP_FALSE
1066AMDEP_TRUE
Elliott Hughes82be86d2017-09-20 17:00:17 -07001067am__include
1068DEPDIR
1069am__untar
1070am__tar
1071AMTAR
1072am__leading_dot
1073SET_MAKE
1074AWK
1075mkdir_p
1076MKDIR_P
1077INSTALL_STRIP_PROGRAM
1078STRIP
1079install_sh
1080MAKEINFO
1081AUTOHEADER
1082AUTOMAKE
1083AUTOCONF
1084ACLOCAL
1085VERSION
1086PACKAGE
1087CYGPATH_W
1088am__isrc
Elliott Hughes0128fe42018-02-27 14:57:55 -08001089LCOV
1090GCOV
Elliott Hughes82be86d2017-09-20 17:00:17 -07001091CPP
1092OBJEXT
1093EXEEXT
1094ac_ct_CC
1095CPPFLAGS
1096LDFLAGS
1097CFLAGS
1098CC
1099INSTALL_DATA
1100INSTALL_SCRIPT
1101INSTALL_PROGRAM
1102libext
1103AR
1104EGREP
1105GREP
Elliott Hughes0128fe42018-02-27 14:57:55 -08001106SED
Elliott Hughes82be86d2017-09-20 17:00:17 -07001107CONFIGURE_OPTIONS
Elliott Hughes82be86d2017-09-20 17:00:17 -07001108AM_BACKSLASH
1109AM_DEFAULT_VERBOSITY
1110AM_DEFAULT_V
1111AM_V
1112MAINT
1113MAINTAINER_MODE_FALSE
1114MAINTAINER_MODE_TRUE
1115target_alias
1116host_alias
1117build_alias
1118LIBS
1119ECHO_T
1120ECHO_N
1121ECHO_C
1122DEFS
1123mandir
1124localedir
1125libdir
1126psdir
1127pdfdir
1128dvidir
1129htmldir
1130infodir
1131docdir
1132oldincludedir
1133includedir
1134runstatedir
1135localstatedir
1136sharedstatedir
1137sysconfdir
1138datadir
1139datarootdir
1140libexecdir
1141sbindir
1142bindir
1143program_transform_name
1144prefix
1145exec_prefix
1146PACKAGE_URL
1147PACKAGE_BUGREPORT
1148PACKAGE_STRING
1149PACKAGE_VERSION
1150PACKAGE_TARNAME
1151PACKAGE_NAME
1152SHELL
Haibo Huang001784b2019-07-19 05:27:28 -07001153PATH_SEPARATOR
1154am__quote'
Elliott Hughes82be86d2017-09-20 17:00:17 -07001155ac_subst_files=''
1156ac_user_opts='
1157enable_option_checking
1158enable_maintainer_mode
1159enable_silent_rules
1160enable_debug
1161enable_optimize
1162enable_warnings
1163enable_werror
1164enable_curldebug
1165enable_symbol_hiding
Elliott Hughes82be86d2017-09-20 17:00:17 -07001166enable_ares
1167enable_rt
Haibo Huangb5a52b92020-10-28 22:18:23 -07001168enable_ech
Elliott Hughes82be86d2017-09-20 17:00:17 -07001169enable_code_coverage
1170enable_dependency_tracking
Elliott Hughes34dd5f42021-08-10 13:01:18 -07001171with_schannel
1172with_secure_transport
1173with_amissl
1174with_ssl
1175with_openssl
1176with_gnutls
1177with_mbedtls
1178with_wolfssl
1179with_mesalink
1180with_bearssl
1181with_rustls
1182with_nss
1183with_darwinssl
Elliott Hughes82be86d2017-09-20 17:00:17 -07001184enable_largefile
1185enable_shared
1186enable_static
1187with_pic
1188enable_fast_install
1189with_aix_soname
1190with_gnu_ld
1191with_sysroot
1192enable_libtool_lock
1193enable_http
1194enable_ftp
1195enable_file
1196enable_ldap
1197enable_ldaps
Elliott Hughes34dd5f42021-08-10 13:01:18 -07001198with_hyper
Elliott Hughes82be86d2017-09-20 17:00:17 -07001199enable_rtsp
1200enable_proxy
1201enable_dict
1202enable_telnet
1203enable_tftp
1204enable_pop3
1205enable_imap
1206enable_smb
1207enable_smtp
1208enable_gopher
Haibo Huang24c77a12020-04-29 13:49:57 -07001209enable_mqtt
Elliott Hughes82be86d2017-09-20 17:00:17 -07001210enable_manual
1211enable_libcurl_option
1212enable_libgcc
1213with_zlib
Alex Deymo486467e2017-12-19 19:04:07 +01001214with_brotli
Haibo Huangc3c04f42020-08-19 13:00:07 -07001215with_zstd
Elliott Hughes82be86d2017-09-20 17:00:17 -07001216with_ldap_lib
1217with_lber_lib
1218enable_ipv6
1219with_gssapi_includes
1220with_gssapi_libs
1221with_gssapi
Alex Deymo486467e2017-12-19 19:04:07 +01001222with_default_ssl_backend
Elliott Hughes82be86d2017-09-20 17:00:17 -07001223with_egd_socket
1224with_random
Elliott Hughesa93fb052018-12-12 14:22:48 -08001225enable_openssl_auto_load_config
Elliott Hughes82be86d2017-09-20 17:00:17 -07001226with_ca_bundle
1227with_ca_path
1228with_ca_fallback
1229with_libpsl
Elliott Hughes34dd5f42021-08-10 13:01:18 -07001230with_libgsasl
Elliott Hughes82be86d2017-09-20 17:00:17 -07001231with_libmetalink
1232with_libssh2
Elliott Hughes0128fe42018-02-27 14:57:55 -08001233with_libssh
Haibo Huangb51266f2020-03-04 02:22:48 -08001234with_wolfssh
Elliott Hughes82be86d2017-09-20 17:00:17 -07001235with_librtmp
1236enable_versioned_symbols
1237with_winidn
1238with_libidn2
1239with_nghttp2
Haibo Huang445085a2019-09-11 13:33:50 -07001240with_ngtcp2
1241with_nghttp3
1242with_quiche
Elliott Hughes82be86d2017-09-20 17:00:17 -07001243with_zsh_functions_dir
Haibo Huang65021c72019-03-27 15:37:23 -07001244with_fish_functions_dir
Elliott Hughes82be86d2017-09-20 17:00:17 -07001245enable_threaded_resolver
1246enable_pthreads
1247enable_verbose
1248enable_sspi
1249enable_crypto_auth
Elliott Hughes34dd5f42021-08-10 13:01:18 -07001250enable_ntlm
Elliott Hughes82be86d2017-09-20 17:00:17 -07001251enable_ntlm_wb
1252enable_tls_srp
1253enable_unix_sockets
1254enable_cookies
Haibo Huangb5a52b92020-10-28 22:18:23 -07001255enable_socketpair
Haibo Huang001784b2019-07-19 05:27:28 -07001256enable_http_auth
1257enable_doh
1258enable_mime
1259enable_dateparse
1260enable_netrc
1261enable_progress_meter
1262enable_dnsshuffle
Elliott Hughes34dd5f42021-08-10 13:01:18 -07001263enable_get_easy_options
Haibo Huang65021c72019-03-27 15:37:23 -07001264enable_alt_svc
Elliott Hughes34dd5f42021-08-10 13:01:18 -07001265enable_hsts
Elliott Hughes82be86d2017-09-20 17:00:17 -07001266'
1267 ac_precious_vars='build_alias
1268host_alias
1269target_alias
1270CC
1271CFLAGS
1272LDFLAGS
1273LIBS
1274CPPFLAGS
1275CPP
1276LT_SYS_LIBRARY_PATH'
1277ac_subdirs_all='ares'
1278
1279# Initialize some variables set by options.
1280ac_init_help=
1281ac_init_version=false
1282ac_unrecognized_opts=
1283ac_unrecognized_sep=
1284# The variables have the same names as the options, with
1285# dashes changed to underlines.
1286cache_file=/dev/null
1287exec_prefix=NONE
1288no_create=
1289no_recursion=
1290prefix=NONE
1291program_prefix=NONE
1292program_suffix=NONE
1293program_transform_name=s,x,x,
1294silent=
1295site=
1296srcdir=
1297verbose=
1298x_includes=NONE
1299x_libraries=NONE
1300
1301# Installation directory options.
1302# These are left unexpanded so users can "make install exec_prefix=/foo"
1303# and all the variables that are supposed to be based on exec_prefix
1304# by default will actually change.
1305# Use braces instead of parens because sh, perl, etc. also accept them.
1306# (The list follows the same order as the GNU Coding Standards.)
1307bindir='${exec_prefix}/bin'
1308sbindir='${exec_prefix}/sbin'
1309libexecdir='${exec_prefix}/libexec'
1310datarootdir='${prefix}/share'
1311datadir='${datarootdir}'
1312sysconfdir='${prefix}/etc'
1313sharedstatedir='${prefix}/com'
1314localstatedir='${prefix}/var'
1315runstatedir='${localstatedir}/run'
1316includedir='${prefix}/include'
1317oldincludedir='/usr/include'
1318docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1319infodir='${datarootdir}/info'
1320htmldir='${docdir}'
1321dvidir='${docdir}'
1322pdfdir='${docdir}'
1323psdir='${docdir}'
1324libdir='${exec_prefix}/lib'
1325localedir='${datarootdir}/locale'
1326mandir='${datarootdir}/man'
1327
1328ac_prev=
1329ac_dashdash=
1330for ac_option
1331do
1332 # If the previous option needs an argument, assign it.
1333 if test -n "$ac_prev"; then
1334 eval $ac_prev=\$ac_option
1335 ac_prev=
1336 continue
1337 fi
1338
1339 case $ac_option in
1340 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1341 *=) ac_optarg= ;;
1342 *) ac_optarg=yes ;;
1343 esac
1344
Elliott Hughes82be86d2017-09-20 17:00:17 -07001345 case $ac_dashdash$ac_option in
1346 --)
1347 ac_dashdash=yes ;;
1348
1349 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1350 ac_prev=bindir ;;
1351 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1352 bindir=$ac_optarg ;;
1353
1354 -build | --build | --buil | --bui | --bu)
1355 ac_prev=build_alias ;;
1356 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1357 build_alias=$ac_optarg ;;
1358
1359 -cache-file | --cache-file | --cache-fil | --cache-fi \
1360 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1361 ac_prev=cache_file ;;
1362 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1363 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1364 cache_file=$ac_optarg ;;
1365
1366 --config-cache | -C)
1367 cache_file=config.cache ;;
1368
1369 -datadir | --datadir | --datadi | --datad)
1370 ac_prev=datadir ;;
1371 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1372 datadir=$ac_optarg ;;
1373
1374 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1375 | --dataroo | --dataro | --datar)
1376 ac_prev=datarootdir ;;
1377 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1378 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1379 datarootdir=$ac_optarg ;;
1380
1381 -disable-* | --disable-*)
1382 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1383 # Reject names that are not valid shell variable names.
1384 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Elliott Hughesf344baa2021-12-07 09:12:34 -08001385 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Elliott Hughes82be86d2017-09-20 17:00:17 -07001386 ac_useropt_orig=$ac_useropt
Elliott Hughesf344baa2021-12-07 09:12:34 -08001387 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Elliott Hughes82be86d2017-09-20 17:00:17 -07001388 case $ac_user_opts in
1389 *"
1390"enable_$ac_useropt"
1391"*) ;;
1392 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1393 ac_unrecognized_sep=', ';;
1394 esac
1395 eval enable_$ac_useropt=no ;;
1396
1397 -docdir | --docdir | --docdi | --doc | --do)
1398 ac_prev=docdir ;;
1399 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1400 docdir=$ac_optarg ;;
1401
1402 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1403 ac_prev=dvidir ;;
1404 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1405 dvidir=$ac_optarg ;;
1406
1407 -enable-* | --enable-*)
1408 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1409 # Reject names that are not valid shell variable names.
1410 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Elliott Hughesf344baa2021-12-07 09:12:34 -08001411 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Elliott Hughes82be86d2017-09-20 17:00:17 -07001412 ac_useropt_orig=$ac_useropt
Elliott Hughesf344baa2021-12-07 09:12:34 -08001413 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Elliott Hughes82be86d2017-09-20 17:00:17 -07001414 case $ac_user_opts in
1415 *"
1416"enable_$ac_useropt"
1417"*) ;;
1418 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1419 ac_unrecognized_sep=', ';;
1420 esac
1421 eval enable_$ac_useropt=\$ac_optarg ;;
1422
1423 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1424 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1425 | --exec | --exe | --ex)
1426 ac_prev=exec_prefix ;;
1427 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1428 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1429 | --exec=* | --exe=* | --ex=*)
1430 exec_prefix=$ac_optarg ;;
1431
1432 -gas | --gas | --ga | --g)
1433 # Obsolete; use --with-gas.
1434 with_gas=yes ;;
1435
1436 -help | --help | --hel | --he | -h)
1437 ac_init_help=long ;;
1438 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1439 ac_init_help=recursive ;;
1440 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1441 ac_init_help=short ;;
1442
1443 -host | --host | --hos | --ho)
1444 ac_prev=host_alias ;;
1445 -host=* | --host=* | --hos=* | --ho=*)
1446 host_alias=$ac_optarg ;;
1447
1448 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1449 ac_prev=htmldir ;;
1450 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1451 | --ht=*)
1452 htmldir=$ac_optarg ;;
1453
1454 -includedir | --includedir | --includedi | --included | --include \
1455 | --includ | --inclu | --incl | --inc)
1456 ac_prev=includedir ;;
1457 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1458 | --includ=* | --inclu=* | --incl=* | --inc=*)
1459 includedir=$ac_optarg ;;
1460
1461 -infodir | --infodir | --infodi | --infod | --info | --inf)
1462 ac_prev=infodir ;;
1463 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1464 infodir=$ac_optarg ;;
1465
1466 -libdir | --libdir | --libdi | --libd)
1467 ac_prev=libdir ;;
1468 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1469 libdir=$ac_optarg ;;
1470
1471 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1472 | --libexe | --libex | --libe)
1473 ac_prev=libexecdir ;;
1474 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1475 | --libexe=* | --libex=* | --libe=*)
1476 libexecdir=$ac_optarg ;;
1477
1478 -localedir | --localedir | --localedi | --localed | --locale)
1479 ac_prev=localedir ;;
1480 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1481 localedir=$ac_optarg ;;
1482
1483 -localstatedir | --localstatedir | --localstatedi | --localstated \
1484 | --localstate | --localstat | --localsta | --localst | --locals)
1485 ac_prev=localstatedir ;;
1486 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1487 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1488 localstatedir=$ac_optarg ;;
1489
1490 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1491 ac_prev=mandir ;;
1492 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1493 mandir=$ac_optarg ;;
1494
1495 -nfp | --nfp | --nf)
1496 # Obsolete; use --without-fp.
1497 with_fp=no ;;
1498
1499 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1500 | --no-cr | --no-c | -n)
1501 no_create=yes ;;
1502
1503 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1504 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1505 no_recursion=yes ;;
1506
1507 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1508 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1509 | --oldin | --oldi | --old | --ol | --o)
1510 ac_prev=oldincludedir ;;
1511 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1512 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1513 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1514 oldincludedir=$ac_optarg ;;
1515
1516 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1517 ac_prev=prefix ;;
1518 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1519 prefix=$ac_optarg ;;
1520
1521 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1522 | --program-pre | --program-pr | --program-p)
1523 ac_prev=program_prefix ;;
1524 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1525 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1526 program_prefix=$ac_optarg ;;
1527
1528 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1529 | --program-suf | --program-su | --program-s)
1530 ac_prev=program_suffix ;;
1531 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1532 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1533 program_suffix=$ac_optarg ;;
1534
1535 -program-transform-name | --program-transform-name \
1536 | --program-transform-nam | --program-transform-na \
1537 | --program-transform-n | --program-transform- \
1538 | --program-transform | --program-transfor \
1539 | --program-transfo | --program-transf \
1540 | --program-trans | --program-tran \
1541 | --progr-tra | --program-tr | --program-t)
1542 ac_prev=program_transform_name ;;
1543 -program-transform-name=* | --program-transform-name=* \
1544 | --program-transform-nam=* | --program-transform-na=* \
1545 | --program-transform-n=* | --program-transform-=* \
1546 | --program-transform=* | --program-transfor=* \
1547 | --program-transfo=* | --program-transf=* \
1548 | --program-trans=* | --program-tran=* \
1549 | --progr-tra=* | --program-tr=* | --program-t=*)
1550 program_transform_name=$ac_optarg ;;
1551
1552 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1553 ac_prev=pdfdir ;;
1554 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1555 pdfdir=$ac_optarg ;;
1556
1557 -psdir | --psdir | --psdi | --psd | --ps)
1558 ac_prev=psdir ;;
1559 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1560 psdir=$ac_optarg ;;
1561
1562 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1563 | -silent | --silent | --silen | --sile | --sil)
1564 silent=yes ;;
1565
1566 -runstatedir | --runstatedir | --runstatedi | --runstated \
1567 | --runstate | --runstat | --runsta | --runst | --runs \
1568 | --run | --ru | --r)
1569 ac_prev=runstatedir ;;
1570 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1571 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1572 | --run=* | --ru=* | --r=*)
1573 runstatedir=$ac_optarg ;;
1574
1575 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1576 ac_prev=sbindir ;;
1577 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1578 | --sbi=* | --sb=*)
1579 sbindir=$ac_optarg ;;
1580
1581 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1582 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1583 | --sharedst | --shareds | --shared | --share | --shar \
1584 | --sha | --sh)
1585 ac_prev=sharedstatedir ;;
1586 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1587 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1588 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1589 | --sha=* | --sh=*)
1590 sharedstatedir=$ac_optarg ;;
1591
1592 -site | --site | --sit)
1593 ac_prev=site ;;
1594 -site=* | --site=* | --sit=*)
1595 site=$ac_optarg ;;
1596
1597 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1598 ac_prev=srcdir ;;
1599 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1600 srcdir=$ac_optarg ;;
1601
1602 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1603 | --syscon | --sysco | --sysc | --sys | --sy)
1604 ac_prev=sysconfdir ;;
1605 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1606 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1607 sysconfdir=$ac_optarg ;;
1608
1609 -target | --target | --targe | --targ | --tar | --ta | --t)
1610 ac_prev=target_alias ;;
1611 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1612 target_alias=$ac_optarg ;;
1613
1614 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1615 verbose=yes ;;
1616
1617 -version | --version | --versio | --versi | --vers | -V)
1618 ac_init_version=: ;;
1619
1620 -with-* | --with-*)
1621 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1622 # Reject names that are not valid shell variable names.
1623 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Elliott Hughesf344baa2021-12-07 09:12:34 -08001624 as_fn_error $? "invalid package name: \`$ac_useropt'"
Elliott Hughes82be86d2017-09-20 17:00:17 -07001625 ac_useropt_orig=$ac_useropt
Elliott Hughesf344baa2021-12-07 09:12:34 -08001626 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Elliott Hughes82be86d2017-09-20 17:00:17 -07001627 case $ac_user_opts in
1628 *"
1629"with_$ac_useropt"
1630"*) ;;
1631 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1632 ac_unrecognized_sep=', ';;
1633 esac
1634 eval with_$ac_useropt=\$ac_optarg ;;
1635
1636 -without-* | --without-*)
1637 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1638 # Reject names that are not valid shell variable names.
1639 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Elliott Hughesf344baa2021-12-07 09:12:34 -08001640 as_fn_error $? "invalid package name: \`$ac_useropt'"
Elliott Hughes82be86d2017-09-20 17:00:17 -07001641 ac_useropt_orig=$ac_useropt
Elliott Hughesf344baa2021-12-07 09:12:34 -08001642 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Elliott Hughes82be86d2017-09-20 17:00:17 -07001643 case $ac_user_opts in
1644 *"
1645"with_$ac_useropt"
1646"*) ;;
1647 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1648 ac_unrecognized_sep=', ';;
1649 esac
1650 eval with_$ac_useropt=no ;;
1651
1652 --x)
1653 # Obsolete; use --with-x.
1654 with_x=yes ;;
1655
1656 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1657 | --x-incl | --x-inc | --x-in | --x-i)
1658 ac_prev=x_includes ;;
1659 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1660 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1661 x_includes=$ac_optarg ;;
1662
1663 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1664 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1665 ac_prev=x_libraries ;;
1666 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1667 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1668 x_libraries=$ac_optarg ;;
1669
1670 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1671Try \`$0 --help' for more information"
1672 ;;
1673
1674 *=*)
1675 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1676 # Reject names that are not valid shell variable names.
1677 case $ac_envvar in #(
1678 '' | [0-9]* | *[!_$as_cr_alnum]* )
1679 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1680 esac
1681 eval $ac_envvar=\$ac_optarg
1682 export $ac_envvar ;;
1683
1684 *)
1685 # FIXME: should be removed in autoconf 3.0.
Elliott Hughesf344baa2021-12-07 09:12:34 -08001686 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
Elliott Hughes82be86d2017-09-20 17:00:17 -07001687 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Elliott Hughesf344baa2021-12-07 09:12:34 -08001688 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
Elliott Hughes82be86d2017-09-20 17:00:17 -07001689 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1690 ;;
1691
1692 esac
1693done
1694
1695if test -n "$ac_prev"; then
1696 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1697 as_fn_error $? "missing argument to $ac_option"
1698fi
1699
1700if test -n "$ac_unrecognized_opts"; then
1701 case $enable_option_checking in
1702 no) ;;
1703 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -08001704 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -07001705 esac
1706fi
1707
1708# Check all directory arguments for consistency.
1709for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1710 datadir sysconfdir sharedstatedir localstatedir includedir \
1711 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1712 libdir localedir mandir runstatedir
1713do
1714 eval ac_val=\$$ac_var
1715 # Remove trailing slashes.
1716 case $ac_val in
1717 */ )
1718 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1719 eval $ac_var=\$ac_val;;
1720 esac
1721 # Be sure to have absolute directory names.
1722 case $ac_val in
1723 [\\/$]* | ?:[\\/]* ) continue;;
1724 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1725 esac
1726 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1727done
1728
1729# There might be people who depend on the old broken behavior: `$host'
1730# used to hold the argument of --host etc.
1731# FIXME: To remove some day.
1732build=$build_alias
1733host=$host_alias
1734target=$target_alias
1735
1736# FIXME: To remove some day.
1737if test "x$host_alias" != x; then
1738 if test "x$build_alias" = x; then
1739 cross_compiling=maybe
1740 elif test "x$build_alias" != "x$host_alias"; then
1741 cross_compiling=yes
1742 fi
1743fi
1744
1745ac_tool_prefix=
1746test -n "$host_alias" && ac_tool_prefix=$host_alias-
1747
1748test "$silent" = yes && exec 6>/dev/null
1749
1750
1751ac_pwd=`pwd` && test -n "$ac_pwd" &&
1752ac_ls_di=`ls -di .` &&
1753ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1754 as_fn_error $? "working directory cannot be determined"
1755test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1756 as_fn_error $? "pwd does not report name of working directory"
1757
1758
1759# Find the source files, if location was not specified.
1760if test -z "$srcdir"; then
1761 ac_srcdir_defaulted=yes
1762 # Try the directory containing this script, then the parent directory.
1763 ac_confdir=`$as_dirname -- "$as_myself" ||
1764$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1765 X"$as_myself" : 'X\(//\)[^/]' \| \
1766 X"$as_myself" : 'X\(//\)$' \| \
1767 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Elliott Hughesf344baa2021-12-07 09:12:34 -08001768printf "%s\n" X"$as_myself" |
Elliott Hughes82be86d2017-09-20 17:00:17 -07001769 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1770 s//\1/
1771 q
1772 }
1773 /^X\(\/\/\)[^/].*/{
1774 s//\1/
1775 q
1776 }
1777 /^X\(\/\/\)$/{
1778 s//\1/
1779 q
1780 }
1781 /^X\(\/\).*/{
1782 s//\1/
1783 q
1784 }
1785 s/.*/./; q'`
1786 srcdir=$ac_confdir
1787 if test ! -r "$srcdir/$ac_unique_file"; then
1788 srcdir=..
1789 fi
1790else
1791 ac_srcdir_defaulted=no
1792fi
1793if test ! -r "$srcdir/$ac_unique_file"; then
1794 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1795 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1796fi
1797ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1798ac_abs_confdir=`(
1799 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1800 pwd)`
1801# When building in place, set srcdir=.
1802if test "$ac_abs_confdir" = "$ac_pwd"; then
1803 srcdir=.
1804fi
1805# Remove unnecessary trailing slashes from srcdir.
1806# Double slashes in file names in object file debugging info
1807# mess up M-x gdb in Emacs.
1808case $srcdir in
1809*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1810esac
1811for ac_var in $ac_precious_vars; do
1812 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1813 eval ac_env_${ac_var}_value=\$${ac_var}
1814 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1815 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1816done
1817
1818#
1819# Report the --help message.
1820#
1821if test "$ac_init_help" = "long"; then
1822 # Omit some internal or obsolete options to make the list less imposing.
1823 # This message is too long to be a string in the A/UX 3.1 sh.
1824 cat <<_ACEOF
1825\`configure' configures curl - to adapt to many kinds of systems.
1826
1827Usage: $0 [OPTION]... [VAR=VALUE]...
1828
1829To assign environment variables (e.g., CC, CFLAGS...), specify them as
1830VAR=VALUE. See below for descriptions of some of the useful variables.
1831
1832Defaults for the options are specified in brackets.
1833
1834Configuration:
1835 -h, --help display this help and exit
1836 --help=short display options specific to this package
1837 --help=recursive display the short help of all the included packages
1838 -V, --version display version information and exit
1839 -q, --quiet, --silent do not print \`checking ...' messages
1840 --cache-file=FILE cache test results in FILE [disabled]
1841 -C, --config-cache alias for \`--cache-file=config.cache'
1842 -n, --no-create do not create output files
1843 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1844
1845Installation directories:
1846 --prefix=PREFIX install architecture-independent files in PREFIX
1847 [$ac_default_prefix]
1848 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1849 [PREFIX]
1850
1851By default, \`make install' will install all the files in
1852\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1853an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1854for instance \`--prefix=\$HOME'.
1855
1856For better control, use the options below.
1857
1858Fine tuning of the installation directories:
1859 --bindir=DIR user executables [EPREFIX/bin]
1860 --sbindir=DIR system admin executables [EPREFIX/sbin]
1861 --libexecdir=DIR program executables [EPREFIX/libexec]
1862 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1863 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1864 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1865 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1866 --libdir=DIR object code libraries [EPREFIX/lib]
1867 --includedir=DIR C header files [PREFIX/include]
1868 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1869 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1870 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1871 --infodir=DIR info documentation [DATAROOTDIR/info]
1872 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1873 --mandir=DIR man documentation [DATAROOTDIR/man]
1874 --docdir=DIR documentation root [DATAROOTDIR/doc/curl]
1875 --htmldir=DIR html documentation [DOCDIR]
1876 --dvidir=DIR dvi documentation [DOCDIR]
1877 --pdfdir=DIR pdf documentation [DOCDIR]
1878 --psdir=DIR ps documentation [DOCDIR]
1879_ACEOF
1880
1881 cat <<\_ACEOF
1882
1883Program names:
1884 --program-prefix=PREFIX prepend PREFIX to installed program names
1885 --program-suffix=SUFFIX append SUFFIX to installed program names
1886 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1887
1888System types:
1889 --build=BUILD configure for building on BUILD [guessed]
1890 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1891_ACEOF
1892fi
1893
1894if test -n "$ac_init_help"; then
1895 case $ac_init_help in
1896 short | recursive ) echo "Configuration of curl -:";;
1897 esac
1898 cat <<\_ACEOF
1899
1900Optional Features:
1901 --disable-option-checking ignore unrecognized --enable/--with options
1902 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1903 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1904 --enable-maintainer-mode
1905 enable make rules and dependencies not useful (and
1906 sometimes confusing) to the casual installer
1907 --enable-silent-rules less verbose build output (undo: "make V=1")
1908 --disable-silent-rules verbose build output (undo: "make V=0")
1909 --enable-debug Enable debug build options
1910 --disable-debug Disable debug build options
1911 --enable-optimize Enable compiler optimizations
1912 --disable-optimize Disable compiler optimizations
1913 --enable-warnings Enable strict compiler warnings
1914 --disable-warnings Disable strict compiler warnings
1915 --enable-werror Enable compiler warnings as errors
1916 --disable-werror Disable compiler warnings as errors
1917 --enable-curldebug Enable curl debug memory tracking
1918 --disable-curldebug Disable curl debug memory tracking
1919 --enable-symbol-hiding Enable hiding of library internal symbols
1920 --disable-symbol-hiding Disable hiding of library internal symbols
Elliott Hughes82be86d2017-09-20 17:00:17 -07001921 --enable-ares[=PATH] Enable c-ares for DNS lookups
1922 --disable-ares Disable c-ares for DNS lookups
1923 --disable-rt disable dependency on -lrt
Haibo Huangb5a52b92020-10-28 22:18:23 -07001924 --enable-ech Enable ECH support
1925 --disable-ech Disable ECH support
Haibo Huang51d9d882019-02-06 01:36:06 -08001926 --enable-code-coverage Provide code coverage
Elliott Hughes82be86d2017-09-20 17:00:17 -07001927 --enable-dependency-tracking
1928 do not reject slow dependency extractors
1929 --disable-dependency-tracking
1930 speeds up one-time build
1931 --disable-largefile omit support for large files
1932 --enable-shared[=PKGS] build shared libraries [default=yes]
1933 --enable-static[=PKGS] build static libraries [default=yes]
1934 --enable-fast-install[=PKGS]
1935 optimize for fast installation [default=yes]
1936 --disable-libtool-lock avoid locking (might break parallel builds)
1937 --enable-http Enable HTTP support
1938 --disable-http Disable HTTP support
1939 --enable-ftp Enable FTP support
1940 --disable-ftp Disable FTP support
1941 --enable-file Enable FILE support
1942 --disable-file Disable FILE support
1943 --enable-ldap Enable LDAP support
1944 --disable-ldap Disable LDAP support
1945 --enable-ldaps Enable LDAPS support
1946 --disable-ldaps Disable LDAPS support
1947 --enable-rtsp Enable RTSP support
Elliott Hughes34dd5f42021-08-10 13:01:18 -07001948 --disable-rtsp Disable RTSP support
Elliott Hughes82be86d2017-09-20 17:00:17 -07001949 --enable-proxy Enable proxy support
1950 --disable-proxy Disable proxy support
1951 --enable-dict Enable DICT support
1952 --disable-dict Disable DICT support
1953 --enable-telnet Enable TELNET support
1954 --disable-telnet Disable TELNET support
1955 --enable-tftp Enable TFTP support
1956 --disable-tftp Disable TFTP support
1957 --enable-pop3 Enable POP3 support
1958 --disable-pop3 Disable POP3 support
1959 --enable-imap Enable IMAP support
1960 --disable-imap Disable IMAP support
1961 --enable-smb Enable SMB/CIFS support
1962 --disable-smb Disable SMB/CIFS support
1963 --enable-smtp Enable SMTP support
1964 --disable-smtp Disable SMTP support
1965 --enable-gopher Enable Gopher support
1966 --disable-gopher Disable Gopher support
Haibo Huang24c77a12020-04-29 13:49:57 -07001967 --enable-mqtt Enable MQTT support
1968 --disable-mqtt Disable MQTT support
Elliott Hughes82be86d2017-09-20 17:00:17 -07001969 --enable-manual Enable built-in manual
1970 --disable-manual Disable built-in manual
1971 --enable-libcurl-option Enable --libcurl C code generation support
1972 --disable-libcurl-option
1973 Disable --libcurl C code generation support
1974 --enable-libgcc use libgcc when linking
1975 --enable-ipv6 Enable IPv6 (with IPv4) support
1976 --disable-ipv6 Disable IPv6 support
Elliott Hughesa93fb052018-12-12 14:22:48 -08001977 --enable-openssl-auto-load-config
1978 Enable automatic loading of OpenSSL configuration
1979 --disable-openssl-auto-load-config
1980 Disable automatic loading of OpenSSL configuration
Elliott Hughes82be86d2017-09-20 17:00:17 -07001981 --enable-versioned-symbols
1982 Enable versioned symbols in shared library
1983 --disable-versioned-symbols
1984 Disable versioned symbols in shared library
1985 --enable-threaded-resolver
1986 Enable threaded resolver
1987 --disable-threaded-resolver
1988 Disable threaded resolver
1989 --enable-pthreads Enable POSIX threads (default for threaded resolver)
1990 --disable-pthreads Disable POSIX threads
1991 --enable-verbose Enable verbose strings
1992 --disable-verbose Disable verbose strings
1993 --enable-sspi Enable SSPI
1994 --disable-sspi Disable SSPI
1995 --enable-crypto-auth Enable cryptographic authentication
1996 --disable-crypto-auth Disable cryptographic authentication
Elliott Hughes34dd5f42021-08-10 13:01:18 -07001997 --enable-ntlm Enable NTLM support
1998 --disable-ntlm Disable NTLM support
Elliott Hughes82be86d2017-09-20 17:00:17 -07001999 --enable-ntlm-wb[=FILE] Enable NTLM delegation to winbind's ntlm_auth
2000 helper, where FILE is ntlm_auth's absolute filename
2001 (default: /usr/bin/ntlm_auth)
2002 --disable-ntlm-wb Disable NTLM delegation to winbind's ntlm_auth
2003 helper
2004 --enable-tls-srp Enable TLS-SRP authentication
2005 --disable-tls-srp Disable TLS-SRP authentication
2006 --enable-unix-sockets Enable Unix domain sockets
2007 --disable-unix-sockets Disable Unix domain sockets
2008 --enable-cookies Enable cookies support
2009 --disable-cookies Disable cookies support
Haibo Huangb5a52b92020-10-28 22:18:23 -07002010 --enable-socketpair Enable socketpair support
2011 --disable-socketpair Disable socketpair support
Haibo Huang001784b2019-07-19 05:27:28 -07002012 --enable-http-auth Enable HTTP authentication support
2013 --disable-http-auth Disable HTTP authentication support
2014 --enable-doh Enable DoH support
2015 --disable-doh Disable DoH support
2016 --enable-mime Enable mime API support
2017 --disable-mime Disable mime API support
2018 --enable-dateparse Enable date parsing
2019 --disable-dateparse Disable date parsing
2020 --enable-netrc Enable netrc parsing
2021 --disable-netrc Disable netrc parsing
2022 --enable-progress-meter Enable progress-meter
2023 --disable-progress-meter
2024 Disable progress-meter
2025 --enable-dnsshuffle Enable DNS shuffling
Haibo Huangb51266f2020-03-04 02:22:48 -08002026 --disable-dnsshuffle Disable DNS shuffling
Haibo Huangb5a52b92020-10-28 22:18:23 -07002027 --enable-get-easy-options
2028 Enable curl_easy_options
2029 --disable-get-easy-options
2030 Disable curl_easy_options
Haibo Huang65021c72019-03-27 15:37:23 -07002031 --enable-alt-svc Enable alt-svc support
2032 --disable-alt-svc Disable alt-svc support
Elliott Hughes34dd5f42021-08-10 13:01:18 -07002033 --enable-hsts Enable HSTS support
2034 --disable-hsts Disable HSTS support
Elliott Hughes82be86d2017-09-20 17:00:17 -07002035
2036Optional Packages:
2037 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2038 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Elliott Hughes34dd5f42021-08-10 13:01:18 -07002039 --with-schannel enable Windows native SSL/TLS
2040 --with-secure-transport enable Apple OS native SSL/TLS
2041 --with-amissl enable Amiga native SSL/TLS (AmiSSL)
2042 --with-ssl=PATH old version of --with-openssl
2043 --without-ssl build without any TLS library
2044 --with-openssl=PATH Where to look for OpenSSL, PATH points to the SSL
2045 installation (default: /usr/local/ssl); when
2046 possible, set the PKG_CONFIG_PATH environment
2047 variable instead of using this option
2048 --with-gnutls=PATH where to look for GnuTLS, PATH points to the
2049 installation root
2050 --with-mbedtls=PATH where to look for mbedTLS, PATH points to the
2051 installation root
2052 --with-wolfssl=PATH where to look for WolfSSL, PATH points to the
2053 installation root (default: system lib default)
2054 --with-mesalink=PATH where to look for MesaLink, PATH points to the
2055 installation root
2056 --with-bearssl=PATH where to look for BearSSL, PATH points to the
2057 installation root
2058 --with-rustls=PATH where to look for rustls, PATH points to the
2059 installation root
2060 --with-nss=PATH where to look for NSS, PATH points to the
2061 installation root
2062
Elliott Hughes82be86d2017-09-20 17:00:17 -07002063 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
2064 both]
2065 --with-aix-soname=aix|svr4|both
2066 shared library versioning (aka "SONAME") variant to
2067 provide on AIX, [default=aix].
2068 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2069 --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
2070 compiler's sysroot if not specified).
Elliott Hughes34dd5f42021-08-10 13:01:18 -07002071 --with-hyper=PATH Enable hyper usage
2072 --without-hyper Disable hyper usage
Elliott Hughes82be86d2017-09-20 17:00:17 -07002073 --with-zlib=PATH search for zlib in PATH
2074 --without-zlib disable use of zlib
Alex Deymo486467e2017-12-19 19:04:07 +01002075 --with-brotli=PATH Where to look for brotli, PATH points to the BROTLI
2076 installation; when possible, set the PKG_CONFIG_PATH
2077 environment variable instead of using this option
2078 --without-brotli disable BROTLI
Haibo Huangc3c04f42020-08-19 13:00:07 -07002079 --with-zstd=PATH Where to look for libzstd, PATH points to the
2080 libzstd installation; when possible, set the
2081 PKG_CONFIG_PATH environment variable instead of
2082 using this option
2083 --without-zstd disable libzstd
Elliott Hughes82be86d2017-09-20 17:00:17 -07002084 --with-ldap-lib=libname Specify name of ldap lib file
2085 --with-lber-lib=libname Specify name of lber lib file
2086 --with-gssapi-includes=DIR
2087 Specify location of GSS-API headers
2088 --with-gssapi-libs=DIR Specify location of GSS-API libs
2089 --with-gssapi=DIR Where to look for GSS-API
Alex Deymo486467e2017-12-19 19:04:07 +01002090 --with-default-ssl-backend=NAME
2091 Use NAME as default SSL backend
2092 --without-default-ssl-backend
2093 Use implicit default SSL backend
Elliott Hughes82be86d2017-09-20 17:00:17 -07002094 --with-egd-socket=FILE Entropy Gathering Daemon socket pathname
2095 --with-random=FILE read randomness from FILE (default=/dev/urandom)
Elliott Hughes82be86d2017-09-20 17:00:17 -07002096 --with-ca-bundle=FILE Path to a file containing CA certificates (example:
2097 /etc/ca-bundle.crt)
2098 --without-ca-bundle Don't use a default CA bundle
2099 --with-ca-path=DIRECTORY
2100 Path to a directory containing CA certificates
2101 stored individually, with their filenames in a hash
Haibo Huangee03b1a2020-03-11 01:33:32 -07002102 format. This option can be used with the OpenSSL,
2103 GnuTLS and mbedTLS backends. Refer to OpenSSL
2104 c_rehash for details. (example: /etc/certificates)
Elliott Hughes82be86d2017-09-20 17:00:17 -07002105 --without-ca-path Don't use a default CA path
2106 --with-ca-fallback Use the built in CA store of the SSL library
2107 --without-ca-fallback Don't use the built in CA store of the SSL library
2108 --without-libpsl disable support for libpsl cookie checking
Elliott Hughes34dd5f42021-08-10 13:01:18 -07002109 --without-libgsasl disable libgsasl support for SCRAM
Elliott Hughes82be86d2017-09-20 17:00:17 -07002110 --with-libssh2=PATH Where to look for libssh2, PATH points to the
Haibo Huangb51266f2020-03-04 02:22:48 -08002111 libssh2 installation; when possible, set the
Elliott Hughes82be86d2017-09-20 17:00:17 -07002112 PKG_CONFIG_PATH environment variable instead of
2113 using this option
Haibo Huangb51266f2020-03-04 02:22:48 -08002114 --with-libssh2 enable libssh2
2115 --with-libssh=PATH Where to look for libssh, PATH points to the libssh
Elliott Hughes0128fe42018-02-27 14:57:55 -08002116 installation; when possible, set the PKG_CONFIG_PATH
2117 environment variable instead of using this option
Haibo Huangb51266f2020-03-04 02:22:48 -08002118 --with-libssh enable libssh
2119 --with-wolfssh=PATH Where to look for wolfssh, PATH points to the
2120 wolfSSH installation; when possible, set the
2121 PKG_CONFIG_PATH environment variable instead of
2122 using this option
2123 --with-wolfssh enable wolfssh
Elliott Hughes82be86d2017-09-20 17:00:17 -07002124 --with-librtmp=PATH Where to look for librtmp, PATH points to the
2125 LIBRTMP installation; when possible, set the
2126 PKG_CONFIG_PATH environment variable instead of
2127 using this option
2128 --without-librtmp disable LIBRTMP
2129 --with-winidn=PATH enable Windows native IDN
2130 --without-winidn disable Windows native IDN
2131 --with-libidn2=PATH Enable libidn2 usage
2132 --without-libidn2 Disable libidn2 usage
2133 --with-nghttp2=PATH Enable nghttp2 usage
2134 --without-nghttp2 Disable nghttp2 usage
Haibo Huang445085a2019-09-11 13:33:50 -07002135 --with-ngtcp2=PATH Enable ngtcp2 usage
2136 --without-ngtcp2 Disable ngtcp2 usage
2137 --with-nghttp3=PATH Enable nghttp3 usage
2138 --without-nghttp3 Disable nghttp3 usage
2139 --with-quiche=PATH Enable quiche usage
2140 --without-quiche Disable quiche usage
Elliott Hughes82be86d2017-09-20 17:00:17 -07002141 --with-zsh-functions-dir=PATH
2142 Install zsh completions to PATH
2143 --without-zsh-functions-dir
2144 Do not install zsh completions
Haibo Huang65021c72019-03-27 15:37:23 -07002145 --with-fish-functions-dir=PATH
2146 Install fish completions to PATH
2147 --without-fish-functions-dir
2148 Do not install fish completions
Elliott Hughes82be86d2017-09-20 17:00:17 -07002149
2150Some influential environment variables:
2151 CC C compiler command
2152 CFLAGS C compiler flags
2153 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2154 nonstandard directory <lib dir>
2155 LIBS libraries to pass to the linker, e.g. -l<library>
2156 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2157 you have headers in a nonstandard directory <include dir>
2158 CPP C preprocessor
2159 LT_SYS_LIBRARY_PATH
2160 User-defined run-time library search path.
2161
2162Use these variables to override the choices made by `configure' or to help
2163it to find libraries and programs with nonstandard names/locations.
2164
Elliott Hughes34dd5f42021-08-10 13:01:18 -07002165Report bugs to <a suitable curl mailing list: https://curl.se/mail/>.
Elliott Hughes82be86d2017-09-20 17:00:17 -07002166_ACEOF
2167ac_status=$?
2168fi
2169
2170if test "$ac_init_help" = "recursive"; then
2171 # If there are subdirs, report their specific --help.
2172 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2173 test -d "$ac_dir" ||
2174 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2175 continue
2176 ac_builddir=.
2177
2178case "$ac_dir" in
2179.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2180*)
Elliott Hughesf344baa2021-12-07 09:12:34 -08002181 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Elliott Hughes82be86d2017-09-20 17:00:17 -07002182 # A ".." for each directory in $ac_dir_suffix.
Elliott Hughesf344baa2021-12-07 09:12:34 -08002183 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Elliott Hughes82be86d2017-09-20 17:00:17 -07002184 case $ac_top_builddir_sub in
2185 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2186 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2187 esac ;;
2188esac
2189ac_abs_top_builddir=$ac_pwd
2190ac_abs_builddir=$ac_pwd$ac_dir_suffix
2191# for backward compatibility:
2192ac_top_builddir=$ac_top_build_prefix
2193
2194case $srcdir in
2195 .) # We are building in place.
2196 ac_srcdir=.
2197 ac_top_srcdir=$ac_top_builddir_sub
2198 ac_abs_top_srcdir=$ac_pwd ;;
2199 [\\/]* | ?:[\\/]* ) # Absolute name.
2200 ac_srcdir=$srcdir$ac_dir_suffix;
2201 ac_top_srcdir=$srcdir
2202 ac_abs_top_srcdir=$srcdir ;;
2203 *) # Relative name.
2204 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2205 ac_top_srcdir=$ac_top_build_prefix$srcdir
2206 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2207esac
2208ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2209
2210 cd "$ac_dir" || { ac_status=$?; continue; }
Elliott Hughesf344baa2021-12-07 09:12:34 -08002211 # Check for configure.gnu first; this name is used for a wrapper for
2212 # Metaconfig's "Configure" on case-insensitive file systems.
Elliott Hughes82be86d2017-09-20 17:00:17 -07002213 if test -f "$ac_srcdir/configure.gnu"; then
2214 echo &&
2215 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2216 elif test -f "$ac_srcdir/configure"; then
2217 echo &&
2218 $SHELL "$ac_srcdir/configure" --help=recursive
2219 else
Elliott Hughesf344baa2021-12-07 09:12:34 -08002220 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Elliott Hughes82be86d2017-09-20 17:00:17 -07002221 fi || ac_status=$?
2222 cd "$ac_pwd" || { ac_status=$?; break; }
2223 done
2224fi
2225
2226test -n "$ac_init_help" && exit $ac_status
2227if $ac_init_version; then
2228 cat <<\_ACEOF
2229curl configure -
Elliott Hughesf344baa2021-12-07 09:12:34 -08002230generated by GNU Autoconf 2.71
Elliott Hughes82be86d2017-09-20 17:00:17 -07002231
Elliott Hughesf344baa2021-12-07 09:12:34 -08002232Copyright (C) 2021 Free Software Foundation, Inc.
Elliott Hughes82be86d2017-09-20 17:00:17 -07002233This configure script is free software; the Free Software Foundation
2234gives unlimited permission to copy, distribute and modify it.
2235
Elliott Hughes34dd5f42021-08-10 13:01:18 -07002236Copyright (c) 1998 - 2021 Daniel Stenberg, <daniel@haxx.se>
Elliott Hughes82be86d2017-09-20 17:00:17 -07002237This configure script may be copied, distributed and modified under the
2238terms of the curl license; see COPYING for more details
2239_ACEOF
2240 exit
2241fi
2242
2243## ------------------------ ##
2244## Autoconf initialization. ##
2245## ------------------------ ##
2246
2247# ac_fn_c_try_compile LINENO
2248# --------------------------
2249# Try to compile conftest.$ac_ext, and return whether this succeeded.
2250ac_fn_c_try_compile ()
2251{
2252 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Elliott Hughesf344baa2021-12-07 09:12:34 -08002253 rm -f conftest.$ac_objext conftest.beam
Elliott Hughes82be86d2017-09-20 17:00:17 -07002254 if { { ac_try="$ac_compile"
2255case "(($ac_try" in
2256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2257 *) ac_try_echo=$ac_try;;
2258esac
2259eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Elliott Hughesf344baa2021-12-07 09:12:34 -08002260printf "%s\n" "$ac_try_echo"; } >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07002261 (eval "$ac_compile") 2>conftest.err
2262 ac_status=$?
2263 if test -s conftest.err; then
2264 grep -v '^ *+' conftest.err >conftest.er1
2265 cat conftest.er1 >&5
2266 mv -f conftest.er1 conftest.err
2267 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08002268 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07002269 test $ac_status = 0; } && {
2270 test -z "$ac_c_werror_flag" ||
2271 test ! -s conftest.err
Elliott Hughesf344baa2021-12-07 09:12:34 -08002272 } && test -s conftest.$ac_objext
2273then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07002274 ac_retval=0
Elliott Hughesf344baa2021-12-07 09:12:34 -08002275else $as_nop
2276 printf "%s\n" "$as_me: failed program was:" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07002277sed 's/^/| /' conftest.$ac_ext >&5
2278
2279 ac_retval=1
2280fi
2281 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2282 as_fn_set_status $ac_retval
2283
2284} # ac_fn_c_try_compile
2285
2286# ac_fn_c_try_cpp LINENO
2287# ----------------------
2288# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2289ac_fn_c_try_cpp ()
2290{
2291 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2292 if { { ac_try="$ac_cpp conftest.$ac_ext"
2293case "(($ac_try" in
2294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2295 *) ac_try_echo=$ac_try;;
2296esac
2297eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Elliott Hughesf344baa2021-12-07 09:12:34 -08002298printf "%s\n" "$ac_try_echo"; } >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07002299 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2300 ac_status=$?
2301 if test -s conftest.err; then
2302 grep -v '^ *+' conftest.err >conftest.er1
2303 cat conftest.er1 >&5
2304 mv -f conftest.er1 conftest.err
2305 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08002306 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07002307 test $ac_status = 0; } > conftest.i && {
2308 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2309 test ! -s conftest.err
Elliott Hughesf344baa2021-12-07 09:12:34 -08002310 }
2311then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07002312 ac_retval=0
Elliott Hughesf344baa2021-12-07 09:12:34 -08002313else $as_nop
2314 printf "%s\n" "$as_me: failed program was:" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07002315sed 's/^/| /' conftest.$ac_ext >&5
2316
2317 ac_retval=1
2318fi
2319 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2320 as_fn_set_status $ac_retval
2321
2322} # ac_fn_c_try_cpp
2323
Alex Deymo486467e2017-12-19 19:04:07 +01002324# ac_fn_c_try_link LINENO
2325# -----------------------
2326# Try to link conftest.$ac_ext, and return whether this succeeded.
2327ac_fn_c_try_link ()
2328{
2329 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Elliott Hughesf344baa2021-12-07 09:12:34 -08002330 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
Alex Deymo486467e2017-12-19 19:04:07 +01002331 if { { ac_try="$ac_link"
2332case "(($ac_try" in
2333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2334 *) ac_try_echo=$ac_try;;
2335esac
2336eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Elliott Hughesf344baa2021-12-07 09:12:34 -08002337printf "%s\n" "$ac_try_echo"; } >&5
Alex Deymo486467e2017-12-19 19:04:07 +01002338 (eval "$ac_link") 2>conftest.err
2339 ac_status=$?
2340 if test -s conftest.err; then
2341 grep -v '^ *+' conftest.err >conftest.er1
2342 cat conftest.er1 >&5
2343 mv -f conftest.er1 conftest.err
2344 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08002345 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Alex Deymo486467e2017-12-19 19:04:07 +01002346 test $ac_status = 0; } && {
2347 test -z "$ac_c_werror_flag" ||
2348 test ! -s conftest.err
2349 } && test -s conftest$ac_exeext && {
2350 test "$cross_compiling" = yes ||
2351 test -x conftest$ac_exeext
Elliott Hughesf344baa2021-12-07 09:12:34 -08002352 }
2353then :
Alex Deymo486467e2017-12-19 19:04:07 +01002354 ac_retval=0
Elliott Hughesf344baa2021-12-07 09:12:34 -08002355else $as_nop
2356 printf "%s\n" "$as_me: failed program was:" >&5
Alex Deymo486467e2017-12-19 19:04:07 +01002357sed 's/^/| /' conftest.$ac_ext >&5
2358
2359 ac_retval=1
2360fi
2361 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2362 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2363 # interfere with the next link command; also delete a directory that is
2364 # left behind by Apple's compiler. We do this before executing the actions.
2365 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2366 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2367 as_fn_set_status $ac_retval
2368
2369} # ac_fn_c_try_link
2370
Elliott Hughes82be86d2017-09-20 17:00:17 -07002371# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2372# -------------------------------------------------------
2373# Tests whether HEADER exists and can be compiled using the include files in
2374# INCLUDES, setting the cache variable VAR accordingly.
2375ac_fn_c_check_header_compile ()
2376{
2377 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Elliott Hughesf344baa2021-12-07 09:12:34 -08002378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2379printf %s "checking for $2... " >&6; }
2380if eval test \${$3+y}
2381then :
2382 printf %s "(cached) " >&6
2383else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07002384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2385/* end confdefs.h. */
2386$4
2387#include <$2>
2388_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08002389if ac_fn_c_try_compile "$LINENO"
2390then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07002391 eval "$3=yes"
Elliott Hughesf344baa2021-12-07 09:12:34 -08002392else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07002393 eval "$3=no"
2394fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08002395rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07002396fi
2397eval ac_res=\$$3
Elliott Hughesf344baa2021-12-07 09:12:34 -08002398 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2399printf "%s\n" "$ac_res" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07002400 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2401
2402} # ac_fn_c_check_header_compile
2403
Alex Deymo486467e2017-12-19 19:04:07 +01002404# ac_fn_c_check_func LINENO FUNC VAR
2405# ----------------------------------
2406# Tests whether FUNC exists, setting the cache variable VAR accordingly
2407ac_fn_c_check_func ()
2408{
2409 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Elliott Hughesf344baa2021-12-07 09:12:34 -08002410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2411printf %s "checking for $2... " >&6; }
2412if eval test \${$3+y}
2413then :
2414 printf %s "(cached) " >&6
2415else $as_nop
Alex Deymo486467e2017-12-19 19:04:07 +01002416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2417/* end confdefs.h. */
2418
2419#define $2 innocuous_$2
2420#ifdef __STDC__
2421# include <limits.h>
2422#else
2423# include <assert.h>
2424#endif
2425#undef $2
2426#ifdef __cplusplus
2427extern "C"
2428#endif
2429char $2 ();
2430#if defined __stub_$2 || defined __stub___$2
2431choke me
2432#endif
2433
2434int main (void)
2435{
2436return $2 ();
2437 ;
2438 return 0;
2439}
2440_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08002441if ac_fn_c_try_link "$LINENO"
2442then :
Alex Deymo486467e2017-12-19 19:04:07 +01002443 eval "$3=yes"
Elliott Hughesf344baa2021-12-07 09:12:34 -08002444else $as_nop
Alex Deymo486467e2017-12-19 19:04:07 +01002445 eval "$3=no"
2446fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08002447rm -f core conftest.err conftest.$ac_objext conftest.beam \
Alex Deymo486467e2017-12-19 19:04:07 +01002448 conftest$ac_exeext conftest.$ac_ext
2449fi
2450eval ac_res=\$$3
Elliott Hughesf344baa2021-12-07 09:12:34 -08002451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2452printf "%s\n" "$ac_res" >&6; }
Alex Deymo486467e2017-12-19 19:04:07 +01002453 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2454
2455} # ac_fn_c_check_func
2456
Elliott Hughesf344baa2021-12-07 09:12:34 -08002457# ac_fn_c_try_run LINENO
2458# ----------------------
2459# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2460# executables *can* be run.
2461ac_fn_c_try_run ()
Alex Deymo486467e2017-12-19 19:04:07 +01002462{
2463 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Elliott Hughesf344baa2021-12-07 09:12:34 -08002464 if { { ac_try="$ac_link"
2465case "(($ac_try" in
2466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2467 *) ac_try_echo=$ac_try;;
Alex Deymo486467e2017-12-19 19:04:07 +01002468esac
Elliott Hughesf344baa2021-12-07 09:12:34 -08002469eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2470printf "%s\n" "$ac_try_echo"; } >&5
2471 (eval "$ac_link") 2>&5
2472 ac_status=$?
2473 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2474 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2475 { { case "(($ac_try" in
2476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2477 *) ac_try_echo=$ac_try;;
2478esac
2479eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2480printf "%s\n" "$ac_try_echo"; } >&5
2481 (eval "$ac_try") 2>&5
2482 ac_status=$?
2483 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2484 test $ac_status = 0; }; }
2485then :
2486 ac_retval=0
2487else $as_nop
2488 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2489 printf "%s\n" "$as_me: failed program was:" >&5
2490sed 's/^/| /' conftest.$ac_ext >&5
Alex Deymo486467e2017-12-19 19:04:07 +01002491
Elliott Hughesf344baa2021-12-07 09:12:34 -08002492 ac_retval=$ac_status
2493fi
2494 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2495 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2496 as_fn_set_status $ac_retval
2497
2498} # ac_fn_c_try_run
Alex Deymo486467e2017-12-19 19:04:07 +01002499
Elliott Hughes82be86d2017-09-20 17:00:17 -07002500# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2501# -------------------------------------------
2502# Tests whether TYPE exists after having included INCLUDES, setting cache
2503# variable VAR accordingly.
2504ac_fn_c_check_type ()
2505{
2506 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Elliott Hughesf344baa2021-12-07 09:12:34 -08002507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2508printf %s "checking for $2... " >&6; }
2509if eval test \${$3+y}
2510then :
2511 printf %s "(cached) " >&6
2512else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07002513 eval "$3=no"
2514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2515/* end confdefs.h. */
2516$4
2517int main (void)
2518{
2519if (sizeof ($2))
2520 return 0;
2521 ;
2522 return 0;
2523}
2524_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08002525if ac_fn_c_try_compile "$LINENO"
2526then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07002527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2528/* end confdefs.h. */
2529$4
2530int main (void)
2531{
2532if (sizeof (($2)))
2533 return 0;
2534 ;
2535 return 0;
2536}
2537_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08002538if ac_fn_c_try_compile "$LINENO"
2539then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07002540
Elliott Hughesf344baa2021-12-07 09:12:34 -08002541else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07002542 eval "$3=yes"
2543fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08002544rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07002545fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08002546rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07002547fi
2548eval ac_res=\$$3
Elliott Hughesf344baa2021-12-07 09:12:34 -08002549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2550printf "%s\n" "$ac_res" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07002551 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2552
2553} # ac_fn_c_check_type
2554
Elliott Hughesf344baa2021-12-07 09:12:34 -08002555# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2556# ------------------------------------------------------------------
Elliott Hughes72d948d2018-08-03 14:37:21 -07002557# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
Elliott Hughesf344baa2021-12-07 09:12:34 -08002558# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2559ac_fn_check_decl ()
Elliott Hughes72d948d2018-08-03 14:37:21 -07002560{
2561 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2562 as_decl_name=`echo $2|sed 's/ *(.*//'`
Elliott Hughesf344baa2021-12-07 09:12:34 -08002563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2564printf %s "checking whether $as_decl_name is declared... " >&6; }
2565if eval test \${$3+y}
2566then :
2567 printf %s "(cached) " >&6
2568else $as_nop
Elliott Hughes72d948d2018-08-03 14:37:21 -07002569 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
Elliott Hughesf344baa2021-12-07 09:12:34 -08002570 eval ac_save_FLAGS=\$$6
2571 as_fn_append $6 " $5"
Elliott Hughes72d948d2018-08-03 14:37:21 -07002572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2573/* end confdefs.h. */
2574$4
2575int main (void)
2576{
2577#ifndef $as_decl_name
2578#ifdef __cplusplus
2579 (void) $as_decl_use;
2580#else
2581 (void) $as_decl_name;
2582#endif
2583#endif
2584
2585 ;
2586 return 0;
2587}
2588_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08002589if ac_fn_c_try_compile "$LINENO"
2590then :
Elliott Hughes72d948d2018-08-03 14:37:21 -07002591 eval "$3=yes"
Elliott Hughesf344baa2021-12-07 09:12:34 -08002592else $as_nop
Elliott Hughes72d948d2018-08-03 14:37:21 -07002593 eval "$3=no"
2594fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08002595rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2596 eval $6=\$ac_save_FLAGS
2597
Elliott Hughes72d948d2018-08-03 14:37:21 -07002598fi
2599eval ac_res=\$$3
Elliott Hughesf344baa2021-12-07 09:12:34 -08002600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2601printf "%s\n" "$ac_res" >&6; }
Elliott Hughes72d948d2018-08-03 14:37:21 -07002602 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2603
Elliott Hughesf344baa2021-12-07 09:12:34 -08002604} # ac_fn_check_decl
Elliott Hughes72d948d2018-08-03 14:37:21 -07002605
Elliott Hughes82be86d2017-09-20 17:00:17 -07002606# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2607# ----------------------------------------------------
2608# Tries to find if the field MEMBER exists in type AGGR, after including
2609# INCLUDES, setting cache variable VAR accordingly.
2610ac_fn_c_check_member ()
2611{
2612 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Elliott Hughesf344baa2021-12-07 09:12:34 -08002613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2614printf %s "checking for $2.$3... " >&6; }
2615if eval test \${$4+y}
2616then :
2617 printf %s "(cached) " >&6
2618else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07002619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2620/* end confdefs.h. */
2621$5
2622int main (void)
2623{
2624static $2 ac_aggr;
2625if (ac_aggr.$3)
2626return 0;
2627 ;
2628 return 0;
2629}
2630_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08002631if ac_fn_c_try_compile "$LINENO"
2632then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07002633 eval "$4=yes"
Elliott Hughesf344baa2021-12-07 09:12:34 -08002634else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07002635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2636/* end confdefs.h. */
2637$5
2638int main (void)
2639{
2640static $2 ac_aggr;
2641if (sizeof ac_aggr.$3)
2642return 0;
2643 ;
2644 return 0;
2645}
2646_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08002647if ac_fn_c_try_compile "$LINENO"
2648then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07002649 eval "$4=yes"
Elliott Hughesf344baa2021-12-07 09:12:34 -08002650else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07002651 eval "$4=no"
2652fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08002653rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07002654fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08002655rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07002656fi
2657eval ac_res=\$$4
Elliott Hughesf344baa2021-12-07 09:12:34 -08002658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2659printf "%s\n" "$ac_res" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07002660 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2661
2662} # ac_fn_c_check_member
Elliott Hughesf344baa2021-12-07 09:12:34 -08002663ac_configure_args_raw=
2664for ac_arg
2665do
2666 case $ac_arg in
2667 *\'*)
2668 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2669 esac
2670 as_fn_append ac_configure_args_raw " '$ac_arg'"
2671done
2672
2673case $ac_configure_args_raw in
2674 *$as_nl*)
2675 ac_safe_unquote= ;;
2676 *)
2677 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2678 ac_unsafe_a="$ac_unsafe_z#~"
2679 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2680 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2681esac
2682
Elliott Hughes82be86d2017-09-20 17:00:17 -07002683cat >config.log <<_ACEOF
2684This file contains any messages produced by compilers while
2685running configure, to aid debugging if configure makes a mistake.
2686
2687It was created by curl $as_me -, which was
Elliott Hughesf344baa2021-12-07 09:12:34 -08002688generated by GNU Autoconf 2.71. Invocation command line was
Elliott Hughes82be86d2017-09-20 17:00:17 -07002689
Elliott Hughesf344baa2021-12-07 09:12:34 -08002690 $ $0$ac_configure_args_raw
Elliott Hughes82be86d2017-09-20 17:00:17 -07002691
2692_ACEOF
2693exec 5>>config.log
2694{
2695cat <<_ASUNAME
2696## --------- ##
2697## Platform. ##
2698## --------- ##
2699
2700hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2701uname -m = `(uname -m) 2>/dev/null || echo unknown`
2702uname -r = `(uname -r) 2>/dev/null || echo unknown`
2703uname -s = `(uname -s) 2>/dev/null || echo unknown`
2704uname -v = `(uname -v) 2>/dev/null || echo unknown`
2705
2706/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2707/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2708
2709/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2710/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2711/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2712/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2713/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2714/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2715/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2716
2717_ASUNAME
2718
2719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2720for as_dir in $PATH
2721do
2722 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08002723 case $as_dir in #(((
2724 '') as_dir=./ ;;
2725 */) ;;
2726 *) as_dir=$as_dir/ ;;
2727 esac
2728 printf "%s\n" "PATH: $as_dir"
Elliott Hughes82be86d2017-09-20 17:00:17 -07002729 done
2730IFS=$as_save_IFS
2731
2732} >&5
2733
2734cat >&5 <<_ACEOF
2735
2736
2737## ----------- ##
2738## Core tests. ##
2739## ----------- ##
2740
2741_ACEOF
2742
2743
2744# Keep a trace of the command line.
2745# Strip out --no-create and --no-recursion so they do not pile up.
2746# Strip out --silent because we don't want to record it for future runs.
2747# Also quote any args containing shell meta-characters.
2748# Make two passes to allow for proper duplicate-argument suppression.
2749ac_configure_args=
2750ac_configure_args0=
2751ac_configure_args1=
2752ac_must_keep_next=false
2753for ac_pass in 1 2
2754do
2755 for ac_arg
2756 do
2757 case $ac_arg in
2758 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2759 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2760 | -silent | --silent | --silen | --sile | --sil)
2761 continue ;;
2762 *\'*)
Elliott Hughesf344baa2021-12-07 09:12:34 -08002763 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -07002764 esac
2765 case $ac_pass in
2766 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2767 2)
2768 as_fn_append ac_configure_args1 " '$ac_arg'"
2769 if test $ac_must_keep_next = true; then
2770 ac_must_keep_next=false # Got value, back to normal.
2771 else
2772 case $ac_arg in
2773 *=* | --config-cache | -C | -disable-* | --disable-* \
2774 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2775 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2776 | -with-* | --with-* | -without-* | --without-* | --x)
2777 case "$ac_configure_args0 " in
2778 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2779 esac
2780 ;;
2781 -* ) ac_must_keep_next=true ;;
2782 esac
2783 fi
2784 as_fn_append ac_configure_args " '$ac_arg'"
2785 ;;
2786 esac
2787 done
2788done
2789{ ac_configure_args0=; unset ac_configure_args0;}
2790{ ac_configure_args1=; unset ac_configure_args1;}
2791
2792# When interrupted or exit'd, cleanup temporary files, and complete
2793# config.log. We remove comments because anyway the quotes in there
2794# would cause problems or look ugly.
2795# WARNING: Use '\'' to represent an apostrophe within the trap.
2796# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2797trap 'exit_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -08002798 # Sanitize IFS.
2799 IFS=" "" $as_nl"
Elliott Hughes82be86d2017-09-20 17:00:17 -07002800 # Save into config.log some information that might help in debugging.
2801 {
2802 echo
2803
Elliott Hughesf344baa2021-12-07 09:12:34 -08002804 printf "%s\n" "## ---------------- ##
Elliott Hughes82be86d2017-09-20 17:00:17 -07002805## Cache variables. ##
2806## ---------------- ##"
2807 echo
2808 # The following way of writing the cache mishandles newlines in values,
2809(
2810 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2811 eval ac_val=\$$ac_var
2812 case $ac_val in #(
2813 *${as_nl}*)
2814 case $ac_var in #(
Elliott Hughesf344baa2021-12-07 09:12:34 -08002815 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2816printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -07002817 esac
2818 case $ac_var in #(
2819 _ | IFS | as_nl) ;; #(
2820 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2821 *) { eval $ac_var=; unset $ac_var;} ;;
2822 esac ;;
2823 esac
2824 done
2825 (set) 2>&1 |
2826 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2827 *${as_nl}ac_space=\ *)
2828 sed -n \
2829 "s/'\''/'\''\\\\'\'''\''/g;
2830 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2831 ;; #(
2832 *)
2833 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2834 ;;
2835 esac |
2836 sort
2837)
2838 echo
2839
Elliott Hughesf344baa2021-12-07 09:12:34 -08002840 printf "%s\n" "## ----------------- ##
Elliott Hughes82be86d2017-09-20 17:00:17 -07002841## Output variables. ##
2842## ----------------- ##"
2843 echo
2844 for ac_var in $ac_subst_vars
2845 do
2846 eval ac_val=\$$ac_var
2847 case $ac_val in
Elliott Hughesf344baa2021-12-07 09:12:34 -08002848 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Elliott Hughes82be86d2017-09-20 17:00:17 -07002849 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -08002850 printf "%s\n" "$ac_var='\''$ac_val'\''"
Elliott Hughes82be86d2017-09-20 17:00:17 -07002851 done | sort
2852 echo
2853
2854 if test -n "$ac_subst_files"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08002855 printf "%s\n" "## ------------------- ##
Elliott Hughes82be86d2017-09-20 17:00:17 -07002856## File substitutions. ##
2857## ------------------- ##"
2858 echo
2859 for ac_var in $ac_subst_files
2860 do
2861 eval ac_val=\$$ac_var
2862 case $ac_val in
Elliott Hughesf344baa2021-12-07 09:12:34 -08002863 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Elliott Hughes82be86d2017-09-20 17:00:17 -07002864 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -08002865 printf "%s\n" "$ac_var='\''$ac_val'\''"
Elliott Hughes82be86d2017-09-20 17:00:17 -07002866 done | sort
2867 echo
2868 fi
2869
2870 if test -s confdefs.h; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08002871 printf "%s\n" "## ----------- ##
Elliott Hughes82be86d2017-09-20 17:00:17 -07002872## confdefs.h. ##
2873## ----------- ##"
2874 echo
2875 cat confdefs.h
2876 echo
2877 fi
2878 test "$ac_signal" != 0 &&
Elliott Hughesf344baa2021-12-07 09:12:34 -08002879 printf "%s\n" "$as_me: caught signal $ac_signal"
2880 printf "%s\n" "$as_me: exit $exit_status"
Elliott Hughes82be86d2017-09-20 17:00:17 -07002881 } >&5
2882 rm -f core *.core core.conftest.* &&
2883 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2884 exit $exit_status
2885' 0
2886for ac_signal in 1 2 13 15; do
2887 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2888done
2889ac_signal=0
2890
2891# confdefs.h avoids OS command line length limits that DEFS can exceed.
2892rm -f -r conftest* confdefs.h
2893
Elliott Hughesf344baa2021-12-07 09:12:34 -08002894printf "%s\n" "/* confdefs.h */" > confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -07002895
2896# Predefined preprocessor variables.
2897
Elliott Hughesf344baa2021-12-07 09:12:34 -08002898printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -07002899
Elliott Hughesf344baa2021-12-07 09:12:34 -08002900printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -07002901
Elliott Hughesf344baa2021-12-07 09:12:34 -08002902printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -07002903
Elliott Hughesf344baa2021-12-07 09:12:34 -08002904printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -07002905
Elliott Hughesf344baa2021-12-07 09:12:34 -08002906printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -07002907
Elliott Hughesf344baa2021-12-07 09:12:34 -08002908printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -07002909
2910
2911# Let the site file select an alternate cache file if it wants to.
2912# Prefer an explicitly selected file to automatically selected ones.
Elliott Hughes82be86d2017-09-20 17:00:17 -07002913if test -n "$CONFIG_SITE"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08002914 ac_site_files="$CONFIG_SITE"
Elliott Hughes82be86d2017-09-20 17:00:17 -07002915elif test "x$prefix" != xNONE; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08002916 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
Elliott Hughes82be86d2017-09-20 17:00:17 -07002917else
Elliott Hughesf344baa2021-12-07 09:12:34 -08002918 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
Elliott Hughes82be86d2017-09-20 17:00:17 -07002919fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08002920
2921for ac_site_file in $ac_site_files
Elliott Hughes82be86d2017-09-20 17:00:17 -07002922do
Elliott Hughesf344baa2021-12-07 09:12:34 -08002923 case $ac_site_file in #(
2924 */*) :
2925 ;; #(
2926 *) :
2927 ac_site_file=./$ac_site_file ;;
2928esac
2929 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2931printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07002932 sed 's/^/| /' "$ac_site_file" >&5
2933 . "$ac_site_file" \
Elliott Hughesf344baa2021-12-07 09:12:34 -08002934 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2935printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07002936as_fn_error $? "failed to load site script $ac_site_file
2937See \`config.log' for more details" "$LINENO" 5; }
2938 fi
2939done
2940
2941if test -r "$cache_file"; then
2942 # Some versions of bash will fail to source /dev/null (special files
2943 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2944 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08002945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2946printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07002947 case $cache_file in
2948 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2949 *) . "./$cache_file";;
2950 esac
2951 fi
2952else
Elliott Hughesf344baa2021-12-07 09:12:34 -08002953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2954printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07002955 >$cache_file
2956fi
2957
Elliott Hughesf344baa2021-12-07 09:12:34 -08002958# Test code for whether the C compiler supports C89 (global declarations)
2959ac_c_conftest_c89_globals='
2960/* Does the compiler advertise C89 conformance?
2961 Do not test the value of __STDC__, because some compilers set it to 0
2962 while being otherwise adequately conformant. */
2963#if !defined __STDC__
2964# error "Compiler does not advertise C89 conformance"
2965#endif
2966
2967#include <stddef.h>
2968#include <stdarg.h>
2969struct stat;
2970/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
2971struct buf { int x; };
2972struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2973static char *e (p, i)
2974 char **p;
2975 int i;
2976{
2977 return p[i];
2978}
2979static char *f (char * (*g) (char **, int), char **p, ...)
2980{
2981 char *s;
2982 va_list v;
2983 va_start (v,p);
2984 s = g (p, va_arg (v,int));
2985 va_end (v);
2986 return s;
2987}
2988
2989/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2990 function prototypes and stuff, but not \xHH hex character constants.
2991 These do not provoke an error unfortunately, instead are silently treated
2992 as an "x". The following induces an error, until -std is added to get
2993 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2994 array size at least. It is necessary to write \x00 == 0 to get something
2995 that is true only with -std. */
2996int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2997
2998/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2999 inside strings and character constants. */
3000#define FOO(x) '\''x'\''
3001int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
3002
3003int test (int i, double x);
3004struct s1 {int (*f) (int a);};
3005struct s2 {int (*f) (double a);};
3006int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
3007 int, int);'
3008
3009# Test code for whether the C compiler supports C89 (body of main).
3010ac_c_conftest_c89_main='
3011ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
3012'
3013
3014# Test code for whether the C compiler supports C99 (global declarations)
3015ac_c_conftest_c99_globals='
3016// Does the compiler advertise C99 conformance?
3017#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
3018# error "Compiler does not advertise C99 conformance"
3019#endif
3020
3021#include <stdbool.h>
3022extern int puts (const char *);
3023extern int printf (const char *, ...);
3024extern int dprintf (int, const char *, ...);
3025extern void *malloc (size_t);
3026
3027// Check varargs macros. These examples are taken from C99 6.10.3.5.
3028// dprintf is used instead of fprintf to avoid needing to declare
3029// FILE and stderr.
3030#define debug(...) dprintf (2, __VA_ARGS__)
3031#define showlist(...) puts (#__VA_ARGS__)
3032#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3033static void
3034test_varargs_macros (void)
3035{
3036 int x = 1234;
3037 int y = 5678;
3038 debug ("Flag");
3039 debug ("X = %d\n", x);
3040 showlist (The first, second, and third items.);
3041 report (x>y, "x is %d but y is %d", x, y);
3042}
3043
3044// Check long long types.
3045#define BIG64 18446744073709551615ull
3046#define BIG32 4294967295ul
3047#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3048#if !BIG_OK
3049 #error "your preprocessor is broken"
3050#endif
3051#if BIG_OK
3052#else
3053 #error "your preprocessor is broken"
3054#endif
3055static long long int bignum = -9223372036854775807LL;
3056static unsigned long long int ubignum = BIG64;
3057
3058struct incomplete_array
3059{
3060 int datasize;
3061 double data[];
3062};
3063
3064struct named_init {
3065 int number;
3066 const wchar_t *name;
3067 double average;
3068};
3069
3070typedef const char *ccp;
3071
3072static inline int
3073test_restrict (ccp restrict text)
3074{
3075 // See if C++-style comments work.
3076 // Iterate through items via the restricted pointer.
3077 // Also check for declarations in for loops.
3078 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
3079 continue;
3080 return 0;
3081}
3082
3083// Check varargs and va_copy.
3084static bool
3085test_varargs (const char *format, ...)
3086{
3087 va_list args;
3088 va_start (args, format);
3089 va_list args_copy;
3090 va_copy (args_copy, args);
3091
3092 const char *str = "";
3093 int number = 0;
3094 float fnumber = 0;
3095
3096 while (*format)
3097 {
3098 switch (*format++)
3099 {
3100 case '\''s'\'': // string
3101 str = va_arg (args_copy, const char *);
3102 break;
3103 case '\''d'\'': // int
3104 number = va_arg (args_copy, int);
3105 break;
3106 case '\''f'\'': // float
3107 fnumber = va_arg (args_copy, double);
3108 break;
3109 default:
3110 break;
3111 }
3112 }
3113 va_end (args_copy);
3114 va_end (args);
3115
3116 return *str && number && fnumber;
3117}
3118'
3119
3120# Test code for whether the C compiler supports C99 (body of main).
3121ac_c_conftest_c99_main='
3122 // Check bool.
3123 _Bool success = false;
3124 success |= (argc != 0);
3125
3126 // Check restrict.
3127 if (test_restrict ("String literal") == 0)
3128 success = true;
3129 char *restrict newvar = "Another string";
3130
3131 // Check varargs.
3132 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
3133 test_varargs_macros ();
3134
3135 // Check flexible array members.
3136 struct incomplete_array *ia =
3137 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
3138 ia->datasize = 10;
3139 for (int i = 0; i < ia->datasize; ++i)
3140 ia->data[i] = i * 1.234;
3141
3142 // Check named initializers.
3143 struct named_init ni = {
3144 .number = 34,
3145 .name = L"Test wide string",
3146 .average = 543.34343,
3147 };
3148
3149 ni.number = 58;
3150
3151 int dynamic_array[ni.number];
3152 dynamic_array[0] = argv[0][0];
3153 dynamic_array[ni.number - 1] = 543;
3154
3155 // work around unused variable warnings
3156 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
3157 || dynamic_array[ni.number - 1] != 543);
3158'
3159
3160# Test code for whether the C compiler supports C11 (global declarations)
3161ac_c_conftest_c11_globals='
3162// Does the compiler advertise C11 conformance?
3163#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
3164# error "Compiler does not advertise C11 conformance"
3165#endif
3166
3167// Check _Alignas.
3168char _Alignas (double) aligned_as_double;
3169char _Alignas (0) no_special_alignment;
3170extern char aligned_as_int;
3171char _Alignas (0) _Alignas (int) aligned_as_int;
3172
3173// Check _Alignof.
3174enum
3175{
3176 int_alignment = _Alignof (int),
3177 int_array_alignment = _Alignof (int[100]),
3178 char_alignment = _Alignof (char)
3179};
3180_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
3181
3182// Check _Noreturn.
3183int _Noreturn does_not_return (void) { for (;;) continue; }
3184
3185// Check _Static_assert.
3186struct test_static_assert
3187{
3188 int x;
3189 _Static_assert (sizeof (int) <= sizeof (long int),
3190 "_Static_assert does not work in struct");
3191 long int y;
3192};
3193
3194// Check UTF-8 literals.
3195#define u8 syntax error!
3196char const utf8_literal[] = u8"happens to be ASCII" "another string";
3197
3198// Check duplicate typedefs.
3199typedef long *long_ptr;
3200typedef long int *long_ptr;
3201typedef long_ptr long_ptr;
3202
3203// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
3204struct anonymous
3205{
3206 union {
3207 struct { int i; int j; };
3208 struct { int k; long int l; } w;
3209 };
3210 int m;
3211} v1;
3212'
3213
3214# Test code for whether the C compiler supports C11 (body of main).
3215ac_c_conftest_c11_main='
3216 _Static_assert ((offsetof (struct anonymous, i)
3217 == offsetof (struct anonymous, w.k)),
3218 "Anonymous union alignment botch");
3219 v1.i = 2;
3220 v1.w.k = 5;
3221 ok |= v1.i != 5;
3222'
3223
3224# Test code for whether the C compiler supports C11 (complete).
3225ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
3226${ac_c_conftest_c99_globals}
3227${ac_c_conftest_c11_globals}
3228
3229int
3230main (int argc, char **argv)
3231{
3232 int ok = 0;
3233 ${ac_c_conftest_c89_main}
3234 ${ac_c_conftest_c99_main}
3235 ${ac_c_conftest_c11_main}
3236 return ok;
3237}
3238"
3239
3240# Test code for whether the C compiler supports C99 (complete).
3241ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
3242${ac_c_conftest_c99_globals}
3243
3244int
3245main (int argc, char **argv)
3246{
3247 int ok = 0;
3248 ${ac_c_conftest_c89_main}
3249 ${ac_c_conftest_c99_main}
3250 return ok;
3251}
3252"
3253
3254# Test code for whether the C compiler supports C89 (complete).
3255ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
3256
3257int
3258main (int argc, char **argv)
3259{
3260 int ok = 0;
3261 ${ac_c_conftest_c89_main}
3262 return ok;
3263}
3264"
3265
3266as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
3267as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
3268as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
3269as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3270as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3271as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3272as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3273as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3274as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3275
3276# Auxiliary files required by this configure script.
3277ac_aux_files="ltmain.sh config.guess config.sub missing compile install-sh"
3278
3279# Locations in which to look for auxiliary files.
3280ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
3281
3282# Search for a directory containing all of the required auxiliary files,
3283# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
3284# If we don't find one directory that contains all the files we need,
3285# we report the set of missing files from the *first* directory in
3286# $ac_aux_dir_candidates and give up.
3287ac_missing_aux_files=""
3288ac_first_candidate=:
3289printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
3290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3291as_found=false
3292for as_dir in $ac_aux_dir_candidates
3293do
3294 IFS=$as_save_IFS
3295 case $as_dir in #(((
3296 '') as_dir=./ ;;
3297 */) ;;
3298 *) as_dir=$as_dir/ ;;
3299 esac
3300 as_found=:
3301
3302 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
3303 ac_aux_dir_found=yes
3304 ac_install_sh=
3305 for ac_aux in $ac_aux_files
3306 do
3307 # As a special case, if "install-sh" is required, that requirement
3308 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
3309 # and $ac_install_sh is set appropriately for whichever one is found.
3310 if test x"$ac_aux" = x"install-sh"
3311 then
3312 if test -f "${as_dir}install-sh"; then
3313 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
3314 ac_install_sh="${as_dir}install-sh -c"
3315 elif test -f "${as_dir}install.sh"; then
3316 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
3317 ac_install_sh="${as_dir}install.sh -c"
3318 elif test -f "${as_dir}shtool"; then
3319 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
3320 ac_install_sh="${as_dir}shtool install -c"
3321 else
3322 ac_aux_dir_found=no
3323 if $ac_first_candidate; then
3324 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
3325 else
3326 break
3327 fi
3328 fi
3329 else
3330 if test -f "${as_dir}${ac_aux}"; then
3331 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
3332 else
3333 ac_aux_dir_found=no
3334 if $ac_first_candidate; then
3335 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
3336 else
3337 break
3338 fi
3339 fi
3340 fi
3341 done
3342 if test "$ac_aux_dir_found" = yes; then
3343 ac_aux_dir="$as_dir"
3344 break
3345 fi
3346 ac_first_candidate=false
3347
3348 as_found=false
3349done
3350IFS=$as_save_IFS
3351if $as_found
3352then :
3353
3354else $as_nop
3355 as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
3356fi
3357
3358
3359# These three variables are undocumented and unsupported,
3360# and are intended to be withdrawn in a future Autoconf release.
3361# They can cause serious problems if a builder's source tree is in a directory
3362# whose full name contains unusual characters.
3363if test -f "${ac_aux_dir}config.guess"; then
3364 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
3365fi
3366if test -f "${ac_aux_dir}config.sub"; then
3367 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
3368fi
3369if test -f "$ac_aux_dir/configure"; then
3370 ac_configure="$SHELL ${ac_aux_dir}configure"
3371fi
3372
Elliott Hughes82be86d2017-09-20 17:00:17 -07003373# Check that the precious variables saved in the cache have kept the same
3374# value.
3375ac_cache_corrupted=false
3376for ac_var in $ac_precious_vars; do
3377 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3378 eval ac_new_set=\$ac_env_${ac_var}_set
3379 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3380 eval ac_new_val=\$ac_env_${ac_var}_value
3381 case $ac_old_set,$ac_new_set in
3382 set,)
Elliott Hughesf344baa2021-12-07 09:12:34 -08003383 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3384printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07003385 ac_cache_corrupted=: ;;
3386 ,set)
Elliott Hughesf344baa2021-12-07 09:12:34 -08003387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3388printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07003389 ac_cache_corrupted=: ;;
3390 ,);;
3391 *)
3392 if test "x$ac_old_val" != "x$ac_new_val"; then
3393 # differences in whitespace do not lead to failure.
3394 ac_old_val_w=`echo x $ac_old_val`
3395 ac_new_val_w=`echo x $ac_new_val`
3396 if test "$ac_old_val_w" != "$ac_new_val_w"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08003397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3398printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07003399 ac_cache_corrupted=:
3400 else
Elliott Hughesf344baa2021-12-07 09:12:34 -08003401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3402printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07003403 eval $ac_var=\$ac_old_val
3404 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08003405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3406printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
3407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3408printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07003409 fi;;
3410 esac
3411 # Pass precious variables to config.status.
3412 if test "$ac_new_set" = set; then
3413 case $ac_new_val in
Elliott Hughesf344baa2021-12-07 09:12:34 -08003414 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -07003415 *) ac_arg=$ac_var=$ac_new_val ;;
3416 esac
3417 case " $ac_configure_args " in
3418 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3419 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3420 esac
3421 fi
3422done
3423if $ac_cache_corrupted; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08003424 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3425printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3427printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3428 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
3429 and start over" "$LINENO" 5
Elliott Hughes82be86d2017-09-20 17:00:17 -07003430fi
3431## -------------------- ##
3432## Main body of script. ##
3433## -------------------- ##
3434
3435ac_ext=c
3436ac_cpp='$CPP $CPPFLAGS'
3437ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3438ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3439ac_compiler_gnu=$ac_cv_c_compiler_gnu
3440
3441
3442
3443
3444
3445
3446
3447# using curl-override.m4
3448
3449
3450
3451
3452
3453ac_config_headers="$ac_config_headers lib/curl_config.h"
3454
3455
3456
Elliott Hughesf344baa2021-12-07 09:12:34 -08003457{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3458printf %s "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003459 # Check whether --enable-maintainer-mode was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08003460if test ${enable_maintainer_mode+y}
3461then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07003462 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
Elliott Hughesf344baa2021-12-07 09:12:34 -08003463else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07003464 USE_MAINTAINER_MODE=no
3465fi
3466
Elliott Hughesf344baa2021-12-07 09:12:34 -08003467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3468printf "%s\n" "$USE_MAINTAINER_MODE" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003469 if test $USE_MAINTAINER_MODE = yes; then
3470 MAINTAINER_MODE_TRUE=
3471 MAINTAINER_MODE_FALSE='#'
3472else
3473 MAINTAINER_MODE_TRUE='#'
3474 MAINTAINER_MODE_FALSE=
3475fi
3476
3477 MAINT=$MAINTAINER_MODE_TRUE
3478
3479
3480# Check whether --enable-silent-rules was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08003481if test ${enable_silent_rules+y}
3482then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07003483 enableval=$enable_silent_rules;
3484fi
3485
3486case $enable_silent_rules in # (((
3487 yes) AM_DEFAULT_VERBOSITY=0;;
3488 no) AM_DEFAULT_VERBOSITY=1;;
3489 *) AM_DEFAULT_VERBOSITY=0;;
3490esac
3491am_make=${MAKE-make}
Elliott Hughesf344baa2021-12-07 09:12:34 -08003492{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3493printf %s "checking whether $am_make supports nested variables... " >&6; }
3494if test ${am_cv_make_support_nested_variables+y}
3495then :
3496 printf %s "(cached) " >&6
3497else $as_nop
3498 if printf "%s\n" 'TRUE=$(BAR$(V))
Elliott Hughes82be86d2017-09-20 17:00:17 -07003499BAR0=false
3500BAR1=true
3501V=1
3502am__doit:
3503 @$(TRUE)
3504.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3505 am_cv_make_support_nested_variables=yes
3506else
3507 am_cv_make_support_nested_variables=no
3508fi
3509fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08003510{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3511printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003512if test $am_cv_make_support_nested_variables = yes; then
3513 AM_V='$(V)'
3514 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3515else
3516 AM_V=$AM_DEFAULT_VERBOSITY
3517 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3518fi
3519AM_BACKSLASH='\'
3520
3521
3522
Elliott Hughesf344baa2021-12-07 09:12:34 -08003523 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable debug build options" >&5
3524printf %s "checking whether to enable debug build options... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003525 OPT_DEBUG_BUILD="default"
3526 # Check whether --enable-debug was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08003527if test ${enable_debug+y}
3528then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07003529 enableval=$enable_debug; OPT_DEBUG_BUILD=$enableval
3530fi
3531
3532 case "$OPT_DEBUG_BUILD" in
3533 no)
3534 want_debug="no"
3535 ;;
3536 default)
3537 want_debug="no"
3538 ;;
3539 *)
3540 want_debug="yes"
Elliott Hughes1ef06ba2018-05-30 15:43:58 -07003541
Elliott Hughesf344baa2021-12-07 09:12:34 -08003542printf "%s\n" "#define DEBUGBUILD 1" >>confdefs.h
Elliott Hughes1ef06ba2018-05-30 15:43:58 -07003543
Elliott Hughes82be86d2017-09-20 17:00:17 -07003544 ;;
3545 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -08003546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $want_debug" >&5
3547printf "%s\n" "$want_debug" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003548
3549
Elliott Hughesf344baa2021-12-07 09:12:34 -08003550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable compiler optimizer" >&5
3551printf %s "checking whether to enable compiler optimizer... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003552 OPT_COMPILER_OPTIMIZE="default"
3553 # Check whether --enable-optimize was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08003554if test ${enable_optimize+y}
3555then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07003556 enableval=$enable_optimize; OPT_COMPILER_OPTIMIZE=$enableval
3557fi
3558
3559 case "$OPT_COMPILER_OPTIMIZE" in
3560 no)
3561 want_optimize="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -08003562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3563printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003564 ;;
3565 default)
3566 if test "$want_debug" = "yes"; then
3567 want_optimize="assume_no"
Elliott Hughesf344baa2021-12-07 09:12:34 -08003568 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (assumed) no" >&5
3569printf "%s\n" "(assumed) no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003570 else
3571 want_optimize="assume_yes"
Elliott Hughesf344baa2021-12-07 09:12:34 -08003572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (assumed) yes" >&5
3573printf "%s\n" "(assumed) yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003574 fi
3575 ;;
3576 *)
3577 want_optimize="yes"
Elliott Hughesf344baa2021-12-07 09:12:34 -08003578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3579printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003580 ;;
3581 esac
3582
3583
Elliott Hughesf344baa2021-12-07 09:12:34 -08003584 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable strict compiler warnings" >&5
3585printf %s "checking whether to enable strict compiler warnings... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003586 OPT_COMPILER_WARNINGS="default"
3587 # Check whether --enable-warnings was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08003588if test ${enable_warnings+y}
3589then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07003590 enableval=$enable_warnings; OPT_COMPILER_WARNINGS=$enableval
3591fi
3592
3593 case "$OPT_COMPILER_WARNINGS" in
3594 no)
3595 want_warnings="no"
3596 ;;
3597 default)
3598 want_warnings="$want_debug"
3599 ;;
3600 *)
3601 want_warnings="yes"
3602 ;;
3603 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -08003604 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $want_warnings" >&5
3605printf "%s\n" "$want_warnings" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003606
3607
Elliott Hughesf344baa2021-12-07 09:12:34 -08003608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable compiler warnings as errors" >&5
3609printf %s "checking whether to enable compiler warnings as errors... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003610 OPT_COMPILER_WERROR="default"
3611 # Check whether --enable-werror was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08003612if test ${enable_werror+y}
3613then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07003614 enableval=$enable_werror; OPT_COMPILER_WERROR=$enableval
3615fi
3616
3617 case "$OPT_COMPILER_WERROR" in
3618 no)
3619 want_werror="no"
3620 ;;
3621 default)
3622 want_werror="no"
3623 ;;
3624 *)
3625 want_werror="yes"
3626 ;;
3627 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -08003628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $want_werror" >&5
3629printf "%s\n" "$want_werror" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003630
3631
Elliott Hughesf344baa2021-12-07 09:12:34 -08003632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable curl debug memory tracking" >&5
3633printf %s "checking whether to enable curl debug memory tracking... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003634 OPT_CURLDEBUG_BUILD="default"
3635 # Check whether --enable-curldebug was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08003636if test ${enable_curldebug+y}
3637then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07003638 enableval=$enable_curldebug; OPT_CURLDEBUG_BUILD=$enableval
3639fi
3640
3641 case "$OPT_CURLDEBUG_BUILD" in
3642 no)
3643 want_curldebug="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -08003644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3645printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003646 ;;
3647 default)
3648 if test "$want_debug" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08003649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (assumed) yes" >&5
3650printf "%s\n" "(assumed) yes" >&6; }
Elliott Hughes1ef06ba2018-05-30 15:43:58 -07003651
Elliott Hughesf344baa2021-12-07 09:12:34 -08003652printf "%s\n" "#define CURLDEBUG 1" >>confdefs.h
Elliott Hughes1ef06ba2018-05-30 15:43:58 -07003653
Elliott Hughes82be86d2017-09-20 17:00:17 -07003654 else
Elliott Hughesf344baa2021-12-07 09:12:34 -08003655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3656printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003657 fi
3658 want_curldebug_assumed="yes"
3659 want_curldebug="$want_debug"
3660 ;;
3661 *)
3662 want_curldebug="yes"
Elliott Hughes1ef06ba2018-05-30 15:43:58 -07003663
Elliott Hughesf344baa2021-12-07 09:12:34 -08003664printf "%s\n" "#define CURLDEBUG 1" >>confdefs.h
Elliott Hughes1ef06ba2018-05-30 15:43:58 -07003665
Elliott Hughesf344baa2021-12-07 09:12:34 -08003666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3667printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003668 ;;
3669 esac
3670
3671
Elliott Hughesf344baa2021-12-07 09:12:34 -08003672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable hiding of library internal symbols" >&5
3673printf %s "checking whether to enable hiding of library internal symbols... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003674 OPT_SYMBOL_HIDING="default"
3675 # Check whether --enable-symbol-hiding was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08003676if test ${enable_symbol_hiding+y}
3677then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07003678 enableval=$enable_symbol_hiding; OPT_SYMBOL_HIDING=$enableval
3679fi
3680
Elliott Hughes82be86d2017-09-20 17:00:17 -07003681 case "$OPT_SYMBOL_HIDING" in
3682 no)
3683 want_symbol_hiding="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -08003684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3685printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003686 ;;
3687 default)
3688 want_symbol_hiding="yes"
Elliott Hughesf344baa2021-12-07 09:12:34 -08003689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3690printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003691 ;;
3692 *)
3693 want_symbol_hiding="yes"
Elliott Hughesf344baa2021-12-07 09:12:34 -08003694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3695printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003696 ;;
3697 esac
3698
3699
Elliott Hughesf344baa2021-12-07 09:12:34 -08003700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable c-ares for DNS lookups" >&5
3701printf %s "checking whether to enable c-ares for DNS lookups... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003702 OPT_ARES="default"
3703 # Check whether --enable-ares was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08003704if test ${enable_ares+y}
3705then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07003706 enableval=$enable_ares; OPT_ARES=$enableval
3707fi
3708
3709 case "$OPT_ARES" in
3710 no)
3711 want_ares="no"
3712 ;;
3713 default)
3714 want_ares="no"
3715 ;;
3716 *)
3717 want_ares="yes"
3718 if test -n "$enableval" && test "$enableval" != "yes"; then
3719 want_ares_path="$enableval"
3720 fi
3721 ;;
3722 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -08003723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $want_ares" >&5
3724printf "%s\n" "$want_ares" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003725
3726
Elliott Hughesf344baa2021-12-07 09:12:34 -08003727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to disable dependency on -lrt" >&5
3728printf %s "checking whether to disable dependency on -lrt... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003729 OPT_RT="default"
3730 # Check whether --enable-rt was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08003731if test ${enable_rt+y}
3732then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07003733 enableval=$enable_rt; OPT_RT=$enableval
3734fi
3735
3736 case "$OPT_RT" in
3737 no)
3738 dontwant_rt="yes"
Elliott Hughesf344baa2021-12-07 09:12:34 -08003739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3740printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003741 ;;
3742 default)
3743 dontwant_rt="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -08003744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (assumed no)" >&5
3745printf "%s\n" "(assumed no)" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003746 ;;
3747 *)
3748 dontwant_rt="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -08003749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3750printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003751 ;;
3752 esac
3753
3754
Elliott Hughesf344baa2021-12-07 09:12:34 -08003755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable ECH support" >&5
3756printf %s "checking whether to enable ECH support... " >&6; }
Haibo Huangb5a52b92020-10-28 22:18:23 -07003757 OPT_ECH="default"
3758 # Check whether --enable-ech was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08003759if test ${enable_ech+y}
3760then :
Haibo Huangb5a52b92020-10-28 22:18:23 -07003761 enableval=$enable_ech; OPT_ECH=$enableval
Haibo Huang31944072019-11-06 02:28:57 -08003762fi
3763
Haibo Huangb5a52b92020-10-28 22:18:23 -07003764 case "$OPT_ECH" in
Haibo Huang31944072019-11-06 02:28:57 -08003765 no)
Haibo Huangb5a52b92020-10-28 22:18:23 -07003766 want_ech="no"
3767 curl_ech_msg="no (--enable-ech)"
Elliott Hughesf344baa2021-12-07 09:12:34 -08003768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3769printf "%s\n" "no" >&6; }
Haibo Huang31944072019-11-06 02:28:57 -08003770 ;;
3771 default)
Haibo Huangb5a52b92020-10-28 22:18:23 -07003772 want_ech="no"
3773 curl_ech_msg="no (--enable-ech)"
Elliott Hughesf344baa2021-12-07 09:12:34 -08003774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3775printf "%s\n" "no" >&6; }
Haibo Huang31944072019-11-06 02:28:57 -08003776 ;;
3777 *)
Haibo Huangb5a52b92020-10-28 22:18:23 -07003778 want_ech="yes"
3779 curl_ech_msg="enabled (--disable-ech)"
3780 experimental="ech"
Elliott Hughesf344baa2021-12-07 09:12:34 -08003781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3782printf "%s\n" "yes" >&6; }
Haibo Huang31944072019-11-06 02:28:57 -08003783 ;;
3784 esac
3785
3786
Elliott Hughes82be86d2017-09-20 17:00:17 -07003787#
3788# Check that 'XC_CONFIGURE_PREAMBLE' has already run.
3789#
3790
3791if test -z "$xc_configure_preamble_result"; then
3792 as_fn_error $? "xc_configure_preamble_result not set (internal problem)" "$LINENO" 5
3793fi
3794
3795#
3796# Check that 'PATH_SEPARATOR' has already been set.
3797#
3798
3799if test -z "$xc_PATH_SEPARATOR"; then
3800 as_fn_error $? "xc_PATH_SEPARATOR not set (internal problem)" "$LINENO" 5
3801fi
3802if test -z "$PATH_SEPARATOR"; then
3803 as_fn_error $? "PATH_SEPARATOR not set (internal or config.site problem)" "$LINENO" 5
3804fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08003805{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for path separator" >&5
3806printf %s "checking for path separator... " >&6; }
3807{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_SEPARATOR" >&5
3808printf "%s\n" "$PATH_SEPARATOR" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003809if test "x$PATH_SEPARATOR" != "x$xc_PATH_SEPARATOR"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08003810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for initial path separator" >&5
3811printf %s "checking for initial path separator... " >&6; }
3812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xc_PATH_SEPARATOR" >&5
3813printf "%s\n" "$xc_PATH_SEPARATOR" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003814 as_fn_error $? "path separator mismatch (internal or config.site problem)" "$LINENO" 5
3815fi
3816
Elliott Hughes82be86d2017-09-20 17:00:17 -07003817
3818#
3819# save the configure arguments
3820#
3821CONFIGURE_OPTIONS="\"$ac_configure_args\""
3822
3823
Elliott Hughes82be86d2017-09-20 17:00:17 -07003824if test -z "$SED"; then
3825 # Extract the first word of "sed", so it can be a program name with args.
3826set dummy sed; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08003827{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3828printf %s "checking for $ac_word... " >&6; }
3829if test ${ac_cv_path_SED+y}
3830then :
3831 printf %s "(cached) " >&6
3832else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07003833 case $SED in
3834 [\\/]* | ?:[\\/]*)
3835 ac_cv_path_SED="$SED" # Let the user override the test with a path.
3836 ;;
3837 *)
3838 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3839as_dummy="$PATH:/usr/bin:/usr/local/bin"
3840for as_dir in $as_dummy
3841do
3842 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08003843 case $as_dir in #(((
3844 '') as_dir=./ ;;
3845 */) ;;
3846 *) as_dir=$as_dir/ ;;
3847 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07003848 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08003849 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3850 ac_cv_path_SED="$as_dir$ac_word$ac_exec_ext"
3851 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07003852 break 2
3853 fi
3854done
3855 done
3856IFS=$as_save_IFS
3857
3858 test -z "$ac_cv_path_SED" && ac_cv_path_SED="not_found"
3859 ;;
3860esac
3861fi
3862SED=$ac_cv_path_SED
3863if test -n "$SED"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08003864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
3865printf "%s\n" "$SED" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003866else
Elliott Hughesf344baa2021-12-07 09:12:34 -08003867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3868printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003869fi
3870
3871
3872 if test -z "$SED" || test "$SED" = "not_found"; then
3873 as_fn_error $? "sed not found in PATH. Cannot continue without sed." "$LINENO" 5
3874 fi
3875fi
3876
3877
3878if test -z "$GREP"; then
3879 # Extract the first word of "grep", so it can be a program name with args.
3880set dummy grep; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08003881{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3882printf %s "checking for $ac_word... " >&6; }
3883if test ${ac_cv_path_GREP+y}
3884then :
3885 printf %s "(cached) " >&6
3886else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07003887 case $GREP in
3888 [\\/]* | ?:[\\/]*)
3889 ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
3890 ;;
3891 *)
3892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3893as_dummy="$PATH:/usr/bin:/usr/local/bin"
3894for as_dir in $as_dummy
3895do
3896 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08003897 case $as_dir in #(((
3898 '') as_dir=./ ;;
3899 */) ;;
3900 *) as_dir=$as_dir/ ;;
3901 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07003902 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08003903 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3904 ac_cv_path_GREP="$as_dir$ac_word$ac_exec_ext"
3905 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07003906 break 2
3907 fi
3908done
3909 done
3910IFS=$as_save_IFS
3911
3912 test -z "$ac_cv_path_GREP" && ac_cv_path_GREP="not_found"
3913 ;;
3914esac
3915fi
3916GREP=$ac_cv_path_GREP
3917if test -n "$GREP"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08003918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
3919printf "%s\n" "$GREP" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003920else
Elliott Hughesf344baa2021-12-07 09:12:34 -08003921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3922printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003923fi
3924
3925
3926 if test -z "$GREP" || test "$GREP" = "not_found"; then
3927 as_fn_error $? "grep not found in PATH. Cannot continue without grep." "$LINENO" 5
3928 fi
3929fi
3930
3931
3932if test -z "$EGREP"; then
3933 if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08003934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3935printf %s "checking for egrep... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003936 EGREP="$GREP -E"
Elliott Hughesf344baa2021-12-07 09:12:34 -08003937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
3938printf "%s\n" "$EGREP" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003939 else
3940 # Extract the first word of "egrep", so it can be a program name with args.
3941set dummy egrep; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08003942{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3943printf %s "checking for $ac_word... " >&6; }
3944if test ${ac_cv_path_EGREP+y}
3945then :
3946 printf %s "(cached) " >&6
3947else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07003948 case $EGREP in
3949 [\\/]* | ?:[\\/]*)
3950 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
3951 ;;
3952 *)
3953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3954as_dummy="$PATH:/usr/bin:/usr/local/bin"
3955for as_dir in $as_dummy
3956do
3957 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08003958 case $as_dir in #(((
3959 '') as_dir=./ ;;
3960 */) ;;
3961 *) as_dir=$as_dir/ ;;
3962 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07003963 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08003964 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3965 ac_cv_path_EGREP="$as_dir$ac_word$ac_exec_ext"
3966 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07003967 break 2
3968 fi
3969done
3970 done
3971IFS=$as_save_IFS
3972
3973 test -z "$ac_cv_path_EGREP" && ac_cv_path_EGREP="not_found"
3974 ;;
3975esac
3976fi
3977EGREP=$ac_cv_path_EGREP
3978if test -n "$EGREP"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08003979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
3980printf "%s\n" "$EGREP" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003981else
Elliott Hughesf344baa2021-12-07 09:12:34 -08003982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3983printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07003984fi
3985
3986
3987 fi
3988fi
3989if test -z "$EGREP" || test "$EGREP" = "not_found"; then
3990 as_fn_error $? "egrep not found in PATH. Cannot continue without egrep." "$LINENO" 5
3991fi
3992
3993
3994if test -z "$AR"; then
3995 if test -n "$ac_tool_prefix"; then
3996 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3997set dummy ${ac_tool_prefix}ar; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08003998{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3999printf %s "checking for $ac_word... " >&6; }
4000if test ${ac_cv_path_AR+y}
4001then :
4002 printf %s "(cached) " >&6
4003else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07004004 case $AR in
4005 [\\/]* | ?:[\\/]*)
4006 ac_cv_path_AR="$AR" # Let the user override the test with a path.
4007 ;;
4008 *)
4009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4010as_dummy="$PATH:/usr/bin:/usr/local/bin"
4011for as_dir in $as_dummy
4012do
4013 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08004014 case $as_dir in #(((
4015 '') as_dir=./ ;;
4016 */) ;;
4017 *) as_dir=$as_dir/ ;;
4018 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07004019 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08004020 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4021 ac_cv_path_AR="$as_dir$ac_word$ac_exec_ext"
4022 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07004023 break 2
4024 fi
4025done
4026 done
4027IFS=$as_save_IFS
4028
4029 ;;
4030esac
4031fi
4032AR=$ac_cv_path_AR
4033if test -n "$AR"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08004034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4035printf "%s\n" "$AR" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004036else
Elliott Hughesf344baa2021-12-07 09:12:34 -08004037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4038printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004039fi
4040
4041
4042fi
4043if test -z "$ac_cv_path_AR"; then
4044 ac_pt_AR=$AR
4045 # Extract the first word of "ar", so it can be a program name with args.
4046set dummy ar; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08004047{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4048printf %s "checking for $ac_word... " >&6; }
4049if test ${ac_cv_path_ac_pt_AR+y}
4050then :
4051 printf %s "(cached) " >&6
4052else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07004053 case $ac_pt_AR in
4054 [\\/]* | ?:[\\/]*)
4055 ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
4056 ;;
4057 *)
4058 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4059as_dummy="$PATH:/usr/bin:/usr/local/bin"
4060for as_dir in $as_dummy
4061do
4062 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08004063 case $as_dir in #(((
4064 '') as_dir=./ ;;
4065 */) ;;
4066 *) as_dir=$as_dir/ ;;
4067 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07004068 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08004069 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4070 ac_cv_path_ac_pt_AR="$as_dir$ac_word$ac_exec_ext"
4071 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07004072 break 2
4073 fi
4074done
4075 done
4076IFS=$as_save_IFS
4077
4078 ;;
4079esac
4080fi
4081ac_pt_AR=$ac_cv_path_ac_pt_AR
4082if test -n "$ac_pt_AR"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08004083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
4084printf "%s\n" "$ac_pt_AR" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004085else
Elliott Hughesf344baa2021-12-07 09:12:34 -08004086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4087printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004088fi
4089
4090 if test "x$ac_pt_AR" = x; then
4091 AR="not_found"
4092 else
4093 case $cross_compiling:$ac_tool_warned in
4094yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -08004095{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4096printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004097ac_tool_warned=yes ;;
4098esac
4099 AR=$ac_pt_AR
4100 fi
4101else
4102 AR="$ac_cv_path_AR"
4103fi
4104
4105 if test -z "$AR" || test "$AR" = "not_found"; then
4106 as_fn_error $? "ar not found in PATH. Cannot continue without ar." "$LINENO" 5
4107 fi
4108fi
4109
4110
4111
4112
4113CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p' ${srcdir}/include/curl/curlver.h`
4114
4115 xc_prog_cc_prev_IFS=$IFS
4116 xc_prog_cc_prev_LIBS=$LIBS
4117 xc_prog_cc_prev_CFLAGS=$CFLAGS
4118 xc_prog_cc_prev_LDFLAGS=$LDFLAGS
4119 xc_prog_cc_prev_CPPFLAGS=$CPPFLAGS
4120
4121
4122
4123 xc_bad_var_libs=no
4124 for xc_word in $LIBS; do
4125 case "$xc_word" in
4126 -l* | --library=*)
4127 :
4128 ;;
4129 *)
4130 xc_bad_var_libs=yes
4131 ;;
4132 esac
4133 done
4134 if test $xc_bad_var_libs = yes; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08004135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using LIBS: $LIBS" >&5
4136printf "%s\n" "$as_me: using LIBS: $LIBS" >&6;}
4137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LIBS note: LIBS should only be used to specify libraries (-lname)." >&5
4138printf "%s\n" "$as_me: LIBS note: LIBS should only be used to specify libraries (-lname)." >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004139 fi
4140
4141
4142 xc_bad_var_ldflags=no
4143 for xc_word in $LDFLAGS; do
4144 case "$xc_word" in
4145 -D*)
4146 xc_bad_var_ldflags=yes
4147 ;;
4148 -U*)
4149 xc_bad_var_ldflags=yes
4150 ;;
4151 -I*)
4152 xc_bad_var_ldflags=yes
4153 ;;
4154 -l* | --library=*)
4155 xc_bad_var_ldflags=yes
4156 ;;
4157 esac
4158 done
4159 if test $xc_bad_var_ldflags = yes; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08004160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using LDFLAGS: $LDFLAGS" >&5
4161printf "%s\n" "$as_me: using LDFLAGS: $LDFLAGS" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004162 xc_bad_var_msg="LDFLAGS note: LDFLAGS should only be used to specify linker flags, not"
4163 for xc_word in $LDFLAGS; do
4164 case "$xc_word" in
4165 -D*)
Elliott Hughesf344baa2021-12-07 09:12:34 -08004166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&5
4167printf "%s\n" "$as_me: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004168 ;;
4169 -U*)
Elliott Hughesf344baa2021-12-07 09:12:34 -08004170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&5
4171printf "%s\n" "$as_me: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004172 ;;
4173 -I*)
Elliott Hughesf344baa2021-12-07 09:12:34 -08004174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&5
4175printf "%s\n" "$as_me: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004176 ;;
4177 -l* | --library=*)
Elliott Hughesf344baa2021-12-07 09:12:34 -08004178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5
4179printf "%s\n" "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004180 ;;
4181 esac
4182 done
4183 fi
4184
4185
4186 xc_bad_var_cppflags=no
4187 for xc_word in $CPPFLAGS; do
4188 case "$xc_word" in
4189 -rpath*)
4190 xc_bad_var_cppflags=yes
4191 ;;
4192 -L* | --library-path=*)
4193 xc_bad_var_cppflags=yes
4194 ;;
4195 -l* | --library=*)
4196 xc_bad_var_cppflags=yes
4197 ;;
4198 esac
4199 done
4200 if test $xc_bad_var_cppflags = yes; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08004201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using CPPFLAGS: $CPPFLAGS" >&5
4202printf "%s\n" "$as_me: using CPPFLAGS: $CPPFLAGS" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004203 xc_bad_var_msg="CPPFLAGS note: CPPFLAGS should only be used to specify C preprocessor flags, not"
4204 for xc_word in $CPPFLAGS; do
4205 case "$xc_word" in
4206 -rpath*)
Elliott Hughesf344baa2021-12-07 09:12:34 -08004207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&5
4208printf "%s\n" "$as_me: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004209 ;;
4210 -L* | --library-path=*)
Elliott Hughesf344baa2021-12-07 09:12:34 -08004211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&5
4212printf "%s\n" "$as_me: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004213 ;;
4214 -l* | --library=*)
Elliott Hughesf344baa2021-12-07 09:12:34 -08004215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5
4216printf "%s\n" "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004217 ;;
4218 esac
4219 done
4220 fi
4221
4222
4223 xc_bad_var_cflags=no
4224 for xc_word in $CFLAGS; do
4225 case "$xc_word" in
4226 -D*)
4227 xc_bad_var_cflags=yes
4228 ;;
4229 -U*)
4230 xc_bad_var_cflags=yes
4231 ;;
4232 -I*)
4233 xc_bad_var_cflags=yes
4234 ;;
4235 -rpath*)
4236 xc_bad_var_cflags=yes
4237 ;;
4238 -L* | --library-path=*)
4239 xc_bad_var_cflags=yes
4240 ;;
4241 -l* | --library=*)
4242 xc_bad_var_cflags=yes
4243 ;;
4244 esac
4245 done
4246 if test $xc_bad_var_cflags = yes; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08004247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using CFLAGS: $CFLAGS" >&5
4248printf "%s\n" "$as_me: using CFLAGS: $CFLAGS" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004249 xc_bad_var_msg="CFLAGS note: CFLAGS should only be used to specify C compiler flags, not"
4250 for xc_word in $CFLAGS; do
4251 case "$xc_word" in
4252 -D*)
Elliott Hughesf344baa2021-12-07 09:12:34 -08004253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&5
4254printf "%s\n" "$as_me: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004255 ;;
4256 -U*)
Elliott Hughesf344baa2021-12-07 09:12:34 -08004257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&5
4258printf "%s\n" "$as_me: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004259 ;;
4260 -I*)
Elliott Hughesf344baa2021-12-07 09:12:34 -08004261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&5
4262printf "%s\n" "$as_me: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004263 ;;
4264 -rpath*)
Elliott Hughesf344baa2021-12-07 09:12:34 -08004265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&5
4266printf "%s\n" "$as_me: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004267 ;;
4268 -L* | --library-path=*)
Elliott Hughesf344baa2021-12-07 09:12:34 -08004269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&5
4270printf "%s\n" "$as_me: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004271 ;;
4272 -l* | --library=*)
Elliott Hughesf344baa2021-12-07 09:12:34 -08004273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5
4274printf "%s\n" "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004275 ;;
4276 esac
4277 done
4278 fi
4279
4280 if test $xc_bad_var_libs = yes ||
4281 test $xc_bad_var_cflags = yes ||
4282 test $xc_bad_var_ldflags = yes ||
4283 test $xc_bad_var_cppflags = yes; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08004284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Continuing even with errors mentioned immediately above this line." >&5
4285printf "%s\n" "$as_me: WARNING: Continuing even with errors mentioned immediately above this line." >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004286 fi
4287
Elliott Hughes82be86d2017-09-20 17:00:17 -07004288
4289
Elliott Hughesf344baa2021-12-07 09:12:34 -08004290 # Find a good install program. We prefer a C program (faster),
Elliott Hughes82be86d2017-09-20 17:00:17 -07004291# so one script is as good as another. But avoid the broken or
4292# incompatible versions:
4293# SysV /etc/install, /usr/sbin/install
4294# SunOS /usr/etc/install
4295# IRIX /sbin/install
4296# AIX /bin/install
4297# AmigaOS /C/install, which installs bootblocks on floppy discs
4298# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4299# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4300# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4301# OS/2's system install, which has a completely different semantic
4302# ./install, which can be erroneously created by make from ./install.sh.
4303# Reject install programs that cannot install multiple files.
Elliott Hughesf344baa2021-12-07 09:12:34 -08004304{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4305printf %s "checking for a BSD-compatible install... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004306if test -z "$INSTALL"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08004307if test ${ac_cv_path_install+y}
4308then :
4309 printf %s "(cached) " >&6
4310else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07004311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4312for as_dir in $PATH
4313do
4314 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08004315 case $as_dir in #(((
4316 '') as_dir=./ ;;
4317 */) ;;
4318 *) as_dir=$as_dir/ ;;
4319 esac
4320 # Account for fact that we put trailing slashes in our PATH walk.
4321case $as_dir in #((
4322 ./ | /[cC]/* | \
Elliott Hughes82be86d2017-09-20 17:00:17 -07004323 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4324 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4325 /usr/ucb/* ) ;;
4326 *)
4327 # OSF1 and SCO ODT 3.0 have their own names for install.
4328 # Don't use installbsd from OSF since it installs stuff as root
4329 # by default.
4330 for ac_prog in ginstall scoinst install; do
4331 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08004332 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07004333 if test $ac_prog = install &&
Elliott Hughesf344baa2021-12-07 09:12:34 -08004334 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07004335 # AIX install. It has an incompatible calling convention.
4336 :
4337 elif test $ac_prog = install &&
Elliott Hughesf344baa2021-12-07 09:12:34 -08004338 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07004339 # program-specific install script used by HP pwplus--don't use.
4340 :
4341 else
4342 rm -rf conftest.one conftest.two conftest.dir
4343 echo one > conftest.one
4344 echo two > conftest.two
4345 mkdir conftest.dir
Elliott Hughesf344baa2021-12-07 09:12:34 -08004346 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
Elliott Hughes82be86d2017-09-20 17:00:17 -07004347 test -s conftest.one && test -s conftest.two &&
4348 test -s conftest.dir/conftest.one &&
4349 test -s conftest.dir/conftest.two
4350 then
Elliott Hughesf344baa2021-12-07 09:12:34 -08004351 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
Elliott Hughes82be86d2017-09-20 17:00:17 -07004352 break 3
4353 fi
4354 fi
4355 fi
4356 done
4357 done
4358 ;;
4359esac
4360
4361 done
4362IFS=$as_save_IFS
4363
4364rm -rf conftest.one conftest.two conftest.dir
4365
4366fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08004367 if test ${ac_cv_path_install+y}; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07004368 INSTALL=$ac_cv_path_install
4369 else
4370 # As a last resort, use the slow shell script. Don't cache a
4371 # value for INSTALL within a source directory, because that will
4372 # break other packages using the cache if that directory is
4373 # removed, or if the value is a relative name.
4374 INSTALL=$ac_install_sh
4375 fi
4376fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08004377{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4378printf "%s\n" "$INSTALL" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004379
4380# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4381# It thinks the first close brace ends the variable substitution.
4382test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4383
4384test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4385
4386test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4387
Elliott Hughesf344baa2021-12-07 09:12:34 -08004388
4389
4390
4391
4392
4393
4394
4395
4396
4397
Elliott Hughes82be86d2017-09-20 17:00:17 -07004398# Expand $ac_aux_dir to an absolute path.
4399am_aux_dir=`cd "$ac_aux_dir" && pwd`
4400
4401ac_ext=c
4402ac_cpp='$CPP $CPPFLAGS'
4403ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4404ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4405ac_compiler_gnu=$ac_cv_c_compiler_gnu
4406if test -n "$ac_tool_prefix"; then
4407 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4408set dummy ${ac_tool_prefix}gcc; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08004409{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4410printf %s "checking for $ac_word... " >&6; }
4411if test ${ac_cv_prog_CC+y}
4412then :
4413 printf %s "(cached) " >&6
4414else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07004415 if test -n "$CC"; then
4416 ac_cv_prog_CC="$CC" # Let the user override the test.
4417else
4418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4419for as_dir in $PATH
4420do
4421 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08004422 case $as_dir in #(((
4423 '') as_dir=./ ;;
4424 */) ;;
4425 *) as_dir=$as_dir/ ;;
4426 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07004427 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08004428 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07004429 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Elliott Hughesf344baa2021-12-07 09:12:34 -08004430 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07004431 break 2
4432 fi
4433done
4434 done
4435IFS=$as_save_IFS
4436
4437fi
4438fi
4439CC=$ac_cv_prog_CC
4440if test -n "$CC"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08004441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4442printf "%s\n" "$CC" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004443else
Elliott Hughesf344baa2021-12-07 09:12:34 -08004444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4445printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004446fi
4447
4448
4449fi
4450if test -z "$ac_cv_prog_CC"; then
4451 ac_ct_CC=$CC
4452 # Extract the first word of "gcc", so it can be a program name with args.
4453set dummy gcc; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08004454{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4455printf %s "checking for $ac_word... " >&6; }
4456if test ${ac_cv_prog_ac_ct_CC+y}
4457then :
4458 printf %s "(cached) " >&6
4459else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07004460 if test -n "$ac_ct_CC"; then
4461 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4462else
4463as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4464for as_dir in $PATH
4465do
4466 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08004467 case $as_dir in #(((
4468 '') as_dir=./ ;;
4469 */) ;;
4470 *) as_dir=$as_dir/ ;;
4471 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07004472 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08004473 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07004474 ac_cv_prog_ac_ct_CC="gcc"
Elliott Hughesf344baa2021-12-07 09:12:34 -08004475 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07004476 break 2
4477 fi
4478done
4479 done
4480IFS=$as_save_IFS
4481
4482fi
4483fi
4484ac_ct_CC=$ac_cv_prog_ac_ct_CC
4485if test -n "$ac_ct_CC"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08004486 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4487printf "%s\n" "$ac_ct_CC" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004488else
Elliott Hughesf344baa2021-12-07 09:12:34 -08004489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4490printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004491fi
4492
4493 if test "x$ac_ct_CC" = x; then
4494 CC=""
4495 else
4496 case $cross_compiling:$ac_tool_warned in
4497yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -08004498{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4499printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004500ac_tool_warned=yes ;;
4501esac
4502 CC=$ac_ct_CC
4503 fi
4504else
4505 CC="$ac_cv_prog_CC"
4506fi
4507
4508if test -z "$CC"; then
4509 if test -n "$ac_tool_prefix"; then
4510 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4511set dummy ${ac_tool_prefix}cc; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08004512{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4513printf %s "checking for $ac_word... " >&6; }
4514if test ${ac_cv_prog_CC+y}
4515then :
4516 printf %s "(cached) " >&6
4517else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07004518 if test -n "$CC"; then
4519 ac_cv_prog_CC="$CC" # Let the user override the test.
4520else
4521as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4522for as_dir in $PATH
4523do
4524 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08004525 case $as_dir in #(((
4526 '') as_dir=./ ;;
4527 */) ;;
4528 *) as_dir=$as_dir/ ;;
4529 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07004530 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08004531 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07004532 ac_cv_prog_CC="${ac_tool_prefix}cc"
Elliott Hughesf344baa2021-12-07 09:12:34 -08004533 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07004534 break 2
4535 fi
4536done
4537 done
4538IFS=$as_save_IFS
4539
4540fi
4541fi
4542CC=$ac_cv_prog_CC
4543if test -n "$CC"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08004544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4545printf "%s\n" "$CC" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004546else
Elliott Hughesf344baa2021-12-07 09:12:34 -08004547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4548printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004549fi
4550
4551
4552 fi
4553fi
4554if test -z "$CC"; then
4555 # Extract the first word of "cc", so it can be a program name with args.
4556set dummy cc; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08004557{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4558printf %s "checking for $ac_word... " >&6; }
4559if test ${ac_cv_prog_CC+y}
4560then :
4561 printf %s "(cached) " >&6
4562else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07004563 if test -n "$CC"; then
4564 ac_cv_prog_CC="$CC" # Let the user override the test.
4565else
4566 ac_prog_rejected=no
4567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4568for as_dir in $PATH
4569do
4570 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08004571 case $as_dir in #(((
4572 '') as_dir=./ ;;
4573 */) ;;
4574 *) as_dir=$as_dir/ ;;
4575 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07004576 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08004577 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4578 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07004579 ac_prog_rejected=yes
4580 continue
4581 fi
4582 ac_cv_prog_CC="cc"
Elliott Hughesf344baa2021-12-07 09:12:34 -08004583 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07004584 break 2
4585 fi
4586done
4587 done
4588IFS=$as_save_IFS
4589
4590if test $ac_prog_rejected = yes; then
4591 # We found a bogon in the path, so make sure we never use it.
4592 set dummy $ac_cv_prog_CC
4593 shift
4594 if test $# != 0; then
4595 # We chose a different compiler from the bogus one.
4596 # However, it has the same basename, so the bogon will be chosen
4597 # first if we set CC to just the basename; use the full file name.
4598 shift
Elliott Hughesf344baa2021-12-07 09:12:34 -08004599 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
Elliott Hughes82be86d2017-09-20 17:00:17 -07004600 fi
4601fi
4602fi
4603fi
4604CC=$ac_cv_prog_CC
4605if test -n "$CC"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08004606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4607printf "%s\n" "$CC" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004608else
Elliott Hughesf344baa2021-12-07 09:12:34 -08004609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4610printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004611fi
4612
4613
4614fi
4615if test -z "$CC"; then
4616 if test -n "$ac_tool_prefix"; then
4617 for ac_prog in cl.exe
4618 do
4619 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4620set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08004621{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4622printf %s "checking for $ac_word... " >&6; }
4623if test ${ac_cv_prog_CC+y}
4624then :
4625 printf %s "(cached) " >&6
4626else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07004627 if test -n "$CC"; then
4628 ac_cv_prog_CC="$CC" # Let the user override the test.
4629else
4630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4631for as_dir in $PATH
4632do
4633 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08004634 case $as_dir in #(((
4635 '') as_dir=./ ;;
4636 */) ;;
4637 *) as_dir=$as_dir/ ;;
4638 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07004639 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08004640 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07004641 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Elliott Hughesf344baa2021-12-07 09:12:34 -08004642 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07004643 break 2
4644 fi
4645done
4646 done
4647IFS=$as_save_IFS
4648
4649fi
4650fi
4651CC=$ac_cv_prog_CC
4652if test -n "$CC"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08004653 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4654printf "%s\n" "$CC" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004655else
Elliott Hughesf344baa2021-12-07 09:12:34 -08004656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004658fi
4659
4660
4661 test -n "$CC" && break
4662 done
4663fi
4664if test -z "$CC"; then
4665 ac_ct_CC=$CC
4666 for ac_prog in cl.exe
4667do
4668 # Extract the first word of "$ac_prog", so it can be a program name with args.
4669set dummy $ac_prog; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08004670{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4671printf %s "checking for $ac_word... " >&6; }
4672if test ${ac_cv_prog_ac_ct_CC+y}
4673then :
4674 printf %s "(cached) " >&6
4675else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07004676 if test -n "$ac_ct_CC"; then
4677 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4678else
4679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4680for as_dir in $PATH
4681do
4682 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08004683 case $as_dir in #(((
4684 '') as_dir=./ ;;
4685 */) ;;
4686 *) as_dir=$as_dir/ ;;
4687 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07004688 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08004689 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07004690 ac_cv_prog_ac_ct_CC="$ac_prog"
Elliott Hughesf344baa2021-12-07 09:12:34 -08004691 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07004692 break 2
4693 fi
4694done
4695 done
4696IFS=$as_save_IFS
4697
4698fi
4699fi
4700ac_ct_CC=$ac_cv_prog_ac_ct_CC
4701if test -n "$ac_ct_CC"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08004702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4703printf "%s\n" "$ac_ct_CC" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004704else
Elliott Hughesf344baa2021-12-07 09:12:34 -08004705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4706printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004707fi
4708
4709
4710 test -n "$ac_ct_CC" && break
4711done
4712
4713 if test "x$ac_ct_CC" = x; then
4714 CC=""
4715 else
4716 case $cross_compiling:$ac_tool_warned in
4717yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -08004718{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4719printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004720ac_tool_warned=yes ;;
4721esac
4722 CC=$ac_ct_CC
4723 fi
4724fi
4725
4726fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08004727if test -z "$CC"; then
4728 if test -n "$ac_tool_prefix"; then
4729 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4730set dummy ${ac_tool_prefix}clang; ac_word=$2
4731{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4732printf %s "checking for $ac_word... " >&6; }
4733if test ${ac_cv_prog_CC+y}
4734then :
4735 printf %s "(cached) " >&6
4736else $as_nop
4737 if test -n "$CC"; then
4738 ac_cv_prog_CC="$CC" # Let the user override the test.
4739else
4740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4741for as_dir in $PATH
4742do
4743 IFS=$as_save_IFS
4744 case $as_dir in #(((
4745 '') as_dir=./ ;;
4746 */) ;;
4747 *) as_dir=$as_dir/ ;;
4748 esac
4749 for ac_exec_ext in '' $ac_executable_extensions; do
4750 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4751 ac_cv_prog_CC="${ac_tool_prefix}clang"
4752 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4753 break 2
4754 fi
4755done
4756 done
4757IFS=$as_save_IFS
4758
4759fi
4760fi
4761CC=$ac_cv_prog_CC
4762if test -n "$CC"; then
4763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4764printf "%s\n" "$CC" >&6; }
4765else
4766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4767printf "%s\n" "no" >&6; }
4768fi
Elliott Hughes82be86d2017-09-20 17:00:17 -07004769
4770
Elliott Hughesf344baa2021-12-07 09:12:34 -08004771fi
4772if test -z "$ac_cv_prog_CC"; then
4773 ac_ct_CC=$CC
4774 # Extract the first word of "clang", so it can be a program name with args.
4775set dummy clang; ac_word=$2
4776{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4777printf %s "checking for $ac_word... " >&6; }
4778if test ${ac_cv_prog_ac_ct_CC+y}
4779then :
4780 printf %s "(cached) " >&6
4781else $as_nop
4782 if test -n "$ac_ct_CC"; then
4783 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4784else
4785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4786for as_dir in $PATH
4787do
4788 IFS=$as_save_IFS
4789 case $as_dir in #(((
4790 '') as_dir=./ ;;
4791 */) ;;
4792 *) as_dir=$as_dir/ ;;
4793 esac
4794 for ac_exec_ext in '' $ac_executable_extensions; do
4795 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4796 ac_cv_prog_ac_ct_CC="clang"
4797 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4798 break 2
4799 fi
4800done
4801 done
4802IFS=$as_save_IFS
4803
4804fi
4805fi
4806ac_ct_CC=$ac_cv_prog_ac_ct_CC
4807if test -n "$ac_ct_CC"; then
4808 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4809printf "%s\n" "$ac_ct_CC" >&6; }
4810else
4811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4812printf "%s\n" "no" >&6; }
4813fi
4814
4815 if test "x$ac_ct_CC" = x; then
4816 CC=""
4817 else
4818 case $cross_compiling:$ac_tool_warned in
4819yes:)
4820{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4821printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4822ac_tool_warned=yes ;;
4823esac
4824 CC=$ac_ct_CC
4825 fi
4826else
4827 CC="$ac_cv_prog_CC"
4828fi
4829
4830fi
4831
4832
4833test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4834printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004835as_fn_error $? "no acceptable C compiler found in \$PATH
4836See \`config.log' for more details" "$LINENO" 5; }
4837
4838# Provide some information about the compiler.
Elliott Hughesf344baa2021-12-07 09:12:34 -08004839printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07004840set X $ac_compile
4841ac_compiler=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08004842for ac_option in --version -v -V -qversion -version; do
Elliott Hughes82be86d2017-09-20 17:00:17 -07004843 { { ac_try="$ac_compiler $ac_option >&5"
4844case "(($ac_try" in
4845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4846 *) ac_try_echo=$ac_try;;
4847esac
4848eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Elliott Hughesf344baa2021-12-07 09:12:34 -08004849printf "%s\n" "$ac_try_echo"; } >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07004850 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4851 ac_status=$?
4852 if test -s conftest.err; then
4853 sed '10a\
4854... rest of stderr output deleted ...
4855 10q' conftest.err >conftest.er1
4856 cat conftest.er1 >&5
4857 fi
4858 rm -f conftest.er1 conftest.err
Elliott Hughesf344baa2021-12-07 09:12:34 -08004859 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07004860 test $ac_status = 0; }
4861done
4862
4863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4864/* end confdefs.h. */
4865
4866int main (void)
4867{
4868
4869 ;
4870 return 0;
4871}
4872_ACEOF
4873ac_clean_files_save=$ac_clean_files
4874ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4875# Try to create an executable without -o first, disregard a.out.
4876# It will help us diagnose broken compilers, and finding out an intuition
4877# of exeext.
Elliott Hughesf344baa2021-12-07 09:12:34 -08004878{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4879printf %s "checking whether the C compiler works... " >&6; }
4880ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Elliott Hughes82be86d2017-09-20 17:00:17 -07004881
4882# The possible output files:
4883ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4884
4885ac_rmfiles=
4886for ac_file in $ac_files
4887do
4888 case $ac_file in
4889 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4890 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4891 esac
4892done
4893rm -f $ac_rmfiles
4894
4895if { { ac_try="$ac_link_default"
4896case "(($ac_try" in
4897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4898 *) ac_try_echo=$ac_try;;
4899esac
4900eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Elliott Hughesf344baa2021-12-07 09:12:34 -08004901printf "%s\n" "$ac_try_echo"; } >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07004902 (eval "$ac_link_default") 2>&5
4903 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -08004904 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4905 test $ac_status = 0; }
4906then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07004907 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4908# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4909# in a Makefile. We should not override ac_cv_exeext if it was cached,
4910# so that the user can short-circuit this test for compilers unknown to
4911# Autoconf.
4912for ac_file in $ac_files ''
4913do
4914 test -f "$ac_file" || continue
4915 case $ac_file in
4916 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4917 ;;
4918 [ab].out )
4919 # We found the default executable, but exeext='' is most
4920 # certainly right.
4921 break;;
4922 *.* )
Elliott Hughesf344baa2021-12-07 09:12:34 -08004923 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
Elliott Hughes82be86d2017-09-20 17:00:17 -07004924 then :; else
4925 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4926 fi
4927 # We set ac_cv_exeext here because the later test for it is not
4928 # safe: cross compilers may not add the suffix if given an `-o'
4929 # argument, so we may need to know it at that point already.
4930 # Even if this section looks crufty: it has the advantage of
4931 # actually working.
4932 break;;
4933 * )
4934 break;;
4935 esac
4936done
4937test "$ac_cv_exeext" = no && ac_cv_exeext=
4938
Elliott Hughesf344baa2021-12-07 09:12:34 -08004939else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07004940 ac_file=''
4941fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08004942if test -z "$ac_file"
4943then :
4944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4945printf "%s\n" "no" >&6; }
4946printf "%s\n" "$as_me: failed program was:" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07004947sed 's/^/| /' conftest.$ac_ext >&5
4948
Elliott Hughesf344baa2021-12-07 09:12:34 -08004949{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4950printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004951as_fn_error 77 "C compiler cannot create executables
4952See \`config.log' for more details" "$LINENO" 5; }
Elliott Hughesf344baa2021-12-07 09:12:34 -08004953else $as_nop
4954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4955printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004956fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08004957{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4958printf %s "checking for C compiler default output file name... " >&6; }
4959{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4960printf "%s\n" "$ac_file" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004961ac_exeext=$ac_cv_exeext
4962
4963rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4964ac_clean_files=$ac_clean_files_save
Elliott Hughesf344baa2021-12-07 09:12:34 -08004965{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4966printf %s "checking for suffix of executables... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07004967if { { ac_try="$ac_link"
4968case "(($ac_try" in
4969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4970 *) ac_try_echo=$ac_try;;
4971esac
4972eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Elliott Hughesf344baa2021-12-07 09:12:34 -08004973printf "%s\n" "$ac_try_echo"; } >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07004974 (eval "$ac_link") 2>&5
4975 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -08004976 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4977 test $ac_status = 0; }
4978then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07004979 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4980# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4981# work properly (i.e., refer to `conftest.exe'), while it won't with
4982# `rm'.
4983for ac_file in conftest.exe conftest conftest.*; do
4984 test -f "$ac_file" || continue
4985 case $ac_file in
4986 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4987 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4988 break;;
4989 * ) break;;
4990 esac
4991done
Elliott Hughesf344baa2021-12-07 09:12:34 -08004992else $as_nop
4993 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4994printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07004995as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4996See \`config.log' for more details" "$LINENO" 5; }
4997fi
4998rm -f conftest conftest$ac_cv_exeext
Elliott Hughesf344baa2021-12-07 09:12:34 -08004999{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5000printf "%s\n" "$ac_cv_exeext" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07005001
5002rm -f conftest.$ac_ext
5003EXEEXT=$ac_cv_exeext
5004ac_exeext=$EXEEXT
5005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5006/* end confdefs.h. */
5007#include <stdio.h>
5008int main (void)
5009{
5010FILE *f = fopen ("conftest.out", "w");
5011 return ferror (f) || fclose (f) != 0;
5012
5013 ;
5014 return 0;
5015}
5016_ACEOF
5017ac_clean_files="$ac_clean_files conftest.out"
5018# Check that the compiler produces executables we can run. If not, either
5019# the compiler is broken, or we cross compile.
Elliott Hughesf344baa2021-12-07 09:12:34 -08005020{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5021printf %s "checking whether we are cross compiling... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07005022if test "$cross_compiling" != yes; then
5023 { { ac_try="$ac_link"
5024case "(($ac_try" in
5025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5026 *) ac_try_echo=$ac_try;;
5027esac
5028eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Elliott Hughesf344baa2021-12-07 09:12:34 -08005029printf "%s\n" "$ac_try_echo"; } >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07005030 (eval "$ac_link") 2>&5
5031 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -08005032 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07005033 test $ac_status = 0; }
5034 if { ac_try='./conftest$ac_cv_exeext'
5035 { { case "(($ac_try" in
5036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5037 *) ac_try_echo=$ac_try;;
5038esac
5039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Elliott Hughesf344baa2021-12-07 09:12:34 -08005040printf "%s\n" "$ac_try_echo"; } >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07005041 (eval "$ac_try") 2>&5
5042 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -08005043 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07005044 test $ac_status = 0; }; }; then
5045 cross_compiling=no
5046 else
5047 if test "$cross_compiling" = maybe; then
5048 cross_compiling=yes
5049 else
Elliott Hughesf344baa2021-12-07 09:12:34 -08005050 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5051printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5052as_fn_error 77 "cannot run C compiled programs.
Elliott Hughes82be86d2017-09-20 17:00:17 -07005053If you meant to cross compile, use \`--host'.
5054See \`config.log' for more details" "$LINENO" 5; }
5055 fi
5056 fi
5057fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08005058{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5059printf "%s\n" "$cross_compiling" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07005060
5061rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5062ac_clean_files=$ac_clean_files_save
Elliott Hughesf344baa2021-12-07 09:12:34 -08005063{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5064printf %s "checking for suffix of object files... " >&6; }
5065if test ${ac_cv_objext+y}
5066then :
5067 printf %s "(cached) " >&6
5068else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07005069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5070/* end confdefs.h. */
5071
5072int main (void)
5073{
5074
5075 ;
5076 return 0;
5077}
5078_ACEOF
5079rm -f conftest.o conftest.obj
5080if { { ac_try="$ac_compile"
5081case "(($ac_try" in
5082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5083 *) ac_try_echo=$ac_try;;
5084esac
5085eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Elliott Hughesf344baa2021-12-07 09:12:34 -08005086printf "%s\n" "$ac_try_echo"; } >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07005087 (eval "$ac_compile") 2>&5
5088 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -08005089 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5090 test $ac_status = 0; }
5091then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07005092 for ac_file in conftest.o conftest.obj conftest.*; do
5093 test -f "$ac_file" || continue;
5094 case $ac_file in
5095 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5096 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5097 break;;
5098 esac
5099done
Elliott Hughesf344baa2021-12-07 09:12:34 -08005100else $as_nop
5101 printf "%s\n" "$as_me: failed program was:" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07005102sed 's/^/| /' conftest.$ac_ext >&5
5103
Elliott Hughesf344baa2021-12-07 09:12:34 -08005104{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5105printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07005106as_fn_error $? "cannot compute suffix of object files: cannot compile
5107See \`config.log' for more details" "$LINENO" 5; }
5108fi
5109rm -f conftest.$ac_cv_objext conftest.$ac_ext
5110fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08005111{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5112printf "%s\n" "$ac_cv_objext" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07005113OBJEXT=$ac_cv_objext
5114ac_objext=$OBJEXT
Elliott Hughesf344baa2021-12-07 09:12:34 -08005115{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
5116printf %s "checking whether the compiler supports GNU C... " >&6; }
5117if test ${ac_cv_c_compiler_gnu+y}
5118then :
5119 printf %s "(cached) " >&6
5120else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07005121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5122/* end confdefs.h. */
5123
5124int main (void)
5125{
5126#ifndef __GNUC__
5127 choke me
5128#endif
5129
5130 ;
5131 return 0;
5132}
5133_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08005134if ac_fn_c_try_compile "$LINENO"
5135then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07005136 ac_compiler_gnu=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -08005137else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07005138 ac_compiler_gnu=no
5139fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08005140rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07005141ac_cv_c_compiler_gnu=$ac_compiler_gnu
5142
5143fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08005144{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5145printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
5146ac_compiler_gnu=$ac_cv_c_compiler_gnu
5147
Elliott Hughes82be86d2017-09-20 17:00:17 -07005148if test $ac_compiler_gnu = yes; then
5149 GCC=yes
5150else
5151 GCC=
5152fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08005153ac_test_CFLAGS=${CFLAGS+y}
Elliott Hughes82be86d2017-09-20 17:00:17 -07005154ac_save_CFLAGS=$CFLAGS
Elliott Hughesf344baa2021-12-07 09:12:34 -08005155{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5156printf %s "checking whether $CC accepts -g... " >&6; }
5157if test ${ac_cv_prog_cc_g+y}
5158then :
5159 printf %s "(cached) " >&6
5160else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07005161 ac_save_c_werror_flag=$ac_c_werror_flag
5162 ac_c_werror_flag=yes
5163 ac_cv_prog_cc_g=no
5164 CFLAGS="-g"
5165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5166/* end confdefs.h. */
5167
5168int main (void)
5169{
5170
5171 ;
5172 return 0;
5173}
5174_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08005175if ac_fn_c_try_compile "$LINENO"
5176then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07005177 ac_cv_prog_cc_g=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -08005178else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07005179 CFLAGS=""
5180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5181/* end confdefs.h. */
5182
5183int main (void)
5184{
5185
5186 ;
5187 return 0;
5188}
5189_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08005190if ac_fn_c_try_compile "$LINENO"
5191then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07005192
Elliott Hughesf344baa2021-12-07 09:12:34 -08005193else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07005194 ac_c_werror_flag=$ac_save_c_werror_flag
5195 CFLAGS="-g"
5196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5197/* end confdefs.h. */
5198
5199int main (void)
5200{
5201
5202 ;
5203 return 0;
5204}
5205_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08005206if ac_fn_c_try_compile "$LINENO"
5207then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07005208 ac_cv_prog_cc_g=yes
5209fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08005210rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07005211fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08005212rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07005213fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08005214rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07005215 ac_c_werror_flag=$ac_save_c_werror_flag
5216fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08005217{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5218printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5219if test $ac_test_CFLAGS; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07005220 CFLAGS=$ac_save_CFLAGS
5221elif test $ac_cv_prog_cc_g = yes; then
5222 if test "$GCC" = yes; then
5223 CFLAGS="-g -O2"
5224 else
5225 CFLAGS="-g"
5226 fi
5227else
5228 if test "$GCC" = yes; then
5229 CFLAGS="-O2"
5230 else
5231 CFLAGS=
5232 fi
5233fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08005234ac_prog_cc_stdc=no
5235if test x$ac_prog_cc_stdc = xno
5236then :
5237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5238printf %s "checking for $CC option to enable C11 features... " >&6; }
5239if test ${ac_cv_prog_cc_c11+y}
5240then :
5241 printf %s "(cached) " >&6
5242else $as_nop
5243 ac_cv_prog_cc_c11=no
5244ac_save_CC=$CC
5245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5246/* end confdefs.h. */
5247$ac_c_conftest_c11_program
5248_ACEOF
5249for ac_arg in '' -std=gnu11
5250do
5251 CC="$ac_save_CC $ac_arg"
5252 if ac_fn_c_try_compile "$LINENO"
5253then :
5254 ac_cv_prog_cc_c11=$ac_arg
5255fi
5256rm -f core conftest.err conftest.$ac_objext conftest.beam
5257 test "x$ac_cv_prog_cc_c11" != "xno" && break
5258done
5259rm -f conftest.$ac_ext
5260CC=$ac_save_CC
5261fi
5262
5263if test "x$ac_cv_prog_cc_c11" = xno
5264then :
5265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5266printf "%s\n" "unsupported" >&6; }
5267else $as_nop
5268 if test "x$ac_cv_prog_cc_c11" = x
5269then :
5270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5271printf "%s\n" "none needed" >&6; }
5272else $as_nop
5273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5274printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
5275 CC="$CC $ac_cv_prog_cc_c11"
5276fi
5277 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5278 ac_prog_cc_stdc=c11
5279fi
5280fi
5281if test x$ac_prog_cc_stdc = xno
5282then :
5283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5284printf %s "checking for $CC option to enable C99 features... " >&6; }
5285if test ${ac_cv_prog_cc_c99+y}
5286then :
5287 printf %s "(cached) " >&6
5288else $as_nop
5289 ac_cv_prog_cc_c99=no
5290ac_save_CC=$CC
5291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5292/* end confdefs.h. */
5293$ac_c_conftest_c99_program
5294_ACEOF
5295for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
5296do
5297 CC="$ac_save_CC $ac_arg"
5298 if ac_fn_c_try_compile "$LINENO"
5299then :
5300 ac_cv_prog_cc_c99=$ac_arg
5301fi
5302rm -f core conftest.err conftest.$ac_objext conftest.beam
5303 test "x$ac_cv_prog_cc_c99" != "xno" && break
5304done
5305rm -f conftest.$ac_ext
5306CC=$ac_save_CC
5307fi
5308
5309if test "x$ac_cv_prog_cc_c99" = xno
5310then :
5311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5312printf "%s\n" "unsupported" >&6; }
5313else $as_nop
5314 if test "x$ac_cv_prog_cc_c99" = x
5315then :
5316 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5317printf "%s\n" "none needed" >&6; }
5318else $as_nop
5319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5320printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
5321 CC="$CC $ac_cv_prog_cc_c99"
5322fi
5323 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5324 ac_prog_cc_stdc=c99
5325fi
5326fi
5327if test x$ac_prog_cc_stdc = xno
5328then :
5329 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5330printf %s "checking for $CC option to enable C89 features... " >&6; }
5331if test ${ac_cv_prog_cc_c89+y}
5332then :
5333 printf %s "(cached) " >&6
5334else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07005335 ac_cv_prog_cc_c89=no
5336ac_save_CC=$CC
5337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5338/* end confdefs.h. */
Elliott Hughesf344baa2021-12-07 09:12:34 -08005339$ac_c_conftest_c89_program
Elliott Hughes82be86d2017-09-20 17:00:17 -07005340_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08005341for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Elliott Hughes82be86d2017-09-20 17:00:17 -07005342do
5343 CC="$ac_save_CC $ac_arg"
Elliott Hughesf344baa2021-12-07 09:12:34 -08005344 if ac_fn_c_try_compile "$LINENO"
5345then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07005346 ac_cv_prog_cc_c89=$ac_arg
5347fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08005348rm -f core conftest.err conftest.$ac_objext conftest.beam
Elliott Hughes82be86d2017-09-20 17:00:17 -07005349 test "x$ac_cv_prog_cc_c89" != "xno" && break
5350done
5351rm -f conftest.$ac_ext
5352CC=$ac_save_CC
Elliott Hughes82be86d2017-09-20 17:00:17 -07005353fi
Elliott Hughes82be86d2017-09-20 17:00:17 -07005354
Elliott Hughesf344baa2021-12-07 09:12:34 -08005355if test "x$ac_cv_prog_cc_c89" = xno
5356then :
5357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5358printf "%s\n" "unsupported" >&6; }
5359else $as_nop
5360 if test "x$ac_cv_prog_cc_c89" = x
5361then :
5362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5363printf "%s\n" "none needed" >&6; }
5364else $as_nop
5365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5366printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
5367 CC="$CC $ac_cv_prog_cc_c89"
5368fi
5369 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5370 ac_prog_cc_stdc=c89
5371fi
Elliott Hughes82be86d2017-09-20 17:00:17 -07005372fi
5373
5374ac_ext=c
5375ac_cpp='$CPP $CPPFLAGS'
5376ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5377ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5378ac_compiler_gnu=$ac_cv_c_compiler_gnu
5379
Elliott Hughesf344baa2021-12-07 09:12:34 -08005380
5381 ac_ext=c
Elliott Hughes82be86d2017-09-20 17:00:17 -07005382ac_cpp='$CPP $CPPFLAGS'
5383ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5384ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5385ac_compiler_gnu=$ac_cv_c_compiler_gnu
Elliott Hughesf344baa2021-12-07 09:12:34 -08005386{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5387printf %s "checking whether $CC understands -c and -o together... " >&6; }
5388if test ${am_cv_prog_cc_c_o+y}
5389then :
5390 printf %s "(cached) " >&6
5391else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07005392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5393/* end confdefs.h. */
5394
5395int main (void)
5396{
5397
5398 ;
5399 return 0;
5400}
5401_ACEOF
5402 # Make sure it works both with $CC and with simple cc.
5403 # Following AC_PROG_CC_C_O, we do the test twice because some
5404 # compilers refuse to overwrite an existing .o file with -o,
5405 # though they will create one.
5406 am_cv_prog_cc_c_o=yes
5407 for am_i in 1 2; do
5408 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5409 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5410 ac_status=$?
5411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5412 (exit $ac_status); } \
5413 && test -f conftest2.$ac_objext; then
5414 : OK
5415 else
5416 am_cv_prog_cc_c_o=no
5417 break
5418 fi
5419 done
5420 rm -f core conftest*
5421 unset am_i
5422fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08005423{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5424printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07005425if test "$am_cv_prog_cc_c_o" != yes; then
5426 # Losing compiler, so override with the script.
5427 # FIXME: It is wrong to rewrite CC.
5428 # But if we don't then we get into trouble of one sort or another.
5429 # A longer-term fix would be to have automake use am__CC in this case,
5430 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5431 CC="$am_aux_dir/compile $CC"
5432fi
5433ac_ext=c
5434ac_cpp='$CPP $CPPFLAGS'
5435ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5436ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5437ac_compiler_gnu=$ac_cv_c_compiler_gnu
5438
5439
5440
5441ac_ext=c
5442ac_cpp='$CPP $CPPFLAGS'
5443ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5444ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5445ac_compiler_gnu=$ac_cv_c_compiler_gnu
Elliott Hughesf344baa2021-12-07 09:12:34 -08005446{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5447printf %s "checking how to run the C preprocessor... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07005448# On Suns, sometimes $CPP names a directory.
5449if test -n "$CPP" && test -d "$CPP"; then
5450 CPP=
5451fi
5452if test -z "$CPP"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08005453 if test ${ac_cv_prog_CPP+y}
5454then :
5455 printf %s "(cached) " >&6
5456else $as_nop
5457 # Double quotes because $CC needs to be expanded
5458 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
Elliott Hughes82be86d2017-09-20 17:00:17 -07005459 do
5460 ac_preproc_ok=false
5461for ac_c_preproc_warn_flag in '' yes
5462do
5463 # Use a header file that comes with gcc, so configuring glibc
5464 # with a fresh cross-compiler works.
Elliott Hughes82be86d2017-09-20 17:00:17 -07005465 # On the NeXT, cc -E runs the code through the compiler's parser,
5466 # not just through cpp. "Syntax error" is here to catch this case.
5467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5468/* end confdefs.h. */
Elliott Hughesf344baa2021-12-07 09:12:34 -08005469#include <limits.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -07005470 Syntax error
5471_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08005472if ac_fn_c_try_cpp "$LINENO"
5473then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07005474
Elliott Hughesf344baa2021-12-07 09:12:34 -08005475else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07005476 # Broken: fails on valid input.
5477continue
5478fi
5479rm -f conftest.err conftest.i conftest.$ac_ext
5480
5481 # OK, works on sane cases. Now check whether nonexistent headers
5482 # can be detected and how.
5483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5484/* end confdefs.h. */
5485#include <ac_nonexistent.h>
5486_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08005487if ac_fn_c_try_cpp "$LINENO"
5488then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07005489 # Broken: success on invalid input.
5490continue
Elliott Hughesf344baa2021-12-07 09:12:34 -08005491else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07005492 # Passes both tests.
5493ac_preproc_ok=:
5494break
5495fi
5496rm -f conftest.err conftest.i conftest.$ac_ext
5497
5498done
5499# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5500rm -f conftest.i conftest.err conftest.$ac_ext
Elliott Hughesf344baa2021-12-07 09:12:34 -08005501if $ac_preproc_ok
5502then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07005503 break
5504fi
5505
5506 done
5507 ac_cv_prog_CPP=$CPP
5508
5509fi
5510 CPP=$ac_cv_prog_CPP
5511else
5512 ac_cv_prog_CPP=$CPP
5513fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08005514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5515printf "%s\n" "$CPP" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07005516ac_preproc_ok=false
5517for ac_c_preproc_warn_flag in '' yes
5518do
5519 # Use a header file that comes with gcc, so configuring glibc
5520 # with a fresh cross-compiler works.
Elliott Hughes82be86d2017-09-20 17:00:17 -07005521 # On the NeXT, cc -E runs the code through the compiler's parser,
5522 # not just through cpp. "Syntax error" is here to catch this case.
5523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5524/* end confdefs.h. */
Elliott Hughesf344baa2021-12-07 09:12:34 -08005525#include <limits.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -07005526 Syntax error
5527_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08005528if ac_fn_c_try_cpp "$LINENO"
5529then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07005530
Elliott Hughesf344baa2021-12-07 09:12:34 -08005531else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07005532 # Broken: fails on valid input.
5533continue
5534fi
5535rm -f conftest.err conftest.i conftest.$ac_ext
5536
5537 # OK, works on sane cases. Now check whether nonexistent headers
5538 # can be detected and how.
5539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5540/* end confdefs.h. */
5541#include <ac_nonexistent.h>
5542_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08005543if ac_fn_c_try_cpp "$LINENO"
5544then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07005545 # Broken: success on invalid input.
5546continue
Elliott Hughesf344baa2021-12-07 09:12:34 -08005547else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07005548 # Passes both tests.
5549ac_preproc_ok=:
5550break
5551fi
5552rm -f conftest.err conftest.i conftest.$ac_ext
5553
5554done
5555# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5556rm -f conftest.i conftest.err conftest.$ac_ext
Elliott Hughesf344baa2021-12-07 09:12:34 -08005557if $ac_preproc_ok
5558then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07005559
Elliott Hughesf344baa2021-12-07 09:12:34 -08005560else $as_nop
5561 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5562printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07005563as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5564See \`config.log' for more details" "$LINENO" 5; }
5565fi
5566
5567ac_ext=c
5568ac_cpp='$CPP $CPPFLAGS'
5569ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5570ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5571ac_compiler_gnu=$ac_cv_c_compiler_gnu
5572
5573
5574 IFS=$xc_prog_cc_prev_IFS
5575 LIBS=$xc_prog_cc_prev_LIBS
5576 CFLAGS=$xc_prog_cc_prev_CFLAGS
5577 LDFLAGS=$xc_prog_cc_prev_LDFLAGS
5578 CPPFLAGS=$xc_prog_cc_prev_CPPFLAGS
5579
5580
5581
5582
5583
Elliott Hughes0128fe42018-02-27 14:57:55 -08005584
Elliott Hughesf344baa2021-12-07 09:12:34 -08005585{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
5586printf %s "checking for a sed that does not truncate output... " >&6; }
5587if test ${ac_cv_path_SED+y}
5588then :
5589 printf %s "(cached) " >&6
5590else $as_nop
Elliott Hughes0128fe42018-02-27 14:57:55 -08005591 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
5592 for ac_i in 1 2 3 4 5 6 7; do
5593 ac_script="$ac_script$as_nl$ac_script"
5594 done
5595 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
5596 { ac_script=; unset ac_script;}
5597 if test -z "$SED"; then
5598 ac_path_SED_found=false
5599 # Loop through the user's path and test for each of PROGNAME-LIST
5600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5601for as_dir in $PATH
5602do
5603 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08005604 case $as_dir in #(((
5605 '') as_dir=./ ;;
5606 */) ;;
5607 *) as_dir=$as_dir/ ;;
5608 esac
5609 for ac_prog in sed gsed
5610 do
Elliott Hughes0128fe42018-02-27 14:57:55 -08005611 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08005612 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
Elliott Hughes0128fe42018-02-27 14:57:55 -08005613 as_fn_executable_p "$ac_path_SED" || continue
5614# Check for GNU ac_path_SED and select it if it is found.
5615 # Check for GNU $ac_path_SED
5616case `"$ac_path_SED" --version 2>&1` in
5617*GNU*)
5618 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
5619*)
5620 ac_count=0
Elliott Hughesf344baa2021-12-07 09:12:34 -08005621 printf %s 0123456789 >"conftest.in"
Elliott Hughes0128fe42018-02-27 14:57:55 -08005622 while :
5623 do
5624 cat "conftest.in" "conftest.in" >"conftest.tmp"
5625 mv "conftest.tmp" "conftest.in"
5626 cp "conftest.in" "conftest.nl"
Elliott Hughesf344baa2021-12-07 09:12:34 -08005627 printf "%s\n" '' >> "conftest.nl"
Elliott Hughes0128fe42018-02-27 14:57:55 -08005628 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
5629 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5630 as_fn_arith $ac_count + 1 && ac_count=$as_val
5631 if test $ac_count -gt ${ac_path_SED_max-0}; then
5632 # Best one so far, save it but keep looking for a better one
5633 ac_cv_path_SED="$ac_path_SED"
5634 ac_path_SED_max=$ac_count
5635 fi
5636 # 10*(2^10) chars as input seems more than enough
5637 test $ac_count -gt 10 && break
5638 done
5639 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5640esac
5641
5642 $ac_path_SED_found && break 3
5643 done
5644 done
5645 done
5646IFS=$as_save_IFS
5647 if test -z "$ac_cv_path_SED"; then
5648 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
5649 fi
5650else
5651 ac_cv_path_SED=$SED
5652fi
5653
5654fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08005655{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
5656printf "%s\n" "$ac_cv_path_SED" >&6; }
Elliott Hughes0128fe42018-02-27 14:57:55 -08005657 SED="$ac_cv_path_SED"
5658 rm -f conftest.sed
5659
Elliott Hughes0128fe42018-02-27 14:57:55 -08005660
5661
5662
Elliott Hughesf344baa2021-12-07 09:12:34 -08005663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for code coverage support" >&5
5664printf %s "checking for code coverage support... " >&6; }
Haibo Huang51d9d882019-02-06 01:36:06 -08005665 coverage="no"
5666 curl_coverage_msg="disabled"
Elliott Hughes0128fe42018-02-27 14:57:55 -08005667
Haibo Huang51d9d882019-02-06 01:36:06 -08005668 # Check whether --enable-code-coverage was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08005669if test ${enable_code_coverage+y}
5670then :
Haibo Huang001784b2019-07-19 05:27:28 -07005671 enableval=$enable_code_coverage; coverage="$enableval"
Elliott Hughes0128fe42018-02-27 14:57:55 -08005672fi
5673
5674
Elliott Hughesf344baa2021-12-07 09:12:34 -08005675 if test "$GCC" != "yes"
5676then :
Haibo Huang51d9d882019-02-06 01:36:06 -08005677 coverage="no"
Elliott Hughes0128fe42018-02-27 14:57:55 -08005678fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08005679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $coverage" >&5
5680printf "%s\n" "$coverage" >&6; }
Elliott Hughes0128fe42018-02-27 14:57:55 -08005681
Haibo Huang51d9d882019-02-06 01:36:06 -08005682 if test "x$coverage" = "xyes"; then
5683 curl_coverage_msg="enabled"
Elliott Hughes0128fe42018-02-27 14:57:55 -08005684
Haibo Huang51d9d882019-02-06 01:36:06 -08005685 if test -n "$ac_tool_prefix"; then
5686 # Extract the first word of "${ac_tool_prefix}gcov", so it can be a program name with args.
5687set dummy ${ac_tool_prefix}gcov; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08005688{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5689printf %s "checking for $ac_word... " >&6; }
5690if test ${ac_cv_prog_GCOV+y}
5691then :
5692 printf %s "(cached) " >&6
5693else $as_nop
Elliott Hughes0128fe42018-02-27 14:57:55 -08005694 if test -n "$GCOV"; then
5695 ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
5696else
5697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5698for as_dir in $PATH
5699do
5700 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08005701 case $as_dir in #(((
5702 '') as_dir=./ ;;
5703 */) ;;
5704 *) as_dir=$as_dir/ ;;
5705 esac
Elliott Hughes0128fe42018-02-27 14:57:55 -08005706 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08005707 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Haibo Huang51d9d882019-02-06 01:36:06 -08005708 ac_cv_prog_GCOV="${ac_tool_prefix}gcov"
Elliott Hughesf344baa2021-12-07 09:12:34 -08005709 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes0128fe42018-02-27 14:57:55 -08005710 break 2
5711 fi
5712done
5713 done
5714IFS=$as_save_IFS
5715
5716fi
5717fi
5718GCOV=$ac_cv_prog_GCOV
5719if test -n "$GCOV"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08005720 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
5721printf "%s\n" "$GCOV" >&6; }
Elliott Hughes0128fe42018-02-27 14:57:55 -08005722else
Elliott Hughesf344baa2021-12-07 09:12:34 -08005723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5724printf "%s\n" "no" >&6; }
Elliott Hughes0128fe42018-02-27 14:57:55 -08005725fi
5726
5727
5728fi
5729if test -z "$ac_cv_prog_GCOV"; then
5730 ac_ct_GCOV=$GCOV
Haibo Huang51d9d882019-02-06 01:36:06 -08005731 # Extract the first word of "gcov", so it can be a program name with args.
5732set dummy gcov; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08005733{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5734printf %s "checking for $ac_word... " >&6; }
5735if test ${ac_cv_prog_ac_ct_GCOV+y}
5736then :
5737 printf %s "(cached) " >&6
5738else $as_nop
Elliott Hughes0128fe42018-02-27 14:57:55 -08005739 if test -n "$ac_ct_GCOV"; then
5740 ac_cv_prog_ac_ct_GCOV="$ac_ct_GCOV" # Let the user override the test.
5741else
5742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5743for as_dir in $PATH
5744do
5745 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08005746 case $as_dir in #(((
5747 '') as_dir=./ ;;
5748 */) ;;
5749 *) as_dir=$as_dir/ ;;
5750 esac
Elliott Hughes0128fe42018-02-27 14:57:55 -08005751 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08005752 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Haibo Huang51d9d882019-02-06 01:36:06 -08005753 ac_cv_prog_ac_ct_GCOV="gcov"
Elliott Hughesf344baa2021-12-07 09:12:34 -08005754 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes0128fe42018-02-27 14:57:55 -08005755 break 2
5756 fi
5757done
5758 done
5759IFS=$as_save_IFS
5760
5761fi
5762fi
5763ac_ct_GCOV=$ac_cv_prog_ac_ct_GCOV
5764if test -n "$ac_ct_GCOV"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08005765 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GCOV" >&5
5766printf "%s\n" "$ac_ct_GCOV" >&6; }
Elliott Hughes0128fe42018-02-27 14:57:55 -08005767else
Elliott Hughesf344baa2021-12-07 09:12:34 -08005768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5769printf "%s\n" "no" >&6; }
Elliott Hughes0128fe42018-02-27 14:57:55 -08005770fi
5771
5772 if test "x$ac_ct_GCOV" = x; then
Haibo Huang51d9d882019-02-06 01:36:06 -08005773 GCOV="gcov"
Elliott Hughes0128fe42018-02-27 14:57:55 -08005774 else
5775 case $cross_compiling:$ac_tool_warned in
5776yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -08005777{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5778printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes0128fe42018-02-27 14:57:55 -08005779ac_tool_warned=yes ;;
5780esac
5781 GCOV=$ac_ct_GCOV
5782 fi
5783else
5784 GCOV="$ac_cv_prog_GCOV"
5785fi
5786
Haibo Huang51d9d882019-02-06 01:36:06 -08005787 if test -z "$GCOV"; then
5788 as_fn_error $? "needs gcov for code coverage" "$LINENO" 5
5789 fi
5790 # Extract the first word of "lcov", so it can be a program name with args.
Elliott Hughes0128fe42018-02-27 14:57:55 -08005791set dummy lcov; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08005792{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5793printf %s "checking for $ac_word... " >&6; }
5794if test ${ac_cv_prog_LCOV+y}
5795then :
5796 printf %s "(cached) " >&6
5797else $as_nop
Elliott Hughes0128fe42018-02-27 14:57:55 -08005798 if test -n "$LCOV"; then
5799 ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
5800else
5801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5802for as_dir in $PATH
5803do
5804 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08005805 case $as_dir in #(((
5806 '') as_dir=./ ;;
5807 */) ;;
5808 *) as_dir=$as_dir/ ;;
5809 esac
Elliott Hughes0128fe42018-02-27 14:57:55 -08005810 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08005811 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes0128fe42018-02-27 14:57:55 -08005812 ac_cv_prog_LCOV="lcov"
Elliott Hughesf344baa2021-12-07 09:12:34 -08005813 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes0128fe42018-02-27 14:57:55 -08005814 break 2
5815 fi
5816done
5817 done
5818IFS=$as_save_IFS
5819
5820fi
5821fi
5822LCOV=$ac_cv_prog_LCOV
5823if test -n "$LCOV"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08005824 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
5825printf "%s\n" "$LCOV" >&6; }
Elliott Hughes0128fe42018-02-27 14:57:55 -08005826else
Elliott Hughesf344baa2021-12-07 09:12:34 -08005827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5828printf "%s\n" "no" >&6; }
Elliott Hughes0128fe42018-02-27 14:57:55 -08005829fi
5830
5831
Haibo Huang51d9d882019-02-06 01:36:06 -08005832 if test -z "$LCOV"; then
5833 as_fn_error $? "needs lcov for code coverage" "$LINENO" 5
5834 fi
5835
5836 CPPFLAGS="$CPPFLAGS -DNDEBUG"
5837 CFLAGS="$CLAGS -O0 -g -fprofile-arcs -ftest-coverage"
5838 LIBS="$LIBS -lgcov"
Elliott Hughes0128fe42018-02-27 14:57:55 -08005839 fi
Elliott Hughes0128fe42018-02-27 14:57:55 -08005840
Elliott Hughes0128fe42018-02-27 14:57:55 -08005841
Haibo Huang001784b2019-07-19 05:27:28 -07005842am__api_version='1.16'
Elliott Hughes82be86d2017-09-20 17:00:17 -07005843
Elliott Hughesf344baa2021-12-07 09:12:34 -08005844{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
5845printf %s "checking whether build environment is sane... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07005846# Reject unsafe characters in $srcdir or the absolute working directory
5847# name. Accept space and tab only in the latter.
5848am_lf='
5849'
5850case `pwd` in
5851 *[\\\"\#\$\&\'\`$am_lf]*)
5852 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
5853esac
5854case $srcdir in
5855 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
5856 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
5857esac
5858
5859# Do 'set' in a subshell so we don't clobber the current shell's
5860# arguments. Must try -L first in case configure is actually a
5861# symlink; some systems play weird games with the mod time of symlinks
5862# (eg FreeBSD returns the mod time of the symlink's containing
5863# directory).
5864if (
5865 am_has_slept=no
5866 for am_try in 1 2; do
5867 echo "timestamp, slept: $am_has_slept" > conftest.file
5868 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
5869 if test "$*" = "X"; then
5870 # -L didn't work.
5871 set X `ls -t "$srcdir/configure" conftest.file`
5872 fi
5873 if test "$*" != "X $srcdir/configure conftest.file" \
5874 && test "$*" != "X conftest.file $srcdir/configure"; then
5875
5876 # If neither matched, then we have a broken ls. This can happen
5877 # if, for instance, CONFIG_SHELL is bash and it inherits a
5878 # broken ls alias from the environment. This has actually
5879 # happened. Such a system could not be considered "sane".
5880 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
5881 alias in your environment" "$LINENO" 5
5882 fi
5883 if test "$2" = conftest.file || test $am_try -eq 2; then
5884 break
5885 fi
5886 # Just in case.
5887 sleep 1
5888 am_has_slept=yes
5889 done
5890 test "$2" = conftest.file
5891 )
5892then
5893 # Ok.
5894 :
5895else
5896 as_fn_error $? "newly created file is older than distributed files!
5897Check your system clock" "$LINENO" 5
5898fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08005899{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5900printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07005901# If we didn't sleep, we still need to ensure time stamps of config.status and
5902# generated files are strictly newer.
5903am_sleep_pid=
5904if grep 'slept: no' conftest.file >/dev/null 2>&1; then
5905 ( sleep 1 ) &
5906 am_sleep_pid=$!
5907fi
5908
5909rm -f conftest.file
5910
5911test "$program_prefix" != NONE &&
5912 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5913# Use a double $ so make ignores it.
5914test "$program_suffix" != NONE &&
5915 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5916# Double any \ or $.
5917# By default was `s,x,x', remove it if useless.
5918ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
Elliott Hughesf344baa2021-12-07 09:12:34 -08005919program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
Elliott Hughes82be86d2017-09-20 17:00:17 -07005920
Elliott Hughesf344baa2021-12-07 09:12:34 -08005921
5922 if test x"${MISSING+set}" != xset; then
Elliott Hughes34dd5f42021-08-10 13:01:18 -07005923 MISSING="\${SHELL} '$am_aux_dir/missing'"
Elliott Hughes82be86d2017-09-20 17:00:17 -07005924fi
5925# Use eval to expand $SHELL
5926if eval "$MISSING --is-lightweight"; then
5927 am_missing_run="$MISSING "
5928else
5929 am_missing_run=
Elliott Hughesf344baa2021-12-07 09:12:34 -08005930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
5931printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07005932fi
5933
5934if test x"${install_sh+set}" != xset; then
5935 case $am_aux_dir in
5936 *\ * | *\ *)
5937 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5938 *)
5939 install_sh="\${SHELL} $am_aux_dir/install-sh"
5940 esac
5941fi
5942
5943# Installed binaries are usually stripped using 'strip' when the user
5944# run "make install-strip". However 'strip' might not be the right
5945# tool to use in cross-compilation environments, therefore Automake
5946# will honor the 'STRIP' environment variable to overrule this program.
5947if test "$cross_compiling" != no; then
5948 if test -n "$ac_tool_prefix"; then
5949 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5950set dummy ${ac_tool_prefix}strip; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08005951{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5952printf %s "checking for $ac_word... " >&6; }
5953if test ${ac_cv_prog_STRIP+y}
5954then :
5955 printf %s "(cached) " >&6
5956else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07005957 if test -n "$STRIP"; then
5958 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5959else
5960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5961for as_dir in $PATH
5962do
5963 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08005964 case $as_dir in #(((
5965 '') as_dir=./ ;;
5966 */) ;;
5967 *) as_dir=$as_dir/ ;;
5968 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07005969 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08005970 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07005971 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
Elliott Hughesf344baa2021-12-07 09:12:34 -08005972 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07005973 break 2
5974 fi
5975done
5976 done
5977IFS=$as_save_IFS
5978
5979fi
5980fi
5981STRIP=$ac_cv_prog_STRIP
5982if test -n "$STRIP"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08005983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5984printf "%s\n" "$STRIP" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07005985else
Elliott Hughesf344baa2021-12-07 09:12:34 -08005986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5987printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07005988fi
5989
5990
5991fi
5992if test -z "$ac_cv_prog_STRIP"; then
5993 ac_ct_STRIP=$STRIP
5994 # Extract the first word of "strip", so it can be a program name with args.
5995set dummy strip; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08005996{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5997printf %s "checking for $ac_word... " >&6; }
5998if test ${ac_cv_prog_ac_ct_STRIP+y}
5999then :
6000 printf %s "(cached) " >&6
6001else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07006002 if test -n "$ac_ct_STRIP"; then
6003 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6004else
6005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6006for as_dir in $PATH
6007do
6008 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08006009 case $as_dir in #(((
6010 '') as_dir=./ ;;
6011 */) ;;
6012 *) as_dir=$as_dir/ ;;
6013 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07006014 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08006015 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07006016 ac_cv_prog_ac_ct_STRIP="strip"
Elliott Hughesf344baa2021-12-07 09:12:34 -08006017 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07006018 break 2
6019 fi
6020done
6021 done
6022IFS=$as_save_IFS
6023
6024fi
6025fi
6026ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6027if test -n "$ac_ct_STRIP"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08006028 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6029printf "%s\n" "$ac_ct_STRIP" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006030else
Elliott Hughesf344baa2021-12-07 09:12:34 -08006031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6032printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006033fi
6034
6035 if test "x$ac_ct_STRIP" = x; then
6036 STRIP=":"
6037 else
6038 case $cross_compiling:$ac_tool_warned in
6039yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -08006040{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6041printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07006042ac_tool_warned=yes ;;
6043esac
6044 STRIP=$ac_ct_STRIP
6045 fi
6046else
6047 STRIP="$ac_cv_prog_STRIP"
6048fi
6049
6050fi
6051INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
6052
Elliott Hughesf344baa2021-12-07 09:12:34 -08006053
6054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
6055printf %s "checking for a race-free mkdir -p... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006056if test -z "$MKDIR_P"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08006057 if test ${ac_cv_path_mkdir+y}
6058then :
6059 printf %s "(cached) " >&6
6060else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07006061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6062for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6063do
6064 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08006065 case $as_dir in #(((
6066 '') as_dir=./ ;;
6067 */) ;;
6068 *) as_dir=$as_dir/ ;;
6069 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07006070 for ac_prog in mkdir gmkdir; do
6071 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08006072 as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
6073 case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
6074 'mkdir ('*'coreutils) '* | \
6075 'BusyBox '* | \
Elliott Hughes82be86d2017-09-20 17:00:17 -07006076 'mkdir (fileutils) '4.1*)
Elliott Hughesf344baa2021-12-07 09:12:34 -08006077 ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07006078 break 3;;
6079 esac
6080 done
6081 done
6082 done
6083IFS=$as_save_IFS
6084
6085fi
6086
6087 test -d ./--version && rmdir ./--version
Elliott Hughesf344baa2021-12-07 09:12:34 -08006088 if test ${ac_cv_path_mkdir+y}; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07006089 MKDIR_P="$ac_cv_path_mkdir -p"
6090 else
6091 # As a last resort, use the slow shell script. Don't cache a
6092 # value for MKDIR_P within a source directory, because that will
6093 # break other packages using the cache if that directory is
6094 # removed, or if the value is a relative name.
6095 MKDIR_P="$ac_install_sh -d"
6096 fi
6097fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08006098{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6099printf "%s\n" "$MKDIR_P" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006100
6101for ac_prog in gawk mawk nawk awk
6102do
6103 # Extract the first word of "$ac_prog", so it can be a program name with args.
6104set dummy $ac_prog; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08006105{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6106printf %s "checking for $ac_word... " >&6; }
6107if test ${ac_cv_prog_AWK+y}
6108then :
6109 printf %s "(cached) " >&6
6110else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07006111 if test -n "$AWK"; then
6112 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6113else
6114as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6115for as_dir in $PATH
6116do
6117 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08006118 case $as_dir in #(((
6119 '') as_dir=./ ;;
6120 */) ;;
6121 *) as_dir=$as_dir/ ;;
6122 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07006123 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08006124 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07006125 ac_cv_prog_AWK="$ac_prog"
Elliott Hughesf344baa2021-12-07 09:12:34 -08006126 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07006127 break 2
6128 fi
6129done
6130 done
6131IFS=$as_save_IFS
6132
6133fi
6134fi
6135AWK=$ac_cv_prog_AWK
6136if test -n "$AWK"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08006137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6138printf "%s\n" "$AWK" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006139else
Elliott Hughesf344baa2021-12-07 09:12:34 -08006140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006142fi
6143
6144
6145 test -n "$AWK" && break
6146done
6147
Elliott Hughesf344baa2021-12-07 09:12:34 -08006148{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6149printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006150set x ${MAKE-make}
Elliott Hughesf344baa2021-12-07 09:12:34 -08006151ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
6152if eval test \${ac_cv_prog_make_${ac_make}_set+y}
6153then :
6154 printf %s "(cached) " >&6
6155else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07006156 cat >conftest.make <<\_ACEOF
6157SHELL = /bin/sh
6158all:
6159 @echo '@@@%%%=$(MAKE)=@@@%%%'
6160_ACEOF
6161# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
6162case `${MAKE-make} -f conftest.make 2>/dev/null` in
6163 *@@@%%%=?*=@@@%%%*)
6164 eval ac_cv_prog_make_${ac_make}_set=yes;;
6165 *)
6166 eval ac_cv_prog_make_${ac_make}_set=no;;
6167esac
6168rm -f conftest.make
6169fi
6170if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08006171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6172printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006173 SET_MAKE=
6174else
Elliott Hughesf344baa2021-12-07 09:12:34 -08006175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6176printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006177 SET_MAKE="MAKE=${MAKE-make}"
6178fi
6179
6180rm -rf .tst 2>/dev/null
6181mkdir .tst 2>/dev/null
6182if test -d .tst; then
6183 am__leading_dot=.
6184else
6185 am__leading_dot=_
6186fi
6187rmdir .tst 2>/dev/null
6188
6189DEPDIR="${am__leading_dot}deps"
6190
6191ac_config_commands="$ac_config_commands depfiles"
6192
Elliott Hughesf344baa2021-12-07 09:12:34 -08006193{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
6194printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -07006195cat > confinc.mk << 'END'
Elliott Hughes82be86d2017-09-20 17:00:17 -07006196am__doit:
Haibo Huang001784b2019-07-19 05:27:28 -07006197 @echo this is the am__doit target >confinc.out
Elliott Hughes82be86d2017-09-20 17:00:17 -07006198.PHONY: am__doit
6199END
Elliott Hughes82be86d2017-09-20 17:00:17 -07006200am__include="#"
6201am__quote=
Haibo Huang001784b2019-07-19 05:27:28 -07006202# BSD make does it like this.
6203echo '.include "confinc.mk" # ignored' > confmf.BSD
6204# Other make implementations (GNU, Solaris 10, AIX) do it like this.
6205echo 'include confinc.mk # ignored' > confmf.GNU
6206_am_result=no
6207for s in GNU BSD; do
6208 { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
6209 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
6210 ac_status=$?
6211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6212 (exit $ac_status); }
6213 case $?:`cat confinc.out 2>/dev/null` in #(
6214 '0:this is the am__doit target') :
6215 case $s in #(
6216 BSD) :
6217 am__include='.include' am__quote='"' ;; #(
6218 *) :
6219 am__include='include' am__quote='' ;;
6220esac ;; #(
6221 *) :
Elliott Hughes82be86d2017-09-20 17:00:17 -07006222 ;;
Haibo Huang001784b2019-07-19 05:27:28 -07006223esac
6224 if test "$am__include" != "#"; then
6225 _am_result="yes ($s style)"
6226 break
6227 fi
6228done
6229rm -f confinc.* confmf.*
Elliott Hughesf344baa2021-12-07 09:12:34 -08006230{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
6231printf "%s\n" "${_am_result}" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006232
6233# Check whether --enable-dependency-tracking was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08006234if test ${enable_dependency_tracking+y}
6235then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07006236 enableval=$enable_dependency_tracking;
6237fi
6238
6239if test "x$enable_dependency_tracking" != xno; then
6240 am_depcomp="$ac_aux_dir/depcomp"
6241 AMDEPBACKSLASH='\'
6242 am__nodep='_no'
6243fi
6244 if test "x$enable_dependency_tracking" != xno; then
6245 AMDEP_TRUE=
6246 AMDEP_FALSE='#'
6247else
6248 AMDEP_TRUE='#'
6249 AMDEP_FALSE=
6250fi
6251
6252
6253## --------------------------------------- ##
6254## Start of automake initialization code ##
6255## --------------------------------------- ##
6256
6257if test "`cd $srcdir && pwd`" != "`pwd`"; then
6258 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
6259 # is not polluted with repeated "-I."
6260 am__isrc=' -I$(srcdir)'
6261 # test to see if srcdir already configured
6262 if test -f $srcdir/config.status; then
6263 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
6264 fi
6265fi
6266
6267# test whether we have cygpath
6268if test -z "$CYGPATH_W"; then
6269 if (cygpath --version) >/dev/null 2>/dev/null; then
6270 CYGPATH_W='cygpath -w'
6271 else
6272 CYGPATH_W=echo
6273 fi
6274fi
6275
6276
6277# Define the identity of the package.
6278 PACKAGE='curl'
6279 VERSION='-'
6280
6281
Elliott Hughesf344baa2021-12-07 09:12:34 -08006282printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -07006283
6284
Elliott Hughesf344baa2021-12-07 09:12:34 -08006285printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -07006286
6287# Some tools Automake needs.
6288
6289ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
6290
6291
6292AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
6293
6294
6295AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
6296
6297
6298AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
6299
6300
6301MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
6302
6303# For better backward compatibility. To be removed once Automake 1.9.x
6304# dies out for good. For more background, see:
Haibo Huang001784b2019-07-19 05:27:28 -07006305# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
6306# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
Elliott Hughes82be86d2017-09-20 17:00:17 -07006307mkdir_p='$(MKDIR_P)'
6308
6309# We need awk for the "check" target (and possibly the TAP driver). The
6310# system "awk" is bad on some platforms.
6311# Always define AMTAR for backward compatibility. Yes, it's still used
6312# in the wild :-( We should find a proper way to deprecate it ...
6313AMTAR='$${TAR-tar}'
6314
6315
6316# We'll loop over all known methods to create a tar archive until one works.
6317_am_tools='gnutar pax cpio none'
6318
6319am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
6320
6321
6322
6323
6324
6325depcc="$CC" am_compiler_list=
6326
Elliott Hughesf344baa2021-12-07 09:12:34 -08006327{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6328printf %s "checking dependency style of $depcc... " >&6; }
6329if test ${am_cv_CC_dependencies_compiler_type+y}
6330then :
6331 printf %s "(cached) " >&6
6332else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07006333 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6334 # We make a subdir and do the tests there. Otherwise we can end up
6335 # making bogus files that we don't know about and never remove. For
6336 # instance it was reported that on HP-UX the gcc test will end up
6337 # making a dummy file named 'D' -- because '-MD' means "put the output
6338 # in D".
6339 rm -rf conftest.dir
6340 mkdir conftest.dir
6341 # Copy depcomp to subdir because otherwise we won't find it if we're
6342 # using a relative directory.
6343 cp "$am_depcomp" conftest.dir
6344 cd conftest.dir
6345 # We will build objects and dependencies in a subdirectory because
6346 # it helps to detect inapplicable dependency modes. For instance
6347 # both Tru64's cc and ICC support -MD to output dependencies as a
6348 # side effect of compilation, but ICC will put the dependencies in
6349 # the current directory while Tru64 will put them in the object
6350 # directory.
6351 mkdir sub
6352
6353 am_cv_CC_dependencies_compiler_type=none
6354 if test "$am_compiler_list" = ""; then
6355 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6356 fi
6357 am__universal=false
6358 case " $depcc " in #(
6359 *\ -arch\ *\ -arch\ *) am__universal=true ;;
6360 esac
6361
6362 for depmode in $am_compiler_list; do
6363 # Setup a source with many dependencies, because some compilers
6364 # like to wrap large dependency lists on column 80 (with \), and
6365 # we should not choose a depcomp mode which is confused by this.
6366 #
6367 # We need to recreate these files for each test, as the compiler may
6368 # overwrite some of them when testing with obscure command lines.
6369 # This happens at least with the AIX C compiler.
6370 : > sub/conftest.c
6371 for i in 1 2 3 4 5 6; do
6372 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6373 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6374 # Solaris 10 /bin/sh.
6375 echo '/* dummy */' > sub/conftst$i.h
6376 done
6377 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6378
6379 # We check with '-c' and '-o' for the sake of the "dashmstdout"
6380 # mode. It turns out that the SunPro C++ compiler does not properly
6381 # handle '-M -o', and we need to detect this. Also, some Intel
6382 # versions had trouble with output in subdirs.
6383 am__obj=sub/conftest.${OBJEXT-o}
6384 am__minus_obj="-o $am__obj"
6385 case $depmode in
6386 gcc)
6387 # This depmode causes a compiler race in universal mode.
6388 test "$am__universal" = false || continue
6389 ;;
6390 nosideeffect)
6391 # After this tag, mechanisms are not by side-effect, so they'll
6392 # only be used when explicitly requested.
6393 if test "x$enable_dependency_tracking" = xyes; then
6394 continue
6395 else
6396 break
6397 fi
6398 ;;
6399 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6400 # This compiler won't grok '-c -o', but also, the minuso test has
6401 # not run yet. These depmodes are late enough in the game, and
6402 # so weak that their functioning should not be impacted.
6403 am__obj=conftest.${OBJEXT-o}
6404 am__minus_obj=
6405 ;;
6406 none) break ;;
6407 esac
6408 if depmode=$depmode \
6409 source=sub/conftest.c object=$am__obj \
6410 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6411 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6412 >/dev/null 2>conftest.err &&
6413 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6414 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6415 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6416 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6417 # icc doesn't choke on unknown options, it will just issue warnings
6418 # or remarks (even with -Werror). So we grep stderr for any message
6419 # that says an option was ignored or not supported.
6420 # When given -MP, icc 7.0 and 7.1 complain thusly:
6421 # icc: Command line warning: ignoring option '-M'; no argument required
6422 # The diagnosis changed in icc 8.0:
6423 # icc: Command line remark: option '-MP' not supported
6424 if (grep 'ignoring option' conftest.err ||
6425 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6426 am_cv_CC_dependencies_compiler_type=$depmode
6427 break
6428 fi
6429 fi
6430 done
6431
6432 cd ..
6433 rm -rf conftest.dir
6434else
6435 am_cv_CC_dependencies_compiler_type=none
6436fi
6437
6438fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08006439{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6440printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006441CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6442
6443 if
6444 test "x$enable_dependency_tracking" != xno \
6445 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6446 am__fastdepCC_TRUE=
6447 am__fastdepCC_FALSE='#'
6448else
6449 am__fastdepCC_TRUE='#'
6450 am__fastdepCC_FALSE=
6451fi
6452
6453
Elliott Hughesf344baa2021-12-07 09:12:34 -08006454# Variables for tags utilities; see am/tags.am
6455if test -z "$CTAGS"; then
6456 CTAGS=ctags
6457fi
6458
6459if test -z "$ETAGS"; then
6460 ETAGS=etags
6461fi
6462
6463if test -z "$CSCOPE"; then
6464 CSCOPE=cscope
6465fi
6466
6467
Elliott Hughes82be86d2017-09-20 17:00:17 -07006468
6469# POSIX will say in a future version that running "rm -f" with no argument
6470# is OK; and we want to be able to make that assumption in our Makefile
6471# recipes. So use an aggressive probe to check that the usage we want is
6472# actually supported "in the wild" to an acceptable degree.
6473# See automake bug#10828.
6474# To make any issue more visible, cause the running configure to be aborted
6475# by default if the 'rm' program in use doesn't match our expectations; the
6476# user can still override this though.
6477if rm -f && rm -fr && rm -rf; then : OK; else
6478 cat >&2 <<'END'
6479Oops!
6480
6481Your 'rm' program seems unable to run without file operands specified
6482on the command line, even when the '-f' option is present. This is contrary
6483to the behaviour of most rm programs out there, and not conforming with
6484the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
6485
6486Please tell bug-automake@gnu.org about your system, including the value
6487of your $PATH and any error possibly output before this message. This
6488can help us improve future automake versions.
6489
6490END
6491 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
6492 echo 'Configuration will proceed anyway, since you have set the' >&2
6493 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
6494 echo >&2
6495 else
6496 cat >&2 <<'END'
6497Aborting the configuration process, to ensure you take notice of the issue.
6498
6499You can download and install GNU coreutils to get an 'rm' implementation
Haibo Huang001784b2019-07-19 05:27:28 -07006500that behaves properly: <https://www.gnu.org/software/coreutils/>.
Elliott Hughes82be86d2017-09-20 17:00:17 -07006501
6502If you want to complete the configuration process using your problematic
6503'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
6504to "yes", and re-run configure.
6505
6506END
6507 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
6508 fi
6509fi
6510
6511## ------------------------------------- ##
6512## End of automake initialization code ##
6513## ------------------------------------- ##
6514
6515
Elliott Hughesf344baa2021-12-07 09:12:34 -08006516{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking curl version" >&5
6517printf %s "checking curl version... " >&6; }
6518{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CURLVERSION" >&5
6519printf "%s\n" "$CURLVERSION" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006520
6521
6522
6523VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\([0-9A-Fa-f]*\).*/\1/p' ${srcdir}/include/curl/curlver.h`
6524
6525
6526PKGADD_PKG="HAXXcurl"
6527PKGADD_NAME="curl - a client that groks URLs"
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006528PKGADD_VENDOR="curl.se"
Elliott Hughes82be86d2017-09-20 17:00:17 -07006529
6530
6531
6532
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006533 curl_ssl_msg="no (--with-{openssl,gnutls,nss,mbedtls,wolfssl,schannel,secure-transport,mesalink,amissl,bearssl,rustls} )"
Haibo Huangb51266f2020-03-04 02:22:48 -08006534 curl_ssh_msg="no (--with-{libssh,libssh2})"
Elliott Hughes82be86d2017-09-20 17:00:17 -07006535 curl_zlib_msg="no (--with-zlib)"
Alex Deymo486467e2017-12-19 19:04:07 +01006536 curl_brotli_msg="no (--with-brotli)"
Haibo Huangc3c04f42020-08-19 13:00:07 -07006537 curl_zstd_msg="no (--with-zstd)"
Elliott Hughes82be86d2017-09-20 17:00:17 -07006538 curl_gss_msg="no (--with-gssapi)"
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006539 curl_gsasl_msg="no (--with-gsasl)"
Elliott Hughes82be86d2017-09-20 17:00:17 -07006540curl_tls_srp_msg="no (--enable-tls-srp)"
6541 curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
6542 curl_ipv6_msg="no (--enable-ipv6)"
6543curl_unix_sockets_msg="no (--enable-unix-sockets)"
6544 curl_idn_msg="no (--with-{libidn2,winidn})"
6545 curl_manual_msg="no (--enable-manual)"
6546curl_libcurl_msg="enabled (--disable-libcurl-option)"
6547curl_verbose_msg="enabled (--disable-verbose)"
6548 curl_sspi_msg="no (--enable-sspi)"
6549 curl_ldap_msg="no (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
6550 curl_ldaps_msg="no (--enable-ldaps)"
6551 curl_rtsp_msg="no (--enable-rtsp)"
6552 curl_rtmp_msg="no (--with-librtmp)"
Elliott Hughes82be86d2017-09-20 17:00:17 -07006553 curl_psl_msg="no (--with-libpsl)"
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006554 curl_altsvc_msg="enabled (--disable-alt-svc)"
6555 curl_hsts_msg="enabled (--disable-hsts)"
Alex Deymo486467e2017-12-19 19:04:07 +01006556 ssl_backends=
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006557 curl_h1_msg="enabled (internal)"
6558 curl_h2_msg="no (--with-nghttp2, --with-hyper)"
6559 curl_h3_msg="no (--with-ngtcp2, --with-quiche)"
6560
6561enable_altsvc="yes"
Elliott Hughesf344baa2021-12-07 09:12:34 -08006562hsts="yes"
Elliott Hughes82be86d2017-09-20 17:00:17 -07006563
6564INITIAL_LDFLAGS=$LDFLAGS
6565INITIAL_LIBS=$LIBS
6566
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006567OPT_SCHANNEL=no
6568
6569# Check whether --with-schannel was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08006570if test ${with_schannel+y}
6571then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006572 withval=$with_schannel; OPT_SCHANNEL=$withval
6573 TLSCHOICE="schannel"
6574fi
6575
6576
6577OPT_SECURETRANSPORT=no
6578
6579# Check whether --with-secure-transport was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08006580if test ${with_secure_transport+y}
6581then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006582 withval=$with_secure_transport; OPT_SECURETRANSPORT=$withval
6583 test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
Elliott Hughesf344baa2021-12-07 09:12:34 -08006584else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006585 }Secure-Transport"
6586
6587fi
6588
6589
6590OPT_AMISSL=no
6591
6592# Check whether --with-amissl was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08006593if test ${with_amissl+y}
6594then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006595 withval=$with_amissl; OPT_AMISSL=$withval
6596 test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
Elliott Hughesf344baa2021-12-07 09:12:34 -08006597else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006598 }AmiSSL"
6599fi
6600
6601
6602OPT_OPENSSL=no
6603ca="no"
6604
6605# Check whether --with-ssl was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08006606if test ${with_ssl+y}
6607then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006608 withval=$with_ssl; OPT_SSL=$withval
6609 OPT_OPENSSL=$withval
6610 test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
Elliott Hughesf344baa2021-12-07 09:12:34 -08006611else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006612 }OpenSSL"
6613fi
6614
6615
6616
6617# Check whether --with-openssl was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08006618if test ${with_openssl+y}
6619then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006620 withval=$with_openssl; OPT_OPENSSL=$withval
6621 test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
Elliott Hughesf344baa2021-12-07 09:12:34 -08006622else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006623 }OpenSSL"
6624fi
6625
6626
6627OPT_GNUTLS=no
6628
6629# Check whether --with-gnutls was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08006630if test ${with_gnutls+y}
6631then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006632 withval=$with_gnutls; OPT_GNUTLS=$withval
6633 test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
Elliott Hughesf344baa2021-12-07 09:12:34 -08006634else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006635 }GnuTLS"
6636fi
6637
6638
6639OPT_MBEDTLS=no
6640
6641# Check whether --with-mbedtls was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08006642if test ${with_mbedtls+y}
6643then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006644 withval=$with_mbedtls; OPT_MBEDTLS=$withval
6645 test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
Elliott Hughesf344baa2021-12-07 09:12:34 -08006646else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006647 }mbedTLS"
6648fi
6649
6650
6651OPT_WOLFSSL=no
6652
6653# Check whether --with-wolfssl was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08006654if test ${with_wolfssl+y}
6655then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006656 withval=$with_wolfssl; OPT_WOLFSSL=$withval
6657 test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
Elliott Hughesf344baa2021-12-07 09:12:34 -08006658else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006659 }wolfSSL"
6660fi
6661
6662
6663OPT_MESALINK=no
6664
6665# Check whether --with-mesalink was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08006666if test ${with_mesalink+y}
6667then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006668 withval=$with_mesalink; OPT_MESALINK=$withval
6669 test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
Elliott Hughesf344baa2021-12-07 09:12:34 -08006670else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006671 }MesaLink"
6672fi
6673
6674
6675OPT_BEARSSL=no
6676
6677# Check whether --with-bearssl was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08006678if test ${with_bearssl+y}
6679then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006680 withval=$with_bearssl; OPT_BEARSSL=$withval
6681 test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
Elliott Hughesf344baa2021-12-07 09:12:34 -08006682else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006683 }BearSSL"
6684fi
6685
6686
6687OPT_RUSTLS=no
6688
6689# Check whether --with-rustls was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08006690if test ${with_rustls+y}
6691then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006692 withval=$with_rustls; OPT_RUSTLS=$withval
6693 test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
Elliott Hughesf344baa2021-12-07 09:12:34 -08006694else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006695 }rustls"
6696fi
6697
6698
6699OPT_NSS=no
6700
6701# Check whether --with-nss was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08006702if test ${with_nss+y}
6703then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006704 withval=$with_nss; OPT_NSS=$withval
6705 test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
Elliott Hughesf344baa2021-12-07 09:12:34 -08006706else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006707 }NSS"
6708fi
6709
6710
6711if test -z "$TLSCHOICE"; then
6712 if test "x$OPT_SSL" != "xno"; then
6713 as_fn_error $? "select TLS backend(s) or disable TLS with --without-ssl.
6714
6715Select from these:
6716
6717 --with-amissl
6718 --with-bearssl
6719 --with-gnutls
6720 --with-mbedtls
6721 --with-mesalink
6722 --with-nss
6723 --with-openssl (also works for BoringSSL and libressl)
6724 --with-rustls
6725 --with-schannel
6726 --with-secure-transport
6727 --with-wolfssl
6728" "$LINENO" 5
6729 fi
6730fi
6731
6732
6733# Check whether --with-darwinssl was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08006734if test ${with_darwinssl+y}
6735then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -07006736 withval=$with_darwinssl; as_fn_error $? "--with-darwin-ssl no longer works!" "$LINENO" 5
6737fi
6738
6739
Elliott Hughes82be86d2017-09-20 17:00:17 -07006740
Elliott Hughes82be86d2017-09-20 17:00:17 -07006741
Elliott Hughesf344baa2021-12-07 09:12:34 -08006742
6743 # Make sure we can run config.sub.
6744$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
6745 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
6746
6747{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6748printf %s "checking build system type... " >&6; }
6749if test ${ac_cv_build+y}
6750then :
6751 printf %s "(cached) " >&6
6752else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07006753 ac_build_alias=$build_alias
6754test "x$ac_build_alias" = x &&
Elliott Hughesf344baa2021-12-07 09:12:34 -08006755 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
Elliott Hughes82be86d2017-09-20 17:00:17 -07006756test "x$ac_build_alias" = x &&
6757 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
Elliott Hughesf344baa2021-12-07 09:12:34 -08006758ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
6759 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
Elliott Hughes82be86d2017-09-20 17:00:17 -07006760
6761fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08006762{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6763printf "%s\n" "$ac_cv_build" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006764case $ac_cv_build in
6765*-*-*) ;;
6766*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6767esac
6768build=$ac_cv_build
6769ac_save_IFS=$IFS; IFS='-'
6770set x $ac_cv_build
6771shift
6772build_cpu=$1
6773build_vendor=$2
6774shift; shift
6775# Remember, the first character of IFS is used to create $*,
6776# except with old shells:
6777build_os=$*
6778IFS=$ac_save_IFS
6779case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6780
6781
Elliott Hughesf344baa2021-12-07 09:12:34 -08006782{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6783printf %s "checking host system type... " >&6; }
6784if test ${ac_cv_host+y}
6785then :
6786 printf %s "(cached) " >&6
6787else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07006788 if test "x$host_alias" = x; then
6789 ac_cv_host=$ac_cv_build
6790else
Elliott Hughesf344baa2021-12-07 09:12:34 -08006791 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
6792 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
Elliott Hughes82be86d2017-09-20 17:00:17 -07006793fi
6794
6795fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08006796{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6797printf "%s\n" "$ac_cv_host" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006798case $ac_cv_host in
6799*-*-*) ;;
6800*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6801esac
6802host=$ac_cv_host
6803ac_save_IFS=$IFS; IFS='-'
6804set x $ac_cv_host
6805shift
6806host_cpu=$1
6807host_vendor=$2
6808shift; shift
6809# Remember, the first character of IFS is used to create $*,
6810# except with old shells:
6811host_os=$*
6812IFS=$ac_save_IFS
6813case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6814
6815
6816
Elliott Hughesf344baa2021-12-07 09:12:34 -08006817printf "%s\n" "#define OS \"${host}\"" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -07006818
6819
Elliott Hughes72d948d2018-08-03 14:37:21 -07006820# Silence warning: ar: 'u' modifier ignored since 'D' is the default
6821AR_FLAGS=cr
6822
Elliott Hughes82be86d2017-09-20 17:00:17 -07006823
6824
6825
Elliott Hughesf344baa2021-12-07 09:12:34 -08006826{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6827printf %s "checking for grep that handles long lines and -e... " >&6; }
6828if test ${ac_cv_path_GREP+y}
6829then :
6830 printf %s "(cached) " >&6
6831else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07006832 if test -z "$GREP"; then
6833 ac_path_GREP_found=false
6834 # Loop through the user's path and test for each of PROGNAME-LIST
6835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6836for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6837do
6838 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08006839 case $as_dir in #(((
6840 '') as_dir=./ ;;
6841 */) ;;
6842 *) as_dir=$as_dir/ ;;
6843 esac
6844 for ac_prog in grep ggrep
6845 do
Elliott Hughes82be86d2017-09-20 17:00:17 -07006846 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08006847 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
Elliott Hughes82be86d2017-09-20 17:00:17 -07006848 as_fn_executable_p "$ac_path_GREP" || continue
6849# Check for GNU ac_path_GREP and select it if it is found.
6850 # Check for GNU $ac_path_GREP
6851case `"$ac_path_GREP" --version 2>&1` in
6852*GNU*)
6853 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6854*)
6855 ac_count=0
Elliott Hughesf344baa2021-12-07 09:12:34 -08006856 printf %s 0123456789 >"conftest.in"
Elliott Hughes82be86d2017-09-20 17:00:17 -07006857 while :
6858 do
6859 cat "conftest.in" "conftest.in" >"conftest.tmp"
6860 mv "conftest.tmp" "conftest.in"
6861 cp "conftest.in" "conftest.nl"
Elliott Hughesf344baa2021-12-07 09:12:34 -08006862 printf "%s\n" 'GREP' >> "conftest.nl"
Elliott Hughes82be86d2017-09-20 17:00:17 -07006863 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6864 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6865 as_fn_arith $ac_count + 1 && ac_count=$as_val
6866 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6867 # Best one so far, save it but keep looking for a better one
6868 ac_cv_path_GREP="$ac_path_GREP"
6869 ac_path_GREP_max=$ac_count
6870 fi
6871 # 10*(2^10) chars as input seems more than enough
6872 test $ac_count -gt 10 && break
6873 done
6874 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6875esac
6876
6877 $ac_path_GREP_found && break 3
6878 done
6879 done
6880 done
6881IFS=$as_save_IFS
6882 if test -z "$ac_cv_path_GREP"; then
6883 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6884 fi
6885else
6886 ac_cv_path_GREP=$GREP
6887fi
6888
6889fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08006890{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6891printf "%s\n" "$ac_cv_path_GREP" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006892 GREP="$ac_cv_path_GREP"
6893
6894
Elliott Hughesf344baa2021-12-07 09:12:34 -08006895{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6896printf %s "checking for egrep... " >&6; }
6897if test ${ac_cv_path_EGREP+y}
6898then :
6899 printf %s "(cached) " >&6
6900else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07006901 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6902 then ac_cv_path_EGREP="$GREP -E"
6903 else
6904 if test -z "$EGREP"; then
6905 ac_path_EGREP_found=false
6906 # Loop through the user's path and test for each of PROGNAME-LIST
6907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6908for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6909do
6910 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08006911 case $as_dir in #(((
6912 '') as_dir=./ ;;
6913 */) ;;
6914 *) as_dir=$as_dir/ ;;
6915 esac
6916 for ac_prog in egrep
6917 do
Elliott Hughes82be86d2017-09-20 17:00:17 -07006918 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08006919 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
Elliott Hughes82be86d2017-09-20 17:00:17 -07006920 as_fn_executable_p "$ac_path_EGREP" || continue
6921# Check for GNU ac_path_EGREP and select it if it is found.
6922 # Check for GNU $ac_path_EGREP
6923case `"$ac_path_EGREP" --version 2>&1` in
6924*GNU*)
6925 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6926*)
6927 ac_count=0
Elliott Hughesf344baa2021-12-07 09:12:34 -08006928 printf %s 0123456789 >"conftest.in"
Elliott Hughes82be86d2017-09-20 17:00:17 -07006929 while :
6930 do
6931 cat "conftest.in" "conftest.in" >"conftest.tmp"
6932 mv "conftest.tmp" "conftest.in"
6933 cp "conftest.in" "conftest.nl"
Elliott Hughesf344baa2021-12-07 09:12:34 -08006934 printf "%s\n" 'EGREP' >> "conftest.nl"
Elliott Hughes82be86d2017-09-20 17:00:17 -07006935 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6936 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6937 as_fn_arith $ac_count + 1 && ac_count=$as_val
6938 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6939 # Best one so far, save it but keep looking for a better one
6940 ac_cv_path_EGREP="$ac_path_EGREP"
6941 ac_path_EGREP_max=$ac_count
6942 fi
6943 # 10*(2^10) chars as input seems more than enough
6944 test $ac_count -gt 10 && break
6945 done
6946 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6947esac
6948
6949 $ac_path_EGREP_found && break 3
6950 done
6951 done
6952 done
6953IFS=$as_save_IFS
6954 if test -z "$ac_cv_path_EGREP"; then
6955 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6956 fi
6957else
6958 ac_cv_path_EGREP=$EGREP
6959fi
6960
6961 fi
6962fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08006963{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6964printf "%s\n" "$ac_cv_path_EGREP" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006965 EGREP="$ac_cv_path_EGREP"
6966
6967
Elliott Hughes82be86d2017-09-20 17:00:17 -07006968
6969
Elliott Hughesf344baa2021-12-07 09:12:34 -08006970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if OS is AIX (to define _ALL_SOURCE)" >&5
6971printf %s "checking if OS is AIX (to define _ALL_SOURCE)... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6973/* end confdefs.h. */
6974
6975#ifdef _AIX
6976 yes_this_is_aix
6977#endif
6978
6979_ACEOF
6980if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -08006981 $EGREP "yes_this_is_aix" >/dev/null 2>&1
6982then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07006983
Elliott Hughesf344baa2021-12-07 09:12:34 -08006984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6985printf "%s\n" "yes" >&6; }
6986 printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -07006987
6988
Elliott Hughesf344baa2021-12-07 09:12:34 -08006989else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07006990
Elliott Hughesf344baa2021-12-07 09:12:34 -08006991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6992printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07006993
6994fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08006995rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -07006996
6997
6998
6999
7000 #
Elliott Hughesf344baa2021-12-07 09:12:34 -08007001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if _THREAD_SAFE is already defined" >&5
7002printf %s "checking if _THREAD_SAFE is already defined... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7004/* end confdefs.h. */
7005
7006
7007
7008int main (void)
7009{
7010
7011#ifdef _THREAD_SAFE
7012 int dummy=1;
7013#else
7014 force compilation error
7015#endif
7016
7017 ;
7018 return 0;
7019}
7020
7021_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08007022if ac_fn_c_try_compile "$LINENO"
7023then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007024
Elliott Hughesf344baa2021-12-07 09:12:34 -08007025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7026printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007027 tmp_thread_safe_initially_defined="yes"
7028
Elliott Hughesf344baa2021-12-07 09:12:34 -08007029else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007030
Elliott Hughesf344baa2021-12-07 09:12:34 -08007031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7032printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007033 tmp_thread_safe_initially_defined="no"
7034
7035fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007036rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07007037 #
7038 if test "$tmp_thread_safe_initially_defined" = "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08007039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if _THREAD_SAFE is actually needed" >&5
7040printf %s "checking if _THREAD_SAFE is actually needed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007041
7042 case $host_os in
7043 aix[123].* | aix4.[012].*)
7044 tmp_need_thread_safe="no"
7045 ;;
7046 aix*)
7047 tmp_need_thread_safe="yes"
7048 ;;
7049 *)
7050 tmp_need_thread_safe="no"
7051 ;;
7052 esac
7053
7054 if test "$tmp_need_thread_safe" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08007055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7056printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007057 else
Elliott Hughesf344baa2021-12-07 09:12:34 -08007058 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7059printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007060 fi
7061 fi
7062 #
Elliott Hughesf344baa2021-12-07 09:12:34 -08007063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if _THREAD_SAFE is onwards defined" >&5
7064printf %s "checking if _THREAD_SAFE is onwards defined... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007065 if test "$tmp_thread_safe_initially_defined" = "yes" ||
7066 test "$tmp_need_thread_safe" = "yes"; then
7067
7068
Elliott Hughesf344baa2021-12-07 09:12:34 -08007069printf "%s\n" "#define NEED_THREAD_SAFE 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -07007070
7071cat >>confdefs.h <<_EOF
7072#ifndef _THREAD_SAFE
7073# define _THREAD_SAFE
7074#endif
7075_EOF
7076
Elliott Hughesf344baa2021-12-07 09:12:34 -08007077 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7078printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007079 else
Elliott Hughesf344baa2021-12-07 09:12:34 -08007080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7081printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007082 fi
7083 #
7084
7085
7086 #
Elliott Hughesf344baa2021-12-07 09:12:34 -08007087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if _REENTRANT is already defined" >&5
7088printf %s "checking if _REENTRANT is already defined... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7090/* end confdefs.h. */
7091
7092
7093
7094int main (void)
7095{
7096
7097#ifdef _REENTRANT
7098 int dummy=1;
7099#else
7100 force compilation error
7101#endif
7102
7103 ;
7104 return 0;
7105}
7106
7107_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08007108if ac_fn_c_try_compile "$LINENO"
7109then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007110
Elliott Hughesf344baa2021-12-07 09:12:34 -08007111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7112printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007113 tmp_reentrant_initially_defined="yes"
7114
Elliott Hughesf344baa2021-12-07 09:12:34 -08007115else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007116
Elliott Hughesf344baa2021-12-07 09:12:34 -08007117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7118printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007119 tmp_reentrant_initially_defined="no"
7120
7121fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007122rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07007123 #
7124 if test "$tmp_reentrant_initially_defined" = "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08007125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if _REENTRANT is actually needed" >&5
7126printf %s "checking if _REENTRANT is actually needed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007127
7128 case $host_os in
7129 solaris*)
7130 tmp_need_reentrant="yes"
7131 ;;
7132 *)
7133 tmp_need_reentrant="no"
7134 ;;
7135 esac
7136
7137 if test "$tmp_need_reentrant" = "no"; then
7138
7139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7140/* end confdefs.h. */
7141
7142
7143#include <errno.h>
7144
7145int main (void)
7146{
7147
7148 if(0 != errno)
7149 return 1;
7150
7151 ;
7152 return 0;
7153}
7154
7155_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08007156if ac_fn_c_try_compile "$LINENO"
7157then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007158
7159 tmp_errno="yes"
7160
Elliott Hughesf344baa2021-12-07 09:12:34 -08007161else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007162
7163 tmp_errno="no"
7164
7165fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007166rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07007167 if test "$tmp_errno" = "yes"; then
7168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7169/* end confdefs.h. */
7170
7171
7172#include <errno.h>
7173
7174int main (void)
7175{
7176
7177#ifdef errno
7178 int dummy=1;
7179#else
7180 force compilation error
7181#endif
7182
7183 ;
7184 return 0;
7185}
7186
7187_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08007188if ac_fn_c_try_compile "$LINENO"
7189then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007190
7191 tmp_errno="errno_macro_defined"
7192
Elliott Hughesf344baa2021-12-07 09:12:34 -08007193else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007194
7195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7196/* end confdefs.h. */
7197
7198
7199#define _REENTRANT
7200#include <errno.h>
7201
7202int main (void)
7203{
7204
7205#ifdef errno
7206 int dummy=1;
7207#else
7208 force compilation error
7209#endif
7210
7211 ;
7212 return 0;
7213}
7214
7215_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08007216if ac_fn_c_try_compile "$LINENO"
7217then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007218
7219 tmp_errno="errno_macro_needs_reentrant"
7220 tmp_need_reentrant="yes"
7221
7222fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007223rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07007224
7225fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007226rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07007227 fi
7228
7229 fi
7230 if test "$tmp_need_reentrant" = "no"; then
7231
7232 if test "$tmp_need_reentrant" = "no"; then
7233
7234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7235/* end confdefs.h. */
7236
7237
7238#define gmtime_r innocuous_gmtime_r
7239#ifdef __STDC__
7240# include <limits.h>
7241#else
7242# include <assert.h>
7243#endif
7244#undef gmtime_r
7245#ifdef __cplusplus
7246extern "C"
7247#endif
7248char gmtime_r ();
7249#if defined __stub_gmtime_r || defined __stub___gmtime_r
7250choke me
7251#endif
7252
7253int main (void)
7254{
7255return gmtime_r ();
7256 ;
7257 return 0;
7258}
7259
7260_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08007261if ac_fn_c_try_link "$LINENO"
7262then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007263
7264 tmp_gmtime_r="yes"
7265
Elliott Hughesf344baa2021-12-07 09:12:34 -08007266else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007267
7268 tmp_gmtime_r="no"
7269
7270fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007271rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -07007272 conftest$ac_exeext conftest.$ac_ext
7273 if test "$tmp_gmtime_r" = "yes"; then
7274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7275/* end confdefs.h. */
7276
7277#include <sys/types.h>
7278#include <time.h>
7279
7280_ACEOF
7281if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -08007282 $EGREP "gmtime_r" >/dev/null 2>&1
7283then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007284
7285 tmp_gmtime_r="proto_declared"
7286
Elliott Hughesf344baa2021-12-07 09:12:34 -08007287else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007288
7289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7290/* end confdefs.h. */
7291
7292#define _REENTRANT
7293#include <sys/types.h>
7294#include <time.h>
7295
7296_ACEOF
7297if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -08007298 $EGREP "gmtime_r" >/dev/null 2>&1
7299then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007300
7301 tmp_gmtime_r="proto_needs_reentrant"
7302 tmp_need_reentrant="yes"
7303
7304fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007305rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -07007306
7307
7308fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007309rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -07007310
7311 fi
7312
7313 fi
7314 if test "$tmp_need_reentrant" = "no"; then
7315
7316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7317/* end confdefs.h. */
7318
7319
7320#define localtime_r innocuous_localtime_r
7321#ifdef __STDC__
7322# include <limits.h>
7323#else
7324# include <assert.h>
7325#endif
7326#undef localtime_r
7327#ifdef __cplusplus
7328extern "C"
7329#endif
7330char localtime_r ();
7331#if defined __stub_localtime_r || defined __stub___localtime_r
7332choke me
7333#endif
7334
7335int main (void)
7336{
7337return localtime_r ();
7338 ;
7339 return 0;
7340}
7341
7342_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08007343if ac_fn_c_try_link "$LINENO"
7344then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007345
7346 tmp_localtime_r="yes"
7347
Elliott Hughesf344baa2021-12-07 09:12:34 -08007348else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007349
7350 tmp_localtime_r="no"
7351
7352fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007353rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -07007354 conftest$ac_exeext conftest.$ac_ext
7355 if test "$tmp_localtime_r" = "yes"; then
7356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7357/* end confdefs.h. */
7358
7359#include <sys/types.h>
7360#include <time.h>
7361
7362_ACEOF
7363if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -08007364 $EGREP "localtime_r" >/dev/null 2>&1
7365then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007366
7367 tmp_localtime_r="proto_declared"
7368
Elliott Hughesf344baa2021-12-07 09:12:34 -08007369else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007370
7371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7372/* end confdefs.h. */
7373
7374#define _REENTRANT
7375#include <sys/types.h>
7376#include <time.h>
7377
7378_ACEOF
7379if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -08007380 $EGREP "localtime_r" >/dev/null 2>&1
7381then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007382
7383 tmp_localtime_r="proto_needs_reentrant"
7384 tmp_need_reentrant="yes"
7385
7386fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007387rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -07007388
7389
7390fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007391rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -07007392
7393 fi
7394
7395 fi
7396 if test "$tmp_need_reentrant" = "no"; then
7397
7398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7399/* end confdefs.h. */
7400
7401
7402#define strerror_r innocuous_strerror_r
7403#ifdef __STDC__
7404# include <limits.h>
7405#else
7406# include <assert.h>
7407#endif
7408#undef strerror_r
7409#ifdef __cplusplus
7410extern "C"
7411#endif
7412char strerror_r ();
7413#if defined __stub_strerror_r || defined __stub___strerror_r
7414choke me
7415#endif
7416
7417int main (void)
7418{
7419return strerror_r ();
7420 ;
7421 return 0;
7422}
7423
7424_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08007425if ac_fn_c_try_link "$LINENO"
7426then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007427
7428 tmp_strerror_r="yes"
7429
Elliott Hughesf344baa2021-12-07 09:12:34 -08007430else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007431
7432 tmp_strerror_r="no"
7433
7434fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007435rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -07007436 conftest$ac_exeext conftest.$ac_ext
7437 if test "$tmp_strerror_r" = "yes"; then
7438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7439/* end confdefs.h. */
7440
7441#include <sys/types.h>
7442#include <string.h>
7443
7444_ACEOF
7445if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -08007446 $EGREP "strerror_r" >/dev/null 2>&1
7447then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007448
7449 tmp_strerror_r="proto_declared"
7450
Elliott Hughesf344baa2021-12-07 09:12:34 -08007451else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007452
7453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7454/* end confdefs.h. */
7455
7456#define _REENTRANT
7457#include <sys/types.h>
7458#include <string.h>
7459
7460_ACEOF
7461if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -08007462 $EGREP "strerror_r" >/dev/null 2>&1
7463then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007464
7465 tmp_strerror_r="proto_needs_reentrant"
7466 tmp_need_reentrant="yes"
7467
7468fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007469rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -07007470
7471
7472fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007473rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -07007474
7475 fi
7476
7477 fi
7478 if test "$tmp_need_reentrant" = "no"; then
7479
7480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7481/* end confdefs.h. */
7482
7483
7484#define strtok_r innocuous_strtok_r
7485#ifdef __STDC__
7486# include <limits.h>
7487#else
7488# include <assert.h>
7489#endif
7490#undef strtok_r
7491#ifdef __cplusplus
7492extern "C"
7493#endif
7494char strtok_r ();
7495#if defined __stub_strtok_r || defined __stub___strtok_r
7496choke me
7497#endif
7498
7499int main (void)
7500{
7501return strtok_r ();
7502 ;
7503 return 0;
7504}
7505
7506_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08007507if ac_fn_c_try_link "$LINENO"
7508then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007509
7510 tmp_strtok_r="yes"
7511
Elliott Hughesf344baa2021-12-07 09:12:34 -08007512else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007513
7514 tmp_strtok_r="no"
7515
7516fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007517rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -07007518 conftest$ac_exeext conftest.$ac_ext
7519 if test "$tmp_strtok_r" = "yes"; then
7520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7521/* end confdefs.h. */
7522
7523#include <sys/types.h>
7524#include <string.h>
7525
7526_ACEOF
7527if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -08007528 $EGREP "strtok_r" >/dev/null 2>&1
7529then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007530
7531 tmp_strtok_r="proto_declared"
7532
Elliott Hughesf344baa2021-12-07 09:12:34 -08007533else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007534
7535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7536/* end confdefs.h. */
7537
7538#define _REENTRANT
7539#include <sys/types.h>
7540#include <string.h>
7541
7542_ACEOF
7543if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -08007544 $EGREP "strtok_r" >/dev/null 2>&1
7545then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007546
7547 tmp_strtok_r="proto_needs_reentrant"
7548 tmp_need_reentrant="yes"
7549
7550fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007551rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -07007552
7553
7554fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007555rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -07007556
7557 fi
7558
7559 fi
7560 if test "$tmp_need_reentrant" = "no"; then
7561
7562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7563/* end confdefs.h. */
7564
7565
Elliott Hughes82be86d2017-09-20 17:00:17 -07007566#define gethostbyname_r innocuous_gethostbyname_r
7567#ifdef __STDC__
7568# include <limits.h>
7569#else
7570# include <assert.h>
7571#endif
7572#undef gethostbyname_r
7573#ifdef __cplusplus
7574extern "C"
7575#endif
7576char gethostbyname_r ();
7577#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
7578choke me
7579#endif
7580
7581int main (void)
7582{
7583return gethostbyname_r ();
7584 ;
7585 return 0;
7586}
7587
7588_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08007589if ac_fn_c_try_link "$LINENO"
7590then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007591
7592 tmp_gethostbyname_r="yes"
7593
Elliott Hughesf344baa2021-12-07 09:12:34 -08007594else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007595
7596 tmp_gethostbyname_r="no"
7597
7598fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007599rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -07007600 conftest$ac_exeext conftest.$ac_ext
7601 if test "$tmp_gethostbyname_r" = "yes"; then
7602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7603/* end confdefs.h. */
7604
7605#include <sys/types.h>
7606#include <netdb.h>
7607
7608_ACEOF
7609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -08007610 $EGREP "gethostbyname_r" >/dev/null 2>&1
7611then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007612
7613 tmp_gethostbyname_r="proto_declared"
7614
Elliott Hughesf344baa2021-12-07 09:12:34 -08007615else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007616
7617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7618/* end confdefs.h. */
7619
7620#define _REENTRANT
7621#include <sys/types.h>
7622#include <netdb.h>
7623
7624_ACEOF
7625if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -08007626 $EGREP "gethostbyname_r" >/dev/null 2>&1
7627then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007628
7629 tmp_gethostbyname_r="proto_needs_reentrant"
7630 tmp_need_reentrant="yes"
7631
7632fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007633rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -07007634
7635
7636fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007637rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -07007638
7639 fi
7640
7641 fi
7642 if test "$tmp_need_reentrant" = "no"; then
7643
7644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7645/* end confdefs.h. */
7646
7647
7648#define getprotobyname_r innocuous_getprotobyname_r
7649#ifdef __STDC__
7650# include <limits.h>
7651#else
7652# include <assert.h>
7653#endif
7654#undef getprotobyname_r
7655#ifdef __cplusplus
7656extern "C"
7657#endif
7658char getprotobyname_r ();
7659#if defined __stub_getprotobyname_r || defined __stub___getprotobyname_r
7660choke me
7661#endif
7662
7663int main (void)
7664{
7665return getprotobyname_r ();
7666 ;
7667 return 0;
7668}
7669
7670_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08007671if ac_fn_c_try_link "$LINENO"
7672then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007673
7674 tmp_getprotobyname_r="yes"
7675
Elliott Hughesf344baa2021-12-07 09:12:34 -08007676else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007677
7678 tmp_getprotobyname_r="no"
7679
7680fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007681rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -07007682 conftest$ac_exeext conftest.$ac_ext
7683 if test "$tmp_getprotobyname_r" = "yes"; then
7684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7685/* end confdefs.h. */
7686
7687#include <sys/types.h>
7688#include <netdb.h>
7689
7690_ACEOF
7691if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -08007692 $EGREP "getprotobyname_r" >/dev/null 2>&1
7693then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007694
7695 tmp_getprotobyname_r="proto_declared"
7696
Elliott Hughesf344baa2021-12-07 09:12:34 -08007697else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007698
7699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7700/* end confdefs.h. */
7701
7702#define _REENTRANT
7703#include <sys/types.h>
7704#include <netdb.h>
7705
7706_ACEOF
7707if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -08007708 $EGREP "getprotobyname_r" >/dev/null 2>&1
7709then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007710
7711 tmp_getprotobyname_r="proto_needs_reentrant"
7712 tmp_need_reentrant="yes"
7713
7714fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007715rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -07007716
7717
7718fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007719rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -07007720
7721 fi
7722
7723 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -07007724
7725 fi
7726 if test "$tmp_need_reentrant" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08007727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7728printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007729 else
Elliott Hughesf344baa2021-12-07 09:12:34 -08007730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7731printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007732 fi
7733 fi
7734 #
Elliott Hughesf344baa2021-12-07 09:12:34 -08007735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if _REENTRANT is onwards defined" >&5
7736printf %s "checking if _REENTRANT is onwards defined... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007737 if test "$tmp_reentrant_initially_defined" = "yes" ||
7738 test "$tmp_need_reentrant" = "yes"; then
7739
7740
Elliott Hughesf344baa2021-12-07 09:12:34 -08007741printf "%s\n" "#define NEED_REENTRANT 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -07007742
7743cat >>confdefs.h <<_EOF
7744#ifndef _REENTRANT
7745# define _REENTRANT
7746#endif
7747_EOF
7748
Elliott Hughesf344baa2021-12-07 09:12:34 -08007749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7750printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007751 else
Elliott Hughesf344baa2021-12-07 09:12:34 -08007752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7753printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007754 fi
7755 #
7756
7757
7758# Check whether --enable-largefile was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08007759if test ${enable_largefile+y}
7760then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007761 enableval=$enable_largefile;
7762fi
7763
7764if test "$enable_largefile" != no; then
7765
Elliott Hughesf344baa2021-12-07 09:12:34 -08007766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7767printf %s "checking for special C compiler options needed for large files... " >&6; }
7768if test ${ac_cv_sys_largefile_CC+y}
7769then :
7770 printf %s "(cached) " >&6
7771else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007772 ac_cv_sys_largefile_CC=no
7773 if test "$GCC" != yes; then
7774 ac_save_CC=$CC
7775 while :; do
7776 # IRIX 6.2 and later do not support large files by default,
7777 # so use the C compiler's -n32 option if that helps.
7778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7779/* end confdefs.h. */
7780#include <sys/types.h>
7781 /* Check that off_t can represent 2**63 - 1 correctly.
7782 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7783 since some C++ compilers masquerading as C compilers
7784 incorrectly reject 9223372036854775807. */
Elliott Hughesf344baa2021-12-07 09:12:34 -08007785#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Elliott Hughes82be86d2017-09-20 17:00:17 -07007786 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7787 && LARGE_OFF_T % 2147483647 == 1)
7788 ? 1 : -1];
7789int main (void)
7790{
7791
7792 ;
7793 return 0;
7794}
7795_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08007796 if ac_fn_c_try_compile "$LINENO"
7797then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007798 break
7799fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007800rm -f core conftest.err conftest.$ac_objext conftest.beam
Elliott Hughes82be86d2017-09-20 17:00:17 -07007801 CC="$CC -n32"
Elliott Hughesf344baa2021-12-07 09:12:34 -08007802 if ac_fn_c_try_compile "$LINENO"
7803then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007804 ac_cv_sys_largefile_CC=' -n32'; break
7805fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007806rm -f core conftest.err conftest.$ac_objext conftest.beam
Elliott Hughes82be86d2017-09-20 17:00:17 -07007807 break
7808 done
7809 CC=$ac_save_CC
7810 rm -f conftest.$ac_ext
7811 fi
7812fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007813{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7814printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007815 if test "$ac_cv_sys_largefile_CC" != no; then
7816 CC=$CC$ac_cv_sys_largefile_CC
7817 fi
7818
Elliott Hughesf344baa2021-12-07 09:12:34 -08007819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7820printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7821if test ${ac_cv_sys_file_offset_bits+y}
7822then :
7823 printf %s "(cached) " >&6
7824else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007825 while :; do
7826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7827/* end confdefs.h. */
7828#include <sys/types.h>
7829 /* Check that off_t can represent 2**63 - 1 correctly.
7830 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7831 since some C++ compilers masquerading as C compilers
7832 incorrectly reject 9223372036854775807. */
Elliott Hughesf344baa2021-12-07 09:12:34 -08007833#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Elliott Hughes82be86d2017-09-20 17:00:17 -07007834 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7835 && LARGE_OFF_T % 2147483647 == 1)
7836 ? 1 : -1];
7837int main (void)
7838{
7839
7840 ;
7841 return 0;
7842}
7843_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08007844if ac_fn_c_try_compile "$LINENO"
7845then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007846 ac_cv_sys_file_offset_bits=no; break
7847fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007848rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07007849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7850/* end confdefs.h. */
7851#define _FILE_OFFSET_BITS 64
7852#include <sys/types.h>
7853 /* Check that off_t can represent 2**63 - 1 correctly.
7854 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7855 since some C++ compilers masquerading as C compilers
7856 incorrectly reject 9223372036854775807. */
Elliott Hughesf344baa2021-12-07 09:12:34 -08007857#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Elliott Hughes82be86d2017-09-20 17:00:17 -07007858 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7859 && LARGE_OFF_T % 2147483647 == 1)
7860 ? 1 : -1];
7861int main (void)
7862{
7863
7864 ;
7865 return 0;
7866}
7867_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08007868if ac_fn_c_try_compile "$LINENO"
7869then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007870 ac_cv_sys_file_offset_bits=64; break
7871fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007872rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07007873 ac_cv_sys_file_offset_bits=unknown
7874 break
7875done
7876fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007877{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7878printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007879case $ac_cv_sys_file_offset_bits in #(
7880 no | unknown) ;;
7881 *)
Elliott Hughesf344baa2021-12-07 09:12:34 -08007882printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -07007883;;
7884esac
7885rm -rf conftest*
7886 if test $ac_cv_sys_file_offset_bits = unknown; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08007887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7888printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
7889if test ${ac_cv_sys_large_files+y}
7890then :
7891 printf %s "(cached) " >&6
7892else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07007893 while :; do
7894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7895/* end confdefs.h. */
7896#include <sys/types.h>
7897 /* Check that off_t can represent 2**63 - 1 correctly.
7898 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7899 since some C++ compilers masquerading as C compilers
7900 incorrectly reject 9223372036854775807. */
Elliott Hughesf344baa2021-12-07 09:12:34 -08007901#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Elliott Hughes82be86d2017-09-20 17:00:17 -07007902 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7903 && LARGE_OFF_T % 2147483647 == 1)
7904 ? 1 : -1];
7905int main (void)
7906{
7907
7908 ;
7909 return 0;
7910}
7911_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08007912if ac_fn_c_try_compile "$LINENO"
7913then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007914 ac_cv_sys_large_files=no; break
7915fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007916rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07007917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7918/* end confdefs.h. */
7919#define _LARGE_FILES 1
7920#include <sys/types.h>
7921 /* Check that off_t can represent 2**63 - 1 correctly.
7922 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7923 since some C++ compilers masquerading as C compilers
7924 incorrectly reject 9223372036854775807. */
Elliott Hughesf344baa2021-12-07 09:12:34 -08007925#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Elliott Hughes82be86d2017-09-20 17:00:17 -07007926 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7927 && LARGE_OFF_T % 2147483647 == 1)
7928 ? 1 : -1];
7929int main (void)
7930{
7931
7932 ;
7933 return 0;
7934}
7935_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08007936if ac_fn_c_try_compile "$LINENO"
7937then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07007938 ac_cv_sys_large_files=1; break
7939fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007940rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07007941 ac_cv_sys_large_files=unknown
7942 break
7943done
7944fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08007945{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7946printf "%s\n" "$ac_cv_sys_large_files" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07007947case $ac_cv_sys_large_files in #(
7948 no | unknown) ;;
7949 *)
Elliott Hughesf344baa2021-12-07 09:12:34 -08007950printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -07007951;;
7952esac
7953rm -rf conftest*
7954 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -07007955fi
7956
7957
7958case `pwd` in
7959 *\ * | *\ *)
Elliott Hughesf344baa2021-12-07 09:12:34 -08007960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
7961printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -07007962esac
7963
7964
7965
7966macro_version='2.4.6'
7967macro_revision='2.4.6'
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
Elliott Hughesf344baa2021-12-07 09:12:34 -08007981
Elliott Hughes82be86d2017-09-20 17:00:17 -07007982ltmain=$ac_aux_dir/ltmain.sh
7983
7984# Backslashify metacharacters that are still active within
7985# double-quoted strings.
7986sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
7987
7988# Same as above, but do not quote variable references.
7989double_quote_subst='s/\(["`\\]\)/\\\1/g'
7990
7991# Sed substitution to delay expansion of an escaped shell variable in a
7992# double_quote_subst'ed string.
7993delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7994
7995# Sed substitution to delay expansion of an escaped single quote.
7996delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7997
7998# Sed substitution to avoid accidental globbing in evaled expressions
7999no_glob_subst='s/\*/\\\*/g'
8000
8001ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
8002ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
8003ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
8004
Elliott Hughesf344baa2021-12-07 09:12:34 -08008005{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
8006printf %s "checking how to print strings... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008007# Test print first, because it will be a builtin if present.
8008if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
8009 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
8010 ECHO='print -r --'
8011elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
8012 ECHO='printf %s\n'
8013else
8014 # Use this function as a fallback that always works.
8015 func_fallback_echo ()
8016 {
8017 eval 'cat <<_LTECHO_EOF
8018$1
8019_LTECHO_EOF'
8020 }
8021 ECHO='func_fallback_echo'
8022fi
8023
8024# func_echo_all arg...
8025# Invoke $ECHO with all args, space-separated.
8026func_echo_all ()
8027{
8028 $ECHO ""
8029}
8030
8031case $ECHO in
Elliott Hughesf344baa2021-12-07 09:12:34 -08008032 printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
8033printf "%s\n" "printf" >&6; } ;;
8034 print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
8035printf "%s\n" "print -r" >&6; } ;;
8036 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
8037printf "%s\n" "cat" >&6; } ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -07008038esac
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
Elliott Hughesf344baa2021-12-07 09:12:34 -08008053{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
8054printf %s "checking for a sed that does not truncate output... " >&6; }
8055if test ${ac_cv_path_SED+y}
8056then :
8057 printf %s "(cached) " >&6
8058else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07008059 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
8060 for ac_i in 1 2 3 4 5 6 7; do
8061 ac_script="$ac_script$as_nl$ac_script"
8062 done
8063 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
8064 { ac_script=; unset ac_script;}
8065 if test -z "$SED"; then
8066 ac_path_SED_found=false
8067 # Loop through the user's path and test for each of PROGNAME-LIST
8068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8069for as_dir in $PATH
8070do
8071 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08008072 case $as_dir in #(((
8073 '') as_dir=./ ;;
8074 */) ;;
8075 *) as_dir=$as_dir/ ;;
8076 esac
8077 for ac_prog in sed gsed
8078 do
Elliott Hughes82be86d2017-09-20 17:00:17 -07008079 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08008080 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
Elliott Hughes82be86d2017-09-20 17:00:17 -07008081 as_fn_executable_p "$ac_path_SED" || continue
8082# Check for GNU ac_path_SED and select it if it is found.
8083 # Check for GNU $ac_path_SED
8084case `"$ac_path_SED" --version 2>&1` in
8085*GNU*)
8086 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
8087*)
8088 ac_count=0
Elliott Hughesf344baa2021-12-07 09:12:34 -08008089 printf %s 0123456789 >"conftest.in"
Elliott Hughes82be86d2017-09-20 17:00:17 -07008090 while :
8091 do
8092 cat "conftest.in" "conftest.in" >"conftest.tmp"
8093 mv "conftest.tmp" "conftest.in"
8094 cp "conftest.in" "conftest.nl"
Elliott Hughesf344baa2021-12-07 09:12:34 -08008095 printf "%s\n" '' >> "conftest.nl"
Elliott Hughes82be86d2017-09-20 17:00:17 -07008096 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
8097 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8098 as_fn_arith $ac_count + 1 && ac_count=$as_val
8099 if test $ac_count -gt ${ac_path_SED_max-0}; then
8100 # Best one so far, save it but keep looking for a better one
8101 ac_cv_path_SED="$ac_path_SED"
8102 ac_path_SED_max=$ac_count
8103 fi
8104 # 10*(2^10) chars as input seems more than enough
8105 test $ac_count -gt 10 && break
8106 done
8107 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8108esac
8109
8110 $ac_path_SED_found && break 3
8111 done
8112 done
8113 done
8114IFS=$as_save_IFS
8115 if test -z "$ac_cv_path_SED"; then
8116 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
8117 fi
8118else
8119 ac_cv_path_SED=$SED
8120fi
8121
8122fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08008123{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
8124printf "%s\n" "$ac_cv_path_SED" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008125 SED="$ac_cv_path_SED"
8126 rm -f conftest.sed
8127
8128test -z "$SED" && SED=sed
8129Xsed="$SED -e 1s/^X//"
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
Elliott Hughesf344baa2021-12-07 09:12:34 -08008141{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
8142printf %s "checking for fgrep... " >&6; }
8143if test ${ac_cv_path_FGREP+y}
8144then :
8145 printf %s "(cached) " >&6
8146else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07008147 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
8148 then ac_cv_path_FGREP="$GREP -F"
8149 else
8150 if test -z "$FGREP"; then
8151 ac_path_FGREP_found=false
8152 # Loop through the user's path and test for each of PROGNAME-LIST
8153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8154for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8155do
8156 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08008157 case $as_dir in #(((
8158 '') as_dir=./ ;;
8159 */) ;;
8160 *) as_dir=$as_dir/ ;;
8161 esac
8162 for ac_prog in fgrep
8163 do
Elliott Hughes82be86d2017-09-20 17:00:17 -07008164 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08008165 ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
Elliott Hughes82be86d2017-09-20 17:00:17 -07008166 as_fn_executable_p "$ac_path_FGREP" || continue
8167# Check for GNU ac_path_FGREP and select it if it is found.
8168 # Check for GNU $ac_path_FGREP
8169case `"$ac_path_FGREP" --version 2>&1` in
8170*GNU*)
8171 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
8172*)
8173 ac_count=0
Elliott Hughesf344baa2021-12-07 09:12:34 -08008174 printf %s 0123456789 >"conftest.in"
Elliott Hughes82be86d2017-09-20 17:00:17 -07008175 while :
8176 do
8177 cat "conftest.in" "conftest.in" >"conftest.tmp"
8178 mv "conftest.tmp" "conftest.in"
8179 cp "conftest.in" "conftest.nl"
Elliott Hughesf344baa2021-12-07 09:12:34 -08008180 printf "%s\n" 'FGREP' >> "conftest.nl"
Elliott Hughes82be86d2017-09-20 17:00:17 -07008181 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
8182 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8183 as_fn_arith $ac_count + 1 && ac_count=$as_val
8184 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
8185 # Best one so far, save it but keep looking for a better one
8186 ac_cv_path_FGREP="$ac_path_FGREP"
8187 ac_path_FGREP_max=$ac_count
8188 fi
8189 # 10*(2^10) chars as input seems more than enough
8190 test $ac_count -gt 10 && break
8191 done
8192 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8193esac
8194
8195 $ac_path_FGREP_found && break 3
8196 done
8197 done
8198 done
8199IFS=$as_save_IFS
8200 if test -z "$ac_cv_path_FGREP"; then
8201 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8202 fi
8203else
8204 ac_cv_path_FGREP=$FGREP
8205fi
8206
8207 fi
8208fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08008209{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
8210printf "%s\n" "$ac_cv_path_FGREP" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008211 FGREP="$ac_cv_path_FGREP"
8212
8213
8214test -z "$GREP" && GREP=grep
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234# Check whether --with-gnu-ld was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -08008235if test ${with_gnu_ld+y}
8236then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07008237 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -08008238else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07008239 with_gnu_ld=no
8240fi
8241
8242ac_prog=ld
8243if test yes = "$GCC"; then
8244 # Check if gcc -print-prog-name=ld gives a path.
Elliott Hughesf344baa2021-12-07 09:12:34 -08008245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8246printf %s "checking for ld used by $CC... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008247 case $host in
8248 *-*-mingw*)
8249 # gcc leaves a trailing carriage return, which upsets mingw
8250 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8251 *)
8252 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8253 esac
8254 case $ac_prog in
8255 # Accept absolute paths.
8256 [\\/]* | ?:[\\/]*)
8257 re_direlt='/[^/][^/]*/\.\./'
8258 # Canonicalize the pathname of ld
8259 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
8260 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
8261 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
8262 done
8263 test -z "$LD" && LD=$ac_prog
8264 ;;
8265 "")
8266 # If it fails, then pretend we aren't using GCC.
8267 ac_prog=ld
8268 ;;
8269 *)
8270 # If it is relative, then search for the first ld in PATH.
8271 with_gnu_ld=unknown
8272 ;;
8273 esac
8274elif test yes = "$with_gnu_ld"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08008275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8276printf %s "checking for GNU ld... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008277else
Elliott Hughesf344baa2021-12-07 09:12:34 -08008278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8279printf %s "checking for non-GNU ld... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008280fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08008281if test ${lt_cv_path_LD+y}
8282then :
8283 printf %s "(cached) " >&6
8284else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07008285 if test -z "$LD"; then
8286 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8287 for ac_dir in $PATH; do
8288 IFS=$lt_save_ifs
8289 test -z "$ac_dir" && ac_dir=.
8290 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8291 lt_cv_path_LD=$ac_dir/$ac_prog
8292 # Check to see if the program is GNU ld. I'd rather use --version,
8293 # but apparently some variants of GNU ld only accept -v.
8294 # Break only if it was the GNU/non-GNU ld that we prefer.
8295 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
8296 *GNU* | *'with BFD'*)
8297 test no != "$with_gnu_ld" && break
8298 ;;
8299 *)
8300 test yes != "$with_gnu_ld" && break
8301 ;;
8302 esac
8303 fi
8304 done
8305 IFS=$lt_save_ifs
8306else
8307 lt_cv_path_LD=$LD # Let the user override the test with a path.
8308fi
8309fi
8310
8311LD=$lt_cv_path_LD
8312if test -n "$LD"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08008313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8314printf "%s\n" "$LD" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008315else
Elliott Hughesf344baa2021-12-07 09:12:34 -08008316 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8317printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008318fi
8319test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
Elliott Hughesf344baa2021-12-07 09:12:34 -08008320{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8321printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
8322if test ${lt_cv_prog_gnu_ld+y}
8323then :
8324 printf %s "(cached) " >&6
8325else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07008326 # I'd rather use --version here, but apparently some GNU lds only accept -v.
8327case `$LD -v 2>&1 </dev/null` in
8328*GNU* | *'with BFD'*)
8329 lt_cv_prog_gnu_ld=yes
8330 ;;
8331*)
8332 lt_cv_prog_gnu_ld=no
8333 ;;
8334esac
8335fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08008336{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
8337printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008338with_gnu_ld=$lt_cv_prog_gnu_ld
8339
8340
8341
8342
8343
8344
8345
8346
8347
Elliott Hughesf344baa2021-12-07 09:12:34 -08008348{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
8349printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
8350if test ${lt_cv_path_NM+y}
8351then :
8352 printf %s "(cached) " >&6
8353else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07008354 if test -n "$NM"; then
8355 # Let the user override the test.
8356 lt_cv_path_NM=$NM
8357else
8358 lt_nm_to_check=${ac_tool_prefix}nm
8359 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
8360 lt_nm_to_check="$lt_nm_to_check nm"
8361 fi
8362 for lt_tmp_nm in $lt_nm_to_check; do
8363 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8364 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
8365 IFS=$lt_save_ifs
8366 test -z "$ac_dir" && ac_dir=.
8367 tmp_nm=$ac_dir/$lt_tmp_nm
8368 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
8369 # Check to see if the nm accepts a BSD-compat flag.
8370 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
8371 # nm: unknown option "B" ignored
8372 # Tru64's nm complains that /dev/null is an invalid object file
8373 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
8374 case $build_os in
8375 mingw*) lt_bad_file=conftest.nm/nofile ;;
8376 *) lt_bad_file=/dev/null ;;
8377 esac
8378 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
8379 *$lt_bad_file* | *'Invalid file or object type'*)
8380 lt_cv_path_NM="$tmp_nm -B"
8381 break 2
8382 ;;
8383 *)
8384 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
8385 */dev/null*)
8386 lt_cv_path_NM="$tmp_nm -p"
8387 break 2
8388 ;;
8389 *)
8390 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
8391 continue # so that we can try to find one that supports BSD flags
8392 ;;
8393 esac
8394 ;;
8395 esac
8396 fi
8397 done
8398 IFS=$lt_save_ifs
8399 done
8400 : ${lt_cv_path_NM=no}
8401fi
8402fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08008403{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
8404printf "%s\n" "$lt_cv_path_NM" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008405if test no != "$lt_cv_path_NM"; then
8406 NM=$lt_cv_path_NM
8407else
8408 # Didn't find any BSD compatible name lister, look for dumpbin.
8409 if test -n "$DUMPBIN"; then :
8410 # Let the user override the test.
8411 else
8412 if test -n "$ac_tool_prefix"; then
8413 for ac_prog in dumpbin "link -dump"
8414 do
8415 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8416set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08008417{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8418printf %s "checking for $ac_word... " >&6; }
8419if test ${ac_cv_prog_DUMPBIN+y}
8420then :
8421 printf %s "(cached) " >&6
8422else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07008423 if test -n "$DUMPBIN"; then
8424 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
8425else
8426as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8427for as_dir in $PATH
8428do
8429 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08008430 case $as_dir in #(((
8431 '') as_dir=./ ;;
8432 */) ;;
8433 *) as_dir=$as_dir/ ;;
8434 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07008435 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08008436 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07008437 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
Elliott Hughesf344baa2021-12-07 09:12:34 -08008438 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07008439 break 2
8440 fi
8441done
8442 done
8443IFS=$as_save_IFS
8444
8445fi
8446fi
8447DUMPBIN=$ac_cv_prog_DUMPBIN
8448if test -n "$DUMPBIN"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08008449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
8450printf "%s\n" "$DUMPBIN" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008451else
Elliott Hughesf344baa2021-12-07 09:12:34 -08008452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8453printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008454fi
8455
8456
8457 test -n "$DUMPBIN" && break
8458 done
8459fi
8460if test -z "$DUMPBIN"; then
8461 ac_ct_DUMPBIN=$DUMPBIN
8462 for ac_prog in dumpbin "link -dump"
8463do
8464 # Extract the first word of "$ac_prog", so it can be a program name with args.
8465set dummy $ac_prog; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08008466{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8467printf %s "checking for $ac_word... " >&6; }
8468if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
8469then :
8470 printf %s "(cached) " >&6
8471else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07008472 if test -n "$ac_ct_DUMPBIN"; then
8473 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
8474else
8475as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8476for as_dir in $PATH
8477do
8478 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08008479 case $as_dir in #(((
8480 '') as_dir=./ ;;
8481 */) ;;
8482 *) as_dir=$as_dir/ ;;
8483 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07008484 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08008485 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07008486 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
Elliott Hughesf344baa2021-12-07 09:12:34 -08008487 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07008488 break 2
8489 fi
8490done
8491 done
8492IFS=$as_save_IFS
8493
8494fi
8495fi
8496ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
8497if test -n "$ac_ct_DUMPBIN"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08008498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
8499printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008500else
Elliott Hughesf344baa2021-12-07 09:12:34 -08008501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8502printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008503fi
8504
8505
8506 test -n "$ac_ct_DUMPBIN" && break
8507done
8508
8509 if test "x$ac_ct_DUMPBIN" = x; then
8510 DUMPBIN=":"
8511 else
8512 case $cross_compiling:$ac_tool_warned in
8513yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -08008514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8515printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07008516ac_tool_warned=yes ;;
8517esac
8518 DUMPBIN=$ac_ct_DUMPBIN
8519 fi
8520fi
8521
8522 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
8523 *COFF*)
8524 DUMPBIN="$DUMPBIN -symbols -headers"
8525 ;;
8526 *)
8527 DUMPBIN=:
8528 ;;
8529 esac
8530 fi
8531
8532 if test : != "$DUMPBIN"; then
8533 NM=$DUMPBIN
8534 fi
8535fi
8536test -z "$NM" && NM=nm
8537
8538
8539
8540
8541
8542
Elliott Hughesf344baa2021-12-07 09:12:34 -08008543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
8544printf %s "checking the name lister ($NM) interface... " >&6; }
8545if test ${lt_cv_nm_interface+y}
8546then :
8547 printf %s "(cached) " >&6
8548else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07008549 lt_cv_nm_interface="BSD nm"
8550 echo "int some_variable = 0;" > conftest.$ac_ext
8551 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
8552 (eval "$ac_compile" 2>conftest.err)
8553 cat conftest.err >&5
8554 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
8555 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
8556 cat conftest.err >&5
8557 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
8558 cat conftest.out >&5
8559 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
8560 lt_cv_nm_interface="MS dumpbin"
8561 fi
8562 rm -f conftest*
8563fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08008564{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
8565printf "%s\n" "$lt_cv_nm_interface" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008566
Elliott Hughesf344baa2021-12-07 09:12:34 -08008567{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8568printf %s "checking whether ln -s works... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008569LN_S=$as_ln_s
8570if test "$LN_S" = "ln -s"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08008571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8572printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008573else
Elliott Hughesf344baa2021-12-07 09:12:34 -08008574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8575printf "%s\n" "no, using $LN_S" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008576fi
8577
8578# find the maximum length of command line arguments
Elliott Hughesf344baa2021-12-07 09:12:34 -08008579{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
8580printf %s "checking the maximum length of command line arguments... " >&6; }
8581if test ${lt_cv_sys_max_cmd_len+y}
8582then :
8583 printf %s "(cached) " >&6
8584else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07008585 i=0
8586 teststring=ABCD
8587
8588 case $build_os in
8589 msdosdjgpp*)
8590 # On DJGPP, this test can blow up pretty badly due to problems in libc
8591 # (any single argument exceeding 2000 bytes causes a buffer overrun
8592 # during glob expansion). Even if it were fixed, the result of this
8593 # check would be larger than it should be.
8594 lt_cv_sys_max_cmd_len=12288; # 12K is about right
8595 ;;
8596
8597 gnu*)
8598 # Under GNU Hurd, this test is not required because there is
8599 # no limit to the length of command line arguments.
8600 # Libtool will interpret -1 as no limit whatsoever
8601 lt_cv_sys_max_cmd_len=-1;
8602 ;;
8603
8604 cygwin* | mingw* | cegcc*)
8605 # On Win9x/ME, this test blows up -- it succeeds, but takes
8606 # about 5 minutes as the teststring grows exponentially.
8607 # Worse, since 9x/ME are not pre-emptively multitasking,
8608 # you end up with a "frozen" computer, even though with patience
8609 # the test eventually succeeds (with a max line length of 256k).
8610 # Instead, let's just punt: use the minimum linelength reported by
8611 # all of the supported platforms: 8192 (on NT/2K/XP).
8612 lt_cv_sys_max_cmd_len=8192;
8613 ;;
8614
8615 mint*)
8616 # On MiNT this can take a long time and run out of memory.
8617 lt_cv_sys_max_cmd_len=8192;
8618 ;;
8619
8620 amigaos*)
8621 # On AmigaOS with pdksh, this test takes hours, literally.
8622 # So we just punt and use a minimum line length of 8192.
8623 lt_cv_sys_max_cmd_len=8192;
8624 ;;
8625
8626 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
8627 # This has been around since 386BSD, at least. Likely further.
8628 if test -x /sbin/sysctl; then
8629 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
8630 elif test -x /usr/sbin/sysctl; then
8631 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
8632 else
8633 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
8634 fi
8635 # And add a safety zone
8636 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8637 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8638 ;;
8639
8640 interix*)
8641 # We know the value 262144 and hardcode it with a safety zone (like BSD)
8642 lt_cv_sys_max_cmd_len=196608
8643 ;;
8644
8645 os2*)
8646 # The test takes a long time on OS/2.
8647 lt_cv_sys_max_cmd_len=8192
8648 ;;
8649
8650 osf*)
8651 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
8652 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
8653 # nice to cause kernel panics so lets avoid the loop below.
8654 # First set a reasonable default.
8655 lt_cv_sys_max_cmd_len=16384
8656 #
8657 if test -x /sbin/sysconfig; then
8658 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
8659 *1*) lt_cv_sys_max_cmd_len=-1 ;;
8660 esac
8661 fi
8662 ;;
8663 sco3.2v5*)
8664 lt_cv_sys_max_cmd_len=102400
8665 ;;
8666 sysv5* | sco5v6* | sysv4.2uw2*)
8667 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
8668 if test -n "$kargmax"; then
8669 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
8670 else
8671 lt_cv_sys_max_cmd_len=32768
8672 fi
8673 ;;
8674 *)
8675 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
8676 if test -n "$lt_cv_sys_max_cmd_len" && \
8677 test undefined != "$lt_cv_sys_max_cmd_len"; then
8678 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8679 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8680 else
8681 # Make teststring a little bigger before we do anything with it.
8682 # a 1K string should be a reasonable start.
8683 for i in 1 2 3 4 5 6 7 8; do
8684 teststring=$teststring$teststring
8685 done
8686 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
8687 # If test is not a shell built-in, we'll probably end up computing a
8688 # maximum length that is only half of the actual maximum length, but
8689 # we can't tell.
8690 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
8691 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
8692 test 17 != "$i" # 1/2 MB should be enough
8693 do
8694 i=`expr $i + 1`
8695 teststring=$teststring$teststring
8696 done
8697 # Only check the string length outside the loop.
8698 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
8699 teststring=
8700 # Add a significant safety factor because C++ compilers can tack on
8701 # massive amounts of additional arguments before passing them to the
8702 # linker. It appears as though 1/2 is a usable value.
8703 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
8704 fi
8705 ;;
8706 esac
8707
8708fi
8709
8710if test -n "$lt_cv_sys_max_cmd_len"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08008711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
8712printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008713else
Elliott Hughesf344baa2021-12-07 09:12:34 -08008714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
8715printf "%s\n" "none" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008716fi
8717max_cmd_len=$lt_cv_sys_max_cmd_len
8718
8719
8720
8721
8722
8723
8724: ${CP="cp -f"}
8725: ${MV="mv -f"}
8726: ${RM="rm -f"}
8727
8728if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8729 lt_unset=unset
8730else
8731 lt_unset=false
8732fi
8733
8734
8735
8736
8737
8738# test EBCDIC or ASCII
8739case `echo X|tr X '\101'` in
8740 A) # ASCII based system
8741 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8742 lt_SP2NL='tr \040 \012'
8743 lt_NL2SP='tr \015\012 \040\040'
8744 ;;
8745 *) # EBCDIC based system
8746 lt_SP2NL='tr \100 \n'
8747 lt_NL2SP='tr \r\n \100\100'
8748 ;;
8749esac
8750
8751
8752
8753
8754
8755
8756
8757
8758
Elliott Hughesf344baa2021-12-07 09:12:34 -08008759{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
8760printf %s "checking how to convert $build file names to $host format... " >&6; }
8761if test ${lt_cv_to_host_file_cmd+y}
8762then :
8763 printf %s "(cached) " >&6
8764else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07008765 case $host in
8766 *-*-mingw* )
8767 case $build in
8768 *-*-mingw* ) # actually msys
8769 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8770 ;;
8771 *-*-cygwin* )
8772 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8773 ;;
8774 * ) # otherwise, assume *nix
8775 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8776 ;;
8777 esac
8778 ;;
8779 *-*-cygwin* )
8780 case $build in
8781 *-*-mingw* ) # actually msys
8782 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8783 ;;
8784 *-*-cygwin* )
8785 lt_cv_to_host_file_cmd=func_convert_file_noop
8786 ;;
8787 * ) # otherwise, assume *nix
8788 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8789 ;;
8790 esac
8791 ;;
8792 * ) # unhandled hosts (and "normal" native builds)
8793 lt_cv_to_host_file_cmd=func_convert_file_noop
8794 ;;
8795esac
8796
8797fi
8798
8799to_host_file_cmd=$lt_cv_to_host_file_cmd
Elliott Hughesf344baa2021-12-07 09:12:34 -08008800{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
8801printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008802
8803
8804
8805
8806
Elliott Hughesf344baa2021-12-07 09:12:34 -08008807{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
8808printf %s "checking how to convert $build file names to toolchain format... " >&6; }
8809if test ${lt_cv_to_tool_file_cmd+y}
8810then :
8811 printf %s "(cached) " >&6
8812else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07008813 #assume ordinary cross tools, or native build.
8814lt_cv_to_tool_file_cmd=func_convert_file_noop
8815case $host in
8816 *-*-mingw* )
8817 case $build in
8818 *-*-mingw* ) # actually msys
8819 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8820 ;;
8821 esac
8822 ;;
8823esac
8824
8825fi
8826
8827to_tool_file_cmd=$lt_cv_to_tool_file_cmd
Elliott Hughesf344baa2021-12-07 09:12:34 -08008828{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
8829printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008830
8831
8832
8833
8834
Elliott Hughesf344baa2021-12-07 09:12:34 -08008835{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
8836printf %s "checking for $LD option to reload object files... " >&6; }
8837if test ${lt_cv_ld_reload_flag+y}
8838then :
8839 printf %s "(cached) " >&6
8840else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07008841 lt_cv_ld_reload_flag='-r'
8842fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08008843{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
8844printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008845reload_flag=$lt_cv_ld_reload_flag
8846case $reload_flag in
8847"" | " "*) ;;
8848*) reload_flag=" $reload_flag" ;;
8849esac
8850reload_cmds='$LD$reload_flag -o $output$reload_objs'
8851case $host_os in
8852 cygwin* | mingw* | pw32* | cegcc*)
8853 if test yes != "$GCC"; then
8854 reload_cmds=false
8855 fi
8856 ;;
8857 darwin*)
8858 if test yes = "$GCC"; then
8859 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
8860 else
8861 reload_cmds='$LD$reload_flag -o $output$reload_objs'
8862 fi
8863 ;;
8864esac
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874if test -n "$ac_tool_prefix"; then
8875 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
8876set dummy ${ac_tool_prefix}objdump; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08008877{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8878printf %s "checking for $ac_word... " >&6; }
8879if test ${ac_cv_prog_OBJDUMP+y}
8880then :
8881 printf %s "(cached) " >&6
8882else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07008883 if test -n "$OBJDUMP"; then
8884 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
8885else
8886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8887for as_dir in $PATH
8888do
8889 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08008890 case $as_dir in #(((
8891 '') as_dir=./ ;;
8892 */) ;;
8893 *) as_dir=$as_dir/ ;;
8894 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07008895 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08008896 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07008897 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
Elliott Hughesf344baa2021-12-07 09:12:34 -08008898 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07008899 break 2
8900 fi
8901done
8902 done
8903IFS=$as_save_IFS
8904
8905fi
8906fi
8907OBJDUMP=$ac_cv_prog_OBJDUMP
8908if test -n "$OBJDUMP"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08008909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
8910printf "%s\n" "$OBJDUMP" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008911else
Elliott Hughesf344baa2021-12-07 09:12:34 -08008912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8913printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008914fi
8915
8916
8917fi
8918if test -z "$ac_cv_prog_OBJDUMP"; then
8919 ac_ct_OBJDUMP=$OBJDUMP
8920 # Extract the first word of "objdump", so it can be a program name with args.
8921set dummy objdump; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08008922{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8923printf %s "checking for $ac_word... " >&6; }
8924if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
8925then :
8926 printf %s "(cached) " >&6
8927else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07008928 if test -n "$ac_ct_OBJDUMP"; then
8929 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
8930else
8931as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8932for as_dir in $PATH
8933do
8934 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08008935 case $as_dir in #(((
8936 '') as_dir=./ ;;
8937 */) ;;
8938 *) as_dir=$as_dir/ ;;
8939 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07008940 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08008941 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07008942 ac_cv_prog_ac_ct_OBJDUMP="objdump"
Elliott Hughesf344baa2021-12-07 09:12:34 -08008943 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07008944 break 2
8945 fi
8946done
8947 done
8948IFS=$as_save_IFS
8949
8950fi
8951fi
8952ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
8953if test -n "$ac_ct_OBJDUMP"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08008954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
8955printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008956else
Elliott Hughesf344baa2021-12-07 09:12:34 -08008957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8958printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07008959fi
8960
8961 if test "x$ac_ct_OBJDUMP" = x; then
8962 OBJDUMP="false"
8963 else
8964 case $cross_compiling:$ac_tool_warned in
8965yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -08008966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8967printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07008968ac_tool_warned=yes ;;
8969esac
8970 OBJDUMP=$ac_ct_OBJDUMP
8971 fi
8972else
8973 OBJDUMP="$ac_cv_prog_OBJDUMP"
8974fi
8975
8976test -z "$OBJDUMP" && OBJDUMP=objdump
8977
8978
8979
8980
8981
8982
Elliott Hughesf344baa2021-12-07 09:12:34 -08008983{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
8984printf %s "checking how to recognize dependent libraries... " >&6; }
8985if test ${lt_cv_deplibs_check_method+y}
8986then :
8987 printf %s "(cached) " >&6
8988else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07008989 lt_cv_file_magic_cmd='$MAGIC_CMD'
8990lt_cv_file_magic_test_file=
8991lt_cv_deplibs_check_method='unknown'
8992# Need to set the preceding variable on all platforms that support
8993# interlibrary dependencies.
8994# 'none' -- dependencies not supported.
8995# 'unknown' -- same as none, but documents that we really don't know.
8996# 'pass_all' -- all dependencies passed with no checks.
8997# 'test_compile' -- check by making test program.
8998# 'file_magic [[regex]]' -- check by looking for files in library path
8999# that responds to the $file_magic_cmd with a given extended regex.
9000# If you have 'file' or equivalent on your system and you're not sure
9001# whether 'pass_all' will *always* work, you probably want this one.
9002
9003case $host_os in
9004aix[4-9]*)
9005 lt_cv_deplibs_check_method=pass_all
9006 ;;
9007
9008beos*)
9009 lt_cv_deplibs_check_method=pass_all
9010 ;;
9011
9012bsdi[45]*)
9013 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
9014 lt_cv_file_magic_cmd='/usr/bin/file -L'
9015 lt_cv_file_magic_test_file=/shlib/libc.so
9016 ;;
9017
9018cygwin*)
9019 # func_win32_libid is a shell function defined in ltmain.sh
9020 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
9021 lt_cv_file_magic_cmd='func_win32_libid'
9022 ;;
9023
9024mingw* | pw32*)
9025 # Base MSYS/MinGW do not provide the 'file' command needed by
9026 # func_win32_libid shell function, so use a weaker test based on 'objdump',
9027 # unless we find 'file', for example because we are cross-compiling.
9028 if ( file / ) >/dev/null 2>&1; then
9029 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
9030 lt_cv_file_magic_cmd='func_win32_libid'
9031 else
9032 # Keep this pattern in sync with the one in func_win32_libid.
9033 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
9034 lt_cv_file_magic_cmd='$OBJDUMP -f'
9035 fi
9036 ;;
9037
9038cegcc*)
9039 # use the weaker test based on 'objdump'. See mingw*.
9040 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
9041 lt_cv_file_magic_cmd='$OBJDUMP -f'
9042 ;;
9043
9044darwin* | rhapsody*)
9045 lt_cv_deplibs_check_method=pass_all
9046 ;;
9047
9048freebsd* | dragonfly*)
9049 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
9050 case $host_cpu in
9051 i*86 )
9052 # Not sure whether the presence of OpenBSD here was a mistake.
9053 # Let's accept both of them until this is cleared up.
9054 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
9055 lt_cv_file_magic_cmd=/usr/bin/file
9056 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
9057 ;;
9058 esac
9059 else
9060 lt_cv_deplibs_check_method=pass_all
9061 fi
9062 ;;
9063
9064haiku*)
9065 lt_cv_deplibs_check_method=pass_all
9066 ;;
9067
9068hpux10.20* | hpux11*)
9069 lt_cv_file_magic_cmd=/usr/bin/file
9070 case $host_cpu in
9071 ia64*)
9072 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
9073 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
9074 ;;
9075 hppa*64*)
9076 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
9077 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
9078 ;;
9079 *)
9080 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
9081 lt_cv_file_magic_test_file=/usr/lib/libc.sl
9082 ;;
9083 esac
9084 ;;
9085
9086interix[3-9]*)
9087 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
9088 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
9089 ;;
9090
9091irix5* | irix6* | nonstopux*)
9092 case $LD in
9093 *-32|*"-32 ") libmagic=32-bit;;
9094 *-n32|*"-n32 ") libmagic=N32;;
9095 *-64|*"-64 ") libmagic=64-bit;;
9096 *) libmagic=never-match;;
9097 esac
9098 lt_cv_deplibs_check_method=pass_all
9099 ;;
9100
9101# This must be glibc/ELF.
9102linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
9103 lt_cv_deplibs_check_method=pass_all
9104 ;;
9105
9106netbsd* | netbsdelf*-gnu)
9107 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
9108 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
9109 else
9110 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
9111 fi
9112 ;;
9113
9114newos6*)
9115 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
9116 lt_cv_file_magic_cmd=/usr/bin/file
9117 lt_cv_file_magic_test_file=/usr/lib/libnls.so
9118 ;;
9119
9120*nto* | *qnx*)
9121 lt_cv_deplibs_check_method=pass_all
9122 ;;
9123
9124openbsd* | bitrig*)
9125 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
9126 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
9127 else
9128 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
9129 fi
9130 ;;
9131
9132osf3* | osf4* | osf5*)
9133 lt_cv_deplibs_check_method=pass_all
9134 ;;
9135
9136rdos*)
9137 lt_cv_deplibs_check_method=pass_all
9138 ;;
9139
9140solaris*)
9141 lt_cv_deplibs_check_method=pass_all
9142 ;;
9143
9144sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
9145 lt_cv_deplibs_check_method=pass_all
9146 ;;
9147
9148sysv4 | sysv4.3*)
9149 case $host_vendor in
9150 motorola)
9151 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
9152 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
9153 ;;
9154 ncr)
9155 lt_cv_deplibs_check_method=pass_all
9156 ;;
9157 sequent)
9158 lt_cv_file_magic_cmd='/bin/file'
9159 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
9160 ;;
9161 sni)
9162 lt_cv_file_magic_cmd='/bin/file'
9163 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
9164 lt_cv_file_magic_test_file=/lib/libc.so
9165 ;;
9166 siemens)
9167 lt_cv_deplibs_check_method=pass_all
9168 ;;
9169 pc)
9170 lt_cv_deplibs_check_method=pass_all
9171 ;;
9172 esac
9173 ;;
9174
9175tpf*)
9176 lt_cv_deplibs_check_method=pass_all
9177 ;;
9178os2*)
9179 lt_cv_deplibs_check_method=pass_all
9180 ;;
9181esac
9182
9183fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08009184{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
9185printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009186
9187file_magic_glob=
9188want_nocaseglob=no
9189if test "$build" = "$host"; then
9190 case $host_os in
9191 mingw* | pw32*)
9192 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
9193 want_nocaseglob=yes
9194 else
9195 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
9196 fi
9197 ;;
9198 esac
9199fi
9200
9201file_magic_cmd=$lt_cv_file_magic_cmd
9202deplibs_check_method=$lt_cv_deplibs_check_method
9203test -z "$deplibs_check_method" && deplibs_check_method=unknown
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226if test -n "$ac_tool_prefix"; then
9227 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9228set dummy ${ac_tool_prefix}dlltool; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08009229{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9230printf %s "checking for $ac_word... " >&6; }
9231if test ${ac_cv_prog_DLLTOOL+y}
9232then :
9233 printf %s "(cached) " >&6
9234else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07009235 if test -n "$DLLTOOL"; then
9236 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9237else
9238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9239for as_dir in $PATH
9240do
9241 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08009242 case $as_dir in #(((
9243 '') as_dir=./ ;;
9244 */) ;;
9245 *) as_dir=$as_dir/ ;;
9246 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07009247 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08009248 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07009249 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
Elliott Hughesf344baa2021-12-07 09:12:34 -08009250 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07009251 break 2
9252 fi
9253done
9254 done
9255IFS=$as_save_IFS
9256
9257fi
9258fi
9259DLLTOOL=$ac_cv_prog_DLLTOOL
9260if test -n "$DLLTOOL"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08009261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9262printf "%s\n" "$DLLTOOL" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009263else
Elliott Hughesf344baa2021-12-07 09:12:34 -08009264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9265printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009266fi
9267
9268
9269fi
9270if test -z "$ac_cv_prog_DLLTOOL"; then
9271 ac_ct_DLLTOOL=$DLLTOOL
9272 # Extract the first word of "dlltool", so it can be a program name with args.
9273set dummy dlltool; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08009274{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9275printf %s "checking for $ac_word... " >&6; }
9276if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
9277then :
9278 printf %s "(cached) " >&6
9279else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07009280 if test -n "$ac_ct_DLLTOOL"; then
9281 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9282else
9283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9284for as_dir in $PATH
9285do
9286 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08009287 case $as_dir in #(((
9288 '') as_dir=./ ;;
9289 */) ;;
9290 *) as_dir=$as_dir/ ;;
9291 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07009292 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08009293 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07009294 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
Elliott Hughesf344baa2021-12-07 09:12:34 -08009295 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07009296 break 2
9297 fi
9298done
9299 done
9300IFS=$as_save_IFS
9301
9302fi
9303fi
9304ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9305if test -n "$ac_ct_DLLTOOL"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08009306 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9307printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009308else
Elliott Hughesf344baa2021-12-07 09:12:34 -08009309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9310printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009311fi
9312
9313 if test "x$ac_ct_DLLTOOL" = x; then
9314 DLLTOOL="false"
9315 else
9316 case $cross_compiling:$ac_tool_warned in
9317yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -08009318{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9319printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07009320ac_tool_warned=yes ;;
9321esac
9322 DLLTOOL=$ac_ct_DLLTOOL
9323 fi
9324else
9325 DLLTOOL="$ac_cv_prog_DLLTOOL"
9326fi
9327
9328test -z "$DLLTOOL" && DLLTOOL=dlltool
9329
9330
9331
9332
9333
9334
9335
Elliott Hughesf344baa2021-12-07 09:12:34 -08009336{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
9337printf %s "checking how to associate runtime and link libraries... " >&6; }
9338if test ${lt_cv_sharedlib_from_linklib_cmd+y}
9339then :
9340 printf %s "(cached) " >&6
9341else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07009342 lt_cv_sharedlib_from_linklib_cmd='unknown'
9343
9344case $host_os in
9345cygwin* | mingw* | pw32* | cegcc*)
9346 # two different shell functions defined in ltmain.sh;
9347 # decide which one to use based on capabilities of $DLLTOOL
9348 case `$DLLTOOL --help 2>&1` in
9349 *--identify-strict*)
9350 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
9351 ;;
9352 *)
9353 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
9354 ;;
9355 esac
9356 ;;
9357*)
9358 # fallback: assume linklib IS sharedlib
9359 lt_cv_sharedlib_from_linklib_cmd=$ECHO
9360 ;;
9361esac
9362
9363fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08009364{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
9365printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009366sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
9367test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
9368
9369
9370
9371
9372
9373
9374
9375if test -n "$ac_tool_prefix"; then
9376 for ac_prog in ar
9377 do
9378 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9379set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08009380{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9381printf %s "checking for $ac_word... " >&6; }
9382if test ${ac_cv_prog_AR+y}
9383then :
9384 printf %s "(cached) " >&6
9385else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07009386 if test -n "$AR"; then
9387 ac_cv_prog_AR="$AR" # Let the user override the test.
9388else
9389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9390for as_dir in $PATH
9391do
9392 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08009393 case $as_dir in #(((
9394 '') as_dir=./ ;;
9395 */) ;;
9396 *) as_dir=$as_dir/ ;;
9397 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07009398 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08009399 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07009400 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Elliott Hughesf344baa2021-12-07 09:12:34 -08009401 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07009402 break 2
9403 fi
9404done
9405 done
9406IFS=$as_save_IFS
9407
9408fi
9409fi
9410AR=$ac_cv_prog_AR
9411if test -n "$AR"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08009412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9413printf "%s\n" "$AR" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009414else
Elliott Hughesf344baa2021-12-07 09:12:34 -08009415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9416printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009417fi
9418
9419
9420 test -n "$AR" && break
9421 done
9422fi
9423if test -z "$AR"; then
9424 ac_ct_AR=$AR
9425 for ac_prog in ar
9426do
9427 # Extract the first word of "$ac_prog", so it can be a program name with args.
9428set dummy $ac_prog; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08009429{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9430printf %s "checking for $ac_word... " >&6; }
9431if test ${ac_cv_prog_ac_ct_AR+y}
9432then :
9433 printf %s "(cached) " >&6
9434else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07009435 if test -n "$ac_ct_AR"; then
9436 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9437else
9438as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9439for as_dir in $PATH
9440do
9441 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08009442 case $as_dir in #(((
9443 '') as_dir=./ ;;
9444 */) ;;
9445 *) as_dir=$as_dir/ ;;
9446 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07009447 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08009448 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07009449 ac_cv_prog_ac_ct_AR="$ac_prog"
Elliott Hughesf344baa2021-12-07 09:12:34 -08009450 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07009451 break 2
9452 fi
9453done
9454 done
9455IFS=$as_save_IFS
9456
9457fi
9458fi
9459ac_ct_AR=$ac_cv_prog_ac_ct_AR
9460if test -n "$ac_ct_AR"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08009461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9462printf "%s\n" "$ac_ct_AR" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009463else
Elliott Hughesf344baa2021-12-07 09:12:34 -08009464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9465printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009466fi
9467
9468
9469 test -n "$ac_ct_AR" && break
9470done
9471
9472 if test "x$ac_ct_AR" = x; then
9473 AR="false"
9474 else
9475 case $cross_compiling:$ac_tool_warned in
9476yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -08009477{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9478printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07009479ac_tool_warned=yes ;;
9480esac
9481 AR=$ac_ct_AR
9482 fi
9483fi
9484
9485: ${AR=ar}
Haibo Huangb51266f2020-03-04 02:22:48 -08009486: ${AR_FLAGS=cr}
Elliott Hughes82be86d2017-09-20 17:00:17 -07009487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
Elliott Hughesf344baa2021-12-07 09:12:34 -08009498{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
9499printf %s "checking for archiver @FILE support... " >&6; }
9500if test ${lt_cv_ar_at_file+y}
9501then :
9502 printf %s "(cached) " >&6
9503else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07009504 lt_cv_ar_at_file=no
9505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9506/* end confdefs.h. */
9507
9508int main (void)
9509{
9510
9511 ;
9512 return 0;
9513}
9514_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -08009515if ac_fn_c_try_compile "$LINENO"
9516then :
Elliott Hughes82be86d2017-09-20 17:00:17 -07009517 echo conftest.$ac_objext > conftest.lst
9518 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
9519 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
9520 (eval $lt_ar_try) 2>&5
9521 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -08009522 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07009523 test $ac_status = 0; }
9524 if test 0 -eq "$ac_status"; then
9525 # Ensure the archiver fails upon bogus file names.
9526 rm -f conftest.$ac_objext libconftest.a
9527 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
9528 (eval $lt_ar_try) 2>&5
9529 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -08009530 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07009531 test $ac_status = 0; }
9532 if test 0 -ne "$ac_status"; then
9533 lt_cv_ar_at_file=@
9534 fi
9535 fi
9536 rm -f conftest.* libconftest.a
9537
9538fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08009539rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -07009540
9541fi
Elliott Hughesf344baa2021-12-07 09:12:34 -08009542{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
9543printf "%s\n" "$lt_cv_ar_at_file" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009544
9545if test no = "$lt_cv_ar_at_file"; then
9546 archiver_list_spec=
9547else
9548 archiver_list_spec=$lt_cv_ar_at_file
9549fi
9550
9551
9552
9553
9554
9555
9556
9557if test -n "$ac_tool_prefix"; then
9558 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9559set dummy ${ac_tool_prefix}strip; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08009560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9561printf %s "checking for $ac_word... " >&6; }
9562if test ${ac_cv_prog_STRIP+y}
9563then :
9564 printf %s "(cached) " >&6
9565else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07009566 if test -n "$STRIP"; then
9567 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9568else
9569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9570for as_dir in $PATH
9571do
9572 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08009573 case $as_dir in #(((
9574 '') as_dir=./ ;;
9575 */) ;;
9576 *) as_dir=$as_dir/ ;;
9577 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07009578 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08009579 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07009580 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
Elliott Hughesf344baa2021-12-07 09:12:34 -08009581 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07009582 break 2
9583 fi
9584done
9585 done
9586IFS=$as_save_IFS
9587
9588fi
9589fi
9590STRIP=$ac_cv_prog_STRIP
9591if test -n "$STRIP"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08009592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9593printf "%s\n" "$STRIP" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009594else
Elliott Hughesf344baa2021-12-07 09:12:34 -08009595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9596printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009597fi
9598
9599
9600fi
9601if test -z "$ac_cv_prog_STRIP"; then
9602 ac_ct_STRIP=$STRIP
9603 # Extract the first word of "strip", so it can be a program name with args.
9604set dummy strip; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08009605{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9606printf %s "checking for $ac_word... " >&6; }
9607if test ${ac_cv_prog_ac_ct_STRIP+y}
9608then :
9609 printf %s "(cached) " >&6
9610else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07009611 if test -n "$ac_ct_STRIP"; then
9612 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9613else
9614as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9615for as_dir in $PATH
9616do
9617 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08009618 case $as_dir in #(((
9619 '') as_dir=./ ;;
9620 */) ;;
9621 *) as_dir=$as_dir/ ;;
9622 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07009623 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08009624 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07009625 ac_cv_prog_ac_ct_STRIP="strip"
Elliott Hughesf344baa2021-12-07 09:12:34 -08009626 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07009627 break 2
9628 fi
9629done
9630 done
9631IFS=$as_save_IFS
9632
9633fi
9634fi
9635ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9636if test -n "$ac_ct_STRIP"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08009637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9638printf "%s\n" "$ac_ct_STRIP" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009639else
Elliott Hughesf344baa2021-12-07 09:12:34 -08009640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9641printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009642fi
9643
9644 if test "x$ac_ct_STRIP" = x; then
9645 STRIP=":"
9646 else
9647 case $cross_compiling:$ac_tool_warned in
9648yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -08009649{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9650printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07009651ac_tool_warned=yes ;;
9652esac
9653 STRIP=$ac_ct_STRIP
9654 fi
9655else
9656 STRIP="$ac_cv_prog_STRIP"
9657fi
9658
9659test -z "$STRIP" && STRIP=:
9660
9661
9662
9663
9664
9665
9666if test -n "$ac_tool_prefix"; then
9667 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9668set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08009669{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9670printf %s "checking for $ac_word... " >&6; }
9671if test ${ac_cv_prog_RANLIB+y}
9672then :
9673 printf %s "(cached) " >&6
9674else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07009675 if test -n "$RANLIB"; then
9676 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9677else
9678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9679for as_dir in $PATH
9680do
9681 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08009682 case $as_dir in #(((
9683 '') as_dir=./ ;;
9684 */) ;;
9685 *) as_dir=$as_dir/ ;;
9686 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07009687 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08009688 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07009689 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Elliott Hughesf344baa2021-12-07 09:12:34 -08009690 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07009691 break 2
9692 fi
9693done
9694 done
9695IFS=$as_save_IFS
9696
9697fi
9698fi
9699RANLIB=$ac_cv_prog_RANLIB
9700if test -n "$RANLIB"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08009701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9702printf "%s\n" "$RANLIB" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009703else
Elliott Hughesf344baa2021-12-07 09:12:34 -08009704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9705printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009706fi
9707
9708
9709fi
9710if test -z "$ac_cv_prog_RANLIB"; then
9711 ac_ct_RANLIB=$RANLIB
9712 # Extract the first word of "ranlib", so it can be a program name with args.
9713set dummy ranlib; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -08009714{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9715printf %s "checking for $ac_word... " >&6; }
9716if test ${ac_cv_prog_ac_ct_RANLIB+y}
9717then :
9718 printf %s "(cached) " >&6
9719else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07009720 if test -n "$ac_ct_RANLIB"; then
9721 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9722else
9723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9724for as_dir in $PATH
9725do
9726 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -08009727 case $as_dir in #(((
9728 '') as_dir=./ ;;
9729 */) ;;
9730 *) as_dir=$as_dir/ ;;
9731 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -07009732 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -08009733 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -07009734 ac_cv_prog_ac_ct_RANLIB="ranlib"
Elliott Hughesf344baa2021-12-07 09:12:34 -08009735 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -07009736 break 2
9737 fi
9738done
9739 done
9740IFS=$as_save_IFS
9741
9742fi
9743fi
9744ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9745if test -n "$ac_ct_RANLIB"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -08009746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9747printf "%s\n" "$ac_ct_RANLIB" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009748else
Elliott Hughesf344baa2021-12-07 09:12:34 -08009749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9750printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -07009751fi
9752
9753 if test "x$ac_ct_RANLIB" = x; then
9754 RANLIB=":"
9755 else
9756 case $cross_compiling:$ac_tool_warned in
9757yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -08009758{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9759printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -07009760ac_tool_warned=yes ;;
9761esac
9762 RANLIB=$ac_ct_RANLIB
9763 fi
9764else
9765 RANLIB="$ac_cv_prog_RANLIB"
9766fi
9767
9768test -z "$RANLIB" && RANLIB=:
9769
9770
9771
9772
9773
9774
9775# Determine commands to create old-style static archives.
9776old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
9777old_postinstall_cmds='chmod 644 $oldlib'
9778old_postuninstall_cmds=
9779
9780if test -n "$RANLIB"; then
9781 case $host_os in
9782 bitrig* | openbsd*)
9783 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
9784 ;;
9785 *)
9786 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
9787 ;;
9788 esac
9789 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
9790fi
9791
9792case $host_os in
9793 darwin*)
9794 lock_old_archive_extraction=yes ;;
9795 *)
9796 lock_old_archive_extraction=no ;;
9797esac
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837# If no C compiler was specified, use CC.
9838LTCC=${LTCC-"$CC"}
9839
9840# If no C compiler flags were specified, use CFLAGS.
9841LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9842
9843# Allow CC to be a program name with arguments.
9844compiler=$CC
9845
9846
9847# Check for command to grab the raw symbol name followed by C symbol from nm.
Elliott Hughesf344baa2021-12-07 09:12:34 -08009848{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
9849printf %s "checking command to parse $NM output from $compiler object... " >&6; }
9850if test ${lt_cv_sys_global_symbol_pipe+y}
9851then :
9852 printf %s "(cached) " >&6
9853else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -07009854
9855# These are sane defaults that work on at least a few old systems.
9856# [They come from Ultrix. What could be older than Ultrix?!! ;)]
9857
9858# Character class describing NM global symbol codes.
9859symcode='[BCDEGRST]'
9860
9861# Regexp to match symbols that can be accessed directly from C.
9862sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
9863
9864# Define system-specific variables.
9865case $host_os in
9866aix*)
9867 symcode='[BCDT]'
9868 ;;
9869cygwin* | mingw* | pw32* | cegcc*)
9870 symcode='[ABCDGISTW]'
9871 ;;
9872hpux*)
9873 if test ia64 = "$host_cpu"; then
9874 symcode='[ABCDEGRST]'
9875 fi
9876 ;;
9877irix* | nonstopux*)
9878 symcode='[BCDEGRST]'
9879 ;;
9880osf*)
9881 symcode='[BCDEGQRST]'
9882 ;;
9883solaris*)
9884 symcode='[BDRT]'
9885 ;;
9886sco3.2v5*)
9887 symcode='[DT]'
9888 ;;
9889sysv4.2uw2*)
9890 symcode='[DT]'
9891 ;;
9892sysv5* | sco5v6* | unixware* | OpenUNIX*)
9893 symcode='[ABDT]'
9894 ;;
9895sysv4)
9896 symcode='[DFNSTU]'
9897 ;;
9898esac
9899
9900# If we're using GNU nm, then use its standard symbol codes.
9901case `$NM -V 2>&1` in
9902*GNU* | *'with BFD'*)
9903 symcode='[ABCDGIRSTW]' ;;
9904esac
9905
9906if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9907 # Gets list of data symbols to import.
9908 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
9909 # Adjust the below global symbol transforms to fixup imported variables.
9910 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
9911 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
9912 lt_c_name_lib_hook="\
9913 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
9914 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
9915else
9916 # Disable hooks by default.
9917 lt_cv_sys_global_symbol_to_import=
9918 lt_cdecl_hook=
9919 lt_c_name_hook=
9920 lt_c_name_lib_hook=
9921fi
9922
9923# Transform an extracted symbol line into a proper C declaration.
9924# Some systems (esp. on ia64) link data and code symbols differently,
9925# so use this general approach.
9926lt_cv_sys_global_symbol_to_cdecl="sed -n"\
9927$lt_cdecl_hook\
9928" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
9929" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
9930
9931# Transform an extracted symbol line into symbol name and symbol address
9932lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
9933$lt_c_name_hook\
9934" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
9935" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
9936
9937# Transform an extracted symbol line into symbol name with lib prefix and
9938# symbol address.
9939lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
9940$lt_c_name_lib_hook\
9941" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
9942" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
9943" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
9944
9945# Handle CRLF in mingw tool chain
9946opt_cr=
9947case $build_os in
9948mingw*)
9949 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
9950 ;;
9951esac
9952
9953# Try without a prefix underscore, then with it.
9954for ac_symprfx in "" "_"; do
9955
9956 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
9957 symxfrm="\\1 $ac_symprfx\\2 \\2"
9958
9959 # Write the raw and C identifiers.
9960 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9961 # Fake it for dumpbin and say T for any non-static function,
9962 # D for any global variable and I for any imported variable.
9963 # Also find C++ and __fastcall symbols from MSVC++,
9964 # which start with @ or ?.
9965 lt_cv_sys_global_symbol_pipe="$AWK '"\
9966" {last_section=section; section=\$ 3};"\
9967" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
9968" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
9969" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
9970" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
9971" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
9972" \$ 0!~/External *\|/{next};"\
9973" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
9974" {if(hide[section]) next};"\
9975" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
9976" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
9977" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
9978" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
9979" ' prfx=^$ac_symprfx"
9980 else
9981 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
9982 fi
9983 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
9984
9985 # Check to see that the pipe works correctly.
9986 pipe_works=no
9987
9988 rm -f conftest*
9989 cat > conftest.$ac_ext <<_LT_EOF
9990#ifdef __cplusplus
9991extern "C" {
9992#endif
9993char nm_test_var;
9994void nm_test_func(void);
9995void nm_test_func(void){}
9996#ifdef __cplusplus
9997}
9998#endif
9999int main(){nm_test_var='a';nm_test_func();return(0);}
10000_LT_EOF
10001
10002 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10003 (eval $ac_compile) 2>&5
10004 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -080010005 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070010006 test $ac_status = 0; }; then
10007 # Now try to grab the symbols.
10008 nlist=conftest.nm
Haibo Huang001784b2019-07-19 05:27:28 -070010009 $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5
10010 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070010011 # Try sorting and uniquifying the output.
10012 if sort "$nlist" | uniq > "$nlist"T; then
10013 mv -f "$nlist"T "$nlist"
10014 else
10015 rm -f "$nlist"T
10016 fi
10017
10018 # Make sure that we snagged all the symbols we need.
10019 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
10020 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
10021 cat <<_LT_EOF > conftest.$ac_ext
10022/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
10023#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
10024/* DATA imports from DLLs on WIN32 can't be const, because runtime
10025 relocations are performed -- see ld's documentation on pseudo-relocs. */
10026# define LT_DLSYM_CONST
10027#elif defined __osf__
10028/* This system does not cope well with relocations in const data. */
10029# define LT_DLSYM_CONST
10030#else
10031# define LT_DLSYM_CONST const
10032#endif
10033
10034#ifdef __cplusplus
10035extern "C" {
10036#endif
10037
10038_LT_EOF
10039 # Now generate the symbol file.
10040 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
10041
10042 cat <<_LT_EOF >> conftest.$ac_ext
10043
10044/* The mapping between symbol names and symbols. */
10045LT_DLSYM_CONST struct {
10046 const char *name;
10047 void *address;
10048}
10049lt__PROGRAM__LTX_preloaded_symbols[] =
10050{
10051 { "@PROGRAM@", (void *) 0 },
10052_LT_EOF
10053 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
10054 cat <<\_LT_EOF >> conftest.$ac_ext
10055 {0, (void *) 0}
10056};
10057
10058/* This works around a problem in FreeBSD linker */
10059#ifdef FREEBSD_WORKAROUND
10060static const void *lt_preloaded_setup() {
10061 return lt__PROGRAM__LTX_preloaded_symbols;
10062}
10063#endif
10064
10065#ifdef __cplusplus
10066}
10067#endif
10068_LT_EOF
10069 # Now try linking the two files.
Haibo Huangb5a52b92020-10-28 22:18:23 -070010070 mv conftest.$ac_objext conftstm.$ac_objext
Elliott Hughes82be86d2017-09-20 17:00:17 -070010071 lt_globsym_save_LIBS=$LIBS
10072 lt_globsym_save_CFLAGS=$CFLAGS
10073 LIBS=conftstm.$ac_objext
10074 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
10075 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10076 (eval $ac_link) 2>&5
10077 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -080010078 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070010079 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10080 pipe_works=yes
10081 fi
10082 LIBS=$lt_globsym_save_LIBS
10083 CFLAGS=$lt_globsym_save_CFLAGS
10084 else
10085 echo "cannot find nm_test_func in $nlist" >&5
10086 fi
10087 else
10088 echo "cannot find nm_test_var in $nlist" >&5
10089 fi
10090 else
10091 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
10092 fi
10093 else
10094 echo "$progname: failed program was:" >&5
10095 cat conftest.$ac_ext >&5
10096 fi
10097 rm -rf conftest* conftst*
10098
10099 # Do not use the global_symbol_pipe unless it works.
10100 if test yes = "$pipe_works"; then
10101 break
10102 else
10103 lt_cv_sys_global_symbol_pipe=
10104 fi
10105done
10106
10107fi
10108
10109if test -z "$lt_cv_sys_global_symbol_pipe"; then
10110 lt_cv_sys_global_symbol_to_cdecl=
10111fi
10112if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080010113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
10114printf "%s\n" "failed" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010115else
Elliott Hughesf344baa2021-12-07 09:12:34 -080010116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
10117printf "%s\n" "ok" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010118fi
10119
10120# Response file support.
10121if test "$lt_cv_nm_interface" = "MS dumpbin"; then
10122 nm_file_list_spec='@'
10123elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
10124 nm_file_list_spec='@'
10125fi
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
Elliott Hughesf344baa2021-12-07 09:12:34 -080010163{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
10164printf %s "checking for sysroot... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010165
10166# Check whether --with-sysroot was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080010167if test ${with_sysroot+y}
10168then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070010169 withval=$with_sysroot;
Elliott Hughesf344baa2021-12-07 09:12:34 -080010170else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070010171 with_sysroot=no
10172fi
10173
10174
10175lt_sysroot=
10176case $with_sysroot in #(
10177 yes)
10178 if test yes = "$GCC"; then
10179 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
10180 fi
10181 ;; #(
10182 /*)
10183 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
10184 ;; #(
10185 no|'')
10186 ;; #(
10187 *)
Elliott Hughesf344baa2021-12-07 09:12:34 -080010188 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
10189printf "%s\n" "$with_sysroot" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010190 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
10191 ;;
10192esac
10193
Elliott Hughesf344baa2021-12-07 09:12:34 -080010194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
10195printf "%s\n" "${lt_sysroot:-no}" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010196
10197
10198
10199
10200
Elliott Hughesf344baa2021-12-07 09:12:34 -080010201{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
10202printf %s "checking for a working dd... " >&6; }
10203if test ${ac_cv_path_lt_DD+y}
10204then :
10205 printf %s "(cached) " >&6
10206else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070010207 printf 0123456789abcdef0123456789abcdef >conftest.i
10208cat conftest.i conftest.i >conftest2.i
10209: ${lt_DD:=$DD}
10210if test -z "$lt_DD"; then
10211 ac_path_lt_DD_found=false
10212 # Loop through the user's path and test for each of PROGNAME-LIST
10213 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10214for as_dir in $PATH
10215do
10216 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080010217 case $as_dir in #(((
10218 '') as_dir=./ ;;
10219 */) ;;
10220 *) as_dir=$as_dir/ ;;
10221 esac
10222 for ac_prog in dd
10223 do
Elliott Hughes82be86d2017-09-20 17:00:17 -070010224 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080010225 ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
Elliott Hughes82be86d2017-09-20 17:00:17 -070010226 as_fn_executable_p "$ac_path_lt_DD" || continue
10227if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10228 cmp -s conftest.i conftest.out \
10229 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
10230fi
10231 $ac_path_lt_DD_found && break 3
10232 done
10233 done
10234 done
10235IFS=$as_save_IFS
10236 if test -z "$ac_cv_path_lt_DD"; then
10237 :
10238 fi
10239else
10240 ac_cv_path_lt_DD=$lt_DD
10241fi
10242
10243rm -f conftest.i conftest2.i conftest.out
10244fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080010245{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
10246printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010247
10248
Elliott Hughesf344baa2021-12-07 09:12:34 -080010249{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
10250printf %s "checking how to truncate binary pipes... " >&6; }
10251if test ${lt_cv_truncate_bin+y}
10252then :
10253 printf %s "(cached) " >&6
10254else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070010255 printf 0123456789abcdef0123456789abcdef >conftest.i
10256cat conftest.i conftest.i >conftest2.i
10257lt_cv_truncate_bin=
10258if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10259 cmp -s conftest.i conftest.out \
10260 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
10261fi
10262rm -f conftest.i conftest2.i conftest.out
10263test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
10264fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080010265{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
10266printf "%s\n" "$lt_cv_truncate_bin" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010267
10268
10269
10270
10271
10272
10273
10274# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
10275func_cc_basename ()
10276{
10277 for cc_temp in $*""; do
10278 case $cc_temp in
10279 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
10280 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
10281 \-*) ;;
10282 *) break;;
10283 esac
10284 done
10285 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
10286}
10287
10288# Check whether --enable-libtool-lock was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080010289if test ${enable_libtool_lock+y}
10290then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070010291 enableval=$enable_libtool_lock;
10292fi
10293
10294test no = "$enable_libtool_lock" || enable_libtool_lock=yes
10295
10296# Some flags need to be propagated to the compiler or linker for good
10297# libtool support.
10298case $host in
10299ia64-*-hpux*)
10300 # Find out what ABI is being produced by ac_compile, and set mode
10301 # options accordingly.
10302 echo 'int i;' > conftest.$ac_ext
10303 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10304 (eval $ac_compile) 2>&5
10305 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -080010306 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070010307 test $ac_status = 0; }; then
10308 case `/usr/bin/file conftest.$ac_objext` in
10309 *ELF-32*)
10310 HPUX_IA64_MODE=32
10311 ;;
10312 *ELF-64*)
10313 HPUX_IA64_MODE=64
10314 ;;
10315 esac
10316 fi
10317 rm -rf conftest*
10318 ;;
10319*-*-irix6*)
10320 # Find out what ABI is being produced by ac_compile, and set linker
10321 # options accordingly.
10322 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
10323 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10324 (eval $ac_compile) 2>&5
10325 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -080010326 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070010327 test $ac_status = 0; }; then
10328 if test yes = "$lt_cv_prog_gnu_ld"; then
10329 case `/usr/bin/file conftest.$ac_objext` in
10330 *32-bit*)
10331 LD="${LD-ld} -melf32bsmip"
10332 ;;
10333 *N32*)
10334 LD="${LD-ld} -melf32bmipn32"
10335 ;;
10336 *64-bit*)
10337 LD="${LD-ld} -melf64bmip"
10338 ;;
10339 esac
10340 else
10341 case `/usr/bin/file conftest.$ac_objext` in
10342 *32-bit*)
10343 LD="${LD-ld} -32"
10344 ;;
10345 *N32*)
10346 LD="${LD-ld} -n32"
10347 ;;
10348 *64-bit*)
10349 LD="${LD-ld} -64"
10350 ;;
10351 esac
10352 fi
10353 fi
10354 rm -rf conftest*
10355 ;;
10356
10357mips64*-*linux*)
10358 # Find out what ABI is being produced by ac_compile, and set linker
10359 # options accordingly.
10360 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
10361 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10362 (eval $ac_compile) 2>&5
10363 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -080010364 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070010365 test $ac_status = 0; }; then
10366 emul=elf
10367 case `/usr/bin/file conftest.$ac_objext` in
10368 *32-bit*)
10369 emul="${emul}32"
10370 ;;
10371 *64-bit*)
10372 emul="${emul}64"
10373 ;;
10374 esac
10375 case `/usr/bin/file conftest.$ac_objext` in
10376 *MSB*)
10377 emul="${emul}btsmip"
10378 ;;
10379 *LSB*)
10380 emul="${emul}ltsmip"
10381 ;;
10382 esac
10383 case `/usr/bin/file conftest.$ac_objext` in
10384 *N32*)
10385 emul="${emul}n32"
10386 ;;
10387 esac
10388 LD="${LD-ld} -m $emul"
10389 fi
10390 rm -rf conftest*
10391 ;;
10392
10393x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
10394s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
10395 # Find out what ABI is being produced by ac_compile, and set linker
10396 # options accordingly. Note that the listed cases only cover the
10397 # situations where additional linker options are needed (such as when
10398 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
10399 # vice versa); the common cases where no linker options are needed do
10400 # not appear in the list.
10401 echo 'int i;' > conftest.$ac_ext
10402 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10403 (eval $ac_compile) 2>&5
10404 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -080010405 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070010406 test $ac_status = 0; }; then
10407 case `/usr/bin/file conftest.o` in
10408 *32-bit*)
10409 case $host in
10410 x86_64-*kfreebsd*-gnu)
10411 LD="${LD-ld} -m elf_i386_fbsd"
10412 ;;
10413 x86_64-*linux*)
10414 case `/usr/bin/file conftest.o` in
10415 *x86-64*)
10416 LD="${LD-ld} -m elf32_x86_64"
10417 ;;
10418 *)
10419 LD="${LD-ld} -m elf_i386"
10420 ;;
10421 esac
10422 ;;
10423 powerpc64le-*linux*)
10424 LD="${LD-ld} -m elf32lppclinux"
10425 ;;
10426 powerpc64-*linux*)
10427 LD="${LD-ld} -m elf32ppclinux"
10428 ;;
10429 s390x-*linux*)
10430 LD="${LD-ld} -m elf_s390"
10431 ;;
10432 sparc64-*linux*)
10433 LD="${LD-ld} -m elf32_sparc"
10434 ;;
10435 esac
10436 ;;
10437 *64-bit*)
10438 case $host in
10439 x86_64-*kfreebsd*-gnu)
10440 LD="${LD-ld} -m elf_x86_64_fbsd"
10441 ;;
10442 x86_64-*linux*)
10443 LD="${LD-ld} -m elf_x86_64"
10444 ;;
10445 powerpcle-*linux*)
10446 LD="${LD-ld} -m elf64lppc"
10447 ;;
10448 powerpc-*linux*)
10449 LD="${LD-ld} -m elf64ppc"
10450 ;;
10451 s390*-*linux*|s390*-*tpf*)
10452 LD="${LD-ld} -m elf64_s390"
10453 ;;
10454 sparc*-*linux*)
10455 LD="${LD-ld} -m elf64_sparc"
10456 ;;
10457 esac
10458 ;;
10459 esac
10460 fi
10461 rm -rf conftest*
10462 ;;
10463
10464*-*-sco3.2v5*)
10465 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
10466 SAVE_CFLAGS=$CFLAGS
10467 CFLAGS="$CFLAGS -belf"
Elliott Hughesf344baa2021-12-07 09:12:34 -080010468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
10469printf %s "checking whether the C compiler needs -belf... " >&6; }
10470if test ${lt_cv_cc_needs_belf+y}
10471then :
10472 printf %s "(cached) " >&6
10473else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070010474 ac_ext=c
10475ac_cpp='$CPP $CPPFLAGS'
10476ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10477ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10478ac_compiler_gnu=$ac_cv_c_compiler_gnu
10479
10480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10481/* end confdefs.h. */
10482
10483int main (void)
10484{
10485
10486 ;
10487 return 0;
10488}
10489_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080010490if ac_fn_c_try_link "$LINENO"
10491then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070010492 lt_cv_cc_needs_belf=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080010493else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070010494 lt_cv_cc_needs_belf=no
10495fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080010496rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070010497 conftest$ac_exeext conftest.$ac_ext
10498 ac_ext=c
10499ac_cpp='$CPP $CPPFLAGS'
10500ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10501ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10502ac_compiler_gnu=$ac_cv_c_compiler_gnu
10503
10504fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080010505{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
10506printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010507 if test yes != "$lt_cv_cc_needs_belf"; then
10508 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
10509 CFLAGS=$SAVE_CFLAGS
10510 fi
10511 ;;
10512*-*solaris*)
10513 # Find out what ABI is being produced by ac_compile, and set linker
10514 # options accordingly.
10515 echo 'int i;' > conftest.$ac_ext
10516 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10517 (eval $ac_compile) 2>&5
10518 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -080010519 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070010520 test $ac_status = 0; }; then
10521 case `/usr/bin/file conftest.o` in
10522 *64-bit*)
10523 case $lt_cv_prog_gnu_ld in
10524 yes*)
10525 case $host in
10526 i?86-*-solaris*|x86_64-*-solaris*)
10527 LD="${LD-ld} -m elf_x86_64"
10528 ;;
10529 sparc*-*-solaris*)
10530 LD="${LD-ld} -m elf64_sparc"
10531 ;;
10532 esac
10533 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
10534 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
10535 LD=${LD-ld}_sol2
10536 fi
10537 ;;
10538 *)
10539 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
10540 LD="${LD-ld} -64"
10541 fi
10542 ;;
10543 esac
10544 ;;
10545 esac
10546 fi
10547 rm -rf conftest*
10548 ;;
10549esac
10550
10551need_locks=$enable_libtool_lock
10552
10553if test -n "$ac_tool_prefix"; then
10554 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
10555set dummy ${ac_tool_prefix}mt; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080010556{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10557printf %s "checking for $ac_word... " >&6; }
10558if test ${ac_cv_prog_MANIFEST_TOOL+y}
10559then :
10560 printf %s "(cached) " >&6
10561else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070010562 if test -n "$MANIFEST_TOOL"; then
10563 ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
10564else
10565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10566for as_dir in $PATH
10567do
10568 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080010569 case $as_dir in #(((
10570 '') as_dir=./ ;;
10571 */) ;;
10572 *) as_dir=$as_dir/ ;;
10573 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070010574 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080010575 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070010576 ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
Elliott Hughesf344baa2021-12-07 09:12:34 -080010577 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070010578 break 2
10579 fi
10580done
10581 done
10582IFS=$as_save_IFS
10583
10584fi
10585fi
10586MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
10587if test -n "$MANIFEST_TOOL"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080010588 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
10589printf "%s\n" "$MANIFEST_TOOL" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010590else
Elliott Hughesf344baa2021-12-07 09:12:34 -080010591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10592printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010593fi
10594
10595
10596fi
10597if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
10598 ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
10599 # Extract the first word of "mt", so it can be a program name with args.
10600set dummy mt; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080010601{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10602printf %s "checking for $ac_word... " >&6; }
10603if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
10604then :
10605 printf %s "(cached) " >&6
10606else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070010607 if test -n "$ac_ct_MANIFEST_TOOL"; then
10608 ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
10609else
10610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10611for as_dir in $PATH
10612do
10613 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080010614 case $as_dir in #(((
10615 '') as_dir=./ ;;
10616 */) ;;
10617 *) as_dir=$as_dir/ ;;
10618 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070010619 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080010620 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070010621 ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
Elliott Hughesf344baa2021-12-07 09:12:34 -080010622 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070010623 break 2
10624 fi
10625done
10626 done
10627IFS=$as_save_IFS
10628
10629fi
10630fi
10631ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
10632if test -n "$ac_ct_MANIFEST_TOOL"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080010633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
10634printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010635else
Elliott Hughesf344baa2021-12-07 09:12:34 -080010636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10637printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010638fi
10639
10640 if test "x$ac_ct_MANIFEST_TOOL" = x; then
10641 MANIFEST_TOOL=":"
10642 else
10643 case $cross_compiling:$ac_tool_warned in
10644yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080010645{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10646printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070010647ac_tool_warned=yes ;;
10648esac
10649 MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
10650 fi
10651else
10652 MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
10653fi
10654
10655test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
Elliott Hughesf344baa2021-12-07 09:12:34 -080010656{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
10657printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
10658if test ${lt_cv_path_mainfest_tool+y}
10659then :
10660 printf %s "(cached) " >&6
10661else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070010662 lt_cv_path_mainfest_tool=no
10663 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
10664 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
10665 cat conftest.err >&5
10666 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
10667 lt_cv_path_mainfest_tool=yes
10668 fi
10669 rm -f conftest*
10670fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080010671{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
10672printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010673if test yes != "$lt_cv_path_mainfest_tool"; then
10674 MANIFEST_TOOL=:
10675fi
10676
10677
10678
10679
10680
10681
10682 case $host_os in
10683 rhapsody* | darwin*)
10684 if test -n "$ac_tool_prefix"; then
10685 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
10686set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080010687{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10688printf %s "checking for $ac_word... " >&6; }
10689if test ${ac_cv_prog_DSYMUTIL+y}
10690then :
10691 printf %s "(cached) " >&6
10692else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070010693 if test -n "$DSYMUTIL"; then
10694 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
10695else
10696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10697for as_dir in $PATH
10698do
10699 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080010700 case $as_dir in #(((
10701 '') as_dir=./ ;;
10702 */) ;;
10703 *) as_dir=$as_dir/ ;;
10704 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070010705 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080010706 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070010707 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
Elliott Hughesf344baa2021-12-07 09:12:34 -080010708 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070010709 break 2
10710 fi
10711done
10712 done
10713IFS=$as_save_IFS
10714
10715fi
10716fi
10717DSYMUTIL=$ac_cv_prog_DSYMUTIL
10718if test -n "$DSYMUTIL"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080010719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10720printf "%s\n" "$DSYMUTIL" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010721else
Elliott Hughesf344baa2021-12-07 09:12:34 -080010722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10723printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010724fi
10725
10726
10727fi
10728if test -z "$ac_cv_prog_DSYMUTIL"; then
10729 ac_ct_DSYMUTIL=$DSYMUTIL
10730 # Extract the first word of "dsymutil", so it can be a program name with args.
10731set dummy dsymutil; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080010732{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10733printf %s "checking for $ac_word... " >&6; }
10734if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
10735then :
10736 printf %s "(cached) " >&6
10737else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070010738 if test -n "$ac_ct_DSYMUTIL"; then
10739 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
10740else
10741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10742for as_dir in $PATH
10743do
10744 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080010745 case $as_dir in #(((
10746 '') as_dir=./ ;;
10747 */) ;;
10748 *) as_dir=$as_dir/ ;;
10749 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070010750 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080010751 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070010752 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
Elliott Hughesf344baa2021-12-07 09:12:34 -080010753 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070010754 break 2
10755 fi
10756done
10757 done
10758IFS=$as_save_IFS
10759
10760fi
10761fi
10762ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
10763if test -n "$ac_ct_DSYMUTIL"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080010764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
10765printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010766else
Elliott Hughesf344baa2021-12-07 09:12:34 -080010767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10768printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010769fi
10770
10771 if test "x$ac_ct_DSYMUTIL" = x; then
10772 DSYMUTIL=":"
10773 else
10774 case $cross_compiling:$ac_tool_warned in
10775yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080010776{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10777printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070010778ac_tool_warned=yes ;;
10779esac
10780 DSYMUTIL=$ac_ct_DSYMUTIL
10781 fi
10782else
10783 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
10784fi
10785
10786 if test -n "$ac_tool_prefix"; then
10787 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
10788set dummy ${ac_tool_prefix}nmedit; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080010789{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10790printf %s "checking for $ac_word... " >&6; }
10791if test ${ac_cv_prog_NMEDIT+y}
10792then :
10793 printf %s "(cached) " >&6
10794else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070010795 if test -n "$NMEDIT"; then
10796 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
10797else
10798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10799for as_dir in $PATH
10800do
10801 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080010802 case $as_dir in #(((
10803 '') as_dir=./ ;;
10804 */) ;;
10805 *) as_dir=$as_dir/ ;;
10806 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070010807 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080010808 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070010809 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
Elliott Hughesf344baa2021-12-07 09:12:34 -080010810 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070010811 break 2
10812 fi
10813done
10814 done
10815IFS=$as_save_IFS
10816
10817fi
10818fi
10819NMEDIT=$ac_cv_prog_NMEDIT
10820if test -n "$NMEDIT"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080010821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
10822printf "%s\n" "$NMEDIT" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010823else
Elliott Hughesf344baa2021-12-07 09:12:34 -080010824 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10825printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010826fi
10827
10828
10829fi
10830if test -z "$ac_cv_prog_NMEDIT"; then
10831 ac_ct_NMEDIT=$NMEDIT
10832 # Extract the first word of "nmedit", so it can be a program name with args.
10833set dummy nmedit; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080010834{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10835printf %s "checking for $ac_word... " >&6; }
10836if test ${ac_cv_prog_ac_ct_NMEDIT+y}
10837then :
10838 printf %s "(cached) " >&6
10839else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070010840 if test -n "$ac_ct_NMEDIT"; then
10841 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
10842else
10843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10844for as_dir in $PATH
10845do
10846 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080010847 case $as_dir in #(((
10848 '') as_dir=./ ;;
10849 */) ;;
10850 *) as_dir=$as_dir/ ;;
10851 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070010852 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080010853 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070010854 ac_cv_prog_ac_ct_NMEDIT="nmedit"
Elliott Hughesf344baa2021-12-07 09:12:34 -080010855 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070010856 break 2
10857 fi
10858done
10859 done
10860IFS=$as_save_IFS
10861
10862fi
10863fi
10864ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
10865if test -n "$ac_ct_NMEDIT"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080010866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
10867printf "%s\n" "$ac_ct_NMEDIT" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010868else
Elliott Hughesf344baa2021-12-07 09:12:34 -080010869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10870printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010871fi
10872
10873 if test "x$ac_ct_NMEDIT" = x; then
10874 NMEDIT=":"
10875 else
10876 case $cross_compiling:$ac_tool_warned in
10877yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080010878{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10879printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070010880ac_tool_warned=yes ;;
10881esac
10882 NMEDIT=$ac_ct_NMEDIT
10883 fi
10884else
10885 NMEDIT="$ac_cv_prog_NMEDIT"
10886fi
10887
10888 if test -n "$ac_tool_prefix"; then
10889 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
10890set dummy ${ac_tool_prefix}lipo; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080010891{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10892printf %s "checking for $ac_word... " >&6; }
10893if test ${ac_cv_prog_LIPO+y}
10894then :
10895 printf %s "(cached) " >&6
10896else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070010897 if test -n "$LIPO"; then
10898 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
10899else
10900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10901for as_dir in $PATH
10902do
10903 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080010904 case $as_dir in #(((
10905 '') as_dir=./ ;;
10906 */) ;;
10907 *) as_dir=$as_dir/ ;;
10908 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070010909 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080010910 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070010911 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
Elliott Hughesf344baa2021-12-07 09:12:34 -080010912 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070010913 break 2
10914 fi
10915done
10916 done
10917IFS=$as_save_IFS
10918
10919fi
10920fi
10921LIPO=$ac_cv_prog_LIPO
10922if test -n "$LIPO"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080010923 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
10924printf "%s\n" "$LIPO" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010925else
Elliott Hughesf344baa2021-12-07 09:12:34 -080010926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10927printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010928fi
10929
10930
10931fi
10932if test -z "$ac_cv_prog_LIPO"; then
10933 ac_ct_LIPO=$LIPO
10934 # Extract the first word of "lipo", so it can be a program name with args.
10935set dummy lipo; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080010936{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10937printf %s "checking for $ac_word... " >&6; }
10938if test ${ac_cv_prog_ac_ct_LIPO+y}
10939then :
10940 printf %s "(cached) " >&6
10941else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070010942 if test -n "$ac_ct_LIPO"; then
10943 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
10944else
10945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10946for as_dir in $PATH
10947do
10948 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080010949 case $as_dir in #(((
10950 '') as_dir=./ ;;
10951 */) ;;
10952 *) as_dir=$as_dir/ ;;
10953 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070010954 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080010955 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070010956 ac_cv_prog_ac_ct_LIPO="lipo"
Elliott Hughesf344baa2021-12-07 09:12:34 -080010957 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070010958 break 2
10959 fi
10960done
10961 done
10962IFS=$as_save_IFS
10963
10964fi
10965fi
10966ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
10967if test -n "$ac_ct_LIPO"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080010968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
10969printf "%s\n" "$ac_ct_LIPO" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010970else
Elliott Hughesf344baa2021-12-07 09:12:34 -080010971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10972printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070010973fi
10974
10975 if test "x$ac_ct_LIPO" = x; then
10976 LIPO=":"
10977 else
10978 case $cross_compiling:$ac_tool_warned in
10979yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080010980{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10981printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070010982ac_tool_warned=yes ;;
10983esac
10984 LIPO=$ac_ct_LIPO
10985 fi
10986else
10987 LIPO="$ac_cv_prog_LIPO"
10988fi
10989
10990 if test -n "$ac_tool_prefix"; then
10991 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
10992set dummy ${ac_tool_prefix}otool; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080010993{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10994printf %s "checking for $ac_word... " >&6; }
10995if test ${ac_cv_prog_OTOOL+y}
10996then :
10997 printf %s "(cached) " >&6
10998else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070010999 if test -n "$OTOOL"; then
11000 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
11001else
11002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11003for as_dir in $PATH
11004do
11005 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080011006 case $as_dir in #(((
11007 '') as_dir=./ ;;
11008 */) ;;
11009 *) as_dir=$as_dir/ ;;
11010 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070011011 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080011012 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070011013 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
Elliott Hughesf344baa2021-12-07 09:12:34 -080011014 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070011015 break 2
11016 fi
11017done
11018 done
11019IFS=$as_save_IFS
11020
11021fi
11022fi
11023OTOOL=$ac_cv_prog_OTOOL
11024if test -n "$OTOOL"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080011025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
11026printf "%s\n" "$OTOOL" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011027else
Elliott Hughesf344baa2021-12-07 09:12:34 -080011028 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11029printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011030fi
11031
11032
11033fi
11034if test -z "$ac_cv_prog_OTOOL"; then
11035 ac_ct_OTOOL=$OTOOL
11036 # Extract the first word of "otool", so it can be a program name with args.
11037set dummy otool; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080011038{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11039printf %s "checking for $ac_word... " >&6; }
11040if test ${ac_cv_prog_ac_ct_OTOOL+y}
11041then :
11042 printf %s "(cached) " >&6
11043else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070011044 if test -n "$ac_ct_OTOOL"; then
11045 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
11046else
11047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11048for as_dir in $PATH
11049do
11050 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080011051 case $as_dir in #(((
11052 '') as_dir=./ ;;
11053 */) ;;
11054 *) as_dir=$as_dir/ ;;
11055 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070011056 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080011057 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070011058 ac_cv_prog_ac_ct_OTOOL="otool"
Elliott Hughesf344baa2021-12-07 09:12:34 -080011059 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070011060 break 2
11061 fi
11062done
11063 done
11064IFS=$as_save_IFS
11065
11066fi
11067fi
11068ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
11069if test -n "$ac_ct_OTOOL"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080011070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
11071printf "%s\n" "$ac_ct_OTOOL" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011072else
Elliott Hughesf344baa2021-12-07 09:12:34 -080011073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11074printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011075fi
11076
11077 if test "x$ac_ct_OTOOL" = x; then
11078 OTOOL=":"
11079 else
11080 case $cross_compiling:$ac_tool_warned in
11081yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080011082{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11083printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070011084ac_tool_warned=yes ;;
11085esac
11086 OTOOL=$ac_ct_OTOOL
11087 fi
11088else
11089 OTOOL="$ac_cv_prog_OTOOL"
11090fi
11091
11092 if test -n "$ac_tool_prefix"; then
11093 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
11094set dummy ${ac_tool_prefix}otool64; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080011095{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11096printf %s "checking for $ac_word... " >&6; }
11097if test ${ac_cv_prog_OTOOL64+y}
11098then :
11099 printf %s "(cached) " >&6
11100else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070011101 if test -n "$OTOOL64"; then
11102 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
11103else
11104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11105for as_dir in $PATH
11106do
11107 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080011108 case $as_dir in #(((
11109 '') as_dir=./ ;;
11110 */) ;;
11111 *) as_dir=$as_dir/ ;;
11112 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070011113 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080011114 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070011115 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
Elliott Hughesf344baa2021-12-07 09:12:34 -080011116 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070011117 break 2
11118 fi
11119done
11120 done
11121IFS=$as_save_IFS
11122
11123fi
11124fi
11125OTOOL64=$ac_cv_prog_OTOOL64
11126if test -n "$OTOOL64"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080011127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
11128printf "%s\n" "$OTOOL64" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011129else
Elliott Hughesf344baa2021-12-07 09:12:34 -080011130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11131printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011132fi
11133
11134
11135fi
11136if test -z "$ac_cv_prog_OTOOL64"; then
11137 ac_ct_OTOOL64=$OTOOL64
11138 # Extract the first word of "otool64", so it can be a program name with args.
11139set dummy otool64; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080011140{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11141printf %s "checking for $ac_word... " >&6; }
11142if test ${ac_cv_prog_ac_ct_OTOOL64+y}
11143then :
11144 printf %s "(cached) " >&6
11145else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070011146 if test -n "$ac_ct_OTOOL64"; then
11147 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
11148else
11149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11150for as_dir in $PATH
11151do
11152 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080011153 case $as_dir in #(((
11154 '') as_dir=./ ;;
11155 */) ;;
11156 *) as_dir=$as_dir/ ;;
11157 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070011158 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080011159 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070011160 ac_cv_prog_ac_ct_OTOOL64="otool64"
Elliott Hughesf344baa2021-12-07 09:12:34 -080011161 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070011162 break 2
11163 fi
11164done
11165 done
11166IFS=$as_save_IFS
11167
11168fi
11169fi
11170ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
11171if test -n "$ac_ct_OTOOL64"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080011172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
11173printf "%s\n" "$ac_ct_OTOOL64" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011174else
Elliott Hughesf344baa2021-12-07 09:12:34 -080011175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11176printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011177fi
11178
11179 if test "x$ac_ct_OTOOL64" = x; then
11180 OTOOL64=":"
11181 else
11182 case $cross_compiling:$ac_tool_warned in
11183yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080011184{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11185printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070011186ac_tool_warned=yes ;;
11187esac
11188 OTOOL64=$ac_ct_OTOOL64
11189 fi
11190else
11191 OTOOL64="$ac_cv_prog_OTOOL64"
11192fi
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
Elliott Hughesf344baa2021-12-07 09:12:34 -080011220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
11221printf %s "checking for -single_module linker flag... " >&6; }
11222if test ${lt_cv_apple_cc_single_mod+y}
11223then :
11224 printf %s "(cached) " >&6
11225else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070011226 lt_cv_apple_cc_single_mod=no
11227 if test -z "$LT_MULTI_MODULE"; then
11228 # By default we will add the -single_module flag. You can override
11229 # by either setting the environment variable LT_MULTI_MODULE
11230 # non-empty at configure time, or by adding -multi_module to the
11231 # link flags.
11232 rm -rf libconftest.dylib*
11233 echo "int foo(void){return 1;}" > conftest.c
11234 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11235-dynamiclib -Wl,-single_module conftest.c" >&5
11236 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11237 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
11238 _lt_result=$?
11239 # If there is a non-empty error log, and "single_module"
11240 # appears in it, assume the flag caused a linker warning
11241 if test -s conftest.err && $GREP single_module conftest.err; then
11242 cat conftest.err >&5
11243 # Otherwise, if the output was created with a 0 exit code from
11244 # the compiler, it worked.
11245 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
11246 lt_cv_apple_cc_single_mod=yes
11247 else
11248 cat conftest.err >&5
11249 fi
11250 rm -rf libconftest.dylib*
11251 rm -f conftest.*
11252 fi
11253fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080011254{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
11255printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011256
Elliott Hughesf344baa2021-12-07 09:12:34 -080011257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
11258printf %s "checking for -exported_symbols_list linker flag... " >&6; }
11259if test ${lt_cv_ld_exported_symbols_list+y}
11260then :
11261 printf %s "(cached) " >&6
11262else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070011263 lt_cv_ld_exported_symbols_list=no
11264 save_LDFLAGS=$LDFLAGS
11265 echo "_main" > conftest.sym
11266 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
11267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11268/* end confdefs.h. */
11269
11270int main (void)
11271{
11272
11273 ;
11274 return 0;
11275}
11276_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080011277if ac_fn_c_try_link "$LINENO"
11278then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070011279 lt_cv_ld_exported_symbols_list=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080011280else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070011281 lt_cv_ld_exported_symbols_list=no
11282fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080011283rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070011284 conftest$ac_exeext conftest.$ac_ext
11285 LDFLAGS=$save_LDFLAGS
11286
11287fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080011288{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
11289printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011290
Elliott Hughesf344baa2021-12-07 09:12:34 -080011291 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
11292printf %s "checking for -force_load linker flag... " >&6; }
11293if test ${lt_cv_ld_force_load+y}
11294then :
11295 printf %s "(cached) " >&6
11296else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070011297 lt_cv_ld_force_load=no
11298 cat > conftest.c << _LT_EOF
11299int forced_loaded() { return 2;}
11300_LT_EOF
11301 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
11302 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
Haibo Huangb51266f2020-03-04 02:22:48 -080011303 echo "$AR cr libconftest.a conftest.o" >&5
11304 $AR cr libconftest.a conftest.o 2>&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070011305 echo "$RANLIB libconftest.a" >&5
11306 $RANLIB libconftest.a 2>&5
11307 cat > conftest.c << _LT_EOF
11308int main() { return 0;}
11309_LT_EOF
11310 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
11311 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
11312 _lt_result=$?
11313 if test -s conftest.err && $GREP force_load conftest.err; then
11314 cat conftest.err >&5
11315 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
11316 lt_cv_ld_force_load=yes
11317 else
11318 cat conftest.err >&5
11319 fi
11320 rm -f conftest.err libconftest.a conftest conftest.c
11321 rm -rf conftest.dSYM
11322
11323fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080011324{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
11325printf "%s\n" "$lt_cv_ld_force_load" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011326 case $host_os in
11327 rhapsody* | darwin1.[012])
11328 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
11329 darwin1.*)
11330 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
11331 darwin*) # darwin 5.x on
11332 # if running on 10.5 or later, the deployment target defaults
11333 # to the OS version, if on x86, and 10.4, the deployment
11334 # target defaults to 10.4. Don't you love it?
11335 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
Elliott Hughes34dd5f42021-08-10 13:01:18 -070011336 10.0,*86*-darwin8*|10.0,*-darwin[912]*)
Elliott Hughes82be86d2017-09-20 17:00:17 -070011337 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
11338 10.[012][,.]*)
11339 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
Elliott Hughes34dd5f42021-08-10 13:01:18 -070011340 10.*|11.*)
Elliott Hughes82be86d2017-09-20 17:00:17 -070011341 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
11342 esac
11343 ;;
11344 esac
11345 if test yes = "$lt_cv_apple_cc_single_mod"; then
11346 _lt_dar_single_mod='$single_module'
11347 fi
11348 if test yes = "$lt_cv_ld_exported_symbols_list"; then
11349 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
11350 else
11351 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
11352 fi
11353 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
11354 _lt_dsymutil='~$DSYMUTIL $lib || :'
11355 else
11356 _lt_dsymutil=
11357 fi
11358 ;;
11359 esac
11360
11361# func_munge_path_list VARIABLE PATH
11362# -----------------------------------
11363# VARIABLE is name of variable containing _space_ separated list of
11364# directories to be munged by the contents of PATH, which is string
11365# having a format:
11366# "DIR[:DIR]:"
11367# string "DIR[ DIR]" will be prepended to VARIABLE
11368# ":DIR[:DIR]"
11369# string "DIR[ DIR]" will be appended to VARIABLE
11370# "DIRP[:DIRP]::[DIRA:]DIRA"
11371# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
11372# "DIRA[ DIRA]" will be appended to VARIABLE
11373# "DIR[:DIR]"
11374# VARIABLE will be replaced by "DIR[ DIR]"
11375func_munge_path_list ()
11376{
11377 case x$2 in
11378 x)
11379 ;;
11380 *:)
11381 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
11382 ;;
11383 x:*)
11384 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
11385 ;;
11386 *::*)
11387 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
11388 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
11389 ;;
11390 *)
11391 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
11392 ;;
11393 esac
11394}
11395
Elliott Hughesf344baa2021-12-07 09:12:34 -080011396ac_header= ac_cache=
11397for ac_item in $ac_header_c_list
11398do
11399 if test $ac_cache; then
11400 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
11401 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
11402 printf "%s\n" "#define $ac_item 1" >> confdefs.h
11403 fi
11404 ac_header= ac_cache=
11405 elif test $ac_header; then
11406 ac_cache=$ac_item
11407 else
11408 ac_header=$ac_item
11409 fi
Alex Deymo486467e2017-12-19 19:04:07 +010011410done
11411
11412
Elliott Hughesf344baa2021-12-07 09:12:34 -080011413
11414
11415
11416
11417
11418
11419if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
11420then :
11421
11422printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070011423
11424fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080011425ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
11426"
11427if test "x$ac_cv_header_dlfcn_h" = xyes
11428then :
11429 printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070011430
Elliott Hughesf344baa2021-12-07 09:12:34 -080011431fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070011432
11433# ------------------------------------ #
11434# Determine libtool default behavior #
11435# ------------------------------------ #
11436
11437#
11438# Default behavior is to enable shared and static libraries on systems
11439# where libtool knows how to build both library versions, and does not
11440# require separate configuration and build runs for each flavor.
11441#
11442
11443xc_lt_want_enable_shared='yes'
11444xc_lt_want_enable_static='yes'
11445
11446#
11447# User may have disabled shared or static libraries.
11448#
11449case "x$enable_shared" in # (
11450 xno)
11451 xc_lt_want_enable_shared='no'
11452 ;;
11453esac
11454case "x$enable_static" in # (
11455 xno)
11456 xc_lt_want_enable_static='no'
11457 ;;
11458esac
11459if test "x$xc_lt_want_enable_shared" = 'xno' &&
11460 test "x$xc_lt_want_enable_static" = 'xno'; then
11461 as_fn_error $? "can not disable shared and static libraries simultaneously" "$LINENO" 5
11462fi
11463
11464#
11465# Default behavior on systems that require independent configuration
11466# and build runs for shared and static is to enable shared libraries
11467# and disable static ones. On these systems option '--disable-shared'
11468# must be used in order to build a proper static library.
11469#
11470
11471if test "x$xc_lt_want_enable_shared" = 'xyes' &&
11472 test "x$xc_lt_want_enable_static" = 'xyes'; then
11473 case $host_os in # (
11474 pw32* | cegcc* | os2* | aix*)
11475 xc_lt_want_enable_static='no'
11476 ;;
11477 esac
11478fi
11479
11480#
11481# Make libtool aware of current shared and static library preferences
11482# taking in account that, depending on host characteristics, libtool
11483# may modify these option preferences later in this configure script.
11484#
11485
11486enable_shared=$xc_lt_want_enable_shared
11487enable_static=$xc_lt_want_enable_static
11488
11489#
11490# Default behavior is to build PIC objects for shared libraries and
11491# non-PIC objects for static libraries.
11492#
11493
11494xc_lt_want_with_pic='default'
11495
11496#
11497# User may have specified PIC preference.
11498#
11499
11500case "x$with_pic" in # ((
11501 xno)
11502 xc_lt_want_with_pic='no'
11503 ;;
11504 xyes)
11505 xc_lt_want_with_pic='yes'
11506 ;;
11507esac
11508
11509#
11510# Default behavior on some systems where building a shared library out
11511# of non-PIC compiled objects will fail with following linker error
11512# "relocation R_X86_64_32 can not be used when making a shared object"
11513# is to build PIC objects even for static libraries. This behavior may
11514# be overridden using 'configure --disable-shared --without-pic'.
11515#
11516
11517if test "x$xc_lt_want_with_pic" = 'xdefault'; then
11518 case $host_cpu in # (
11519 x86_64 | amd64 | ia64)
11520 case $host_os in # (
Elliott Hughesf344baa2021-12-07 09:12:34 -080011521 linux* | freebsd* | midnightbsd*)
Elliott Hughes82be86d2017-09-20 17:00:17 -070011522 xc_lt_want_with_pic='yes'
11523 ;;
11524 esac
11525 ;;
11526 esac
11527fi
11528
11529#
11530# Make libtool aware of current PIC preference taking in account that,
11531# depending on host characteristics, libtool may modify PIC default
11532# behavior to fit host system idiosyncrasies later in this script.
11533#
11534
11535with_pic=$xc_lt_want_with_pic
11536
11537## ----------------------- ##
11538## Start of libtool code ##
11539## ----------------------- ##
11540
11541
11542
11543
11544# Set options
11545enable_win32_dll=yes
11546
11547case $host in
11548*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
11549 if test -n "$ac_tool_prefix"; then
11550 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
11551set dummy ${ac_tool_prefix}as; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080011552{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11553printf %s "checking for $ac_word... " >&6; }
11554if test ${ac_cv_prog_AS+y}
11555then :
11556 printf %s "(cached) " >&6
11557else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070011558 if test -n "$AS"; then
11559 ac_cv_prog_AS="$AS" # Let the user override the test.
11560else
11561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11562for as_dir in $PATH
11563do
11564 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080011565 case $as_dir in #(((
11566 '') as_dir=./ ;;
11567 */) ;;
11568 *) as_dir=$as_dir/ ;;
11569 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070011570 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080011571 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070011572 ac_cv_prog_AS="${ac_tool_prefix}as"
Elliott Hughesf344baa2021-12-07 09:12:34 -080011573 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070011574 break 2
11575 fi
11576done
11577 done
11578IFS=$as_save_IFS
11579
11580fi
11581fi
11582AS=$ac_cv_prog_AS
11583if test -n "$AS"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080011584 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
11585printf "%s\n" "$AS" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011586else
Elliott Hughesf344baa2021-12-07 09:12:34 -080011587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11588printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011589fi
11590
11591
11592fi
11593if test -z "$ac_cv_prog_AS"; then
11594 ac_ct_AS=$AS
11595 # Extract the first word of "as", so it can be a program name with args.
11596set dummy as; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080011597{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11598printf %s "checking for $ac_word... " >&6; }
11599if test ${ac_cv_prog_ac_ct_AS+y}
11600then :
11601 printf %s "(cached) " >&6
11602else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070011603 if test -n "$ac_ct_AS"; then
11604 ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
11605else
11606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11607for as_dir in $PATH
11608do
11609 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080011610 case $as_dir in #(((
11611 '') as_dir=./ ;;
11612 */) ;;
11613 *) as_dir=$as_dir/ ;;
11614 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070011615 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080011616 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070011617 ac_cv_prog_ac_ct_AS="as"
Elliott Hughesf344baa2021-12-07 09:12:34 -080011618 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070011619 break 2
11620 fi
11621done
11622 done
11623IFS=$as_save_IFS
11624
11625fi
11626fi
11627ac_ct_AS=$ac_cv_prog_ac_ct_AS
11628if test -n "$ac_ct_AS"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080011629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
11630printf "%s\n" "$ac_ct_AS" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011631else
Elliott Hughesf344baa2021-12-07 09:12:34 -080011632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11633printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011634fi
11635
11636 if test "x$ac_ct_AS" = x; then
11637 AS="false"
11638 else
11639 case $cross_compiling:$ac_tool_warned in
11640yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080011641{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11642printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070011643ac_tool_warned=yes ;;
11644esac
11645 AS=$ac_ct_AS
11646 fi
11647else
11648 AS="$ac_cv_prog_AS"
11649fi
11650
11651 if test -n "$ac_tool_prefix"; then
11652 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
11653set dummy ${ac_tool_prefix}dlltool; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080011654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11655printf %s "checking for $ac_word... " >&6; }
11656if test ${ac_cv_prog_DLLTOOL+y}
11657then :
11658 printf %s "(cached) " >&6
11659else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070011660 if test -n "$DLLTOOL"; then
11661 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
11662else
11663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11664for as_dir in $PATH
11665do
11666 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080011667 case $as_dir in #(((
11668 '') as_dir=./ ;;
11669 */) ;;
11670 *) as_dir=$as_dir/ ;;
11671 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070011672 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080011673 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070011674 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
Elliott Hughesf344baa2021-12-07 09:12:34 -080011675 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070011676 break 2
11677 fi
11678done
11679 done
11680IFS=$as_save_IFS
11681
11682fi
11683fi
11684DLLTOOL=$ac_cv_prog_DLLTOOL
11685if test -n "$DLLTOOL"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080011686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
11687printf "%s\n" "$DLLTOOL" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011688else
Elliott Hughesf344baa2021-12-07 09:12:34 -080011689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11690printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011691fi
11692
11693
11694fi
11695if test -z "$ac_cv_prog_DLLTOOL"; then
11696 ac_ct_DLLTOOL=$DLLTOOL
11697 # Extract the first word of "dlltool", so it can be a program name with args.
11698set dummy dlltool; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080011699{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11700printf %s "checking for $ac_word... " >&6; }
11701if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
11702then :
11703 printf %s "(cached) " >&6
11704else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070011705 if test -n "$ac_ct_DLLTOOL"; then
11706 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
11707else
11708as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11709for as_dir in $PATH
11710do
11711 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080011712 case $as_dir in #(((
11713 '') as_dir=./ ;;
11714 */) ;;
11715 *) as_dir=$as_dir/ ;;
11716 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070011717 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080011718 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070011719 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
Elliott Hughesf344baa2021-12-07 09:12:34 -080011720 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070011721 break 2
11722 fi
11723done
11724 done
11725IFS=$as_save_IFS
11726
11727fi
11728fi
11729ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
11730if test -n "$ac_ct_DLLTOOL"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080011731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
11732printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011733else
Elliott Hughesf344baa2021-12-07 09:12:34 -080011734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11735printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011736fi
11737
11738 if test "x$ac_ct_DLLTOOL" = x; then
11739 DLLTOOL="false"
11740 else
11741 case $cross_compiling:$ac_tool_warned in
11742yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080011743{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11744printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070011745ac_tool_warned=yes ;;
11746esac
11747 DLLTOOL=$ac_ct_DLLTOOL
11748 fi
11749else
11750 DLLTOOL="$ac_cv_prog_DLLTOOL"
11751fi
11752
11753 if test -n "$ac_tool_prefix"; then
11754 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
11755set dummy ${ac_tool_prefix}objdump; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080011756{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11757printf %s "checking for $ac_word... " >&6; }
11758if test ${ac_cv_prog_OBJDUMP+y}
11759then :
11760 printf %s "(cached) " >&6
11761else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070011762 if test -n "$OBJDUMP"; then
11763 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
11764else
11765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11766for as_dir in $PATH
11767do
11768 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080011769 case $as_dir in #(((
11770 '') as_dir=./ ;;
11771 */) ;;
11772 *) as_dir=$as_dir/ ;;
11773 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070011774 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080011775 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070011776 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
Elliott Hughesf344baa2021-12-07 09:12:34 -080011777 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070011778 break 2
11779 fi
11780done
11781 done
11782IFS=$as_save_IFS
11783
11784fi
11785fi
11786OBJDUMP=$ac_cv_prog_OBJDUMP
11787if test -n "$OBJDUMP"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080011788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
11789printf "%s\n" "$OBJDUMP" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011790else
Elliott Hughesf344baa2021-12-07 09:12:34 -080011791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11792printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011793fi
11794
11795
11796fi
11797if test -z "$ac_cv_prog_OBJDUMP"; then
11798 ac_ct_OBJDUMP=$OBJDUMP
11799 # Extract the first word of "objdump", so it can be a program name with args.
11800set dummy objdump; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080011801{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11802printf %s "checking for $ac_word... " >&6; }
11803if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
11804then :
11805 printf %s "(cached) " >&6
11806else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070011807 if test -n "$ac_ct_OBJDUMP"; then
11808 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
11809else
11810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11811for as_dir in $PATH
11812do
11813 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080011814 case $as_dir in #(((
11815 '') as_dir=./ ;;
11816 */) ;;
11817 *) as_dir=$as_dir/ ;;
11818 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070011819 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080011820 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070011821 ac_cv_prog_ac_ct_OBJDUMP="objdump"
Elliott Hughesf344baa2021-12-07 09:12:34 -080011822 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070011823 break 2
11824 fi
11825done
11826 done
11827IFS=$as_save_IFS
11828
11829fi
11830fi
11831ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
11832if test -n "$ac_ct_OBJDUMP"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080011833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
11834printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011835else
Elliott Hughesf344baa2021-12-07 09:12:34 -080011836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11837printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070011838fi
11839
11840 if test "x$ac_ct_OBJDUMP" = x; then
11841 OBJDUMP="false"
11842 else
11843 case $cross_compiling:$ac_tool_warned in
11844yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080011845{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11846printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070011847ac_tool_warned=yes ;;
11848esac
11849 OBJDUMP=$ac_ct_OBJDUMP
11850 fi
11851else
11852 OBJDUMP="$ac_cv_prog_OBJDUMP"
11853fi
11854
11855 ;;
11856esac
11857
11858test -z "$AS" && AS=as
11859
11860
11861
11862
11863
11864test -z "$DLLTOOL" && DLLTOOL=dlltool
11865
11866
11867
11868
11869
11870test -z "$OBJDUMP" && OBJDUMP=objdump
11871
11872
11873
11874
11875
11876
11877
11878 enable_dlopen=no
11879
11880
11881
11882 # Check whether --enable-shared was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080011883if test ${enable_shared+y}
11884then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070011885 enableval=$enable_shared; p=${PACKAGE-default}
11886 case $enableval in
11887 yes) enable_shared=yes ;;
11888 no) enable_shared=no ;;
11889 *)
11890 enable_shared=no
11891 # Look at the argument we got. We use all the common list separators.
11892 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11893 for pkg in $enableval; do
11894 IFS=$lt_save_ifs
11895 if test "X$pkg" = "X$p"; then
11896 enable_shared=yes
11897 fi
11898 done
11899 IFS=$lt_save_ifs
11900 ;;
11901 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080011902else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070011903 enable_shared=yes
11904fi
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914 # Check whether --enable-static was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080011915if test ${enable_static+y}
11916then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070011917 enableval=$enable_static; p=${PACKAGE-default}
11918 case $enableval in
11919 yes) enable_static=yes ;;
11920 no) enable_static=no ;;
11921 *)
11922 enable_static=no
11923 # Look at the argument we got. We use all the common list separators.
11924 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11925 for pkg in $enableval; do
11926 IFS=$lt_save_ifs
11927 if test "X$pkg" = "X$p"; then
11928 enable_static=yes
11929 fi
11930 done
11931 IFS=$lt_save_ifs
11932 ;;
11933 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080011934else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070011935 enable_static=yes
11936fi
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947# Check whether --with-pic was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080011948if test ${with_pic+y}
11949then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070011950 withval=$with_pic; lt_p=${PACKAGE-default}
11951 case $withval in
11952 yes|no) pic_mode=$withval ;;
11953 *)
11954 pic_mode=default
11955 # Look at the argument we got. We use all the common list separators.
11956 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11957 for lt_pkg in $withval; do
11958 IFS=$lt_save_ifs
11959 if test "X$lt_pkg" = "X$lt_p"; then
11960 pic_mode=yes
11961 fi
11962 done
11963 IFS=$lt_save_ifs
11964 ;;
11965 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080011966else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070011967 pic_mode=default
11968fi
11969
11970
11971
11972
11973
11974
11975
11976
11977 # Check whether --enable-fast-install was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080011978if test ${enable_fast_install+y}
11979then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070011980 enableval=$enable_fast_install; p=${PACKAGE-default}
11981 case $enableval in
11982 yes) enable_fast_install=yes ;;
11983 no) enable_fast_install=no ;;
11984 *)
11985 enable_fast_install=no
11986 # Look at the argument we got. We use all the common list separators.
11987 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11988 for pkg in $enableval; do
11989 IFS=$lt_save_ifs
11990 if test "X$pkg" = "X$p"; then
11991 enable_fast_install=yes
11992 fi
11993 done
11994 IFS=$lt_save_ifs
11995 ;;
11996 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080011997else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070011998 enable_fast_install=yes
11999fi
12000
12001
12002
12003
12004
12005
12006
12007
12008 shared_archive_member_spec=
12009case $host,$enable_shared in
12010power*-*-aix[5-9]*,yes)
Elliott Hughesf344baa2021-12-07 09:12:34 -080012011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
12012printf %s "checking which variant of shared library versioning to provide... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070012013
12014# Check whether --with-aix-soname was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080012015if test ${with_aix_soname+y}
12016then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070012017 withval=$with_aix_soname; case $withval in
12018 aix|svr4|both)
12019 ;;
12020 *)
12021 as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
12022 ;;
12023 esac
12024 lt_cv_with_aix_soname=$with_aix_soname
Elliott Hughesf344baa2021-12-07 09:12:34 -080012025else $as_nop
12026 if test ${lt_cv_with_aix_soname+y}
12027then :
12028 printf %s "(cached) " >&6
12029else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070012030 lt_cv_with_aix_soname=aix
12031fi
12032
12033 with_aix_soname=$lt_cv_with_aix_soname
12034fi
12035
Elliott Hughesf344baa2021-12-07 09:12:34 -080012036 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
12037printf "%s\n" "$with_aix_soname" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070012038 if test aix != "$with_aix_soname"; then
12039 # For the AIX way of multilib, we name the shared archive member
12040 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
12041 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
12042 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
12043 # the AIX toolchain works better with OBJECT_MODE set (default 32).
12044 if test 64 = "${OBJECT_MODE-32}"; then
12045 shared_archive_member_spec=shr_64
12046 else
12047 shared_archive_member_spec=shr
12048 fi
12049 fi
12050 ;;
12051*)
12052 with_aix_soname=aix
12053 ;;
12054esac
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065# This can be used to rebuild libtool when needed
12066LIBTOOL_DEPS=$ltmain
12067
12068# Always use our own libtool.
12069LIBTOOL='$(SHELL) $(top_builddir)/libtool'
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100test -z "$LN_S" && LN_S="ln -s"
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115if test -n "${ZSH_VERSION+set}"; then
12116 setopt NO_GLOB_SUBST
12117fi
12118
Elliott Hughesf344baa2021-12-07 09:12:34 -080012119{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
12120printf %s "checking for objdir... " >&6; }
12121if test ${lt_cv_objdir+y}
12122then :
12123 printf %s "(cached) " >&6
12124else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070012125 rm -f .libs 2>/dev/null
12126mkdir .libs 2>/dev/null
12127if test -d .libs; then
12128 lt_cv_objdir=.libs
12129else
12130 # MS-DOS does not allow filenames that begin with a dot.
12131 lt_cv_objdir=_libs
12132fi
12133rmdir .libs 2>/dev/null
12134fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080012135{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
12136printf "%s\n" "$lt_cv_objdir" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070012137objdir=$lt_cv_objdir
12138
12139
12140
12141
12142
Elliott Hughesf344baa2021-12-07 09:12:34 -080012143printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070012144
12145
12146
12147
12148case $host_os in
12149aix3*)
12150 # AIX sometimes has problems with the GCC collect2 program. For some
12151 # reason, if we set the COLLECT_NAMES environment variable, the problems
12152 # vanish in a puff of smoke.
12153 if test set != "${COLLECT_NAMES+set}"; then
12154 COLLECT_NAMES=
12155 export COLLECT_NAMES
12156 fi
12157 ;;
12158esac
12159
12160# Global variables:
12161ofile=libtool
12162can_build_shared=yes
12163
12164# All known linkers require a '.a' archive for static linking (except MSVC,
12165# which needs '.lib').
12166libext=a
12167
12168with_gnu_ld=$lt_cv_prog_gnu_ld
12169
12170old_CC=$CC
12171old_CFLAGS=$CFLAGS
12172
12173# Set sane defaults for various variables
12174test -z "$CC" && CC=cc
12175test -z "$LTCC" && LTCC=$CC
12176test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
12177test -z "$LD" && LD=ld
12178test -z "$ac_objext" && ac_objext=o
12179
12180func_cc_basename $compiler
12181cc_basename=$func_cc_basename_result
12182
12183
12184# Only perform the check for file, if the check method requires it
12185test -z "$MAGIC_CMD" && MAGIC_CMD=file
12186case $deplibs_check_method in
12187file_magic*)
12188 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080012189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
12190printf %s "checking for ${ac_tool_prefix}file... " >&6; }
12191if test ${lt_cv_path_MAGIC_CMD+y}
12192then :
12193 printf %s "(cached) " >&6
12194else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070012195 case $MAGIC_CMD in
12196[\\/*] | ?:[\\/]*)
12197 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
12198 ;;
12199*)
12200 lt_save_MAGIC_CMD=$MAGIC_CMD
12201 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
12202 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
12203 for ac_dir in $ac_dummy; do
12204 IFS=$lt_save_ifs
12205 test -z "$ac_dir" && ac_dir=.
12206 if test -f "$ac_dir/${ac_tool_prefix}file"; then
12207 lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
12208 if test -n "$file_magic_test_file"; then
12209 case $deplibs_check_method in
12210 "file_magic "*)
12211 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
12212 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
12213 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
12214 $EGREP "$file_magic_regex" > /dev/null; then
12215 :
12216 else
12217 cat <<_LT_EOF 1>&2
12218
12219*** Warning: the command libtool uses to detect shared libraries,
12220*** $file_magic_cmd, produces output that libtool cannot recognize.
12221*** The result is that libtool may fail to recognize shared libraries
12222*** as such. This will affect the creation of libtool libraries that
12223*** depend on shared libraries, but programs linked with such libtool
12224*** libraries will work regardless of this problem. Nevertheless, you
12225*** may want to report the problem to your system manager and/or to
12226*** bug-libtool@gnu.org
12227
12228_LT_EOF
12229 fi ;;
12230 esac
12231 fi
12232 break
12233 fi
12234 done
12235 IFS=$lt_save_ifs
12236 MAGIC_CMD=$lt_save_MAGIC_CMD
12237 ;;
12238esac
12239fi
12240
12241MAGIC_CMD=$lt_cv_path_MAGIC_CMD
12242if test -n "$MAGIC_CMD"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080012243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
12244printf "%s\n" "$MAGIC_CMD" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070012245else
Elliott Hughesf344baa2021-12-07 09:12:34 -080012246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12247printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070012248fi
12249
12250
12251
12252
12253
12254if test -z "$lt_cv_path_MAGIC_CMD"; then
12255 if test -n "$ac_tool_prefix"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080012256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
12257printf %s "checking for file... " >&6; }
12258if test ${lt_cv_path_MAGIC_CMD+y}
12259then :
12260 printf %s "(cached) " >&6
12261else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070012262 case $MAGIC_CMD in
12263[\\/*] | ?:[\\/]*)
12264 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
12265 ;;
12266*)
12267 lt_save_MAGIC_CMD=$MAGIC_CMD
12268 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
12269 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
12270 for ac_dir in $ac_dummy; do
12271 IFS=$lt_save_ifs
12272 test -z "$ac_dir" && ac_dir=.
12273 if test -f "$ac_dir/file"; then
12274 lt_cv_path_MAGIC_CMD=$ac_dir/"file"
12275 if test -n "$file_magic_test_file"; then
12276 case $deplibs_check_method in
12277 "file_magic "*)
12278 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
12279 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
12280 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
12281 $EGREP "$file_magic_regex" > /dev/null; then
12282 :
12283 else
12284 cat <<_LT_EOF 1>&2
12285
12286*** Warning: the command libtool uses to detect shared libraries,
12287*** $file_magic_cmd, produces output that libtool cannot recognize.
12288*** The result is that libtool may fail to recognize shared libraries
12289*** as such. This will affect the creation of libtool libraries that
12290*** depend on shared libraries, but programs linked with such libtool
12291*** libraries will work regardless of this problem. Nevertheless, you
12292*** may want to report the problem to your system manager and/or to
12293*** bug-libtool@gnu.org
12294
12295_LT_EOF
12296 fi ;;
12297 esac
12298 fi
12299 break
12300 fi
12301 done
12302 IFS=$lt_save_ifs
12303 MAGIC_CMD=$lt_save_MAGIC_CMD
12304 ;;
12305esac
12306fi
12307
12308MAGIC_CMD=$lt_cv_path_MAGIC_CMD
12309if test -n "$MAGIC_CMD"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080012310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
12311printf "%s\n" "$MAGIC_CMD" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070012312else
Elliott Hughesf344baa2021-12-07 09:12:34 -080012313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12314printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070012315fi
12316
12317
12318 else
12319 MAGIC_CMD=:
12320 fi
12321fi
12322
12323 fi
12324 ;;
12325esac
12326
12327# Use C for the default configuration in the libtool script
12328
12329lt_save_CC=$CC
12330ac_ext=c
12331ac_cpp='$CPP $CPPFLAGS'
12332ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12333ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12334ac_compiler_gnu=$ac_cv_c_compiler_gnu
12335
12336
12337# Source file extension for C test sources.
12338ac_ext=c
12339
12340# Object file extension for compiled C test sources.
12341objext=o
12342objext=$objext
12343
12344# Code to be used in simple compile tests
12345lt_simple_compile_test_code="int some_variable = 0;"
12346
12347# Code to be used in simple link tests
12348lt_simple_link_test_code='int main(){return(0);}'
12349
12350
12351
12352
12353
12354
12355
12356# If no C compiler was specified, use CC.
12357LTCC=${LTCC-"$CC"}
12358
12359# If no C compiler flags were specified, use CFLAGS.
12360LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
12361
12362# Allow CC to be a program name with arguments.
12363compiler=$CC
12364
12365# Save the default compiler, since it gets overwritten when the other
12366# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
12367compiler_DEFAULT=$CC
12368
12369# save warnings/boilerplate of simple test code
12370ac_outfile=conftest.$ac_objext
12371echo "$lt_simple_compile_test_code" >conftest.$ac_ext
12372eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12373_lt_compiler_boilerplate=`cat conftest.err`
12374$RM conftest*
12375
12376ac_outfile=conftest.$ac_objext
12377echo "$lt_simple_link_test_code" >conftest.$ac_ext
12378eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12379_lt_linker_boilerplate=`cat conftest.err`
12380$RM -r conftest*
12381
12382
12383## CAVEAT EMPTOR:
12384## There is no encapsulation within the following macros, do not change
12385## the running order or otherwise move them around unless you know exactly
12386## what you are doing...
12387if test -n "$compiler"; then
12388
12389lt_prog_compiler_no_builtin_flag=
12390
12391if test yes = "$GCC"; then
12392 case $cc_basename in
12393 nvcc*)
12394 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
12395 *)
12396 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
12397 esac
12398
Elliott Hughesf344baa2021-12-07 09:12:34 -080012399 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
12400printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
12401if test ${lt_cv_prog_compiler_rtti_exceptions+y}
12402then :
12403 printf %s "(cached) " >&6
12404else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070012405 lt_cv_prog_compiler_rtti_exceptions=no
12406 ac_outfile=conftest.$ac_objext
12407 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12408 lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
12409 # Insert the option either (1) after the last *FLAGS variable, or
12410 # (2) before a word containing "conftest.", or (3) at the end.
12411 # Note that $ac_compile itself does not contain backslashes and begins
12412 # with a dollar sign (not a hyphen), so the echo should work correctly.
12413 # The option is referenced via a variable to avoid confusing sed.
12414 lt_compile=`echo "$ac_compile" | $SED \
12415 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12416 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12417 -e 's:$: $lt_compiler_flag:'`
12418 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12419 (eval "$lt_compile" 2>conftest.err)
12420 ac_status=$?
12421 cat conftest.err >&5
12422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12423 if (exit $ac_status) && test -s "$ac_outfile"; then
12424 # The compiler can only warn and ignore the option if not recognized
12425 # So say no if there are warnings other than the usual output.
12426 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
12427 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12428 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
12429 lt_cv_prog_compiler_rtti_exceptions=yes
12430 fi
12431 fi
12432 $RM conftest*
12433
12434fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080012435{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
12436printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070012437
12438if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
12439 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
12440else
12441 :
12442fi
12443
12444fi
12445
12446
12447
12448
12449
12450
12451 lt_prog_compiler_wl=
12452lt_prog_compiler_pic=
12453lt_prog_compiler_static=
12454
12455
12456 if test yes = "$GCC"; then
12457 lt_prog_compiler_wl='-Wl,'
12458 lt_prog_compiler_static='-static'
12459
12460 case $host_os in
12461 aix*)
12462 # All AIX code is PIC.
12463 if test ia64 = "$host_cpu"; then
12464 # AIX 5 now supports IA64 processor
12465 lt_prog_compiler_static='-Bstatic'
12466 fi
12467 lt_prog_compiler_pic='-fPIC'
12468 ;;
12469
12470 amigaos*)
12471 case $host_cpu in
12472 powerpc)
12473 # see comment about AmigaOS4 .so support
12474 lt_prog_compiler_pic='-fPIC'
12475 ;;
12476 m68k)
12477 # FIXME: we need at least 68020 code to build shared libraries, but
12478 # adding the '-m68020' flag to GCC prevents building anything better,
12479 # like '-m68040'.
12480 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
12481 ;;
12482 esac
12483 ;;
12484
12485 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
12486 # PIC is the default for these OSes.
12487 ;;
12488
12489 mingw* | cygwin* | pw32* | os2* | cegcc*)
12490 # This hack is so that the source file can tell whether it is being
12491 # built for inclusion in a dll (and should export symbols for example).
12492 # Although the cygwin gcc ignores -fPIC, still need this for old-style
12493 # (--disable-auto-import) libraries
12494 lt_prog_compiler_pic='-DDLL_EXPORT'
12495 case $host_os in
12496 os2*)
12497 lt_prog_compiler_static='$wl-static'
12498 ;;
12499 esac
12500 ;;
12501
12502 darwin* | rhapsody*)
12503 # PIC is the default on this platform
12504 # Common symbols not allowed in MH_DYLIB files
12505 lt_prog_compiler_pic='-fno-common'
12506 ;;
12507
12508 haiku*)
12509 # PIC is the default for Haiku.
12510 # The "-static" flag exists, but is broken.
12511 lt_prog_compiler_static=
12512 ;;
12513
12514 hpux*)
12515 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
12516 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
12517 # sets the default TLS model and affects inlining.
12518 case $host_cpu in
12519 hppa*64*)
12520 # +Z the default
12521 ;;
12522 *)
12523 lt_prog_compiler_pic='-fPIC'
12524 ;;
12525 esac
12526 ;;
12527
12528 interix[3-9]*)
12529 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
12530 # Instead, we relocate shared libraries at runtime.
12531 ;;
12532
12533 msdosdjgpp*)
12534 # Just because we use GCC doesn't mean we suddenly get shared libraries
12535 # on systems that don't support them.
12536 lt_prog_compiler_can_build_shared=no
12537 enable_shared=no
12538 ;;
12539
12540 *nto* | *qnx*)
12541 # QNX uses GNU C++, but need to define -shared option too, otherwise
12542 # it will coredump.
12543 lt_prog_compiler_pic='-fPIC -shared'
12544 ;;
12545
12546 sysv4*MP*)
12547 if test -d /usr/nec; then
12548 lt_prog_compiler_pic=-Kconform_pic
12549 fi
12550 ;;
12551
12552 *)
12553 lt_prog_compiler_pic='-fPIC'
12554 ;;
12555 esac
12556
12557 case $cc_basename in
12558 nvcc*) # Cuda Compiler Driver 2.2
12559 lt_prog_compiler_wl='-Xlinker '
12560 if test -n "$lt_prog_compiler_pic"; then
12561 lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
12562 fi
12563 ;;
12564 esac
12565 else
12566 # PORTME Check for flag to pass linker flags through the system compiler.
12567 case $host_os in
12568 aix*)
12569 lt_prog_compiler_wl='-Wl,'
12570 if test ia64 = "$host_cpu"; then
12571 # AIX 5 now supports IA64 processor
12572 lt_prog_compiler_static='-Bstatic'
12573 else
12574 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
12575 fi
12576 ;;
12577
12578 darwin* | rhapsody*)
12579 # PIC is the default on this platform
12580 # Common symbols not allowed in MH_DYLIB files
12581 lt_prog_compiler_pic='-fno-common'
12582 case $cc_basename in
12583 nagfor*)
12584 # NAG Fortran compiler
12585 lt_prog_compiler_wl='-Wl,-Wl,,'
12586 lt_prog_compiler_pic='-PIC'
12587 lt_prog_compiler_static='-Bstatic'
12588 ;;
12589 esac
12590 ;;
12591
12592 mingw* | cygwin* | pw32* | os2* | cegcc*)
12593 # This hack is so that the source file can tell whether it is being
12594 # built for inclusion in a dll (and should export symbols for example).
12595 lt_prog_compiler_pic='-DDLL_EXPORT'
12596 case $host_os in
12597 os2*)
12598 lt_prog_compiler_static='$wl-static'
12599 ;;
12600 esac
12601 ;;
12602
12603 hpux9* | hpux10* | hpux11*)
12604 lt_prog_compiler_wl='-Wl,'
12605 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
12606 # not for PA HP-UX.
12607 case $host_cpu in
12608 hppa*64*|ia64*)
12609 # +Z the default
12610 ;;
12611 *)
12612 lt_prog_compiler_pic='+Z'
12613 ;;
12614 esac
12615 # Is there a better lt_prog_compiler_static that works with the bundled CC?
12616 lt_prog_compiler_static='$wl-a ${wl}archive'
12617 ;;
12618
12619 irix5* | irix6* | nonstopux*)
12620 lt_prog_compiler_wl='-Wl,'
12621 # PIC (with -KPIC) is the default.
12622 lt_prog_compiler_static='-non_shared'
12623 ;;
12624
12625 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
12626 case $cc_basename in
12627 # old Intel for x86_64, which still supported -KPIC.
12628 ecc*)
12629 lt_prog_compiler_wl='-Wl,'
12630 lt_prog_compiler_pic='-KPIC'
12631 lt_prog_compiler_static='-static'
12632 ;;
Haibo Huangb51266f2020-03-04 02:22:48 -080012633 # flang / f18. f95 an alias for gfortran or flang on Debian
12634 flang* | f18* | f95*)
12635 lt_prog_compiler_wl='-Wl,'
12636 lt_prog_compiler_pic='-fPIC'
12637 lt_prog_compiler_static='-static'
12638 ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070012639 # icc used to be incompatible with GCC.
12640 # ICC 10 doesn't accept -KPIC any more.
12641 icc* | ifort*)
12642 lt_prog_compiler_wl='-Wl,'
12643 lt_prog_compiler_pic='-fPIC'
12644 lt_prog_compiler_static='-static'
12645 ;;
12646 # Lahey Fortran 8.1.
12647 lf95*)
12648 lt_prog_compiler_wl='-Wl,'
12649 lt_prog_compiler_pic='--shared'
12650 lt_prog_compiler_static='--static'
12651 ;;
12652 nagfor*)
12653 # NAG Fortran compiler
12654 lt_prog_compiler_wl='-Wl,-Wl,,'
12655 lt_prog_compiler_pic='-PIC'
12656 lt_prog_compiler_static='-Bstatic'
12657 ;;
12658 tcc*)
12659 # Fabrice Bellard et al's Tiny C Compiler
12660 lt_prog_compiler_wl='-Wl,'
12661 lt_prog_compiler_pic='-fPIC'
12662 lt_prog_compiler_static='-static'
12663 ;;
12664 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
12665 # Portland Group compilers (*not* the Pentium gcc compiler,
12666 # which looks to be a dead project)
12667 lt_prog_compiler_wl='-Wl,'
12668 lt_prog_compiler_pic='-fpic'
12669 lt_prog_compiler_static='-Bstatic'
12670 ;;
12671 ccc*)
12672 lt_prog_compiler_wl='-Wl,'
12673 # All Alpha code is PIC.
12674 lt_prog_compiler_static='-non_shared'
12675 ;;
12676 xl* | bgxl* | bgf* | mpixl*)
12677 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
12678 lt_prog_compiler_wl='-Wl,'
12679 lt_prog_compiler_pic='-qpic'
12680 lt_prog_compiler_static='-qstaticlink'
12681 ;;
12682 *)
12683 case `$CC -V 2>&1 | sed 5q` in
12684 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
12685 # Sun Fortran 8.3 passes all unrecognized flags to the linker
12686 lt_prog_compiler_pic='-KPIC'
12687 lt_prog_compiler_static='-Bstatic'
12688 lt_prog_compiler_wl=''
12689 ;;
12690 *Sun\ F* | *Sun*Fortran*)
12691 lt_prog_compiler_pic='-KPIC'
12692 lt_prog_compiler_static='-Bstatic'
12693 lt_prog_compiler_wl='-Qoption ld '
12694 ;;
12695 *Sun\ C*)
12696 # Sun C 5.9
12697 lt_prog_compiler_pic='-KPIC'
12698 lt_prog_compiler_static='-Bstatic'
12699 lt_prog_compiler_wl='-Wl,'
12700 ;;
12701 *Intel*\ [CF]*Compiler*)
12702 lt_prog_compiler_wl='-Wl,'
12703 lt_prog_compiler_pic='-fPIC'
12704 lt_prog_compiler_static='-static'
12705 ;;
12706 *Portland\ Group*)
12707 lt_prog_compiler_wl='-Wl,'
12708 lt_prog_compiler_pic='-fpic'
12709 lt_prog_compiler_static='-Bstatic'
12710 ;;
12711 esac
12712 ;;
12713 esac
12714 ;;
12715
12716 newsos6)
12717 lt_prog_compiler_pic='-KPIC'
12718 lt_prog_compiler_static='-Bstatic'
12719 ;;
12720
12721 *nto* | *qnx*)
12722 # QNX uses GNU C++, but need to define -shared option too, otherwise
12723 # it will coredump.
12724 lt_prog_compiler_pic='-fPIC -shared'
12725 ;;
12726
12727 osf3* | osf4* | osf5*)
12728 lt_prog_compiler_wl='-Wl,'
12729 # All OSF/1 code is PIC.
12730 lt_prog_compiler_static='-non_shared'
12731 ;;
12732
12733 rdos*)
12734 lt_prog_compiler_static='-non_shared'
12735 ;;
12736
12737 solaris*)
12738 lt_prog_compiler_pic='-KPIC'
12739 lt_prog_compiler_static='-Bstatic'
12740 case $cc_basename in
12741 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
12742 lt_prog_compiler_wl='-Qoption ld ';;
12743 *)
12744 lt_prog_compiler_wl='-Wl,';;
12745 esac
12746 ;;
12747
12748 sunos4*)
12749 lt_prog_compiler_wl='-Qoption ld '
12750 lt_prog_compiler_pic='-PIC'
12751 lt_prog_compiler_static='-Bstatic'
12752 ;;
12753
12754 sysv4 | sysv4.2uw2* | sysv4.3*)
12755 lt_prog_compiler_wl='-Wl,'
12756 lt_prog_compiler_pic='-KPIC'
12757 lt_prog_compiler_static='-Bstatic'
12758 ;;
12759
12760 sysv4*MP*)
12761 if test -d /usr/nec; then
12762 lt_prog_compiler_pic='-Kconform_pic'
12763 lt_prog_compiler_static='-Bstatic'
12764 fi
12765 ;;
12766
12767 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
12768 lt_prog_compiler_wl='-Wl,'
12769 lt_prog_compiler_pic='-KPIC'
12770 lt_prog_compiler_static='-Bstatic'
12771 ;;
12772
12773 unicos*)
12774 lt_prog_compiler_wl='-Wl,'
12775 lt_prog_compiler_can_build_shared=no
12776 ;;
12777
12778 uts4*)
12779 lt_prog_compiler_pic='-pic'
12780 lt_prog_compiler_static='-Bstatic'
12781 ;;
12782
12783 *)
12784 lt_prog_compiler_can_build_shared=no
12785 ;;
12786 esac
12787 fi
12788
12789case $host_os in
12790 # For platforms that do not support PIC, -DPIC is meaningless:
12791 *djgpp*)
12792 lt_prog_compiler_pic=
12793 ;;
12794 *)
12795 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
12796 ;;
12797esac
12798
Elliott Hughesf344baa2021-12-07 09:12:34 -080012799{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
12800printf %s "checking for $compiler option to produce PIC... " >&6; }
12801if test ${lt_cv_prog_compiler_pic+y}
12802then :
12803 printf %s "(cached) " >&6
12804else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070012805 lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
12806fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080012807{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
12808printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070012809lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
12810
12811#
12812# Check to make sure the PIC flag actually works.
12813#
12814if test -n "$lt_prog_compiler_pic"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080012815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
12816printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
12817if test ${lt_cv_prog_compiler_pic_works+y}
12818then :
12819 printf %s "(cached) " >&6
12820else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070012821 lt_cv_prog_compiler_pic_works=no
12822 ac_outfile=conftest.$ac_objext
12823 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12824 lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
12825 # Insert the option either (1) after the last *FLAGS variable, or
12826 # (2) before a word containing "conftest.", or (3) at the end.
12827 # Note that $ac_compile itself does not contain backslashes and begins
12828 # with a dollar sign (not a hyphen), so the echo should work correctly.
12829 # The option is referenced via a variable to avoid confusing sed.
12830 lt_compile=`echo "$ac_compile" | $SED \
12831 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12832 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12833 -e 's:$: $lt_compiler_flag:'`
12834 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12835 (eval "$lt_compile" 2>conftest.err)
12836 ac_status=$?
12837 cat conftest.err >&5
12838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12839 if (exit $ac_status) && test -s "$ac_outfile"; then
12840 # The compiler can only warn and ignore the option if not recognized
12841 # So say no if there are warnings other than the usual output.
12842 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
12843 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12844 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
12845 lt_cv_prog_compiler_pic_works=yes
12846 fi
12847 fi
12848 $RM conftest*
12849
12850fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080012851{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
12852printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070012853
12854if test yes = "$lt_cv_prog_compiler_pic_works"; then
12855 case $lt_prog_compiler_pic in
12856 "" | " "*) ;;
12857 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
12858 esac
12859else
12860 lt_prog_compiler_pic=
12861 lt_prog_compiler_can_build_shared=no
12862fi
12863
12864fi
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876#
12877# Check to make sure the static flag actually works.
12878#
12879wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
Elliott Hughesf344baa2021-12-07 09:12:34 -080012880{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
12881printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
12882if test ${lt_cv_prog_compiler_static_works+y}
12883then :
12884 printf %s "(cached) " >&6
12885else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070012886 lt_cv_prog_compiler_static_works=no
12887 save_LDFLAGS=$LDFLAGS
12888 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
12889 echo "$lt_simple_link_test_code" > conftest.$ac_ext
12890 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12891 # The linker can only warn and ignore the option if not recognized
12892 # So say no if there are warnings
12893 if test -s conftest.err; then
12894 # Append any errors to the config.log.
12895 cat conftest.err 1>&5
12896 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12897 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12898 if diff conftest.exp conftest.er2 >/dev/null; then
12899 lt_cv_prog_compiler_static_works=yes
12900 fi
12901 else
12902 lt_cv_prog_compiler_static_works=yes
12903 fi
12904 fi
12905 $RM -r conftest*
12906 LDFLAGS=$save_LDFLAGS
12907
12908fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080012909{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
12910printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070012911
12912if test yes = "$lt_cv_prog_compiler_static_works"; then
12913 :
12914else
12915 lt_prog_compiler_static=
12916fi
12917
12918
12919
12920
12921
12922
12923
Elliott Hughesf344baa2021-12-07 09:12:34 -080012924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
12925printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
12926if test ${lt_cv_prog_compiler_c_o+y}
12927then :
12928 printf %s "(cached) " >&6
12929else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070012930 lt_cv_prog_compiler_c_o=no
12931 $RM -r conftest 2>/dev/null
12932 mkdir conftest
12933 cd conftest
12934 mkdir out
12935 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12936
12937 lt_compiler_flag="-o out/conftest2.$ac_objext"
12938 # Insert the option either (1) after the last *FLAGS variable, or
12939 # (2) before a word containing "conftest.", or (3) at the end.
12940 # Note that $ac_compile itself does not contain backslashes and begins
12941 # with a dollar sign (not a hyphen), so the echo should work correctly.
12942 lt_compile=`echo "$ac_compile" | $SED \
12943 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12944 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12945 -e 's:$: $lt_compiler_flag:'`
12946 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12947 (eval "$lt_compile" 2>out/conftest.err)
12948 ac_status=$?
12949 cat out/conftest.err >&5
12950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12951 if (exit $ac_status) && test -s out/conftest2.$ac_objext
12952 then
12953 # The compiler can only warn and ignore the option if not recognized
12954 # So say no if there are warnings
12955 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
12956 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12957 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12958 lt_cv_prog_compiler_c_o=yes
12959 fi
12960 fi
12961 chmod u+w . 2>&5
12962 $RM conftest*
12963 # SGI C++ compiler will create directory out/ii_files/ for
12964 # template instantiation
12965 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
12966 $RM out/* && rmdir out
12967 cd ..
12968 $RM -r conftest
12969 $RM conftest*
12970
12971fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080012972{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
12973printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070012974
12975
12976
12977
12978
12979
Elliott Hughesf344baa2021-12-07 09:12:34 -080012980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
12981printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
12982if test ${lt_cv_prog_compiler_c_o+y}
12983then :
12984 printf %s "(cached) " >&6
12985else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070012986 lt_cv_prog_compiler_c_o=no
12987 $RM -r conftest 2>/dev/null
12988 mkdir conftest
12989 cd conftest
12990 mkdir out
12991 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12992
12993 lt_compiler_flag="-o out/conftest2.$ac_objext"
12994 # Insert the option either (1) after the last *FLAGS variable, or
12995 # (2) before a word containing "conftest.", or (3) at the end.
12996 # Note that $ac_compile itself does not contain backslashes and begins
12997 # with a dollar sign (not a hyphen), so the echo should work correctly.
12998 lt_compile=`echo "$ac_compile" | $SED \
12999 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13000 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13001 -e 's:$: $lt_compiler_flag:'`
13002 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
13003 (eval "$lt_compile" 2>out/conftest.err)
13004 ac_status=$?
13005 cat out/conftest.err >&5
13006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13007 if (exit $ac_status) && test -s out/conftest2.$ac_objext
13008 then
13009 # The compiler can only warn and ignore the option if not recognized
13010 # So say no if there are warnings
13011 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
13012 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
13013 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
13014 lt_cv_prog_compiler_c_o=yes
13015 fi
13016 fi
13017 chmod u+w . 2>&5
13018 $RM conftest*
13019 # SGI C++ compiler will create directory out/ii_files/ for
13020 # template instantiation
13021 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
13022 $RM out/* && rmdir out
13023 cd ..
13024 $RM -r conftest
13025 $RM conftest*
13026
13027fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080013028{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
13029printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070013030
13031
13032
13033
13034hard_links=nottested
13035if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
13036 # do not overwrite the value of need_locks provided by the user
Elliott Hughesf344baa2021-12-07 09:12:34 -080013037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
13038printf %s "checking if we can lock with hard links... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070013039 hard_links=yes
13040 $RM conftest*
13041 ln conftest.a conftest.b 2>/dev/null && hard_links=no
13042 touch conftest.a
13043 ln conftest.a conftest.b 2>&5 || hard_links=no
13044 ln conftest.a conftest.b 2>/dev/null && hard_links=no
Elliott Hughesf344baa2021-12-07 09:12:34 -080013045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
13046printf "%s\n" "$hard_links" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070013047 if test no = "$hard_links"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080013048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
13049printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070013050 need_locks=warn
13051 fi
13052else
13053 need_locks=no
13054fi
13055
13056
13057
13058
13059
13060
Elliott Hughesf344baa2021-12-07 09:12:34 -080013061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
13062printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070013063
13064 runpath_var=
13065 allow_undefined_flag=
13066 always_export_symbols=no
13067 archive_cmds=
13068 archive_expsym_cmds=
13069 compiler_needs_object=no
13070 enable_shared_with_static_runtimes=no
13071 export_dynamic_flag_spec=
13072 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
13073 hardcode_automatic=no
13074 hardcode_direct=no
13075 hardcode_direct_absolute=no
13076 hardcode_libdir_flag_spec=
13077 hardcode_libdir_separator=
13078 hardcode_minus_L=no
13079 hardcode_shlibpath_var=unsupported
13080 inherit_rpath=no
13081 link_all_deplibs=unknown
13082 module_cmds=
13083 module_expsym_cmds=
13084 old_archive_from_new_cmds=
13085 old_archive_from_expsyms_cmds=
13086 thread_safe_flag_spec=
13087 whole_archive_flag_spec=
13088 # include_expsyms should be a list of space-separated symbols to be *always*
13089 # included in the symbol list
13090 include_expsyms=
13091 # exclude_expsyms can be an extended regexp of symbols to exclude
13092 # it will be wrapped by ' (' and ')$', so one must not match beginning or
13093 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
13094 # as well as any symbol that contains 'd'.
13095 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
13096 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
13097 # platforms (ab)use it in PIC code, but their linkers get confused if
13098 # the symbol is explicitly referenced. Since portable code cannot
13099 # rely on this symbol name, it's probably fine to never include it in
13100 # preloaded symbol tables.
13101 # Exclude shared library initialization/finalization symbols.
13102 extract_expsyms_cmds=
13103
13104 case $host_os in
13105 cygwin* | mingw* | pw32* | cegcc*)
13106 # FIXME: the MSVC++ port hasn't been tested in a loooong time
13107 # When not using gcc, we currently assume that we are using
13108 # Microsoft Visual C++.
13109 if test yes != "$GCC"; then
13110 with_gnu_ld=no
13111 fi
13112 ;;
13113 interix*)
13114 # we just hope/assume this is gcc and not c89 (= MSVC++)
13115 with_gnu_ld=yes
13116 ;;
13117 openbsd* | bitrig*)
13118 with_gnu_ld=no
13119 ;;
13120 linux* | k*bsd*-gnu | gnu*)
13121 link_all_deplibs=no
13122 ;;
13123 esac
13124
13125 ld_shlibs=yes
13126
13127 # On some targets, GNU ld is compatible enough with the native linker
13128 # that we're better off using the native interface for both.
13129 lt_use_gnu_ld_interface=no
13130 if test yes = "$with_gnu_ld"; then
13131 case $host_os in
13132 aix*)
13133 # The AIX port of GNU ld has always aspired to compatibility
13134 # with the native linker. However, as the warning in the GNU ld
13135 # block says, versions before 2.19.5* couldn't really create working
13136 # shared libraries, regardless of the interface used.
13137 case `$LD -v 2>&1` in
13138 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
13139 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
13140 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
13141 *)
13142 lt_use_gnu_ld_interface=yes
13143 ;;
13144 esac
13145 ;;
13146 *)
13147 lt_use_gnu_ld_interface=yes
13148 ;;
13149 esac
13150 fi
13151
13152 if test yes = "$lt_use_gnu_ld_interface"; then
13153 # If archive_cmds runs LD, not CC, wlarc should be empty
13154 wlarc='$wl'
13155
13156 # Set some defaults for GNU ld with shared library support. These
13157 # are reset later if shared libraries are not supported. Putting them
13158 # here allows them to be overridden if necessary.
13159 runpath_var=LD_RUN_PATH
13160 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13161 export_dynamic_flag_spec='$wl--export-dynamic'
13162 # ancient GNU ld didn't support --whole-archive et. al.
13163 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
13164 whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
13165 else
13166 whole_archive_flag_spec=
13167 fi
13168 supports_anon_versioning=no
13169 case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
13170 *GNU\ gold*) supports_anon_versioning=yes ;;
13171 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
13172 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
13173 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
13174 *\ 2.11.*) ;; # other 2.11 versions
13175 *) supports_anon_versioning=yes ;;
13176 esac
13177
13178 # See if GNU ld supports shared libraries.
13179 case $host_os in
13180 aix[3-9]*)
13181 # On AIX/PPC, the GNU linker is very broken
13182 if test ia64 != "$host_cpu"; then
13183 ld_shlibs=no
13184 cat <<_LT_EOF 1>&2
13185
13186*** Warning: the GNU linker, at least up to release 2.19, is reported
13187*** to be unable to reliably create shared libraries on AIX.
13188*** Therefore, libtool is disabling shared libraries support. If you
13189*** really care for shared libraries, you may want to install binutils
13190*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
13191*** You will then need to restart the configuration process.
13192
13193_LT_EOF
13194 fi
13195 ;;
13196
13197 amigaos*)
13198 case $host_cpu in
13199 powerpc)
13200 # see comment about AmigaOS4 .so support
13201 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13202 archive_expsym_cmds=''
13203 ;;
13204 m68k)
13205 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
13206 hardcode_libdir_flag_spec='-L$libdir'
13207 hardcode_minus_L=yes
13208 ;;
13209 esac
13210 ;;
13211
13212 beos*)
13213 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13214 allow_undefined_flag=unsupported
13215 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
13216 # support --undefined. This deserves some investigation. FIXME
13217 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13218 else
13219 ld_shlibs=no
13220 fi
13221 ;;
13222
13223 cygwin* | mingw* | pw32* | cegcc*)
13224 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
13225 # as there is no search path for DLLs.
13226 hardcode_libdir_flag_spec='-L$libdir'
13227 export_dynamic_flag_spec='$wl--export-all-symbols'
13228 allow_undefined_flag=unsupported
13229 always_export_symbols=no
13230 enable_shared_with_static_runtimes=yes
13231 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
13232 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
13233
13234 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
13235 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
13236 # If the export-symbols file already is a .def file, use it as
13237 # is; otherwise, prepend EXPORTS...
13238 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
13239 cp $export_symbols $output_objdir/$soname.def;
13240 else
13241 echo EXPORTS > $output_objdir/$soname.def;
13242 cat $export_symbols >> $output_objdir/$soname.def;
13243 fi~
13244 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
13245 else
13246 ld_shlibs=no
13247 fi
13248 ;;
13249
13250 haiku*)
13251 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13252 link_all_deplibs=yes
13253 ;;
13254
13255 os2*)
13256 hardcode_libdir_flag_spec='-L$libdir'
13257 hardcode_minus_L=yes
13258 allow_undefined_flag=unsupported
13259 shrext_cmds=.dll
13260 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13261 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13262 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13263 $ECHO EXPORTS >> $output_objdir/$libname.def~
13264 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
13265 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13266 emximp -o $lib $output_objdir/$libname.def'
13267 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13268 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13269 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13270 $ECHO EXPORTS >> $output_objdir/$libname.def~
13271 prefix_cmds="$SED"~
13272 if test EXPORTS = "`$SED 1q $export_symbols`"; then
13273 prefix_cmds="$prefix_cmds -e 1d";
13274 fi~
13275 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
13276 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
13277 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13278 emximp -o $lib $output_objdir/$libname.def'
13279 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
13280 enable_shared_with_static_runtimes=yes
13281 ;;
13282
13283 interix[3-9]*)
13284 hardcode_direct=no
13285 hardcode_shlibpath_var=no
13286 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
13287 export_dynamic_flag_spec='$wl-E'
13288 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
13289 # Instead, shared libraries are loaded at an image base (0x10000000 by
13290 # default) and relocated if they conflict, which is a slow very memory
13291 # consuming and fragmenting process. To avoid this, we pick a random,
13292 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
13293 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
13294 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
13295 archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
13296 ;;
13297
13298 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
13299 tmp_diet=no
13300 if test linux-dietlibc = "$host_os"; then
13301 case $cc_basename in
13302 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
13303 esac
13304 fi
13305 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
13306 && test no = "$tmp_diet"
13307 then
13308 tmp_addflag=' $pic_flag'
13309 tmp_sharedflag='-shared'
13310 case $cc_basename,$host_cpu in
13311 pgcc*) # Portland Group C compiler
13312 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
13313 tmp_addflag=' $pic_flag'
13314 ;;
13315 pgf77* | pgf90* | pgf95* | pgfortran*)
13316 # Portland Group f77 and f90 compilers
13317 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
13318 tmp_addflag=' $pic_flag -Mnomain' ;;
13319 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
13320 tmp_addflag=' -i_dynamic' ;;
13321 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
13322 tmp_addflag=' -i_dynamic -nofor_main' ;;
13323 ifc* | ifort*) # Intel Fortran compiler
13324 tmp_addflag=' -nofor_main' ;;
13325 lf95*) # Lahey Fortran 8.1
13326 whole_archive_flag_spec=
13327 tmp_sharedflag='--shared' ;;
13328 nagfor*) # NAGFOR 5.3
13329 tmp_sharedflag='-Wl,-shared' ;;
13330 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
13331 tmp_sharedflag='-qmkshrobj'
13332 tmp_addflag= ;;
13333 nvcc*) # Cuda Compiler Driver 2.2
13334 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
13335 compiler_needs_object=yes
13336 ;;
13337 esac
13338 case `$CC -V 2>&1 | sed 5q` in
13339 *Sun\ C*) # Sun C 5.9
13340 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
13341 compiler_needs_object=yes
13342 tmp_sharedflag='-G' ;;
13343 *Sun\ F*) # Sun Fortran 8.3
13344 tmp_sharedflag='-G' ;;
13345 esac
13346 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13347
13348 if test yes = "$supports_anon_versioning"; then
13349 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
13350 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
13351 echo "local: *; };" >> $output_objdir/$libname.ver~
13352 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
13353 fi
13354
13355 case $cc_basename in
13356 tcc*)
13357 export_dynamic_flag_spec='-rdynamic'
13358 ;;
13359 xlf* | bgf* | bgxlf* | mpixlf*)
13360 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
13361 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
13362 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13363 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
13364 if test yes = "$supports_anon_versioning"; then
13365 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
13366 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
13367 echo "local: *; };" >> $output_objdir/$libname.ver~
13368 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
13369 fi
13370 ;;
13371 esac
13372 else
13373 ld_shlibs=no
13374 fi
13375 ;;
13376
13377 netbsd* | netbsdelf*-gnu)
13378 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13379 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
13380 wlarc=
13381 else
13382 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13383 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13384 fi
13385 ;;
13386
13387 solaris*)
13388 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
13389 ld_shlibs=no
13390 cat <<_LT_EOF 1>&2
13391
13392*** Warning: The releases 2.8.* of the GNU linker cannot reliably
13393*** create shared libraries on Solaris systems. Therefore, libtool
13394*** is disabling shared libraries support. We urge you to upgrade GNU
13395*** binutils to release 2.9.1 or newer. Another option is to modify
13396*** your PATH or compiler configuration so that the native linker is
13397*** used, and then restart.
13398
13399_LT_EOF
13400 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13401 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13402 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13403 else
13404 ld_shlibs=no
13405 fi
13406 ;;
13407
13408 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
13409 case `$LD -v 2>&1` in
13410 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
13411 ld_shlibs=no
13412 cat <<_LT_EOF 1>&2
13413
13414*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
13415*** reliably create shared libraries on SCO systems. Therefore, libtool
13416*** is disabling shared libraries support. We urge you to upgrade GNU
13417*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
13418*** your PATH or compiler configuration so that the native linker is
13419*** used, and then restart.
13420
13421_LT_EOF
13422 ;;
13423 *)
13424 # For security reasons, it is highly recommended that you always
13425 # use absolute paths for naming shared libraries, and exclude the
13426 # DT_RUNPATH tag from executables and libraries. But doing so
13427 # requires that you compile everything twice, which is a pain.
13428 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13429 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13430 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13431 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13432 else
13433 ld_shlibs=no
13434 fi
13435 ;;
13436 esac
13437 ;;
13438
13439 sunos4*)
13440 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
13441 wlarc=
13442 hardcode_direct=yes
13443 hardcode_shlibpath_var=no
13444 ;;
13445
13446 *)
13447 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13448 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13449 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13450 else
13451 ld_shlibs=no
13452 fi
13453 ;;
13454 esac
13455
13456 if test no = "$ld_shlibs"; then
13457 runpath_var=
13458 hardcode_libdir_flag_spec=
13459 export_dynamic_flag_spec=
13460 whole_archive_flag_spec=
13461 fi
13462 else
13463 # PORTME fill in a description of your system's linker (not GNU ld)
13464 case $host_os in
13465 aix3*)
13466 allow_undefined_flag=unsupported
13467 always_export_symbols=yes
13468 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
13469 # Note: this linker hardcodes the directories in LIBPATH if there
13470 # are no directories specified by -L.
13471 hardcode_minus_L=yes
13472 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
13473 # Neither direct hardcoding nor static linking is supported with a
13474 # broken collect2.
13475 hardcode_direct=unsupported
13476 fi
13477 ;;
13478
13479 aix[4-9]*)
13480 if test ia64 = "$host_cpu"; then
13481 # On IA64, the linker does run time linking by default, so we don't
13482 # have to do anything special.
13483 aix_use_runtimelinking=no
13484 exp_sym_flag='-Bexport'
13485 no_entry_flag=
13486 else
13487 # If we're using GNU nm, then we don't want the "-C" option.
13488 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
13489 # Without the "-l" option, or with the "-B" option, AIX nm treats
13490 # weak defined symbols like other global defined symbols, whereas
13491 # GNU nm marks them as "W".
13492 # While the 'weak' keyword is ignored in the Export File, we need
13493 # it in the Import File for the 'aix-soname' feature, so we have
13494 # to replace the "-B" option with "-P" for AIX nm.
13495 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
13496 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
13497 else
13498 export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
13499 fi
13500 aix_use_runtimelinking=no
13501
13502 # Test if we are trying to use run time linking or normal
13503 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
13504 # have runtime linking enabled, and use it for executables.
13505 # For shared libraries, we enable/disable runtime linking
13506 # depending on the kind of the shared library created -
13507 # when "with_aix_soname,aix_use_runtimelinking" is:
13508 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
13509 # "aix,yes" lib.so shared, rtl:yes, for executables
13510 # lib.a static archive
13511 # "both,no" lib.so.V(shr.o) shared, rtl:yes
13512 # lib.a(lib.so.V) shared, rtl:no, for executables
13513 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
13514 # lib.a(lib.so.V) shared, rtl:no
13515 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
13516 # lib.a static archive
13517 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
13518 for ld_flag in $LDFLAGS; do
13519 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
13520 aix_use_runtimelinking=yes
13521 break
13522 fi
13523 done
13524 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
13525 # With aix-soname=svr4, we create the lib.so.V shared archives only,
13526 # so we don't have lib.a shared libs to link our executables.
13527 # We have to force runtime linking in this case.
13528 aix_use_runtimelinking=yes
13529 LDFLAGS="$LDFLAGS -Wl,-brtl"
13530 fi
13531 ;;
13532 esac
13533
13534 exp_sym_flag='-bexport'
13535 no_entry_flag='-bnoentry'
13536 fi
13537
13538 # When large executables or shared objects are built, AIX ld can
13539 # have problems creating the table of contents. If linking a library
13540 # or program results in "error TOC overflow" add -mminimal-toc to
13541 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
13542 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
13543
13544 archive_cmds=''
13545 hardcode_direct=yes
13546 hardcode_direct_absolute=yes
13547 hardcode_libdir_separator=':'
13548 link_all_deplibs=yes
13549 file_list_spec='$wl-f,'
13550 case $with_aix_soname,$aix_use_runtimelinking in
13551 aix,*) ;; # traditional, no import file
13552 svr4,* | *,yes) # use import file
13553 # The Import File defines what to hardcode.
13554 hardcode_direct=no
13555 hardcode_direct_absolute=no
13556 ;;
13557 esac
13558
13559 if test yes = "$GCC"; then
13560 case $host_os in aix4.[012]|aix4.[012].*)
13561 # We only want to do this on AIX 4.2 and lower, the check
13562 # below for broken collect2 doesn't work under 4.3+
13563 collect2name=`$CC -print-prog-name=collect2`
13564 if test -f "$collect2name" &&
13565 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
13566 then
13567 # We have reworked collect2
13568 :
13569 else
13570 # We have old collect2
13571 hardcode_direct=unsupported
13572 # It fails to find uninstalled libraries when the uninstalled
13573 # path is not listed in the libpath. Setting hardcode_minus_L
13574 # to unsupported forces relinking
13575 hardcode_minus_L=yes
13576 hardcode_libdir_flag_spec='-L$libdir'
13577 hardcode_libdir_separator=
13578 fi
13579 ;;
13580 esac
13581 shared_flag='-shared'
13582 if test yes = "$aix_use_runtimelinking"; then
13583 shared_flag="$shared_flag "'$wl-G'
13584 fi
13585 # Need to ensure runtime linking is disabled for the traditional
13586 # shared library, or the linker may eventually find shared libraries
13587 # /with/ Import File - we do not want to mix them.
13588 shared_flag_aix='-shared'
13589 shared_flag_svr4='-shared $wl-G'
13590 else
13591 # not using gcc
13592 if test ia64 = "$host_cpu"; then
13593 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
13594 # chokes on -Wl,-G. The following line is correct:
13595 shared_flag='-G'
13596 else
13597 if test yes = "$aix_use_runtimelinking"; then
13598 shared_flag='$wl-G'
13599 else
13600 shared_flag='$wl-bM:SRE'
13601 fi
13602 shared_flag_aix='$wl-bM:SRE'
13603 shared_flag_svr4='$wl-G'
13604 fi
13605 fi
13606
13607 export_dynamic_flag_spec='$wl-bexpall'
13608 # It seems that -bexpall does not export symbols beginning with
13609 # underscore (_), so it is better to generate a list of symbols to export.
13610 always_export_symbols=yes
13611 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
13612 # Warning - without using the other runtime loading flags (-brtl),
13613 # -berok will link without error, but may produce a broken library.
13614 allow_undefined_flag='-berok'
13615 # Determine the default libpath from the value encoded in an
13616 # empty executable.
13617 if test set = "${lt_cv_aix_libpath+set}"; then
13618 aix_libpath=$lt_cv_aix_libpath
13619else
Elliott Hughesf344baa2021-12-07 09:12:34 -080013620 if test ${lt_cv_aix_libpath_+y}
13621then :
13622 printf %s "(cached) " >&6
13623else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070013624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13625/* end confdefs.h. */
13626
13627int main (void)
13628{
13629
13630 ;
13631 return 0;
13632}
13633_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080013634if ac_fn_c_try_link "$LINENO"
13635then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070013636
13637 lt_aix_libpath_sed='
13638 /Import File Strings/,/^$/ {
13639 /^0/ {
13640 s/^0 *\([^ ]*\) *$/\1/
13641 p
13642 }
13643 }'
13644 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13645 # Check for a 64-bit object if we didn't find anything.
13646 if test -z "$lt_cv_aix_libpath_"; then
13647 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13648 fi
13649fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080013650rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070013651 conftest$ac_exeext conftest.$ac_ext
13652 if test -z "$lt_cv_aix_libpath_"; then
13653 lt_cv_aix_libpath_=/usr/lib:/lib
13654 fi
13655
13656fi
13657
13658 aix_libpath=$lt_cv_aix_libpath_
13659fi
13660
13661 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
13662 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
13663 else
13664 if test ia64 = "$host_cpu"; then
13665 hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
13666 allow_undefined_flag="-z nodefs"
13667 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
13668 else
13669 # Determine the default libpath from the value encoded in an
13670 # empty executable.
13671 if test set = "${lt_cv_aix_libpath+set}"; then
13672 aix_libpath=$lt_cv_aix_libpath
13673else
Elliott Hughesf344baa2021-12-07 09:12:34 -080013674 if test ${lt_cv_aix_libpath_+y}
13675then :
13676 printf %s "(cached) " >&6
13677else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070013678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13679/* end confdefs.h. */
13680
13681int main (void)
13682{
13683
13684 ;
13685 return 0;
13686}
13687_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080013688if ac_fn_c_try_link "$LINENO"
13689then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070013690
13691 lt_aix_libpath_sed='
13692 /Import File Strings/,/^$/ {
13693 /^0/ {
13694 s/^0 *\([^ ]*\) *$/\1/
13695 p
13696 }
13697 }'
13698 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13699 # Check for a 64-bit object if we didn't find anything.
13700 if test -z "$lt_cv_aix_libpath_"; then
13701 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13702 fi
13703fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080013704rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070013705 conftest$ac_exeext conftest.$ac_ext
13706 if test -z "$lt_cv_aix_libpath_"; then
13707 lt_cv_aix_libpath_=/usr/lib:/lib
13708 fi
13709
13710fi
13711
13712 aix_libpath=$lt_cv_aix_libpath_
13713fi
13714
13715 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
13716 # Warning - without using the other run time loading flags,
13717 # -berok will link without error, but may produce a broken library.
13718 no_undefined_flag=' $wl-bernotok'
13719 allow_undefined_flag=' $wl-berok'
13720 if test yes = "$with_gnu_ld"; then
13721 # We only use this code for GNU lds that support --whole-archive.
13722 whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
13723 else
13724 # Exported symbols can be pulled into shared objects from archives
13725 whole_archive_flag_spec='$convenience'
13726 fi
13727 archive_cmds_need_lc=yes
13728 archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
13729 # -brtl affects multiple linker settings, -berok does not and is overridden later
13730 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
13731 if test svr4 != "$with_aix_soname"; then
13732 # This is similar to how AIX traditionally builds its shared libraries.
13733 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
13734 fi
13735 if test aix != "$with_aix_soname"; then
13736 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
13737 else
13738 # used by -dlpreopen to get the symbols
13739 archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
13740 fi
13741 archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
13742 fi
13743 fi
13744 ;;
13745
13746 amigaos*)
13747 case $host_cpu in
13748 powerpc)
13749 # see comment about AmigaOS4 .so support
13750 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13751 archive_expsym_cmds=''
13752 ;;
13753 m68k)
13754 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
13755 hardcode_libdir_flag_spec='-L$libdir'
13756 hardcode_minus_L=yes
13757 ;;
13758 esac
13759 ;;
13760
13761 bsdi[45]*)
13762 export_dynamic_flag_spec=-rdynamic
13763 ;;
13764
13765 cygwin* | mingw* | pw32* | cegcc*)
13766 # When not using gcc, we currently assume that we are using
13767 # Microsoft Visual C++.
13768 # hardcode_libdir_flag_spec is actually meaningless, as there is
13769 # no search path for DLLs.
13770 case $cc_basename in
13771 cl*)
13772 # Native MSVC
13773 hardcode_libdir_flag_spec=' '
13774 allow_undefined_flag=unsupported
13775 always_export_symbols=yes
13776 file_list_spec='@'
13777 # Tell ltmain to make .lib files, not .a files.
13778 libext=lib
13779 # Tell ltmain to make .dll files, not .so files.
13780 shrext_cmds=.dll
13781 # FIXME: Setting linknames here is a bad hack.
13782 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
13783 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
13784 cp "$export_symbols" "$output_objdir/$soname.def";
13785 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
13786 else
13787 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
13788 fi~
13789 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
13790 linknames='
13791 # The linker will not automatically build a static lib if we build a DLL.
13792 # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
13793 enable_shared_with_static_runtimes=yes
13794 exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
13795 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
13796 # Don't use ranlib
13797 old_postinstall_cmds='chmod 644 $oldlib'
13798 postlink_cmds='lt_outputfile="@OUTPUT@"~
13799 lt_tool_outputfile="@TOOL_OUTPUT@"~
13800 case $lt_outputfile in
13801 *.exe|*.EXE) ;;
13802 *)
13803 lt_outputfile=$lt_outputfile.exe
13804 lt_tool_outputfile=$lt_tool_outputfile.exe
13805 ;;
13806 esac~
13807 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
13808 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
13809 $RM "$lt_outputfile.manifest";
13810 fi'
13811 ;;
13812 *)
13813 # Assume MSVC wrapper
13814 hardcode_libdir_flag_spec=' '
13815 allow_undefined_flag=unsupported
13816 # Tell ltmain to make .lib files, not .a files.
13817 libext=lib
13818 # Tell ltmain to make .dll files, not .so files.
13819 shrext_cmds=.dll
13820 # FIXME: Setting linknames here is a bad hack.
13821 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
13822 # The linker will automatically build a .lib file if we build a DLL.
13823 old_archive_from_new_cmds='true'
13824 # FIXME: Should let the user specify the lib program.
13825 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
13826 enable_shared_with_static_runtimes=yes
13827 ;;
13828 esac
13829 ;;
13830
13831 darwin* | rhapsody*)
13832
13833
13834 archive_cmds_need_lc=no
13835 hardcode_direct=no
13836 hardcode_automatic=yes
13837 hardcode_shlibpath_var=unsupported
13838 if test yes = "$lt_cv_ld_force_load"; then
13839 whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
13840
13841 else
13842 whole_archive_flag_spec=''
13843 fi
13844 link_all_deplibs=yes
13845 allow_undefined_flag=$_lt_dar_allow_undefined
13846 case $cc_basename in
13847 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
13848 *) _lt_dar_can_shared=$GCC ;;
13849 esac
13850 if test yes = "$_lt_dar_can_shared"; then
13851 output_verbose_link_cmd=func_echo_all
13852 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
13853 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
13854 archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
13855 module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
13856
13857 else
13858 ld_shlibs=no
13859 fi
13860
13861 ;;
13862
13863 dgux*)
13864 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13865 hardcode_libdir_flag_spec='-L$libdir'
13866 hardcode_shlibpath_var=no
13867 ;;
13868
13869 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13870 # support. Future versions do this automatically, but an explicit c++rt0.o
13871 # does not break anything, and helps significantly (at the cost of a little
13872 # extra space).
13873 freebsd2.2*)
13874 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
13875 hardcode_libdir_flag_spec='-R$libdir'
13876 hardcode_direct=yes
13877 hardcode_shlibpath_var=no
13878 ;;
13879
13880 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
13881 freebsd2.*)
13882 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
13883 hardcode_direct=yes
13884 hardcode_minus_L=yes
13885 hardcode_shlibpath_var=no
13886 ;;
13887
13888 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
13889 freebsd* | dragonfly*)
13890 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13891 hardcode_libdir_flag_spec='-R$libdir'
13892 hardcode_direct=yes
13893 hardcode_shlibpath_var=no
13894 ;;
13895
13896 hpux9*)
13897 if test yes = "$GCC"; then
Haibo Huangb5a52b92020-10-28 22:18:23 -070013898 archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
Elliott Hughes82be86d2017-09-20 17:00:17 -070013899 else
Haibo Huangb5a52b92020-10-28 22:18:23 -070013900 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
Elliott Hughes82be86d2017-09-20 17:00:17 -070013901 fi
13902 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13903 hardcode_libdir_separator=:
13904 hardcode_direct=yes
13905
13906 # hardcode_minus_L: Not really in the search PATH,
13907 # but as the default location of the library.
13908 hardcode_minus_L=yes
13909 export_dynamic_flag_spec='$wl-E'
13910 ;;
13911
13912 hpux10*)
13913 if test yes,no = "$GCC,$with_gnu_ld"; then
13914 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13915 else
13916 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
13917 fi
13918 if test no = "$with_gnu_ld"; then
13919 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13920 hardcode_libdir_separator=:
13921 hardcode_direct=yes
13922 hardcode_direct_absolute=yes
13923 export_dynamic_flag_spec='$wl-E'
13924 # hardcode_minus_L: Not really in the search PATH,
13925 # but as the default location of the library.
13926 hardcode_minus_L=yes
13927 fi
13928 ;;
13929
13930 hpux11*)
13931 if test yes,no = "$GCC,$with_gnu_ld"; then
13932 case $host_cpu in
13933 hppa*64*)
13934 archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13935 ;;
13936 ia64*)
13937 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
13938 ;;
13939 *)
13940 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13941 ;;
13942 esac
13943 else
13944 case $host_cpu in
13945 hppa*64*)
13946 archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13947 ;;
13948 ia64*)
13949 archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
13950 ;;
13951 *)
13952
13953 # Older versions of the 11.00 compiler do not understand -b yet
13954 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
Elliott Hughesf344baa2021-12-07 09:12:34 -080013955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
13956printf %s "checking if $CC understands -b... " >&6; }
13957if test ${lt_cv_prog_compiler__b+y}
13958then :
13959 printf %s "(cached) " >&6
13960else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070013961 lt_cv_prog_compiler__b=no
13962 save_LDFLAGS=$LDFLAGS
13963 LDFLAGS="$LDFLAGS -b"
13964 echo "$lt_simple_link_test_code" > conftest.$ac_ext
13965 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
13966 # The linker can only warn and ignore the option if not recognized
13967 # So say no if there are warnings
13968 if test -s conftest.err; then
13969 # Append any errors to the config.log.
13970 cat conftest.err 1>&5
13971 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
13972 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13973 if diff conftest.exp conftest.er2 >/dev/null; then
13974 lt_cv_prog_compiler__b=yes
13975 fi
13976 else
13977 lt_cv_prog_compiler__b=yes
13978 fi
13979 fi
13980 $RM -r conftest*
13981 LDFLAGS=$save_LDFLAGS
13982
13983fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080013984{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
13985printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070013986
13987if test yes = "$lt_cv_prog_compiler__b"; then
13988 archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13989else
13990 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
13991fi
13992
13993 ;;
13994 esac
13995 fi
13996 if test no = "$with_gnu_ld"; then
13997 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13998 hardcode_libdir_separator=:
13999
14000 case $host_cpu in
14001 hppa*64*|ia64*)
14002 hardcode_direct=no
14003 hardcode_shlibpath_var=no
14004 ;;
14005 *)
14006 hardcode_direct=yes
14007 hardcode_direct_absolute=yes
14008 export_dynamic_flag_spec='$wl-E'
14009
14010 # hardcode_minus_L: Not really in the search PATH,
14011 # but as the default location of the library.
14012 hardcode_minus_L=yes
14013 ;;
14014 esac
14015 fi
14016 ;;
14017
14018 irix5* | irix6* | nonstopux*)
14019 if test yes = "$GCC"; then
14020 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
14021 # Try to use the -exported_symbol ld option, if it does not
14022 # work, assume that -exports_file does not work either and
14023 # implicitly export all symbols.
14024 # This should be the same for all languages, so no per-tag cache variable.
Elliott Hughesf344baa2021-12-07 09:12:34 -080014025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
14026printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
14027if test ${lt_cv_irix_exported_symbol+y}
14028then :
14029 printf %s "(cached) " >&6
14030else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070014031 save_LDFLAGS=$LDFLAGS
14032 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
14033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14034/* end confdefs.h. */
14035int foo (void) { return 0; }
14036_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080014037if ac_fn_c_try_link "$LINENO"
14038then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070014039 lt_cv_irix_exported_symbol=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080014040else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070014041 lt_cv_irix_exported_symbol=no
14042fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080014043rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070014044 conftest$ac_exeext conftest.$ac_ext
14045 LDFLAGS=$save_LDFLAGS
14046fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080014047{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
14048printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070014049 if test yes = "$lt_cv_irix_exported_symbol"; then
14050 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
14051 fi
14052 link_all_deplibs=no
14053 else
14054 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
14055 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
14056 fi
14057 archive_cmds_need_lc='no'
14058 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
14059 hardcode_libdir_separator=:
14060 inherit_rpath=yes
14061 link_all_deplibs=yes
14062 ;;
14063
14064 linux*)
14065 case $cc_basename in
14066 tcc*)
14067 # Fabrice Bellard et al's Tiny C Compiler
14068 ld_shlibs=yes
14069 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
14070 ;;
14071 esac
14072 ;;
14073
14074 netbsd* | netbsdelf*-gnu)
14075 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14076 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
14077 else
14078 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
14079 fi
14080 hardcode_libdir_flag_spec='-R$libdir'
14081 hardcode_direct=yes
14082 hardcode_shlibpath_var=no
14083 ;;
14084
14085 newsos6)
14086 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14087 hardcode_direct=yes
14088 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
14089 hardcode_libdir_separator=:
14090 hardcode_shlibpath_var=no
14091 ;;
14092
14093 *nto* | *qnx*)
14094 ;;
14095
14096 openbsd* | bitrig*)
14097 if test -f /usr/libexec/ld.so; then
14098 hardcode_direct=yes
14099 hardcode_shlibpath_var=no
14100 hardcode_direct_absolute=yes
14101 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
14102 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
14103 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
14104 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
14105 export_dynamic_flag_spec='$wl-E'
14106 else
14107 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
14108 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
14109 fi
14110 else
14111 ld_shlibs=no
14112 fi
14113 ;;
14114
14115 os2*)
14116 hardcode_libdir_flag_spec='-L$libdir'
14117 hardcode_minus_L=yes
14118 allow_undefined_flag=unsupported
14119 shrext_cmds=.dll
14120 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
14121 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
14122 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
14123 $ECHO EXPORTS >> $output_objdir/$libname.def~
14124 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
14125 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
14126 emximp -o $lib $output_objdir/$libname.def'
14127 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
14128 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
14129 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
14130 $ECHO EXPORTS >> $output_objdir/$libname.def~
14131 prefix_cmds="$SED"~
14132 if test EXPORTS = "`$SED 1q $export_symbols`"; then
14133 prefix_cmds="$prefix_cmds -e 1d";
14134 fi~
14135 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
14136 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
14137 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
14138 emximp -o $lib $output_objdir/$libname.def'
14139 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
14140 enable_shared_with_static_runtimes=yes
14141 ;;
14142
14143 osf3*)
14144 if test yes = "$GCC"; then
14145 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
14146 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
14147 else
14148 allow_undefined_flag=' -expect_unresolved \*'
14149 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
14150 fi
14151 archive_cmds_need_lc='no'
14152 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
14153 hardcode_libdir_separator=:
14154 ;;
14155
14156 osf4* | osf5*) # as osf3* with the addition of -msym flag
14157 if test yes = "$GCC"; then
14158 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
14159 archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
14160 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
14161 else
14162 allow_undefined_flag=' -expect_unresolved \*'
14163 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
14164 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
14165 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
14166
14167 # Both c and cxx compiler support -rpath directly
14168 hardcode_libdir_flag_spec='-rpath $libdir'
14169 fi
14170 archive_cmds_need_lc='no'
14171 hardcode_libdir_separator=:
14172 ;;
14173
14174 solaris*)
14175 no_undefined_flag=' -z defs'
14176 if test yes = "$GCC"; then
14177 wlarc='$wl'
14178 archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
14179 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14180 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
14181 else
14182 case `$CC -V 2>&1` in
14183 *"Compilers 5.0"*)
14184 wlarc=''
14185 archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
14186 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14187 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
14188 ;;
14189 *)
14190 wlarc='$wl'
14191 archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
14192 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14193 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
14194 ;;
14195 esac
14196 fi
14197 hardcode_libdir_flag_spec='-R$libdir'
14198 hardcode_shlibpath_var=no
14199 case $host_os in
14200 solaris2.[0-5] | solaris2.[0-5].*) ;;
14201 *)
14202 # The compiler driver will combine and reorder linker options,
14203 # but understands '-z linker_flag'. GCC discards it without '$wl',
14204 # but is careful enough not to reorder.
14205 # Supported since Solaris 2.6 (maybe 2.5.1?)
14206 if test yes = "$GCC"; then
14207 whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
14208 else
14209 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
14210 fi
14211 ;;
14212 esac
14213 link_all_deplibs=yes
14214 ;;
14215
14216 sunos4*)
14217 if test sequent = "$host_vendor"; then
14218 # Use $CC to link under sequent, because it throws in some extra .o
14219 # files that make .init and .fini sections work.
14220 archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
14221 else
14222 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
14223 fi
14224 hardcode_libdir_flag_spec='-L$libdir'
14225 hardcode_direct=yes
14226 hardcode_minus_L=yes
14227 hardcode_shlibpath_var=no
14228 ;;
14229
14230 sysv4)
14231 case $host_vendor in
14232 sni)
14233 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14234 hardcode_direct=yes # is this really true???
14235 ;;
14236 siemens)
14237 ## LD is ld it makes a PLAMLIB
14238 ## CC just makes a GrossModule.
14239 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
14240 reload_cmds='$CC -r -o $output$reload_objs'
14241 hardcode_direct=no
14242 ;;
14243 motorola)
14244 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14245 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
14246 ;;
14247 esac
14248 runpath_var='LD_RUN_PATH'
14249 hardcode_shlibpath_var=no
14250 ;;
14251
14252 sysv4.3*)
14253 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14254 hardcode_shlibpath_var=no
14255 export_dynamic_flag_spec='-Bexport'
14256 ;;
14257
14258 sysv4*MP*)
14259 if test -d /usr/nec; then
14260 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14261 hardcode_shlibpath_var=no
14262 runpath_var=LD_RUN_PATH
14263 hardcode_runpath_var=yes
14264 ld_shlibs=yes
14265 fi
14266 ;;
14267
14268 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
14269 no_undefined_flag='$wl-z,text'
14270 archive_cmds_need_lc=no
14271 hardcode_shlibpath_var=no
14272 runpath_var='LD_RUN_PATH'
14273
14274 if test yes = "$GCC"; then
14275 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14276 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14277 else
14278 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14279 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14280 fi
14281 ;;
14282
14283 sysv5* | sco3.2v5* | sco5v6*)
14284 # Note: We CANNOT use -z defs as we might desire, because we do not
14285 # link with -lc, and that would cause any symbols used from libc to
14286 # always be unresolved, which means just about no library would
14287 # ever link correctly. If we're not using GNU ld we use -z text
14288 # though, which does catch some bad symbols but isn't as heavy-handed
14289 # as -z defs.
14290 no_undefined_flag='$wl-z,text'
14291 allow_undefined_flag='$wl-z,nodefs'
14292 archive_cmds_need_lc=no
14293 hardcode_shlibpath_var=no
14294 hardcode_libdir_flag_spec='$wl-R,$libdir'
14295 hardcode_libdir_separator=':'
14296 link_all_deplibs=yes
14297 export_dynamic_flag_spec='$wl-Bexport'
14298 runpath_var='LD_RUN_PATH'
14299
14300 if test yes = "$GCC"; then
14301 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14302 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14303 else
14304 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14305 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14306 fi
14307 ;;
14308
14309 uts4*)
14310 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14311 hardcode_libdir_flag_spec='-L$libdir'
14312 hardcode_shlibpath_var=no
14313 ;;
14314
14315 *)
14316 ld_shlibs=no
14317 ;;
14318 esac
14319
14320 if test sni = "$host_vendor"; then
14321 case $host in
14322 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
14323 export_dynamic_flag_spec='$wl-Blargedynsym'
14324 ;;
14325 esac
14326 fi
14327 fi
14328
Elliott Hughesf344baa2021-12-07 09:12:34 -080014329{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
14330printf "%s\n" "$ld_shlibs" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070014331test no = "$ld_shlibs" && can_build_shared=no
14332
14333with_gnu_ld=$with_gnu_ld
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349#
14350# Do we need to explicitly link libc?
14351#
14352case "x$archive_cmds_need_lc" in
14353x|xyes)
14354 # Assume -lc should be added
14355 archive_cmds_need_lc=yes
14356
14357 if test yes,yes = "$GCC,$enable_shared"; then
14358 case $archive_cmds in
14359 *'~'*)
14360 # FIXME: we may have to deal with multi-command sequences.
14361 ;;
14362 '$CC '*)
14363 # Test whether the compiler implicitly links with -lc since on some
14364 # systems, -lgcc has to come before -lc. If gcc already passes -lc
14365 # to ld, don't add -lc before -lgcc.
Elliott Hughesf344baa2021-12-07 09:12:34 -080014366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
14367printf %s "checking whether -lc should be explicitly linked in... " >&6; }
14368if test ${lt_cv_archive_cmds_need_lc+y}
14369then :
14370 printf %s "(cached) " >&6
14371else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070014372 $RM conftest*
14373 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14374
14375 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
14376 (eval $ac_compile) 2>&5
14377 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -080014378 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070014379 test $ac_status = 0; } 2>conftest.err; then
14380 soname=conftest
14381 lib=conftest
14382 libobjs=conftest.$ac_objext
14383 deplibs=
14384 wl=$lt_prog_compiler_wl
14385 pic_flag=$lt_prog_compiler_pic
14386 compiler_flags=-v
14387 linker_flags=-v
14388 verstring=
14389 output_objdir=.
14390 libname=conftest
14391 lt_save_allow_undefined_flag=$allow_undefined_flag
14392 allow_undefined_flag=
14393 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
14394 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
14395 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -080014396 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070014397 test $ac_status = 0; }
14398 then
14399 lt_cv_archive_cmds_need_lc=no
14400 else
14401 lt_cv_archive_cmds_need_lc=yes
14402 fi
14403 allow_undefined_flag=$lt_save_allow_undefined_flag
14404 else
14405 cat conftest.err 1>&5
14406 fi
14407 $RM conftest*
14408
14409fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080014410{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
14411printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070014412 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
14413 ;;
14414 esac
14415 fi
14416 ;;
14417esac
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
Elliott Hughesf344baa2021-12-07 09:12:34 -080014570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
14571printf %s "checking dynamic linker characteristics... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070014572
14573if test yes = "$GCC"; then
14574 case $host_os in
14575 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
14576 *) lt_awk_arg='/^libraries:/' ;;
14577 esac
14578 case $host_os in
14579 mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
14580 *) lt_sed_strip_eq='s|=/|/|g' ;;
14581 esac
14582 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
14583 case $lt_search_path_spec in
14584 *\;*)
14585 # if the path contains ";" then we assume it to be the separator
14586 # otherwise default to the standard path separator (i.e. ":") - it is
14587 # assumed that no part of a normal pathname contains ";" but that should
14588 # okay in the real world where ";" in dirpaths is itself problematic.
14589 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
14590 ;;
14591 *)
14592 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
14593 ;;
14594 esac
14595 # Ok, now we have the path, separated by spaces, we can step through it
14596 # and add multilib dir if necessary...
14597 lt_tmp_lt_search_path_spec=
14598 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
14599 # ...but if some path component already ends with the multilib dir we assume
14600 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
14601 case "$lt_multi_os_dir; $lt_search_path_spec " in
14602 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
14603 lt_multi_os_dir=
14604 ;;
14605 esac
14606 for lt_sys_path in $lt_search_path_spec; do
14607 if test -d "$lt_sys_path$lt_multi_os_dir"; then
14608 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
14609 elif test -n "$lt_multi_os_dir"; then
14610 test -d "$lt_sys_path" && \
14611 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
14612 fi
14613 done
14614 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
14615BEGIN {RS = " "; FS = "/|\n";} {
14616 lt_foo = "";
14617 lt_count = 0;
14618 for (lt_i = NF; lt_i > 0; lt_i--) {
14619 if ($lt_i != "" && $lt_i != ".") {
14620 if ($lt_i == "..") {
14621 lt_count++;
14622 } else {
14623 if (lt_count == 0) {
14624 lt_foo = "/" $lt_i lt_foo;
14625 } else {
14626 lt_count--;
14627 }
14628 }
14629 }
14630 }
14631 if (lt_foo != "") { lt_freq[lt_foo]++; }
14632 if (lt_freq[lt_foo] == 1) { print lt_foo; }
14633}'`
14634 # AWK program above erroneously prepends '/' to C:/dos/paths
14635 # for these hosts.
14636 case $host_os in
14637 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
14638 $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
14639 esac
14640 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
14641else
14642 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
14643fi
14644library_names_spec=
14645libname_spec='lib$name'
14646soname_spec=
14647shrext_cmds=.so
14648postinstall_cmds=
14649postuninstall_cmds=
14650finish_cmds=
14651finish_eval=
14652shlibpath_var=
14653shlibpath_overrides_runpath=unknown
14654version_type=none
14655dynamic_linker="$host_os ld.so"
14656sys_lib_dlsearch_path_spec="/lib /usr/lib"
14657need_lib_prefix=unknown
14658hardcode_into_libs=no
14659
14660# when you set need_version to no, make sure it does not cause -set_version
14661# flags to be left without arguments
14662need_version=unknown
14663
14664
14665
14666case $host_os in
14667aix3*)
14668 version_type=linux # correct to gnu/linux during the next big refactor
14669 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
14670 shlibpath_var=LIBPATH
14671
14672 # AIX 3 has no versioning support, so we append a major version to the name.
14673 soname_spec='$libname$release$shared_ext$major'
14674 ;;
14675
14676aix[4-9]*)
14677 version_type=linux # correct to gnu/linux during the next big refactor
14678 need_lib_prefix=no
14679 need_version=no
14680 hardcode_into_libs=yes
14681 if test ia64 = "$host_cpu"; then
14682 # AIX 5 supports IA64
14683 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
14684 shlibpath_var=LD_LIBRARY_PATH
14685 else
14686 # With GCC up to 2.95.x, collect2 would create an import file
14687 # for dependence libraries. The import file would start with
14688 # the line '#! .'. This would cause the generated library to
14689 # depend on '.', always an invalid library. This was fixed in
14690 # development snapshots of GCC prior to 3.0.
14691 case $host_os in
14692 aix4 | aix4.[01] | aix4.[01].*)
14693 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
14694 echo ' yes '
14695 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
14696 :
14697 else
14698 can_build_shared=no
14699 fi
14700 ;;
14701 esac
14702 # Using Import Files as archive members, it is possible to support
14703 # filename-based versioning of shared library archives on AIX. While
14704 # this would work for both with and without runtime linking, it will
14705 # prevent static linking of such archives. So we do filename-based
14706 # shared library versioning with .so extension only, which is used
14707 # when both runtime linking and shared linking is enabled.
14708 # Unfortunately, runtime linking may impact performance, so we do
14709 # not want this to be the default eventually. Also, we use the
14710 # versioned .so libs for executables only if there is the -brtl
14711 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
14712 # To allow for filename-based versioning support, we need to create
14713 # libNAME.so.V as an archive file, containing:
14714 # *) an Import File, referring to the versioned filename of the
14715 # archive as well as the shared archive member, telling the
14716 # bitwidth (32 or 64) of that shared object, and providing the
14717 # list of exported symbols of that shared object, eventually
14718 # decorated with the 'weak' keyword
14719 # *) the shared object with the F_LOADONLY flag set, to really avoid
14720 # it being seen by the linker.
14721 # At run time we better use the real file rather than another symlink,
14722 # but for link time we create the symlink libNAME.so -> libNAME.so.V
14723
14724 case $with_aix_soname,$aix_use_runtimelinking in
14725 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
14726 # soname into executable. Probably we can add versioning support to
14727 # collect2, so additional links can be useful in future.
14728 aix,yes) # traditional libtool
14729 dynamic_linker='AIX unversionable lib.so'
14730 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
14731 # instead of lib<name>.a to let people know that these are not
14732 # typical AIX shared libraries.
14733 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14734 ;;
14735 aix,no) # traditional AIX only
14736 dynamic_linker='AIX lib.a(lib.so.V)'
14737 # We preserve .a as extension for shared libraries through AIX4.2
14738 # and later when we are not doing run time linking.
14739 library_names_spec='$libname$release.a $libname.a'
14740 soname_spec='$libname$release$shared_ext$major'
14741 ;;
14742 svr4,*) # full svr4 only
14743 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
14744 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
14745 # We do not specify a path in Import Files, so LIBPATH fires.
14746 shlibpath_overrides_runpath=yes
14747 ;;
14748 *,yes) # both, prefer svr4
14749 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
14750 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
14751 # unpreferred sharedlib libNAME.a needs extra handling
14752 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
14753 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
14754 # We do not specify a path in Import Files, so LIBPATH fires.
14755 shlibpath_overrides_runpath=yes
14756 ;;
14757 *,no) # both, prefer aix
14758 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
14759 library_names_spec='$libname$release.a $libname.a'
14760 soname_spec='$libname$release$shared_ext$major'
14761 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
14762 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
14763 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
14764 ;;
14765 esac
14766 shlibpath_var=LIBPATH
14767 fi
14768 ;;
14769
14770amigaos*)
14771 case $host_cpu in
14772 powerpc)
14773 # Since July 2007 AmigaOS4 officially supports .so libraries.
14774 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
14775 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14776 ;;
14777 m68k)
14778 library_names_spec='$libname.ixlibrary $libname.a'
14779 # Create ${libname}_ixlibrary.a entries in /sys/libs.
14780 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
14781 ;;
14782 esac
14783 ;;
14784
14785beos*)
14786 library_names_spec='$libname$shared_ext'
14787 dynamic_linker="$host_os ld.so"
14788 shlibpath_var=LIBRARY_PATH
14789 ;;
14790
14791bsdi[45]*)
14792 version_type=linux # correct to gnu/linux during the next big refactor
14793 need_version=no
14794 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14795 soname_spec='$libname$release$shared_ext$major'
14796 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
14797 shlibpath_var=LD_LIBRARY_PATH
14798 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
14799 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
14800 # the default ld.so.conf also contains /usr/contrib/lib and
14801 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
14802 # libtool to hard-code these into programs
14803 ;;
14804
14805cygwin* | mingw* | pw32* | cegcc*)
14806 version_type=windows
14807 shrext_cmds=.dll
14808 need_version=no
14809 need_lib_prefix=no
14810
14811 case $GCC,$cc_basename in
14812 yes,*)
14813 # gcc
14814 library_names_spec='$libname.dll.a'
14815 # DLL is installed to $(libdir)/../bin by postinstall_cmds
14816 postinstall_cmds='base_file=`basename \$file`~
14817 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
14818 dldir=$destdir/`dirname \$dlpath`~
14819 test -d \$dldir || mkdir -p \$dldir~
14820 $install_prog $dir/$dlname \$dldir/$dlname~
14821 chmod a+x \$dldir/$dlname~
14822 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
14823 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
14824 fi'
14825 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14826 dlpath=$dir/\$dldll~
14827 $RM \$dlpath'
14828 shlibpath_overrides_runpath=yes
14829
14830 case $host_os in
14831 cygwin*)
14832 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
14833 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14834
14835 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
14836 ;;
14837 mingw* | cegcc*)
14838 # MinGW DLLs use traditional 'lib' prefix
14839 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14840 ;;
14841 pw32*)
14842 # pw32 DLLs use 'pw' prefix rather than 'lib'
14843 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14844 ;;
14845 esac
14846 dynamic_linker='Win32 ld.exe'
14847 ;;
14848
14849 *,cl*)
14850 # Native MSVC
14851 libname_spec='$name'
14852 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14853 library_names_spec='$libname.dll.lib'
14854
14855 case $build_os in
14856 mingw*)
14857 sys_lib_search_path_spec=
14858 lt_save_ifs=$IFS
14859 IFS=';'
14860 for lt_path in $LIB
14861 do
14862 IFS=$lt_save_ifs
14863 # Let DOS variable expansion print the short 8.3 style file name.
14864 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
14865 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
14866 done
14867 IFS=$lt_save_ifs
14868 # Convert to MSYS style.
14869 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
14870 ;;
14871 cygwin*)
14872 # Convert to unix form, then to dos form, then back to unix form
14873 # but this time dos style (no spaces!) so that the unix form looks
14874 # like /cygdrive/c/PROGRA~1:/cygdr...
14875 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
14876 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
14877 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14878 ;;
14879 *)
14880 sys_lib_search_path_spec=$LIB
14881 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
14882 # It is most probably a Windows format PATH.
14883 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
14884 else
14885 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14886 fi
14887 # FIXME: find the short name or the path components, as spaces are
14888 # common. (e.g. "Program Files" -> "PROGRA~1")
14889 ;;
14890 esac
14891
14892 # DLL is installed to $(libdir)/../bin by postinstall_cmds
14893 postinstall_cmds='base_file=`basename \$file`~
14894 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
14895 dldir=$destdir/`dirname \$dlpath`~
14896 test -d \$dldir || mkdir -p \$dldir~
14897 $install_prog $dir/$dlname \$dldir/$dlname'
14898 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14899 dlpath=$dir/\$dldll~
14900 $RM \$dlpath'
14901 shlibpath_overrides_runpath=yes
14902 dynamic_linker='Win32 link.exe'
14903 ;;
14904
14905 *)
14906 # Assume MSVC wrapper
14907 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
14908 dynamic_linker='Win32 ld.exe'
14909 ;;
14910 esac
14911 # FIXME: first we should search . and the directory the executable is in
14912 shlibpath_var=PATH
14913 ;;
14914
14915darwin* | rhapsody*)
14916 dynamic_linker="$host_os dyld"
14917 version_type=darwin
14918 need_lib_prefix=no
14919 need_version=no
14920 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
14921 soname_spec='$libname$release$major$shared_ext'
14922 shlibpath_overrides_runpath=yes
14923 shlibpath_var=DYLD_LIBRARY_PATH
14924 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
14925
14926 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
14927 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
14928 ;;
14929
14930dgux*)
14931 version_type=linux # correct to gnu/linux during the next big refactor
14932 need_lib_prefix=no
14933 need_version=no
14934 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14935 soname_spec='$libname$release$shared_ext$major'
14936 shlibpath_var=LD_LIBRARY_PATH
14937 ;;
14938
14939freebsd* | dragonfly*)
14940 # DragonFly does not have aout. When/if they implement a new
14941 # versioning mechanism, adjust this.
14942 if test -x /usr/bin/objformat; then
14943 objformat=`/usr/bin/objformat`
14944 else
14945 case $host_os in
14946 freebsd[23].*) objformat=aout ;;
14947 *) objformat=elf ;;
14948 esac
14949 fi
14950 version_type=freebsd-$objformat
14951 case $version_type in
14952 freebsd-elf*)
14953 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14954 soname_spec='$libname$release$shared_ext$major'
14955 need_version=no
14956 need_lib_prefix=no
14957 ;;
14958 freebsd-*)
14959 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14960 need_version=yes
14961 ;;
14962 esac
14963 shlibpath_var=LD_LIBRARY_PATH
14964 case $host_os in
14965 freebsd2.*)
14966 shlibpath_overrides_runpath=yes
14967 ;;
14968 freebsd3.[01]* | freebsdelf3.[01]*)
14969 shlibpath_overrides_runpath=yes
14970 hardcode_into_libs=yes
14971 ;;
14972 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
14973 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
14974 shlibpath_overrides_runpath=no
14975 hardcode_into_libs=yes
14976 ;;
14977 *) # from 4.6 on, and DragonFly
14978 shlibpath_overrides_runpath=yes
14979 hardcode_into_libs=yes
14980 ;;
14981 esac
14982 ;;
14983
14984haiku*)
14985 version_type=linux # correct to gnu/linux during the next big refactor
14986 need_lib_prefix=no
14987 need_version=no
14988 dynamic_linker="$host_os runtime_loader"
14989 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14990 soname_spec='$libname$release$shared_ext$major'
14991 shlibpath_var=LIBRARY_PATH
14992 shlibpath_overrides_runpath=no
14993 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
14994 hardcode_into_libs=yes
14995 ;;
14996
14997hpux9* | hpux10* | hpux11*)
14998 # Give a soname corresponding to the major version so that dld.sl refuses to
14999 # link against other versions.
15000 version_type=sunos
15001 need_lib_prefix=no
15002 need_version=no
15003 case $host_cpu in
15004 ia64*)
15005 shrext_cmds='.so'
15006 hardcode_into_libs=yes
15007 dynamic_linker="$host_os dld.so"
15008 shlibpath_var=LD_LIBRARY_PATH
15009 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15010 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15011 soname_spec='$libname$release$shared_ext$major'
15012 if test 32 = "$HPUX_IA64_MODE"; then
15013 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
15014 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
15015 else
15016 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
15017 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
15018 fi
15019 ;;
15020 hppa*64*)
15021 shrext_cmds='.sl'
15022 hardcode_into_libs=yes
15023 dynamic_linker="$host_os dld.sl"
15024 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
15025 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15026 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15027 soname_spec='$libname$release$shared_ext$major'
15028 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
15029 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15030 ;;
15031 *)
15032 shrext_cmds='.sl'
15033 dynamic_linker="$host_os dld.sl"
15034 shlibpath_var=SHLIB_PATH
15035 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
15036 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15037 soname_spec='$libname$release$shared_ext$major'
15038 ;;
15039 esac
15040 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
15041 postinstall_cmds='chmod 555 $lib'
15042 # or fails outright, so override atomically:
15043 install_override_mode=555
15044 ;;
15045
15046interix[3-9]*)
15047 version_type=linux # correct to gnu/linux during the next big refactor
15048 need_lib_prefix=no
15049 need_version=no
15050 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15051 soname_spec='$libname$release$shared_ext$major'
15052 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
15053 shlibpath_var=LD_LIBRARY_PATH
15054 shlibpath_overrides_runpath=no
15055 hardcode_into_libs=yes
15056 ;;
15057
15058irix5* | irix6* | nonstopux*)
15059 case $host_os in
15060 nonstopux*) version_type=nonstopux ;;
15061 *)
15062 if test yes = "$lt_cv_prog_gnu_ld"; then
15063 version_type=linux # correct to gnu/linux during the next big refactor
15064 else
15065 version_type=irix
15066 fi ;;
15067 esac
15068 need_lib_prefix=no
15069 need_version=no
15070 soname_spec='$libname$release$shared_ext$major'
15071 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
15072 case $host_os in
15073 irix5* | nonstopux*)
15074 libsuff= shlibsuff=
15075 ;;
15076 *)
15077 case $LD in # libtool.m4 will add one of these switches to LD
15078 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
15079 libsuff= shlibsuff= libmagic=32-bit;;
15080 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
15081 libsuff=32 shlibsuff=N32 libmagic=N32;;
15082 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
15083 libsuff=64 shlibsuff=64 libmagic=64-bit;;
15084 *) libsuff= shlibsuff= libmagic=never-match;;
15085 esac
15086 ;;
15087 esac
15088 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
15089 shlibpath_overrides_runpath=no
15090 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
15091 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
15092 hardcode_into_libs=yes
15093 ;;
15094
15095# No shared lib support for Linux oldld, aout, or coff.
15096linux*oldld* | linux*aout* | linux*coff*)
15097 dynamic_linker=no
15098 ;;
15099
15100linux*android*)
15101 version_type=none # Android doesn't support versioned libraries.
15102 need_lib_prefix=no
15103 need_version=no
15104 library_names_spec='$libname$release$shared_ext'
15105 soname_spec='$libname$release$shared_ext'
15106 finish_cmds=
15107 shlibpath_var=LD_LIBRARY_PATH
15108 shlibpath_overrides_runpath=yes
15109
15110 # This implies no fast_install, which is unacceptable.
15111 # Some rework will be needed to allow for fast_install
15112 # before this can be enabled.
15113 hardcode_into_libs=yes
15114
15115 dynamic_linker='Android linker'
15116 # Don't embed -rpath directories since the linker doesn't support them.
15117 hardcode_libdir_flag_spec='-L$libdir'
15118 ;;
15119
15120# This must be glibc/ELF.
15121linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
15122 version_type=linux # correct to gnu/linux during the next big refactor
15123 need_lib_prefix=no
15124 need_version=no
15125 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15126 soname_spec='$libname$release$shared_ext$major'
15127 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
15128 shlibpath_var=LD_LIBRARY_PATH
15129 shlibpath_overrides_runpath=no
15130
15131 # Some binutils ld are patched to set DT_RUNPATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080015132 if test ${lt_cv_shlibpath_overrides_runpath+y}
15133then :
15134 printf %s "(cached) " >&6
15135else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070015136 lt_cv_shlibpath_overrides_runpath=no
15137 save_LDFLAGS=$LDFLAGS
15138 save_libdir=$libdir
15139 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
15140 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
15141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15142/* end confdefs.h. */
15143
15144int main (void)
15145{
15146
15147 ;
15148 return 0;
15149}
15150_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080015151if ac_fn_c_try_link "$LINENO"
15152then :
15153 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
15154then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070015155 lt_cv_shlibpath_overrides_runpath=yes
15156fi
15157fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080015158rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070015159 conftest$ac_exeext conftest.$ac_ext
15160 LDFLAGS=$save_LDFLAGS
15161 libdir=$save_libdir
15162
15163fi
15164
15165 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
15166
15167 # This implies no fast_install, which is unacceptable.
15168 # Some rework will be needed to allow for fast_install
15169 # before this can be enabled.
15170 hardcode_into_libs=yes
15171
15172 # Ideally, we could use ldconfig to report *all* directores which are
15173 # searched for libraries, however this is still not possible. Aside from not
15174 # being certain /sbin/ldconfig is available, command
15175 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
15176 # even though it is searched at run-time. Try to do the best guess by
15177 # appending ld.so.conf contents (and includes) to the search path.
15178 if test -f /etc/ld.so.conf; then
15179 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
15180 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
15181 fi
15182
15183 # We used to test for /lib/ld.so.1 and disable shared libraries on
15184 # powerpc, because MkLinux only supported shared libraries with the
15185 # GNU dynamic linker. Since this was broken with cross compilers,
15186 # most powerpc-linux boxes support dynamic linking these days and
15187 # people can always --disable-shared, the test was removed, and we
15188 # assume the GNU/Linux dynamic linker is in use.
15189 dynamic_linker='GNU/Linux ld.so'
15190 ;;
15191
15192netbsdelf*-gnu)
15193 version_type=linux
15194 need_lib_prefix=no
15195 need_version=no
15196 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15197 soname_spec='${libname}${release}${shared_ext}$major'
15198 shlibpath_var=LD_LIBRARY_PATH
15199 shlibpath_overrides_runpath=no
15200 hardcode_into_libs=yes
15201 dynamic_linker='NetBSD ld.elf_so'
15202 ;;
15203
15204netbsd*)
15205 version_type=sunos
15206 need_lib_prefix=no
15207 need_version=no
15208 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
15209 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
15210 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
15211 dynamic_linker='NetBSD (a.out) ld.so'
15212 else
15213 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15214 soname_spec='$libname$release$shared_ext$major'
15215 dynamic_linker='NetBSD ld.elf_so'
15216 fi
15217 shlibpath_var=LD_LIBRARY_PATH
15218 shlibpath_overrides_runpath=yes
15219 hardcode_into_libs=yes
15220 ;;
15221
15222newsos6)
15223 version_type=linux # correct to gnu/linux during the next big refactor
15224 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15225 shlibpath_var=LD_LIBRARY_PATH
15226 shlibpath_overrides_runpath=yes
15227 ;;
15228
15229*nto* | *qnx*)
15230 version_type=qnx
15231 need_lib_prefix=no
15232 need_version=no
15233 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15234 soname_spec='$libname$release$shared_ext$major'
15235 shlibpath_var=LD_LIBRARY_PATH
15236 shlibpath_overrides_runpath=no
15237 hardcode_into_libs=yes
15238 dynamic_linker='ldqnx.so'
15239 ;;
15240
15241openbsd* | bitrig*)
15242 version_type=sunos
15243 sys_lib_dlsearch_path_spec=/usr/lib
15244 need_lib_prefix=no
15245 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
15246 need_version=no
15247 else
15248 need_version=yes
15249 fi
15250 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
15251 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
15252 shlibpath_var=LD_LIBRARY_PATH
15253 shlibpath_overrides_runpath=yes
15254 ;;
15255
15256os2*)
15257 libname_spec='$name'
15258 version_type=windows
15259 shrext_cmds=.dll
15260 need_version=no
15261 need_lib_prefix=no
15262 # OS/2 can only load a DLL with a base name of 8 characters or less.
15263 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
15264 v=$($ECHO $release$versuffix | tr -d .-);
15265 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
15266 $ECHO $n$v`$shared_ext'
15267 library_names_spec='${libname}_dll.$libext'
15268 dynamic_linker='OS/2 ld.exe'
15269 shlibpath_var=BEGINLIBPATH
15270 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
15271 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15272 postinstall_cmds='base_file=`basename \$file`~
15273 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
15274 dldir=$destdir/`dirname \$dlpath`~
15275 test -d \$dldir || mkdir -p \$dldir~
15276 $install_prog $dir/$dlname \$dldir/$dlname~
15277 chmod a+x \$dldir/$dlname~
15278 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
15279 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
15280 fi'
15281 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
15282 dlpath=$dir/\$dldll~
15283 $RM \$dlpath'
15284 ;;
15285
15286osf3* | osf4* | osf5*)
15287 version_type=osf
15288 need_lib_prefix=no
15289 need_version=no
15290 soname_spec='$libname$release$shared_ext$major'
15291 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15292 shlibpath_var=LD_LIBRARY_PATH
15293 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
15294 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15295 ;;
15296
15297rdos*)
15298 dynamic_linker=no
15299 ;;
15300
15301solaris*)
15302 version_type=linux # correct to gnu/linux during the next big refactor
15303 need_lib_prefix=no
15304 need_version=no
15305 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15306 soname_spec='$libname$release$shared_ext$major'
15307 shlibpath_var=LD_LIBRARY_PATH
15308 shlibpath_overrides_runpath=yes
15309 hardcode_into_libs=yes
15310 # ldd complains unless libraries are executable
15311 postinstall_cmds='chmod +x $lib'
15312 ;;
15313
15314sunos4*)
15315 version_type=sunos
15316 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
15317 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
15318 shlibpath_var=LD_LIBRARY_PATH
15319 shlibpath_overrides_runpath=yes
15320 if test yes = "$with_gnu_ld"; then
15321 need_lib_prefix=no
15322 fi
15323 need_version=yes
15324 ;;
15325
15326sysv4 | sysv4.3*)
15327 version_type=linux # correct to gnu/linux during the next big refactor
15328 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15329 soname_spec='$libname$release$shared_ext$major'
15330 shlibpath_var=LD_LIBRARY_PATH
15331 case $host_vendor in
15332 sni)
15333 shlibpath_overrides_runpath=no
15334 need_lib_prefix=no
15335 runpath_var=LD_RUN_PATH
15336 ;;
15337 siemens)
15338 need_lib_prefix=no
15339 ;;
15340 motorola)
15341 need_lib_prefix=no
15342 need_version=no
15343 shlibpath_overrides_runpath=no
15344 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
15345 ;;
15346 esac
15347 ;;
15348
15349sysv4*MP*)
15350 if test -d /usr/nec; then
15351 version_type=linux # correct to gnu/linux during the next big refactor
15352 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
15353 soname_spec='$libname$shared_ext.$major'
15354 shlibpath_var=LD_LIBRARY_PATH
15355 fi
15356 ;;
15357
15358sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
15359 version_type=sco
15360 need_lib_prefix=no
15361 need_version=no
15362 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
15363 soname_spec='$libname$release$shared_ext$major'
15364 shlibpath_var=LD_LIBRARY_PATH
15365 shlibpath_overrides_runpath=yes
15366 hardcode_into_libs=yes
15367 if test yes = "$with_gnu_ld"; then
15368 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
15369 else
15370 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
15371 case $host_os in
15372 sco3.2v5*)
15373 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
15374 ;;
15375 esac
15376 fi
15377 sys_lib_dlsearch_path_spec='/usr/lib'
15378 ;;
15379
15380tpf*)
15381 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
15382 version_type=linux # correct to gnu/linux during the next big refactor
15383 need_lib_prefix=no
15384 need_version=no
15385 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15386 shlibpath_var=LD_LIBRARY_PATH
15387 shlibpath_overrides_runpath=no
15388 hardcode_into_libs=yes
15389 ;;
15390
15391uts4*)
15392 version_type=linux # correct to gnu/linux during the next big refactor
15393 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15394 soname_spec='$libname$release$shared_ext$major'
15395 shlibpath_var=LD_LIBRARY_PATH
15396 ;;
15397
15398*)
15399 dynamic_linker=no
15400 ;;
15401esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080015402{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
15403printf "%s\n" "$dynamic_linker" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070015404test no = "$dynamic_linker" && can_build_shared=no
15405
15406variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
15407if test yes = "$GCC"; then
15408 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
15409fi
15410
15411if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
15412 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
15413fi
15414
15415if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
15416 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
15417fi
15418
15419# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
15420configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
15421
15422# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
15423func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
15424
15425# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
15426configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
Elliott Hughesf344baa2021-12-07 09:12:34 -080015524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
15525printf %s "checking how to hardcode library paths into programs... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070015526hardcode_action=
15527if test -n "$hardcode_libdir_flag_spec" ||
15528 test -n "$runpath_var" ||
15529 test yes = "$hardcode_automatic"; then
15530
15531 # We can hardcode non-existent directories.
15532 if test no != "$hardcode_direct" &&
15533 # If the only mechanism to avoid hardcoding is shlibpath_var, we
15534 # have to relink, otherwise we might link with an installed library
15535 # when we should be linking with a yet-to-be-installed one
15536 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
15537 test no != "$hardcode_minus_L"; then
15538 # Linking always hardcodes the temporary library directory.
15539 hardcode_action=relink
15540 else
15541 # We can link without hardcoding, and we can hardcode nonexisting dirs.
15542 hardcode_action=immediate
15543 fi
15544else
15545 # We cannot hardcode anything, or else we can only hardcode existing
15546 # directories.
15547 hardcode_action=unsupported
15548fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080015549{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
15550printf "%s\n" "$hardcode_action" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070015551
15552if test relink = "$hardcode_action" ||
15553 test yes = "$inherit_rpath"; then
15554 # Fast installation is not supported
15555 enable_fast_install=no
15556elif test yes = "$shlibpath_overrides_runpath" ||
15557 test no = "$enable_shared"; then
15558 # Fast installation is not necessary
15559 enable_fast_install=needless
15560fi
15561
15562
15563
15564
15565
15566
15567 if test yes != "$enable_dlopen"; then
15568 enable_dlopen=unknown
15569 enable_dlopen_self=unknown
15570 enable_dlopen_self_static=unknown
15571else
15572 lt_cv_dlopen=no
15573 lt_cv_dlopen_libs=
15574
15575 case $host_os in
15576 beos*)
15577 lt_cv_dlopen=load_add_on
15578 lt_cv_dlopen_libs=
15579 lt_cv_dlopen_self=yes
15580 ;;
15581
15582 mingw* | pw32* | cegcc*)
15583 lt_cv_dlopen=LoadLibrary
15584 lt_cv_dlopen_libs=
15585 ;;
15586
15587 cygwin*)
15588 lt_cv_dlopen=dlopen
15589 lt_cv_dlopen_libs=
15590 ;;
15591
15592 darwin*)
15593 # if libdl is installed we need to link against it
Elliott Hughesf344baa2021-12-07 09:12:34 -080015594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15595printf %s "checking for dlopen in -ldl... " >&6; }
15596if test ${ac_cv_lib_dl_dlopen+y}
15597then :
15598 printf %s "(cached) " >&6
15599else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070015600 ac_check_lib_save_LIBS=$LIBS
15601LIBS="-ldl $LIBS"
15602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15603/* end confdefs.h. */
15604
15605
15606#ifdef __cplusplus
15607extern "C"
15608#endif
15609char dlopen ();
15610int main (void)
15611{
15612return dlopen ();
15613 ;
15614 return 0;
15615}
15616_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080015617if ac_fn_c_try_link "$LINENO"
15618then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070015619 ac_cv_lib_dl_dlopen=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080015620else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070015621 ac_cv_lib_dl_dlopen=no
15622fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080015623rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070015624 conftest$ac_exeext conftest.$ac_ext
15625LIBS=$ac_check_lib_save_LIBS
15626fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080015627{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15628printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
15629if test "x$ac_cv_lib_dl_dlopen" = xyes
15630then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070015631 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
Elliott Hughesf344baa2021-12-07 09:12:34 -080015632else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070015633
15634 lt_cv_dlopen=dyld
15635 lt_cv_dlopen_libs=
15636 lt_cv_dlopen_self=yes
15637
15638fi
15639
15640 ;;
15641
15642 tpf*)
15643 # Don't try to run any link tests for TPF. We know it's impossible
15644 # because TPF is a cross-compiler, and we know how we open DSOs.
15645 lt_cv_dlopen=dlopen
15646 lt_cv_dlopen_libs=
15647 lt_cv_dlopen_self=no
15648 ;;
15649
15650 *)
15651 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
Elliott Hughesf344baa2021-12-07 09:12:34 -080015652if test "x$ac_cv_func_shl_load" = xyes
15653then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070015654 lt_cv_dlopen=shl_load
Elliott Hughesf344baa2021-12-07 09:12:34 -080015655else $as_nop
15656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
15657printf %s "checking for shl_load in -ldld... " >&6; }
15658if test ${ac_cv_lib_dld_shl_load+y}
15659then :
15660 printf %s "(cached) " >&6
15661else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070015662 ac_check_lib_save_LIBS=$LIBS
15663LIBS="-ldld $LIBS"
15664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15665/* end confdefs.h. */
15666
15667
15668#ifdef __cplusplus
15669extern "C"
15670#endif
15671char shl_load ();
15672int main (void)
15673{
15674return shl_load ();
15675 ;
15676 return 0;
15677}
15678_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080015679if ac_fn_c_try_link "$LINENO"
15680then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070015681 ac_cv_lib_dld_shl_load=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080015682else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070015683 ac_cv_lib_dld_shl_load=no
15684fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080015685rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070015686 conftest$ac_exeext conftest.$ac_ext
15687LIBS=$ac_check_lib_save_LIBS
15688fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080015689{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
15690printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
15691if test "x$ac_cv_lib_dld_shl_load" = xyes
15692then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070015693 lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
Elliott Hughesf344baa2021-12-07 09:12:34 -080015694else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070015695 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Elliott Hughesf344baa2021-12-07 09:12:34 -080015696if test "x$ac_cv_func_dlopen" = xyes
15697then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070015698 lt_cv_dlopen=dlopen
Elliott Hughesf344baa2021-12-07 09:12:34 -080015699else $as_nop
15700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15701printf %s "checking for dlopen in -ldl... " >&6; }
15702if test ${ac_cv_lib_dl_dlopen+y}
15703then :
15704 printf %s "(cached) " >&6
15705else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070015706 ac_check_lib_save_LIBS=$LIBS
15707LIBS="-ldl $LIBS"
15708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15709/* end confdefs.h. */
15710
15711
15712#ifdef __cplusplus
15713extern "C"
15714#endif
15715char dlopen ();
15716int main (void)
15717{
15718return dlopen ();
15719 ;
15720 return 0;
15721}
15722_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080015723if ac_fn_c_try_link "$LINENO"
15724then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070015725 ac_cv_lib_dl_dlopen=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080015726else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070015727 ac_cv_lib_dl_dlopen=no
15728fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080015729rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070015730 conftest$ac_exeext conftest.$ac_ext
15731LIBS=$ac_check_lib_save_LIBS
15732fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080015733{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15734printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
15735if test "x$ac_cv_lib_dl_dlopen" = xyes
15736then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070015737 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
Elliott Hughesf344baa2021-12-07 09:12:34 -080015738else $as_nop
15739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
15740printf %s "checking for dlopen in -lsvld... " >&6; }
15741if test ${ac_cv_lib_svld_dlopen+y}
15742then :
15743 printf %s "(cached) " >&6
15744else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070015745 ac_check_lib_save_LIBS=$LIBS
15746LIBS="-lsvld $LIBS"
15747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15748/* end confdefs.h. */
15749
15750
15751#ifdef __cplusplus
15752extern "C"
15753#endif
15754char dlopen ();
15755int main (void)
15756{
15757return dlopen ();
15758 ;
15759 return 0;
15760}
15761_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080015762if ac_fn_c_try_link "$LINENO"
15763then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070015764 ac_cv_lib_svld_dlopen=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080015765else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070015766 ac_cv_lib_svld_dlopen=no
15767fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080015768rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070015769 conftest$ac_exeext conftest.$ac_ext
15770LIBS=$ac_check_lib_save_LIBS
15771fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080015772{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
15773printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
15774if test "x$ac_cv_lib_svld_dlopen" = xyes
15775then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070015776 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
Elliott Hughesf344baa2021-12-07 09:12:34 -080015777else $as_nop
15778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
15779printf %s "checking for dld_link in -ldld... " >&6; }
15780if test ${ac_cv_lib_dld_dld_link+y}
15781then :
15782 printf %s "(cached) " >&6
15783else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070015784 ac_check_lib_save_LIBS=$LIBS
15785LIBS="-ldld $LIBS"
15786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15787/* end confdefs.h. */
15788
15789
15790#ifdef __cplusplus
15791extern "C"
15792#endif
15793char dld_link ();
15794int main (void)
15795{
15796return dld_link ();
15797 ;
15798 return 0;
15799}
15800_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080015801if ac_fn_c_try_link "$LINENO"
15802then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070015803 ac_cv_lib_dld_dld_link=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080015804else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070015805 ac_cv_lib_dld_dld_link=no
15806fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080015807rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070015808 conftest$ac_exeext conftest.$ac_ext
15809LIBS=$ac_check_lib_save_LIBS
15810fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080015811{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
15812printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
15813if test "x$ac_cv_lib_dld_dld_link" = xyes
15814then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070015815 lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
15816fi
15817
15818
15819fi
15820
15821
15822fi
15823
15824
15825fi
15826
15827
15828fi
15829
15830
15831fi
15832
15833 ;;
15834 esac
15835
15836 if test no = "$lt_cv_dlopen"; then
15837 enable_dlopen=no
15838 else
15839 enable_dlopen=yes
15840 fi
15841
15842 case $lt_cv_dlopen in
15843 dlopen)
15844 save_CPPFLAGS=$CPPFLAGS
15845 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
15846
15847 save_LDFLAGS=$LDFLAGS
15848 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
15849
15850 save_LIBS=$LIBS
15851 LIBS="$lt_cv_dlopen_libs $LIBS"
15852
Elliott Hughesf344baa2021-12-07 09:12:34 -080015853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
15854printf %s "checking whether a program can dlopen itself... " >&6; }
15855if test ${lt_cv_dlopen_self+y}
15856then :
15857 printf %s "(cached) " >&6
15858else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070015859 if test yes = "$cross_compiling"; then :
15860 lt_cv_dlopen_self=cross
15861else
15862 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15863 lt_status=$lt_dlunknown
15864 cat > conftest.$ac_ext <<_LT_EOF
15865#line $LINENO "configure"
15866#include "confdefs.h"
15867
15868#if HAVE_DLFCN_H
15869#include <dlfcn.h>
15870#endif
15871
15872#include <stdio.h>
15873
15874#ifdef RTLD_GLOBAL
15875# define LT_DLGLOBAL RTLD_GLOBAL
15876#else
15877# ifdef DL_GLOBAL
15878# define LT_DLGLOBAL DL_GLOBAL
15879# else
15880# define LT_DLGLOBAL 0
15881# endif
15882#endif
15883
15884/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
15885 find out it does not work in some platform. */
15886#ifndef LT_DLLAZY_OR_NOW
15887# ifdef RTLD_LAZY
15888# define LT_DLLAZY_OR_NOW RTLD_LAZY
15889# else
15890# ifdef DL_LAZY
15891# define LT_DLLAZY_OR_NOW DL_LAZY
15892# else
15893# ifdef RTLD_NOW
15894# define LT_DLLAZY_OR_NOW RTLD_NOW
15895# else
15896# ifdef DL_NOW
15897# define LT_DLLAZY_OR_NOW DL_NOW
15898# else
15899# define LT_DLLAZY_OR_NOW 0
15900# endif
15901# endif
15902# endif
15903# endif
15904#endif
15905
15906/* When -fvisibility=hidden is used, assume the code has been annotated
15907 correspondingly for the symbols needed. */
15908#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
15909int fnord () __attribute__((visibility("default")));
15910#endif
15911
15912int fnord () { return 42; }
15913int main ()
15914{
15915 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
15916 int status = $lt_dlunknown;
15917
15918 if (self)
15919 {
15920 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
15921 else
15922 {
15923 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
15924 else puts (dlerror ());
15925 }
15926 /* dlclose (self); */
15927 }
15928 else
15929 puts (dlerror ());
15930
15931 return status;
15932}
15933_LT_EOF
15934 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15935 (eval $ac_link) 2>&5
15936 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -080015937 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070015938 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
15939 (./conftest; exit; ) >&5 2>/dev/null
15940 lt_status=$?
15941 case x$lt_status in
15942 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
15943 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
15944 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
15945 esac
15946 else :
15947 # compilation failed
15948 lt_cv_dlopen_self=no
15949 fi
15950fi
15951rm -fr conftest*
15952
15953
15954fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080015955{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
15956printf "%s\n" "$lt_cv_dlopen_self" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070015957
15958 if test yes = "$lt_cv_dlopen_self"; then
15959 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
Elliott Hughesf344baa2021-12-07 09:12:34 -080015960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
15961printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
15962if test ${lt_cv_dlopen_self_static+y}
15963then :
15964 printf %s "(cached) " >&6
15965else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070015966 if test yes = "$cross_compiling"; then :
15967 lt_cv_dlopen_self_static=cross
15968else
15969 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15970 lt_status=$lt_dlunknown
15971 cat > conftest.$ac_ext <<_LT_EOF
15972#line $LINENO "configure"
15973#include "confdefs.h"
15974
15975#if HAVE_DLFCN_H
15976#include <dlfcn.h>
15977#endif
15978
15979#include <stdio.h>
15980
15981#ifdef RTLD_GLOBAL
15982# define LT_DLGLOBAL RTLD_GLOBAL
15983#else
15984# ifdef DL_GLOBAL
15985# define LT_DLGLOBAL DL_GLOBAL
15986# else
15987# define LT_DLGLOBAL 0
15988# endif
15989#endif
15990
15991/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
15992 find out it does not work in some platform. */
15993#ifndef LT_DLLAZY_OR_NOW
15994# ifdef RTLD_LAZY
15995# define LT_DLLAZY_OR_NOW RTLD_LAZY
15996# else
15997# ifdef DL_LAZY
15998# define LT_DLLAZY_OR_NOW DL_LAZY
15999# else
16000# ifdef RTLD_NOW
16001# define LT_DLLAZY_OR_NOW RTLD_NOW
16002# else
16003# ifdef DL_NOW
16004# define LT_DLLAZY_OR_NOW DL_NOW
16005# else
16006# define LT_DLLAZY_OR_NOW 0
16007# endif
16008# endif
16009# endif
16010# endif
16011#endif
16012
16013/* When -fvisibility=hidden is used, assume the code has been annotated
16014 correspondingly for the symbols needed. */
16015#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
16016int fnord () __attribute__((visibility("default")));
16017#endif
16018
16019int fnord () { return 42; }
16020int main ()
16021{
16022 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
16023 int status = $lt_dlunknown;
16024
16025 if (self)
16026 {
16027 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
16028 else
16029 {
16030 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
16031 else puts (dlerror ());
16032 }
16033 /* dlclose (self); */
16034 }
16035 else
16036 puts (dlerror ());
16037
16038 return status;
16039}
16040_LT_EOF
16041 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16042 (eval $ac_link) 2>&5
16043 ac_status=$?
Elliott Hughesf344baa2021-12-07 09:12:34 -080016044 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070016045 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
16046 (./conftest; exit; ) >&5 2>/dev/null
16047 lt_status=$?
16048 case x$lt_status in
16049 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
16050 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
16051 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
16052 esac
16053 else :
16054 # compilation failed
16055 lt_cv_dlopen_self_static=no
16056 fi
16057fi
16058rm -fr conftest*
16059
16060
16061fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080016062{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
16063printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016064 fi
16065
16066 CPPFLAGS=$save_CPPFLAGS
16067 LDFLAGS=$save_LDFLAGS
16068 LIBS=$save_LIBS
16069 ;;
16070 esac
16071
16072 case $lt_cv_dlopen_self in
16073 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
16074 *) enable_dlopen_self=unknown ;;
16075 esac
16076
16077 case $lt_cv_dlopen_self_static in
16078 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
16079 *) enable_dlopen_self_static=unknown ;;
16080 esac
16081fi
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099striplib=
16100old_striplib=
Elliott Hughesf344baa2021-12-07 09:12:34 -080016101{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
16102printf %s "checking whether stripping libraries is possible... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016103if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
16104 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
16105 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
Elliott Hughesf344baa2021-12-07 09:12:34 -080016106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16107printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016108else
16109# FIXME - insert some real tests, host_os isn't really good enough
16110 case $host_os in
16111 darwin*)
16112 if test -n "$STRIP"; then
16113 striplib="$STRIP -x"
16114 old_striplib="$STRIP -S"
Elliott Hughesf344baa2021-12-07 09:12:34 -080016115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16116printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016117 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080016118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16119printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016120 fi
16121 ;;
16122 *)
Elliott Hughesf344baa2021-12-07 09:12:34 -080016123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16124printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016125 ;;
16126 esac
16127fi
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140 # Report what library types will actually be built
Elliott Hughesf344baa2021-12-07 09:12:34 -080016141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
16142printf %s "checking if libtool supports shared libraries... " >&6; }
16143 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
16144printf "%s\n" "$can_build_shared" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016145
Elliott Hughesf344baa2021-12-07 09:12:34 -080016146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
16147printf %s "checking whether to build shared libraries... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016148 test no = "$can_build_shared" && enable_shared=no
16149
16150 # On AIX, shared libraries and static libraries use the same namespace, and
16151 # are all built from PIC.
16152 case $host_os in
16153 aix3*)
16154 test yes = "$enable_shared" && enable_static=no
16155 if test -n "$RANLIB"; then
16156 archive_cmds="$archive_cmds~\$RANLIB \$lib"
16157 postinstall_cmds='$RANLIB $lib'
16158 fi
16159 ;;
16160
16161 aix[4-9]*)
16162 if test ia64 != "$host_cpu"; then
16163 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
16164 yes,aix,yes) ;; # shared object as lib.so file only
16165 yes,svr4,*) ;; # shared object as lib.so archive member only
16166 yes,*) enable_static=no ;; # shared object in lib.a archive as well
16167 esac
16168 fi
16169 ;;
16170 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080016171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
16172printf "%s\n" "$enable_shared" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016173
Elliott Hughesf344baa2021-12-07 09:12:34 -080016174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
16175printf %s "checking whether to build static libraries... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016176 # Make sure either enable_shared or enable_static is yes.
16177 test yes = "$enable_shared" || enable_static=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080016178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
16179printf "%s\n" "$enable_static" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016180
16181
16182
16183
16184fi
16185ac_ext=c
16186ac_cpp='$CPP $CPPFLAGS'
16187ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16188ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16189ac_compiler_gnu=$ac_cv_c_compiler_gnu
16190
16191CC=$lt_save_CC
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207 ac_config_commands="$ac_config_commands libtool"
16208
16209
16210
16211
16212# Only expand once:
16213
16214
16215## --------------------- ##
16216## End of libtool code ##
16217## --------------------- ##
16218
16219#
16220# Verify if finally libtool shared libraries will be built
16221#
16222
16223case "x$enable_shared" in # ((
16224 xyes | xno)
16225 xc_lt_build_shared=$enable_shared
16226 ;;
16227 *)
16228 as_fn_error $? "unexpected libtool enable_shared value: $enable_shared" "$LINENO" 5
16229 ;;
16230esac
16231
16232#
16233# Verify if finally libtool static libraries will be built
16234#
16235
16236case "x$enable_static" in # ((
16237 xyes | xno)
16238 xc_lt_build_static=$enable_static
16239 ;;
16240 *)
16241 as_fn_error $? "unexpected libtool enable_static value: $enable_static" "$LINENO" 5
16242 ;;
16243esac
16244
16245#
16246# Verify if libtool shared libraries should be linked using flag -version-info
16247#
16248
Elliott Hughesf344baa2021-12-07 09:12:34 -080016249{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries with -version-info" >&5
16250printf %s "checking whether to build shared libraries with -version-info... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016251xc_lt_shlib_use_version_info='yes'
16252if test "x$version_type" = 'xnone'; then
16253 xc_lt_shlib_use_version_info='no'
16254fi
16255case $host_os in # (
16256 amigaos*)
16257 xc_lt_shlib_use_version_info='yes'
16258 ;;
16259esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080016260{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xc_lt_shlib_use_version_info" >&5
16261printf "%s\n" "$xc_lt_shlib_use_version_info" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016262
16263#
16264# Verify if libtool shared libraries should be linked using flag -no-undefined
16265#
16266
Elliott Hughesf344baa2021-12-07 09:12:34 -080016267{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries with -no-undefined" >&5
16268printf %s "checking whether to build shared libraries with -no-undefined... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016269xc_lt_shlib_use_no_undefined='no'
16270if test "x$allow_undefined" = 'xno'; then
16271 xc_lt_shlib_use_no_undefined='yes'
16272elif test "x$allow_undefined_flag" = 'xunsupported'; then
16273 xc_lt_shlib_use_no_undefined='yes'
16274fi
16275case $host_os in # (
16276 cygwin* | mingw* | pw32* | cegcc* | os2* | aix*)
16277 xc_lt_shlib_use_no_undefined='yes'
16278 ;;
16279esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080016280{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xc_lt_shlib_use_no_undefined" >&5
16281printf "%s\n" "$xc_lt_shlib_use_no_undefined" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016282
16283#
16284# Verify if libtool shared libraries should be linked using flag -mimpure-text
16285#
16286
Elliott Hughesf344baa2021-12-07 09:12:34 -080016287{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries with -mimpure-text" >&5
16288printf %s "checking whether to build shared libraries with -mimpure-text... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016289xc_lt_shlib_use_mimpure_text='no'
16290case $host_os in # (
16291 solaris2*)
16292 if test "x$GCC" = 'xyes'; then
16293 xc_lt_shlib_use_mimpure_text='yes'
16294 fi
16295 ;;
16296esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080016297{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xc_lt_shlib_use_mimpure_text" >&5
16298printf "%s\n" "$xc_lt_shlib_use_mimpure_text" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016299
16300#
16301# Find out whether libtool libraries would be built wit PIC
16302#
16303
16304case "x$pic_mode" in # ((((
16305 xdefault)
16306 xc_lt_build_shared_with_pic='yes'
16307 xc_lt_build_static_with_pic='no'
16308 ;;
16309 xyes)
16310 xc_lt_build_shared_with_pic='yes'
16311 xc_lt_build_static_with_pic='yes'
16312 ;;
16313 xno)
16314 xc_lt_build_shared_with_pic='no'
16315 xc_lt_build_static_with_pic='no'
16316 ;;
16317 *)
16318 xc_lt_build_shared_with_pic='unknown'
16319 xc_lt_build_static_with_pic='unknown'
Elliott Hughesf344baa2021-12-07 09:12:34 -080016320 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unexpected libtool pic_mode value: $pic_mode" >&5
16321printf "%s\n" "$as_me: WARNING: unexpected libtool pic_mode value: $pic_mode" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070016322 ;;
16323esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080016324{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries with PIC" >&5
16325printf %s "checking whether to build shared libraries with PIC... " >&6; }
16326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xc_lt_build_shared_with_pic" >&5
16327printf "%s\n" "$xc_lt_build_shared_with_pic" >&6; }
16328{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries with PIC" >&5
16329printf %s "checking whether to build static libraries with PIC... " >&6; }
16330{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xc_lt_build_static_with_pic" >&5
16331printf "%s\n" "$xc_lt_build_static_with_pic" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016332
16333#
16334# Verify if libtool shared libraries will be built while static not built
16335#
16336
Elliott Hughesf344baa2021-12-07 09:12:34 -080016337{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries only" >&5
16338printf %s "checking whether to build shared libraries only... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016339if test "$xc_lt_build_shared" = 'yes' &&
16340 test "$xc_lt_build_static" = 'no'; then
16341 xc_lt_build_shared_only='yes'
16342else
16343 xc_lt_build_shared_only='no'
16344fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080016345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xc_lt_build_shared_only" >&5
16346printf "%s\n" "$xc_lt_build_shared_only" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016347
16348#
16349# Verify if libtool static libraries will be built while shared not built
16350#
16351
Elliott Hughesf344baa2021-12-07 09:12:34 -080016352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries only" >&5
16353printf %s "checking whether to build static libraries only... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016354if test "$xc_lt_build_static" = 'yes' &&
16355 test "$xc_lt_build_shared" = 'no'; then
16356 xc_lt_build_static_only='yes'
16357else
16358 xc_lt_build_static_only='no'
16359fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080016360{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xc_lt_build_static_only" >&5
16361printf "%s\n" "$xc_lt_build_static_only" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016362
16363
16364
16365
16366#
16367# Automake conditionals based on libtool related checks
16368#
16369
16370 if test "x$xc_lt_shlib_use_version_info" = 'xyes'; then
16371 CURL_LT_SHLIB_USE_VERSION_INFO_TRUE=
16372 CURL_LT_SHLIB_USE_VERSION_INFO_FALSE='#'
16373else
16374 CURL_LT_SHLIB_USE_VERSION_INFO_TRUE='#'
16375 CURL_LT_SHLIB_USE_VERSION_INFO_FALSE=
16376fi
16377
16378 if test "x$xc_lt_shlib_use_no_undefined" = 'xyes'; then
16379 CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE=
16380 CURL_LT_SHLIB_USE_NO_UNDEFINED_FALSE='#'
16381else
16382 CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE='#'
16383 CURL_LT_SHLIB_USE_NO_UNDEFINED_FALSE=
16384fi
16385
16386 if test "x$xc_lt_shlib_use_mimpure_text" = 'xyes'; then
16387 CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE=
16388 CURL_LT_SHLIB_USE_MIMPURE_TEXT_FALSE='#'
16389else
16390 CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE='#'
16391 CURL_LT_SHLIB_USE_MIMPURE_TEXT_FALSE=
16392fi
16393
16394
16395#
16396# Due to libtool and automake machinery limitations of not allowing
16397# specifying separate CPPFLAGS or CFLAGS when compiling objects for
16398# inclusion of these in shared or static libraries, we are forced to
16399# build using separate configure runs for shared and static libraries
16400# on systems where different CPPFLAGS or CFLAGS are mandatory in order
16401# to compile objects for each kind of library. Notice that relying on
16402# the '-DPIC' CFLAG that libtool provides is not valid given that the
16403# user might for example choose to build static libraries with PIC.
16404#
16405
16406#
16407# Make our Makefile.am files use the staticlib CPPFLAG only when strictly
16408# targeting a static library and not building its shared counterpart.
16409#
16410
16411 if test "x$xc_lt_build_static_only" = 'xyes'; then
16412 USE_CPPFLAG_CURL_STATICLIB_TRUE=
16413 USE_CPPFLAG_CURL_STATICLIB_FALSE='#'
16414else
16415 USE_CPPFLAG_CURL_STATICLIB_TRUE='#'
16416 USE_CPPFLAG_CURL_STATICLIB_FALSE=
16417fi
16418
16419
16420#
16421# Make staticlib CPPFLAG variable and its definition visible in output
16422# files unconditionally, providing an empty definition unless strictly
16423# targeting a static library and not building its shared counterpart.
16424#
16425
16426CPPFLAG_CURL_STATICLIB=
16427if test "x$xc_lt_build_static_only" = 'xyes'; then
16428 CPPFLAG_CURL_STATICLIB='-DCURL_STATICLIB'
16429fi
16430
16431
16432
16433# Determine whether all dependent libraries must be specified when linking
16434if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno"
16435then
16436 REQUIRE_LIB_DEPS=no
16437else
16438 REQUIRE_LIB_DEPS=yes
16439fi
16440
16441 if test x$REQUIRE_LIB_DEPS = xyes; then
16442 USE_EXPLICIT_LIB_DEPS_TRUE=
16443 USE_EXPLICIT_LIB_DEPS_FALSE='#'
16444else
16445 USE_EXPLICIT_LIB_DEPS_TRUE='#'
16446 USE_EXPLICIT_LIB_DEPS_FALSE=
16447fi
16448
16449
Elliott Hughesf344baa2021-12-07 09:12:34 -080016450{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
16451printf %s "checking for inline... " >&6; }
16452if test ${ac_cv_c_inline+y}
16453then :
16454 printf %s "(cached) " >&6
16455else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070016456 ac_cv_c_inline=no
16457for ac_kw in inline __inline__ __inline; do
16458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16459/* end confdefs.h. */
16460#ifndef __cplusplus
16461typedef int foo_t;
Elliott Hughesf344baa2021-12-07 09:12:34 -080016462static $ac_kw foo_t static_foo (void) {return 0; }
16463$ac_kw foo_t foo (void) {return 0; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016464#endif
16465
16466_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080016467if ac_fn_c_try_compile "$LINENO"
16468then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070016469 ac_cv_c_inline=$ac_kw
16470fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080016471rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070016472 test "$ac_cv_c_inline" != no && break
16473done
16474
16475fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080016476{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
16477printf "%s\n" "$ac_cv_c_inline" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016478
16479case $ac_cv_c_inline in
16480 inline | yes) ;;
16481 *)
16482 case $ac_cv_c_inline in
16483 no) ac_val=;;
16484 *) ac_val=$ac_cv_c_inline;;
16485 esac
16486 cat >>confdefs.h <<_ACEOF
16487#ifndef __cplusplus
16488#define inline $ac_val
16489#endif
16490_ACEOF
16491 ;;
16492esac
16493
16494
16495
16496
Elliott Hughesf344baa2021-12-07 09:12:34 -080016497 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if cpp -P is needed" >&5
16498printf %s "checking if cpp -P is needed... " >&6; }
Alex Deymo486467e2017-12-19 19:04:07 +010016499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16500/* end confdefs.h. */
16501
16502 #include <errno.h>
16503TEST EINVAL TEST
16504
16505_ACEOF
16506if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080016507 $EGREP "TEST.*TEST" >/dev/null 2>&1
16508then :
Alex Deymo486467e2017-12-19 19:04:07 +010016509 cpp=no
Elliott Hughesf344baa2021-12-07 09:12:34 -080016510else $as_nop
Alex Deymo486467e2017-12-19 19:04:07 +010016511 cpp=yes
16512fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080016513rm -rf conftest*
Alex Deymo486467e2017-12-19 19:04:07 +010016514
Elliott Hughesf344baa2021-12-07 09:12:34 -080016515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cpp" >&5
16516printf "%s\n" "$cpp" >&6; }
Alex Deymo486467e2017-12-19 19:04:07 +010016517
16518 if test "x$cpp" = "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080016519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if cpp -P works" >&5
16520printf %s "checking if cpp -P works... " >&6; }
Alex Deymo486467e2017-12-19 19:04:07 +010016521 OLDCPPFLAGS=$CPPFLAGS
16522 CPPFLAGS="$CPPFLAGS -P"
16523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16524/* end confdefs.h. */
16525
16526 #include <errno.h>
16527TEST EINVAL TEST
16528
16529_ACEOF
16530if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080016531 $EGREP "TEST.*TEST" >/dev/null 2>&1
16532then :
Alex Deymo486467e2017-12-19 19:04:07 +010016533 cpp_p=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080016534else $as_nop
Alex Deymo486467e2017-12-19 19:04:07 +010016535 cpp_p=no
16536fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080016537rm -rf conftest*
Alex Deymo486467e2017-12-19 19:04:07 +010016538
Elliott Hughesf344baa2021-12-07 09:12:34 -080016539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cpp_p" >&5
16540printf "%s\n" "$cpp_p" >&6; }
Alex Deymo486467e2017-12-19 19:04:07 +010016541
16542 if test "x$cpp_p" = "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080016543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: failed to figure out cpp -P alternative" >&5
16544printf "%s\n" "$as_me: WARNING: failed to figure out cpp -P alternative" >&2;}
Alex Deymo486467e2017-12-19 19:04:07 +010016545 # without -P
16546 CPPPFLAG=""
16547 else
16548 # with -P
16549 CPPPFLAG="-P"
16550 fi
16551 CPPFLAGS=$OLDCPPFLAGS
16552 else
16553 # without -P
16554 CPPPFLAG=""
16555 fi
16556
16557
Elliott Hughes82be86d2017-09-20 17:00:17 -070016558 #
16559 compiler_id="unknown"
16560 compiler_num="0"
16561 #
Elliott Hughes82be86d2017-09-20 17:00:17 -070016562 flags_dbg_yes="unknown"
Elliott Hughes82be86d2017-09-20 17:00:17 -070016563 flags_opt_all="unknown"
16564 flags_opt_yes="unknown"
16565 flags_opt_off="unknown"
16566 #
16567 flags_prefer_cppflags="no"
16568 #
16569
Elliott Hughesf344baa2021-12-07 09:12:34 -080016570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler is DEC/Compaq/HP C" >&5
16571printf %s "checking if compiler is DEC/Compaq/HP C... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016572
16573 OLDCPPFLAGS=$CPPFLAGS
16574 # CPPPFLAG comes from CURL_CPP_P
16575 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
16576 if test -z "$SED"; then
16577 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
16578 fi
16579 if test -z "$GREP"; then
16580 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
16581 fi
16582
16583 tmp_exp=""
16584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16585/* end confdefs.h. */
16586
16587
16588#ifdef __DECC
16589CURL_DEF_TOKEN __DECC
16590#endif
16591
16592
16593_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080016594if ac_fn_c_try_cpp "$LINENO"
16595then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070016596
16597 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
16598 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
16599 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
16600 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
16601 if test -z "$tmp_exp" || test "$tmp_exp" = "__DECC"; then
16602 tmp_exp=""
16603 fi
16604
16605fi
16606rm -f conftest.err conftest.i conftest.$ac_ext
16607 if test -z "$tmp_exp"; then
16608 curl_cv_have_def___DECC=no
16609
16610 else
16611 curl_cv_have_def___DECC=yes
16612 curl_cv_def___DECC=$tmp_exp
16613
16614 fi
16615 CPPFLAGS=$OLDCPPFLAGS
16616
16617
16618 OLDCPPFLAGS=$CPPFLAGS
16619 # CPPPFLAG comes from CURL_CPP_P
16620 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
16621 if test -z "$SED"; then
16622 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
16623 fi
16624 if test -z "$GREP"; then
16625 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
16626 fi
16627
16628 tmp_exp=""
16629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16630/* end confdefs.h. */
16631
16632
16633#ifdef __DECC_VER
16634CURL_DEF_TOKEN __DECC_VER
16635#endif
16636
16637
16638_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080016639if ac_fn_c_try_cpp "$LINENO"
16640then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070016641
16642 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
16643 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
16644 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
16645 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
16646 if test -z "$tmp_exp" || test "$tmp_exp" = "__DECC_VER"; then
16647 tmp_exp=""
16648 fi
16649
16650fi
16651rm -f conftest.err conftest.i conftest.$ac_ext
16652 if test -z "$tmp_exp"; then
16653 curl_cv_have_def___DECC_VER=no
16654
16655 else
16656 curl_cv_have_def___DECC_VER=yes
16657 curl_cv_def___DECC_VER=$tmp_exp
16658
16659 fi
16660 CPPFLAGS=$OLDCPPFLAGS
16661
16662 if test "$curl_cv_have_def___DECC" = "yes" &&
16663 test "$curl_cv_have_def___DECC_VER" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080016664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16665printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016666 compiler_id="DEC_C"
Elliott Hughes82be86d2017-09-20 17:00:17 -070016667 flags_dbg_yes="-g2"
Elliott Hughes82be86d2017-09-20 17:00:17 -070016668 flags_opt_all="-O -O0 -O1 -O2 -O3 -O4"
16669 flags_opt_yes="-O1"
16670 flags_opt_off="-O0"
16671 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080016672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16673printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016674 fi
16675
16676
Elliott Hughesf344baa2021-12-07 09:12:34 -080016677 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler is HP-UX C" >&5
16678printf %s "checking if compiler is HP-UX C... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016679
16680 OLDCPPFLAGS=$CPPFLAGS
16681 # CPPPFLAG comes from CURL_CPP_P
16682 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
16683 if test -z "$SED"; then
16684 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
16685 fi
16686 if test -z "$GREP"; then
16687 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
16688 fi
16689
16690 tmp_exp=""
16691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16692/* end confdefs.h. */
16693
16694
16695#ifdef __HP_cc
16696CURL_DEF_TOKEN __HP_cc
16697#endif
16698
16699
16700_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080016701if ac_fn_c_try_cpp "$LINENO"
16702then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070016703
16704 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
16705 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
16706 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
16707 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
16708 if test -z "$tmp_exp" || test "$tmp_exp" = "__HP_cc"; then
16709 tmp_exp=""
16710 fi
16711
16712fi
16713rm -f conftest.err conftest.i conftest.$ac_ext
16714 if test -z "$tmp_exp"; then
16715 curl_cv_have_def___HP_cc=no
16716
16717 else
16718 curl_cv_have_def___HP_cc=yes
16719 curl_cv_def___HP_cc=$tmp_exp
16720
16721 fi
16722 CPPFLAGS=$OLDCPPFLAGS
16723
16724 if test "$curl_cv_have_def___HP_cc" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080016725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16726printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016727 compiler_id="HP_UX_C"
Elliott Hughes82be86d2017-09-20 17:00:17 -070016728 flags_dbg_yes="-g"
Elliott Hughes82be86d2017-09-20 17:00:17 -070016729 flags_opt_all="-O +O0 +O1 +O2 +O3 +O4"
16730 flags_opt_yes="+O2"
16731 flags_opt_off="+O0"
16732 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080016733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16734printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016735 fi
16736
16737
Elliott Hughesf344baa2021-12-07 09:12:34 -080016738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler is IBM C" >&5
16739printf %s "checking if compiler is IBM C... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016740
16741 OLDCPPFLAGS=$CPPFLAGS
16742 # CPPPFLAG comes from CURL_CPP_P
16743 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
16744 if test -z "$SED"; then
16745 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
16746 fi
16747 if test -z "$GREP"; then
16748 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
16749 fi
16750
16751 tmp_exp=""
16752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16753/* end confdefs.h. */
16754
16755
16756#ifdef __IBMC__
16757CURL_DEF_TOKEN __IBMC__
16758#endif
16759
16760
16761_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080016762if ac_fn_c_try_cpp "$LINENO"
16763then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070016764
16765 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
16766 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
16767 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
16768 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
16769 if test -z "$tmp_exp" || test "$tmp_exp" = "__IBMC__"; then
16770 tmp_exp=""
16771 fi
16772
16773fi
16774rm -f conftest.err conftest.i conftest.$ac_ext
16775 if test -z "$tmp_exp"; then
16776 curl_cv_have_def___IBMC__=no
16777
16778 else
16779 curl_cv_have_def___IBMC__=yes
16780 curl_cv_def___IBMC__=$tmp_exp
16781
16782 fi
16783 CPPFLAGS=$OLDCPPFLAGS
16784
16785 if test "$curl_cv_have_def___IBMC__" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080016786 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16787printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016788 compiler_id="IBM_C"
Elliott Hughes82be86d2017-09-20 17:00:17 -070016789 flags_dbg_yes="-g"
Elliott Hughes82be86d2017-09-20 17:00:17 -070016790 flags_opt_all="-O -O0 -O1 -O2 -O3 -O4 -O5"
16791 flags_opt_all="$flags_opt_all -qnooptimize"
16792 flags_opt_all="$flags_opt_all -qoptimize=0"
16793 flags_opt_all="$flags_opt_all -qoptimize=1"
16794 flags_opt_all="$flags_opt_all -qoptimize=2"
16795 flags_opt_all="$flags_opt_all -qoptimize=3"
16796 flags_opt_all="$flags_opt_all -qoptimize=4"
16797 flags_opt_all="$flags_opt_all -qoptimize=5"
16798 flags_opt_yes="-O2"
16799 flags_opt_off="-qnooptimize"
16800 flags_prefer_cppflags="yes"
16801 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080016802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16803printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016804 fi
16805
16806
Elliott Hughesf344baa2021-12-07 09:12:34 -080016807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler is Intel C" >&5
16808printf %s "checking if compiler is Intel C... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016809
16810 OLDCPPFLAGS=$CPPFLAGS
16811 # CPPPFLAG comes from CURL_CPP_P
16812 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
16813 if test -z "$SED"; then
16814 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
16815 fi
16816 if test -z "$GREP"; then
16817 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
16818 fi
16819
16820 tmp_exp=""
16821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16822/* end confdefs.h. */
16823
16824
16825#ifdef __INTEL_COMPILER
16826CURL_DEF_TOKEN __INTEL_COMPILER
16827#endif
16828
16829
16830_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080016831if ac_fn_c_try_cpp "$LINENO"
16832then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070016833
16834 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
16835 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
16836 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
16837 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
16838 if test -z "$tmp_exp" || test "$tmp_exp" = "__INTEL_COMPILER"; then
16839 tmp_exp=""
16840 fi
16841
16842fi
16843rm -f conftest.err conftest.i conftest.$ac_ext
16844 if test -z "$tmp_exp"; then
16845 curl_cv_have_def___INTEL_COMPILER=no
16846
16847 else
16848 curl_cv_have_def___INTEL_COMPILER=yes
16849 curl_cv_def___INTEL_COMPILER=$tmp_exp
16850
16851 fi
16852 CPPFLAGS=$OLDCPPFLAGS
16853
16854 if test "$curl_cv_have_def___INTEL_COMPILER" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080016855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16856printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016857 compiler_num="$curl_cv_def___INTEL_COMPILER"
16858
16859 OLDCPPFLAGS=$CPPFLAGS
16860 # CPPPFLAG comes from CURL_CPP_P
16861 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
16862 if test -z "$SED"; then
16863 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
16864 fi
16865 if test -z "$GREP"; then
16866 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
16867 fi
16868
16869 tmp_exp=""
16870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16871/* end confdefs.h. */
16872
16873
16874#ifdef __unix__
16875CURL_DEF_TOKEN __unix__
16876#endif
16877
16878
16879_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080016880if ac_fn_c_try_cpp "$LINENO"
16881then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070016882
16883 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
16884 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
16885 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
16886 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
16887 if test -z "$tmp_exp" || test "$tmp_exp" = ""; then
16888 tmp_exp=""
16889 fi
16890
16891fi
16892rm -f conftest.err conftest.i conftest.$ac_ext
16893 if test -z "$tmp_exp"; then
16894 curl_cv_have_def___unix__=no
16895
16896 else
16897 curl_cv_have_def___unix__=yes
16898 curl_cv_def___unix__=$tmp_exp
16899
16900 fi
16901 CPPFLAGS=$OLDCPPFLAGS
16902
16903 if test "$curl_cv_have_def___unix__" = "yes"; then
16904 compiler_id="INTEL_UNIX_C"
Elliott Hughes82be86d2017-09-20 17:00:17 -070016905 flags_dbg_yes="-g"
Elliott Hughes82be86d2017-09-20 17:00:17 -070016906 flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
16907 flags_opt_yes="-O2"
16908 flags_opt_off="-O0"
16909 else
16910 compiler_id="INTEL_WINDOWS_C"
Elliott Hughes82be86d2017-09-20 17:00:17 -070016911 flags_dbg_yes="/Zi /Oy-"
Elliott Hughes82be86d2017-09-20 17:00:17 -070016912 flags_opt_all="/O /O0 /O1 /O2 /O3 /Od /Og /Og- /Oi /Oi-"
16913 flags_opt_yes="/O2"
16914 flags_opt_off="/Od"
16915 fi
16916 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080016917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16918printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016919 fi
16920
16921
Elliott Hughesf344baa2021-12-07 09:12:34 -080016922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler is clang" >&5
16923printf %s "checking if compiler is clang... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070016924
16925 OLDCPPFLAGS=$CPPFLAGS
16926 # CPPPFLAG comes from CURL_CPP_P
16927 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
16928 if test -z "$SED"; then
16929 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
16930 fi
16931 if test -z "$GREP"; then
16932 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
16933 fi
16934
16935 tmp_exp=""
16936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16937/* end confdefs.h. */
16938
16939
16940#ifdef __clang__
16941CURL_DEF_TOKEN __clang__
16942#endif
16943
16944
16945_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080016946if ac_fn_c_try_cpp "$LINENO"
16947then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070016948
16949 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
16950 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
16951 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
16952 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
16953 if test -z "$tmp_exp" || test "$tmp_exp" = "__clang__"; then
16954 tmp_exp=""
16955 fi
16956
16957fi
16958rm -f conftest.err conftest.i conftest.$ac_ext
16959 if test -z "$tmp_exp"; then
16960 curl_cv_have_def___clang__=no
16961
16962 else
16963 curl_cv_have_def___clang__=yes
16964 curl_cv_def___clang__=$tmp_exp
16965
16966 fi
16967 CPPFLAGS=$OLDCPPFLAGS
16968
16969 if test "$curl_cv_have_def___clang__" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080016970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16971printf "%s\n" "yes" >&6; }
16972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler is xlclang" >&5
16973printf %s "checking if compiler is xlclang... " >&6; }
Haibo Huang51d9d882019-02-06 01:36:06 -080016974
16975 OLDCPPFLAGS=$CPPFLAGS
16976 # CPPPFLAG comes from CURL_CPP_P
16977 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
16978 if test -z "$SED"; then
16979 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
16980 fi
16981 if test -z "$GREP"; then
16982 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
16983 fi
16984
16985 tmp_exp=""
16986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16987/* end confdefs.h. */
16988
16989
16990#ifdef __ibmxl__
16991CURL_DEF_TOKEN __ibmxl__
16992#endif
16993
16994
16995_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080016996if ac_fn_c_try_cpp "$LINENO"
16997then :
Haibo Huang51d9d882019-02-06 01:36:06 -080016998
16999 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
17000 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
17001 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
17002 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
17003 if test -z "$tmp_exp" || test "$tmp_exp" = "__ibmxl__"; then
17004 tmp_exp=""
17005 fi
17006
17007fi
17008rm -f conftest.err conftest.i conftest.$ac_ext
17009 if test -z "$tmp_exp"; then
17010 curl_cv_have_def___ibmxl__=no
17011
17012 else
17013 curl_cv_have_def___ibmxl__=yes
17014 curl_cv_def___ibmxl__=$tmp_exp
17015
17016 fi
17017 CPPFLAGS=$OLDCPPFLAGS
17018
17019 if test "$curl_cv_have_def___ibmxl__" = "yes" ; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080017020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17021printf "%s\n" "yes" >&6; }
Haibo Huang51d9d882019-02-06 01:36:06 -080017022 compiler_id="XLCLANG"
17023 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080017024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17025printf "%s\n" "no" >&6; }
Haibo Huang51d9d882019-02-06 01:36:06 -080017026 compiler_id="CLANG"
17027 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070017028 fullclangver=`$CC -v 2>&1 | grep version`
17029 clangver=`echo $fullclangver | grep "based on LLVM " | "$SED" 's/.*(based on LLVM \([0-9]*\.[0-9]*\).*)/\1/'`
17030 if test -z "$clangver"; then
17031 if echo $fullclangver | grep "Apple LLVM version " >/dev/null; then
Alex Deymo486467e2017-12-19 19:04:07 +010017032 clangver="3.7"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017033 else
17034 clangver=`echo $fullclangver | "$SED" 's/.*version \([0-9]*\.[0-9]*\).*/\1/'`
17035 fi
17036 fi
17037 clangvhi=`echo $clangver | cut -d . -f1`
17038 clangvlo=`echo $clangver | cut -d . -f2`
17039 compiler_num=`(expr $clangvhi "*" 100 + $clangvlo) 2>/dev/null`
Elliott Hughes82be86d2017-09-20 17:00:17 -070017040 flags_dbg_yes="-g"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017041 flags_opt_all="-O -O0 -O1 -O2 -Os -O3 -O4"
17042 flags_opt_yes="-Os"
17043 flags_opt_off="-O0"
17044 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080017045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17046printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017047 fi
17048
17049
Elliott Hughesf344baa2021-12-07 09:12:34 -080017050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler is GNU C" >&5
17051printf %s "checking if compiler is GNU C... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017052
17053 OLDCPPFLAGS=$CPPFLAGS
17054 # CPPPFLAG comes from CURL_CPP_P
17055 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
17056 if test -z "$SED"; then
17057 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
17058 fi
17059 if test -z "$GREP"; then
17060 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
17061 fi
17062
17063 tmp_exp=""
17064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17065/* end confdefs.h. */
17066
17067
17068#ifdef __GNUC__
17069CURL_DEF_TOKEN __GNUC__
17070#endif
17071
17072
17073_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080017074if ac_fn_c_try_cpp "$LINENO"
17075then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070017076
17077 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
17078 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
17079 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
17080 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
17081 if test -z "$tmp_exp" || test "$tmp_exp" = "__GNUC__"; then
17082 tmp_exp=""
17083 fi
17084
17085fi
17086rm -f conftest.err conftest.i conftest.$ac_ext
17087 if test -z "$tmp_exp"; then
17088 curl_cv_have_def___GNUC__=no
17089
17090 else
17091 curl_cv_have_def___GNUC__=yes
17092 curl_cv_def___GNUC__=$tmp_exp
17093
17094 fi
17095 CPPFLAGS=$OLDCPPFLAGS
17096
17097 if test "$curl_cv_have_def___GNUC__" = "yes" &&
17098 test "$compiler_id" = "unknown"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080017099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17100printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017101 compiler_id="GNU_C"
17102 gccver=`$CC -dumpversion`
17103 gccvhi=`echo $gccver | cut -d . -f1`
17104 gccvlo=`echo $gccver | cut -d . -f2`
17105 compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
Elliott Hughes82be86d2017-09-20 17:00:17 -070017106 flags_dbg_yes="-g"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017107 flags_opt_all="-O -O0 -O1 -O2 -O3 -Os -Og -Ofast"
17108 flags_opt_yes="-O2"
17109 flags_opt_off="-O0"
17110
17111 OLDCPPFLAGS=$CPPFLAGS
17112 # CPPPFLAG comes from CURL_CPP_P
17113 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
17114 if test -z "$SED"; then
17115 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
17116 fi
17117 if test -z "$GREP"; then
17118 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
17119 fi
17120
17121 tmp_exp=""
17122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17123/* end confdefs.h. */
17124
17125
17126#ifdef _WIN32
17127CURL_DEF_TOKEN _WIN32
17128#endif
17129
17130
17131_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080017132if ac_fn_c_try_cpp "$LINENO"
17133then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070017134
17135 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
17136 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
17137 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
17138 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
17139 if test -z "$tmp_exp" || test "$tmp_exp" = "_WIN32"; then
17140 tmp_exp=""
17141 fi
17142
17143fi
17144rm -f conftest.err conftest.i conftest.$ac_ext
17145 if test -z "$tmp_exp"; then
17146 curl_cv_have_def__WIN32=no
17147
17148 else
17149 curl_cv_have_def__WIN32=yes
17150 curl_cv_def__WIN32=$tmp_exp
17151
17152 fi
17153 CPPFLAGS=$OLDCPPFLAGS
17154
17155 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080017156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17157printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017158 fi
17159
17160
Elliott Hughesf344baa2021-12-07 09:12:34 -080017161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler is LCC" >&5
17162printf %s "checking if compiler is LCC... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017163
17164 OLDCPPFLAGS=$CPPFLAGS
17165 # CPPPFLAG comes from CURL_CPP_P
17166 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
17167 if test -z "$SED"; then
17168 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
17169 fi
17170 if test -z "$GREP"; then
17171 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
17172 fi
17173
17174 tmp_exp=""
17175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17176/* end confdefs.h. */
17177
17178
17179#ifdef __LCC__
17180CURL_DEF_TOKEN __LCC__
17181#endif
17182
17183
17184_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080017185if ac_fn_c_try_cpp "$LINENO"
17186then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070017187
17188 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
17189 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
17190 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
17191 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
17192 if test -z "$tmp_exp" || test "$tmp_exp" = "__LCC__"; then
17193 tmp_exp=""
17194 fi
17195
17196fi
17197rm -f conftest.err conftest.i conftest.$ac_ext
17198 if test -z "$tmp_exp"; then
17199 curl_cv_have_def___LCC__=no
17200
17201 else
17202 curl_cv_have_def___LCC__=yes
17203 curl_cv_def___LCC__=$tmp_exp
17204
17205 fi
17206 CPPFLAGS=$OLDCPPFLAGS
17207
17208 if test "$curl_cv_have_def___LCC__" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080017209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17210printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017211 compiler_id="LCC"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017212 flags_dbg_yes="-g"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017213 flags_opt_all=""
17214 flags_opt_yes=""
17215 flags_opt_off=""
17216 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080017217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17218printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017219 fi
17220
17221
Elliott Hughesf344baa2021-12-07 09:12:34 -080017222 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler is SGI MIPSpro C" >&5
17223printf %s "checking if compiler is SGI MIPSpro C... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017224
17225 OLDCPPFLAGS=$CPPFLAGS
17226 # CPPPFLAG comes from CURL_CPP_P
17227 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
17228 if test -z "$SED"; then
17229 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
17230 fi
17231 if test -z "$GREP"; then
17232 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
17233 fi
17234
17235 tmp_exp=""
17236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17237/* end confdefs.h. */
17238
17239
17240#ifdef __GNUC__
17241CURL_DEF_TOKEN __GNUC__
17242#endif
17243
17244
17245_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080017246if ac_fn_c_try_cpp "$LINENO"
17247then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070017248
17249 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
17250 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
17251 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
17252 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
17253 if test -z "$tmp_exp" || test "$tmp_exp" = "__GNUC__"; then
17254 tmp_exp=""
17255 fi
17256
17257fi
17258rm -f conftest.err conftest.i conftest.$ac_ext
17259 if test -z "$tmp_exp"; then
17260 curl_cv_have_def___GNUC__=no
17261
17262 else
17263 curl_cv_have_def___GNUC__=yes
17264 curl_cv_def___GNUC__=$tmp_exp
17265
17266 fi
17267 CPPFLAGS=$OLDCPPFLAGS
17268
17269
17270 OLDCPPFLAGS=$CPPFLAGS
17271 # CPPPFLAG comes from CURL_CPP_P
17272 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
17273 if test -z "$SED"; then
17274 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
17275 fi
17276 if test -z "$GREP"; then
17277 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
17278 fi
17279
17280 tmp_exp=""
17281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17282/* end confdefs.h. */
17283
17284
17285#ifdef _COMPILER_VERSION
17286CURL_DEF_TOKEN _COMPILER_VERSION
17287#endif
17288
17289
17290_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080017291if ac_fn_c_try_cpp "$LINENO"
17292then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070017293
17294 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
17295 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
17296 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
17297 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
17298 if test -z "$tmp_exp" || test "$tmp_exp" = "_COMPILER_VERSION"; then
17299 tmp_exp=""
17300 fi
17301
17302fi
17303rm -f conftest.err conftest.i conftest.$ac_ext
17304 if test -z "$tmp_exp"; then
17305 curl_cv_have_def__COMPILER_VERSION=no
17306
17307 else
17308 curl_cv_have_def__COMPILER_VERSION=yes
17309 curl_cv_def__COMPILER_VERSION=$tmp_exp
17310
17311 fi
17312 CPPFLAGS=$OLDCPPFLAGS
17313
17314
17315 OLDCPPFLAGS=$CPPFLAGS
17316 # CPPPFLAG comes from CURL_CPP_P
17317 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
17318 if test -z "$SED"; then
17319 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
17320 fi
17321 if test -z "$GREP"; then
17322 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
17323 fi
17324
17325 tmp_exp=""
17326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17327/* end confdefs.h. */
17328
17329
17330#ifdef _SGI_COMPILER_VERSION
17331CURL_DEF_TOKEN _SGI_COMPILER_VERSION
17332#endif
17333
17334
17335_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080017336if ac_fn_c_try_cpp "$LINENO"
17337then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070017338
17339 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
17340 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
17341 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
17342 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
17343 if test -z "$tmp_exp" || test "$tmp_exp" = "_SGI_COMPILER_VERSION"; then
17344 tmp_exp=""
17345 fi
17346
17347fi
17348rm -f conftest.err conftest.i conftest.$ac_ext
17349 if test -z "$tmp_exp"; then
17350 curl_cv_have_def__SGI_COMPILER_VERSION=no
17351
17352 else
17353 curl_cv_have_def__SGI_COMPILER_VERSION=yes
17354 curl_cv_def__SGI_COMPILER_VERSION=$tmp_exp
17355
17356 fi
17357 CPPFLAGS=$OLDCPPFLAGS
17358
17359 if test "$curl_cv_have_def___GNUC__" = "no" &&
17360 (test "$curl_cv_have_def__SGI_COMPILER_VERSION" = "yes" ||
17361 test "$curl_cv_have_def__COMPILER_VERSION" = "yes"); then
Elliott Hughesf344baa2021-12-07 09:12:34 -080017362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17363printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017364 compiler_id="SGI_MIPSPRO_C"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017365 flags_dbg_yes="-g"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017366 flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
17367 flags_opt_yes="-O2"
17368 flags_opt_off="-O0"
17369 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080017370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17371printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017372 fi
17373
17374
Elliott Hughesf344baa2021-12-07 09:12:34 -080017375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler is SGI MIPS C" >&5
17376printf %s "checking if compiler is SGI MIPS C... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017377
17378 OLDCPPFLAGS=$CPPFLAGS
17379 # CPPPFLAG comes from CURL_CPP_P
17380 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
17381 if test -z "$SED"; then
17382 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
17383 fi
17384 if test -z "$GREP"; then
17385 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
17386 fi
17387
17388 tmp_exp=""
17389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17390/* end confdefs.h. */
17391
17392
17393#ifdef __GNUC__
17394CURL_DEF_TOKEN __GNUC__
17395#endif
17396
17397
17398_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080017399if ac_fn_c_try_cpp "$LINENO"
17400then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070017401
17402 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
17403 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
17404 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
17405 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
17406 if test -z "$tmp_exp" || test "$tmp_exp" = "__GNUC__"; then
17407 tmp_exp=""
17408 fi
17409
17410fi
17411rm -f conftest.err conftest.i conftest.$ac_ext
17412 if test -z "$tmp_exp"; then
17413 curl_cv_have_def___GNUC__=no
17414
17415 else
17416 curl_cv_have_def___GNUC__=yes
17417 curl_cv_def___GNUC__=$tmp_exp
17418
17419 fi
17420 CPPFLAGS=$OLDCPPFLAGS
17421
17422
17423 OLDCPPFLAGS=$CPPFLAGS
17424 # CPPPFLAG comes from CURL_CPP_P
17425 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
17426 if test -z "$SED"; then
17427 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
17428 fi
17429 if test -z "$GREP"; then
17430 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
17431 fi
17432
17433 tmp_exp=""
17434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17435/* end confdefs.h. */
17436
17437
17438#ifdef __sgi
17439CURL_DEF_TOKEN __sgi
17440#endif
17441
17442
17443_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080017444if ac_fn_c_try_cpp "$LINENO"
17445then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070017446
17447 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
17448 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
17449 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
17450 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
17451 if test -z "$tmp_exp" || test "$tmp_exp" = "__sgi"; then
17452 tmp_exp=""
17453 fi
17454
17455fi
17456rm -f conftest.err conftest.i conftest.$ac_ext
17457 if test -z "$tmp_exp"; then
17458 curl_cv_have_def___sgi=no
17459
17460 else
17461 curl_cv_have_def___sgi=yes
17462 curl_cv_def___sgi=$tmp_exp
17463
17464 fi
17465 CPPFLAGS=$OLDCPPFLAGS
17466
17467 if test "$curl_cv_have_def___GNUC__" = "no" &&
17468 test "$curl_cv_have_def___sgi" = "yes" &&
17469 test "$compiler_id" = "unknown"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080017470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17471printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017472 compiler_id="SGI_MIPS_C"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017473 flags_dbg_yes="-g"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017474 flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
17475 flags_opt_yes="-O2"
17476 flags_opt_off="-O0"
17477 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080017478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17479printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017480 fi
17481
17482
Elliott Hughesf344baa2021-12-07 09:12:34 -080017483 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler is SunPro C" >&5
17484printf %s "checking if compiler is SunPro C... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017485
17486 OLDCPPFLAGS=$CPPFLAGS
17487 # CPPPFLAG comes from CURL_CPP_P
17488 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
17489 if test -z "$SED"; then
17490 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
17491 fi
17492 if test -z "$GREP"; then
17493 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
17494 fi
17495
17496 tmp_exp=""
17497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17498/* end confdefs.h. */
17499
17500
17501#ifdef __SUNPRO_C
17502CURL_DEF_TOKEN __SUNPRO_C
17503#endif
17504
17505
17506_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080017507if ac_fn_c_try_cpp "$LINENO"
17508then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070017509
17510 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
17511 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
17512 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
17513 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
17514 if test -z "$tmp_exp" || test "$tmp_exp" = "__SUNPRO_C"; then
17515 tmp_exp=""
17516 fi
17517
17518fi
17519rm -f conftest.err conftest.i conftest.$ac_ext
17520 if test -z "$tmp_exp"; then
17521 curl_cv_have_def___SUNPRO_C=no
17522
17523 else
17524 curl_cv_have_def___SUNPRO_C=yes
17525 curl_cv_def___SUNPRO_C=$tmp_exp
17526
17527 fi
17528 CPPFLAGS=$OLDCPPFLAGS
17529
17530 if test "$curl_cv_have_def___SUNPRO_C" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080017531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17532printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017533 compiler_id="SUNPRO_C"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017534 flags_dbg_yes="-g"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017535 flags_opt_all="-O -xO -xO1 -xO2 -xO3 -xO4 -xO5"
17536 flags_opt_yes="-xO2"
17537 flags_opt_off=""
17538 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080017539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17540printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017541 fi
17542
17543
Elliott Hughesf344baa2021-12-07 09:12:34 -080017544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler is Tiny C" >&5
17545printf %s "checking if compiler is Tiny C... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017546
17547 OLDCPPFLAGS=$CPPFLAGS
17548 # CPPPFLAG comes from CURL_CPP_P
17549 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
17550 if test -z "$SED"; then
17551 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
17552 fi
17553 if test -z "$GREP"; then
17554 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
17555 fi
17556
17557 tmp_exp=""
17558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17559/* end confdefs.h. */
17560
17561
17562#ifdef __TINYC__
17563CURL_DEF_TOKEN __TINYC__
17564#endif
17565
17566
17567_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080017568if ac_fn_c_try_cpp "$LINENO"
17569then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070017570
17571 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
17572 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
17573 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
17574 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
17575 if test -z "$tmp_exp" || test "$tmp_exp" = "__TINYC__"; then
17576 tmp_exp=""
17577 fi
17578
17579fi
17580rm -f conftest.err conftest.i conftest.$ac_ext
17581 if test -z "$tmp_exp"; then
17582 curl_cv_have_def___TINYC__=no
17583
17584 else
17585 curl_cv_have_def___TINYC__=yes
17586 curl_cv_def___TINYC__=$tmp_exp
17587
17588 fi
17589 CPPFLAGS=$OLDCPPFLAGS
17590
17591 if test "$curl_cv_have_def___TINYC__" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080017592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17593printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017594 compiler_id="TINY_C"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017595 flags_dbg_yes="-g"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017596 flags_opt_all=""
17597 flags_opt_yes=""
17598 flags_opt_off=""
17599 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080017600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17601printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017602 fi
17603
17604
Elliott Hughesf344baa2021-12-07 09:12:34 -080017605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler is Watcom C" >&5
17606printf %s "checking if compiler is Watcom C... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017607
17608 OLDCPPFLAGS=$CPPFLAGS
17609 # CPPPFLAG comes from CURL_CPP_P
17610 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
17611 if test -z "$SED"; then
17612 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
17613 fi
17614 if test -z "$GREP"; then
17615 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
17616 fi
17617
17618 tmp_exp=""
17619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17620/* end confdefs.h. */
17621
17622
17623#ifdef __WATCOMC__
17624CURL_DEF_TOKEN __WATCOMC__
17625#endif
17626
17627
17628_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080017629if ac_fn_c_try_cpp "$LINENO"
17630then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070017631
17632 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
17633 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
17634 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
17635 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
17636 if test -z "$tmp_exp" || test "$tmp_exp" = "__WATCOMC__"; then
17637 tmp_exp=""
17638 fi
17639
17640fi
17641rm -f conftest.err conftest.i conftest.$ac_ext
17642 if test -z "$tmp_exp"; then
17643 curl_cv_have_def___WATCOMC__=no
17644
17645 else
17646 curl_cv_have_def___WATCOMC__=yes
17647 curl_cv_def___WATCOMC__=$tmp_exp
17648
17649 fi
17650 CPPFLAGS=$OLDCPPFLAGS
17651
17652 if test "$curl_cv_have_def___WATCOMC__" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080017653 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17654printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017655
17656 OLDCPPFLAGS=$CPPFLAGS
17657 # CPPPFLAG comes from CURL_CPP_P
17658 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
17659 if test -z "$SED"; then
17660 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
17661 fi
17662 if test -z "$GREP"; then
17663 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
17664 fi
17665
17666 tmp_exp=""
17667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17668/* end confdefs.h. */
17669
17670
17671#ifdef __UNIX__
17672CURL_DEF_TOKEN __UNIX__
17673#endif
17674
17675
17676_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080017677if ac_fn_c_try_cpp "$LINENO"
17678then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070017679
17680 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
17681 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
17682 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
17683 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
17684 if test -z "$tmp_exp" || test "$tmp_exp" = "__UNIX__"; then
17685 tmp_exp=""
17686 fi
17687
17688fi
17689rm -f conftest.err conftest.i conftest.$ac_ext
17690 if test -z "$tmp_exp"; then
17691 curl_cv_have_def___UNIX__=no
17692
17693 else
17694 curl_cv_have_def___UNIX__=yes
17695 curl_cv_def___UNIX__=$tmp_exp
17696
17697 fi
17698 CPPFLAGS=$OLDCPPFLAGS
17699
17700 if test "$curl_cv_have_def___UNIX__" = "yes"; then
17701 compiler_id="WATCOM_UNIX_C"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017702 flags_dbg_yes="-g2"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017703 flags_opt_all="-O0 -O1 -O2 -O3"
17704 flags_opt_yes="-O2"
17705 flags_opt_off="-O0"
17706 else
17707 compiler_id="WATCOM_WINDOWS_C"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017708 flags_dbg_yes=""
Elliott Hughes82be86d2017-09-20 17:00:17 -070017709 flags_opt_all=""
17710 flags_opt_yes=""
17711 flags_opt_off=""
17712 fi
17713 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080017714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17715printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017716 fi
17717
17718 #
17719 if test "$compiler_id" = "unknown"; then
17720 cat <<_EOF 1>&2
17721***
17722*** Warning: This configure script does not have information about the
17723*** compiler you are using, relative to the flags required to enable or
17724*** disable generation of debug info, optimization options or warnings.
17725***
17726*** Whatever settings are present in CFLAGS will be used for this run.
17727***
17728*** If you wish to help the curl project to better support your compiler
17729*** you can report this and the required info on the libcurl development
Elliott Hughesf344baa2021-12-07 09:12:34 -080017730*** mailing list: https://lists.haxx.selistinfo/curl-library/
Elliott Hughes82be86d2017-09-20 17:00:17 -070017731***
17732_EOF
17733 fi
17734
17735
17736squeeze() {
17737 _sqz_result=""
17738 eval _sqz_input=\$$1
17739 for _sqz_token in $_sqz_input; do
17740 if test -z "$_sqz_result"; then
17741 _sqz_result="$_sqz_token"
17742 else
17743 _sqz_result="$_sqz_result $_sqz_token"
17744 fi
17745 done
17746 eval $1=\$_sqz_result
17747 return 0
17748}
17749
17750
17751 #
17752 if test "$compiler_id" != "unknown"; then
17753 #
Elliott Hughes82be86d2017-09-20 17:00:17 -070017754 tmp_save_CPPFLAGS="$CPPFLAGS"
17755 tmp_save_CFLAGS="$CFLAGS"
17756 tmp_CPPFLAGS=""
17757 tmp_CFLAGS=""
17758 #
17759 case "$compiler_id" in
17760 #
17761 CLANG)
17762 #
17763 tmp_CFLAGS="$tmp_CFLAGS -Qunused-arguments"
17764 ;;
17765 #
17766 DEC_C)
17767 #
17768 tmp_CFLAGS="$tmp_CFLAGS -std1"
17769 tmp_CFLAGS="$tmp_CFLAGS -noansi_alias"
17770 tmp_CFLAGS="$tmp_CFLAGS -warnprotos"
17771 tmp_CFLAGS="$tmp_CFLAGS -msg_fatal toofewargs,toomanyargs"
17772 ;;
17773 #
17774 GNU_C)
17775 #
17776 if test "$compiler_num" -ge "295"; then
17777 tmp_CFLAGS="$tmp_CFLAGS -Werror-implicit-function-declaration"
17778 fi
17779 ;;
17780 #
17781 HP_UX_C)
17782 #
17783 tmp_CFLAGS="$tmp_CFLAGS -z"
17784 tmp_CFLAGS="$tmp_CFLAGS +W 4227,4255"
17785 ;;
17786 #
17787 IBM_C)
17788 #
17789 tmp_CPPFLAGS="$tmp_CPPFLAGS -qthreaded"
17790 tmp_CPPFLAGS="$tmp_CPPFLAGS -qnoansialias"
17791 tmp_CPPFLAGS="$tmp_CPPFLAGS -qhalt=e"
17792 ;;
17793 #
17794 INTEL_UNIX_C)
17795 #
17796 tmp_CFLAGS="$tmp_CFLAGS -std=gnu89"
17797 tmp_CPPFLAGS="$tmp_CPPFLAGS -we140,147,165,266"
17798 tmp_CPPFLAGS="$tmp_CPPFLAGS -wd279,981,1469"
17799 ;;
17800 #
17801 INTEL_WINDOWS_C)
17802 #
17803 tmp_CFLAGS="$tmp_CFLAGS"
17804 ;;
17805 #
17806 LCC)
17807 #
17808 tmp_CFLAGS="$tmp_CFLAGS -n"
17809 ;;
17810 #
17811 SGI_MIPS_C)
17812 #
17813 tmp_CFLAGS="$tmp_CFLAGS"
17814 ;;
17815 #
17816 SGI_MIPSPRO_C)
17817 #
17818 tmp_CFLAGS="$tmp_CFLAGS"
17819 ;;
17820 #
17821 SUNPRO_C)
17822 #
17823 tmp_CFLAGS="$tmp_CFLAGS"
17824 ;;
17825 #
17826 TINY_C)
17827 #
17828 tmp_CFLAGS="$tmp_CFLAGS"
17829 ;;
17830 #
17831 WATCOM_UNIX_C)
17832 #
17833 tmp_CFLAGS="$tmp_CFLAGS"
17834 ;;
17835 #
17836 WATCOM_WINDOWS_C)
17837 #
17838 tmp_CFLAGS="$tmp_CFLAGS"
17839 ;;
17840 #
17841 esac
17842 #
17843 squeeze tmp_CPPFLAGS
17844 squeeze tmp_CFLAGS
17845 #
17846 if test ! -z "$tmp_CFLAGS" || test ! -z "$tmp_CPPFLAGS"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080017847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts some basic options" >&5
17848printf %s "checking if compiler accepts some basic options... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070017849 CPPFLAGS="$tmp_save_CPPFLAGS $tmp_CPPFLAGS"
17850 CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS"
17851 squeeze CPPFLAGS
17852 squeeze CFLAGS
17853
17854 tmp_compiler_works="unknown"
17855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17856/* end confdefs.h. */
17857
17858
17859
17860int main (void)
17861{
17862
17863 int i = 1;
17864 return i;
17865
17866 ;
17867 return 0;
17868}
17869
17870_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080017871if ac_fn_c_try_compile "$LINENO"
17872then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070017873
17874 tmp_compiler_works="yes"
17875
Elliott Hughesf344baa2021-12-07 09:12:34 -080017876else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070017877
17878 tmp_compiler_works="no"
17879 echo " " >&6
17880 sed 's/^/cc-fail: /' conftest.err >&6
17881 echo " " >&6
17882
17883fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080017884rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070017885 if test "$tmp_compiler_works" = "yes"; then
17886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17887/* end confdefs.h. */
17888
17889
17890
17891int main (void)
17892{
17893
17894 int i = 1;
17895 return i;
17896
17897 ;
17898 return 0;
17899}
17900
17901_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080017902if ac_fn_c_try_link "$LINENO"
17903then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070017904
17905 tmp_compiler_works="yes"
17906
Elliott Hughesf344baa2021-12-07 09:12:34 -080017907else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070017908
17909 tmp_compiler_works="no"
17910 echo " " >&6
17911 sed 's/^/link-fail: /' conftest.err >&6
17912 echo " " >&6
17913
17914fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080017915rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070017916 conftest$ac_exeext conftest.$ac_ext
17917 fi
17918 if test "x$cross_compiling" != "xyes" &&
17919 test "$tmp_compiler_works" = "yes"; then
Elliott Hughesa93fb052018-12-12 14:22:48 -080017920
Elliott Hughesa93fb052018-12-12 14:22:48 -080017921 old=$LD_LIBRARY_PATH
17922 LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
17923 export LD_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080017924 if test "$cross_compiling" = yes
17925then :
17926 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17927printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070017928as_fn_error $? "cannot run test program while cross compiling
17929See \`config.log' for more details" "$LINENO" 5; }
Elliott Hughesf344baa2021-12-07 09:12:34 -080017930else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070017931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17932/* end confdefs.h. */
17933
17934
17935# ifdef __STDC__
17936# include <stdlib.h>
17937# endif
17938
17939int main (void)
17940{
17941
17942 int i = 0;
17943 exit(i);
17944
17945 ;
17946 return 0;
17947}
17948
17949_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080017950if ac_fn_c_try_run "$LINENO"
17951then :
Elliott Hughesa93fb052018-12-12 14:22:48 -080017952 tmp_compiler_works="yes"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017953
Elliott Hughesf344baa2021-12-07 09:12:34 -080017954else $as_nop
Elliott Hughesa93fb052018-12-12 14:22:48 -080017955 tmp_compiler_works="no"
Elliott Hughes82be86d2017-09-20 17:00:17 -070017956 echo " " >&6
17957 echo "run-fail: test program exited with status $ac_status" >&6
17958 echo " " >&6
17959
17960fi
17961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17962 conftest.$ac_objext conftest.beam conftest.$ac_ext
17963fi
17964
Elliott Hughesa93fb052018-12-12 14:22:48 -080017965 LD_LIBRARY_PATH=$old # restore
17966
Elliott Hughes82be86d2017-09-20 17:00:17 -070017967 fi
17968 if test "$tmp_compiler_works" = "yes"; then
17969
Elliott Hughesf344baa2021-12-07 09:12:34 -080017970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17971printf "%s\n" "yes" >&6; }
17972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: compiler options added: $tmp_CFLAGS $tmp_CPPFLAGS" >&5
17973printf "%s\n" "$as_me: compiler options added: $tmp_CFLAGS $tmp_CPPFLAGS" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070017974
17975 else
17976
Elliott Hughesf344baa2021-12-07 09:12:34 -080017977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17978printf "%s\n" "no" >&6; }
17979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compiler options rejected: $tmp_CFLAGS $tmp_CPPFLAGS" >&5
17980printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_CFLAGS $tmp_CPPFLAGS" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070017981 CPPFLAGS="$tmp_save_CPPFLAGS"
17982 CFLAGS="$tmp_save_CFLAGS"
17983
17984 fi
17985
17986 fi
17987 #
17988 fi
17989
17990
17991 #
17992 if test "$compiler_id" != "unknown"; then
17993 #
17994 tmp_save_CFLAGS="$CFLAGS"
17995 tmp_save_CPPFLAGS="$CPPFLAGS"
17996 #
17997 tmp_options=""
17998 tmp_CFLAGS="$CFLAGS"
17999 tmp_CPPFLAGS="$CPPFLAGS"
Elliott Hughes82be86d2017-09-20 17:00:17 -070018000 #
18001 if test "$want_debug" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080018002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts debug enabling options" >&5
18003printf %s "checking if compiler accepts debug enabling options... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070018004 tmp_options="$flags_dbg_yes"
18005 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070018006 #
18007 if test "$flags_prefer_cppflags" = "yes"; then
18008 CPPFLAGS="$tmp_CPPFLAGS $tmp_options"
18009 CFLAGS="$tmp_CFLAGS"
18010 else
18011 CPPFLAGS="$tmp_CPPFLAGS"
18012 CFLAGS="$tmp_CFLAGS $tmp_options"
18013 fi
18014 squeeze CPPFLAGS
18015 squeeze CFLAGS
Elliott Hughes82be86d2017-09-20 17:00:17 -070018016 fi
18017
18018
18019 #
18020 if test "$compiler_id" != "unknown"; then
18021 #
18022 tmp_save_CFLAGS="$CFLAGS"
18023 tmp_save_CPPFLAGS="$CPPFLAGS"
18024 #
18025 tmp_options=""
18026 tmp_CFLAGS="$CFLAGS"
18027 tmp_CPPFLAGS="$CPPFLAGS"
18028 honor_optimize_option="yes"
18029 #
18030 #
18031 if test "$want_optimize" = "assume_no" ||
18032 test "$want_optimize" = "assume_yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080018033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler optimizer assumed setting might be used" >&5
18034printf %s "checking if compiler optimizer assumed setting might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070018035
18036
18037 ac_var_match_word="no"
18038 for word1 in $tmp_CFLAGS; do
18039 for word2 in $flags_opt_all; do
18040 if test "$word1" = "$word2"; then
18041 ac_var_match_word="yes"
18042 fi
18043 done
18044 done
18045
18046 if test "$ac_var_match_word" = "yes"; then
18047
18048 honor_optimize_option="no"
18049
18050
18051 fi
18052
18053
18054
18055 ac_var_match_word="no"
18056 for word1 in $tmp_CPPFLAGS; do
18057 for word2 in $flags_opt_all; do
18058 if test "$word1" = "$word2"; then
18059 ac_var_match_word="yes"
18060 fi
18061 done
18062 done
18063
18064 if test "$ac_var_match_word" = "yes"; then
18065
18066 honor_optimize_option="no"
18067
18068
18069 fi
18070
Elliott Hughesf344baa2021-12-07 09:12:34 -080018071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $honor_optimize_option" >&5
18072printf "%s\n" "$honor_optimize_option" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070018073 if test "$honor_optimize_option" = "yes"; then
18074 if test "$want_optimize" = "assume_yes"; then
18075 want_optimize="yes"
18076 fi
18077 if test "$want_optimize" = "assume_no"; then
18078 want_optimize="no"
18079 fi
18080 fi
18081 fi
18082 #
18083 if test "$honor_optimize_option" = "yes"; then
18084
18085 ac_var_stripped=""
18086 for word1 in $tmp_CFLAGS; do
18087 ac_var_strip_word="no"
18088 for word2 in $flags_opt_all; do
18089 if test "$word1" = "$word2"; then
18090 ac_var_strip_word="yes"
18091 fi
18092 done
18093 if test "$ac_var_strip_word" = "no"; then
18094 ac_var_stripped="$ac_var_stripped $word1"
18095 fi
18096 done
18097 tmp_CFLAGS="$ac_var_stripped"
18098 squeeze tmp_CFLAGS
18099
18100
18101 ac_var_stripped=""
18102 for word1 in $tmp_CPPFLAGS; do
18103 ac_var_strip_word="no"
18104 for word2 in $flags_opt_all; do
18105 if test "$word1" = "$word2"; then
18106 ac_var_strip_word="yes"
18107 fi
18108 done
18109 if test "$ac_var_strip_word" = "no"; then
18110 ac_var_stripped="$ac_var_stripped $word1"
18111 fi
18112 done
18113 tmp_CPPFLAGS="$ac_var_stripped"
18114 squeeze tmp_CPPFLAGS
18115
18116 if test "$want_optimize" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080018117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts optimizer enabling options" >&5
18118printf %s "checking if compiler accepts optimizer enabling options... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070018119 tmp_options="$flags_opt_yes"
18120 fi
18121 if test "$want_optimize" = "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080018122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts optimizer disabling options" >&5
18123printf %s "checking if compiler accepts optimizer disabling options... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070018124 tmp_options="$flags_opt_off"
18125 fi
18126 if test "$flags_prefer_cppflags" = "yes"; then
18127 CPPFLAGS="$tmp_CPPFLAGS $tmp_options"
18128 CFLAGS="$tmp_CFLAGS"
18129 else
18130 CPPFLAGS="$tmp_CPPFLAGS"
18131 CFLAGS="$tmp_CFLAGS $tmp_options"
18132 fi
18133 squeeze CPPFLAGS
18134 squeeze CFLAGS
18135
18136 tmp_compiler_works="unknown"
18137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18138/* end confdefs.h. */
18139
18140
18141
18142int main (void)
18143{
18144
18145 int i = 1;
18146 return i;
18147
18148 ;
18149 return 0;
18150}
18151
18152_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080018153if ac_fn_c_try_compile "$LINENO"
18154then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070018155
18156 tmp_compiler_works="yes"
18157
Elliott Hughesf344baa2021-12-07 09:12:34 -080018158else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070018159
18160 tmp_compiler_works="no"
18161 echo " " >&6
18162 sed 's/^/cc-fail: /' conftest.err >&6
18163 echo " " >&6
18164
18165fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080018166rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070018167 if test "$tmp_compiler_works" = "yes"; then
18168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18169/* end confdefs.h. */
18170
18171
18172
18173int main (void)
18174{
18175
18176 int i = 1;
18177 return i;
18178
18179 ;
18180 return 0;
18181}
18182
18183_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080018184if ac_fn_c_try_link "$LINENO"
18185then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070018186
18187 tmp_compiler_works="yes"
18188
Elliott Hughesf344baa2021-12-07 09:12:34 -080018189else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070018190
18191 tmp_compiler_works="no"
18192 echo " " >&6
18193 sed 's/^/link-fail: /' conftest.err >&6
18194 echo " " >&6
18195
18196fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080018197rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070018198 conftest$ac_exeext conftest.$ac_ext
18199 fi
18200 if test "x$cross_compiling" != "xyes" &&
18201 test "$tmp_compiler_works" = "yes"; then
Elliott Hughesa93fb052018-12-12 14:22:48 -080018202
Elliott Hughesa93fb052018-12-12 14:22:48 -080018203 old=$LD_LIBRARY_PATH
18204 LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
18205 export LD_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080018206 if test "$cross_compiling" = yes
18207then :
18208 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18209printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070018210as_fn_error $? "cannot run test program while cross compiling
18211See \`config.log' for more details" "$LINENO" 5; }
Elliott Hughesf344baa2021-12-07 09:12:34 -080018212else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070018213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18214/* end confdefs.h. */
18215
18216
18217# ifdef __STDC__
18218# include <stdlib.h>
18219# endif
18220
18221int main (void)
18222{
18223
18224 int i = 0;
18225 exit(i);
18226
18227 ;
18228 return 0;
18229}
18230
18231_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080018232if ac_fn_c_try_run "$LINENO"
18233then :
Elliott Hughesa93fb052018-12-12 14:22:48 -080018234 tmp_compiler_works="yes"
Elliott Hughes82be86d2017-09-20 17:00:17 -070018235
Elliott Hughesf344baa2021-12-07 09:12:34 -080018236else $as_nop
Elliott Hughesa93fb052018-12-12 14:22:48 -080018237 tmp_compiler_works="no"
Elliott Hughes82be86d2017-09-20 17:00:17 -070018238 echo " " >&6
18239 echo "run-fail: test program exited with status $ac_status" >&6
18240 echo " " >&6
18241
18242fi
18243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18244 conftest.$ac_objext conftest.beam conftest.$ac_ext
18245fi
18246
Elliott Hughesa93fb052018-12-12 14:22:48 -080018247 LD_LIBRARY_PATH=$old # restore
18248
Elliott Hughes82be86d2017-09-20 17:00:17 -070018249 fi
18250 if test "$tmp_compiler_works" = "yes"; then
18251
Elliott Hughesf344baa2021-12-07 09:12:34 -080018252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18253printf "%s\n" "yes" >&6; }
18254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: compiler options added: $tmp_options" >&5
18255printf "%s\n" "$as_me: compiler options added: $tmp_options" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070018256
18257 else
18258
Elliott Hughesf344baa2021-12-07 09:12:34 -080018259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18260printf "%s\n" "no" >&6; }
18261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compiler options rejected: $tmp_options" >&5
18262printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070018263 CPPFLAGS="$tmp_save_CPPFLAGS"
18264 CFLAGS="$tmp_save_CFLAGS"
18265
18266 fi
18267
18268 fi
18269 #
18270 fi
18271
18272
18273 #
18274 if test "$compiler_id" != "unknown"; then
18275 #
18276 tmp_save_CPPFLAGS="$CPPFLAGS"
18277 tmp_save_CFLAGS="$CFLAGS"
18278 tmp_CPPFLAGS=""
18279 tmp_CFLAGS=""
18280 #
18281 case "$compiler_id" in
18282 #
18283 CLANG)
18284 #
18285 if test "$want_warnings" = "yes"; then
18286 tmp_CFLAGS="$tmp_CFLAGS -pedantic"
Haibo Huangc3c04f42020-08-19 13:00:07 -070018287
18288 ac_var_added_warnings=""
18289 for warning in all extra; do
18290
18291 ac_var_match_word="no"
18292 for word1 in $CFLAGS; do
18293 for word2 in -Wno-$warning -W$warning; do
18294 if test "$word1" = "$word2"; then
18295 ac_var_match_word="yes"
18296 fi
18297 done
18298 done
18299
18300 if test "$ac_var_match_word" = "no"; then
18301 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18302 fi
18303 done
18304 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18305 squeeze tmp_CFLAGS
18306
18307
18308 ac_var_added_warnings=""
18309 for warning in pointer-arith write-strings; do
18310
18311 ac_var_match_word="no"
18312 for word1 in $CFLAGS; do
18313 for word2 in -Wno-$warning -W$warning; do
18314 if test "$word1" = "$word2"; then
18315 ac_var_match_word="yes"
18316 fi
18317 done
18318 done
18319
18320 if test "$ac_var_match_word" = "no"; then
18321 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18322 fi
18323 done
18324 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18325 squeeze tmp_CFLAGS
18326
18327
18328 ac_var_added_warnings=""
18329 for warning in shadow; do
18330
18331 ac_var_match_word="no"
18332 for word1 in $CFLAGS; do
18333 for word2 in -Wno-$warning -W$warning; do
18334 if test "$word1" = "$word2"; then
18335 ac_var_match_word="yes"
18336 fi
18337 done
18338 done
18339
18340 if test "$ac_var_match_word" = "no"; then
18341 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18342 fi
18343 done
18344 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18345 squeeze tmp_CFLAGS
18346
18347
18348 ac_var_added_warnings=""
18349 for warning in inline nested-externs; do
18350
18351 ac_var_match_word="no"
18352 for word1 in $CFLAGS; do
18353 for word2 in -Wno-$warning -W$warning; do
18354 if test "$word1" = "$word2"; then
18355 ac_var_match_word="yes"
18356 fi
18357 done
18358 done
18359
18360 if test "$ac_var_match_word" = "no"; then
18361 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18362 fi
18363 done
18364 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18365 squeeze tmp_CFLAGS
18366
18367
18368 ac_var_added_warnings=""
18369 for warning in missing-declarations; do
18370
18371 ac_var_match_word="no"
18372 for word1 in $CFLAGS; do
18373 for word2 in -Wno-$warning -W$warning; do
18374 if test "$word1" = "$word2"; then
18375 ac_var_match_word="yes"
18376 fi
18377 done
18378 done
18379
18380 if test "$ac_var_match_word" = "no"; then
18381 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18382 fi
18383 done
18384 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18385 squeeze tmp_CFLAGS
18386
18387
18388 ac_var_added_warnings=""
18389 for warning in missing-prototypes; do
18390
18391 ac_var_match_word="no"
18392 for word1 in $CFLAGS; do
18393 for word2 in -Wno-$warning -W$warning; do
18394 if test "$word1" = "$word2"; then
18395 ac_var_match_word="yes"
18396 fi
18397 done
18398 done
18399
18400 if test "$ac_var_match_word" = "no"; then
18401 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18402 fi
18403 done
18404 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18405 squeeze tmp_CFLAGS
18406
Elliott Hughes82be86d2017-09-20 17:00:17 -070018407 tmp_CFLAGS="$tmp_CFLAGS -Wno-long-long"
Haibo Huangc3c04f42020-08-19 13:00:07 -070018408
18409 ac_var_added_warnings=""
18410 for warning in float-equal; do
18411
18412 ac_var_match_word="no"
18413 for word1 in $CFLAGS; do
18414 for word2 in -Wno-$warning -W$warning; do
18415 if test "$word1" = "$word2"; then
18416 ac_var_match_word="yes"
18417 fi
18418 done
18419 done
18420
18421 if test "$ac_var_match_word" = "no"; then
18422 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18423 fi
18424 done
18425 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18426 squeeze tmp_CFLAGS
18427
18428
18429 ac_var_added_warnings=""
18430 for warning in no-multichar sign-compare; do
18431
18432 ac_var_match_word="no"
18433 for word1 in $CFLAGS; do
18434 for word2 in -Wno-$warning -W$warning; do
18435 if test "$word1" = "$word2"; then
18436 ac_var_match_word="yes"
18437 fi
18438 done
18439 done
18440
18441 if test "$ac_var_match_word" = "no"; then
18442 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18443 fi
18444 done
18445 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18446 squeeze tmp_CFLAGS
18447
18448
18449 ac_var_added_warnings=""
18450 for warning in undef; do
18451
18452 ac_var_match_word="no"
18453 for word1 in $CFLAGS; do
18454 for word2 in -Wno-$warning -W$warning; do
18455 if test "$word1" = "$word2"; then
18456 ac_var_match_word="yes"
18457 fi
18458 done
18459 done
18460
18461 if test "$ac_var_match_word" = "no"; then
18462 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18463 fi
18464 done
18465 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18466 squeeze tmp_CFLAGS
18467
Elliott Hughes82be86d2017-09-20 17:00:17 -070018468 tmp_CFLAGS="$tmp_CFLAGS -Wno-format-nonliteral"
Haibo Huangc3c04f42020-08-19 13:00:07 -070018469
18470 ac_var_added_warnings=""
18471 for warning in endif-labels strict-prototypes; do
18472
18473 ac_var_match_word="no"
18474 for word1 in $CFLAGS; do
18475 for word2 in -Wno-$warning -W$warning; do
18476 if test "$word1" = "$word2"; then
18477 ac_var_match_word="yes"
18478 fi
18479 done
18480 done
18481
18482 if test "$ac_var_match_word" = "no"; then
18483 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18484 fi
18485 done
18486 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18487 squeeze tmp_CFLAGS
18488
18489
18490 ac_var_added_warnings=""
18491 for warning in declaration-after-statement; do
18492
18493 ac_var_match_word="no"
18494 for word1 in $CFLAGS; do
18495 for word2 in -Wno-$warning -W$warning; do
18496 if test "$word1" = "$word2"; then
18497 ac_var_match_word="yes"
18498 fi
18499 done
18500 done
18501
18502 if test "$ac_var_match_word" = "no"; then
18503 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18504 fi
18505 done
18506 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18507 squeeze tmp_CFLAGS
18508
18509
18510 ac_var_added_warnings=""
18511 for warning in cast-align; do
18512
18513 ac_var_match_word="no"
18514 for word1 in $CFLAGS; do
18515 for word2 in -Wno-$warning -W$warning; do
18516 if test "$word1" = "$word2"; then
18517 ac_var_match_word="yes"
18518 fi
18519 done
18520 done
18521
18522 if test "$ac_var_match_word" = "no"; then
18523 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18524 fi
18525 done
18526 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18527 squeeze tmp_CFLAGS
18528
Elliott Hughes82be86d2017-09-20 17:00:17 -070018529 tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
Haibo Huangc3c04f42020-08-19 13:00:07 -070018530
18531 ac_var_added_warnings=""
18532 for warning in shorten-64-to-32; do
18533
18534 ac_var_match_word="no"
18535 for word1 in $CFLAGS; do
18536 for word2 in -Wno-$warning -W$warning; do
18537 if test "$word1" = "$word2"; then
18538 ac_var_match_word="yes"
18539 fi
18540 done
18541 done
18542
18543 if test "$ac_var_match_word" = "no"; then
18544 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18545 fi
18546 done
18547 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18548 squeeze tmp_CFLAGS
18549
Elliott Hughes82be86d2017-09-20 17:00:17 -070018550 #
18551 if test "$compiler_num" -ge "101"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070018552
18553 ac_var_added_warnings=""
18554 for warning in unused; do
18555
18556 ac_var_match_word="no"
18557 for word1 in $CFLAGS; do
18558 for word2 in -Wno-$warning -W$warning; do
18559 if test "$word1" = "$word2"; then
18560 ac_var_match_word="yes"
18561 fi
18562 done
18563 done
18564
18565 if test "$ac_var_match_word" = "no"; then
18566 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18567 fi
18568 done
18569 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18570 squeeze tmp_CFLAGS
18571
Elliott Hughes82be86d2017-09-20 17:00:17 -070018572 fi
18573 #
18574 if test "$compiler_num" -ge "208"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070018575
18576 ac_var_added_warnings=""
18577 for warning in vla; do
18578
18579 ac_var_match_word="no"
18580 for word1 in $CFLAGS; do
18581 for word2 in -Wno-$warning -W$warning; do
18582 if test "$word1" = "$word2"; then
18583 ac_var_match_word="yes"
18584 fi
18585 done
18586 done
18587
18588 if test "$ac_var_match_word" = "no"; then
18589 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18590 fi
18591 done
18592 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18593 squeeze tmp_CFLAGS
18594
Elliott Hughes82be86d2017-09-20 17:00:17 -070018595 fi
18596 #
18597 if test "$compiler_num" -ge "209"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070018598
18599 ac_var_added_warnings=""
18600 for warning in shift-sign-overflow; do
18601
18602 ac_var_match_word="no"
18603 for word1 in $CFLAGS; do
18604 for word2 in -Wno-$warning -W$warning; do
18605 if test "$word1" = "$word2"; then
18606 ac_var_match_word="yes"
18607 fi
18608 done
18609 done
18610
18611 if test "$ac_var_match_word" = "no"; then
18612 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18613 fi
18614 done
18615 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18616 squeeze tmp_CFLAGS
18617
Elliott Hughes82be86d2017-09-20 17:00:17 -070018618 fi
18619 #
18620 if test "$compiler_num" -ge "302"; then
18621 case $host_os in
18622 cygwin* | mingw*)
18623 ;;
18624 *)
Haibo Huangc3c04f42020-08-19 13:00:07 -070018625
18626 ac_var_added_warnings=""
18627 for warning in missing-variable-declarations; do
18628
18629 ac_var_match_word="no"
18630 for word1 in $CFLAGS; do
18631 for word2 in -Wno-$warning -W$warning; do
18632 if test "$word1" = "$word2"; then
18633 ac_var_match_word="yes"
18634 fi
18635 done
18636 done
18637
18638 if test "$ac_var_match_word" = "no"; then
18639 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18640 fi
18641 done
18642 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18643 squeeze tmp_CFLAGS
18644
Elliott Hughes82be86d2017-09-20 17:00:17 -070018645 ;;
18646 esac
18647 fi
18648 #
18649 if test "$compiler_num" -ge "306"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070018650
18651 ac_var_added_warnings=""
18652 for warning in double-promotion; do
18653
18654 ac_var_match_word="no"
18655 for word1 in $CFLAGS; do
18656 for word2 in -Wno-$warning -W$warning; do
18657 if test "$word1" = "$word2"; then
18658 ac_var_match_word="yes"
18659 fi
18660 done
18661 done
18662
18663 if test "$ac_var_match_word" = "no"; then
18664 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18665 fi
18666 done
18667 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18668 squeeze tmp_CFLAGS
18669
Elliott Hughes82be86d2017-09-20 17:00:17 -070018670 fi
18671 #
18672 if test "$compiler_num" -ge "309"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070018673
18674 ac_var_added_warnings=""
18675 for warning in comma; do
18676
18677 ac_var_match_word="no"
18678 for word1 in $CFLAGS; do
18679 for word2 in -Wno-$warning -W$warning; do
18680 if test "$word1" = "$word2"; then
18681 ac_var_match_word="yes"
18682 fi
18683 done
18684 done
18685
18686 if test "$ac_var_match_word" = "no"; then
18687 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18688 fi
18689 done
18690 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18691 squeeze tmp_CFLAGS
18692
Alex Deymo486467e2017-12-19 19:04:07 +010018693 # avoid the varargs warning, fixed in 4.0
18694 # https://bugs.llvm.org/show_bug.cgi?id=29140
18695 if test "$compiler_num" -lt "400"; then
18696 tmp_CFLAGS="$tmp_CFLAGS -Wno-varargs"
18697 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070018698 fi
Haibo Huangb5a52b92020-10-28 22:18:23 -070018699 if test "$compiler_num" -ge "700"; then
18700
18701 ac_var_added_warnings=""
18702 for warning in assign-enum; do
18703
18704 ac_var_match_word="no"
18705 for word1 in $CFLAGS; do
18706 for word2 in -Wno-$warning -W$warning; do
18707 if test "$word1" = "$word2"; then
18708 ac_var_match_word="yes"
18709 fi
18710 done
18711 done
18712
18713 if test "$ac_var_match_word" = "no"; then
18714 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18715 fi
18716 done
18717 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18718 squeeze tmp_CFLAGS
18719
Elliott Hughes34dd5f42021-08-10 13:01:18 -070018720
18721 ac_var_added_warnings=""
18722 for warning in extra-semi-stmt; do
18723
18724 ac_var_match_word="no"
18725 for word1 in $CFLAGS; do
18726 for word2 in -Wno-$warning -W$warning; do
18727 if test "$word1" = "$word2"; then
18728 ac_var_match_word="yes"
18729 fi
18730 done
18731 done
18732
18733 if test "$ac_var_match_word" = "no"; then
18734 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18735 fi
18736 done
18737 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18738 squeeze tmp_CFLAGS
18739
Haibo Huangb5a52b92020-10-28 22:18:23 -070018740 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070018741 fi
18742 ;;
18743 #
18744 DEC_C)
18745 #
18746 if test "$want_warnings" = "yes"; then
18747 tmp_CFLAGS="$tmp_CFLAGS -msg_enable level3"
18748 fi
18749 ;;
18750 #
18751 GNU_C)
18752 #
18753 if test "$want_warnings" = "yes"; then
18754 #
18755 if test "x$cross_compiling" != "xyes" ||
18756 test "$compiler_num" -ge "300"; then
18757 tmp_CFLAGS="$tmp_CFLAGS -pedantic"
18758 fi
18759 #
Haibo Huangc3c04f42020-08-19 13:00:07 -070018760
18761 ac_var_added_warnings=""
18762 for warning in all; do
18763
18764 ac_var_match_word="no"
18765 for word1 in $CFLAGS; do
18766 for word2 in -Wno-$warning -W$warning; do
18767 if test "$word1" = "$word2"; then
18768 ac_var_match_word="yes"
18769 fi
18770 done
18771 done
18772
18773 if test "$ac_var_match_word" = "no"; then
18774 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18775 fi
18776 done
18777 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18778 squeeze tmp_CFLAGS
18779
18780 tmp_CFLAGS="$tmp_CFLAGS -W"
Elliott Hughes82be86d2017-09-20 17:00:17 -070018781 #
18782 if test "$compiler_num" -ge "104"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070018783
18784 ac_var_added_warnings=""
18785 for warning in pointer-arith write-strings; do
18786
18787 ac_var_match_word="no"
18788 for word1 in $CFLAGS; do
18789 for word2 in -Wno-$warning -W$warning; do
18790 if test "$word1" = "$word2"; then
18791 ac_var_match_word="yes"
18792 fi
18793 done
18794 done
18795
18796 if test "$ac_var_match_word" = "no"; then
18797 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18798 fi
18799 done
18800 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18801 squeeze tmp_CFLAGS
18802
Elliott Hughes82be86d2017-09-20 17:00:17 -070018803 if test "x$cross_compiling" != "xyes" ||
18804 test "$compiler_num" -ge "300"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070018805
18806 ac_var_added_warnings=""
18807 for warning in unused shadow; do
18808
18809 ac_var_match_word="no"
18810 for word1 in $CFLAGS; do
18811 for word2 in -Wno-$warning -W$warning; do
18812 if test "$word1" = "$word2"; then
18813 ac_var_match_word="yes"
18814 fi
18815 done
18816 done
18817
18818 if test "$ac_var_match_word" = "no"; then
18819 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18820 fi
18821 done
18822 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18823 squeeze tmp_CFLAGS
18824
Elliott Hughes82be86d2017-09-20 17:00:17 -070018825 fi
18826 fi
18827 #
18828 if test "$compiler_num" -ge "207"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070018829
18830 ac_var_added_warnings=""
18831 for warning in inline nested-externs; do
18832
18833 ac_var_match_word="no"
18834 for word1 in $CFLAGS; do
18835 for word2 in -Wno-$warning -W$warning; do
18836 if test "$word1" = "$word2"; then
18837 ac_var_match_word="yes"
18838 fi
18839 done
18840 done
18841
18842 if test "$ac_var_match_word" = "no"; then
18843 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18844 fi
18845 done
18846 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18847 squeeze tmp_CFLAGS
18848
Elliott Hughes82be86d2017-09-20 17:00:17 -070018849 if test "x$cross_compiling" != "xyes" ||
18850 test "$compiler_num" -ge "300"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070018851
18852 ac_var_added_warnings=""
18853 for warning in missing-declarations; do
18854
18855 ac_var_match_word="no"
18856 for word1 in $CFLAGS; do
18857 for word2 in -Wno-$warning -W$warning; do
18858 if test "$word1" = "$word2"; then
18859 ac_var_match_word="yes"
18860 fi
18861 done
18862 done
18863
18864 if test "$ac_var_match_word" = "no"; then
18865 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18866 fi
18867 done
18868 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18869 squeeze tmp_CFLAGS
18870
18871
18872 ac_var_added_warnings=""
18873 for warning in missing-prototypes; do
18874
18875 ac_var_match_word="no"
18876 for word1 in $CFLAGS; do
18877 for word2 in -Wno-$warning -W$warning; do
18878 if test "$word1" = "$word2"; then
18879 ac_var_match_word="yes"
18880 fi
18881 done
18882 done
18883
18884 if test "$ac_var_match_word" = "no"; then
18885 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18886 fi
18887 done
18888 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18889 squeeze tmp_CFLAGS
18890
Elliott Hughes82be86d2017-09-20 17:00:17 -070018891 fi
18892 fi
18893 #
18894 if test "$compiler_num" -ge "295"; then
18895 tmp_CFLAGS="$tmp_CFLAGS -Wno-long-long"
Haibo Huangc3c04f42020-08-19 13:00:07 -070018896
18897 ac_var_added_warnings=""
18898 for warning in bad-function-cast; do
18899
18900 ac_var_match_word="no"
18901 for word1 in $CFLAGS; do
18902 for word2 in -Wno-$warning -W$warning; do
18903 if test "$word1" = "$word2"; then
18904 ac_var_match_word="yes"
18905 fi
18906 done
18907 done
18908
18909 if test "$ac_var_match_word" = "no"; then
18910 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18911 fi
18912 done
18913 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18914 squeeze tmp_CFLAGS
18915
Elliott Hughes82be86d2017-09-20 17:00:17 -070018916 fi
18917 #
18918 if test "$compiler_num" -ge "296"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070018919
18920 ac_var_added_warnings=""
18921 for warning in float-equal; do
18922
18923 ac_var_match_word="no"
18924 for word1 in $CFLAGS; do
18925 for word2 in -Wno-$warning -W$warning; do
18926 if test "$word1" = "$word2"; then
18927 ac_var_match_word="yes"
18928 fi
18929 done
18930 done
18931
18932 if test "$ac_var_match_word" = "no"; then
18933 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18934 fi
18935 done
18936 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18937 squeeze tmp_CFLAGS
18938
18939 tmp_CFLAGS="$tmp_CFLAGS -Wno-multichar"
18940
18941 ac_var_added_warnings=""
18942 for warning in sign-compare; do
18943
18944 ac_var_match_word="no"
18945 for word1 in $CFLAGS; do
18946 for word2 in -Wno-$warning -W$warning; do
18947 if test "$word1" = "$word2"; then
18948 ac_var_match_word="yes"
18949 fi
18950 done
18951 done
18952
18953 if test "$ac_var_match_word" = "no"; then
18954 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18955 fi
18956 done
18957 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18958 squeeze tmp_CFLAGS
18959
18960
18961 ac_var_added_warnings=""
18962 for warning in undef; do
18963
18964 ac_var_match_word="no"
18965 for word1 in $CFLAGS; do
18966 for word2 in -Wno-$warning -W$warning; do
18967 if test "$word1" = "$word2"; then
18968 ac_var_match_word="yes"
18969 fi
18970 done
18971 done
18972
18973 if test "$ac_var_match_word" = "no"; then
18974 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
18975 fi
18976 done
18977 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
18978 squeeze tmp_CFLAGS
18979
Elliott Hughes82be86d2017-09-20 17:00:17 -070018980 fi
18981 #
18982 if test "$compiler_num" -ge "297"; then
18983 tmp_CFLAGS="$tmp_CFLAGS -Wno-format-nonliteral"
18984 fi
18985 #
18986 if test "$compiler_num" -ge "300"; then
18987 tmp_CFLAGS="$tmp_CFLAGS"
18988 fi
18989 #
18990 if test "$compiler_num" -ge "303"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070018991
18992 ac_var_added_warnings=""
18993 for warning in endif-labels strict-prototypes; do
18994
18995 ac_var_match_word="no"
18996 for word1 in $CFLAGS; do
18997 for word2 in -Wno-$warning -W$warning; do
18998 if test "$word1" = "$word2"; then
18999 ac_var_match_word="yes"
19000 fi
19001 done
19002 done
19003
19004 if test "$ac_var_match_word" = "no"; then
19005 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19006 fi
19007 done
19008 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19009 squeeze tmp_CFLAGS
19010
Elliott Hughes82be86d2017-09-20 17:00:17 -070019011 fi
19012 #
19013 if test "$compiler_num" -ge "304"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070019014
19015 ac_var_added_warnings=""
19016 for warning in declaration-after-statement; do
19017
19018 ac_var_match_word="no"
19019 for word1 in $CFLAGS; do
19020 for word2 in -Wno-$warning -W$warning; do
19021 if test "$word1" = "$word2"; then
19022 ac_var_match_word="yes"
19023 fi
19024 done
19025 done
19026
19027 if test "$ac_var_match_word" = "no"; then
19028 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19029 fi
19030 done
19031 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19032 squeeze tmp_CFLAGS
19033
19034
19035 ac_var_added_warnings=""
19036 for warning in old-style-definition; do
19037
19038 ac_var_match_word="no"
19039 for word1 in $CFLAGS; do
19040 for word2 in -Wno-$warning -W$warning; do
19041 if test "$word1" = "$word2"; then
19042 ac_var_match_word="yes"
19043 fi
19044 done
19045 done
19046
19047 if test "$ac_var_match_word" = "no"; then
19048 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19049 fi
19050 done
19051 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19052 squeeze tmp_CFLAGS
19053
Elliott Hughes82be86d2017-09-20 17:00:17 -070019054 fi
19055 #
19056 if test "$compiler_num" -ge "400"; then
19057 tmp_CFLAGS="$tmp_CFLAGS -Wstrict-aliasing=3"
19058 fi
19059 #
19060 if test "$compiler_num" -ge "402"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070019061
19062 ac_var_added_warnings=""
19063 for warning in cast-align; do
19064
19065 ac_var_match_word="no"
19066 for word1 in $CFLAGS; do
19067 for word2 in -Wno-$warning -W$warning; do
19068 if test "$word1" = "$word2"; then
19069 ac_var_match_word="yes"
19070 fi
19071 done
19072 done
19073
19074 if test "$ac_var_match_word" = "no"; then
19075 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19076 fi
19077 done
19078 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19079 squeeze tmp_CFLAGS
19080
Elliott Hughes82be86d2017-09-20 17:00:17 -070019081 fi
19082 #
19083 if test "$compiler_num" -ge "403"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070019084
19085 ac_var_added_warnings=""
19086 for warning in type-limits old-style-declaration; do
19087
19088 ac_var_match_word="no"
19089 for word1 in $CFLAGS; do
19090 for word2 in -Wno-$warning -W$warning; do
19091 if test "$word1" = "$word2"; then
19092 ac_var_match_word="yes"
19093 fi
19094 done
19095 done
19096
19097 if test "$ac_var_match_word" = "no"; then
19098 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19099 fi
19100 done
19101 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19102 squeeze tmp_CFLAGS
19103
19104
19105 ac_var_added_warnings=""
19106 for warning in missing-parameter-type empty-body; do
19107
19108 ac_var_match_word="no"
19109 for word1 in $CFLAGS; do
19110 for word2 in -Wno-$warning -W$warning; do
19111 if test "$word1" = "$word2"; then
19112 ac_var_match_word="yes"
19113 fi
19114 done
19115 done
19116
19117 if test "$ac_var_match_word" = "no"; then
19118 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19119 fi
19120 done
19121 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19122 squeeze tmp_CFLAGS
19123
19124
19125 ac_var_added_warnings=""
19126 for warning in clobbered ignored-qualifiers; do
19127
19128 ac_var_match_word="no"
19129 for word1 in $CFLAGS; do
19130 for word2 in -Wno-$warning -W$warning; do
19131 if test "$word1" = "$word2"; then
19132 ac_var_match_word="yes"
19133 fi
19134 done
19135 done
19136
19137 if test "$ac_var_match_word" = "no"; then
19138 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19139 fi
19140 done
19141 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19142 squeeze tmp_CFLAGS
19143
19144
19145 ac_var_added_warnings=""
19146 for warning in conversion; do
19147
19148 ac_var_match_word="no"
19149 for word1 in $CFLAGS; do
19150 for word2 in -Wno-$warning -W$warning; do
19151 if test "$word1" = "$word2"; then
19152 ac_var_match_word="yes"
19153 fi
19154 done
19155 done
19156
19157 if test "$ac_var_match_word" = "no"; then
19158 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19159 fi
19160 done
19161 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19162 squeeze tmp_CFLAGS
19163
19164 tmp_CFLAGS="$tmp_CFLAGS -Wno-sign-conversion"
19165
19166 ac_var_added_warnings=""
19167 for warning in vla; do
19168
19169 ac_var_match_word="no"
19170 for word1 in $CFLAGS; do
19171 for word2 in -Wno-$warning -W$warning; do
19172 if test "$word1" = "$word2"; then
19173 ac_var_match_word="yes"
19174 fi
19175 done
19176 done
19177
19178 if test "$ac_var_match_word" = "no"; then
19179 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19180 fi
19181 done
19182 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19183 squeeze tmp_CFLAGS
19184
Elliott Hughesb1ef70f2018-10-30 11:28:38 -070019185 tmp_CFLAGS="$tmp_CFLAGS -ftree-vrp"
Elliott Hughes82be86d2017-09-20 17:00:17 -070019186 fi
19187 #
19188 if test "$compiler_num" -ge "405"; then
19189 if test "$curl_cv_have_def__WIN32" = "yes"; then
19190 tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format"
19191 fi
19192 fi
19193 #
19194 if test "$compiler_num" -ge "406"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070019195
19196 ac_var_added_warnings=""
19197 for warning in double-promotion; do
19198
19199 ac_var_match_word="no"
19200 for word1 in $CFLAGS; do
19201 for word2 in -Wno-$warning -W$warning; do
19202 if test "$word1" = "$word2"; then
19203 ac_var_match_word="yes"
19204 fi
19205 done
19206 done
19207
19208 if test "$ac_var_match_word" = "no"; then
19209 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19210 fi
19211 done
19212 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19213 squeeze tmp_CFLAGS
19214
Elliott Hughes82be86d2017-09-20 17:00:17 -070019215 fi
19216 #
Elliott Hughesb1ef70f2018-10-30 11:28:38 -070019217 if test "$compiler_num" -ge "408"; then
19218 tmp_CFLAGS="$tmp_CFLAGS -Wformat=2"
19219 fi
19220 #
19221 if test "$compiler_num" -ge "500"; then
19222 tmp_CFLAGS="$tmp_CFLAGS -Warray-bounds=2"
19223 fi
19224 #
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070019225 if test "$compiler_num" -ge "600"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070019226
19227 ac_var_added_warnings=""
19228 for warning in shift-negative-value; do
19229
19230 ac_var_match_word="no"
19231 for word1 in $CFLAGS; do
19232 for word2 in -Wno-$warning -W$warning; do
19233 if test "$word1" = "$word2"; then
19234 ac_var_match_word="yes"
19235 fi
19236 done
19237 done
19238
19239 if test "$ac_var_match_word" = "no"; then
19240 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19241 fi
19242 done
19243 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19244 squeeze tmp_CFLAGS
19245
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070019246 tmp_CFLAGS="$tmp_CFLAGS -Wshift-overflow=2"
Haibo Huangc3c04f42020-08-19 13:00:07 -070019247
19248 ac_var_added_warnings=""
19249 for warning in null-dereference; do
19250
19251 ac_var_match_word="no"
19252 for word1 in $CFLAGS; do
19253 for word2 in -Wno-$warning -W$warning; do
19254 if test "$word1" = "$word2"; then
19255 ac_var_match_word="yes"
19256 fi
19257 done
19258 done
19259
19260 if test "$ac_var_match_word" = "no"; then
19261 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19262 fi
19263 done
19264 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19265 squeeze tmp_CFLAGS
19266
19267 tmp_CFLAGS="$tmp_CFLAGS -fdelete-null-pointer-checks"
19268
19269 ac_var_added_warnings=""
19270 for warning in duplicated-cond; do
19271
19272 ac_var_match_word="no"
19273 for word1 in $CFLAGS; do
19274 for word2 in -Wno-$warning -W$warning; do
19275 if test "$word1" = "$word2"; then
19276 ac_var_match_word="yes"
19277 fi
19278 done
19279 done
19280
19281 if test "$ac_var_match_word" = "no"; then
19282 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19283 fi
19284 done
19285 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19286 squeeze tmp_CFLAGS
19287
19288
19289 ac_var_added_warnings=""
19290 for warning in unused-const-variable; do
19291
19292 ac_var_match_word="no"
19293 for word1 in $CFLAGS; do
19294 for word2 in -Wno-$warning -W$warning; do
19295 if test "$word1" = "$word2"; then
19296 ac_var_match_word="yes"
19297 fi
19298 done
19299 done
19300
19301 if test "$ac_var_match_word" = "no"; then
19302 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19303 fi
19304 done
19305 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19306 squeeze tmp_CFLAGS
19307
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070019308 fi
19309 #
19310 if test "$compiler_num" -ge "700"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070019311
19312 ac_var_added_warnings=""
19313 for warning in duplicated-branches; do
19314
19315 ac_var_match_word="no"
19316 for word1 in $CFLAGS; do
19317 for word2 in -Wno-$warning -W$warning; do
19318 if test "$word1" = "$word2"; then
19319 ac_var_match_word="yes"
19320 fi
19321 done
19322 done
19323
19324 if test "$ac_var_match_word" = "no"; then
19325 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19326 fi
19327 done
19328 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19329 squeeze tmp_CFLAGS
19330
19331
19332 ac_var_added_warnings=""
19333 for warning in restrict; do
19334
19335 ac_var_match_word="no"
19336 for word1 in $CFLAGS; do
19337 for word2 in -Wno-$warning -W$warning; do
19338 if test "$word1" = "$word2"; then
19339 ac_var_match_word="yes"
19340 fi
19341 done
19342 done
19343
19344 if test "$ac_var_match_word" = "no"; then
19345 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19346 fi
19347 done
19348 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19349 squeeze tmp_CFLAGS
19350
19351
19352 ac_var_added_warnings=""
19353 for warning in alloc-zero; do
19354
19355 ac_var_match_word="no"
19356 for word1 in $CFLAGS; do
19357 for word2 in -Wno-$warning -W$warning; do
19358 if test "$word1" = "$word2"; then
19359 ac_var_match_word="yes"
19360 fi
19361 done
19362 done
19363
19364 if test "$ac_var_match_word" = "no"; then
19365 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19366 fi
19367 done
19368 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19369 squeeze tmp_CFLAGS
19370
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070019371 tmp_CFLAGS="$tmp_CFLAGS -Wformat-overflow=2"
19372 tmp_CFLAGS="$tmp_CFLAGS -Wformat-truncation=2"
Elliott Hughes34dd5f42021-08-10 13:01:18 -070019373 if test "$compiler_num" -lt "1200"; then
19374 tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough=4"
19375 fi
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070019376 fi
19377 #
Elliott Hughes82be86d2017-09-20 17:00:17 -070019378 fi
19379 #
19380 if test "$compiler_num" -ge "300"; then
19381 tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
19382 else
19383 if test "x$cross_compiling" = "xyes"; then
19384 if test "$compiler_num" -ge "104"; then
19385 tmp_CFLAGS="$tmp_CFLAGS -Wno-unused -Wno-shadow"
19386 fi
19387 if test "$compiler_num" -ge "207"; then
19388 tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-declarations"
19389 tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-prototypes"
19390 fi
19391 fi
19392 fi
Haibo Huangb5a52b92020-10-28 22:18:23 -070019393 if test "$compiler_num" -ge "1000"; then
19394
19395 ac_var_added_warnings=""
19396 for warning in enum-conversion; do
19397
19398 ac_var_match_word="no"
19399 for word1 in $CFLAGS; do
19400 for word2 in -Wno-$warning -W$warning; do
19401 if test "$word1" = "$word2"; then
19402 ac_var_match_word="yes"
19403 fi
19404 done
19405 done
19406
19407 if test "$ac_var_match_word" = "no"; then
19408 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19409 fi
19410 done
19411 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19412 squeeze tmp_CFLAGS
19413
19414 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070019415 ;;
19416 #
19417 HP_UX_C)
19418 #
19419 if test "$want_warnings" = "yes"; then
19420 tmp_CFLAGS="$tmp_CFLAGS +w1"
19421 fi
19422 ;;
19423 #
19424 IBM_C)
19425 #
19426 tmp_CFLAGS="$tmp_CFLAGS"
19427 ;;
19428 #
19429 INTEL_UNIX_C)
19430 #
19431 if test "$want_warnings" = "yes"; then
19432 if test "$compiler_num" -gt "600"; then
19433 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wall -w2"
19434 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wcheck"
19435 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wcomment"
19436 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wdeprecated"
19437 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wmissing-prototypes"
19438 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wp64"
19439 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wpointer-arith"
19440 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wreturn-type"
19441 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wshadow"
19442 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wuninitialized"
19443 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wunused-function"
19444 fi
19445 fi
19446 tmp_CFLAGS="$tmp_CFLAGS -fno-omit-frame-pointer"
19447 tmp_CFLAGS="$tmp_CFLAGS -fno-strict-aliasing"
19448 tmp_CFLAGS="$tmp_CFLAGS -fp-model precise"
Elliott Hughes82be86d2017-09-20 17:00:17 -070019449 ;;
19450 #
19451 INTEL_WINDOWS_C)
19452 #
19453 tmp_CFLAGS="$tmp_CFLAGS"
19454 ;;
19455 #
19456 LCC)
19457 #
19458 if test "$want_warnings" = "yes"; then
19459 tmp_CFLAGS="$tmp_CFLAGS"
19460 fi
19461 ;;
19462 #
19463 SGI_MIPS_C)
19464 #
19465 if test "$want_warnings" = "yes"; then
19466 tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
19467 fi
19468 ;;
19469 #
19470 SGI_MIPSPRO_C)
19471 #
19472 if test "$want_warnings" = "yes"; then
19473 tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
19474 tmp_CFLAGS="$tmp_CFLAGS -woff 1209"
19475 fi
19476 ;;
19477 #
19478 SUNPRO_C)
19479 #
19480 if test "$want_warnings" = "yes"; then
19481 tmp_CFLAGS="$tmp_CFLAGS -v"
19482 fi
19483 ;;
19484 #
19485 TINY_C)
19486 #
19487 if test "$want_warnings" = "yes"; then
Haibo Huangc3c04f42020-08-19 13:00:07 -070019488
19489 ac_var_added_warnings=""
19490 for warning in all; do
19491
19492 ac_var_match_word="no"
19493 for word1 in $CFLAGS; do
19494 for word2 in -Wno-$warning -W$warning; do
19495 if test "$word1" = "$word2"; then
19496 ac_var_match_word="yes"
19497 fi
19498 done
19499 done
19500
19501 if test "$ac_var_match_word" = "no"; then
19502 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19503 fi
19504 done
19505 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19506 squeeze tmp_CFLAGS
19507
19508
19509 ac_var_added_warnings=""
19510 for warning in write-strings; do
19511
19512 ac_var_match_word="no"
19513 for word1 in $CFLAGS; do
19514 for word2 in -Wno-$warning -W$warning; do
19515 if test "$word1" = "$word2"; then
19516 ac_var_match_word="yes"
19517 fi
19518 done
19519 done
19520
19521 if test "$ac_var_match_word" = "no"; then
19522 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19523 fi
19524 done
19525 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19526 squeeze tmp_CFLAGS
19527
19528
19529 ac_var_added_warnings=""
19530 for warning in unsupported; do
19531
19532 ac_var_match_word="no"
19533 for word1 in $CFLAGS; do
19534 for word2 in -Wno-$warning -W$warning; do
19535 if test "$word1" = "$word2"; then
19536 ac_var_match_word="yes"
19537 fi
19538 done
19539 done
19540
19541 if test "$ac_var_match_word" = "no"; then
19542 ac_var_added_warnings="$ac_var_added_warnings -W$warning"
19543 fi
19544 done
19545 tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
19546 squeeze tmp_CFLAGS
19547
Elliott Hughes82be86d2017-09-20 17:00:17 -070019548 fi
19549 ;;
19550 #
19551 WATCOM_UNIX_C)
19552 #
19553 if test "$want_warnings" = "yes"; then
19554 tmp_CFLAGS="$tmp_CFLAGS -Wall -Wextra"
19555 fi
19556 ;;
19557 #
19558 WATCOM_WINDOWS_C)
19559 #
19560 tmp_CFLAGS="$tmp_CFLAGS"
19561 ;;
19562 #
19563 esac
19564 #
19565 squeeze tmp_CPPFLAGS
19566 squeeze tmp_CFLAGS
19567 #
19568 if test ! -z "$tmp_CFLAGS" || test ! -z "$tmp_CPPFLAGS"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080019569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts strict warning options" >&5
19570printf %s "checking if compiler accepts strict warning options... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070019571 CPPFLAGS="$tmp_save_CPPFLAGS $tmp_CPPFLAGS"
19572 CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS"
19573 squeeze CPPFLAGS
19574 squeeze CFLAGS
19575
19576 tmp_compiler_works="unknown"
19577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19578/* end confdefs.h. */
19579
19580
19581
19582int main (void)
19583{
19584
19585 int i = 1;
19586 return i;
19587
19588 ;
19589 return 0;
19590}
19591
19592_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080019593if ac_fn_c_try_compile "$LINENO"
19594then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070019595
19596 tmp_compiler_works="yes"
19597
Elliott Hughesf344baa2021-12-07 09:12:34 -080019598else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070019599
19600 tmp_compiler_works="no"
19601 echo " " >&6
19602 sed 's/^/cc-fail: /' conftest.err >&6
19603 echo " " >&6
19604
19605fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080019606rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070019607 if test "$tmp_compiler_works" = "yes"; then
19608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19609/* end confdefs.h. */
19610
19611
19612
19613int main (void)
19614{
19615
19616 int i = 1;
19617 return i;
19618
19619 ;
19620 return 0;
19621}
19622
19623_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080019624if ac_fn_c_try_link "$LINENO"
19625then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070019626
19627 tmp_compiler_works="yes"
19628
Elliott Hughesf344baa2021-12-07 09:12:34 -080019629else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070019630
19631 tmp_compiler_works="no"
19632 echo " " >&6
19633 sed 's/^/link-fail: /' conftest.err >&6
19634 echo " " >&6
19635
19636fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080019637rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070019638 conftest$ac_exeext conftest.$ac_ext
19639 fi
19640 if test "x$cross_compiling" != "xyes" &&
19641 test "$tmp_compiler_works" = "yes"; then
Elliott Hughesa93fb052018-12-12 14:22:48 -080019642
Elliott Hughesa93fb052018-12-12 14:22:48 -080019643 old=$LD_LIBRARY_PATH
19644 LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
19645 export LD_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080019646 if test "$cross_compiling" = yes
19647then :
19648 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19649printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070019650as_fn_error $? "cannot run test program while cross compiling
19651See \`config.log' for more details" "$LINENO" 5; }
Elliott Hughesf344baa2021-12-07 09:12:34 -080019652else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070019653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19654/* end confdefs.h. */
19655
19656
19657# ifdef __STDC__
19658# include <stdlib.h>
19659# endif
19660
19661int main (void)
19662{
19663
19664 int i = 0;
19665 exit(i);
19666
19667 ;
19668 return 0;
19669}
19670
19671_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080019672if ac_fn_c_try_run "$LINENO"
19673then :
Elliott Hughesa93fb052018-12-12 14:22:48 -080019674 tmp_compiler_works="yes"
Elliott Hughes82be86d2017-09-20 17:00:17 -070019675
Elliott Hughesf344baa2021-12-07 09:12:34 -080019676else $as_nop
Elliott Hughesa93fb052018-12-12 14:22:48 -080019677 tmp_compiler_works="no"
Elliott Hughes82be86d2017-09-20 17:00:17 -070019678 echo " " >&6
19679 echo "run-fail: test program exited with status $ac_status" >&6
19680 echo " " >&6
19681
19682fi
19683rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19684 conftest.$ac_objext conftest.beam conftest.$ac_ext
19685fi
19686
Elliott Hughesa93fb052018-12-12 14:22:48 -080019687 LD_LIBRARY_PATH=$old # restore
19688
Elliott Hughes82be86d2017-09-20 17:00:17 -070019689 fi
19690 if test "$tmp_compiler_works" = "yes"; then
19691
Elliott Hughesf344baa2021-12-07 09:12:34 -080019692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19693printf "%s\n" "yes" >&6; }
19694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: compiler options added: $tmp_CFLAGS $tmp_CPPFLAGS" >&5
19695printf "%s\n" "$as_me: compiler options added: $tmp_CFLAGS $tmp_CPPFLAGS" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070019696
19697 else
19698
Elliott Hughesf344baa2021-12-07 09:12:34 -080019699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19700printf "%s\n" "no" >&6; }
19701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compiler options rejected: $tmp_CFLAGS $tmp_CPPFLAGS" >&5
19702printf "%s\n" "$as_me: WARNING: compiler options rejected: $tmp_CFLAGS $tmp_CPPFLAGS" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070019703 CPPFLAGS="$tmp_save_CPPFLAGS"
19704 CFLAGS="$tmp_save_CFLAGS"
19705
19706 fi
19707
19708 fi
19709 #
19710 fi
19711
19712
19713if test "$compiler_id" = "INTEL_UNIX_C"; then
19714 #
19715 if test "$compiler_num" -ge "1000"; then
19716 CFLAGS="$CFLAGS -shared-intel"
19717 elif test "$compiler_num" -ge "900"; then
19718 CFLAGS="$CFLAGS -i-dynamic"
19719 fi
19720 #
19721fi
19722
Haibo Huang24c77a12020-04-29 13:49:57 -070019723CURL_CFLAG_EXTRAS=""
19724if test X"$want_werror" = Xyes; then
19725 CURL_CFLAG_EXTRAS="-Werror"
19726 if test "$compiler_id" = "GNU_C"; then
19727 if test "$compiler_num" -ge "500"; then
19728 CURL_CFLAG_EXTRAS="$CURL_CFLAG_EXTRAS -pedantic-errors"
19729 fi
19730 fi
19731fi
19732
19733
Elliott Hughes82be86d2017-09-20 17:00:17 -070019734
Elliott Hughesf344baa2021-12-07 09:12:34 -080019735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler halts on compilation errors" >&5
19736printf %s "checking if compiler halts on compilation errors... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070019737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19738/* end confdefs.h. */
19739
19740
19741
19742int main (void)
19743{
19744
19745 force compilation error
19746
19747 ;
19748 return 0;
19749}
19750
19751_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080019752if ac_fn_c_try_compile "$LINENO"
19753then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070019754
Elliott Hughesf344baa2021-12-07 09:12:34 -080019755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19756printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070019757 as_fn_error $? "compiler does not halt on compilation errors." "$LINENO" 5
19758
Elliott Hughesf344baa2021-12-07 09:12:34 -080019759else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070019760
Elliott Hughesf344baa2021-12-07 09:12:34 -080019761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19762printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070019763
19764fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080019765rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070019766
19767
Elliott Hughesf344baa2021-12-07 09:12:34 -080019768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler halts on negative sized arrays" >&5
19769printf %s "checking if compiler halts on negative sized arrays... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070019770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19771/* end confdefs.h. */
19772
19773
19774 typedef char bad_t[sizeof(char) == sizeof(int) ? -1 : -1 ];
19775
19776int main (void)
19777{
19778
19779 bad_t dummy;
19780
19781 ;
19782 return 0;
19783}
19784
19785_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080019786if ac_fn_c_try_compile "$LINENO"
19787then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070019788
Elliott Hughesf344baa2021-12-07 09:12:34 -080019789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19790printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070019791 as_fn_error $? "compiler does not halt on negative sized arrays." "$LINENO" 5
19792
Elliott Hughesf344baa2021-12-07 09:12:34 -080019793else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070019794
Elliott Hughesf344baa2021-12-07 09:12:34 -080019795 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19796printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070019797
19798fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080019799rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070019800
19801
Elliott Hughesf344baa2021-12-07 09:12:34 -080019802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler halts on function prototype mismatch" >&5
19803printf %s "checking if compiler halts on function prototype mismatch... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070019804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19805/* end confdefs.h. */
19806
19807
19808# include <stdlib.h>
19809 int rand(int n);
19810 int rand(int n)
19811 {
19812 if(n)
19813 return ++n;
19814 else
19815 return n;
19816 }
19817
19818int main (void)
19819{
19820
19821 int i[2]={0,0};
19822 int j = rand(i[0]);
19823 if(j)
19824 return j;
19825
19826 ;
19827 return 0;
19828}
19829
19830_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080019831if ac_fn_c_try_compile "$LINENO"
19832then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070019833
Elliott Hughesf344baa2021-12-07 09:12:34 -080019834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19835printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070019836 as_fn_error $? "compiler does not halt on function prototype mismatch." "$LINENO" 5
19837
Elliott Hughesf344baa2021-12-07 09:12:34 -080019838else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070019839
Elliott Hughesf344baa2021-12-07 09:12:34 -080019840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19841printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070019842
19843fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080019844rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070019845
19846
Elliott Hughesf344baa2021-12-07 09:12:34 -080019847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports hiding library internal symbols" >&5
19848printf %s "checking if compiler supports hiding library internal symbols... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070019849 supports_symbol_hiding="no"
19850 symbol_hiding_CFLAGS=""
19851 symbol_hiding_EXTERN=""
19852 tmp_CFLAGS=""
19853 tmp_EXTERN=""
19854 case "$compiler_id" in
19855 CLANG)
19856 tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
19857 tmp_CFLAGS="-fvisibility=hidden"
19858 supports_symbol_hiding="yes"
19859 ;;
19860 GNU_C)
19861 if test "$compiler_num" -ge "304"; then
19862 if $CC --help --verbose 2>/dev/null | grep fvisibility= >/dev/null ; then
19863 tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
19864 tmp_CFLAGS="-fvisibility=hidden"
19865 supports_symbol_hiding="yes"
19866 fi
19867 fi
19868 ;;
19869 INTEL_UNIX_C)
19870 if test "$compiler_num" -ge "900"; then
19871 if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
19872 tmp_save_CFLAGS="$CFLAGS"
19873 CFLAGS="$CFLAGS -fvisibility=hidden"
19874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19875/* end confdefs.h. */
19876
19877
19878# include <stdio.h>
19879
19880int main (void)
19881{
19882
19883 printf("icc fvisibility bug test");
19884
19885 ;
19886 return 0;
19887}
19888
19889_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080019890if ac_fn_c_try_link "$LINENO"
19891then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070019892
19893 tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
19894 tmp_CFLAGS="-fvisibility=hidden"
19895 supports_symbol_hiding="yes"
19896
19897fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080019898rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070019899 conftest$ac_exeext conftest.$ac_ext
19900 CFLAGS="$tmp_save_CFLAGS"
19901 fi
19902 fi
19903 ;;
19904 SUNPRO_C)
19905 if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
19906 tmp_EXTERN="__global"
19907 tmp_CFLAGS="-xldscope=hidden"
19908 supports_symbol_hiding="yes"
19909 fi
19910 ;;
19911 esac
19912 if test "$supports_symbol_hiding" = "yes"; then
19913 tmp_save_CFLAGS="$CFLAGS"
19914 CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS"
19915 squeeze CFLAGS
19916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19917/* end confdefs.h. */
19918
19919
19920 $tmp_EXTERN char *dummy(char *buff);
19921 char *dummy(char *buff)
19922 {
19923 if(buff)
19924 return ++buff;
19925 else
19926 return buff;
19927 }
19928
19929int main (void)
19930{
19931
19932 char b[16];
19933 char *r = dummy(&b[0]);
19934 if(r)
19935 return (int)*r;
19936
19937 ;
19938 return 0;
19939}
19940
19941_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080019942if ac_fn_c_try_compile "$LINENO"
19943then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070019944
19945 supports_symbol_hiding="yes"
19946 if test -f conftest.err; then
19947 grep 'visibility' conftest.err >/dev/null
19948 if test "$?" -eq "0"; then
19949 supports_symbol_hiding="no"
19950 fi
19951 fi
19952
Elliott Hughesf344baa2021-12-07 09:12:34 -080019953else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070019954
19955 supports_symbol_hiding="no"
19956 echo " " >&6
19957 sed 's/^/cc-src: /' conftest.$ac_ext >&6
19958 sed 's/^/cc-err: /' conftest.err >&6
19959 echo " " >&6
19960
19961fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080019962rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070019963 CFLAGS="$tmp_save_CFLAGS"
19964 fi
19965 if test "$supports_symbol_hiding" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080019966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19967printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070019968 symbol_hiding_CFLAGS="$tmp_CFLAGS"
19969 symbol_hiding_EXTERN="$tmp_EXTERN"
19970 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080019971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19972printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070019973 fi
19974
19975
19976
19977 supports_curldebug="unknown"
19978 if test "$want_curldebug" = "yes"; then
19979 if test "x$enable_shared" != "xno" &&
19980 test "x$enable_shared" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080019981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown enable_shared setting." >&5
19982printf "%s\n" "$as_me: WARNING: unknown enable_shared setting." >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070019983 supports_curldebug="no"
19984 fi
19985 if test "x$enable_static" != "xno" &&
19986 test "x$enable_static" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080019987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown enable_static setting." >&5
19988printf "%s\n" "$as_me: WARNING: unknown enable_static setting." >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070019989 supports_curldebug="no"
19990 fi
19991 if test "$supports_curldebug" != "no"; then
19992 if test "$enable_shared" = "yes" &&
19993 test "x$xc_lt_shlib_use_no_undefined" = 'xyes'; then
19994 supports_curldebug="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080019995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: shared library does not support undefined symbols." >&5
19996printf "%s\n" "$as_me: WARNING: shared library does not support undefined symbols." >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070019997 fi
19998 fi
19999 fi
20000 #
20001 if test "$want_curldebug" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080020002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if curl debug memory tracking can be enabled" >&5
20003printf %s "checking if curl debug memory tracking can be enabled... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020004 test "$supports_curldebug" = "no" || supports_curldebug="yes"
Elliott Hughesf344baa2021-12-07 09:12:34 -080020005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supports_curldebug" >&5
20006printf "%s\n" "$supports_curldebug" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020007 if test "$supports_curldebug" = "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080020008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable curl debug memory tracking." >&5
20009printf "%s\n" "$as_me: WARNING: cannot enable curl debug memory tracking." >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070020010 want_curldebug="no"
20011 fi
20012 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070020013
20014 if test x$want_curldebug = xyes; then
20015 CURLDEBUG_TRUE=
20016 CURLDEBUG_FALSE='#'
20017else
20018 CURLDEBUG_TRUE='#'
20019 CURLDEBUG_FALSE=
20020fi
20021
20022
20023supports_unittests=yes
20024# cross-compilation of unit tests static library/programs fails when
20025# libcurl shared library is built. This might be due to a libtool or
20026# automake issue. In this case we disable unit tests.
20027if test "x$cross_compiling" != "xno" &&
20028 test "x$enable_shared" != "xno"; then
20029 supports_unittests=no
20030fi
20031
20032# IRIX 6.5.24 gcc 3.3 autobuilds fail unittests library compilation due to
20033# a problem related with OpenSSL headers and library versions not matching.
20034# Disable unit tests while time to further investigate this is found.
20035case $host in
20036 mips-sgi-irix6.5)
20037 if test "$compiler_id" = "GNU_C"; then
20038 supports_unittests=no
20039 fi
20040 ;;
20041esac
20042
20043# All AIX autobuilds fails unit tests linking against unittests library
20044# due to unittests library being built with no symbols or members. Libtool ?
20045# Disable unit tests while time to further investigate this is found.
20046case $host_os in
20047 aix*)
20048 supports_unittests=no
20049 ;;
20050esac
20051
20052if test "x$want_debug" = "xyes" &&
20053 test "x$supports_unittests" = "xyes"; then
20054 want_unittests=yes
20055else
20056 want_unittests=no
20057fi
20058 if test x$want_unittests = xyes; then
20059 BUILD_UNITTESTS_TRUE=
20060 BUILD_UNITTESTS_FALSE='#'
20061else
20062 BUILD_UNITTESTS_TRUE='#'
20063 BUILD_UNITTESTS_FALSE=
20064fi
20065
20066
Elliott Hughesf344baa2021-12-07 09:12:34 -080020067# For original MinGW (ie not MinGW-w64) define the Windows minimum supported OS
20068# version to Windows XP (0x501) if it hasn't already been defined by the user.
20069# Without this override original MinGW defaults the version to Windows NT 4.0.
20070# Note original MinGW sets _WIN32_WINNT if not defined to whatever WINVER is.
20071case $host in
20072 *-*-mingw32*)
20073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if MinGW minimum supported OS should be set to XP" >&5
20074printf %s "checking if MinGW minimum supported OS should be set to XP... " >&6; }
20075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20076/* end confdefs.h. */
20077
20078
20079#include <_mingw.h>
20080
20081int main (void)
20082{
20083
20084#if defined(__MINGW64_VERSION_MAJOR) || \
20085 defined(WINVER) || \
20086 defined(_WIN32_WINNT)
20087#error
20088#endif
20089
20090 ;
20091 return 0;
20092}
20093
20094_ACEOF
20095if ac_fn_c_try_compile "$LINENO"
20096then :
20097
20098 CPPFLAGS="$CPPFLAGS -DWINVER=0x501"
20099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20100printf "%s\n" "yes" >&6; }
20101
20102else $as_nop
20103
20104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20105printf "%s\n" "no" >&6; }
20106
20107fi
20108rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20109 ;;
20110esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070020111
20112
20113
Elliott Hughesf344baa2021-12-07 09:12:34 -080020114
20115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for windows.h" >&5
20116printf %s "checking for windows.h... " >&6; }
20117if test ${curl_cv_header_windows_h+y}
20118then :
20119 printf %s "(cached) " >&6
20120else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070020121
20122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20123/* end confdefs.h. */
20124
20125
20126#undef inline
20127#ifndef WIN32_LEAN_AND_MEAN
20128#define WIN32_LEAN_AND_MEAN
20129#endif
20130#include <windows.h>
20131
20132int main (void)
20133{
20134
20135#if defined(__CYGWIN__) || defined(__CEGCC__)
20136 HAVE_WINDOWS_H shall not be defined.
20137#else
20138 int dummy=2*WINVER;
20139#endif
20140
20141 ;
20142 return 0;
20143}
20144
20145_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080020146if ac_fn_c_try_compile "$LINENO"
20147then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070020148
20149 curl_cv_header_windows_h="yes"
20150
Elliott Hughesf344baa2021-12-07 09:12:34 -080020151else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070020152
20153 curl_cv_header_windows_h="no"
20154
20155fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020156rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070020157
20158fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020159{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_windows_h" >&5
20160printf "%s\n" "$curl_cv_header_windows_h" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020161 case "$curl_cv_header_windows_h" in
20162 yes)
20163
Elliott Hughesf344baa2021-12-07 09:12:34 -080020164printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070020165
20166 ;;
20167 esac
20168
20169
Elliott Hughesf344baa2021-12-07 09:12:34 -080020170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build target is a native Windows one" >&5
20171printf %s "checking whether build target is a native Windows one... " >&6; }
20172if test ${curl_cv_native_windows+y}
20173then :
20174 printf %s "(cached) " >&6
20175else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070020176
20177 if test "$curl_cv_header_windows_h" = "no"; then
20178 curl_cv_native_windows="no"
20179 else
20180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20181/* end confdefs.h. */
20182
20183
20184
20185int main (void)
20186{
20187
20188#if defined(__MINGW32__) || defined(__MINGW32CE__) || \
20189 (defined(_MSC_VER) && (defined(_WIN32) || defined(_WIN64)))
20190 int dummy=1;
20191#else
20192 Not a native Windows build target.
20193#endif
20194
20195 ;
20196 return 0;
20197}
20198
20199_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080020200if ac_fn_c_try_compile "$LINENO"
20201then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070020202
20203 curl_cv_native_windows="yes"
20204
Elliott Hughesf344baa2021-12-07 09:12:34 -080020205else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070020206
20207 curl_cv_native_windows="no"
20208
20209fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020210rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070020211 fi
20212
20213fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020214{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_native_windows" >&5
20215printf "%s\n" "$curl_cv_native_windows" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020216 if test "x$curl_cv_native_windows" = xyes; then
20217 DOING_NATIVE_WINDOWS_TRUE=
20218 DOING_NATIVE_WINDOWS_FALSE='#'
20219else
20220 DOING_NATIVE_WINDOWS_TRUE='#'
20221 DOING_NATIVE_WINDOWS_FALSE=
20222fi
20223
20224
20225case X-"$curl_cv_native_windows" in
20226 X-yes)
20227
Elliott Hughesf344baa2021-12-07 09:12:34 -080020228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for winsock2.h" >&5
20229printf %s "checking for winsock2.h... " >&6; }
20230if test ${curl_cv_header_winsock2_h+y}
20231then :
20232 printf %s "(cached) " >&6
20233else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070020234
20235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20236/* end confdefs.h. */
20237
20238
20239#undef inline
20240#ifndef WIN32_LEAN_AND_MEAN
20241#define WIN32_LEAN_AND_MEAN
20242#endif
20243#include <windows.h>
20244#include <winsock2.h>
20245
20246int main (void)
20247{
20248
20249#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__)
20250 HAVE_WINSOCK2_H shall not be defined.
20251#else
20252 int dummy=2*IPPROTO_ESP;
20253#endif
20254
20255 ;
20256 return 0;
20257}
20258
20259_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080020260if ac_fn_c_try_compile "$LINENO"
20261then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070020262
20263 curl_cv_header_winsock2_h="yes"
20264
Elliott Hughesf344baa2021-12-07 09:12:34 -080020265else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070020266
20267 curl_cv_header_winsock2_h="no"
20268
20269fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020270rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070020271
20272fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020273{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winsock2_h" >&5
20274printf "%s\n" "$curl_cv_header_winsock2_h" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020275 case "$curl_cv_header_winsock2_h" in
20276 yes)
20277
Elliott Hughesf344baa2021-12-07 09:12:34 -080020278printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070020279
20280 ;;
20281 esac
20282
20283
Elliott Hughesf344baa2021-12-07 09:12:34 -080020284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ws2tcpip.h" >&5
20285printf %s "checking for ws2tcpip.h... " >&6; }
20286if test ${curl_cv_header_ws2tcpip_h+y}
20287then :
20288 printf %s "(cached) " >&6
20289else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070020290
20291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20292/* end confdefs.h. */
20293
20294
20295#undef inline
20296#ifndef WIN32_LEAN_AND_MEAN
20297#define WIN32_LEAN_AND_MEAN
20298#endif
20299#include <windows.h>
20300#include <winsock2.h>
20301#include <ws2tcpip.h>
20302
20303int main (void)
20304{
20305
20306#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__)
20307 HAVE_WS2TCPIP_H shall not be defined.
20308#else
20309 int dummy=2*IP_PKTINFO;
20310#endif
20311
20312 ;
20313 return 0;
20314}
20315
20316_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080020317if ac_fn_c_try_compile "$LINENO"
20318then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070020319
20320 curl_cv_header_ws2tcpip_h="yes"
20321
Elliott Hughesf344baa2021-12-07 09:12:34 -080020322else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070020323
20324 curl_cv_header_ws2tcpip_h="no"
20325
20326fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020327rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070020328
20329fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020330{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_ws2tcpip_h" >&5
20331printf "%s\n" "$curl_cv_header_ws2tcpip_h" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020332 case "$curl_cv_header_ws2tcpip_h" in
20333 yes)
20334
Elliott Hughesf344baa2021-12-07 09:12:34 -080020335printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070020336
20337 ;;
20338 esac
20339
20340
Elliott Hughesf344baa2021-12-07 09:12:34 -080020341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wincrypt.h" >&5
20342printf %s "checking for wincrypt.h... " >&6; }
20343if test ${curl_cv_header_wincrypt_h+y}
20344then :
20345 printf %s "(cached) " >&6
20346else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020347
20348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20349/* end confdefs.h. */
20350
20351
20352#undef inline
20353#ifndef WIN32_LEAN_AND_MEAN
20354#define WIN32_LEAN_AND_MEAN
20355#endif
20356#include <windows.h>
20357#include <wincrypt.h>
20358
20359int main (void)
20360{
20361
20362 int dummy=2*PROV_RSA_FULL;
20363
20364 ;
20365 return 0;
20366}
20367
20368_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080020369if ac_fn_c_try_compile "$LINENO"
20370then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020371
20372 curl_cv_header_wincrypt_h="yes"
20373
Elliott Hughesf344baa2021-12-07 09:12:34 -080020374else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020375
20376 curl_cv_header_wincrypt_h="no"
20377
20378fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020379rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020380
20381fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020382{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_wincrypt_h" >&5
20383printf "%s\n" "$curl_cv_header_wincrypt_h" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020384 case "$curl_cv_header_wincrypt_h" in
20385 yes)
20386
Elliott Hughesf344baa2021-12-07 09:12:34 -080020387printf "%s\n" "#define HAVE_WINCRYPT_H 1" >>confdefs.h
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020388
20389 ;;
20390 esac
20391
20392
Elliott Hughesf344baa2021-12-07 09:12:34 -080020393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for winldap.h" >&5
20394printf %s "checking for winldap.h... " >&6; }
20395if test ${curl_cv_header_winldap_h+y}
20396then :
20397 printf %s "(cached) " >&6
20398else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070020399
20400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20401/* end confdefs.h. */
20402
20403
20404#undef inline
20405#ifdef HAVE_WINDOWS_H
20406#ifndef WIN32_LEAN_AND_MEAN
20407#define WIN32_LEAN_AND_MEAN
20408#endif
20409#include <windows.h>
20410#endif
20411#include <winldap.h>
20412
20413int main (void)
20414{
20415
20416#if defined(__CYGWIN__) || defined(__CEGCC__)
20417 HAVE_WINLDAP_H shall not be defined.
20418#else
20419 LDAP *ldp = ldap_init("dummy", LDAP_PORT);
20420 ULONG res = ldap_unbind(ldp);
20421#endif
20422
20423 ;
20424 return 0;
20425}
20426
20427_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080020428if ac_fn_c_try_compile "$LINENO"
20429then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070020430
20431 curl_cv_header_winldap_h="yes"
20432
Elliott Hughesf344baa2021-12-07 09:12:34 -080020433else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070020434
20435 curl_cv_header_winldap_h="no"
20436
20437fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020438rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070020439
20440fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020441{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winldap_h" >&5
20442printf "%s\n" "$curl_cv_header_winldap_h" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020443 case "$curl_cv_header_winldap_h" in
20444 yes)
20445
Elliott Hughesf344baa2021-12-07 09:12:34 -080020446printf "%s\n" "#define HAVE_WINLDAP_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070020447
20448 ;;
20449 esac
20450
20451
Elliott Hughesf344baa2021-12-07 09:12:34 -080020452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for winber.h" >&5
20453printf %s "checking for winber.h... " >&6; }
20454if test ${curl_cv_header_winber_h+y}
20455then :
20456 printf %s "(cached) " >&6
20457else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070020458
20459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20460/* end confdefs.h. */
20461
20462
20463#undef inline
20464#ifdef HAVE_WINDOWS_H
20465#ifndef WIN32_LEAN_AND_MEAN
20466#define WIN32_LEAN_AND_MEAN
20467#endif
20468#include <windows.h>
20469#endif
20470#include <winldap.h>
20471#include <winber.h>
20472
20473int main (void)
20474{
20475
20476#if defined(__CYGWIN__) || defined(__CEGCC__)
20477 HAVE_WINBER_H shall not be defined.
20478#else
20479 BERVAL *bvp = NULL;
20480 BerElement *bep = ber_init(bvp);
20481 ber_free(bep, 1);
20482#endif
20483
20484 ;
20485 return 0;
20486}
20487
20488_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080020489if ac_fn_c_try_compile "$LINENO"
20490then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070020491
20492 curl_cv_header_winber_h="yes"
20493
Elliott Hughesf344baa2021-12-07 09:12:34 -080020494else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070020495
20496 curl_cv_header_winber_h="no"
20497
20498fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020499rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070020500
20501fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020502{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winber_h" >&5
20503printf "%s\n" "$curl_cv_header_winber_h" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020504 case "$curl_cv_header_winber_h" in
20505 yes)
20506
Elliott Hughesf344baa2021-12-07 09:12:34 -080020507printf "%s\n" "#define HAVE_WINBER_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070020508
20509 ;;
20510 esac
20511
20512 ;;
20513 *)
Elliott Hughes82be86d2017-09-20 17:00:17 -070020514 curl_cv_header_winsock2_h="no"
20515 curl_cv_header_ws2tcpip_h="no"
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020516 curl_cv_header_wincrypt_h="no"
Elliott Hughes82be86d2017-09-20 17:00:17 -070020517 curl_cv_header_winldap_h="no"
20518 curl_cv_header_winber_h="no"
20519 ;;
20520esac
20521
Elliott Hughesf344baa2021-12-07 09:12:34 -080020522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build target supports WIN32 file API" >&5
20523printf %s "checking whether build target supports WIN32 file API... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020524 curl_win32_file_api="no"
20525 if test "$curl_cv_header_windows_h" = "yes"; then
20526 if test x"$enable_largefile" != "xno"; then
20527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20528/* end confdefs.h. */
20529
20530
20531
20532int main (void)
20533{
20534
20535#if !defined(_WIN32_WCE) && \
20536 (defined(__MINGW32__) || \
20537 (defined(_MSC_VER) && (defined(_WIN32) || defined(_WIN64))))
20538 int dummy=1;
20539#else
20540 WIN32 large file API not supported.
20541#endif
20542
20543 ;
20544 return 0;
20545}
20546
20547_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080020548if ac_fn_c_try_compile "$LINENO"
20549then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070020550
20551 curl_win32_file_api="win32_large_files"
20552
20553fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020554rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070020555 fi
20556 if test "$curl_win32_file_api" = "no"; then
20557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20558/* end confdefs.h. */
20559
20560
20561
20562int main (void)
20563{
20564
20565#if defined(_WIN32_WCE) || defined(__MINGW32__) || defined(_MSC_VER)
20566 int dummy=1;
20567#else
20568 WIN32 small file API not supported.
20569#endif
20570
20571 ;
20572 return 0;
20573}
20574
20575_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080020576if ac_fn_c_try_compile "$LINENO"
20577then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070020578
20579 curl_win32_file_api="win32_small_files"
20580
20581fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020582rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070020583 fi
20584 fi
20585 case "$curl_win32_file_api" in
20586 win32_large_files)
Elliott Hughesf344baa2021-12-07 09:12:34 -080020587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (large file enabled)" >&5
20588printf "%s\n" "yes (large file enabled)" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020589
Elliott Hughesf344baa2021-12-07 09:12:34 -080020590printf "%s\n" "#define USE_WIN32_LARGE_FILES 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070020591
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020592 USE_WIN32_LARGE_FILES=1
20593
Elliott Hughes82be86d2017-09-20 17:00:17 -070020594 ;;
20595 win32_small_files)
Elliott Hughesf344baa2021-12-07 09:12:34 -080020596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (large file disabled)" >&5
20597printf "%s\n" "yes (large file disabled)" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020598
Elliott Hughesf344baa2021-12-07 09:12:34 -080020599printf "%s\n" "#define USE_WIN32_SMALL_FILES 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070020600
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020601 USE_WIN32_SMALL_FILES=1
20602
20603 ;;
20604 *)
Elliott Hughesf344baa2021-12-07 09:12:34 -080020605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20606printf "%s\n" "no" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020607 ;;
20608 esac
20609
20610
Elliott Hughesf344baa2021-12-07 09:12:34 -080020611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build target supports WIN32 crypto API" >&5
20612printf %s "checking whether build target supports WIN32 crypto API... " >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020613 curl_win32_crypto_api="no"
20614 if test "$curl_cv_header_wincrypt_h" = "yes"; then
20615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20616/* end confdefs.h. */
20617
20618
20619#undef inline
20620#ifndef WIN32_LEAN_AND_MEAN
20621#define WIN32_LEAN_AND_MEAN
20622#endif
20623#include <windows.h>
20624#include <wincrypt.h>
20625
20626int main (void)
20627{
20628
20629 HCRYPTPROV hCryptProv;
20630 if(CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL,
20631 CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) {
20632 CryptReleaseContext(hCryptProv, 0);
20633 }
20634
20635 ;
20636 return 0;
20637}
20638
20639_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080020640if ac_fn_c_try_compile "$LINENO"
20641then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020642
20643 curl_win32_crypto_api="yes"
20644
20645fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020646rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020647 fi
20648 case "$curl_win32_crypto_api" in
20649 yes)
Elliott Hughesf344baa2021-12-07 09:12:34 -080020650 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20651printf "%s\n" "yes" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020652
Elliott Hughesf344baa2021-12-07 09:12:34 -080020653printf "%s\n" "#define USE_WIN32_CRYPTO 1" >>confdefs.h
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020654
20655 USE_WIN32_CRYPTO=1
20656
Elliott Hughes82be86d2017-09-20 17:00:17 -070020657 ;;
20658 *)
Elliott Hughesf344baa2021-12-07 09:12:34 -080020659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20660printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020661 ;;
20662 esac
20663
20664
20665
20666
20667 tst_cflags="no"
20668 case $host_os in
20669 darwin*)
20670 tst_cflags="yes"
20671 ;;
20672 esac
20673
Elliott Hughesf344baa2021-12-07 09:12:34 -080020674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good-to-use Darwin CFLAGS" >&5
20675printf %s "checking for good-to-use Darwin CFLAGS... " >&6; }
20676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tst_cflags" >&5
20677printf "%s\n" "$tst_cflags" >&6; };
Elliott Hughes82be86d2017-09-20 17:00:17 -070020678
20679 if test "$tst_cflags" = "yes"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070020680 old_CFLAGS=$CFLAGS
20681 CFLAGS="$CFLAGS -Werror=partial-availability"
Elliott Hughesf344baa2021-12-07 09:12:34 -080020682 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Werror=partial-availability" >&5
20683printf %s "checking whether $CC accepts -Werror=partial-availability... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20685/* end confdefs.h. */
20686
20687int main (void)
20688{
20689
20690 ;
20691 return 0;
20692}
20693_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080020694if ac_fn_c_try_compile "$LINENO"
20695then :
20696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20697printf "%s\n" "yes" >&6; }
20698else $as_nop
20699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20700printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020701 CFLAGS=$old_CFLAGS
20702fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020703rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070020704 fi
20705
20706
20707
Elliott Hughesf344baa2021-12-07 09:12:34 -080020708{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to link macOS CoreFoundation and SystemConfiguration framework" >&5
20709printf %s "checking whether to link macOS CoreFoundation and SystemConfiguration framework... " >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020710case $host_os in
20711 darwin*)
20712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20713/* end confdefs.h. */
20714
20715
20716#include <TargetConditionals.h>
20717
20718int main (void)
20719{
20720
20721#if (TARGET_OS_OSX)
20722 return 0;
20723#else
20724#error Not a macOS
20725#endif
20726
20727 ;
20728 return 0;
20729}
20730
20731_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080020732if ac_fn_c_try_compile "$LINENO"
20733then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020734
20735 build_for_macos="yes"
20736
Elliott Hughesf344baa2021-12-07 09:12:34 -080020737else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020738
20739 build_for_macos="no"
20740
20741fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020742rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020743 if test "x$build_for_macos" != xno; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080020744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20745printf "%s\n" "yes" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020746 LDFLAGS="$LDFLAGS -framework CoreFoundation -framework SystemConfiguration"
20747 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080020748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20749printf "%s\n" "no" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020750 fi
20751 ;;
20752 *)
Elliott Hughesf344baa2021-12-07 09:12:34 -080020753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20754printf "%s\n" "no" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020755esac
20756
20757
Elliott Hughesf344baa2021-12-07 09:12:34 -080020758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking to see if the compiler supports __builtin_available()" >&5
20759printf %s "checking to see if the compiler supports __builtin_available()... " >&6; }
Alex Deymo486467e2017-12-19 19:04:07 +010020760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20761/* end confdefs.h. */
20762
20763
20764#include <stdlib.h>
20765
20766int main (void)
20767{
20768
20769 if (__builtin_available(macOS 10.8, iOS 5.0, *)) {}
20770
20771 ;
20772 return 0;
20773}
20774
20775_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080020776if ac_fn_c_try_compile "$LINENO"
20777then :
Alex Deymo486467e2017-12-19 19:04:07 +010020778
Elliott Hughesf344baa2021-12-07 09:12:34 -080020779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20780printf "%s\n" "yes" >&6; }
Alex Deymo486467e2017-12-19 19:04:07 +010020781
Elliott Hughesf344baa2021-12-07 09:12:34 -080020782printf "%s\n" "#define HAVE_BUILTIN_AVAILABLE 1" >>confdefs.h
Alex Deymo486467e2017-12-19 19:04:07 +010020783
20784
Elliott Hughesf344baa2021-12-07 09:12:34 -080020785else $as_nop
Alex Deymo486467e2017-12-19 19:04:07 +010020786
Elliott Hughesf344baa2021-12-07 09:12:34 -080020787 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20788printf "%s\n" "no" >&6; }
Alex Deymo486467e2017-12-19 19:04:07 +010020789
20790fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080020791rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Alex Deymo486467e2017-12-19 19:04:07 +010020792
20793
Haibo Huang65021c72019-03-27 15:37:23 -070020794
Elliott Hughesf344baa2021-12-07 09:12:34 -080020795{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support http" >&5
20796printf %s "checking whether to support http... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020797# Check whether --enable-http was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080020798if test ${enable_http+y}
20799then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070020800 enableval=$enable_http; case "$enableval" in
20801 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080020802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20803printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020804
Elliott Hughesf344baa2021-12-07 09:12:34 -080020805printf "%s\n" "#define CURL_DISABLE_HTTP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070020806
20807 disable_http="yes"
Elliott Hughesf344baa2021-12-07 09:12:34 -080020808 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: disable HTTP disables FTP over proxy and RTSP" >&5
20809printf "%s\n" "$as_me: WARNING: disable HTTP disables FTP over proxy and RTSP" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070020810 CURL_DISABLE_HTTP=1
20811
20812
Elliott Hughesf344baa2021-12-07 09:12:34 -080020813printf "%s\n" "#define CURL_DISABLE_RTSP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070020814
20815 CURL_DISABLE_RTSP=1
20816
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020817
Elliott Hughesf344baa2021-12-07 09:12:34 -080020818printf "%s\n" "#define CURL_DISABLE_ALTSVC 1" >>confdefs.h
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020819
20820
Elliott Hughesf344baa2021-12-07 09:12:34 -080020821printf "%s\n" "#define CURL_DISABLE_HSTS 1" >>confdefs.h
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020822
20823 curl_h1_msg="no (--enable-http, --with-hyper)"
20824 curl_altsvc_msg="no";
20825 curl_hsts_msg="no (--enable-hsts)";
20826 enable_altsvc="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080020827 hsts="no"
Elliott Hughes82be86d2017-09-20 17:00:17 -070020828 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080020829 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20830printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020831 ;;
20832 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080020833else $as_nop
20834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20835printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020836
20837fi
20838
Elliott Hughesf344baa2021-12-07 09:12:34 -080020839{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support ftp" >&5
20840printf %s "checking whether to support ftp... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020841# Check whether --enable-ftp was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080020842if test ${enable_ftp+y}
20843then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070020844 enableval=$enable_ftp; case "$enableval" in
20845 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080020846 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20847printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020848
Elliott Hughesf344baa2021-12-07 09:12:34 -080020849printf "%s\n" "#define CURL_DISABLE_FTP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070020850
20851 CURL_DISABLE_FTP=1
20852
20853 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080020854 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20855printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020856 ;;
20857 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080020858else $as_nop
20859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20860printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020861
20862fi
20863
Elliott Hughesf344baa2021-12-07 09:12:34 -080020864{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support file" >&5
20865printf %s "checking whether to support file... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020866# Check whether --enable-file was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080020867if test ${enable_file+y}
20868then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070020869 enableval=$enable_file; case "$enableval" in
20870 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080020871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20872printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020873
Elliott Hughesf344baa2021-12-07 09:12:34 -080020874printf "%s\n" "#define CURL_DISABLE_FILE 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070020875
20876 CURL_DISABLE_FILE=1
20877
20878 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080020879 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20880printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020881 ;;
20882 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080020883else $as_nop
20884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20885printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020886
20887fi
20888
Elliott Hughesf344baa2021-12-07 09:12:34 -080020889{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support ldap" >&5
20890printf %s "checking whether to support ldap... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020891# Check whether --enable-ldap was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080020892if test ${enable_ldap+y}
20893then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070020894 enableval=$enable_ldap; case "$enableval" in
20895 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080020896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20897printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020898
Elliott Hughesf344baa2021-12-07 09:12:34 -080020899printf "%s\n" "#define CURL_DISABLE_LDAP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070020900
20901 CURL_DISABLE_LDAP=1
20902
20903 ;;
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020904 yes)
20905 ldap_askedfor="yes"
Elliott Hughesf344baa2021-12-07 09:12:34 -080020906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20907printf "%s\n" "yes" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020908 ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070020909 *)
Elliott Hughesf344baa2021-12-07 09:12:34 -080020910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20911printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020912 ;;
20913 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080020914else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070020915
Elliott Hughesf344baa2021-12-07 09:12:34 -080020916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20917printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020918
20919fi
20920
Elliott Hughesf344baa2021-12-07 09:12:34 -080020921{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support ldaps" >&5
20922printf %s "checking whether to support ldaps... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020923# Check whether --enable-ldaps was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080020924if test ${enable_ldaps+y}
20925then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070020926 enableval=$enable_ldaps; case "$enableval" in
20927 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080020928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20929printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020930
Elliott Hughesf344baa2021-12-07 09:12:34 -080020931printf "%s\n" "#define CURL_DISABLE_LDAPS 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070020932
20933 CURL_DISABLE_LDAPS=1
20934
20935 ;;
20936 *) if test "x$CURL_DISABLE_LDAP" = "x1" ; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080020937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: LDAP needs to be enabled to support LDAPS" >&5
20938printf "%s\n" "LDAP needs to be enabled to support LDAPS" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020939
Elliott Hughesf344baa2021-12-07 09:12:34 -080020940printf "%s\n" "#define CURL_DISABLE_LDAPS 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070020941
20942 CURL_DISABLE_LDAPS=1
20943
20944 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080020945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20946printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020947
Elliott Hughesf344baa2021-12-07 09:12:34 -080020948printf "%s\n" "#define HAVE_LDAP_SSL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070020949
20950 HAVE_LDAP_SSL=1
20951
20952 fi
20953 ;;
20954 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080020955else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070020956
20957 if test "x$CURL_DISABLE_LDAP" = "x1" ; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080020958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20959printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020960
Elliott Hughesf344baa2021-12-07 09:12:34 -080020961printf "%s\n" "#define CURL_DISABLE_LDAPS 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070020962
20963 CURL_DISABLE_LDAPS=1
20964
20965 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080020966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20967printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070020968
Elliott Hughesf344baa2021-12-07 09:12:34 -080020969printf "%s\n" "#define HAVE_LDAP_SSL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070020970
20971 HAVE_LDAP_SSL=1
20972
20973 fi
20974
20975fi
20976
20977
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020978
20979OPT_HYPER="no"
20980
20981
20982# Check whether --with-hyper was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080020983if test ${with_hyper+y}
20984then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070020985 withval=$with_hyper; OPT_HYPER=$withval
20986fi
20987
20988case "$OPT_HYPER" in
20989 no)
20990 want_hyper="no"
20991 ;;
20992 yes)
20993 want_hyper="default"
20994 want_hyper_path=""
20995 ;;
20996 *)
20997 want_hyper="yes"
20998 want_hyper_path="$withval"
20999 ;;
21000esac
21001
21002if test X"$want_hyper" != Xno; then
21003 if test "x$disable_http" = "xyes"; then
21004 as_fn_error $? "--with-hyper is not compatible with --disable-http" "$LINENO" 5
21005 fi
21006
21007 CLEANLDFLAGS="$LDFLAGS"
21008 CLEANCPPFLAGS="$CPPFLAGS"
21009 CLEANLIBS="$LIBS"
21010
21011
21012 if test -n "$PKG_CONFIG"; then
21013 PKGCONFIG="$PKG_CONFIG"
21014 else
21015 if test -n "$ac_tool_prefix"; then
21016 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
21017set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080021018{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21019printf %s "checking for $ac_word... " >&6; }
21020if test ${ac_cv_path_PKGCONFIG+y}
21021then :
21022 printf %s "(cached) " >&6
21023else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021024 case $PKGCONFIG in
21025 [\\/]* | ?:[\\/]*)
21026 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
21027 ;;
21028 *)
21029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21030as_dummy="$PATH:/usr/bin:/usr/local/bin"
21031for as_dir in $as_dummy
21032do
21033 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080021034 case $as_dir in #(((
21035 '') as_dir=./ ;;
21036 */) ;;
21037 *) as_dir=$as_dir/ ;;
21038 esac
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021039 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080021040 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
21041 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
21042 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021043 break 2
21044 fi
21045done
21046 done
21047IFS=$as_save_IFS
21048
21049 ;;
21050esac
21051fi
21052PKGCONFIG=$ac_cv_path_PKGCONFIG
21053if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080021054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
21055printf "%s\n" "$PKGCONFIG" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021056else
Elliott Hughesf344baa2021-12-07 09:12:34 -080021057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21058printf "%s\n" "no" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021059fi
21060
21061
21062fi
21063if test -z "$ac_cv_path_PKGCONFIG"; then
21064 ac_pt_PKGCONFIG=$PKGCONFIG
21065 # Extract the first word of "pkg-config", so it can be a program name with args.
21066set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080021067{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21068printf %s "checking for $ac_word... " >&6; }
21069if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
21070then :
21071 printf %s "(cached) " >&6
21072else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021073 case $ac_pt_PKGCONFIG in
21074 [\\/]* | ?:[\\/]*)
21075 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
21076 ;;
21077 *)
21078 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21079as_dummy="$PATH:/usr/bin:/usr/local/bin"
21080for as_dir in $as_dummy
21081do
21082 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080021083 case $as_dir in #(((
21084 '') as_dir=./ ;;
21085 */) ;;
21086 *) as_dir=$as_dir/ ;;
21087 esac
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021088 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080021089 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
21090 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
21091 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021092 break 2
21093 fi
21094done
21095 done
21096IFS=$as_save_IFS
21097
21098 ;;
21099esac
21100fi
21101ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
21102if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080021103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
21104printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021105else
Elliott Hughesf344baa2021-12-07 09:12:34 -080021106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21107printf "%s\n" "no" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021108fi
21109
21110 if test "x$ac_pt_PKGCONFIG" = x; then
21111 PKGCONFIG="no"
21112 else
21113 case $cross_compiling:$ac_tool_warned in
21114yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080021115{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21116printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021117ac_tool_warned=yes ;;
21118esac
21119 PKGCONFIG=$ac_pt_PKGCONFIG
21120 fi
21121else
21122 PKGCONFIG="$ac_cv_path_PKGCONFIG"
21123fi
21124
21125 fi
21126
21127 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080021128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hyper options with pkg-config" >&5
21129printf %s "checking for hyper options with pkg-config... " >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021130 itexists=`
21131 if test -n "$want_hyper_path"; then
21132 PKG_CONFIG_LIBDIR="$want_hyper_path"
21133 export PKG_CONFIG_LIBDIR
21134 fi
21135 $PKGCONFIG --exists hyper >/dev/null 2>&1 && echo 1`
21136
21137 if test -z "$itexists"; then
21138 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080021139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21140printf "%s\n" "no" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021141 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080021142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
21143printf "%s\n" "found" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021144 fi
21145 fi
21146
21147
21148 if test "$PKGCONFIG" != "no" ; then
21149 LIB_HYPER=`
21150 if test -n "$want_hyper_path"; then
21151 PKG_CONFIG_LIBDIR="$want_hyper_path"
21152 export PKG_CONFIG_LIBDIR
21153 fi
21154
21155 $PKGCONFIG --libs-only-l hyper`
21156 CPP_HYPER=`
21157 if test -n "$want_hyper_path"; then
21158 PKG_CONFIG_LIBDIR="$want_hyper_path"
21159 export PKG_CONFIG_LIBDIR
21160 fi
21161 $PKGCONFIG --cflags-only-I hyper`
21162 LD_HYPER=`
21163 if test -n "$want_hyper_path"; then
21164 PKG_CONFIG_LIBDIR="$want_hyper_path"
21165 export PKG_CONFIG_LIBDIR
21166 fi
21167
21168 $PKGCONFIG --libs-only-L hyper`
21169 else
21170 LIB_HYPER="-lhyper -ldl -lpthread -lm"
21171 if test X"$want_hyper" != Xdefault; then
21172 CPP_HYPER=-I"$want_hyper_path/capi/include"
21173 LD_HYPER="-L$want_hyper_path/target/debug"
21174 fi
21175 fi
21176 if test -n "$LIB_HYPER"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080021177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -l is $LIB_HYPER" >&5
21178printf "%s\n" "$as_me: -l is $LIB_HYPER" >&6;}
21179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -I is $CPP_HYPER" >&5
21180printf "%s\n" "$as_me: -I is $CPP_HYPER" >&6;}
21181 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -L is $LD_HYPER" >&5
21182printf "%s\n" "$as_me: -L is $LD_HYPER" >&6;}
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021183
21184 LDFLAGS="$LDFLAGS $LD_HYPER"
21185 CPPFLAGS="$CPPFLAGS $CPP_HYPER"
21186 LIBS="$LIB_HYPER $LIBS"
21187
21188 if test "x$cross_compiling" != "xyes"; then
21189 DIR_HYPER=`echo $LD_HYPER | $SED -e 's/^-L//'`
21190 fi
21191
Elliott Hughesf344baa2021-12-07 09:12:34 -080021192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hyper_io_new in -lhyper" >&5
21193printf %s "checking for hyper_io_new in -lhyper... " >&6; }
21194if test ${ac_cv_lib_hyper_hyper_io_new+y}
21195then :
21196 printf %s "(cached) " >&6
21197else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021198 ac_check_lib_save_LIBS=$LIBS
21199LIBS="-lhyper $LIBS"
21200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21201/* end confdefs.h. */
21202
21203
21204#ifdef __cplusplus
21205extern "C"
21206#endif
21207char hyper_io_new ();
21208int main (void)
21209{
21210return hyper_io_new ();
21211 ;
21212 return 0;
21213}
21214_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080021215if ac_fn_c_try_link "$LINENO"
21216then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021217 ac_cv_lib_hyper_hyper_io_new=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080021218else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021219 ac_cv_lib_hyper_hyper_io_new=no
21220fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080021221rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021222 conftest$ac_exeext conftest.$ac_ext
21223LIBS=$ac_check_lib_save_LIBS
21224fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080021225{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hyper_hyper_io_new" >&5
21226printf "%s\n" "$ac_cv_lib_hyper_hyper_io_new" >&6; }
21227if test "x$ac_cv_lib_hyper_hyper_io_new" = xyes
21228then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021229
Elliott Hughesf344baa2021-12-07 09:12:34 -080021230 for ac_header in hyper.h
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021231do :
Elliott Hughesf344baa2021-12-07 09:12:34 -080021232 ac_fn_c_check_header_compile "$LINENO" "hyper.h" "ac_cv_header_hyper_h" "$ac_includes_default"
21233if test "x$ac_cv_header_hyper_h" = xyes
21234then :
21235 printf "%s\n" "#define HAVE_HYPER_H 1" >>confdefs.h
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021236 experimental="$experimental Hyper"
Elliott Hughesf344baa2021-12-07 09:12:34 -080021237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Hyper support is experimental" >&5
21238printf "%s\n" "$as_me: Hyper support is experimental" >&6;}
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021239 curl_h1_msg="enabled (Hyper)"
21240 curl_h2_msg=$curl_h1_msg
21241 HYPER_ENABLED=1
21242
Elliott Hughesf344baa2021-12-07 09:12:34 -080021243printf "%s\n" "#define USE_HYPER 1" >>confdefs.h
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021244
21245 USE_HYPER=1
21246
21247 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_HYPER"
21248 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080021249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_HYPER to CURL_LIBRARY_PATH" >&5
21250printf "%s\n" "$as_me: Added $DIR_HYPER to CURL_LIBRARY_PATH" >&6;}
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021251fi
21252
21253done
21254
Elliott Hughesf344baa2021-12-07 09:12:34 -080021255else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021256 as_fn_error $? "--with-hyper but hyper was not found. See docs/HYPER.md." "$LINENO" 5
21257
21258fi
21259
21260 fi
21261fi
21262
21263if test X"$want_hyper" != Xno; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080021264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disable RTSP support with hyper" >&5
21265printf "%s\n" "$as_me: Disable RTSP support with hyper" >&6;}
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021266
Elliott Hughesf344baa2021-12-07 09:12:34 -080021267printf "%s\n" "#define CURL_DISABLE_RTSP 1" >>confdefs.h
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021268
21269 CURL_DISABLE_RTSP=1
21270
21271
21272else
21273
Elliott Hughesf344baa2021-12-07 09:12:34 -080021274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support rtsp" >&5
21275printf %s "checking whether to support rtsp... " >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021276 # Check whether --enable-rtsp was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080021277if test ${enable_rtsp+y}
21278then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021279 enableval=$enable_rtsp; case "$enableval" in
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021280 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080021281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21282printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021283
Elliott Hughesf344baa2021-12-07 09:12:34 -080021284printf "%s\n" "#define CURL_DISABLE_RTSP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070021285
21286 CURL_DISABLE_RTSP=1
21287
21288 ;;
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021289 *)
21290 if test x$CURL_DISABLE_HTTP = x1 ; then
21291 as_fn_error $? "HTTP support needs to be enabled in order to enable RTSP support!" "$LINENO" 5
Elliott Hughes82be86d2017-09-20 17:00:17 -070021292 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080021293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21294printf "%s\n" "yes" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021295 curl_rtsp_msg="enabled"
Elliott Hughes82be86d2017-09-20 17:00:17 -070021296 fi
21297 ;;
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021298 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080021299else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070021300 if test "x$CURL_DISABLE_HTTP" != "x1"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080021301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21302printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021303 curl_rtsp_msg="enabled"
21304 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080021305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21306printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021307 fi
21308
21309fi
21310
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021311fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070021312
Elliott Hughesf344baa2021-12-07 09:12:34 -080021313{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support proxies" >&5
21314printf %s "checking whether to support proxies... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021315# Check whether --enable-proxy was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080021316if test ${enable_proxy+y}
21317then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021318 enableval=$enable_proxy; case "$enableval" in
21319 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080021320 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21321printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021322
Elliott Hughesf344baa2021-12-07 09:12:34 -080021323printf "%s\n" "#define CURL_DISABLE_PROXY 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070021324
21325 CURL_DISABLE_PROXY=1
21326
Haibo Huangb5a52b92020-10-28 22:18:23 -070021327 https_proxy="no"
Elliott Hughes82be86d2017-09-20 17:00:17 -070021328 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080021329 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21330printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021331 ;;
21332 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080021333else $as_nop
21334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21335printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021336
21337fi
21338
21339
Elliott Hughesf344baa2021-12-07 09:12:34 -080021340{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support dict" >&5
21341printf %s "checking whether to support dict... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021342# Check whether --enable-dict was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080021343if test ${enable_dict+y}
21344then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021345 enableval=$enable_dict; case "$enableval" in
21346 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080021347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21348printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021349
Elliott Hughesf344baa2021-12-07 09:12:34 -080021350printf "%s\n" "#define CURL_DISABLE_DICT 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070021351
21352 CURL_DISABLE_DICT=1
21353
21354 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080021355 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21356printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021357 ;;
21358 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080021359else $as_nop
21360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21361printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021362
21363fi
21364
Elliott Hughesf344baa2021-12-07 09:12:34 -080021365{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support telnet" >&5
21366printf %s "checking whether to support telnet... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021367# Check whether --enable-telnet was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080021368if test ${enable_telnet+y}
21369then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021370 enableval=$enable_telnet; case "$enableval" in
21371 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080021372 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21373printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021374
Elliott Hughesf344baa2021-12-07 09:12:34 -080021375printf "%s\n" "#define CURL_DISABLE_TELNET 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070021376
21377 CURL_DISABLE_TELNET=1
21378
21379 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080021380 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21381printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021382 ;;
21383 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080021384else $as_nop
21385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21386printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021387
21388fi
21389
Elliott Hughesf344baa2021-12-07 09:12:34 -080021390{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support tftp" >&5
21391printf %s "checking whether to support tftp... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021392# Check whether --enable-tftp was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080021393if test ${enable_tftp+y}
21394then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021395 enableval=$enable_tftp; case "$enableval" in
21396 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080021397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21398printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021399
Elliott Hughesf344baa2021-12-07 09:12:34 -080021400printf "%s\n" "#define CURL_DISABLE_TFTP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070021401
21402 CURL_DISABLE_TFTP=1
21403
21404 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080021405 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21406printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021407 ;;
21408 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080021409else $as_nop
21410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21411printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021412
21413fi
21414
21415
Elliott Hughesf344baa2021-12-07 09:12:34 -080021416{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support pop3" >&5
21417printf %s "checking whether to support pop3... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021418# Check whether --enable-pop3 was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080021419if test ${enable_pop3+y}
21420then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021421 enableval=$enable_pop3; case "$enableval" in
21422 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080021423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21424printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021425
Elliott Hughesf344baa2021-12-07 09:12:34 -080021426printf "%s\n" "#define CURL_DISABLE_POP3 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070021427
21428 CURL_DISABLE_POP3=1
21429
21430 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080021431 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21432printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021433 ;;
21434 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080021435else $as_nop
21436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21437printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021438
21439fi
21440
21441
21442
Elliott Hughesf344baa2021-12-07 09:12:34 -080021443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support imap" >&5
21444printf %s "checking whether to support imap... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021445# Check whether --enable-imap was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080021446if test ${enable_imap+y}
21447then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021448 enableval=$enable_imap; case "$enableval" in
21449 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080021450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21451printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021452
Elliott Hughesf344baa2021-12-07 09:12:34 -080021453printf "%s\n" "#define CURL_DISABLE_IMAP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070021454
21455 CURL_DISABLE_IMAP=1
21456
21457 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080021458 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21459printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021460 ;;
21461 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080021462else $as_nop
21463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21464printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021465
21466fi
21467
21468
21469
Elliott Hughesf344baa2021-12-07 09:12:34 -080021470{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support smb" >&5
21471printf %s "checking whether to support smb... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021472# Check whether --enable-smb was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080021473if test ${enable_smb+y}
21474then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021475 enableval=$enable_smb; case "$enableval" in
21476 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080021477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21478printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021479
Elliott Hughesf344baa2021-12-07 09:12:34 -080021480printf "%s\n" "#define CURL_DISABLE_SMB 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070021481
21482 CURL_DISABLE_SMB=1
21483
21484 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080021485 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21486printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021487 ;;
21488 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080021489else $as_nop
21490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21491printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021492
21493fi
21494
21495
Elliott Hughesf344baa2021-12-07 09:12:34 -080021496{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support smtp" >&5
21497printf %s "checking whether to support smtp... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021498# Check whether --enable-smtp was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080021499if test ${enable_smtp+y}
21500then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021501 enableval=$enable_smtp; case "$enableval" in
21502 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080021503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21504printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021505
Elliott Hughesf344baa2021-12-07 09:12:34 -080021506printf "%s\n" "#define CURL_DISABLE_SMTP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070021507
21508 CURL_DISABLE_SMTP=1
21509
21510 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080021511 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21512printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021513 ;;
21514 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080021515else $as_nop
21516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21517printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021518
21519fi
21520
21521
Elliott Hughesf344baa2021-12-07 09:12:34 -080021522{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support gopher" >&5
21523printf %s "checking whether to support gopher... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021524# Check whether --enable-gopher was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080021525if test ${enable_gopher+y}
21526then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021527 enableval=$enable_gopher; case "$enableval" in
21528 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080021529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21530printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021531
Elliott Hughesf344baa2021-12-07 09:12:34 -080021532printf "%s\n" "#define CURL_DISABLE_GOPHER 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070021533
21534 CURL_DISABLE_GOPHER=1
21535
21536 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080021537 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21538printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021539 ;;
21540 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080021541else $as_nop
21542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21543printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021544
21545fi
21546
21547
Elliott Hughesf344baa2021-12-07 09:12:34 -080021548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support mqtt" >&5
21549printf %s "checking whether to support mqtt... " >&6; }
Haibo Huang24c77a12020-04-29 13:49:57 -070021550# Check whether --enable-mqtt was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080021551if test ${enable_mqtt+y}
21552then :
Haibo Huang24c77a12020-04-29 13:49:57 -070021553 enableval=$enable_mqtt; case "$enableval" in
21554 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080021555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21556printf "%s\n" "no" >&6; }
Haibo Huangb5a52b92020-10-28 22:18:23 -070021557
Elliott Hughesf344baa2021-12-07 09:12:34 -080021558printf "%s\n" "#define CURL_DISABLE_MQTT 1" >>confdefs.h
Haibo Huangb5a52b92020-10-28 22:18:23 -070021559
21560 CURL_DISABLE_MQTT=1
21561
Haibo Huang24c77a12020-04-29 13:49:57 -070021562 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080021563 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21564printf "%s\n" "yes" >&6; }
Haibo Huang24c77a12020-04-29 13:49:57 -070021565 ;;
21566 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080021567else $as_nop
21568 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21569printf "%s\n" "no" >&6; }
Haibo Huang24c77a12020-04-29 13:49:57 -070021570
21571fi
21572
Elliott Hughes82be86d2017-09-20 17:00:17 -070021573
21574
Elliott Hughesf344baa2021-12-07 09:12:34 -080021575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to provide built-in manual" >&5
21576printf %s "checking whether to provide built-in manual... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021577# Check whether --enable-manual was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080021578if test ${enable_manual+y}
21579then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021580 enableval=$enable_manual; case "$enableval" in
21581 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080021582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21583printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021584 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080021585 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21586printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021587 USE_MANUAL="1"
21588 ;;
21589 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080021590else $as_nop
21591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21592printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021593 USE_MANUAL="1"
21594
21595fi
21596
21597
Elliott Hughesf344baa2021-12-07 09:12:34 -080021598{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable generation of C code" >&5
21599printf %s "checking whether to enable generation of C code... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021600# Check whether --enable-libcurl_option was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080021601if test ${enable_libcurl_option+y}
21602then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021603 enableval=$enable_libcurl_option; case "$enableval" in
21604 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080021605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21606printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021607
Elliott Hughesf344baa2021-12-07 09:12:34 -080021608printf "%s\n" "#define CURL_DISABLE_LIBCURL_OPTION 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070021609
21610 curl_libcurl_msg="no"
21611 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080021612 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21613printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021614 ;;
21615 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080021616else $as_nop
21617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21618printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021619
21620fi
21621
21622
21623
Elliott Hughesf344baa2021-12-07 09:12:34 -080021624{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use libgcc" >&5
21625printf %s "checking whether to use libgcc... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021626# Check whether --enable-libgcc was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080021627if test ${enable_libgcc+y}
21628then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021629 enableval=$enable_libgcc; case "$enableval" in
21630 yes)
21631 LIBS="-lgcc $LIBS"
Elliott Hughesf344baa2021-12-07 09:12:34 -080021632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21633printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021634 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080021635 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21636printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021637 ;;
21638 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080021639else $as_nop
21640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21641printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021642
21643fi
21644
21645
21646
Elliott Hughesf344baa2021-12-07 09:12:34 -080021647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X/Open network library is required" >&5
21648printf %s "checking if X/Open network library is required... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021649 tst_lib_xnet_required="no"
21650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21651/* end confdefs.h. */
21652
21653
21654int main (void)
21655{
21656#if defined(__hpux) && defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 600)
21657 return 0;
21658#elif defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
21659 return 0;
21660#else
21661 force compilation error
21662#endif
21663}
21664
21665
21666_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080021667if ac_fn_c_try_compile "$LINENO"
21668then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021669
21670 tst_lib_xnet_required="yes"
21671 LIBS="-lxnet $LIBS"
21672
21673fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080021674rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tst_lib_xnet_required" >&5
21676printf "%s\n" "$tst_lib_xnet_required" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021677
21678
21679ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Elliott Hughesf344baa2021-12-07 09:12:34 -080021680if test "x$ac_cv_func_gethostbyname" = xyes
21681then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021682 HAVE_GETHOSTBYNAME="1"
21683
Elliott Hughesf344baa2021-12-07 09:12:34 -080021684else $as_nop
21685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
21686printf %s "checking for gethostbyname in -lnsl... " >&6; }
21687if test ${ac_cv_lib_nsl_gethostbyname+y}
21688then :
21689 printf %s "(cached) " >&6
21690else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070021691 ac_check_lib_save_LIBS=$LIBS
21692LIBS="-lnsl $LIBS"
21693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21694/* end confdefs.h. */
21695
21696
21697#ifdef __cplusplus
21698extern "C"
21699#endif
21700char gethostbyname ();
21701int main (void)
21702{
21703return gethostbyname ();
21704 ;
21705 return 0;
21706}
21707_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080021708if ac_fn_c_try_link "$LINENO"
21709then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021710 ac_cv_lib_nsl_gethostbyname=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080021711else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070021712 ac_cv_lib_nsl_gethostbyname=no
21713fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080021714rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070021715 conftest$ac_exeext conftest.$ac_ext
21716LIBS=$ac_check_lib_save_LIBS
21717fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080021718{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
21719printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
21720if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
21721then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021722 HAVE_GETHOSTBYNAME="1"
21723 LIBS="-lnsl $LIBS"
21724
21725fi
21726
21727
21728fi
21729
21730
21731if test "$HAVE_GETHOSTBYNAME" != "1"
21732then
Elliott Hughesf344baa2021-12-07 09:12:34 -080021733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5
21734printf %s "checking for gethostbyname in -lsocket... " >&6; }
21735if test ${ac_cv_lib_socket_gethostbyname+y}
21736then :
21737 printf %s "(cached) " >&6
21738else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070021739 ac_check_lib_save_LIBS=$LIBS
21740LIBS="-lsocket $LIBS"
21741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21742/* end confdefs.h. */
21743
21744
21745#ifdef __cplusplus
21746extern "C"
21747#endif
21748char gethostbyname ();
21749int main (void)
21750{
21751return gethostbyname ();
21752 ;
21753 return 0;
21754}
21755_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080021756if ac_fn_c_try_link "$LINENO"
21757then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021758 ac_cv_lib_socket_gethostbyname=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080021759else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070021760 ac_cv_lib_socket_gethostbyname=no
21761fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080021762rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070021763 conftest$ac_exeext conftest.$ac_ext
21764LIBS=$ac_check_lib_save_LIBS
21765fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080021766{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyname" >&5
21767printf "%s\n" "$ac_cv_lib_socket_gethostbyname" >&6; }
21768if test "x$ac_cv_lib_socket_gethostbyname" = xyes
21769then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021770 HAVE_GETHOSTBYNAME="1"
21771 LIBS="-lsocket $LIBS"
21772
21773fi
21774
21775fi
21776
21777if test "$HAVE_GETHOSTBYNAME" != "1"
21778then
Elliott Hughesf344baa2021-12-07 09:12:34 -080021779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lwatt" >&5
21780printf %s "checking for gethostbyname in -lwatt... " >&6; }
21781if test ${ac_cv_lib_watt_gethostbyname+y}
21782then :
21783 printf %s "(cached) " >&6
21784else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070021785 ac_check_lib_save_LIBS=$LIBS
21786LIBS="-lwatt $LIBS"
21787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21788/* end confdefs.h. */
21789
21790
21791#ifdef __cplusplus
21792extern "C"
21793#endif
21794char gethostbyname ();
21795int main (void)
21796{
21797return gethostbyname ();
21798 ;
21799 return 0;
21800}
21801_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080021802if ac_fn_c_try_link "$LINENO"
21803then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021804 ac_cv_lib_watt_gethostbyname=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080021805else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070021806 ac_cv_lib_watt_gethostbyname=no
21807fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080021808rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070021809 conftest$ac_exeext conftest.$ac_ext
21810LIBS=$ac_check_lib_save_LIBS
21811fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080021812{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_watt_gethostbyname" >&5
21813printf "%s\n" "$ac_cv_lib_watt_gethostbyname" >&6; }
21814if test "x$ac_cv_lib_watt_gethostbyname" = xyes
21815then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021816 HAVE_GETHOSTBYNAME="1"
21817 CPPFLAGS="-I/dev/env/WATT_ROOT/inc"
21818 LDFLAGS="-L/dev/env/WATT_ROOT/lib"
21819 LIBS="-lwatt $LIBS"
21820
21821fi
21822
21823fi
21824
21825if test "$HAVE_GETHOSTBYNAME" != "1"
21826then
Elliott Hughesf344baa2021-12-07 09:12:34 -080021827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname with both nsl and socket libs" >&5
21828printf %s "checking for gethostbyname with both nsl and socket libs... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021829 my_ac_save_LIBS=$LIBS
21830 LIBS="-lnsl -lsocket $LIBS"
21831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21832/* end confdefs.h. */
21833
21834
21835
21836int main (void)
21837{
21838
21839 gethostbyname();
21840
21841 ;
21842 return 0;
21843}
21844
21845_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080021846if ac_fn_c_try_link "$LINENO"
21847then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021848
Elliott Hughesf344baa2021-12-07 09:12:34 -080021849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21850printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021851 HAVE_GETHOSTBYNAME="1"
21852
Elliott Hughesf344baa2021-12-07 09:12:34 -080021853else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070021854
Elliott Hughesf344baa2021-12-07 09:12:34 -080021855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21856printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021857 LIBS=$my_ac_save_LIBS
21858
21859fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080021860rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070021861 conftest$ac_exeext conftest.$ac_ext
21862fi
21863
21864if test "$HAVE_GETHOSTBYNAME" != "1"
21865then
21866 if test "$curl_cv_header_windows_h" = "yes"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070021867 if test "$curl_cv_header_winsock2_h" = "yes"; then
21868 winsock_LIB="-lws2_32"
21869 fi
21870 if test ! -z "$winsock_LIB"; then
21871 my_ac_save_LIBS=$LIBS
21872 LIBS="$winsock_LIB $LIBS"
Elliott Hughesf344baa2021-12-07 09:12:34 -080021873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in $winsock_LIB" >&5
21874printf %s "checking for gethostbyname in $winsock_LIB... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21876/* end confdefs.h. */
21877
21878
21879#ifdef HAVE_WINDOWS_H
21880#ifndef WIN32_LEAN_AND_MEAN
21881#define WIN32_LEAN_AND_MEAN
21882#endif
21883#include <windows.h>
21884#ifdef HAVE_WINSOCK2_H
21885#include <winsock2.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070021886#endif
21887#endif
21888
21889int main (void)
21890{
21891
21892 gethostbyname("www.dummysite.com");
21893
21894 ;
21895 return 0;
21896}
21897
21898_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080021899if ac_fn_c_try_link "$LINENO"
21900then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021901
Elliott Hughesf344baa2021-12-07 09:12:34 -080021902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21903printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021904 HAVE_GETHOSTBYNAME="1"
21905
Elliott Hughesf344baa2021-12-07 09:12:34 -080021906else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070021907
Elliott Hughesf344baa2021-12-07 09:12:34 -080021908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21909printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021910 winsock_LIB=""
21911 LIBS=$my_ac_save_LIBS
21912
21913fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080021914rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070021915 conftest$ac_exeext conftest.$ac_ext
21916 fi
21917 fi
21918fi
21919
21920if test "$HAVE_GETHOSTBYNAME" != "1"
21921then
Elliott Hughesf344baa2021-12-07 09:12:34 -080021922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname for Minix 3" >&5
21923printf %s "checking for gethostbyname for Minix 3... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21925/* end confdefs.h. */
21926
21927
21928/* Older Minix versions may need <net/gen/netdb.h> here instead */
21929#include <netdb.h>
21930
21931int main (void)
21932{
21933
21934 gethostbyname("www.dummysite.com");
21935
21936 ;
21937 return 0;
21938}
21939
21940_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080021941if ac_fn_c_try_link "$LINENO"
21942then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021943
Elliott Hughesf344baa2021-12-07 09:12:34 -080021944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21945printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021946 HAVE_GETHOSTBYNAME="1"
21947
Elliott Hughesf344baa2021-12-07 09:12:34 -080021948else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070021949
Elliott Hughesf344baa2021-12-07 09:12:34 -080021950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21951printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021952
21953fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080021954rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070021955 conftest$ac_exeext conftest.$ac_ext
21956fi
21957
21958if test "$HAVE_GETHOSTBYNAME" != "1"
21959then
Elliott Hughesf344baa2021-12-07 09:12:34 -080021960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname for eCos" >&5
21961printf %s "checking for gethostbyname for eCos... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21963/* end confdefs.h. */
21964
21965
21966#include <stdio.h>
21967#include <netdb.h>
21968
21969int main (void)
21970{
21971
21972 gethostbyname("www.dummysite.com");
21973
21974 ;
21975 return 0;
21976}
21977
21978_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080021979if ac_fn_c_try_link "$LINENO"
21980then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070021981
Elliott Hughesf344baa2021-12-07 09:12:34 -080021982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21983printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021984 HAVE_GETHOSTBYNAME="1"
21985
Elliott Hughesf344baa2021-12-07 09:12:34 -080021986else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070021987
Elliott Hughesf344baa2021-12-07 09:12:34 -080021988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21989printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070021990
21991fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080021992rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070021993 conftest$ac_exeext conftest.$ac_ext
21994fi
21995
Elliott Hughes34dd5f42021-08-10 13:01:18 -070021996if test "$HAVE_GETHOSTBYNAME" != "1" -o "${with_amissl+set}" = set
Elliott Hughes82be86d2017-09-20 17:00:17 -070021997then
Elliott Hughesf344baa2021-12-07 09:12:34 -080021998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname for AmigaOS bsdsocket.library" >&5
21999printf %s "checking for gethostbyname for AmigaOS bsdsocket.library... " >&6; }
Haibo Huang65021c72019-03-27 15:37:23 -070022000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22001/* end confdefs.h. */
22002
22003
Elliott Hughes34dd5f42021-08-10 13:01:18 -070022004 #include <proto/bsdsocket.h>
22005 struct Library *SocketBase = NULL;
Haibo Huang65021c72019-03-27 15:37:23 -070022006
22007int main (void)
22008{
22009
22010 gethostbyname("www.dummysite.com");
22011
22012 ;
22013 return 0;
22014}
22015
22016_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080022017if ac_fn_c_try_link "$LINENO"
22018then :
Haibo Huang65021c72019-03-27 15:37:23 -070022019
Elliott Hughesf344baa2021-12-07 09:12:34 -080022020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22021printf "%s\n" "yes" >&6; }
Haibo Huang65021c72019-03-27 15:37:23 -070022022 HAVE_GETHOSTBYNAME="1"
22023 HAVE_PROTO_BSDSOCKET_H="1"
22024
Elliott Hughesf344baa2021-12-07 09:12:34 -080022025printf "%s\n" "#define HAVE_PROTO_BSDSOCKET_H 1" >>confdefs.h
Haibo Huang65021c72019-03-27 15:37:23 -070022026
22027 HAVE_PROTO_BSDSOCKET_H=1
22028
22029
Elliott Hughesf344baa2021-12-07 09:12:34 -080022030else $as_nop
Haibo Huang65021c72019-03-27 15:37:23 -070022031
Elliott Hughesf344baa2021-12-07 09:12:34 -080022032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22033printf "%s\n" "no" >&6; }
Haibo Huang65021c72019-03-27 15:37:23 -070022034
22035fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080022036rm -f core conftest.err conftest.$ac_objext conftest.beam \
Haibo Huang65021c72019-03-27 15:37:23 -070022037 conftest$ac_exeext conftest.$ac_ext
22038fi
22039
22040if test "$HAVE_GETHOSTBYNAME" != "1"
22041then
Elliott Hughesf344baa2021-12-07 09:12:34 -080022042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnetwork" >&5
22043printf %s "checking for gethostbyname in -lnetwork... " >&6; }
22044if test ${ac_cv_lib_network_gethostbyname+y}
22045then :
22046 printf %s "(cached) " >&6
22047else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022048 ac_check_lib_save_LIBS=$LIBS
22049LIBS="-lnetwork $LIBS"
22050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22051/* end confdefs.h. */
22052
22053
22054#ifdef __cplusplus
22055extern "C"
22056#endif
22057char gethostbyname ();
22058int main (void)
22059{
22060return gethostbyname ();
22061 ;
22062 return 0;
22063}
22064_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080022065if ac_fn_c_try_link "$LINENO"
22066then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070022067 ac_cv_lib_network_gethostbyname=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080022068else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022069 ac_cv_lib_network_gethostbyname=no
22070fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080022071rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070022072 conftest$ac_exeext conftest.$ac_ext
22073LIBS=$ac_check_lib_save_LIBS
22074fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080022075{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_gethostbyname" >&5
22076printf "%s\n" "$ac_cv_lib_network_gethostbyname" >&6; }
22077if test "x$ac_cv_lib_network_gethostbyname" = xyes
22078then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070022079 HAVE_GETHOSTBYNAME="1"
22080 LIBS="-lnetwork $LIBS"
22081
22082fi
22083
22084fi
22085
22086if test "$HAVE_GETHOSTBYNAME" != "1"
22087then
Elliott Hughesf344baa2021-12-07 09:12:34 -080022088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnet" >&5
22089printf %s "checking for gethostbyname in -lnet... " >&6; }
22090if test ${ac_cv_lib_net_gethostbyname+y}
22091then :
22092 printf %s "(cached) " >&6
22093else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022094 ac_check_lib_save_LIBS=$LIBS
22095LIBS="-lnet $LIBS"
22096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22097/* end confdefs.h. */
22098
22099
22100#ifdef __cplusplus
22101extern "C"
22102#endif
22103char gethostbyname ();
22104int main (void)
22105{
22106return gethostbyname ();
22107 ;
22108 return 0;
22109}
22110_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080022111if ac_fn_c_try_link "$LINENO"
22112then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070022113 ac_cv_lib_net_gethostbyname=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080022114else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022115 ac_cv_lib_net_gethostbyname=no
22116fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080022117rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070022118 conftest$ac_exeext conftest.$ac_ext
22119LIBS=$ac_check_lib_save_LIBS
22120fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080022121{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_gethostbyname" >&5
22122printf "%s\n" "$ac_cv_lib_net_gethostbyname" >&6; }
22123if test "x$ac_cv_lib_net_gethostbyname" = xyes
22124then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070022125 HAVE_GETHOSTBYNAME="1"
22126 LIBS="-lnet $LIBS"
22127
22128fi
22129
22130fi
22131
22132
22133if test "$HAVE_GETHOSTBYNAME" != "1"; then
22134 as_fn_error $? "couldn't find libraries for gethostbyname()" "$LINENO" 5
22135fi
22136
22137
22138curl_includes_winsock2="\
22139/* includes start */
22140#ifdef HAVE_WINDOWS_H
22141# ifndef WIN32_LEAN_AND_MEAN
22142# define WIN32_LEAN_AND_MEAN
22143# endif
22144# include <windows.h>
22145# ifdef HAVE_WINSOCK2_H
22146# include <winsock2.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070022147# endif
22148#endif
22149/* includes end */"
22150
Elliott Hughesf344baa2021-12-07 09:12:34 -080022151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for windows.h" >&5
22152printf %s "checking for windows.h... " >&6; }
22153if test ${curl_cv_header_windows_h+y}
22154then :
22155 printf %s "(cached) " >&6
22156else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022157
22158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22159/* end confdefs.h. */
22160
22161
22162#undef inline
22163#ifndef WIN32_LEAN_AND_MEAN
22164#define WIN32_LEAN_AND_MEAN
22165#endif
22166#include <windows.h>
22167
22168int main (void)
22169{
22170
22171#if defined(__CYGWIN__) || defined(__CEGCC__)
22172 HAVE_WINDOWS_H shall not be defined.
22173#else
22174 int dummy=2*WINVER;
22175#endif
22176
22177 ;
22178 return 0;
22179}
22180
22181_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080022182if ac_fn_c_try_compile "$LINENO"
22183then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070022184
22185 curl_cv_header_windows_h="yes"
22186
Elliott Hughesf344baa2021-12-07 09:12:34 -080022187else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022188
22189 curl_cv_header_windows_h="no"
22190
22191fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080022192rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070022193
22194fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080022195{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_windows_h" >&5
22196printf "%s\n" "$curl_cv_header_windows_h" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022197 case "$curl_cv_header_windows_h" in
22198 yes)
22199
Elliott Hughesf344baa2021-12-07 09:12:34 -080022200printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070022201
22202 ;;
22203 esac
22204
22205
Elliott Hughesf344baa2021-12-07 09:12:34 -080022206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for winsock2.h" >&5
22207printf %s "checking for winsock2.h... " >&6; }
22208if test ${curl_cv_header_winsock2_h+y}
22209then :
22210 printf %s "(cached) " >&6
22211else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022212
22213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22214/* end confdefs.h. */
22215
22216
22217#undef inline
22218#ifndef WIN32_LEAN_AND_MEAN
22219#define WIN32_LEAN_AND_MEAN
22220#endif
22221#include <windows.h>
22222#include <winsock2.h>
22223
22224int main (void)
22225{
22226
22227#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__)
22228 HAVE_WINSOCK2_H shall not be defined.
22229#else
22230 int dummy=2*IPPROTO_ESP;
22231#endif
22232
22233 ;
22234 return 0;
22235}
22236
22237_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080022238if ac_fn_c_try_compile "$LINENO"
22239then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070022240
22241 curl_cv_header_winsock2_h="yes"
22242
Elliott Hughesf344baa2021-12-07 09:12:34 -080022243else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022244
22245 curl_cv_header_winsock2_h="no"
22246
22247fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080022248rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070022249
22250fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080022251{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winsock2_h" >&5
22252printf "%s\n" "$curl_cv_header_winsock2_h" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022253 case "$curl_cv_header_winsock2_h" in
22254 yes)
22255
Elliott Hughesf344baa2021-12-07 09:12:34 -080022256printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070022257
22258 ;;
22259 esac
22260
22261
22262
Haibo Huang65021c72019-03-27 15:37:23 -070022263curl_includes_bsdsocket="\
22264/* includes start */
22265#ifdef HAVE_PROTO_BSDSOCKET_H
22266# include <proto/bsdsocket.h>
22267 struct Library *SocketBase = NULL;
22268#endif
22269/* includes end */"
Haibo Huang65021c72019-03-27 15:37:23 -070022270 ac_fn_c_check_header_compile "$LINENO" "proto/bsdsocket.h" "ac_cv_header_proto_bsdsocket_h" " $curl_includes_bsdsocket
22271"
Elliott Hughesf344baa2021-12-07 09:12:34 -080022272if test "x$ac_cv_header_proto_bsdsocket_h" = xyes
22273then :
22274 printf "%s\n" "#define HAVE_PROTO_BSDSOCKET_H 1" >>confdefs.h
Haibo Huang65021c72019-03-27 15:37:23 -070022275
22276fi
22277
Haibo Huang65021c72019-03-27 15:37:23 -070022278
22279
Elliott Hughesf344baa2021-12-07 09:12:34 -080022280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for connect in libraries" >&5
22281printf %s "checking for connect in libraries... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022282 tst_connect_save_LIBS="$LIBS"
22283 tst_connect_need_LIBS="unknown"
22284 for tst_lib in '' '-lsocket' ; do
22285 if test "$tst_connect_need_LIBS" = "unknown"; then
22286 LIBS="$tst_lib $tst_connect_save_LIBS"
22287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22288/* end confdefs.h. */
22289
22290
22291 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070022292 $curl_includes_bsdsocket
22293 #if !defined(HAVE_WINDOWS_H) && !defined(HAVE_PROTO_BSDSOCKET_H)
Elliott Hughes82be86d2017-09-20 17:00:17 -070022294 int connect(int, void*, int);
22295 #endif
22296
22297int main (void)
22298{
22299
22300 if(0 != connect(0, 0, 0))
22301 return 1;
22302
22303 ;
22304 return 0;
22305}
22306
22307_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080022308if ac_fn_c_try_link "$LINENO"
22309then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070022310
22311 tst_connect_need_LIBS="$tst_lib"
22312
22313fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080022314rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070022315 conftest$ac_exeext conftest.$ac_ext
22316 fi
22317 done
22318 LIBS="$tst_connect_save_LIBS"
22319 #
22320 case X-"$tst_connect_need_LIBS" in
22321 X-unknown)
Elliott Hughesf344baa2021-12-07 09:12:34 -080022322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot find connect" >&5
22323printf "%s\n" "cannot find connect" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022324 as_fn_error $? "cannot find connect function in libraries." "$LINENO" 5
22325 ;;
22326 X-)
Elliott Hughesf344baa2021-12-07 09:12:34 -080022327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22328printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022329 ;;
22330 *)
Elliott Hughesf344baa2021-12-07 09:12:34 -080022331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tst_connect_need_LIBS" >&5
22332printf "%s\n" "$tst_connect_need_LIBS" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022333 LIBS="$tst_connect_need_LIBS $tst_connect_save_LIBS"
22334 ;;
22335 esac
22336
22337
22338CURL_NETWORK_LIBS=$LIBS
22339
Elliott Hughes82be86d2017-09-20 17:00:17 -070022340
Elliott Hughesf344baa2021-12-07 09:12:34 -080022341 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
22342if test "x$ac_cv_header_sys_types_h" = xyes
22343then :
22344 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
22345
22346fi
22347ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
22348if test "x$ac_cv_header_sys_time_h" = xyes
22349then :
22350 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070022351
22352fi
22353
Elliott Hughesf344baa2021-12-07 09:12:34 -080022354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for monotonic clock_gettime" >&5
22355printf %s "checking for monotonic clock_gettime... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022356 #
22357 if test "x$dontwant_rt" = "xno" ; then
22358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22359/* end confdefs.h. */
22360
22361
22362#ifdef HAVE_SYS_TYPES_H
22363#include <sys/types.h>
22364#endif
22365#ifdef HAVE_SYS_TIME_H
22366#include <sys/time.h>
Elliott Hughes34dd5f42021-08-10 13:01:18 -070022367#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070022368#include <time.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070022369
22370int main (void)
22371{
22372
22373 struct timespec ts;
22374 (void)clock_gettime(CLOCK_MONOTONIC, &ts);
22375
22376 ;
22377 return 0;
22378}
22379
22380_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080022381if ac_fn_c_try_compile "$LINENO"
22382then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070022383
Elliott Hughesf344baa2021-12-07 09:12:34 -080022384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22385printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022386 curl_func_clock_gettime="yes"
22387
Elliott Hughesf344baa2021-12-07 09:12:34 -080022388else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022389
Elliott Hughesf344baa2021-12-07 09:12:34 -080022390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22391printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022392 curl_func_clock_gettime="no"
22393
22394fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080022395rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070022396 fi
22397
22398
22399 #
22400 if test "$curl_func_clock_gettime" = "yes"; then
22401 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080022402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in libraries" >&5
22403printf %s "checking for clock_gettime in libraries... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022404 #
22405 curl_cv_save_LIBS="$LIBS"
22406 curl_cv_gclk_LIBS="unknown"
22407 #
22408 for x_xlibs in '' '-lrt' '-lposix4' ; do
22409 if test "$curl_cv_gclk_LIBS" = "unknown"; then
22410 if test -z "$x_xlibs"; then
22411 LIBS="$curl_cv_save_LIBS"
22412 else
22413 LIBS="$x_xlibs $curl_cv_save_LIBS"
22414 fi
22415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22416/* end confdefs.h. */
22417
22418
22419#ifdef HAVE_SYS_TYPES_H
22420#include <sys/types.h>
22421#endif
22422#ifdef HAVE_SYS_TIME_H
22423#include <sys/time.h>
Elliott Hughes34dd5f42021-08-10 13:01:18 -070022424#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070022425#include <time.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070022426
22427int main (void)
22428{
22429
22430 struct timespec ts;
22431 (void)clock_gettime(CLOCK_MONOTONIC, &ts);
22432
22433 ;
22434 return 0;
22435}
22436
22437_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080022438if ac_fn_c_try_link "$LINENO"
22439then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070022440
22441 curl_cv_gclk_LIBS="$x_xlibs"
22442
22443fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080022444rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070022445 conftest$ac_exeext conftest.$ac_ext
22446 fi
22447 done
22448 #
22449 LIBS="$curl_cv_save_LIBS"
22450 #
22451 case X-"$curl_cv_gclk_LIBS" in
22452 X-unknown)
Elliott Hughesf344baa2021-12-07 09:12:34 -080022453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot find clock_gettime" >&5
22454printf "%s\n" "cannot find clock_gettime" >&6; }
22455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&5
22456printf "%s\n" "$as_me: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070022457 curl_func_clock_gettime="no"
22458 ;;
22459 X-)
Elliott Hughesf344baa2021-12-07 09:12:34 -080022460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no additional lib required" >&5
22461printf "%s\n" "no additional lib required" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022462 curl_func_clock_gettime="yes"
22463 ;;
22464 *)
22465 if test -z "$curl_cv_save_LIBS"; then
22466 LIBS="$curl_cv_gclk_LIBS"
22467 else
22468 LIBS="$curl_cv_gclk_LIBS $curl_cv_save_LIBS"
22469 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080022470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_gclk_LIBS" >&5
22471printf "%s\n" "$curl_cv_gclk_LIBS" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022472 curl_func_clock_gettime="yes"
22473 ;;
22474 esac
22475 #
22476 if test "x$cross_compiling" != "xyes" &&
22477 test "$curl_func_clock_gettime" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080022478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if monotonic clock_gettime works" >&5
22479printf %s "checking if monotonic clock_gettime works... " >&6; }
Elliott Hughesa93fb052018-12-12 14:22:48 -080022480
Elliott Hughesa93fb052018-12-12 14:22:48 -080022481 old=$LD_LIBRARY_PATH
22482 LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
22483 export LD_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080022484 if test "$cross_compiling" = yes
22485then :
22486 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22487printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070022488as_fn_error $? "cannot run test program while cross compiling
22489See \`config.log' for more details" "$LINENO" 5; }
Elliott Hughesf344baa2021-12-07 09:12:34 -080022490else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22492/* end confdefs.h. */
22493
22494
22495#ifdef HAVE_STDLIB_H
22496#include <stdlib.h>
22497#endif
22498#ifdef HAVE_SYS_TYPES_H
22499#include <sys/types.h>
22500#endif
22501#ifdef HAVE_SYS_TIME_H
22502#include <sys/time.h>
Elliott Hughes34dd5f42021-08-10 13:01:18 -070022503#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070022504#include <time.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070022505
22506int main (void)
22507{
22508
22509 struct timespec ts;
22510 if (0 == clock_gettime(CLOCK_MONOTONIC, &ts))
22511 exit(0);
22512 else
22513 exit(1);
22514
22515 ;
22516 return 0;
22517}
22518
22519_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080022520if ac_fn_c_try_run "$LINENO"
22521then :
22522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22523printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022524
Elliott Hughesf344baa2021-12-07 09:12:34 -080022525else $as_nop
22526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22527printf "%s\n" "no" >&6; }
22528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&5
22529printf "%s\n" "$as_me: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070022530 curl_func_clock_gettime="no"
22531 LIBS="$curl_cv_save_LIBS"
22532
22533fi
22534rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22535 conftest.$ac_objext conftest.beam conftest.$ac_ext
22536fi
22537
Elliott Hughesa93fb052018-12-12 14:22:48 -080022538 LD_LIBRARY_PATH=$old # restore
22539
Elliott Hughes82be86d2017-09-20 17:00:17 -070022540 fi
22541 #
22542 case "$curl_func_clock_gettime" in
22543 yes)
22544
Elliott Hughesf344baa2021-12-07 09:12:34 -080022545printf "%s\n" "#define HAVE_CLOCK_GETTIME_MONOTONIC 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070022546
22547 ;;
22548 esac
22549 #
22550 fi
22551 #
22552
22553
22554CURL_NETWORK_AND_TIME_LIBS=$LIBS
22555
22556
22557
22558clean_CPPFLAGS=$CPPFLAGS
22559clean_LDFLAGS=$LDFLAGS
22560clean_LIBS=$LIBS
22561ZLIB_LIBS=""
22562
22563# Check whether --with-zlib was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080022564if test ${with_zlib+y}
22565then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070022566 withval=$with_zlib; OPT_ZLIB="$withval"
22567fi
22568
22569
22570if test "$OPT_ZLIB" = "no" ; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080022571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: zlib disabled" >&5
22572printf "%s\n" "$as_me: WARNING: zlib disabled" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070022573else
22574 if test "$OPT_ZLIB" = "yes" ; then
22575 OPT_ZLIB=""
22576 fi
22577
22578 if test -z "$OPT_ZLIB" ; then
22579
22580 if test -n "$PKG_CONFIG"; then
22581 PKGCONFIG="$PKG_CONFIG"
22582 else
22583 if test -n "$ac_tool_prefix"; then
22584 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22585set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080022586{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22587printf %s "checking for $ac_word... " >&6; }
22588if test ${ac_cv_path_PKGCONFIG+y}
22589then :
22590 printf %s "(cached) " >&6
22591else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022592 case $PKGCONFIG in
22593 [\\/]* | ?:[\\/]*)
22594 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
22595 ;;
22596 *)
22597 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22598as_dummy="$PATH:/usr/bin:/usr/local/bin"
22599for as_dir in $as_dummy
22600do
22601 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080022602 case $as_dir in #(((
22603 '') as_dir=./ ;;
22604 */) ;;
22605 *) as_dir=$as_dir/ ;;
22606 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070022607 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080022608 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
22609 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
22610 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070022611 break 2
22612 fi
22613done
22614 done
22615IFS=$as_save_IFS
22616
22617 ;;
22618esac
22619fi
22620PKGCONFIG=$ac_cv_path_PKGCONFIG
22621if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080022622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
22623printf "%s\n" "$PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022624else
Elliott Hughesf344baa2021-12-07 09:12:34 -080022625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22626printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022627fi
22628
22629
22630fi
22631if test -z "$ac_cv_path_PKGCONFIG"; then
22632 ac_pt_PKGCONFIG=$PKGCONFIG
22633 # Extract the first word of "pkg-config", so it can be a program name with args.
22634set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080022635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22636printf %s "checking for $ac_word... " >&6; }
22637if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
22638then :
22639 printf %s "(cached) " >&6
22640else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022641 case $ac_pt_PKGCONFIG in
22642 [\\/]* | ?:[\\/]*)
22643 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
22644 ;;
22645 *)
22646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22647as_dummy="$PATH:/usr/bin:/usr/local/bin"
22648for as_dir in $as_dummy
22649do
22650 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080022651 case $as_dir in #(((
22652 '') as_dir=./ ;;
22653 */) ;;
22654 *) as_dir=$as_dir/ ;;
22655 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070022656 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080022657 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
22658 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
22659 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070022660 break 2
22661 fi
22662done
22663 done
22664IFS=$as_save_IFS
22665
22666 ;;
22667esac
22668fi
22669ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
22670if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080022671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
22672printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022673else
Elliott Hughesf344baa2021-12-07 09:12:34 -080022674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22675printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022676fi
22677
22678 if test "x$ac_pt_PKGCONFIG" = x; then
22679 PKGCONFIG="no"
22680 else
22681 case $cross_compiling:$ac_tool_warned in
22682yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080022683{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22684printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070022685ac_tool_warned=yes ;;
22686esac
22687 PKGCONFIG=$ac_pt_PKGCONFIG
22688 fi
22689else
22690 PKGCONFIG="$ac_cv_path_PKGCONFIG"
22691fi
22692
22693 fi
22694
22695 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080022696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib options with pkg-config" >&5
22697printf %s "checking for zlib options with pkg-config... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022698 itexists=`
22699 if test -n ""; then
22700 PKG_CONFIG_LIBDIR=""
22701 export PKG_CONFIG_LIBDIR
22702 fi
22703 $PKGCONFIG --exists zlib >/dev/null 2>&1 && echo 1`
22704
22705 if test -z "$itexists"; then
22706 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080022707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22708printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022709 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080022710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
22711printf "%s\n" "found" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070022712 fi
22713 fi
22714
22715
22716 if test "$PKGCONFIG" != "no" ; then
22717 LIBS="`$PKGCONFIG --libs-only-l zlib` $LIBS"
22718 LDFLAGS="$LDFLAGS `$PKGCONFIG --libs-only-L zlib`"
22719 CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags-only-I zlib`"
22720 OPT_ZLIB=""
22721 HAVE_LIBZ="1"
22722 fi
22723
22724 if test -z "$HAVE_LIBZ"; then
22725
22726
Elliott Hughesf344baa2021-12-07 09:12:34 -080022727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inflateEnd in -lz" >&5
22728printf %s "checking for inflateEnd in -lz... " >&6; }
22729if test ${ac_cv_lib_z_inflateEnd+y}
22730then :
22731 printf %s "(cached) " >&6
22732else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022733 ac_check_lib_save_LIBS=$LIBS
22734LIBS="-lz $LIBS"
22735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22736/* end confdefs.h. */
22737
22738
22739#ifdef __cplusplus
22740extern "C"
22741#endif
22742char inflateEnd ();
22743int main (void)
22744{
22745return inflateEnd ();
22746 ;
22747 return 0;
22748}
22749_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080022750if ac_fn_c_try_link "$LINENO"
22751then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070022752 ac_cv_lib_z_inflateEnd=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080022753else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022754 ac_cv_lib_z_inflateEnd=no
22755fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080022756rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070022757 conftest$ac_exeext conftest.$ac_ext
22758LIBS=$ac_check_lib_save_LIBS
22759fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080022760{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateEnd" >&5
22761printf "%s\n" "$ac_cv_lib_z_inflateEnd" >&6; }
22762if test "x$ac_cv_lib_z_inflateEnd" = xyes
22763then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070022764 HAVE_LIBZ="1"
22765 LIBS="-lz $LIBS"
Elliott Hughesf344baa2021-12-07 09:12:34 -080022766else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022767 OPT_ZLIB="/usr/local"
22768fi
22769
22770 fi
22771 fi
22772
22773 if test -n "$OPT_ZLIB"; then
22774 CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
22775 LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
22776 fi
22777
Elliott Hughesf344baa2021-12-07 09:12:34 -080022778 ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
22779if test "x$ac_cv_header_zlib_h" = xyes
22780then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070022781
22782 HAVE_ZLIB_H="1"
22783 if test "$HAVE_LIBZ" != "1"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080022784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5
22785printf %s "checking for gzread in -lz... " >&6; }
22786if test ${ac_cv_lib_z_gzread+y}
22787then :
22788 printf %s "(cached) " >&6
22789else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022790 ac_check_lib_save_LIBS=$LIBS
22791LIBS="-lz $LIBS"
22792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22793/* end confdefs.h. */
22794
22795
22796#ifdef __cplusplus
22797extern "C"
22798#endif
22799char gzread ();
22800int main (void)
22801{
22802return gzread ();
22803 ;
22804 return 0;
22805}
22806_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080022807if ac_fn_c_try_link "$LINENO"
22808then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070022809 ac_cv_lib_z_gzread=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080022810else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022811 ac_cv_lib_z_gzread=no
22812fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080022813rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070022814 conftest$ac_exeext conftest.$ac_ext
22815LIBS=$ac_check_lib_save_LIBS
22816fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080022817{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5
22818printf "%s\n" "$ac_cv_lib_z_gzread" >&6; }
22819if test "x$ac_cv_lib_z_gzread" = xyes
22820then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070022821
22822 HAVE_LIBZ="1"
22823 LIBS="-lz $LIBS"
22824
Elliott Hughesf344baa2021-12-07 09:12:34 -080022825else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022826 CPPFLAGS=$clean_CPPFLAGS
22827 LDFLAGS=$clean_LDFLAGS
22828fi
22829
22830 fi
22831
Elliott Hughesf344baa2021-12-07 09:12:34 -080022832else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070022833
22834 CPPFLAGS=$clean_CPPFLAGS
22835 LDFLAGS=$clean_LDFLAGS
22836
22837fi
22838
22839
Elliott Hughes82be86d2017-09-20 17:00:17 -070022840 if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
22841 then
Elliott Hughesf344baa2021-12-07 09:12:34 -080022842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: configure found only the libz lib, not the header file!" >&5
22843printf "%s\n" "$as_me: WARNING: configure found only the libz lib, not the header file!" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070022844 HAVE_LIBZ=""
22845 CPPFLAGS=$clean_CPPFLAGS
22846 LDFLAGS=$clean_LDFLAGS
22847 LIBS=$clean_LIBS
22848 elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
22849 then
Elliott Hughesf344baa2021-12-07 09:12:34 -080022850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: configure found only the libz header file, not the lib!" >&5
22851printf "%s\n" "$as_me: WARNING: configure found only the libz header file, not the lib!" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070022852 CPPFLAGS=$clean_CPPFLAGS
22853 LDFLAGS=$clean_LDFLAGS
22854 LIBS=$clean_LIBS
22855 elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
22856 then
22857
22858
Elliott Hughesf344baa2021-12-07 09:12:34 -080022859printf "%s\n" "#define HAVE_ZLIB_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070022860
22861
Elliott Hughesf344baa2021-12-07 09:12:34 -080022862printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070022863
22864
22865 ZLIB_LIBS="-lz"
22866 LIBS="-lz $clean_LIBS"
22867
22868 AMFIXLIB="1"
Elliott Hughesf344baa2021-12-07 09:12:34 -080022869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: found both libz and libz.h header" >&5
22870printf "%s\n" "$as_me: found both libz and libz.h header" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070022871 curl_zlib_msg="enabled"
22872 fi
22873fi
22874
22875 if test x"$AMFIXLIB" = x1; then
22876 HAVE_LIBZ_TRUE=
22877 HAVE_LIBZ_FALSE='#'
22878else
22879 HAVE_LIBZ_TRUE='#'
22880 HAVE_LIBZ_FALSE=
22881fi
22882
22883
22884
22885
Alex Deymo486467e2017-12-19 19:04:07 +010022886
22887OPT_BROTLI=off
22888
22889# Check whether --with-brotli was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080022890if test ${with_brotli+y}
22891then :
Alex Deymo486467e2017-12-19 19:04:07 +010022892 withval=$with_brotli; OPT_BROTLI=$withval
22893fi
22894
22895
22896if test X"$OPT_BROTLI" != Xno; then
22897 CLEANLDFLAGS="$LDFLAGS"
22898 CLEANCPPFLAGS="$CPPFLAGS"
22899 CLEANLIBS="$LIBS"
22900
22901 case "$OPT_BROTLI" in
22902 yes)
22903
22904 if test -n "$PKG_CONFIG"; then
22905 PKGCONFIG="$PKG_CONFIG"
22906 else
22907 if test -n "$ac_tool_prefix"; then
22908 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22909set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080022910{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22911printf %s "checking for $ac_word... " >&6; }
22912if test ${ac_cv_path_PKGCONFIG+y}
22913then :
22914 printf %s "(cached) " >&6
22915else $as_nop
Alex Deymo486467e2017-12-19 19:04:07 +010022916 case $PKGCONFIG in
22917 [\\/]* | ?:[\\/]*)
22918 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
22919 ;;
22920 *)
22921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22922as_dummy="$PATH:/usr/bin:/usr/local/bin"
22923for as_dir in $as_dummy
22924do
22925 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080022926 case $as_dir in #(((
22927 '') as_dir=./ ;;
22928 */) ;;
22929 *) as_dir=$as_dir/ ;;
22930 esac
Alex Deymo486467e2017-12-19 19:04:07 +010022931 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080022932 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
22933 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
22934 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Alex Deymo486467e2017-12-19 19:04:07 +010022935 break 2
22936 fi
22937done
22938 done
22939IFS=$as_save_IFS
22940
22941 ;;
22942esac
22943fi
22944PKGCONFIG=$ac_cv_path_PKGCONFIG
22945if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080022946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
22947printf "%s\n" "$PKGCONFIG" >&6; }
Alex Deymo486467e2017-12-19 19:04:07 +010022948else
Elliott Hughesf344baa2021-12-07 09:12:34 -080022949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22950printf "%s\n" "no" >&6; }
Alex Deymo486467e2017-12-19 19:04:07 +010022951fi
22952
22953
22954fi
22955if test -z "$ac_cv_path_PKGCONFIG"; then
22956 ac_pt_PKGCONFIG=$PKGCONFIG
22957 # Extract the first word of "pkg-config", so it can be a program name with args.
22958set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080022959{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22960printf %s "checking for $ac_word... " >&6; }
22961if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
22962then :
22963 printf %s "(cached) " >&6
22964else $as_nop
Alex Deymo486467e2017-12-19 19:04:07 +010022965 case $ac_pt_PKGCONFIG in
22966 [\\/]* | ?:[\\/]*)
22967 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
22968 ;;
22969 *)
22970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22971as_dummy="$PATH:/usr/bin:/usr/local/bin"
22972for as_dir in $as_dummy
22973do
22974 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080022975 case $as_dir in #(((
22976 '') as_dir=./ ;;
22977 */) ;;
22978 *) as_dir=$as_dir/ ;;
22979 esac
Alex Deymo486467e2017-12-19 19:04:07 +010022980 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080022981 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
22982 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
22983 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Alex Deymo486467e2017-12-19 19:04:07 +010022984 break 2
22985 fi
22986done
22987 done
22988IFS=$as_save_IFS
22989
22990 ;;
22991esac
22992fi
22993ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
22994if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080022995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
22996printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Alex Deymo486467e2017-12-19 19:04:07 +010022997else
Elliott Hughesf344baa2021-12-07 09:12:34 -080022998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22999printf "%s\n" "no" >&6; }
Alex Deymo486467e2017-12-19 19:04:07 +010023000fi
23001
23002 if test "x$ac_pt_PKGCONFIG" = x; then
23003 PKGCONFIG="no"
23004 else
23005 case $cross_compiling:$ac_tool_warned in
23006yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080023007{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23008printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alex Deymo486467e2017-12-19 19:04:07 +010023009ac_tool_warned=yes ;;
23010esac
23011 PKGCONFIG=$ac_pt_PKGCONFIG
23012 fi
23013else
23014 PKGCONFIG="$ac_cv_path_PKGCONFIG"
23015fi
23016
23017 fi
23018
23019 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080023020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbrotlidec options with pkg-config" >&5
23021printf %s "checking for libbrotlidec options with pkg-config... " >&6; }
Alex Deymo486467e2017-12-19 19:04:07 +010023022 itexists=`
23023 if test -n ""; then
23024 PKG_CONFIG_LIBDIR=""
23025 export PKG_CONFIG_LIBDIR
23026 fi
23027 $PKGCONFIG --exists libbrotlidec >/dev/null 2>&1 && echo 1`
23028
23029 if test -z "$itexists"; then
23030 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080023031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23032printf "%s\n" "no" >&6; }
Alex Deymo486467e2017-12-19 19:04:07 +010023033 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080023034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
23035printf "%s\n" "found" >&6; }
Alex Deymo486467e2017-12-19 19:04:07 +010023036 fi
23037 fi
23038
23039
23040 if test "$PKGCONFIG" != "no" ; then
23041 LIB_BROTLI=`$PKGCONFIG --libs-only-l libbrotlidec`
23042 LD_BROTLI=`$PKGCONFIG --libs-only-L libbrotlidec`
23043 CPP_BROTLI=`$PKGCONFIG --cflags-only-I libbrotlidec`
23044 version=`$PKGCONFIG --modversion libbrotlidec`
Haibo Huangca2a8022020-07-10 20:17:42 -070023045 DIR_BROTLI=`echo $LD_BROTLI | $SED -e 's/^-L//'`
Alex Deymo486467e2017-12-19 19:04:07 +010023046 fi
23047
23048 ;;
23049 off)
23050 ;;
23051 *)
23052 PREFIX_BROTLI=$OPT_BROTLI
23053 ;;
23054 esac
23055
23056 if test -n "$PREFIX_BROTLI"; then
23057 LIB_BROTLI="-lbrotlidec"
23058 LD_BROTLI=-L${PREFIX_BROTLI}/lib$libsuff
23059 CPP_BROTLI=-I${PREFIX_BROTLI}/include
23060 DIR_BROTLI=${PREFIX_BROTLI}/lib$libsuff
23061 fi
23062
23063 LDFLAGS="$LDFLAGS $LD_BROTLI"
23064 CPPFLAGS="$CPPFLAGS $CPP_BROTLI"
23065 LIBS="$LIB_BROTLI $LIBS"
23066
Elliott Hughesf344baa2021-12-07 09:12:34 -080023067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BrotliDecoderDecompress in -lbrotlidec" >&5
23068printf %s "checking for BrotliDecoderDecompress in -lbrotlidec... " >&6; }
23069if test ${ac_cv_lib_brotlidec_BrotliDecoderDecompress+y}
23070then :
23071 printf %s "(cached) " >&6
23072else $as_nop
Alex Deymo486467e2017-12-19 19:04:07 +010023073 ac_check_lib_save_LIBS=$LIBS
23074LIBS="-lbrotlidec $LIBS"
23075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23076/* end confdefs.h. */
23077
23078
23079#ifdef __cplusplus
23080extern "C"
23081#endif
23082char BrotliDecoderDecompress ();
23083int main (void)
23084{
23085return BrotliDecoderDecompress ();
23086 ;
23087 return 0;
23088}
23089_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080023090if ac_fn_c_try_link "$LINENO"
23091then :
Alex Deymo486467e2017-12-19 19:04:07 +010023092 ac_cv_lib_brotlidec_BrotliDecoderDecompress=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080023093else $as_nop
Alex Deymo486467e2017-12-19 19:04:07 +010023094 ac_cv_lib_brotlidec_BrotliDecoderDecompress=no
23095fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023096rm -f core conftest.err conftest.$ac_objext conftest.beam \
Alex Deymo486467e2017-12-19 19:04:07 +010023097 conftest$ac_exeext conftest.$ac_ext
23098LIBS=$ac_check_lib_save_LIBS
23099fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_brotlidec_BrotliDecoderDecompress" >&5
23101printf "%s\n" "$ac_cv_lib_brotlidec_BrotliDecoderDecompress" >&6; }
23102if test "x$ac_cv_lib_brotlidec_BrotliDecoderDecompress" = xyes
23103then :
23104 printf "%s\n" "#define HAVE_LIBBROTLIDEC 1" >>confdefs.h
Alex Deymo486467e2017-12-19 19:04:07 +010023105
23106 LIBS="-lbrotlidec $LIBS"
23107
23108fi
23109
23110
Elliott Hughesf344baa2021-12-07 09:12:34 -080023111 for ac_header in brotli/decode.h
Alex Deymo486467e2017-12-19 19:04:07 +010023112do :
Elliott Hughesf344baa2021-12-07 09:12:34 -080023113 ac_fn_c_check_header_compile "$LINENO" "brotli/decode.h" "ac_cv_header_brotli_decode_h" "$ac_includes_default"
23114if test "x$ac_cv_header_brotli_decode_h" = xyes
23115then :
23116 printf "%s\n" "#define HAVE_BROTLI_DECODE_H 1" >>confdefs.h
Alex Deymo486467e2017-12-19 19:04:07 +010023117 curl_brotli_msg="enabled (libbrotlidec)"
23118 HAVE_BROTLI=1
23119
Elliott Hughesf344baa2021-12-07 09:12:34 -080023120printf "%s\n" "#define HAVE_BROTLI 1" >>confdefs.h
Alex Deymo486467e2017-12-19 19:04:07 +010023121
23122 HAVE_BROTLI=1
23123
23124
23125fi
23126
23127done
23128
Alex Deymo486467e2017-12-19 19:04:07 +010023129 if test X"$OPT_BROTLI" != Xoff &&
23130 test "$HAVE_BROTLI" != "1"; then
23131 as_fn_error $? "BROTLI libs and/or directories were not found where specified!" "$LINENO" 5
23132 fi
23133
23134 if test "$HAVE_BROTLI" = "1"; then
23135 if test -n "$DIR_BROTLI"; then
23136
23137 if test "x$cross_compiling" != "xyes"; then
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070023138 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_BROTLI"
23139 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080023140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_BROTLI to CURL_LIBRARY_PATH" >&5
23141printf "%s\n" "$as_me: Added $DIR_BROTLI to CURL_LIBRARY_PATH" >&6;}
Alex Deymo486467e2017-12-19 19:04:07 +010023142 fi
23143 fi
23144 else
23145 LDFLAGS=$CLEANLDFLAGS
23146 CPPFLAGS=$CLEANCPPFLAGS
23147 LIBS=$CLEANLIBS
23148 fi
23149fi
23150
23151
Haibo Huangc3c04f42020-08-19 13:00:07 -070023152OPT_ZSTD=off
23153
23154# Check whether --with-zstd was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080023155if test ${with_zstd+y}
23156then :
Haibo Huangc3c04f42020-08-19 13:00:07 -070023157 withval=$with_zstd; OPT_ZSTD=$withval
23158fi
23159
23160
23161if test X"$OPT_ZSTD" != Xno; then
23162 CLEANLDFLAGS="$LDFLAGS"
23163 CLEANCPPFLAGS="$CPPFLAGS"
23164 CLEANLIBS="$LIBS"
23165
23166 case "$OPT_ZSTD" in
23167 yes)
23168
23169 if test -n "$PKG_CONFIG"; then
23170 PKGCONFIG="$PKG_CONFIG"
23171 else
23172 if test -n "$ac_tool_prefix"; then
23173 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23174set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080023175{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23176printf %s "checking for $ac_word... " >&6; }
23177if test ${ac_cv_path_PKGCONFIG+y}
23178then :
23179 printf %s "(cached) " >&6
23180else $as_nop
Haibo Huangc3c04f42020-08-19 13:00:07 -070023181 case $PKGCONFIG in
23182 [\\/]* | ?:[\\/]*)
23183 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
23184 ;;
23185 *)
23186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23187as_dummy="$PATH:/usr/bin:/usr/local/bin"
23188for as_dir in $as_dummy
23189do
23190 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080023191 case $as_dir in #(((
23192 '') as_dir=./ ;;
23193 */) ;;
23194 *) as_dir=$as_dir/ ;;
23195 esac
Haibo Huangc3c04f42020-08-19 13:00:07 -070023196 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080023197 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
23198 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
23199 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Haibo Huangc3c04f42020-08-19 13:00:07 -070023200 break 2
23201 fi
23202done
23203 done
23204IFS=$as_save_IFS
23205
23206 ;;
23207esac
23208fi
23209PKGCONFIG=$ac_cv_path_PKGCONFIG
23210if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080023211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
23212printf "%s\n" "$PKGCONFIG" >&6; }
Haibo Huangc3c04f42020-08-19 13:00:07 -070023213else
Elliott Hughesf344baa2021-12-07 09:12:34 -080023214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23215printf "%s\n" "no" >&6; }
Haibo Huangc3c04f42020-08-19 13:00:07 -070023216fi
23217
23218
23219fi
23220if test -z "$ac_cv_path_PKGCONFIG"; then
23221 ac_pt_PKGCONFIG=$PKGCONFIG
23222 # Extract the first word of "pkg-config", so it can be a program name with args.
23223set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080023224{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23225printf %s "checking for $ac_word... " >&6; }
23226if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
23227then :
23228 printf %s "(cached) " >&6
23229else $as_nop
Haibo Huangc3c04f42020-08-19 13:00:07 -070023230 case $ac_pt_PKGCONFIG in
23231 [\\/]* | ?:[\\/]*)
23232 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
23233 ;;
23234 *)
23235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23236as_dummy="$PATH:/usr/bin:/usr/local/bin"
23237for as_dir in $as_dummy
23238do
23239 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080023240 case $as_dir in #(((
23241 '') as_dir=./ ;;
23242 */) ;;
23243 *) as_dir=$as_dir/ ;;
23244 esac
Haibo Huangc3c04f42020-08-19 13:00:07 -070023245 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080023246 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
23247 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
23248 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Haibo Huangc3c04f42020-08-19 13:00:07 -070023249 break 2
23250 fi
23251done
23252 done
23253IFS=$as_save_IFS
23254
23255 ;;
23256esac
23257fi
23258ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
23259if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080023260 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
23261printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Haibo Huangc3c04f42020-08-19 13:00:07 -070023262else
Elliott Hughesf344baa2021-12-07 09:12:34 -080023263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23264printf "%s\n" "no" >&6; }
Haibo Huangc3c04f42020-08-19 13:00:07 -070023265fi
23266
23267 if test "x$ac_pt_PKGCONFIG" = x; then
23268 PKGCONFIG="no"
23269 else
23270 case $cross_compiling:$ac_tool_warned in
23271yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080023272{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23273printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Haibo Huangc3c04f42020-08-19 13:00:07 -070023274ac_tool_warned=yes ;;
23275esac
23276 PKGCONFIG=$ac_pt_PKGCONFIG
23277 fi
23278else
23279 PKGCONFIG="$ac_cv_path_PKGCONFIG"
23280fi
23281
23282 fi
23283
23284 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080023285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libzstd options with pkg-config" >&5
23286printf %s "checking for libzstd options with pkg-config... " >&6; }
Haibo Huangc3c04f42020-08-19 13:00:07 -070023287 itexists=`
23288 if test -n ""; then
23289 PKG_CONFIG_LIBDIR=""
23290 export PKG_CONFIG_LIBDIR
23291 fi
23292 $PKGCONFIG --exists libzstd >/dev/null 2>&1 && echo 1`
23293
23294 if test -z "$itexists"; then
23295 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080023296 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23297printf "%s\n" "no" >&6; }
Haibo Huangc3c04f42020-08-19 13:00:07 -070023298 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080023299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
23300printf "%s\n" "found" >&6; }
Haibo Huangc3c04f42020-08-19 13:00:07 -070023301 fi
23302 fi
23303
23304
23305 if test "$PKGCONFIG" != "no" ; then
23306 LIB_ZSTD=`$PKGCONFIG --libs-only-l libzstd`
23307 LD_ZSTD=`$PKGCONFIG --libs-only-L libzstd`
23308 CPP_ZSTD=`$PKGCONFIG --cflags-only-I libzstd`
23309 version=`$PKGCONFIG --modversion libzstd`
23310 DIR_ZSTD=`echo $LD_ZSTD | $SED -e 's/-L//'`
23311 fi
23312
23313 ;;
23314 off)
23315 ;;
23316 *)
23317 PREFIX_ZSTD=$OPT_ZSTD
23318 ;;
23319 esac
23320
23321 if test -n "$PREFIX_ZSTD"; then
23322 LIB_ZSTD="-lzstd"
23323 LD_ZSTD=-L${PREFIX_ZSTD}/lib$libsuff
23324 CPP_ZSTD=-I${PREFIX_ZSTD}/include
23325 DIR_ZSTD=${PREFIX_ZSTD}/lib$libsuff
23326 fi
23327
23328 LDFLAGS="$LDFLAGS $LD_ZSTD"
23329 CPPFLAGS="$CPPFLAGS $CPP_ZSTD"
23330 LIBS="$LIB_ZSTD $LIBS"
23331
Elliott Hughesf344baa2021-12-07 09:12:34 -080023332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ZSTD_createDStream in -lzstd" >&5
23333printf %s "checking for ZSTD_createDStream in -lzstd... " >&6; }
23334if test ${ac_cv_lib_zstd_ZSTD_createDStream+y}
23335then :
23336 printf %s "(cached) " >&6
23337else $as_nop
Haibo Huangc3c04f42020-08-19 13:00:07 -070023338 ac_check_lib_save_LIBS=$LIBS
23339LIBS="-lzstd $LIBS"
23340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23341/* end confdefs.h. */
23342
23343
23344#ifdef __cplusplus
23345extern "C"
23346#endif
23347char ZSTD_createDStream ();
23348int main (void)
23349{
23350return ZSTD_createDStream ();
23351 ;
23352 return 0;
23353}
23354_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080023355if ac_fn_c_try_link "$LINENO"
23356then :
Haibo Huangc3c04f42020-08-19 13:00:07 -070023357 ac_cv_lib_zstd_ZSTD_createDStream=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080023358else $as_nop
Haibo Huangc3c04f42020-08-19 13:00:07 -070023359 ac_cv_lib_zstd_ZSTD_createDStream=no
23360fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023361rm -f core conftest.err conftest.$ac_objext conftest.beam \
Haibo Huangc3c04f42020-08-19 13:00:07 -070023362 conftest$ac_exeext conftest.$ac_ext
23363LIBS=$ac_check_lib_save_LIBS
23364fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023365{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_createDStream" >&5
23366printf "%s\n" "$ac_cv_lib_zstd_ZSTD_createDStream" >&6; }
23367if test "x$ac_cv_lib_zstd_ZSTD_createDStream" = xyes
23368then :
23369 printf "%s\n" "#define HAVE_LIBZSTD 1" >>confdefs.h
Haibo Huangc3c04f42020-08-19 13:00:07 -070023370
23371 LIBS="-lzstd $LIBS"
23372
23373fi
23374
23375
Elliott Hughesf344baa2021-12-07 09:12:34 -080023376 for ac_header in zstd.h
Haibo Huangc3c04f42020-08-19 13:00:07 -070023377do :
Elliott Hughesf344baa2021-12-07 09:12:34 -080023378 ac_fn_c_check_header_compile "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
23379if test "x$ac_cv_header_zstd_h" = xyes
23380then :
23381 printf "%s\n" "#define HAVE_ZSTD_H 1" >>confdefs.h
Haibo Huangc3c04f42020-08-19 13:00:07 -070023382 curl_zstd_msg="enabled (libzstd)"
23383 HAVE_ZSTD=1
23384
Elliott Hughesf344baa2021-12-07 09:12:34 -080023385printf "%s\n" "#define HAVE_ZSTD 1" >>confdefs.h
Haibo Huangc3c04f42020-08-19 13:00:07 -070023386
23387 HAVE_ZSTD=1
23388
23389
23390fi
23391
23392done
23393
Haibo Huangc3c04f42020-08-19 13:00:07 -070023394 if test X"$OPT_ZSTD" != Xoff &&
23395 test "$HAVE_ZSTD" != "1"; then
23396 as_fn_error $? "libzstd was not found where specified!" "$LINENO" 5
23397 fi
23398
23399 if test "$HAVE_ZSTD" = "1"; then
23400 if test -n "$DIR_ZSTD"; then
23401
23402 if test "x$cross_compiling" != "xyes"; then
23403 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_ZSTD"
23404 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080023405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_ZSTD to CURL_LIBRARY_PATH" >&5
23406printf "%s\n" "$as_me: Added $DIR_ZSTD to CURL_LIBRARY_PATH" >&6;}
Haibo Huangc3c04f42020-08-19 13:00:07 -070023407 fi
23408 fi
23409 else
23410 LDFLAGS=$CLEANLDFLAGS
23411 CPPFLAGS=$CLEANCPPFLAGS
23412 LIBS=$CLEANLIBS
23413 fi
23414fi
23415
23416
Elliott Hughes82be86d2017-09-20 17:00:17 -070023417LDAPLIBNAME=""
23418
23419# Check whether --with-ldap-lib was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080023420if test ${with_ldap_lib+y}
23421then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070023422 withval=$with_ldap_lib; LDAPLIBNAME="$withval"
23423fi
23424
23425
23426LBERLIBNAME=""
23427
23428# Check whether --with-lber-lib was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080023429if test ${with_lber_lib+y}
23430then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070023431 withval=$with_lber_lib; LBERLIBNAME="$withval"
23432fi
23433
23434
23435if test x$CURL_DISABLE_LDAP != x1 ; then
23436
23437
Elliott Hughesf344baa2021-12-07 09:12:34 -080023438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lber.h" >&5
23439printf %s "checking for lber.h... " >&6; }
23440if test ${curl_cv_header_lber_h+y}
23441then :
23442 printf %s "(cached) " >&6
23443else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070023444
23445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23446/* end confdefs.h. */
23447
23448
23449#undef inline
23450#ifdef HAVE_WINDOWS_H
23451#ifndef WIN32_LEAN_AND_MEAN
23452#define WIN32_LEAN_AND_MEAN
23453#endif
23454#include <windows.h>
23455#else
23456#ifdef HAVE_SYS_TYPES_H
23457#include <sys/types.h>
23458#endif
23459#endif
23460#ifndef NULL
23461#define NULL (void *)0
23462#endif
23463#include <lber.h>
23464
23465int main (void)
23466{
23467
23468 BerValue *bvp = NULL;
23469 BerElement *bep = ber_init(bvp);
23470 ber_free(bep, 1);
23471
23472 ;
23473 return 0;
23474}
23475
23476_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080023477if ac_fn_c_try_compile "$LINENO"
23478then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070023479
23480 curl_cv_header_lber_h="yes"
23481
Elliott Hughesf344baa2021-12-07 09:12:34 -080023482else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070023483
23484 curl_cv_header_lber_h="no"
23485
23486fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023487rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070023488
23489fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023490{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_lber_h" >&5
23491printf "%s\n" "$curl_cv_header_lber_h" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070023492 if test "$curl_cv_header_lber_h" = "yes"; then
23493
Elliott Hughesf344baa2021-12-07 09:12:34 -080023494printf "%s\n" "#define HAVE_LBER_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070023495
23496 #
23497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23498/* end confdefs.h. */
23499
23500
23501#undef inline
23502#ifdef HAVE_WINDOWS_H
23503#ifndef WIN32_LEAN_AND_MEAN
23504#define WIN32_LEAN_AND_MEAN
23505#endif
23506#include <windows.h>
23507#else
23508#ifdef HAVE_SYS_TYPES_H
23509#include <sys/types.h>
23510#endif
23511#endif
23512#ifndef NULL
23513#define NULL (void *)0
23514#endif
23515#ifndef LDAP_DEPRECATED
23516#define LDAP_DEPRECATED 1
23517#endif
23518#include <ldap.h>
23519
23520int main (void)
23521{
23522
23523 BerValue *bvp = NULL;
23524 BerElement *bep = ber_init(bvp);
23525 ber_free(bep, 1);
23526
23527 ;
23528 return 0;
23529}
23530
23531_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080023532if ac_fn_c_try_compile "$LINENO"
23533then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070023534
23535 curl_cv_need_header_lber_h="no"
23536
Elliott Hughesf344baa2021-12-07 09:12:34 -080023537else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070023538
23539 curl_cv_need_header_lber_h="yes"
23540
23541fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023542rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070023543 #
23544 case "$curl_cv_need_header_lber_h" in
23545 yes)
23546
Elliott Hughesf344baa2021-12-07 09:12:34 -080023547printf "%s\n" "#define NEED_LBER_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070023548
23549 ;;
23550 esac
23551 fi
23552
23553
Elliott Hughesf344baa2021-12-07 09:12:34 -080023554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ldap.h" >&5
23555printf %s "checking for ldap.h... " >&6; }
23556if test ${curl_cv_header_ldap_h+y}
23557then :
23558 printf %s "(cached) " >&6
23559else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070023560
23561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23562/* end confdefs.h. */
23563
23564
23565#undef inline
23566#ifdef HAVE_WINDOWS_H
23567#ifndef WIN32_LEAN_AND_MEAN
23568#define WIN32_LEAN_AND_MEAN
23569#endif
23570#include <windows.h>
23571#else
23572#ifdef HAVE_SYS_TYPES_H
23573#include <sys/types.h>
23574#endif
23575#endif
23576#ifndef LDAP_DEPRECATED
23577#define LDAP_DEPRECATED 1
23578#endif
23579#ifdef NEED_LBER_H
23580#include <lber.h>
23581#endif
23582#include <ldap.h>
23583
23584int main (void)
23585{
23586
23587 LDAP *ldp = ldap_init("dummy", LDAP_PORT);
23588 int res = ldap_unbind(ldp);
23589
23590 ;
23591 return 0;
23592}
23593
23594_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080023595if ac_fn_c_try_compile "$LINENO"
23596then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070023597
23598 curl_cv_header_ldap_h="yes"
23599
Elliott Hughesf344baa2021-12-07 09:12:34 -080023600else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070023601
23602 curl_cv_header_ldap_h="no"
23603
23604fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023605rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070023606
23607fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023608{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_ldap_h" >&5
23609printf "%s\n" "$curl_cv_header_ldap_h" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070023610 case "$curl_cv_header_ldap_h" in
23611 yes)
23612
Elliott Hughesf344baa2021-12-07 09:12:34 -080023613printf "%s\n" "#define HAVE_LDAP_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070023614
23615 ;;
23616 esac
23617
23618
Elliott Hughesf344baa2021-12-07 09:12:34 -080023619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ldapssl.h" >&5
23620printf %s "checking for ldapssl.h... " >&6; }
23621if test ${curl_cv_header_ldapssl_h+y}
23622then :
23623 printf %s "(cached) " >&6
23624else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070023625
23626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23627/* end confdefs.h. */
23628
23629
23630#undef inline
23631#ifdef HAVE_WINDOWS_H
23632#ifndef WIN32_LEAN_AND_MEAN
23633#define WIN32_LEAN_AND_MEAN
23634#endif
23635#include <windows.h>
23636#else
23637#ifdef HAVE_SYS_TYPES_H
23638#include <sys/types.h>
23639#endif
23640#endif
23641#ifndef NULL
23642#define NULL (void *)0
23643#endif
23644#ifndef LDAP_DEPRECATED
23645#define LDAP_DEPRECATED 1
23646#endif
23647#ifdef NEED_LBER_H
23648#include <lber.h>
23649#endif
23650#ifdef HAVE_LDAP_H
23651#include <ldap.h>
23652#endif
23653#include <ldapssl.h>
23654
23655int main (void)
23656{
23657
23658 char *cert_label = NULL;
23659 LDAP *ldp = ldap_ssl_init("dummy", LDAPS_PORT, cert_label);
23660
23661 ;
23662 return 0;
23663}
23664
23665_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080023666if ac_fn_c_try_compile "$LINENO"
23667then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070023668
23669 curl_cv_header_ldapssl_h="yes"
23670
Elliott Hughesf344baa2021-12-07 09:12:34 -080023671else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070023672
23673 curl_cv_header_ldapssl_h="no"
23674
23675fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023676rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070023677
23678fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023679{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_ldapssl_h" >&5
23680printf "%s\n" "$curl_cv_header_ldapssl_h" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070023681 case "$curl_cv_header_ldapssl_h" in
23682 yes)
23683
Elliott Hughesf344baa2021-12-07 09:12:34 -080023684printf "%s\n" "#define HAVE_LDAPSSL_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070023685
23686 ;;
23687 esac
23688
23689
Elliott Hughesf344baa2021-12-07 09:12:34 -080023690 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ldap_ssl.h" >&5
23691printf %s "checking for ldap_ssl.h... " >&6; }
23692if test ${curl_cv_header_ldap_ssl_h+y}
23693then :
23694 printf %s "(cached) " >&6
23695else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070023696
23697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23698/* end confdefs.h. */
23699
23700
23701#undef inline
23702#ifdef HAVE_WINDOWS_H
23703#ifndef WIN32_LEAN_AND_MEAN
23704#define WIN32_LEAN_AND_MEAN
23705#endif
23706#include <windows.h>
23707#else
23708#ifdef HAVE_SYS_TYPES_H
23709#include <sys/types.h>
23710#endif
23711#endif
23712#ifndef LDAP_DEPRECATED
23713#define LDAP_DEPRECATED 1
23714#endif
23715#ifdef NEED_LBER_H
23716#include <lber.h>
23717#endif
23718#ifdef HAVE_LDAP_H
23719#include <ldap.h>
23720#endif
23721#include <ldap_ssl.h>
23722
23723int main (void)
23724{
23725
23726 LDAP *ldp = ldapssl_init("dummy", LDAPS_PORT, 1);
23727
23728 ;
23729 return 0;
23730}
23731
23732_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080023733if ac_fn_c_try_compile "$LINENO"
23734then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070023735
23736 curl_cv_header_ldap_ssl_h="yes"
23737
Elliott Hughesf344baa2021-12-07 09:12:34 -080023738else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070023739
23740 curl_cv_header_ldap_ssl_h="no"
23741
23742fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023743rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070023744
23745fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023746{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_ldap_ssl_h" >&5
23747printf "%s\n" "$curl_cv_header_ldap_ssl_h" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070023748 case "$curl_cv_header_ldap_ssl_h" in
23749 yes)
23750
Elliott Hughesf344baa2021-12-07 09:12:34 -080023751printf "%s\n" "#define HAVE_LDAP_SSL_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070023752
23753 ;;
23754 esac
23755
23756
23757 if test -z "$LDAPLIBNAME" ; then
23758 if test "$curl_cv_native_windows" = "yes"; then
23759 LDAPLIBNAME="wldap32"
23760 LBERLIBNAME="no"
23761 fi
23762 fi
23763
23764 if test "$LDAPLIBNAME" ; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080023765 as_ac_Lib=`printf "%s\n" "ac_cv_lib_"$LDAPLIBNAME"""_ldap_init" | $as_tr_sh`
23766{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l\"$LDAPLIBNAME\"" >&5
23767printf %s "checking for ldap_init in -l\"$LDAPLIBNAME\"... " >&6; }
23768if eval test \${$as_ac_Lib+y}
23769then :
23770 printf %s "(cached) " >&6
23771else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070023772 ac_check_lib_save_LIBS=$LIBS
23773LIBS="-l"$LDAPLIBNAME" $LIBS"
23774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23775/* end confdefs.h. */
23776
23777
23778#ifdef __cplusplus
23779extern "C"
23780#endif
23781char ldap_init ();
23782int main (void)
23783{
23784return ldap_init ();
23785 ;
23786 return 0;
23787}
23788_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080023789if ac_fn_c_try_link "$LINENO"
23790then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070023791 eval "$as_ac_Lib=yes"
Elliott Hughesf344baa2021-12-07 09:12:34 -080023792else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070023793 eval "$as_ac_Lib=no"
23794fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023795rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070023796 conftest$ac_exeext conftest.$ac_ext
23797LIBS=$ac_check_lib_save_LIBS
23798fi
23799eval ac_res=\$$as_ac_Lib
Elliott Hughesf344baa2021-12-07 09:12:34 -080023800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23801printf "%s\n" "$ac_res" >&6; }
23802if eval test \"x\$"$as_ac_Lib"\" = x"yes"
23803then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070023804 cat >>confdefs.h <<_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080023805#define `printf "%s\n" "HAVE_LIB"$LDAPLIBNAME"" | $as_tr_cpp` 1
Elliott Hughes82be86d2017-09-20 17:00:17 -070023806_ACEOF
23807
23808 LIBS="-l"$LDAPLIBNAME" $LIBS"
23809
Elliott Hughesf344baa2021-12-07 09:12:34 -080023810else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070023811
Elliott Hughes34dd5f42021-08-10 13:01:18 -070023812 if test -n "$ldap_askedfor"; then
23813 as_fn_error $? "couldn't detect the LDAP libraries" "$LINENO" 5
23814 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"$LDAPLIBNAME\" is not an LDAP library: LDAP disabled" >&5
23816printf "%s\n" "$as_me: WARNING: \"$LDAPLIBNAME\" is not an LDAP library: LDAP disabled" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070023817
Elliott Hughesf344baa2021-12-07 09:12:34 -080023818printf "%s\n" "#define CURL_DISABLE_LDAP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070023819
23820 CURL_DISABLE_LDAP=1
23821
23822
Elliott Hughesf344baa2021-12-07 09:12:34 -080023823printf "%s\n" "#define CURL_DISABLE_LDAPS 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070023824
23825 CURL_DISABLE_LDAPS=1
23826
23827fi
23828
23829 else
23830
23831 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080023832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LDAP libraries" >&5
23833printf %s "checking for LDAP libraries... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070023834 #
23835 u_libs=""
23836 #
23837
23838 #
23839 curl_cv_save_LIBS="$LIBS"
23840 curl_cv_ldap_LIBS="unknown"
23841 #
23842 for x_nlibs in '' "$u_libs" \
23843 '-lldap' \
23844 '-lldap -llber' \
23845 '-llber -lldap' \
23846 '-lldapssl -lldapx -lldapsdk' \
Haibo Huang65021c72019-03-27 15:37:23 -070023847 '-lldapsdk -lldapx -lldapssl' \
23848 '-lldap -llber -lssl -lcrypto' ; do
23849
Elliott Hughes82be86d2017-09-20 17:00:17 -070023850 if test "$curl_cv_ldap_LIBS" = "unknown"; then
23851 if test -z "$x_nlibs"; then
23852 LIBS="$curl_cv_save_LIBS"
23853 else
23854 LIBS="$x_nlibs $curl_cv_save_LIBS"
23855 fi
23856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23857/* end confdefs.h. */
23858
23859
23860#undef inline
23861#ifdef HAVE_WINDOWS_H
23862#ifndef WIN32_LEAN_AND_MEAN
23863#define WIN32_LEAN_AND_MEAN
23864#endif
23865#include <windows.h>
23866#else
23867#ifdef HAVE_SYS_TYPES_H
23868#include <sys/types.h>
23869#endif
23870#endif
23871#ifndef NULL
23872#define NULL (void *)0
23873#endif
23874#ifndef LDAP_DEPRECATED
23875#define LDAP_DEPRECATED 1
23876#endif
23877#ifdef NEED_LBER_H
23878#include <lber.h>
23879#endif
23880#ifdef HAVE_LDAP_H
23881#include <ldap.h>
23882#endif
23883
23884int main (void)
23885{
23886
23887 BerValue *bvp = NULL;
23888 BerElement *bep = ber_init(bvp);
23889 LDAP *ldp = ldap_init("dummy", LDAP_PORT);
23890 int res = ldap_unbind(ldp);
23891 ber_free(bep, 1);
23892
23893 ;
23894 return 0;
23895}
23896
23897_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080023898if ac_fn_c_try_link "$LINENO"
23899then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070023900
23901 curl_cv_ldap_LIBS="$x_nlibs"
23902
23903fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023904rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070023905 conftest$ac_exeext conftest.$ac_ext
23906 fi
23907 done
23908 #
23909 LIBS="$curl_cv_save_LIBS"
23910 #
23911 case X-"$curl_cv_ldap_LIBS" in
23912 X-unknown)
Elliott Hughesf344baa2021-12-07 09:12:34 -080023913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot find LDAP libraries" >&5
23914printf "%s\n" "cannot find LDAP libraries" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070023915 ;;
23916 X-)
Elliott Hughesf344baa2021-12-07 09:12:34 -080023917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no additional lib required" >&5
23918printf "%s\n" "no additional lib required" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070023919 ;;
23920 *)
23921 if test -z "$curl_cv_save_LIBS"; then
23922 LIBS="$curl_cv_ldap_LIBS"
23923 else
23924 LIBS="$curl_cv_ldap_LIBS $curl_cv_save_LIBS"
23925 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_ldap_LIBS" >&5
23927printf "%s\n" "$curl_cv_ldap_LIBS" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070023928 ;;
23929 esac
23930 #
23931
23932 case X-"$curl_cv_ldap_LIBS" in
23933 X-unknown)
Elliott Hughes34dd5f42021-08-10 13:01:18 -070023934 if test -n "$ldap_askedfor"; then
23935 as_fn_error $? "couldn't detect the LDAP libraries" "$LINENO" 5
23936 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find libraries for LDAP support: LDAP disabled" >&5
23938printf "%s\n" "$as_me: WARNING: Cannot find libraries for LDAP support: LDAP disabled" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070023939
Elliott Hughesf344baa2021-12-07 09:12:34 -080023940printf "%s\n" "#define CURL_DISABLE_LDAP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070023941
23942 CURL_DISABLE_LDAP=1
23943
23944
Elliott Hughesf344baa2021-12-07 09:12:34 -080023945printf "%s\n" "#define CURL_DISABLE_LDAPS 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070023946
23947 CURL_DISABLE_LDAPS=1
23948
23949 ;;
23950 esac
23951 fi
23952fi
23953
23954if test x$CURL_DISABLE_LDAP != x1 ; then
23955
23956 if test "$LBERLIBNAME" ; then
23957 if test "$LBERLIBNAME" != "no" ; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080023958 as_ac_Lib=`printf "%s\n" "ac_cv_lib_"$LBERLIBNAME"""_ber_free" | $as_tr_sh`
23959{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ber_free in -l\"$LBERLIBNAME\"" >&5
23960printf %s "checking for ber_free in -l\"$LBERLIBNAME\"... " >&6; }
23961if eval test \${$as_ac_Lib+y}
23962then :
23963 printf %s "(cached) " >&6
23964else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070023965 ac_check_lib_save_LIBS=$LIBS
23966LIBS="-l"$LBERLIBNAME" $LIBS"
23967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23968/* end confdefs.h. */
23969
23970
23971#ifdef __cplusplus
23972extern "C"
23973#endif
23974char ber_free ();
23975int main (void)
23976{
23977return ber_free ();
23978 ;
23979 return 0;
23980}
23981_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080023982if ac_fn_c_try_link "$LINENO"
23983then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070023984 eval "$as_ac_Lib=yes"
Elliott Hughesf344baa2021-12-07 09:12:34 -080023985else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070023986 eval "$as_ac_Lib=no"
23987fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080023988rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070023989 conftest$ac_exeext conftest.$ac_ext
23990LIBS=$ac_check_lib_save_LIBS
23991fi
23992eval ac_res=\$$as_ac_Lib
Elliott Hughesf344baa2021-12-07 09:12:34 -080023993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23994printf "%s\n" "$ac_res" >&6; }
23995if eval test \"x\$"$as_ac_Lib"\" = x"yes"
23996then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070023997 cat >>confdefs.h <<_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080023998#define `printf "%s\n" "HAVE_LIB"$LBERLIBNAME"" | $as_tr_cpp` 1
Elliott Hughes82be86d2017-09-20 17:00:17 -070023999_ACEOF
24000
24001 LIBS="-l"$LBERLIBNAME" $LIBS"
24002
Elliott Hughesf344baa2021-12-07 09:12:34 -080024003else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070024004
Elliott Hughesf344baa2021-12-07 09:12:34 -080024005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"$LBERLIBNAME\" is not an LBER library: LDAP disabled" >&5
24006printf "%s\n" "$as_me: WARNING: \"$LBERLIBNAME\" is not an LBER library: LDAP disabled" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070024007
Elliott Hughesf344baa2021-12-07 09:12:34 -080024008printf "%s\n" "#define CURL_DISABLE_LDAP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024009
24010 CURL_DISABLE_LDAP=1
24011
24012
Elliott Hughesf344baa2021-12-07 09:12:34 -080024013printf "%s\n" "#define CURL_DISABLE_LDAPS 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024014
24015 CURL_DISABLE_LDAPS=1
24016
24017fi
24018
24019 fi
24020 fi
24021fi
24022
24023if test x$CURL_DISABLE_LDAP != x1 ; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080024024 ac_fn_c_check_func "$LINENO" "ldap_url_parse" "ac_cv_func_ldap_url_parse"
24025if test "x$ac_cv_func_ldap_url_parse" = xyes
24026then :
24027 printf "%s\n" "#define HAVE_LDAP_URL_PARSE 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024028
24029fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080024030ac_fn_c_check_func "$LINENO" "ldap_init_fd" "ac_cv_func_ldap_init_fd"
24031if test "x$ac_cv_func_ldap_init_fd" = xyes
24032then :
24033 printf "%s\n" "#define HAVE_LDAP_INIT_FD 1" >>confdefs.h
24034
24035fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070024036
24037
24038 if test "$LDAPLIBNAME" = "wldap32"; then
24039 curl_ldap_msg="enabled (winldap)"
24040
Elliott Hughesf344baa2021-12-07 09:12:34 -080024041printf "%s\n" "#define USE_WIN32_LDAP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024042
24043 else
24044 curl_ldap_msg="enabled (OpenLDAP)"
24045 if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
24046
Elliott Hughesf344baa2021-12-07 09:12:34 -080024047printf "%s\n" "#define USE_OPENLDAP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024048
24049 USE_OPENLDAP=1
24050
24051 fi
24052 fi
24053fi
24054
24055if test x$CURL_DISABLE_LDAPS != x1 ; then
24056 curl_ldaps_msg="enabled"
24057fi
24058
24059
Elliott Hughesf344baa2021-12-07 09:12:34 -080024060{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable IPv6" >&5
24061printf %s "checking whether to enable IPv6... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024062# Check whether --enable-ipv6 was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080024063if test ${enable_ipv6+y}
24064then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070024065 enableval=$enable_ipv6; case "$enableval" in
24066 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080024067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24068printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024069 ipv6=no
24070 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080024071 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24072printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024073 ipv6=yes
24074 ;;
24075 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080024076else $as_nop
24077 if test "$cross_compiling" = yes
24078then :
24079 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24080printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024081 ipv6=yes
24082
Elliott Hughesf344baa2021-12-07 09:12:34 -080024083else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070024084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24085/* end confdefs.h. */
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024086
24087/* are AF_INET6 and sockaddr_in6 available? */
Elliott Hughes82be86d2017-09-20 17:00:17 -070024088#include <sys/types.h>
24089#ifdef HAVE_WINSOCK2_H
24090#include <winsock2.h>
Haibo Huangb51266f2020-03-04 02:22:48 -080024091#include <ws2tcpip.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070024092#else
24093#include <sys/socket.h>
Haibo Huangb51266f2020-03-04 02:22:48 -080024094#include <netinet/in.h>
24095#if defined (__TANDEM)
24096# include <netinet/in6.h>
24097#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070024098#endif
24099#include <stdlib.h> /* for exit() */
24100main()
24101{
Haibo Huangb51266f2020-03-04 02:22:48 -080024102 struct sockaddr_in6 s;
24103 (void)s;
Elliott Hughes82be86d2017-09-20 17:00:17 -070024104 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
24105 exit(1);
24106 else
24107 exit(0);
24108}
24109
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024110
Elliott Hughes82be86d2017-09-20 17:00:17 -070024111_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080024112if ac_fn_c_try_run "$LINENO"
24113then :
24114 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24115printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024116 ipv6=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080024117else $as_nop
24118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24119printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024120 ipv6=no
24121fi
24122rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24123 conftest.$ac_objext conftest.beam conftest.$ac_ext
24124fi
24125
24126fi
24127
24128
Elliott Hughes82be86d2017-09-20 17:00:17 -070024129if test "$ipv6" = yes; then
Haibo Huangb51266f2020-03-04 02:22:48 -080024130 curl_ipv6_msg="enabled"
24131
Elliott Hughesf344baa2021-12-07 09:12:34 -080024132printf "%s\n" "#define ENABLE_IPV6 1" >>confdefs.h
Haibo Huangb51266f2020-03-04 02:22:48 -080024133
24134 IPV6_ENABLED=1
24135
24136
Elliott Hughesf344baa2021-12-07 09:12:34 -080024137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if struct sockaddr_in6 has sin6_scope_id member" >&5
24138printf %s "checking if struct sockaddr_in6 has sin6_scope_id member... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24140/* end confdefs.h. */
24141
24142#include <sys/types.h>
24143#ifdef HAVE_WINSOCK2_H
24144#include <winsock2.h>
24145#include <ws2tcpip.h>
24146#else
24147#include <netinet/in.h>
Elliott Hughes0128fe42018-02-27 14:57:55 -080024148#if defined (__TANDEM)
24149# include <netinet/in6.h>
24150#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070024151#endif
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024152
Elliott Hughes82be86d2017-09-20 17:00:17 -070024153int main (void)
24154{
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024155
24156 struct sockaddr_in6 s;
24157 s.sin6_scope_id = 0;
24158
Elliott Hughes82be86d2017-09-20 17:00:17 -070024159 ;
24160 return 0;
24161}
24162_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080024163if ac_fn_c_try_compile "$LINENO"
24164then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024165
Elliott Hughesf344baa2021-12-07 09:12:34 -080024166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24167printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024168
Elliott Hughesf344baa2021-12-07 09:12:34 -080024169printf "%s\n" "#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024170
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024171
Elliott Hughesf344baa2021-12-07 09:12:34 -080024172else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024173
Elliott Hughesf344baa2021-12-07 09:12:34 -080024174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24175printf "%s\n" "no" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024176
24177fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080024178rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070024179fi
24180
24181
Elliott Hughesf344baa2021-12-07 09:12:34 -080024182{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if argv can be written to" >&5
24183printf %s "checking if argv can be written to... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024184
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070024185 old=$LD_LIBRARY_PATH
Elliott Hughes72d948d2018-08-03 14:37:21 -070024186 LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
24187 export LD_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080024188 if test "$cross_compiling" = yes
24189then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070024190 curl_cv_writable_argv=cross
24191
Elliott Hughesf344baa2021-12-07 09:12:34 -080024192else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070024193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24194/* end confdefs.h. */
24195
Haibo Huangca2a8022020-07-10 20:17:42 -070024196int main(int argc, char **argv)
24197{
24198 (void)argc;
24199 argv[0][0] = ' ';
24200 return (argv[0][0] == ' ')?0:1;
Elliott Hughes82be86d2017-09-20 17:00:17 -070024201}
24202
Elliott Hughes82be86d2017-09-20 17:00:17 -070024203_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080024204if ac_fn_c_try_run "$LINENO"
24205then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070024206 curl_cv_writable_argv=yes
24207
Elliott Hughesf344baa2021-12-07 09:12:34 -080024208else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070024209 curl_cv_writable_argv=no
24210
24211fi
24212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24213 conftest.$ac_objext conftest.beam conftest.$ac_ext
24214fi
24215
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070024216 LD_LIBRARY_PATH=$old # restore
24217
Elliott Hughes82be86d2017-09-20 17:00:17 -070024218case $curl_cv_writable_argv in
24219yes)
24220
Elliott Hughesf344baa2021-12-07 09:12:34 -080024221printf "%s\n" "#define HAVE_WRITABLE_ARGV 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024222
Elliott Hughesf344baa2021-12-07 09:12:34 -080024223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24224printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024225 ;;
24226no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080024227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24228printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024229 ;;
24230*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080024231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24232printf "%s\n" "no" >&6; }
24233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: the previous check could not be made default was used" >&5
24234printf "%s\n" "$as_me: WARNING: the previous check could not be made default was used" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070024235 ;;
24236esac
24237
24238
24239
24240GSSAPI_ROOT="/usr"
24241
24242# Check whether --with-gssapi-includes was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080024243if test ${with_gssapi_includes+y}
24244then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070024245 withval=$with_gssapi_includes; GSSAPI_INCS="-I$withval"
24246 want_gss="yes"
24247
24248fi
24249
24250
24251
24252# Check whether --with-gssapi-libs was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080024253if test ${with_gssapi_libs+y}
24254then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070024255 withval=$with_gssapi_libs; GSSAPI_LIB_DIR="-L$withval"
24256 want_gss="yes"
24257
24258fi
24259
24260
24261
24262# Check whether --with-gssapi was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080024263if test ${with_gssapi+y}
24264then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070024265 withval=$with_gssapi;
24266 GSSAPI_ROOT="$withval"
24267 if test x"$GSSAPI_ROOT" != xno; then
24268 want_gss="yes"
24269 if test x"$GSSAPI_ROOT" = xyes; then
24270 GSSAPI_ROOT="/usr"
24271 fi
24272 fi
24273
24274fi
24275
24276
Elliott Hughes82be86d2017-09-20 17:00:17 -070024277save_CPPFLAGS="$CPPFLAGS"
Elliott Hughesf344baa2021-12-07 09:12:34 -080024278{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if GSS-API support is requested" >&5
24279printf %s "checking if GSS-API support is requested... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024280if test x"$want_gss" = xyes; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080024281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24282printf "%s\n" "yes" >&6; }
24283
24284
24285 if test -n "$PKG_CONFIG"; then
24286 PKGCONFIG="$PKG_CONFIG"
24287 else
24288 if test -n "$ac_tool_prefix"; then
24289 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24290set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24291{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24292printf %s "checking for $ac_word... " >&6; }
24293if test ${ac_cv_path_PKGCONFIG+y}
24294then :
24295 printf %s "(cached) " >&6
24296else $as_nop
24297 case $PKGCONFIG in
24298 [\\/]* | ?:[\\/]*)
24299 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
24300 ;;
24301 *)
24302 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24303as_dummy="$PATH:/usr/bin:/usr/local/bin"
24304for as_dir in $as_dummy
24305do
24306 IFS=$as_save_IFS
24307 case $as_dir in #(((
24308 '') as_dir=./ ;;
24309 */) ;;
24310 *) as_dir=$as_dir/ ;;
24311 esac
24312 for ac_exec_ext in '' $ac_executable_extensions; do
24313 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
24314 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
24315 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
24316 break 2
24317 fi
24318done
24319 done
24320IFS=$as_save_IFS
24321
24322 ;;
24323esac
24324fi
24325PKGCONFIG=$ac_cv_path_PKGCONFIG
24326if test -n "$PKGCONFIG"; then
24327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
24328printf "%s\n" "$PKGCONFIG" >&6; }
24329else
24330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24331printf "%s\n" "no" >&6; }
24332fi
24333
24334
24335fi
24336if test -z "$ac_cv_path_PKGCONFIG"; then
24337 ac_pt_PKGCONFIG=$PKGCONFIG
24338 # Extract the first word of "pkg-config", so it can be a program name with args.
24339set dummy pkg-config; ac_word=$2
24340{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24341printf %s "checking for $ac_word... " >&6; }
24342if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
24343then :
24344 printf %s "(cached) " >&6
24345else $as_nop
24346 case $ac_pt_PKGCONFIG in
24347 [\\/]* | ?:[\\/]*)
24348 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
24349 ;;
24350 *)
24351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24352as_dummy="$PATH:/usr/bin:/usr/local/bin"
24353for as_dir in $as_dummy
24354do
24355 IFS=$as_save_IFS
24356 case $as_dir in #(((
24357 '') as_dir=./ ;;
24358 */) ;;
24359 *) as_dir=$as_dir/ ;;
24360 esac
24361 for ac_exec_ext in '' $ac_executable_extensions; do
24362 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
24363 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
24364 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
24365 break 2
24366 fi
24367done
24368 done
24369IFS=$as_save_IFS
24370
24371 ;;
24372esac
24373fi
24374ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
24375if test -n "$ac_pt_PKGCONFIG"; then
24376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
24377printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
24378else
24379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24380printf "%s\n" "no" >&6; }
24381fi
24382
24383 if test "x$ac_pt_PKGCONFIG" = x; then
24384 PKGCONFIG="no"
24385 else
24386 case $cross_compiling:$ac_tool_warned in
24387yes:)
24388{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24389printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24390ac_tool_warned=yes ;;
24391esac
24392 PKGCONFIG=$ac_pt_PKGCONFIG
24393 fi
24394else
24395 PKGCONFIG="$ac_cv_path_PKGCONFIG"
24396fi
24397
24398 fi
24399
24400 if test "x$PKGCONFIG" != "xno"; then
24401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mit-krb5-gssapi options with pkg-config" >&5
24402printf %s "checking for mit-krb5-gssapi options with pkg-config... " >&6; }
24403 itexists=`
24404 if test -n ""; then
24405 PKG_CONFIG_LIBDIR=""
24406 export PKG_CONFIG_LIBDIR
24407 fi
24408 $PKGCONFIG --exists mit-krb5-gssapi >/dev/null 2>&1 && echo 1`
24409
24410 if test -z "$itexists"; then
24411 PKGCONFIG="no"
24412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24413printf "%s\n" "no" >&6; }
24414 else
24415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
24416printf "%s\n" "found" >&6; }
24417 fi
24418 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070024419
24420 if test -z "$GSSAPI_INCS"; then
24421 if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
24422 GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
Elliott Hughesf344baa2021-12-07 09:12:34 -080024423 elif test "$PKGCONFIG" != "no" ; then
24424 GSSAPI_INCS=`$PKGCONFIG --cflags mit-krb5-gssapi`
Elliott Hughes82be86d2017-09-20 17:00:17 -070024425 elif test "$GSSAPI_ROOT" != "yes"; then
24426 GSSAPI_INCS="-I$GSSAPI_ROOT/include"
24427 fi
24428 fi
24429
24430 CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
24431
Elliott Hughesf344baa2021-12-07 09:12:34 -080024432 ac_fn_c_check_header_compile "$LINENO" "gss.h" "ac_cv_header_gss_h" "$ac_includes_default"
24433if test "x$ac_cv_header_gss_h" = xyes
24434then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070024435
24436
Elliott Hughesf344baa2021-12-07 09:12:34 -080024437printf "%s\n" "#define HAVE_GSSGNU 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024438
24439 gnu_gss=yes
24440
Elliott Hughesf344baa2021-12-07 09:12:34 -080024441else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070024442
Elliott Hughesf344baa2021-12-07 09:12:34 -080024443 for ac_header in gssapi/gssapi.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024444do :
Elliott Hughesf344baa2021-12-07 09:12:34 -080024445 ac_fn_c_check_header_compile "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
24446if test "x$ac_cv_header_gssapi_gssapi_h" = xyes
24447then :
24448 printf "%s\n" "#define HAVE_GSSAPI_GSSAPI_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024449
Elliott Hughesf344baa2021-12-07 09:12:34 -080024450else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070024451 not_mit=1
24452fi
24453
24454done
Elliott Hughesf344baa2021-12-07 09:12:34 -080024455 for ac_header in gssapi/gssapi_generic.h gssapi/gssapi_krb5.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024456do :
Elliott Hughesf344baa2021-12-07 09:12:34 -080024457 as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
Elliott Hughes82be86d2017-09-20 17:00:17 -070024458ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
24459$ac_includes_default
24460#ifdef HAVE_GSSAPI_GSSAPI_H
24461#include <gssapi/gssapi.h>
24462#endif
24463
24464"
Elliott Hughesf344baa2021-12-07 09:12:34 -080024465if eval test \"x\$"$as_ac_Header"\" = x"yes"
24466then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070024467 cat >>confdefs.h <<_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080024468#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
Elliott Hughes82be86d2017-09-20 17:00:17 -070024469_ACEOF
24470
Elliott Hughesf344baa2021-12-07 09:12:34 -080024471else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070024472 not_mit=1
24473fi
24474
24475done
Elliott Hughes82be86d2017-09-20 17:00:17 -070024476 if test "x$not_mit" = "x1"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080024477 ac_fn_c_check_header_compile "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
24478if test "x$ac_cv_header_gssapi_h" = xyes
24479then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070024480
24481
Elliott Hughesf344baa2021-12-07 09:12:34 -080024482printf "%s\n" "#define HAVE_GSSHEIMDAL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024483
24484
Elliott Hughesf344baa2021-12-07 09:12:34 -080024485else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070024486
24487 want_gss=no
Elliott Hughesf344baa2021-12-07 09:12:34 -080024488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: disabling GSS-API support since no header files were found" >&5
24489printf "%s\n" "$as_me: WARNING: disabling GSS-API support since no header files were found" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070024490
24491
24492fi
24493
Elliott Hughes82be86d2017-09-20 17:00:17 -070024494 else
24495
Elliott Hughesf344baa2021-12-07 09:12:34 -080024496printf "%s\n" "#define HAVE_GSSMIT 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024497
Elliott Hughesf344baa2021-12-07 09:12:34 -080024498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if GSS-API headers declare GSS_C_NT_HOSTBASED_SERVICE" >&5
24499printf %s "checking if GSS-API headers declare GSS_C_NT_HOSTBASED_SERVICE... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24501/* end confdefs.h. */
24502
24503
24504#include <gssapi/gssapi.h>
24505#include <gssapi/gssapi_generic.h>
24506#include <gssapi/gssapi_krb5.h>
24507
24508int main (void)
24509{
24510
24511 gss_import_name(
24512 (OM_uint32 *)0,
24513 (gss_buffer_t)0,
24514 GSS_C_NT_HOSTBASED_SERVICE,
24515 (gss_name_t *)0);
24516
24517 ;
24518 return 0;
24519}
24520
24521_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080024522if ac_fn_c_try_compile "$LINENO"
24523then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070024524
Elliott Hughesf344baa2021-12-07 09:12:34 -080024525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24526printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024527
Elliott Hughesf344baa2021-12-07 09:12:34 -080024528else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070024529
Elliott Hughesf344baa2021-12-07 09:12:34 -080024530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24531printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024532
Elliott Hughesf344baa2021-12-07 09:12:34 -080024533printf "%s\n" "#define HAVE_OLD_GSSMIT 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024534
24535
24536fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080024537rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070024538 fi
24539
24540
24541fi
24542
Elliott Hughes82be86d2017-09-20 17:00:17 -070024543else
Elliott Hughesf344baa2021-12-07 09:12:34 -080024544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24545printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024546fi
24547if test x"$want_gss" = xyes; then
24548
Elliott Hughesf344baa2021-12-07 09:12:34 -080024549printf "%s\n" "#define HAVE_GSSAPI 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024550
24551 HAVE_GSSAPI=1
24552 curl_gss_msg="enabled (MIT Kerberos/Heimdal)"
24553
24554 if test -n "$gnu_gss"; then
24555 curl_gss_msg="enabled (GNU GSS)"
24556 LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
24557 LIBS="-lgss $LIBS"
24558 elif test -z "$GSSAPI_LIB_DIR"; then
24559 case $host in
24560 *-*-darwin*)
24561 LIBS="-lgssapi_krb5 -lresolv $LIBS"
24562 ;;
24563 *)
Elliott Hughesf344baa2021-12-07 09:12:34 -080024564
24565 if test -n "$PKG_CONFIG"; then
24566 PKGCONFIG="$PKG_CONFIG"
24567 else
24568 if test -n "$ac_tool_prefix"; then
24569 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24570set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24571{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24572printf %s "checking for $ac_word... " >&6; }
24573if test ${ac_cv_path_PKGCONFIG+y}
24574then :
24575 printf %s "(cached) " >&6
24576else $as_nop
24577 case $PKGCONFIG in
24578 [\\/]* | ?:[\\/]*)
24579 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
24580 ;;
24581 *)
24582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24583as_dummy="$PATH:/usr/bin:/usr/local/bin"
24584for as_dir in $as_dummy
24585do
24586 IFS=$as_save_IFS
24587 case $as_dir in #(((
24588 '') as_dir=./ ;;
24589 */) ;;
24590 *) as_dir=$as_dir/ ;;
24591 esac
24592 for ac_exec_ext in '' $ac_executable_extensions; do
24593 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
24594 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
24595 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
24596 break 2
24597 fi
24598done
24599 done
24600IFS=$as_save_IFS
24601
24602 ;;
24603esac
24604fi
24605PKGCONFIG=$ac_cv_path_PKGCONFIG
24606if test -n "$PKGCONFIG"; then
24607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
24608printf "%s\n" "$PKGCONFIG" >&6; }
24609else
24610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24611printf "%s\n" "no" >&6; }
24612fi
24613
24614
24615fi
24616if test -z "$ac_cv_path_PKGCONFIG"; then
24617 ac_pt_PKGCONFIG=$PKGCONFIG
24618 # Extract the first word of "pkg-config", so it can be a program name with args.
24619set dummy pkg-config; ac_word=$2
24620{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24621printf %s "checking for $ac_word... " >&6; }
24622if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
24623then :
24624 printf %s "(cached) " >&6
24625else $as_nop
24626 case $ac_pt_PKGCONFIG in
24627 [\\/]* | ?:[\\/]*)
24628 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
24629 ;;
24630 *)
24631 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24632as_dummy="$PATH:/usr/bin:/usr/local/bin"
24633for as_dir in $as_dummy
24634do
24635 IFS=$as_save_IFS
24636 case $as_dir in #(((
24637 '') as_dir=./ ;;
24638 */) ;;
24639 *) as_dir=$as_dir/ ;;
24640 esac
24641 for ac_exec_ext in '' $ac_executable_extensions; do
24642 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
24643 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
24644 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
24645 break 2
24646 fi
24647done
24648 done
24649IFS=$as_save_IFS
24650
24651 ;;
24652esac
24653fi
24654ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
24655if test -n "$ac_pt_PKGCONFIG"; then
24656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
24657printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
24658else
24659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24660printf "%s\n" "no" >&6; }
24661fi
24662
24663 if test "x$ac_pt_PKGCONFIG" = x; then
24664 PKGCONFIG="no"
24665 else
24666 case $cross_compiling:$ac_tool_warned in
24667yes:)
24668{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24669printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24670ac_tool_warned=yes ;;
24671esac
24672 PKGCONFIG=$ac_pt_PKGCONFIG
24673 fi
24674else
24675 PKGCONFIG="$ac_cv_path_PKGCONFIG"
24676fi
24677
24678 fi
24679
24680 if test "x$PKGCONFIG" != "xno"; then
24681 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mit-krb5-gssapi options with pkg-config" >&5
24682printf %s "checking for mit-krb5-gssapi options with pkg-config... " >&6; }
24683 itexists=`
24684 if test -n ""; then
24685 PKG_CONFIG_LIBDIR=""
24686 export PKG_CONFIG_LIBDIR
24687 fi
24688 $PKGCONFIG --exists mit-krb5-gssapi >/dev/null 2>&1 && echo 1`
24689
24690 if test -z "$itexists"; then
24691 PKGCONFIG="no"
24692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24693printf "%s\n" "no" >&6; }
24694 else
24695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
24696printf "%s\n" "found" >&6; }
24697 fi
24698 fi
24699
Elliott Hughes82be86d2017-09-20 17:00:17 -070024700 if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
24701 gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi`
24702 LIBS="$gss_libs $LIBS"
Elliott Hughesf344baa2021-12-07 09:12:34 -080024703 elif test "$PKGCONFIG" != "no" ; then
24704 gss_libs=`$PKGCONFIG --libs mit-krb5-gssapi`
Elliott Hughes82be86d2017-09-20 17:00:17 -070024705 LIBS="$gss_libs $LIBS"
24706 else
24707 case $host in
24708 *-hp-hpux*)
24709 gss_libname="gss"
24710 ;;
24711 *)
24712 gss_libname="gssapi"
24713 ;;
24714 esac
24715
24716 if test "$GSSAPI_ROOT" != "yes"; then
24717 LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
24718 LIBS="-l$gss_libname $LIBS"
24719 else
24720 LIBS="-l$gss_libname $LIBS"
24721 fi
24722 fi
24723 ;;
24724 esac
24725 else
24726 LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
24727 case $host in
24728 *-hp-hpux*)
24729 LIBS="-lgss $LIBS"
24730 ;;
24731 *)
24732 LIBS="-lgssapi $LIBS"
24733 ;;
24734 esac
24735 fi
24736else
24737 CPPFLAGS="$save_CPPFLAGS"
24738fi
24739
Alex Deymo486467e2017-12-19 19:04:07 +010024740build_libstubgss=no
24741if test x"$want_gss" = "xyes"; then
24742 build_libstubgss=yes
24743fi
24744
24745 if test "x$build_libstubgss" = "xyes"; then
24746 BUILD_STUB_GSS_TRUE=
24747 BUILD_STUB_GSS_FALSE='#'
24748else
24749 BUILD_STUB_GSS_TRUE='#'
24750 BUILD_STUB_GSS_FALSE=
24751fi
24752
24753
24754
24755DEFAULT_SSL_BACKEND=no
24756VALID_DEFAULT_SSL_BACKEND=
24757
24758# Check whether --with-default-ssl-backend was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080024759if test ${with_default_ssl_backend+y}
24760then :
Alex Deymo486467e2017-12-19 19:04:07 +010024761 withval=$with_default_ssl_backend; DEFAULT_SSL_BACKEND=$withval
24762fi
24763
24764case "$DEFAULT_SSL_BACKEND" in
24765 no)
24766 ;;
24767 default|yes)
24768 as_fn_error $? "The name of the default SSL backend is required." "$LINENO" 5
24769 ;;
24770 *)
24771
24772 VALID_DEFAULT_SSL_BACKEND=no
24773 ;;
24774esac
24775
24776
Elliott Hughesf344baa2021-12-07 09:12:34 -080024777{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable Windows native SSL/TLS" >&5
24778printf %s "checking whether to enable Windows native SSL/TLS... " >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024779if test "x$OPT_SCHANNEL" != xno; then
Alex Deymo486467e2017-12-19 19:04:07 +010024780 ssl_msg=
Haibo Huangc3c04f42020-08-19 13:00:07 -070024781 if test "x$OPT_SCHANNEL" != "xno" &&
Elliott Hughes82be86d2017-09-20 17:00:17 -070024782 test "x$curl_cv_native_windows" = "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080024783 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24784printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024785
Elliott Hughesf344baa2021-12-07 09:12:34 -080024786printf "%s\n" "#define USE_SCHANNEL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024787
24788 USE_SCHANNEL=1
24789
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024790 ssl_msg="Schannel"
Alex Deymo486467e2017-12-19 19:04:07 +010024791 test schannel != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
Haibo Huangc3c04f42020-08-19 13:00:07 -070024792 SCHANNEL_ENABLED=1
24793 # --with-schannel implies --enable-sspi
Elliott Hughes82be86d2017-09-20 17:00:17 -070024794
Elliott Hughesf344baa2021-12-07 09:12:34 -080024795printf "%s\n" "#define USE_WINDOWS_SSPI 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024796
24797 USE_WINDOWS_SSPI=1
24798
24799 curl_sspi_msg="enabled"
Elliott Hughes82be86d2017-09-20 17:00:17 -070024800 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080024801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24802printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024803 fi
Alex Deymo486467e2017-12-19 19:04:07 +010024804 test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
Elliott Hughes82be86d2017-09-20 17:00:17 -070024805else
Elliott Hughesf344baa2021-12-07 09:12:34 -080024806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24807printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024808fi
24809
Haibo Huang65021c72019-03-27 15:37:23 -070024810
Elliott Hughesf344baa2021-12-07 09:12:34 -080024811{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable Secure Transport" >&5
24812printf %s "checking whether to enable Secure Transport... " >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024813if test "x$OPT_SECURETRANSPORT" != xno; then
Haibo Huang65021c72019-03-27 15:37:23 -070024814 if test "x$OPT_SECURETRANSPORT" != "xno" &&
Haibo Huang24c77a12020-04-29 13:49:57 -070024815 (test "x$cross_compiling" != "xno" || test -d "/System/Library/Frameworks/Security.framework"); then
Elliott Hughesf344baa2021-12-07 09:12:34 -080024816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24817printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024818
Elliott Hughesf344baa2021-12-07 09:12:34 -080024819printf "%s\n" "#define USE_SECTRANSP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070024820
Haibo Huang65021c72019-03-27 15:37:23 -070024821 USE_SECTRANSP=1
Elliott Hughes82be86d2017-09-20 17:00:17 -070024822
Haibo Huang65021c72019-03-27 15:37:23 -070024823 ssl_msg="Secure Transport"
24824 test secure-transport != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
24825 SECURETRANSPORT_ENABLED=1
Elliott Hughes82be86d2017-09-20 17:00:17 -070024826 LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security"
24827 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080024828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24829printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024830 fi
Alex Deymo486467e2017-12-19 19:04:07 +010024831 test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
Elliott Hughes82be86d2017-09-20 17:00:17 -070024832else
Elliott Hughesf344baa2021-12-07 09:12:34 -080024833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24834printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024835fi
24836
Haibo Huang65021c72019-03-27 15:37:23 -070024837
24838
Elliott Hughesf344baa2021-12-07 09:12:34 -080024839{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable Amiga native SSL/TLS (AmiSSL)" >&5
24840printf %s "checking whether to enable Amiga native SSL/TLS (AmiSSL)... " >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070024841if test "$HAVE_PROTO_BSDSOCKET_H" = "1"; then
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024842 if test "x$OPT_AMISSL" != xno; then
Haibo Huang65021c72019-03-27 15:37:23 -070024843 ssl_msg=
24844 if test "x$OPT_AMISSL" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080024845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24846printf "%s\n" "yes" >&6; }
Haibo Huang65021c72019-03-27 15:37:23 -070024847 ssl_msg="AmiSSL"
24848 test amissl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
24849 AMISSL_ENABLED=1
24850 LIBS="-lamisslauto $LIBS"
24851
Elliott Hughesf344baa2021-12-07 09:12:34 -080024852printf "%s\n" "#define USE_AMISSL 1" >>confdefs.h
Haibo Huang65021c72019-03-27 15:37:23 -070024853
24854
Elliott Hughesf344baa2021-12-07 09:12:34 -080024855printf "%s\n" "#define USE_OPENSSL 1" >>confdefs.h
Haibo Huang65021c72019-03-27 15:37:23 -070024856
24857 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080024858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24859printf "%s\n" "no" >&6; }
Haibo Huang65021c72019-03-27 15:37:23 -070024860 fi
24861 test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
24862 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080024863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24864printf "%s\n" "no" >&6; }
Haibo Huang65021c72019-03-27 15:37:23 -070024865 fi
24866else
Elliott Hughesf344baa2021-12-07 09:12:34 -080024867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24868printf "%s\n" "no" >&6; }
Haibo Huang65021c72019-03-27 15:37:23 -070024869fi
24870
Elliott Hughes82be86d2017-09-20 17:00:17 -070024871
Elliott Hughes82be86d2017-09-20 17:00:17 -070024872
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024873if test "x$OPT_OPENSSL" != xno; then
Alex Deymo486467e2017-12-19 19:04:07 +010024874 ssl_msg=
24875
Elliott Hughes82be86d2017-09-20 17:00:17 -070024876 CLEANLDFLAGS="$LDFLAGS"
24877 CLEANCPPFLAGS="$CPPFLAGS"
24878 CLEANLIBS="$LIBS"
24879
24880 case $host in
24881 *-*-msys* | *-*-mingw*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080024882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gdi32" >&5
24883printf %s "checking for gdi32... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024884 my_ac_save_LIBS=$LIBS
24885 LIBS="-lgdi32 $LIBS"
24886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24887/* end confdefs.h. */
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024888
24889 #include <windef.h>
24890 #include <wingdi.h>
24891
Elliott Hughes82be86d2017-09-20 17:00:17 -070024892int main (void)
24893{
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024894
24895 GdiFlush();
24896
Elliott Hughes82be86d2017-09-20 17:00:17 -070024897 ;
24898 return 0;
24899}
24900_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080024901if ac_fn_c_try_link "$LINENO"
24902then :
24903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24904printf "%s\n" "yes" >&6; }
24905else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024906 LIBS=$my_ac_save_LIBS
Elliott Hughesf344baa2021-12-07 09:12:34 -080024907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24908printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070024909
24910fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080024911rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070024912 conftest$ac_exeext conftest.$ac_ext
24913 ;;
24914 esac
24915
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024916 case "$OPT_OPENSSL" in
Elliott Hughes82be86d2017-09-20 17:00:17 -070024917 yes)
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024918 PKGTEST="yes"
Elliott Hughes82be86d2017-09-20 17:00:17 -070024919 PREFIX_OPENSSL=
24920 ;;
24921 *)
24922 PKGTEST="no"
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024923 PREFIX_OPENSSL=$OPT_OPENSSL
Elliott Hughes82be86d2017-09-20 17:00:17 -070024924
Elliott Hughes34dd5f42021-08-10 13:01:18 -070024925 OPENSSL_PCDIR="$OPT_OPENSSL/lib/pkgconfig"
Elliott Hughes82be86d2017-09-20 17:00:17 -070024926 if test -f "$OPENSSL_PCDIR/openssl.pc"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080024927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&5
24928printf "%s\n" "$as_me: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070024929 PKGTEST="yes"
Elliott Hughesf344baa2021-12-07 09:12:34 -080024930 fi
24931
24932 if test "$PKGTEST" != "yes"; then
24933 # try lib64 instead
24934 OPENSSL_PCDIR="$OPT_OPENSSL/lib64/pkgconfig"
24935 if test -f "$OPENSSL_PCDIR/openssl.pc"; then
24936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&5
24937printf "%s\n" "$as_me: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&6;}
24938 PKGTEST="yes"
24939 fi
24940 fi
24941
24942 if test "$PKGTEST" != "yes"; then
24943 if test ! -f "$PREFIX_OPENSSL/include/openssl/ssl.h"; then
24944 as_fn_error $? "$PREFIX_OPENSSL is a bad --with-openssl prefix!" "$LINENO" 5
24945 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070024946 fi
24947
24948 LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
24949 if test "$PREFIX_OPENSSL" != "/usr" ; then
24950 SSL_LDFLAGS="-L$LIB_OPENSSL"
24951 SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
24952 fi
24953 SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
24954 ;;
24955 esac
24956
24957 if test "$PKGTEST" = "yes"; then
24958
24959
24960 if test -n "$PKG_CONFIG"; then
24961 PKGCONFIG="$PKG_CONFIG"
24962 else
24963 if test -n "$ac_tool_prefix"; then
24964 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24965set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080024966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24967printf %s "checking for $ac_word... " >&6; }
24968if test ${ac_cv_path_PKGCONFIG+y}
24969then :
24970 printf %s "(cached) " >&6
24971else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070024972 case $PKGCONFIG in
24973 [\\/]* | ?:[\\/]*)
24974 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
24975 ;;
24976 *)
24977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24978as_dummy="$PATH:/usr/bin:/usr/local/bin"
24979for as_dir in $as_dummy
24980do
24981 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080024982 case $as_dir in #(((
24983 '') as_dir=./ ;;
24984 */) ;;
24985 *) as_dir=$as_dir/ ;;
24986 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070024987 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080024988 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
24989 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
24990 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070024991 break 2
24992 fi
24993done
24994 done
24995IFS=$as_save_IFS
24996
24997 ;;
24998esac
24999fi
25000PKGCONFIG=$ac_cv_path_PKGCONFIG
25001if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080025002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
25003printf "%s\n" "$PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025004else
Elliott Hughesf344baa2021-12-07 09:12:34 -080025005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25006printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025007fi
25008
25009
25010fi
25011if test -z "$ac_cv_path_PKGCONFIG"; then
25012 ac_pt_PKGCONFIG=$PKGCONFIG
25013 # Extract the first word of "pkg-config", so it can be a program name with args.
25014set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080025015{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25016printf %s "checking for $ac_word... " >&6; }
25017if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
25018then :
25019 printf %s "(cached) " >&6
25020else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070025021 case $ac_pt_PKGCONFIG in
25022 [\\/]* | ?:[\\/]*)
25023 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
25024 ;;
25025 *)
25026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25027as_dummy="$PATH:/usr/bin:/usr/local/bin"
25028for as_dir in $as_dummy
25029do
25030 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080025031 case $as_dir in #(((
25032 '') as_dir=./ ;;
25033 */) ;;
25034 *) as_dir=$as_dir/ ;;
25035 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070025036 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080025037 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
25038 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
25039 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070025040 break 2
25041 fi
25042done
25043 done
25044IFS=$as_save_IFS
25045
25046 ;;
25047esac
25048fi
25049ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
25050if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080025051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
25052printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025053else
Elliott Hughesf344baa2021-12-07 09:12:34 -080025054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25055printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025056fi
25057
25058 if test "x$ac_pt_PKGCONFIG" = x; then
25059 PKGCONFIG="no"
25060 else
25061 case $cross_compiling:$ac_tool_warned in
25062yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080025063{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25064printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070025065ac_tool_warned=yes ;;
25066esac
25067 PKGCONFIG=$ac_pt_PKGCONFIG
25068 fi
25069else
25070 PKGCONFIG="$ac_cv_path_PKGCONFIG"
25071fi
25072
25073 fi
25074
25075 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080025076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl options with pkg-config" >&5
25077printf %s "checking for openssl options with pkg-config... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025078 itexists=`
25079 if test -n "$OPENSSL_PCDIR"; then
25080 PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
25081 export PKG_CONFIG_LIBDIR
25082 fi
25083 $PKGCONFIG --exists openssl >/dev/null 2>&1 && echo 1`
25084
25085 if test -z "$itexists"; then
25086 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080025087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25088printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025089 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080025090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
25091printf "%s\n" "found" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025092 fi
25093 fi
25094
25095
25096 if test "$PKGCONFIG" != "no" ; then
25097 SSL_LIBS=`
25098 if test -n "$OPENSSL_PCDIR"; then
25099 PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
25100 export PKG_CONFIG_LIBDIR
25101 fi
Haibo Huang21926d52019-01-08 14:27:10 -080025102 $PKGCONFIG --libs-only-l --libs-only-other openssl 2>/dev/null`
Elliott Hughes82be86d2017-09-20 17:00:17 -070025103
25104 SSL_LDFLAGS=`
25105 if test -n "$OPENSSL_PCDIR"; then
25106 PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
25107 export PKG_CONFIG_LIBDIR
25108 fi
25109 $PKGCONFIG --libs-only-L openssl 2>/dev/null`
25110
25111 SSL_CPPFLAGS=`
25112 if test -n "$OPENSSL_PCDIR"; then
25113 PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
25114 export PKG_CONFIG_LIBDIR
25115 fi
25116 $PKGCONFIG --cflags-only-I openssl 2>/dev/null`
25117
25118
Elliott Hughesf344baa2021-12-07 09:12:34 -080025119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: SSL_LIBS: \"$SSL_LIBS\"" >&5
25120printf "%s\n" "$as_me: pkg-config: SSL_LIBS: \"$SSL_LIBS\"" >&6;}
25121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: SSL_LDFLAGS: \"$SSL_LDFLAGS\"" >&5
25122printf "%s\n" "$as_me: pkg-config: SSL_LDFLAGS: \"$SSL_LDFLAGS\"" >&6;}
25123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: SSL_CPPFLAGS: \"$SSL_CPPFLAGS\"" >&5
25124printf "%s\n" "$as_me: pkg-config: SSL_CPPFLAGS: \"$SSL_CPPFLAGS\"" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070025125
Haibo Huangca2a8022020-07-10 20:17:42 -070025126 LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/^-L//'`
Elliott Hughes82be86d2017-09-20 17:00:17 -070025127
25128 LIBS="$SSL_LIBS $LIBS"
25129 fi
25130 fi
25131
25132 CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
25133 LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
25134
Elliott Hughesf344baa2021-12-07 09:12:34 -080025135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HMAC_Update in -lcrypto" >&5
25136printf %s "checking for HMAC_Update in -lcrypto... " >&6; }
25137if test ${ac_cv_lib_crypto_HMAC_Update+y}
25138then :
25139 printf %s "(cached) " >&6
25140else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070025141 ac_check_lib_save_LIBS=$LIBS
25142LIBS="-lcrypto $LIBS"
25143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25144/* end confdefs.h. */
25145
25146
25147#ifdef __cplusplus
25148extern "C"
25149#endif
25150char HMAC_Update ();
25151int main (void)
25152{
25153return HMAC_Update ();
25154 ;
25155 return 0;
25156}
25157_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080025158if ac_fn_c_try_link "$LINENO"
25159then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070025160 ac_cv_lib_crypto_HMAC_Update=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080025161else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070025162 ac_cv_lib_crypto_HMAC_Update=no
25163fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025164rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070025165 conftest$ac_exeext conftest.$ac_ext
25166LIBS=$ac_check_lib_save_LIBS
25167fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_HMAC_Update" >&5
25169printf "%s\n" "$ac_cv_lib_crypto_HMAC_Update" >&6; }
25170if test "x$ac_cv_lib_crypto_HMAC_Update" = xyes
25171then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070025172
25173 HAVECRYPTO="yes"
25174 LIBS="-lcrypto $LIBS"
25175
Elliott Hughesf344baa2021-12-07 09:12:34 -080025176else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070025177
Elliott Hughes34dd5f42021-08-10 13:01:18 -070025178 if test -n "$LIB_OPENSSL" ; then
25179 LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
25180 fi
25181 if test "$PKGCONFIG" = "no" -a -n "$PREFIX_OPENSSL" ; then
Elliott Hughesb1ef70f2018-10-30 11:28:38 -070025182 # only set this if pkg-config wasn't used
25183 CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
25184 fi
Elliott Hughes34dd5f42021-08-10 13:01:18 -070025185 # Linking previously failed, try extra paths from --with-openssl or
25186 # pkg-config. Use a different function name to avoid reusing the earlier
25187 # cached result.
Elliott Hughesf344baa2021-12-07 09:12:34 -080025188 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HMAC_Init_ex in -lcrypto" >&5
25189printf %s "checking for HMAC_Init_ex in -lcrypto... " >&6; }
25190if test ${ac_cv_lib_crypto_HMAC_Init_ex+y}
25191then :
25192 printf %s "(cached) " >&6
25193else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070025194 ac_check_lib_save_LIBS=$LIBS
25195LIBS="-lcrypto $LIBS"
25196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25197/* end confdefs.h. */
25198
25199
25200#ifdef __cplusplus
25201extern "C"
25202#endif
25203char HMAC_Init_ex ();
25204int main (void)
25205{
25206return HMAC_Init_ex ();
25207 ;
25208 return 0;
25209}
25210_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080025211if ac_fn_c_try_link "$LINENO"
25212then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070025213 ac_cv_lib_crypto_HMAC_Init_ex=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080025214else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070025215 ac_cv_lib_crypto_HMAC_Init_ex=no
25216fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025217rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070025218 conftest$ac_exeext conftest.$ac_ext
25219LIBS=$ac_check_lib_save_LIBS
25220fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025221{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_HMAC_Init_ex" >&5
25222printf "%s\n" "$ac_cv_lib_crypto_HMAC_Init_ex" >&6; }
25223if test "x$ac_cv_lib_crypto_HMAC_Init_ex" = xyes
25224then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070025225
25226 HAVECRYPTO="yes"
25227 LIBS="-lcrypto $LIBS"
Elliott Hughesf344baa2021-12-07 09:12:34 -080025228else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070025229
25230
Elliott Hughesf344baa2021-12-07 09:12:34 -080025231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking OpenSSL linking with -ldl" >&5
25232printf %s "checking OpenSSL linking with -ldl... " >&6; }
25233 LIBS="-lcrypto $CLEANLIBS -ldl"
Elliott Hughes82be86d2017-09-20 17:00:17 -070025234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25235/* end confdefs.h. */
25236
25237 #include <openssl/err.h>
25238
25239int main (void)
25240{
25241
25242 ERR_clear_error();
25243
25244 ;
25245 return 0;
25246}
25247_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080025248if ac_fn_c_try_link "$LINENO"
25249then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070025250
Elliott Hughesf344baa2021-12-07 09:12:34 -080025251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25252printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025253 HAVECRYPTO="yes"
25254
Elliott Hughesf344baa2021-12-07 09:12:34 -080025255else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070025256
Elliott Hughesf344baa2021-12-07 09:12:34 -080025257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25258printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025259
Elliott Hughesf344baa2021-12-07 09:12:34 -080025260 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking OpenSSL linking with -ldl and -lpthread" >&5
25261printf %s "checking OpenSSL linking with -ldl and -lpthread... " >&6; }
25262 LIBS="-lcrypto $CLEANLIBS -ldl -lpthread"
Elliott Hughes82be86d2017-09-20 17:00:17 -070025263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25264/* end confdefs.h. */
25265
Elliott Hughes34dd5f42021-08-10 13:01:18 -070025266
Elliott Hughes82be86d2017-09-20 17:00:17 -070025267 #include <openssl/err.h>
25268
25269int main (void)
25270{
25271
25272 ERR_clear_error();
25273
25274 ;
25275 return 0;
25276}
25277_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080025278if ac_fn_c_try_link "$LINENO"
25279then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070025280
Elliott Hughesf344baa2021-12-07 09:12:34 -080025281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25282printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025283 HAVECRYPTO="yes"
25284
Elliott Hughesf344baa2021-12-07 09:12:34 -080025285else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070025286
Elliott Hughesf344baa2021-12-07 09:12:34 -080025287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25288printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025289 LDFLAGS="$CLEANLDFLAGS"
25290 CPPFLAGS="$CLEANCPPFLAGS"
25291 LIBS="$CLEANLIBS"
25292
25293
25294fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025295rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070025296 conftest$ac_exeext conftest.$ac_ext
25297
25298
25299fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025300rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070025301 conftest$ac_exeext conftest.$ac_ext
25302
25303
25304fi
25305
25306
25307fi
25308
25309
25310 if test X"$HAVECRYPTO" = X"yes"; then
25311
Elliott Hughesf344baa2021-12-07 09:12:34 -080025312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_connect in -lssl" >&5
25313printf %s "checking for SSL_connect in -lssl... " >&6; }
25314if test ${ac_cv_lib_ssl_SSL_connect+y}
25315then :
25316 printf %s "(cached) " >&6
25317else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070025318 ac_check_lib_save_LIBS=$LIBS
25319LIBS="-lssl $LIBS"
25320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25321/* end confdefs.h. */
25322
25323
25324#ifdef __cplusplus
25325extern "C"
25326#endif
25327char SSL_connect ();
25328int main (void)
25329{
25330return SSL_connect ();
25331 ;
25332 return 0;
25333}
25334_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080025335if ac_fn_c_try_link "$LINENO"
25336then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070025337 ac_cv_lib_ssl_SSL_connect=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080025338else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070025339 ac_cv_lib_ssl_SSL_connect=no
25340fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025341rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070025342 conftest$ac_exeext conftest.$ac_ext
25343LIBS=$ac_check_lib_save_LIBS
25344fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_connect" >&5
25346printf "%s\n" "$ac_cv_lib_ssl_SSL_connect" >&6; }
25347if test "x$ac_cv_lib_ssl_SSL_connect" = xyes
25348then :
25349 printf "%s\n" "#define HAVE_LIBSSL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070025350
25351 LIBS="-lssl $LIBS"
25352
25353fi
25354
25355
25356 if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080025357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssl with RSAglue/rsaref libs in use" >&5
25358printf %s "checking for ssl with RSAglue/rsaref libs in use... " >&6; };
Elliott Hughes82be86d2017-09-20 17:00:17 -070025359 OLIBS=$LIBS
25360 LIBS="-lRSAglue -lrsaref $LIBS"
Elliott Hughesf344baa2021-12-07 09:12:34 -080025361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_connect in -lssl" >&5
25362printf %s "checking for SSL_connect in -lssl... " >&6; }
25363if test ${ac_cv_lib_ssl_SSL_connect+y}
25364then :
25365 printf %s "(cached) " >&6
25366else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070025367 ac_check_lib_save_LIBS=$LIBS
25368LIBS="-lssl $LIBS"
25369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25370/* end confdefs.h. */
25371
25372
25373#ifdef __cplusplus
25374extern "C"
25375#endif
25376char SSL_connect ();
25377int main (void)
25378{
25379return SSL_connect ();
25380 ;
25381 return 0;
25382}
25383_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080025384if ac_fn_c_try_link "$LINENO"
25385then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070025386 ac_cv_lib_ssl_SSL_connect=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080025387else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070025388 ac_cv_lib_ssl_SSL_connect=no
25389fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025390rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070025391 conftest$ac_exeext conftest.$ac_ext
25392LIBS=$ac_check_lib_save_LIBS
25393fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025394{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_connect" >&5
25395printf "%s\n" "$ac_cv_lib_ssl_SSL_connect" >&6; }
25396if test "x$ac_cv_lib_ssl_SSL_connect" = xyes
25397then :
25398 printf "%s\n" "#define HAVE_LIBSSL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070025399
25400 LIBS="-lssl $LIBS"
25401
25402fi
25403
25404 if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080025405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25406printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025407 LIBS=$OLIBS
25408 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080025409 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25410printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025411 fi
25412
25413 else
25414
Elliott Hughesf344baa2021-12-07 09:12:34 -080025415 for ac_header in openssl/x509.h openssl/rsa.h openssl/crypto.h openssl/pem.h openssl/ssl.h openssl/err.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070025416do :
Elliott Hughesf344baa2021-12-07 09:12:34 -080025417 as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
25418ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25419if eval test \"x\$"$as_ac_Header"\" = x"yes"
25420then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070025421 cat >>confdefs.h <<_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080025422#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
Elliott Hughes82be86d2017-09-20 17:00:17 -070025423_ACEOF
Alex Deymo486467e2017-12-19 19:04:07 +010025424 ssl_msg="OpenSSL"
25425 test openssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
Elliott Hughes82be86d2017-09-20 17:00:17 -070025426 OPENSSL_ENABLED=1
25427
Elliott Hughesf344baa2021-12-07 09:12:34 -080025428printf "%s\n" "#define USE_OPENSSL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070025429
25430fi
25431
25432done
25433
Elliott Hughes82be86d2017-09-20 17:00:17 -070025434 if test $ac_cv_header_openssl_x509_h = no; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080025435 ac_fn_c_check_header_compile "$LINENO" "x509.h" "ac_cv_header_x509_h" "$ac_includes_default"
25436if test "x$ac_cv_header_x509_h" = xyes
25437then :
25438 printf "%s\n" "#define HAVE_X509_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070025439
25440fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025441ac_fn_c_check_header_compile "$LINENO" "rsa.h" "ac_cv_header_rsa_h" "$ac_includes_default"
25442if test "x$ac_cv_header_rsa_h" = xyes
25443then :
25444 printf "%s\n" "#define HAVE_RSA_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070025445
Elliott Hughesf344baa2021-12-07 09:12:34 -080025446fi
25447ac_fn_c_check_header_compile "$LINENO" "crypto.h" "ac_cv_header_crypto_h" "$ac_includes_default"
25448if test "x$ac_cv_header_crypto_h" = xyes
25449then :
25450 printf "%s\n" "#define HAVE_CRYPTO_H 1" >>confdefs.h
25451
25452fi
25453ac_fn_c_check_header_compile "$LINENO" "pem.h" "ac_cv_header_pem_h" "$ac_includes_default"
25454if test "x$ac_cv_header_pem_h" = xyes
25455then :
25456 printf "%s\n" "#define HAVE_PEM_H 1" >>confdefs.h
25457
25458fi
25459ac_fn_c_check_header_compile "$LINENO" "ssl.h" "ac_cv_header_ssl_h" "$ac_includes_default"
25460if test "x$ac_cv_header_ssl_h" = xyes
25461then :
25462 printf "%s\n" "#define HAVE_SSL_H 1" >>confdefs.h
25463
25464fi
25465ac_fn_c_check_header_compile "$LINENO" "err.h" "ac_cv_header_err_h" "$ac_includes_default"
25466if test "x$ac_cv_header_err_h" = xyes
25467then :
25468 printf "%s\n" "#define HAVE_ERR_H 1" >>confdefs.h
25469
25470fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070025471
25472
25473 if test $ac_cv_header_x509_h = yes &&
25474 test $ac_cv_header_crypto_h = yes &&
25475 test $ac_cv_header_ssl_h = yes; then
Alex Deymo486467e2017-12-19 19:04:07 +010025476 ssl_msg="OpenSSL"
Elliott Hughes82be86d2017-09-20 17:00:17 -070025477 OPENSSL_ENABLED=1
25478 fi
25479 fi
25480 fi
25481
Alex Deymo486467e2017-12-19 19:04:07 +010025482 if test X"$OPENSSL_ENABLED" != X"1"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070025483 LIBS="$CLEANLIBS"
25484 fi
25485
Elliott Hughes34dd5f42021-08-10 13:01:18 -070025486 if test X"$OPT_OPENSSL" != Xoff &&
Elliott Hughes82be86d2017-09-20 17:00:17 -070025487 test "$OPENSSL_ENABLED" != "1"; then
25488 as_fn_error $? "OpenSSL libs and/or directories were not found where specified!" "$LINENO" 5
25489 fi
25490 fi
25491
25492 if test X"$OPENSSL_ENABLED" = X"1"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070025493
Elliott Hughesf344baa2021-12-07 09:12:34 -080025494 ac_fn_c_check_func "$LINENO" "RAND_egd" "ac_cv_func_RAND_egd"
25495if test "x$ac_cv_func_RAND_egd" = xyes
25496then :
25497 printf "%s\n" "#define HAVE_RAND_EGD 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070025498
25499fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025500ac_fn_c_check_func "$LINENO" "SSLv2_client_method" "ac_cv_func_SSLv2_client_method"
25501if test "x$ac_cv_func_SSLv2_client_method" = xyes
25502then :
25503 printf "%s\n" "#define HAVE_SSLV2_CLIENT_METHOD 1" >>confdefs.h
25504
25505fi
25506ac_fn_c_check_func "$LINENO" "OpenSSL_version" "ac_cv_func_OpenSSL_version"
25507if test "x$ac_cv_func_OpenSSL_version" = xyes
25508then :
25509 printf "%s\n" "#define HAVE_OPENSSL_VERSION 1" >>confdefs.h
25510
25511fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070025512
25513
Elliott Hughesf344baa2021-12-07 09:12:34 -080025514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BoringSSL" >&5
25515printf %s "checking for BoringSSL... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25517/* end confdefs.h. */
25518
25519
25520 #include <openssl/base.h>
25521
25522int main (void)
25523{
25524
25525 #ifndef OPENSSL_IS_BORINGSSL
25526 #error not boringssl
25527 #endif
25528
25529 ;
25530 return 0;
25531}
25532
25533_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080025534if ac_fn_c_try_compile "$LINENO"
25535then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070025536
Elliott Hughesf344baa2021-12-07 09:12:34 -080025537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25538printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025539
Elliott Hughesf344baa2021-12-07 09:12:34 -080025540printf "%s\n" "#define HAVE_BORINGSSL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070025541
Alex Deymo486467e2017-12-19 19:04:07 +010025542 ssl_msg="BoringSSL"
Elliott Hughes82be86d2017-09-20 17:00:17 -070025543
Elliott Hughesf344baa2021-12-07 09:12:34 -080025544else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070025545
Elliott Hughesf344baa2021-12-07 09:12:34 -080025546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25547printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025548
25549fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025550rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070025551
Elliott Hughesf344baa2021-12-07 09:12:34 -080025552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libressl" >&5
25553printf %s "checking for libressl... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25555/* end confdefs.h. */
25556
25557
25558#include <openssl/opensslv.h>
25559
25560int main (void)
25561{
25562
25563 int dummy = LIBRESSL_VERSION_NUMBER;
25564
25565 ;
25566 return 0;
25567}
25568
25569_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080025570if ac_fn_c_try_compile "$LINENO"
25571then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070025572
Elliott Hughesf344baa2021-12-07 09:12:34 -080025573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25574printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025575
Elliott Hughesf344baa2021-12-07 09:12:34 -080025576printf "%s\n" "#define HAVE_LIBRESSL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070025577
Alex Deymo486467e2017-12-19 19:04:07 +010025578 ssl_msg="libressl"
Elliott Hughes82be86d2017-09-20 17:00:17 -070025579
Elliott Hughesf344baa2021-12-07 09:12:34 -080025580else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070025581
Elliott Hughesf344baa2021-12-07 09:12:34 -080025582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25583printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025584
25585fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025586rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Haibo Huang24c77a12020-04-29 13:49:57 -070025587
Elliott Hughesf344baa2021-12-07 09:12:34 -080025588 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL >= v3" >&5
25589printf %s "checking for OpenSSL >= v3... " >&6; }
Haibo Huang24c77a12020-04-29 13:49:57 -070025590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25591/* end confdefs.h. */
25592
25593
25594#include <openssl/opensslv.h>
25595
25596int main (void)
25597{
25598
25599 #if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
25600 return 0;
25601 #else
25602 #error older than 3
25603 #endif
25604
25605 ;
25606 return 0;
25607}
25608
25609_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080025610if ac_fn_c_try_compile "$LINENO"
25611then :
Haibo Huang24c77a12020-04-29 13:49:57 -070025612
Elliott Hughesf344baa2021-12-07 09:12:34 -080025613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25614printf "%s\n" "yes" >&6; }
Haibo Huang24c77a12020-04-29 13:49:57 -070025615
Elliott Hughesf344baa2021-12-07 09:12:34 -080025616printf "%s\n" "#define HAVE_OPENSSL3 1" >>confdefs.h
Haibo Huang24c77a12020-04-29 13:49:57 -070025617
25618 CPPFLAGS="$CPPFLAGS -DOPENSSL_SUPPRESS_DEPRECATED"
25619 ssl_msg="OpenSSL v3+"
25620
Elliott Hughesf344baa2021-12-07 09:12:34 -080025621else $as_nop
Haibo Huang24c77a12020-04-29 13:49:57 -070025622
Elliott Hughesf344baa2021-12-07 09:12:34 -080025623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25624printf "%s\n" "no" >&6; }
Haibo Huang24c77a12020-04-29 13:49:57 -070025625
25626fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025627rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070025628 fi
25629
25630 if test "$OPENSSL_ENABLED" = "1"; then
25631 if test -n "$LIB_OPENSSL"; then
25632 if test "x$cross_compiling" != "xyes"; then
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070025633 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_OPENSSL"
25634 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080025635 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $LIB_OPENSSL to CURL_LIBRARY_PATH" >&5
25636printf "%s\n" "$as_me: Added $LIB_OPENSSL to CURL_LIBRARY_PATH" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070025637 fi
25638 fi
25639
25640 #
25641
25642 #
25643 tst_api="unknown"
25644 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080025645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL headers version" >&5
25646printf %s "checking for OpenSSL headers version... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025647
25648 OLDCPPFLAGS=$CPPFLAGS
25649 # CPPPFLAG comes from CURL_CPP_P
25650 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
25651 if test -z "$SED"; then
25652 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
25653 fi
25654 if test -z "$GREP"; then
25655 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
25656 fi
25657
25658 tmp_exp=""
25659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25660/* end confdefs.h. */
25661
25662
25663# ifdef USE_OPENSSL
25664# include <openssl/crypto.h>
25665# else
25666# include <crypto.h>
25667# endif
25668
25669#ifdef OPENSSL_VERSION_NUMBER
25670CURL_DEF_TOKEN OPENSSL_VERSION_NUMBER
25671#endif
25672
25673
25674_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080025675if ac_fn_c_try_cpp "$LINENO"
25676then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070025677
25678 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
25679 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
25680 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
25681 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
25682 if test -z "$tmp_exp" || test "$tmp_exp" = "OPENSSL_VERSION_NUMBER"; then
25683 tmp_exp=""
25684 fi
25685
25686fi
25687rm -f conftest.err conftest.i conftest.$ac_ext
25688 if test -z "$tmp_exp"; then
25689 curl_cv_have_def_OPENSSL_VERSION_NUMBER=no
25690
25691 else
25692 curl_cv_have_def_OPENSSL_VERSION_NUMBER=yes
25693 curl_cv_def_OPENSSL_VERSION_NUMBER=$tmp_exp
25694
25695 fi
25696 CPPFLAGS=$OLDCPPFLAGS
25697
Elliott Hughesf344baa2021-12-07 09:12:34 -080025698
25699 OLDCPPFLAGS=$CPPFLAGS
25700 # CPPPFLAG comes from CURL_CPP_P
25701 CPPFLAGS="$CPPFLAGS $CPPPFLAG"
25702 if test -z "$SED"; then
25703 as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
25704 fi
25705 if test -z "$GREP"; then
25706 as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
25707 fi
25708
25709 tmp_exp=""
25710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25711/* end confdefs.h. */
25712
25713
25714# include <openssl/crypto.h>
25715
25716#ifdef OPENSSL_VERSION_STR
25717CURL_DEF_TOKEN OPENSSL_VERSION_STR
25718#endif
25719
25720
25721_ACEOF
25722if ac_fn_c_try_cpp "$LINENO"
25723then :
25724
25725 tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
25726 "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
25727 "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
25728 "$SED" 's/["][ ]*["]//g' 2>/dev/null`
25729 if test -z "$tmp_exp" || test "$tmp_exp" = "OPENSSL_VERSION_STR"; then
25730 tmp_exp=""
25731 fi
25732
25733fi
25734rm -f conftest.err conftest.i conftest.$ac_ext
25735 if test -z "$tmp_exp"; then
25736 curl_cv_have_def_OPENSSL_VERSION_STR=no
25737
25738 else
25739 curl_cv_have_def_OPENSSL_VERSION_STR=yes
25740 curl_cv_def_OPENSSL_VERSION_STR=$tmp_exp
25741
25742 fi
25743 CPPFLAGS=$OLDCPPFLAGS
25744
Elliott Hughes82be86d2017-09-20 17:00:17 -070025745 if test "$curl_cv_have_def_OPENSSL_VERSION_NUMBER" = "yes"; then
25746 tst_verlen=`expr "$curl_cv_def_OPENSSL_VERSION_NUMBER" : '.*'`
25747 case "x$tst_verlen" in
25748 x6)
25749 tst_vermaj=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 3`
25750 tst_vermin=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 4`
25751 tst_verfix=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 5`
25752 tst_api=0x$tst_vermaj$tst_vermin$tst_verfix
25753 ;;
25754 x11|x10)
25755 tst_vermaj=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 3`
25756 tst_vermin=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 5`
25757 tst_verfix=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 7`
25758 tst_api=0x$tst_vermaj$tst_vermin$tst_verfix
25759 ;;
25760 *)
Elliott Hughesf344baa2021-12-07 09:12:34 -080025761 if test "$curl_cv_have_def_OPENSSL_VERSION_STR" = "yes"; then
25762 ver=`echo $curl_cv_def_OPENSSL_VERSION_STR | sed 's/"//g'`;
25763 tst_vermaj=`echo $ver | cut -d. -f1`
25764 tst_vermin=`echo $ver | cut -d. -f2`
25765 tst_verfix=`echo $ver | cut -d. -f3`
25766 tst_show="$ver"
25767 tst_api=0x$tst_vermaj$tst_vermin$tst_verfix
25768 else
25769 tst_api="unknown"
25770 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070025771 ;;
25772 esac
25773 case $tst_api in
Elliott Hughescac39802018-04-27 16:19:43 -070025774 0x111) tst_show="1.1.1" ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070025775 0x110) tst_show="1.1.0" ;;
25776 0x102) tst_show="1.0.2" ;;
25777 0x101) tst_show="1.0.1" ;;
25778 0x100) tst_show="1.0.0" ;;
25779 0x099) tst_show="0.9.9" ;;
25780 0x098) tst_show="0.9.8" ;;
25781 0x097) tst_show="0.9.7" ;;
25782 0x096) tst_show="0.9.6" ;;
25783 0x095) tst_show="0.9.5" ;;
25784 0x094) tst_show="0.9.4" ;;
25785 0x093) tst_show="0.9.3" ;;
25786 0x092) tst_show="0.9.2" ;;
25787 0x091) tst_show="0.9.1" ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080025788 *)
25789 if test -z "$tst_show"; then
25790 tst_show="unknown"
25791 fi
25792 ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070025793 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080025794 tst_show="$tst_show - $tst_api"
Elliott Hughes82be86d2017-09-20 17:00:17 -070025795 else
25796 tst_show="unknown"
25797 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tst_show" >&5
25799printf "%s\n" "$tst_show" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070025800 #
25801 curl_openssl_api_headers=$tst_api
25802
25803
25804 #
25805 tst_api="unknown"
25806 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080025807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL library version" >&5
25808printf %s "checking for OpenSSL library version... " >&6; }
25809 if test "$tst_api" = "unknown"; then
25810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25811/* end confdefs.h. */
25812
25813
25814#define SSL_CTX_load_verify_dir innocuous_SSL_CTX_load_verify_dir
25815#ifdef __STDC__
25816# include <limits.h>
25817#else
25818# include <assert.h>
25819#endif
25820#undef SSL_CTX_load_verify_dir
25821#ifdef __cplusplus
25822extern "C"
25823#endif
25824char SSL_CTX_load_verify_dir ();
25825#if defined __stub_SSL_CTX_load_verify_dir || defined __stub___SSL_CTX_load_verify_dir
25826choke me
25827#endif
25828
25829int main (void)
25830{
25831return SSL_CTX_load_verify_dir ();
25832 ;
25833 return 0;
25834}
25835
25836_ACEOF
25837if ac_fn_c_try_link "$LINENO"
25838then :
25839
25840 tst_api="0x300"
25841
25842fi
25843rm -f core conftest.err conftest.$ac_objext conftest.beam \
25844 conftest$ac_exeext conftest.$ac_ext
25845 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070025846 if test "$tst_api" = "unknown"; then
Elliott Hughescac39802018-04-27 16:19:43 -070025847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25848/* end confdefs.h. */
25849
25850
25851#define ERR_clear_last_mark innocuous_ERR_clear_last_mark
25852#ifdef __STDC__
25853# include <limits.h>
25854#else
25855# include <assert.h>
25856#endif
25857#undef ERR_clear_last_mark
25858#ifdef __cplusplus
25859extern "C"
25860#endif
25861char ERR_clear_last_mark ();
25862#if defined __stub_ERR_clear_last_mark || defined __stub___ERR_clear_last_mark
25863choke me
25864#endif
25865
25866int main (void)
25867{
25868return ERR_clear_last_mark ();
25869 ;
25870 return 0;
25871}
25872
25873_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080025874if ac_fn_c_try_link "$LINENO"
25875then :
Elliott Hughescac39802018-04-27 16:19:43 -070025876
25877 tst_api="0x111"
25878
25879fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025880rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughescac39802018-04-27 16:19:43 -070025881 conftest$ac_exeext conftest.$ac_ext
25882 fi
25883 if test "$tst_api" = "unknown"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070025884 case $host in
25885 *-*-vms*)
25886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25887/* end confdefs.h. */
25888
25889
25890#define SSL_CTX_set_not_resumbl_sess_cb innocuous_SSL_CTX_set_not_resumbl_sess_cb
25891#ifdef __STDC__
25892# include <limits.h>
25893#else
25894# include <assert.h>
25895#endif
25896#undef SSL_CTX_set_not_resumbl_sess_cb
25897#ifdef __cplusplus
25898extern "C"
25899#endif
25900char SSL_CTX_set_not_resumbl_sess_cb ();
25901#if defined __stub_SSL_CTX_set_not_resumbl_sess_cb || defined __stub___SSL_CTX_set_not_resumbl_sess_cb
25902choke me
25903#endif
25904
25905int main (void)
25906{
25907return SSL_CTX_set_not_resumbl_sess_cb ();
25908 ;
25909 return 0;
25910}
25911
25912_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080025913if ac_fn_c_try_link "$LINENO"
25914then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070025915
25916 tst_api="0x110"
25917
25918fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025919rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070025920 conftest$ac_exeext conftest.$ac_ext
25921 ;;
25922 *)
25923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25924/* end confdefs.h. */
25925
25926
25927#define SSL_CTX_set_not_resumable_session_callback innocuous_SSL_CTX_set_not_resumable_session_callback
25928#ifdef __STDC__
25929# include <limits.h>
25930#else
25931# include <assert.h>
25932#endif
25933#undef SSL_CTX_set_not_resumable_session_callback
25934#ifdef __cplusplus
25935extern "C"
25936#endif
25937char SSL_CTX_set_not_resumable_session_callback ();
25938#if defined __stub_SSL_CTX_set_not_resumable_session_callback || defined __stub___SSL_CTX_set_not_resumable_session_callback
25939choke me
25940#endif
25941
25942int main (void)
25943{
25944return SSL_CTX_set_not_resumable_session_callback ();
25945 ;
25946 return 0;
25947}
25948
25949_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080025950if ac_fn_c_try_link "$LINENO"
25951then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070025952
25953 tst_api="0x110"
25954
25955fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025956rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070025957 conftest$ac_exeext conftest.$ac_ext
25958 ;;
25959 esac
25960 fi
25961 if test "$tst_api" = "unknown"; then
25962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25963/* end confdefs.h. */
25964
25965
25966#define SSL_CONF_CTX_new innocuous_SSL_CONF_CTX_new
25967#ifdef __STDC__
25968# include <limits.h>
25969#else
25970# include <assert.h>
25971#endif
25972#undef SSL_CONF_CTX_new
25973#ifdef __cplusplus
25974extern "C"
25975#endif
25976char SSL_CONF_CTX_new ();
25977#if defined __stub_SSL_CONF_CTX_new || defined __stub___SSL_CONF_CTX_new
25978choke me
25979#endif
25980
25981int main (void)
25982{
25983return SSL_CONF_CTX_new ();
25984 ;
25985 return 0;
25986}
25987
25988_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080025989if ac_fn_c_try_link "$LINENO"
25990then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070025991
25992 tst_api="0x102"
25993
25994fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080025995rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070025996 conftest$ac_exeext conftest.$ac_ext
25997 fi
25998 if test "$tst_api" = "unknown"; then
25999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26000/* end confdefs.h. */
26001
26002
26003#define SSL_renegotiate_abbreviated innocuous_SSL_renegotiate_abbreviated
26004#ifdef __STDC__
26005# include <limits.h>
26006#else
26007# include <assert.h>
26008#endif
26009#undef SSL_renegotiate_abbreviated
26010#ifdef __cplusplus
26011extern "C"
26012#endif
26013char SSL_renegotiate_abbreviated ();
26014#if defined __stub_SSL_renegotiate_abbreviated || defined __stub___SSL_renegotiate_abbreviated
26015choke me
26016#endif
26017
26018int main (void)
26019{
26020return SSL_renegotiate_abbreviated ();
26021 ;
26022 return 0;
26023}
26024
26025_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080026026if ac_fn_c_try_link "$LINENO"
26027then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026028
26029 tst_api="0x101"
26030
26031fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026032rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070026033 conftest$ac_exeext conftest.$ac_ext
26034 fi
26035 if test "$tst_api" = "unknown"; then
26036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26037/* end confdefs.h. */
26038
26039
26040#define OBJ_add_sigid innocuous_OBJ_add_sigid
26041#ifdef __STDC__
26042# include <limits.h>
26043#else
26044# include <assert.h>
26045#endif
26046#undef OBJ_add_sigid
26047#ifdef __cplusplus
26048extern "C"
26049#endif
26050char OBJ_add_sigid ();
26051#if defined __stub_OBJ_add_sigid || defined __stub___OBJ_add_sigid
26052choke me
26053#endif
26054
26055int main (void)
26056{
26057return OBJ_add_sigid ();
26058 ;
26059 return 0;
26060}
26061
26062_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080026063if ac_fn_c_try_link "$LINENO"
26064then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026065
26066 tst_api="0x100"
26067
26068fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026069rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070026070 conftest$ac_exeext conftest.$ac_ext
26071 fi
26072 if test "$tst_api" = "unknown"; then
26073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26074/* end confdefs.h. */
26075
26076
26077#define ERR_set_mark innocuous_ERR_set_mark
26078#ifdef __STDC__
26079# include <limits.h>
26080#else
26081# include <assert.h>
26082#endif
26083#undef ERR_set_mark
26084#ifdef __cplusplus
26085extern "C"
26086#endif
26087char ERR_set_mark ();
26088#if defined __stub_ERR_set_mark || defined __stub___ERR_set_mark
26089choke me
26090#endif
26091
26092int main (void)
26093{
26094return ERR_set_mark ();
26095 ;
26096 return 0;
26097}
26098
26099_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080026100if ac_fn_c_try_link "$LINENO"
26101then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026102
26103 tst_api="0x098"
26104
26105fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026106rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070026107 conftest$ac_exeext conftest.$ac_ext
26108 fi
26109 if test "$tst_api" = "unknown"; then
26110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26111/* end confdefs.h. */
26112
26113
26114#define ERR_peek_last_error innocuous_ERR_peek_last_error
26115#ifdef __STDC__
26116# include <limits.h>
26117#else
26118# include <assert.h>
26119#endif
26120#undef ERR_peek_last_error
26121#ifdef __cplusplus
26122extern "C"
26123#endif
26124char ERR_peek_last_error ();
26125#if defined __stub_ERR_peek_last_error || defined __stub___ERR_peek_last_error
26126choke me
26127#endif
26128
26129int main (void)
26130{
26131return ERR_peek_last_error ();
26132 ;
26133 return 0;
26134}
26135
26136_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080026137if ac_fn_c_try_link "$LINENO"
26138then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026139
26140 tst_api="0x097"
26141
26142fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026143rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070026144 conftest$ac_exeext conftest.$ac_ext
26145 fi
26146 if test "$tst_api" = "unknown"; then
26147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26148/* end confdefs.h. */
26149
26150
26151#define c2i_ASN1_OBJECT innocuous_c2i_ASN1_OBJECT
26152#ifdef __STDC__
26153# include <limits.h>
26154#else
26155# include <assert.h>
26156#endif
26157#undef c2i_ASN1_OBJECT
26158#ifdef __cplusplus
26159extern "C"
26160#endif
26161char c2i_ASN1_OBJECT ();
26162#if defined __stub_c2i_ASN1_OBJECT || defined __stub___c2i_ASN1_OBJECT
26163choke me
26164#endif
26165
26166int main (void)
26167{
26168return c2i_ASN1_OBJECT ();
26169 ;
26170 return 0;
26171}
26172
26173_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080026174if ac_fn_c_try_link "$LINENO"
26175then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026176
26177 tst_api="0x096"
26178
26179fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026180rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070026181 conftest$ac_exeext conftest.$ac_ext
26182 fi
26183 if test "$tst_api" = "unknown"; then
26184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26185/* end confdefs.h. */
26186
26187
26188#define SSL_CTX_set_purpose innocuous_SSL_CTX_set_purpose
26189#ifdef __STDC__
26190# include <limits.h>
26191#else
26192# include <assert.h>
26193#endif
26194#undef SSL_CTX_set_purpose
26195#ifdef __cplusplus
26196extern "C"
26197#endif
26198char SSL_CTX_set_purpose ();
26199#if defined __stub_SSL_CTX_set_purpose || defined __stub___SSL_CTX_set_purpose
26200choke me
26201#endif
26202
26203int main (void)
26204{
26205return SSL_CTX_set_purpose ();
26206 ;
26207 return 0;
26208}
26209
26210_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080026211if ac_fn_c_try_link "$LINENO"
26212then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026213
26214 tst_api="0x095"
26215
26216fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026217rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070026218 conftest$ac_exeext conftest.$ac_ext
26219 fi
26220 if test "$tst_api" = "unknown"; then
26221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26222/* end confdefs.h. */
26223
26224
26225#define OBJ_obj2txt innocuous_OBJ_obj2txt
26226#ifdef __STDC__
26227# include <limits.h>
26228#else
26229# include <assert.h>
26230#endif
26231#undef OBJ_obj2txt
26232#ifdef __cplusplus
26233extern "C"
26234#endif
26235char OBJ_obj2txt ();
26236#if defined __stub_OBJ_obj2txt || defined __stub___OBJ_obj2txt
26237choke me
26238#endif
26239
26240int main (void)
26241{
26242return OBJ_obj2txt ();
26243 ;
26244 return 0;
26245}
26246
26247_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080026248if ac_fn_c_try_link "$LINENO"
26249then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026250
26251 tst_api="0x094"
26252
26253fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026254rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070026255 conftest$ac_exeext conftest.$ac_ext
26256 fi
26257 if test "$tst_api" = "unknown"; then
26258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26259/* end confdefs.h. */
26260
26261
26262#define SSL_get_verify_depth innocuous_SSL_get_verify_depth
26263#ifdef __STDC__
26264# include <limits.h>
26265#else
26266# include <assert.h>
26267#endif
26268#undef SSL_get_verify_depth
26269#ifdef __cplusplus
26270extern "C"
26271#endif
26272char SSL_get_verify_depth ();
26273#if defined __stub_SSL_get_verify_depth || defined __stub___SSL_get_verify_depth
26274choke me
26275#endif
26276
26277int main (void)
26278{
26279return SSL_get_verify_depth ();
26280 ;
26281 return 0;
26282}
26283
26284_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080026285if ac_fn_c_try_link "$LINENO"
26286then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026287
26288 tst_api="0x093"
26289
26290fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026291rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070026292 conftest$ac_exeext conftest.$ac_ext
26293 fi
26294 if test "$tst_api" = "unknown"; then
26295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26296/* end confdefs.h. */
26297
26298
26299#define SSL_library_init innocuous_SSL_library_init
26300#ifdef __STDC__
26301# include <limits.h>
26302#else
26303# include <assert.h>
26304#endif
26305#undef SSL_library_init
26306#ifdef __cplusplus
26307extern "C"
26308#endif
26309char SSL_library_init ();
26310#if defined __stub_SSL_library_init || defined __stub___SSL_library_init
26311choke me
26312#endif
26313
26314int main (void)
26315{
26316return SSL_library_init ();
26317 ;
26318 return 0;
26319}
26320
26321_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080026322if ac_fn_c_try_link "$LINENO"
26323then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026324
26325 tst_api="0x092"
26326
26327fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026328rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070026329 conftest$ac_exeext conftest.$ac_ext
26330 fi
26331 if test "$tst_api" = "unknown"; then
26332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26333/* end confdefs.h. */
26334
26335
26336#define SSL_CTX_set_cipher_list innocuous_SSL_CTX_set_cipher_list
26337#ifdef __STDC__
26338# include <limits.h>
26339#else
26340# include <assert.h>
26341#endif
26342#undef SSL_CTX_set_cipher_list
26343#ifdef __cplusplus
26344extern "C"
26345#endif
26346char SSL_CTX_set_cipher_list ();
26347#if defined __stub_SSL_CTX_set_cipher_list || defined __stub___SSL_CTX_set_cipher_list
26348choke me
26349#endif
26350
26351int main (void)
26352{
26353return SSL_CTX_set_cipher_list ();
26354 ;
26355 return 0;
26356}
26357
26358_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080026359if ac_fn_c_try_link "$LINENO"
26360then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026361
26362 tst_api="0x091"
26363
26364fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026365rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070026366 conftest$ac_exeext conftest.$ac_ext
26367 fi
26368 case $tst_api in
Elliott Hughesf344baa2021-12-07 09:12:34 -080026369 0x300) tst_show="3.0.0" ;;
Elliott Hughescac39802018-04-27 16:19:43 -070026370 0x111) tst_show="1.1.1" ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070026371 0x110) tst_show="1.1.0" ;;
26372 0x102) tst_show="1.0.2" ;;
26373 0x101) tst_show="1.0.1" ;;
26374 0x100) tst_show="1.0.0" ;;
26375 0x099) tst_show="0.9.9" ;;
26376 0x098) tst_show="0.9.8" ;;
26377 0x097) tst_show="0.9.7" ;;
26378 0x096) tst_show="0.9.6" ;;
26379 0x095) tst_show="0.9.5" ;;
26380 0x094) tst_show="0.9.4" ;;
26381 0x093) tst_show="0.9.3" ;;
26382 0x092) tst_show="0.9.2" ;;
26383 0x091) tst_show="0.9.1" ;;
26384 *) tst_show="unknown" ;;
26385 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080026386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tst_show" >&5
26387printf "%s\n" "$tst_show" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070026388 #
26389 curl_openssl_api_library=$tst_api
26390
26391 #
26392 tst_match="yes"
26393 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080026394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL headers and library versions matching" >&5
26395printf %s "checking for OpenSSL headers and library versions matching... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070026396 if test "$curl_openssl_api_headers" = "unknown" ||
26397 test "$curl_openssl_api_library" = "unknown"; then
26398 tst_match="fail"
26399 tst_warns="Can not compare OpenSSL headers and library versions."
26400 elif test "$curl_openssl_api_headers" != "$curl_openssl_api_library"; then
26401 tst_match="no"
26402 tst_warns="OpenSSL headers and library versions do not match."
26403 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tst_match" >&5
26405printf "%s\n" "$tst_match" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070026406 if test "$tst_match" != "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080026407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $tst_warns" >&5
26408printf "%s\n" "$as_me: WARNING: $tst_warns" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070026409 fi
26410
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070026411 check_for_ca_bundle=1
Elliott Hughes82be86d2017-09-20 17:00:17 -070026412 fi
26413
Alex Deymo486467e2017-12-19 19:04:07 +010026414 test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
Elliott Hughes82be86d2017-09-20 17:00:17 -070026415fi
26416
Elliott Hughes34dd5f42021-08-10 13:01:18 -070026417if test X"$OPT_OPENSSL" != Xno &&
Haibo Huang34ab3462019-05-22 00:50:27 -070026418 test "$OPENSSL_ENABLED" != "1"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080026419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OPT_OPENSSL: $OPT_OPENSSL" >&5
26420printf "%s\n" "$as_me: OPT_OPENSSL: $OPT_OPENSSL" >&6;}
26421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OPENSSL_ENABLED: $OPENSSL_ENABLED" >&5
26422printf "%s\n" "$as_me: OPENSSL_ENABLED: $OPENSSL_ENABLED" >&6;}
Elliott Hughes34dd5f42021-08-10 13:01:18 -070026423 as_fn_error $? "--with-openssl was given but OpenSSL could not be detected" "$LINENO" 5
Haibo Huang34ab3462019-05-22 00:50:27 -070026424fi
26425
Elliott Hughes82be86d2017-09-20 17:00:17 -070026426
26427if test X"$OPENSSL_ENABLED" = X"1"; then
26428
26429# Check whether --with-egd-socket was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080026430if test ${with_egd_socket+y}
26431then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026432 withval=$with_egd_socket; EGD_SOCKET="$withval"
26433
26434fi
26435
26436 if test -n "$EGD_SOCKET" ; then
26437
Elliott Hughesf344baa2021-12-07 09:12:34 -080026438printf "%s\n" "#define EGD_SOCKET \"$EGD_SOCKET\"" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070026439
26440 fi
26441
26442
26443# Check whether --with-random was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080026444if test ${with_random+y}
26445then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026446 withval=$with_random; RANDOM_FILE="$withval"
Elliott Hughesf344baa2021-12-07 09:12:34 -080026447else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070026448
26449 if test x$cross_compiling != xyes; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080026450 as_ac_File=`printf "%s\n" "ac_cv_file_"/dev/urandom"" | $as_tr_sh`
26451{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for \"/dev/urandom\"" >&5
26452printf %s "checking for \"/dev/urandom\"... " >&6; }
26453if eval test \${$as_ac_File+y}
26454then :
26455 printf %s "(cached) " >&6
26456else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070026457 test "$cross_compiling" = yes &&
26458 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
26459if test -r ""/dev/urandom""; then
26460 eval "$as_ac_File=yes"
26461else
26462 eval "$as_ac_File=no"
26463fi
26464fi
26465eval ac_res=\$$as_ac_File
Elliott Hughesf344baa2021-12-07 09:12:34 -080026466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26467printf "%s\n" "$ac_res" >&6; }
26468if eval test \"x\$"$as_ac_File"\" = x"yes"
26469then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026470 RANDOM_FILE="/dev/urandom"
26471fi
26472
26473 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080026474 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: skipped the /dev/urandom detection when cross-compiling" >&5
26475printf "%s\n" "$as_me: WARNING: skipped the /dev/urandom detection when cross-compiling" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070026476 fi
26477
26478
26479fi
26480
26481 if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
26482
26483
Elliott Hughesf344baa2021-12-07 09:12:34 -080026484printf "%s\n" "#define RANDOM_FILE \"$RANDOM_FILE\"" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070026485
26486 fi
26487fi
26488
26489if test "$OPENSSL_ENABLED" = "1"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080026490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SRP_Calc_client_key in -lcrypto" >&5
26491printf %s "checking for SRP_Calc_client_key in -lcrypto... " >&6; }
26492if test ${ac_cv_lib_crypto_SRP_Calc_client_key+y}
26493then :
26494 printf %s "(cached) " >&6
26495else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070026496 ac_check_lib_save_LIBS=$LIBS
26497LIBS="-lcrypto $LIBS"
26498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26499/* end confdefs.h. */
26500
26501
26502#ifdef __cplusplus
26503extern "C"
26504#endif
26505char SRP_Calc_client_key ();
26506int main (void)
26507{
26508return SRP_Calc_client_key ();
26509 ;
26510 return 0;
26511}
26512_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080026513if ac_fn_c_try_link "$LINENO"
26514then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026515 ac_cv_lib_crypto_SRP_Calc_client_key=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080026516else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070026517 ac_cv_lib_crypto_SRP_Calc_client_key=no
26518fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026519rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070026520 conftest$ac_exeext conftest.$ac_ext
26521LIBS=$ac_check_lib_save_LIBS
26522fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026523{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SRP_Calc_client_key" >&5
26524printf "%s\n" "$ac_cv_lib_crypto_SRP_Calc_client_key" >&6; }
26525if test "x$ac_cv_lib_crypto_SRP_Calc_client_key" = xyes
26526then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026527
26528
Elliott Hughesf344baa2021-12-07 09:12:34 -080026529printf "%s\n" "#define HAVE_OPENSSL_SRP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070026530
26531 HAVE_OPENSSL_SRP=1
26532
26533
26534fi
26535
26536fi
26537
Elliott Hughesa93fb052018-12-12 14:22:48 -080026538if test X"$OPENSSL_ENABLED" = X"1"; then
26539# Check whether --enable-openssl-auto-load-config was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080026540if test ${enable_openssl_auto_load_config+y}
26541then :
Elliott Hughesa93fb052018-12-12 14:22:48 -080026542 enableval=$enable_openssl_auto_load_config; if test X"$enableval" = X"no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080026543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: automatic loading of OpenSSL configuration disabled" >&5
26544printf "%s\n" "$as_me: automatic loading of OpenSSL configuration disabled" >&6;}
Elliott Hughesa93fb052018-12-12 14:22:48 -080026545
Elliott Hughesf344baa2021-12-07 09:12:34 -080026546printf "%s\n" "#define CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG 1" >>confdefs.h
Elliott Hughesa93fb052018-12-12 14:22:48 -080026547
26548 fi
26549
26550fi
26551
26552fi
26553
Elliott Hughes82be86d2017-09-20 17:00:17 -070026554
Elliott Hughes82be86d2017-09-20 17:00:17 -070026555
Elliott Hughes34dd5f42021-08-10 13:01:18 -070026556if test "x$OPT_GNUTLS" != xno; then
Alex Deymo486467e2017-12-19 19:04:07 +010026557 ssl_msg=
Elliott Hughes82be86d2017-09-20 17:00:17 -070026558
26559 if test X"$OPT_GNUTLS" != Xno; then
26560
26561 addld=""
26562 addlib=""
26563 gtlslib=""
26564 version=""
26565 addcflags=""
26566
26567 if test "x$OPT_GNUTLS" = "xyes"; then
26568
26569 if test -n "$PKG_CONFIG"; then
26570 PKGCONFIG="$PKG_CONFIG"
26571 else
26572 if test -n "$ac_tool_prefix"; then
26573 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
26574set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080026575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26576printf %s "checking for $ac_word... " >&6; }
26577if test ${ac_cv_path_PKGCONFIG+y}
26578then :
26579 printf %s "(cached) " >&6
26580else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070026581 case $PKGCONFIG in
26582 [\\/]* | ?:[\\/]*)
26583 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
26584 ;;
26585 *)
26586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26587as_dummy="$PATH:/usr/bin:/usr/local/bin"
26588for as_dir in $as_dummy
26589do
26590 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080026591 case $as_dir in #(((
26592 '') as_dir=./ ;;
26593 */) ;;
26594 *) as_dir=$as_dir/ ;;
26595 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070026596 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080026597 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
26598 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
26599 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070026600 break 2
26601 fi
26602done
26603 done
26604IFS=$as_save_IFS
26605
26606 ;;
26607esac
26608fi
26609PKGCONFIG=$ac_cv_path_PKGCONFIG
26610if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080026611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
26612printf "%s\n" "$PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070026613else
Elliott Hughesf344baa2021-12-07 09:12:34 -080026614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
26615printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070026616fi
26617
26618
26619fi
26620if test -z "$ac_cv_path_PKGCONFIG"; then
26621 ac_pt_PKGCONFIG=$PKGCONFIG
26622 # Extract the first word of "pkg-config", so it can be a program name with args.
26623set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080026624{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26625printf %s "checking for $ac_word... " >&6; }
26626if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
26627then :
26628 printf %s "(cached) " >&6
26629else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070026630 case $ac_pt_PKGCONFIG in
26631 [\\/]* | ?:[\\/]*)
26632 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
26633 ;;
26634 *)
26635 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26636as_dummy="$PATH:/usr/bin:/usr/local/bin"
26637for as_dir in $as_dummy
26638do
26639 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080026640 case $as_dir in #(((
26641 '') as_dir=./ ;;
26642 */) ;;
26643 *) as_dir=$as_dir/ ;;
26644 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070026645 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080026646 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
26647 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
26648 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070026649 break 2
26650 fi
26651done
26652 done
26653IFS=$as_save_IFS
26654
26655 ;;
26656esac
26657fi
26658ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
26659if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080026660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
26661printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070026662else
Elliott Hughesf344baa2021-12-07 09:12:34 -080026663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
26664printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070026665fi
26666
26667 if test "x$ac_pt_PKGCONFIG" = x; then
26668 PKGCONFIG="no"
26669 else
26670 case $cross_compiling:$ac_tool_warned in
26671yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080026672{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26673printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070026674ac_tool_warned=yes ;;
26675esac
26676 PKGCONFIG=$ac_pt_PKGCONFIG
26677 fi
26678else
26679 PKGCONFIG="$ac_cv_path_PKGCONFIG"
26680fi
26681
26682 fi
26683
26684 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080026685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gnutls options with pkg-config" >&5
26686printf %s "checking for gnutls options with pkg-config... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070026687 itexists=`
26688 if test -n ""; then
26689 PKG_CONFIG_LIBDIR=""
26690 export PKG_CONFIG_LIBDIR
26691 fi
26692 $PKGCONFIG --exists gnutls >/dev/null 2>&1 && echo 1`
26693
26694 if test -z "$itexists"; then
26695 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080026696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
26697printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070026698 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080026699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
26700printf "%s\n" "found" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070026701 fi
26702 fi
26703
26704
26705 if test "$PKGCONFIG" != "no" ; then
26706 addlib=`$PKGCONFIG --libs-only-l gnutls`
26707 addld=`$PKGCONFIG --libs-only-L gnutls`
26708 addcflags=`$PKGCONFIG --cflags-only-I gnutls`
26709 version=`$PKGCONFIG --modversion gnutls`
Haibo Huangca2a8022020-07-10 20:17:42 -070026710 gtlslib=`echo $addld | $SED -e 's/^-L//'`
Elliott Hughes82be86d2017-09-20 17:00:17 -070026711 else
26712 check=`libgnutls-config --version 2>/dev/null`
26713 if test -n "$check"; then
26714 addlib=`libgnutls-config --libs`
26715 addcflags=`libgnutls-config --cflags`
26716 version=`libgnutls-config --version`
26717 gtlslib=`libgnutls-config --prefix`/lib$libsuff
26718 fi
26719 fi
26720 else
26721 cfg=$OPT_GNUTLS/bin/libgnutls-config
26722 check=`$cfg --version 2>/dev/null`
26723 if test -n "$check"; then
26724 addlib=`$cfg --libs`
26725 addcflags=`$cfg --cflags`
26726 version=`$cfg --version`
26727 gtlslib=`$cfg --prefix`/lib$libsuff
26728 else
26729 addlib=-lgnutls
26730 addld=-L$OPT_GNUTLS/lib$libsuff
26731 addcflags=-I$OPT_GNUTLS/include
26732 version="" # we just don't know
26733 gtlslib=$OPT_GNUTLS/lib$libsuff
26734 fi
26735 fi
26736
26737 if test -z "$version"; then
26738 version="unknown"
26739 fi
26740
26741 if test -n "$addlib"; then
26742
26743 CLEANLIBS="$LIBS"
26744 CLEANCPPFLAGS="$CPPFLAGS"
26745 CLEANLDFLAGS="$LDFLAGS"
26746
26747 LIBS="$addlib $LIBS"
26748 LDFLAGS="$LDFLAGS $addld"
26749 if test "$addcflags" != "-I/usr/include"; then
26750 CPPFLAGS="$CPPFLAGS $addcflags"
26751 fi
26752
Elliott Hughesf344baa2021-12-07 09:12:34 -080026753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gnutls_x509_crt_get_dn2 in -lgnutls" >&5
26754printf %s "checking for gnutls_x509_crt_get_dn2 in -lgnutls... " >&6; }
26755if test ${ac_cv_lib_gnutls_gnutls_x509_crt_get_dn2+y}
26756then :
26757 printf %s "(cached) " >&6
26758else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070026759 ac_check_lib_save_LIBS=$LIBS
26760LIBS="-lgnutls $LIBS"
26761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26762/* end confdefs.h. */
26763
26764
26765#ifdef __cplusplus
26766extern "C"
26767#endif
Haibo Huang24c77a12020-04-29 13:49:57 -070026768char gnutls_x509_crt_get_dn2 ();
Elliott Hughes82be86d2017-09-20 17:00:17 -070026769int main (void)
26770{
Haibo Huang24c77a12020-04-29 13:49:57 -070026771return gnutls_x509_crt_get_dn2 ();
Elliott Hughes82be86d2017-09-20 17:00:17 -070026772 ;
26773 return 0;
26774}
26775_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080026776if ac_fn_c_try_link "$LINENO"
26777then :
Haibo Huang24c77a12020-04-29 13:49:57 -070026778 ac_cv_lib_gnutls_gnutls_x509_crt_get_dn2=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080026779else $as_nop
Haibo Huang24c77a12020-04-29 13:49:57 -070026780 ac_cv_lib_gnutls_gnutls_x509_crt_get_dn2=no
Elliott Hughes82be86d2017-09-20 17:00:17 -070026781fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026782rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070026783 conftest$ac_exeext conftest.$ac_ext
26784LIBS=$ac_check_lib_save_LIBS
26785fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026786{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_x509_crt_get_dn2" >&5
26787printf "%s\n" "$ac_cv_lib_gnutls_gnutls_x509_crt_get_dn2" >&6; }
26788if test "x$ac_cv_lib_gnutls_gnutls_x509_crt_get_dn2" = xyes
26789then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026790
26791
Elliott Hughesf344baa2021-12-07 09:12:34 -080026792printf "%s\n" "#define USE_GNUTLS 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070026793
26794 USE_GNUTLS=1
26795
26796 GNUTLS_ENABLED=1
26797 USE_GNUTLS="yes"
Alex Deymo486467e2017-12-19 19:04:07 +010026798 ssl_msg="GnuTLS"
26799 test gnutls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
Elliott Hughes82be86d2017-09-20 17:00:17 -070026800
Elliott Hughesf344baa2021-12-07 09:12:34 -080026801else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070026802
26803 LIBS="$CLEANLIBS"
26804 CPPFLAGS="$CLEANCPPFLAGS"
26805
26806fi
26807
26808
26809 if test "x$USE_GNUTLS" = "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080026810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: detected GnuTLS version $version" >&5
26811printf "%s\n" "$as_me: detected GnuTLS version $version" >&6;}
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070026812 check_for_ca_bundle=1
Elliott Hughes82be86d2017-09-20 17:00:17 -070026813 if test -n "$gtlslib"; then
26814 if test "x$cross_compiling" != "xyes"; then
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070026815 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$gtlslib"
26816 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080026817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $gtlslib to CURL_LIBRARY_PATH" >&5
26818printf "%s\n" "$as_me: Added $gtlslib to CURL_LIBRARY_PATH" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070026819 fi
26820 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070026821 fi
26822
26823 fi
26824
26825 fi
Alex Deymo486467e2017-12-19 19:04:07 +010026826 test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
Elliott Hughes82be86d2017-09-20 17:00:17 -070026827fi
26828
26829
26830if test "$GNUTLS_ENABLED" = "1"; then
26831 USE_GNUTLS_NETTLE=
26832 # First check if we can detect either crypto library via transitive linking
Elliott Hughesf344baa2021-12-07 09:12:34 -080026833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nettle_MD5Init in -lgnutls" >&5
26834printf %s "checking for nettle_MD5Init in -lgnutls... " >&6; }
26835if test ${ac_cv_lib_gnutls_nettle_MD5Init+y}
26836then :
26837 printf %s "(cached) " >&6
26838else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070026839 ac_check_lib_save_LIBS=$LIBS
26840LIBS="-lgnutls $LIBS"
26841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26842/* end confdefs.h. */
26843
26844
26845#ifdef __cplusplus
26846extern "C"
26847#endif
26848char nettle_MD5Init ();
26849int main (void)
26850{
26851return nettle_MD5Init ();
26852 ;
26853 return 0;
26854}
26855_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080026856if ac_fn_c_try_link "$LINENO"
26857then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026858 ac_cv_lib_gnutls_nettle_MD5Init=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080026859else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070026860 ac_cv_lib_gnutls_nettle_MD5Init=no
26861fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026862rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070026863 conftest$ac_exeext conftest.$ac_ext
26864LIBS=$ac_check_lib_save_LIBS
26865fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026866{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_nettle_MD5Init" >&5
26867printf "%s\n" "$ac_cv_lib_gnutls_nettle_MD5Init" >&6; }
26868if test "x$ac_cv_lib_gnutls_nettle_MD5Init" = xyes
26869then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026870 USE_GNUTLS_NETTLE=1
26871fi
26872
Elliott Hughes82be86d2017-09-20 17:00:17 -070026873
Elliott Hughes82be86d2017-09-20 17:00:17 -070026874 # If not, try linking directly to both of them to see if they are available
26875 if test "$USE_GNUTLS_NETTLE" = ""; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080026876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nettle_MD5Init in -lnettle" >&5
26877printf %s "checking for nettle_MD5Init in -lnettle... " >&6; }
26878if test ${ac_cv_lib_nettle_nettle_MD5Init+y}
26879then :
26880 printf %s "(cached) " >&6
26881else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070026882 ac_check_lib_save_LIBS=$LIBS
26883LIBS="-lnettle $LIBS"
26884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26885/* end confdefs.h. */
26886
26887
26888#ifdef __cplusplus
26889extern "C"
26890#endif
26891char nettle_MD5Init ();
26892int main (void)
26893{
26894return nettle_MD5Init ();
26895 ;
26896 return 0;
26897}
26898_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080026899if ac_fn_c_try_link "$LINENO"
26900then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026901 ac_cv_lib_nettle_nettle_MD5Init=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080026902else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070026903 ac_cv_lib_nettle_nettle_MD5Init=no
26904fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026905rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070026906 conftest$ac_exeext conftest.$ac_ext
26907LIBS=$ac_check_lib_save_LIBS
26908fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026909{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nettle_nettle_MD5Init" >&5
26910printf "%s\n" "$ac_cv_lib_nettle_nettle_MD5Init" >&6; }
26911if test "x$ac_cv_lib_nettle_nettle_MD5Init" = xyes
26912then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026913 USE_GNUTLS_NETTLE=1
26914fi
26915
26916 fi
26917 if test "$USE_GNUTLS_NETTLE" = ""; then
Elliott Hughes34dd5f42021-08-10 13:01:18 -070026918 as_fn_error $? "GnuTLS found, but nettle was not found" "$LINENO" 5
Elliott Hughes82be86d2017-09-20 17:00:17 -070026919 fi
Elliott Hughes34dd5f42021-08-10 13:01:18 -070026920 LIBS="-lnettle $LIBS"
Elliott Hughes82be86d2017-09-20 17:00:17 -070026921fi
26922
26923if test "$GNUTLS_ENABLED" = "1"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080026924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gnutls_srp_verifier in -lgnutls" >&5
26925printf %s "checking for gnutls_srp_verifier in -lgnutls... " >&6; }
26926if test ${ac_cv_lib_gnutls_gnutls_srp_verifier+y}
26927then :
26928 printf %s "(cached) " >&6
26929else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070026930 ac_check_lib_save_LIBS=$LIBS
26931LIBS="-lgnutls $LIBS"
26932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26933/* end confdefs.h. */
26934
26935
26936#ifdef __cplusplus
26937extern "C"
26938#endif
26939char gnutls_srp_verifier ();
26940int main (void)
26941{
26942return gnutls_srp_verifier ();
26943 ;
26944 return 0;
26945}
26946_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080026947if ac_fn_c_try_link "$LINENO"
26948then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026949 ac_cv_lib_gnutls_gnutls_srp_verifier=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080026950else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070026951 ac_cv_lib_gnutls_gnutls_srp_verifier=no
26952fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026953rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070026954 conftest$ac_exeext conftest.$ac_ext
26955LIBS=$ac_check_lib_save_LIBS
26956fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080026957{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_srp_verifier" >&5
26958printf "%s\n" "$ac_cv_lib_gnutls_gnutls_srp_verifier" >&6; }
26959if test "x$ac_cv_lib_gnutls_gnutls_srp_verifier" = xyes
26960then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070026961
26962
Elliott Hughesf344baa2021-12-07 09:12:34 -080026963printf "%s\n" "#define HAVE_GNUTLS_SRP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070026964
26965 HAVE_GNUTLS_SRP=1
26966
26967
26968fi
26969
26970fi
26971
26972
Elliott Hughes82be86d2017-09-20 17:00:17 -070026973
26974
Elliott Hughes34dd5f42021-08-10 13:01:18 -070026975if test "x$OPT_MBEDTLS" != xno; then
26976 _cppflags=$CPPFLAGS
26977 _ldflags=$LDFLAGS
Alex Deymo486467e2017-12-19 19:04:07 +010026978 ssl_msg=
Elliott Hughes82be86d2017-09-20 17:00:17 -070026979
26980 if test X"$OPT_MBEDTLS" != Xno; then
26981
26982 if test "$OPT_MBEDTLS" = "yes"; then
26983 OPT_MBEDTLS=""
26984 fi
26985
26986 if test -z "$OPT_MBEDTLS" ; then
26987
Elliott Hughesf344baa2021-12-07 09:12:34 -080026988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbedtls_havege_init in -lmbedtls" >&5
26989printf %s "checking for mbedtls_havege_init in -lmbedtls... " >&6; }
26990if test ${ac_cv_lib_mbedtls_mbedtls_havege_init+y}
26991then :
26992 printf %s "(cached) " >&6
26993else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070026994 ac_check_lib_save_LIBS=$LIBS
26995LIBS="-lmbedtls -lmbedx509 -lmbedcrypto $LIBS"
26996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26997/* end confdefs.h. */
26998
26999
27000#ifdef __cplusplus
27001extern "C"
27002#endif
27003char mbedtls_havege_init ();
27004int main (void)
27005{
27006return mbedtls_havege_init ();
27007 ;
27008 return 0;
27009}
27010_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080027011if ac_fn_c_try_link "$LINENO"
27012then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070027013 ac_cv_lib_mbedtls_mbedtls_havege_init=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080027014else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070027015 ac_cv_lib_mbedtls_mbedtls_havege_init=no
27016fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027017rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070027018 conftest$ac_exeext conftest.$ac_ext
27019LIBS=$ac_check_lib_save_LIBS
27020fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027021{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mbedtls_mbedtls_havege_init" >&5
27022printf "%s\n" "$ac_cv_lib_mbedtls_mbedtls_havege_init" >&6; }
27023if test "x$ac_cv_lib_mbedtls_mbedtls_havege_init" = xyes
27024then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070027025
27026
Elliott Hughesf344baa2021-12-07 09:12:34 -080027027printf "%s\n" "#define USE_MBEDTLS 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070027028
27029 USE_MBEDTLS=1
27030
27031 MBEDTLS_ENABLED=1
27032 USE_MBEDTLS="yes"
Alex Deymo486467e2017-12-19 19:04:07 +010027033 ssl_msg="mbedTLS"
27034 test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
Elliott Hughes82be86d2017-09-20 17:00:17 -070027035
27036fi
27037
27038 fi
27039
27040 addld=""
27041 addlib=""
27042 addcflags=""
27043 mbedtlslib=""
27044
27045 if test "x$USE_MBEDTLS" != "xyes"; then
27046 addld=-L$OPT_MBEDTLS/lib$libsuff
27047 addcflags=-I$OPT_MBEDTLS/include
27048 mbedtlslib=$OPT_MBEDTLS/lib$libsuff
27049
27050 LDFLAGS="$LDFLAGS $addld"
27051 if test "$addcflags" != "-I/usr/include"; then
27052 CPPFLAGS="$CPPFLAGS $addcflags"
27053 fi
27054
Elliott Hughesf344baa2021-12-07 09:12:34 -080027055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbedtls_ssl_init in -lmbedtls" >&5
27056printf %s "checking for mbedtls_ssl_init in -lmbedtls... " >&6; }
27057if test ${ac_cv_lib_mbedtls_mbedtls_ssl_init+y}
27058then :
27059 printf %s "(cached) " >&6
27060else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070027061 ac_check_lib_save_LIBS=$LIBS
27062LIBS="-lmbedtls -lmbedx509 -lmbedcrypto $LIBS"
27063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27064/* end confdefs.h. */
27065
27066
27067#ifdef __cplusplus
27068extern "C"
27069#endif
27070char mbedtls_ssl_init ();
27071int main (void)
27072{
27073return mbedtls_ssl_init ();
27074 ;
27075 return 0;
27076}
27077_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080027078if ac_fn_c_try_link "$LINENO"
27079then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070027080 ac_cv_lib_mbedtls_mbedtls_ssl_init=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080027081else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070027082 ac_cv_lib_mbedtls_mbedtls_ssl_init=no
27083fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027084rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070027085 conftest$ac_exeext conftest.$ac_ext
27086LIBS=$ac_check_lib_save_LIBS
27087fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027088{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mbedtls_mbedtls_ssl_init" >&5
27089printf "%s\n" "$ac_cv_lib_mbedtls_mbedtls_ssl_init" >&6; }
27090if test "x$ac_cv_lib_mbedtls_mbedtls_ssl_init" = xyes
27091then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070027092
27093
Elliott Hughesf344baa2021-12-07 09:12:34 -080027094printf "%s\n" "#define USE_MBEDTLS 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070027095
27096 USE_MBEDTLS=1
27097
27098 MBEDTLS_ENABLED=1
27099 USE_MBEDTLS="yes"
Alex Deymo486467e2017-12-19 19:04:07 +010027100 ssl_msg="mbedTLS"
27101 test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
Elliott Hughes82be86d2017-09-20 17:00:17 -070027102
Elliott Hughesf344baa2021-12-07 09:12:34 -080027103else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070027104
27105 CPPFLAGS=$_cppflags
27106 LDFLAGS=$_ldflags
27107
27108fi
27109
27110 fi
27111
27112 if test "x$USE_MBEDTLS" = "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080027113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: detected mbedTLS" >&5
27114printf "%s\n" "$as_me: detected mbedTLS" >&6;}
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070027115 check_for_ca_bundle=1
Elliott Hughes82be86d2017-09-20 17:00:17 -070027116
27117 LIBS="-lmbedtls -lmbedx509 -lmbedcrypto $LIBS"
27118
27119 if test -n "$mbedtlslib"; then
27120 if test "x$cross_compiling" != "xyes"; then
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070027121 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$mbedtlslib"
27122 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080027123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $mbedtlslib to CURL_LIBRARY_PATH" >&5
27124printf "%s\n" "$as_me: Added $mbedtlslib to CURL_LIBRARY_PATH" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070027125 fi
27126 fi
27127 fi
27128
27129 fi
Alex Deymo486467e2017-12-19 19:04:07 +010027130 test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
Elliott Hughes82be86d2017-09-20 17:00:17 -070027131fi
27132
27133
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070027134
27135
Haibo Huangca2a8022020-07-10 20:17:42 -070027136case "$OPT_WOLFSSL" in
27137 yes|no)
27138 wolfpkg=""
27139 ;;
27140 *)
27141 wolfpkg="$withval/lib/pkgconfig"
27142 ;;
27143esac
27144
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027145if test "x$OPT_WOLFSSL" != xno; then
27146 _cppflags=$CPPFLAGS
27147 _ldflags=$LDFLAGS
27148
Alex Deymo486467e2017-12-19 19:04:07 +010027149 ssl_msg=
Elliott Hughes82be86d2017-09-20 17:00:17 -070027150
Haibo Huang001784b2019-07-19 05:27:28 -070027151 if test X"$OPT_WOLFSSL" != Xno; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070027152
Haibo Huang001784b2019-07-19 05:27:28 -070027153 if test "$OPT_WOLFSSL" = "yes"; then
27154 OPT_WOLFSSL=""
Elliott Hughes82be86d2017-09-20 17:00:17 -070027155 fi
27156
Haibo Huangca2a8022020-07-10 20:17:42 -070027157
27158 if test -n "$PKG_CONFIG"; then
27159 PKGCONFIG="$PKG_CONFIG"
27160 else
27161 if test -n "$ac_tool_prefix"; then
27162 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
27163set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080027164{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27165printf %s "checking for $ac_word... " >&6; }
27166if test ${ac_cv_path_PKGCONFIG+y}
27167then :
27168 printf %s "(cached) " >&6
27169else $as_nop
Haibo Huangca2a8022020-07-10 20:17:42 -070027170 case $PKGCONFIG in
27171 [\\/]* | ?:[\\/]*)
27172 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
27173 ;;
27174 *)
27175 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27176as_dummy="$PATH:/usr/bin:/usr/local/bin"
27177for as_dir in $as_dummy
27178do
27179 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080027180 case $as_dir in #(((
27181 '') as_dir=./ ;;
27182 */) ;;
27183 *) as_dir=$as_dir/ ;;
27184 esac
Haibo Huangca2a8022020-07-10 20:17:42 -070027185 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080027186 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
27187 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
27188 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Haibo Huangca2a8022020-07-10 20:17:42 -070027189 break 2
27190 fi
27191done
27192 done
27193IFS=$as_save_IFS
27194
27195 ;;
27196esac
27197fi
27198PKGCONFIG=$ac_cv_path_PKGCONFIG
27199if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080027200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
27201printf "%s\n" "$PKGCONFIG" >&6; }
Haibo Huangca2a8022020-07-10 20:17:42 -070027202else
Elliott Hughesf344baa2021-12-07 09:12:34 -080027203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
27204printf "%s\n" "no" >&6; }
Haibo Huangca2a8022020-07-10 20:17:42 -070027205fi
27206
27207
27208fi
27209if test -z "$ac_cv_path_PKGCONFIG"; then
27210 ac_pt_PKGCONFIG=$PKGCONFIG
27211 # Extract the first word of "pkg-config", so it can be a program name with args.
27212set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080027213{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27214printf %s "checking for $ac_word... " >&6; }
27215if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
27216then :
27217 printf %s "(cached) " >&6
27218else $as_nop
Haibo Huangca2a8022020-07-10 20:17:42 -070027219 case $ac_pt_PKGCONFIG in
27220 [\\/]* | ?:[\\/]*)
27221 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
27222 ;;
27223 *)
27224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27225as_dummy="$PATH:/usr/bin:/usr/local/bin"
27226for as_dir in $as_dummy
27227do
27228 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080027229 case $as_dir in #(((
27230 '') as_dir=./ ;;
27231 */) ;;
27232 *) as_dir=$as_dir/ ;;
27233 esac
Haibo Huangca2a8022020-07-10 20:17:42 -070027234 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080027235 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
27236 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
27237 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Haibo Huangca2a8022020-07-10 20:17:42 -070027238 break 2
27239 fi
27240done
27241 done
27242IFS=$as_save_IFS
27243
27244 ;;
27245esac
27246fi
27247ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
27248if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080027249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
27250printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Haibo Huangca2a8022020-07-10 20:17:42 -070027251else
Elliott Hughesf344baa2021-12-07 09:12:34 -080027252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
27253printf "%s\n" "no" >&6; }
Haibo Huangca2a8022020-07-10 20:17:42 -070027254fi
27255
27256 if test "x$ac_pt_PKGCONFIG" = x; then
27257 PKGCONFIG="no"
27258 else
27259 case $cross_compiling:$ac_tool_warned in
27260yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080027261{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27262printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Haibo Huangca2a8022020-07-10 20:17:42 -070027263ac_tool_warned=yes ;;
27264esac
27265 PKGCONFIG=$ac_pt_PKGCONFIG
27266 fi
27267else
27268 PKGCONFIG="$ac_cv_path_PKGCONFIG"
27269fi
27270
27271 fi
27272
27273 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080027274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wolfssl options with pkg-config" >&5
27275printf %s "checking for wolfssl options with pkg-config... " >&6; }
Haibo Huangca2a8022020-07-10 20:17:42 -070027276 itexists=`
27277 if test -n "$wolfpkg"; then
27278 PKG_CONFIG_LIBDIR="$wolfpkg"
27279 export PKG_CONFIG_LIBDIR
27280 fi
27281 $PKGCONFIG --exists wolfssl >/dev/null 2>&1 && echo 1`
27282
27283 if test -z "$itexists"; then
27284 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080027285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
27286printf "%s\n" "no" >&6; }
Haibo Huangca2a8022020-07-10 20:17:42 -070027287 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080027288 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
27289printf "%s\n" "found" >&6; }
Haibo Huangca2a8022020-07-10 20:17:42 -070027290 fi
27291 fi
27292
Elliott Hughesf344baa2021-12-07 09:12:34 -080027293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Check dir $wolfpkg" >&5
27294printf "%s\n" "$as_me: Check dir $wolfpkg" >&6;}
Haibo Huangca2a8022020-07-10 20:17:42 -070027295
Elliott Hughes82be86d2017-09-20 17:00:17 -070027296 addld=""
27297 addlib=""
27298 addcflags=""
Haibo Huangca2a8022020-07-10 20:17:42 -070027299 if test "$PKGCONFIG" != "no" ; then
27300 addlib=`
27301 if test -n "$wolfpkg"; then
27302 PKG_CONFIG_LIBDIR="$wolfpkg"
27303 export PKG_CONFIG_LIBDIR
27304 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070027305
Haibo Huangca2a8022020-07-10 20:17:42 -070027306 $PKGCONFIG --libs-only-l wolfssl`
27307 addld=`
27308 if test -n "$wolfpkg"; then
27309 PKG_CONFIG_LIBDIR="$wolfpkg"
27310 export PKG_CONFIG_LIBDIR
27311 fi
27312
27313 $PKGCONFIG --libs-only-L wolfssl`
27314 addcflags=`
27315 if test -n "$wolfpkg"; then
27316 PKG_CONFIG_LIBDIR="$wolfpkg"
27317 export PKG_CONFIG_LIBDIR
27318 fi
27319
27320 $PKGCONFIG --cflags-only-I wolfssl`
27321 version=`
27322 if test -n "$wolfpkg"; then
27323 PKG_CONFIG_LIBDIR="$wolfpkg"
27324 export PKG_CONFIG_LIBDIR
27325 fi
27326
27327 $PKGCONFIG --modversion wolfssl`
27328 wolfssllibpath=`echo $addld | $SED -e 's/^-L//'`
27329 else
27330 addlib=-lwolfssl
Haibo Huangc3c04f42020-08-19 13:00:07 -070027331 if test -n "$OPT_WOLFSSL"; then
27332 addld=-L$OPT_WOLFSSL/lib$libsuff
27333 addcflags=-I$OPT_WOLFSSL/include
27334 wolfssllibpath=$OPT_WOLFSSL/lib$libsuff
27335 fi
Haibo Huangca2a8022020-07-10 20:17:42 -070027336 fi
27337
27338 if test "x$USE_WOLFSSL" != "xyes"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070027339
27340 LDFLAGS="$LDFLAGS $addld"
Elliott Hughesf344baa2021-12-07 09:12:34 -080027341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Add $addld to LDFLAGS" >&5
27342printf "%s\n" "$as_me: Add $addld to LDFLAGS" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070027343 if test "$addcflags" != "-I/usr/include"; then
27344 CPPFLAGS="$CPPFLAGS $addcflags"
Elliott Hughesf344baa2021-12-07 09:12:34 -080027345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Add $addcflags to CPPFLAGS" >&5
27346printf "%s\n" "$as_me: Add $addcflags to CPPFLAGS" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070027347 fi
27348
Elliott Hughes82be86d2017-09-20 17:00:17 -070027349 my_ac_save_LIBS="$LIBS"
Haibo Huangca2a8022020-07-10 20:17:42 -070027350 LIBS="$addlib $LIBS"
Elliott Hughesf344baa2021-12-07 09:12:34 -080027351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Add $addlib to LIBS" >&5
27352printf "%s\n" "$as_me: Add $addlib to LIBS" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070027353
Elliott Hughesf344baa2021-12-07 09:12:34 -080027354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wolfSSL_Init in -lwolfssl" >&5
27355printf %s "checking for wolfSSL_Init in -lwolfssl... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070027356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27357/* end confdefs.h. */
27358
27359
27360/* These aren't needed for detection and confuse WolfSSL.
27361 They are set up properly later if it is detected. */
27362#undef SIZEOF_LONG
27363#undef SIZEOF_LONG_LONG
Haibo Huang31944072019-11-06 02:28:57 -080027364#include <wolfssl/ssl.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070027365
27366int main (void)
27367{
27368
Haibo Huang31944072019-11-06 02:28:57 -080027369 return wolfSSL_Init();
Elliott Hughes82be86d2017-09-20 17:00:17 -070027370
27371 ;
27372 return 0;
27373}
27374
27375_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080027376if ac_fn_c_try_link "$LINENO"
27377then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070027378
Elliott Hughesf344baa2021-12-07 09:12:34 -080027379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27380printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070027381
Elliott Hughesf344baa2021-12-07 09:12:34 -080027382printf "%s\n" "#define USE_WOLFSSL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070027383
Haibo Huang001784b2019-07-19 05:27:28 -070027384 USE_WOLFSSL=1
Elliott Hughes82be86d2017-09-20 17:00:17 -070027385
Haibo Huang001784b2019-07-19 05:27:28 -070027386 WOLFSSL_ENABLED=1
27387 USE_WOLFSSL="yes"
Alex Deymo486467e2017-12-19 19:04:07 +010027388 ssl_msg="WolfSSL"
Haibo Huang31944072019-11-06 02:28:57 -080027389 test wolfssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
Elliott Hughes82be86d2017-09-20 17:00:17 -070027390
Elliott Hughesf344baa2021-12-07 09:12:34 -080027391else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070027392
Elliott Hughesf344baa2021-12-07 09:12:34 -080027393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
27394printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070027395 CPPFLAGS=$_cppflags
27396 LDFLAGS=$_ldflags
Haibo Huang31944072019-11-06 02:28:57 -080027397 wolfssllibpath=""
Elliott Hughes82be86d2017-09-20 17:00:17 -070027398
27399fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027400rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070027401 conftest$ac_exeext conftest.$ac_ext
27402 LIBS="$my_ac_save_LIBS"
27403 fi
27404
Haibo Huang001784b2019-07-19 05:27:28 -070027405 if test "x$USE_WOLFSSL" = "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080027406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: detected wolfSSL" >&5
27407printf "%s\n" "$as_me: detected wolfSSL" >&6;}
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070027408 check_for_ca_bundle=1
Elliott Hughes82be86d2017-09-20 17:00:17 -070027409
Elliott Hughesf344baa2021-12-07 09:12:34 -080027410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
27411printf %s "checking size of long long... " >&6; }
27412if test ${ac_cv_sizeof_long_long+y}
27413then :
27414 printf %s "(cached) " >&6
27415else $as_nop
Elliott Hughes72d948d2018-08-03 14:37:21 -070027416 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
27417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27418/* end confdefs.h. */
Elliott Hughes82be86d2017-09-20 17:00:17 -070027419
Elliott Hughes72d948d2018-08-03 14:37:21 -070027420#include <sys/types.h>
27421
27422
27423int main (void)
27424{
27425switch (0) case 0: case (sizeof (long long) == $ac_size):;
27426 ;
27427 return 0;
27428}
27429_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080027430if ac_fn_c_try_compile "$LINENO"
27431then :
Elliott Hughes72d948d2018-08-03 14:37:21 -070027432 ac_cv_sizeof_long_long=$ac_size
27433fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027434rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes72d948d2018-08-03 14:37:21 -070027435 if test x$ac_cv_sizeof_long_long != x ; then break; fi
27436done
27437
Elliott Hughes82be86d2017-09-20 17:00:17 -070027438fi
27439
Elliott Hughes72d948d2018-08-03 14:37:21 -070027440if test x$ac_cv_sizeof_long_long = x ; then
27441 as_fn_error $? "cannot determine a size for long long" "$LINENO" 5
Elliott Hughes82be86d2017-09-20 17:00:17 -070027442fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
27444printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070027445
Elliott Hughesf344baa2021-12-07 09:12:34 -080027446printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070027447
27448
27449
Haibo Huangc3c04f42020-08-19 13:00:07 -070027450 LIBS="$addlib -lm $LIBS"
Elliott Hughes82be86d2017-09-20 17:00:17 -070027451
Elliott Hughesf344baa2021-12-07 09:12:34 -080027452 ac_fn_c_check_func "$LINENO" "wolfSSL_get_peer_certificate" "ac_cv_func_wolfSSL_get_peer_certificate"
27453if test "x$ac_cv_func_wolfSSL_get_peer_certificate" = xyes
27454then :
27455 printf "%s\n" "#define HAVE_WOLFSSL_GET_PEER_CERTIFICATE 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070027456
27457fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027458ac_fn_c_check_func "$LINENO" "wolfSSL_UseALPN" "ac_cv_func_wolfSSL_UseALPN"
27459if test "x$ac_cv_func_wolfSSL_UseALPN" = xyes
27460then :
27461 printf "%s\n" "#define HAVE_WOLFSSL_USEALPN 1" >>confdefs.h
27462
27463fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070027464
Elliott Hughes82be86d2017-09-20 17:00:17 -070027465
Haibo Huangc3c04f42020-08-19 13:00:07 -070027466 ac_fn_c_check_func "$LINENO" "wolfSSL_DES_ecb_encrypt" "ac_cv_func_wolfSSL_DES_ecb_encrypt"
Elliott Hughesf344baa2021-12-07 09:12:34 -080027467if test "x$ac_cv_func_wolfSSL_DES_ecb_encrypt" = xyes
27468then :
Haibo Huangca2a8022020-07-10 20:17:42 -070027469
27470
Elliott Hughesf344baa2021-12-07 09:12:34 -080027471printf "%s\n" "#define HAVE_WOLFSSL_DES_ECB_ENCRYPT 1" >>confdefs.h
Haibo Huangca2a8022020-07-10 20:17:42 -070027472
Haibo Huangc3c04f42020-08-19 13:00:07 -070027473 if test -n "$addcflags"; then
Haibo Huangb5a52b92020-10-28 22:18:23 -070027474 for f in $addcflags; do
27475 CPPFLAGS="$f/wolfssl $CPPFLAGS"
Elliott Hughesf344baa2021-12-07 09:12:34 -080027476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Add $f/wolfssl to CPPFLAGS" >&5
27477printf "%s\n" "$as_me: Add $f/wolfssl to CPPFLAGS" >&6;}
Haibo Huangb5a52b92020-10-28 22:18:23 -070027478 break
27479 done
Haibo Huangc3c04f42020-08-19 13:00:07 -070027480 else
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027481 CPPFLAGS="-I/usr/include/wolfssl $CPPFLAGS"
Elliott Hughesf344baa2021-12-07 09:12:34 -080027482 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Add /usr/include/wolfssl to CPPFLAGS" >&5
27483printf "%s\n" "$as_me: Add /usr/include/wolfssl to CPPFLAGS" >&6;}
Haibo Huangc3c04f42020-08-19 13:00:07 -070027484 fi
Haibo Huangca2a8022020-07-10 20:17:42 -070027485 WOLFSSL_NTLM=1
27486
27487
27488fi
27489
27490
Haibo Huang31944072019-11-06 02:28:57 -080027491 if test -n "$wolfssllibpath"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070027492 if test "x$cross_compiling" != "xyes"; then
Haibo Huang31944072019-11-06 02:28:57 -080027493 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$wolfssllibpath"
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070027494 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080027495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $wolfssllibpath to CURL_LIBRARY_PATH" >&5
27496printf "%s\n" "$as_me: Added $wolfssllibpath to CURL_LIBRARY_PATH" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070027497 fi
27498 fi
27499
27500 fi
27501
27502 fi
Alex Deymo486467e2017-12-19 19:04:07 +010027503 test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
Elliott Hughes82be86d2017-09-20 17:00:17 -070027504fi
27505
27506
Elliott Hughesa93fb052018-12-12 14:22:48 -080027507
27508
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027509if test "x$OPT_MESALINK" != xno; then
27510 _cppflags=$CPPFLAGS
27511 _ldflags=$LDFLAGS
Elliott Hughesa93fb052018-12-12 14:22:48 -080027512 ssl_msg=
27513
27514 if test X"$OPT_MESALINK" != Xno; then
27515
27516 if test "$OPT_MESALINK" = "yes"; then
27517 OPT_MESALINK=""
27518 fi
27519
27520 if test -z "$OPT_MESALINK" ; then
27521
Elliott Hughesf344baa2021-12-07 09:12:34 -080027522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mesalink_library_init in -lmesalink" >&5
27523printf %s "checking for mesalink_library_init in -lmesalink... " >&6; }
27524if test ${ac_cv_lib_mesalink_mesalink_library_init+y}
27525then :
27526 printf %s "(cached) " >&6
27527else $as_nop
Elliott Hughesa93fb052018-12-12 14:22:48 -080027528 ac_check_lib_save_LIBS=$LIBS
27529LIBS="-lmesalink $LIBS"
27530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27531/* end confdefs.h. */
27532
27533
27534#ifdef __cplusplus
27535extern "C"
27536#endif
27537char mesalink_library_init ();
27538int main (void)
27539{
27540return mesalink_library_init ();
27541 ;
27542 return 0;
27543}
27544_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080027545if ac_fn_c_try_link "$LINENO"
27546then :
Elliott Hughesa93fb052018-12-12 14:22:48 -080027547 ac_cv_lib_mesalink_mesalink_library_init=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080027548else $as_nop
Elliott Hughesa93fb052018-12-12 14:22:48 -080027549 ac_cv_lib_mesalink_mesalink_library_init=no
27550fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027551rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughesa93fb052018-12-12 14:22:48 -080027552 conftest$ac_exeext conftest.$ac_ext
27553LIBS=$ac_check_lib_save_LIBS
27554fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027555{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mesalink_mesalink_library_init" >&5
27556printf "%s\n" "$ac_cv_lib_mesalink_mesalink_library_init" >&6; }
27557if test "x$ac_cv_lib_mesalink_mesalink_library_init" = xyes
27558then :
Elliott Hughesa93fb052018-12-12 14:22:48 -080027559
27560
Elliott Hughesf344baa2021-12-07 09:12:34 -080027561printf "%s\n" "#define USE_MESALINK 1" >>confdefs.h
Elliott Hughesa93fb052018-12-12 14:22:48 -080027562
27563 USE_MESALINK=1
27564
27565 MESALINK_ENABLED=1
27566 USE_MESALINK="yes"
27567 ssl_msg="MesaLink"
27568 test mesalink != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
27569
27570fi
27571
27572 fi
27573
27574 addld=""
27575 addlib=""
27576 addcflags=""
27577 mesalinklib=""
27578
27579 if test "x$USE_MESALINK" != "xyes"; then
27580 addld=-L$OPT_MESALINK/lib$libsuff
27581 addcflags=-I$OPT_MESALINK/include
27582 mesalinklib=$OPT_MESALINK/lib$libsuff
27583
27584 LDFLAGS="$LDFLAGS $addld"
27585 if test "$addcflags" != "-I/usr/include"; then
27586 CPPFLAGS="$CPPFLAGS $addcflags"
27587 fi
27588
Elliott Hughesf344baa2021-12-07 09:12:34 -080027589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mesalink_library_init in -lmesalink" >&5
27590printf %s "checking for mesalink_library_init in -lmesalink... " >&6; }
27591if test ${ac_cv_lib_mesalink_mesalink_library_init+y}
27592then :
27593 printf %s "(cached) " >&6
27594else $as_nop
Elliott Hughesa93fb052018-12-12 14:22:48 -080027595 ac_check_lib_save_LIBS=$LIBS
27596LIBS="-lmesalink $LIBS"
27597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27598/* end confdefs.h. */
27599
27600
27601#ifdef __cplusplus
27602extern "C"
27603#endif
27604char mesalink_library_init ();
27605int main (void)
27606{
27607return mesalink_library_init ();
27608 ;
27609 return 0;
27610}
27611_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080027612if ac_fn_c_try_link "$LINENO"
27613then :
Elliott Hughesa93fb052018-12-12 14:22:48 -080027614 ac_cv_lib_mesalink_mesalink_library_init=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080027615else $as_nop
Elliott Hughesa93fb052018-12-12 14:22:48 -080027616 ac_cv_lib_mesalink_mesalink_library_init=no
27617fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027618rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughesa93fb052018-12-12 14:22:48 -080027619 conftest$ac_exeext conftest.$ac_ext
27620LIBS=$ac_check_lib_save_LIBS
27621fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027622{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mesalink_mesalink_library_init" >&5
27623printf "%s\n" "$ac_cv_lib_mesalink_mesalink_library_init" >&6; }
27624if test "x$ac_cv_lib_mesalink_mesalink_library_init" = xyes
27625then :
Elliott Hughesa93fb052018-12-12 14:22:48 -080027626
27627
Elliott Hughesf344baa2021-12-07 09:12:34 -080027628printf "%s\n" "#define USE_MESALINK 1" >>confdefs.h
Elliott Hughesa93fb052018-12-12 14:22:48 -080027629
27630 USE_MESALINK=1
27631
27632 MESALINK_ENABLED=1
27633 USE_MESALINK="yes"
27634 ssl_msg="MesaLink"
27635 test mesalink != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
27636
Elliott Hughesf344baa2021-12-07 09:12:34 -080027637else $as_nop
Elliott Hughesa93fb052018-12-12 14:22:48 -080027638
27639 CPPFLAGS=$_cppflags
27640 LDFLAGS=$_ldflags
27641
27642fi
27643
27644 fi
27645
27646 if test "x$USE_MESALINK" = "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080027647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: detected MesaLink" >&5
27648printf "%s\n" "$as_me: detected MesaLink" >&6;}
Elliott Hughesa93fb052018-12-12 14:22:48 -080027649
27650 LIBS="-lmesalink $LIBS"
27651
27652 if test -n "$mesalinklib"; then
27653 if test "x$cross_compiling" != "xyes"; then
27654 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$mesalinklib"
27655 export LD_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080027656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $mesalinklib to LD_LIBRARY_PATH" >&5
27657printf "%s\n" "$as_me: Added $mesalinklib to LD_LIBRARY_PATH" >&6;}
Elliott Hughesa93fb052018-12-12 14:22:48 -080027658 fi
27659 fi
27660 fi
27661
27662 fi
27663 test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
27664fi
27665
27666
Haibo Huangb51266f2020-03-04 02:22:48 -080027667
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027668if test "x$OPT_BEARSSL" != xno; then
27669 _cppflags=$CPPFLAGS
27670 _ldflags=$LDFLAGS
Haibo Huangb51266f2020-03-04 02:22:48 -080027671 ssl_msg=
27672
27673 if test X"$OPT_BEARSSL" != Xno; then
27674
27675 if test "$OPT_BEARSSL" = "yes"; then
27676 OPT_BEARSSL=""
27677 fi
27678
27679 if test -z "$OPT_BEARSSL" ; then
27680
Elliott Hughesf344baa2021-12-07 09:12:34 -080027681 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for br_ssl_client_init_full in -lbearssl" >&5
27682printf %s "checking for br_ssl_client_init_full in -lbearssl... " >&6; }
27683if test ${ac_cv_lib_bearssl_br_ssl_client_init_full+y}
27684then :
27685 printf %s "(cached) " >&6
27686else $as_nop
Haibo Huangb51266f2020-03-04 02:22:48 -080027687 ac_check_lib_save_LIBS=$LIBS
27688LIBS="-lbearssl -lbearssl $LIBS"
27689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27690/* end confdefs.h. */
27691
27692
27693#ifdef __cplusplus
27694extern "C"
27695#endif
27696char br_ssl_client_init_full ();
27697int main (void)
27698{
27699return br_ssl_client_init_full ();
27700 ;
27701 return 0;
27702}
27703_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080027704if ac_fn_c_try_link "$LINENO"
27705then :
Haibo Huangb51266f2020-03-04 02:22:48 -080027706 ac_cv_lib_bearssl_br_ssl_client_init_full=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080027707else $as_nop
Haibo Huangb51266f2020-03-04 02:22:48 -080027708 ac_cv_lib_bearssl_br_ssl_client_init_full=no
27709fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027710rm -f core conftest.err conftest.$ac_objext conftest.beam \
Haibo Huangb51266f2020-03-04 02:22:48 -080027711 conftest$ac_exeext conftest.$ac_ext
27712LIBS=$ac_check_lib_save_LIBS
27713fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027714{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bearssl_br_ssl_client_init_full" >&5
27715printf "%s\n" "$ac_cv_lib_bearssl_br_ssl_client_init_full" >&6; }
27716if test "x$ac_cv_lib_bearssl_br_ssl_client_init_full" = xyes
27717then :
Haibo Huangb51266f2020-03-04 02:22:48 -080027718
27719
Elliott Hughesf344baa2021-12-07 09:12:34 -080027720printf "%s\n" "#define USE_BEARSSL 1" >>confdefs.h
Haibo Huangb51266f2020-03-04 02:22:48 -080027721
27722 USE_BEARSSL=1
27723
27724 BEARSSL_ENABLED=1
27725 USE_BEARSSL="yes"
27726 ssl_msg="BearSSL"
27727 test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
27728
27729fi
27730
27731 fi
27732
27733 addld=""
27734 addlib=""
27735 addcflags=""
27736 bearssllib=""
27737
27738 if test "x$USE_BEARSSL" != "xyes"; then
27739 addld=-L$OPT_BEARSSL/lib$libsuff
27740 addcflags=-I$OPT_BEARSSL/include
27741 bearssllib=$OPT_BEARSSL/lib$libsuff
27742
27743 LDFLAGS="$LDFLAGS $addld"
27744 if test "$addcflags" != "-I/usr/include"; then
27745 CPPFLAGS="$CPPFLAGS $addcflags"
27746 fi
27747
Elliott Hughesf344baa2021-12-07 09:12:34 -080027748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for br_ssl_client_init_full in -lbearssl" >&5
27749printf %s "checking for br_ssl_client_init_full in -lbearssl... " >&6; }
27750if test ${ac_cv_lib_bearssl_br_ssl_client_init_full+y}
27751then :
27752 printf %s "(cached) " >&6
27753else $as_nop
Haibo Huangb51266f2020-03-04 02:22:48 -080027754 ac_check_lib_save_LIBS=$LIBS
27755LIBS="-lbearssl -lbearssl $LIBS"
27756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27757/* end confdefs.h. */
27758
27759
27760#ifdef __cplusplus
27761extern "C"
27762#endif
27763char br_ssl_client_init_full ();
27764int main (void)
27765{
27766return br_ssl_client_init_full ();
27767 ;
27768 return 0;
27769}
27770_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080027771if ac_fn_c_try_link "$LINENO"
27772then :
Haibo Huangb51266f2020-03-04 02:22:48 -080027773 ac_cv_lib_bearssl_br_ssl_client_init_full=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080027774else $as_nop
Haibo Huangb51266f2020-03-04 02:22:48 -080027775 ac_cv_lib_bearssl_br_ssl_client_init_full=no
27776fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027777rm -f core conftest.err conftest.$ac_objext conftest.beam \
Haibo Huangb51266f2020-03-04 02:22:48 -080027778 conftest$ac_exeext conftest.$ac_ext
27779LIBS=$ac_check_lib_save_LIBS
27780fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027781{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bearssl_br_ssl_client_init_full" >&5
27782printf "%s\n" "$ac_cv_lib_bearssl_br_ssl_client_init_full" >&6; }
27783if test "x$ac_cv_lib_bearssl_br_ssl_client_init_full" = xyes
27784then :
Haibo Huangb51266f2020-03-04 02:22:48 -080027785
27786
Elliott Hughesf344baa2021-12-07 09:12:34 -080027787printf "%s\n" "#define USE_BEARSSL 1" >>confdefs.h
Haibo Huangb51266f2020-03-04 02:22:48 -080027788
27789 USE_BEARSSL=1
27790
27791 BEARSSL_ENABLED=1
27792 USE_BEARSSL="yes"
27793 ssl_msg="BearSSL"
27794 test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
27795
Elliott Hughesf344baa2021-12-07 09:12:34 -080027796else $as_nop
Haibo Huangb51266f2020-03-04 02:22:48 -080027797
27798 CPPFLAGS=$_cppflags
27799 LDFLAGS=$_ldflags
27800
27801fi
27802
27803 fi
27804
27805 if test "x$USE_BEARSSL" = "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080027806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: detected BearSSL" >&5
27807printf "%s\n" "$as_me: detected BearSSL" >&6;}
Haibo Huangb51266f2020-03-04 02:22:48 -080027808 check_for_ca_bundle=1
27809
27810 LIBS="-lbearssl $LIBS"
27811
27812 if test -n "$bearssllib"; then
27813 if test "x$cross_compiling" != "xyes"; then
27814 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$bearssllib"
27815 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080027816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $bearssllib to CURL_LIBRARY_PATH" >&5
27817printf "%s\n" "$as_me: Added $bearssllib to CURL_LIBRARY_PATH" >&6;}
Haibo Huangb51266f2020-03-04 02:22:48 -080027818 fi
27819 fi
27820 fi
27821
27822 fi
27823 test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
27824fi
27825
27826
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027827
27828if test "x$OPT_RUSTLS" != xno; then
27829 _cppflags=$CPPFLAGS
27830 _ldflags=$LDFLAGS
27831 ssl_msg=
27832
27833 if test X"$OPT_RUSTLS" != Xno; then
27834
27835 if test "$OPT_RUSTLS" = "yes"; then
27836 OPT_RUSTLS=""
27837 fi
27838
27839 if test -z "$OPT_RUSTLS" ; then
27840
Elliott Hughesf344baa2021-12-07 09:12:34 -080027841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rustls_client_session_read in -lcrustls" >&5
27842printf %s "checking for rustls_client_session_read in -lcrustls... " >&6; }
27843if test ${ac_cv_lib_crustls_rustls_client_session_read+y}
27844then :
27845 printf %s "(cached) " >&6
27846else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027847 ac_check_lib_save_LIBS=$LIBS
27848LIBS="-lcrustls -lpthread -ldl $LIBS"
27849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27850/* end confdefs.h. */
Elliott Hughes82be86d2017-09-20 17:00:17 -070027851
27852
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027853#ifdef __cplusplus
27854extern "C"
27855#endif
27856char rustls_client_session_read ();
27857int main (void)
27858{
27859return rustls_client_session_read ();
27860 ;
27861 return 0;
27862}
27863_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080027864if ac_fn_c_try_link "$LINENO"
27865then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027866 ac_cv_lib_crustls_rustls_client_session_read=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080027867else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027868 ac_cv_lib_crustls_rustls_client_session_read=no
27869fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027870rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027871 conftest$ac_exeext conftest.$ac_ext
27872LIBS=$ac_check_lib_save_LIBS
27873fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027874{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crustls_rustls_client_session_read" >&5
27875printf "%s\n" "$ac_cv_lib_crustls_rustls_client_session_read" >&6; }
27876if test "x$ac_cv_lib_crustls_rustls_client_session_read" = xyes
27877then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027878
27879
Elliott Hughesf344baa2021-12-07 09:12:34 -080027880printf "%s\n" "#define USE_RUSTLS 1" >>confdefs.h
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027881
27882 USE_RUSTLS=1
27883
27884 RUSTLS_ENABLED=1
27885 USE_RUSTLS="yes"
27886 ssl_msg="rustls"
27887 test rustls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
27888
27889fi
27890
27891 fi
27892
27893 addld=""
27894 addlib="-lpthread"
27895 addcflags=""
27896 bearssllib=""
27897
27898 if test "x$USE_RUSTLS" != "xyes"; then
27899 addld=-L$OPT_RUSTLS/lib$libsuff
27900 addcflags=-I$OPT_RUSTLS/include
27901 rustlslib=$OPT_RUSTLS/lib$libsuff
27902
27903 LDFLAGS="$LDFLAGS $addld"
27904 if test "$addcflags" != "-I/usr/include"; then
27905 CPPFLAGS="$CPPFLAGS $addcflags"
27906 fi
27907
Elliott Hughesf344baa2021-12-07 09:12:34 -080027908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rustls_connection_read in -lcrustls" >&5
27909printf %s "checking for rustls_connection_read in -lcrustls... " >&6; }
27910if test ${ac_cv_lib_crustls_rustls_connection_read+y}
27911then :
27912 printf %s "(cached) " >&6
27913else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027914 ac_check_lib_save_LIBS=$LIBS
27915LIBS="-lcrustls -lpthread -ldl $LIBS"
27916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27917/* end confdefs.h. */
27918
27919
27920#ifdef __cplusplus
27921extern "C"
27922#endif
27923char rustls_connection_read ();
27924int main (void)
27925{
27926return rustls_connection_read ();
27927 ;
27928 return 0;
27929}
27930_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080027931if ac_fn_c_try_link "$LINENO"
27932then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027933 ac_cv_lib_crustls_rustls_connection_read=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080027934else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027935 ac_cv_lib_crustls_rustls_connection_read=no
27936fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027937rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027938 conftest$ac_exeext conftest.$ac_ext
27939LIBS=$ac_check_lib_save_LIBS
27940fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080027941{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crustls_rustls_connection_read" >&5
27942printf "%s\n" "$ac_cv_lib_crustls_rustls_connection_read" >&6; }
27943if test "x$ac_cv_lib_crustls_rustls_connection_read" = xyes
27944then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027945
27946
Elliott Hughesf344baa2021-12-07 09:12:34 -080027947printf "%s\n" "#define USE_RUSTLS 1" >>confdefs.h
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027948
27949 USE_RUSTLS=1
27950
27951 RUSTLS_ENABLED=1
27952 USE_RUSTLS="yes"
27953 ssl_msg="rustls"
27954 test rustls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
27955
Elliott Hughesf344baa2021-12-07 09:12:34 -080027956else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027957 as_fn_error $? "--with-rustls was specified but could not find rustls." "$LINENO" 5
27958fi
27959
27960 fi
27961
27962 if test "x$USE_RUSTLS" = "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080027963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: detected rustls" >&5
27964printf "%s\n" "$as_me: detected rustls" >&6;}
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027965 check_for_ca_bundle=1
27966
27967 LIBS="-lcrustls -lpthread -ldl $LIBS"
27968
27969 if test -n "$rustlslib"; then
27970 if test "x$cross_compiling" != "xyes"; then
27971 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$rustlslib"
27972 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080027973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $rustlslib to CURL_LIBRARY_PATH" >&5
27974printf "%s\n" "$as_me: Added $rustlslib to CURL_LIBRARY_PATH" >&6;}
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027975 fi
27976 fi
27977 fi
27978
27979 fi
27980 test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
Elliott Hughes82be86d2017-09-20 17:00:17 -070027981fi
27982
27983
Elliott Hughes34dd5f42021-08-10 13:01:18 -070027984if test "x$OPT_NSS" != xno; then
Alex Deymo486467e2017-12-19 19:04:07 +010027985 ssl_msg=
Elliott Hughes82be86d2017-09-20 17:00:17 -070027986
27987 if test X"$OPT_NSS" != Xno; then
27988
27989 addld=""
27990 addlib=""
27991 addcflags=""
27992 nssprefix=""
27993 version=""
27994
27995 if test "x$OPT_NSS" = "xyes"; then
27996
27997
27998 if test -n "$PKG_CONFIG"; then
27999 PKGCONFIG="$PKG_CONFIG"
28000 else
28001 if test -n "$ac_tool_prefix"; then
28002 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
28003set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080028004{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28005printf %s "checking for $ac_word... " >&6; }
28006if test ${ac_cv_path_PKGCONFIG+y}
28007then :
28008 printf %s "(cached) " >&6
28009else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070028010 case $PKGCONFIG in
28011 [\\/]* | ?:[\\/]*)
28012 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
28013 ;;
28014 *)
28015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28016as_dummy="$PATH:/usr/bin:/usr/local/bin"
28017for as_dir in $as_dummy
28018do
28019 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080028020 case $as_dir in #(((
28021 '') as_dir=./ ;;
28022 */) ;;
28023 *) as_dir=$as_dir/ ;;
28024 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070028025 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080028026 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
28027 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
28028 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070028029 break 2
28030 fi
28031done
28032 done
28033IFS=$as_save_IFS
28034
28035 ;;
28036esac
28037fi
28038PKGCONFIG=$ac_cv_path_PKGCONFIG
28039if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080028040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
28041printf "%s\n" "$PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028042else
Elliott Hughesf344baa2021-12-07 09:12:34 -080028043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
28044printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028045fi
28046
28047
28048fi
28049if test -z "$ac_cv_path_PKGCONFIG"; then
28050 ac_pt_PKGCONFIG=$PKGCONFIG
28051 # Extract the first word of "pkg-config", so it can be a program name with args.
28052set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080028053{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28054printf %s "checking for $ac_word... " >&6; }
28055if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
28056then :
28057 printf %s "(cached) " >&6
28058else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070028059 case $ac_pt_PKGCONFIG in
28060 [\\/]* | ?:[\\/]*)
28061 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
28062 ;;
28063 *)
28064 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28065as_dummy="$PATH:/usr/bin:/usr/local/bin"
28066for as_dir in $as_dummy
28067do
28068 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080028069 case $as_dir in #(((
28070 '') as_dir=./ ;;
28071 */) ;;
28072 *) as_dir=$as_dir/ ;;
28073 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070028074 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080028075 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
28076 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
28077 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070028078 break 2
28079 fi
28080done
28081 done
28082IFS=$as_save_IFS
28083
28084 ;;
28085esac
28086fi
28087ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
28088if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080028089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
28090printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028091else
Elliott Hughesf344baa2021-12-07 09:12:34 -080028092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
28093printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028094fi
28095
28096 if test "x$ac_pt_PKGCONFIG" = x; then
28097 PKGCONFIG="no"
28098 else
28099 case $cross_compiling:$ac_tool_warned in
28100yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080028101{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28102printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070028103ac_tool_warned=yes ;;
28104esac
28105 PKGCONFIG=$ac_pt_PKGCONFIG
28106 fi
28107else
28108 PKGCONFIG="$ac_cv_path_PKGCONFIG"
28109fi
28110
28111 fi
28112
28113 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080028114 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nss options with pkg-config" >&5
28115printf %s "checking for nss options with pkg-config... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028116 itexists=`
28117 if test -n ""; then
28118 PKG_CONFIG_LIBDIR=""
28119 export PKG_CONFIG_LIBDIR
28120 fi
28121 $PKGCONFIG --exists nss >/dev/null 2>&1 && echo 1`
28122
28123 if test -z "$itexists"; then
28124 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080028125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
28126printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028127 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080028128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
28129printf "%s\n" "found" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028130 fi
28131 fi
28132
28133
28134 if test "$PKGCONFIG" != "no" ; then
28135 addlib=`$PKGCONFIG --libs nss`
28136 addcflags=`$PKGCONFIG --cflags nss`
28137 version=`$PKGCONFIG --modversion nss`
28138 nssprefix=`$PKGCONFIG --variable=prefix nss`
28139 else
28140
28141 check=`nss-config --version 2>/dev/null`
28142 if test -n "$check"; then
28143 addlib=`nss-config --libs`
28144 addcflags=`nss-config --cflags`
28145 version=`nss-config --version`
28146 nssprefix=`nss-config --prefix`
28147 else
28148 addlib="-lnss3"
28149 addcflags=""
28150 version="unknown"
28151 fi
28152 fi
28153 else
28154 NSS_PCDIR="$OPT_NSS/lib/pkgconfig"
28155 if test -f "$NSS_PCDIR/nss.pc"; then
28156
28157 if test -n "$PKG_CONFIG"; then
28158 PKGCONFIG="$PKG_CONFIG"
28159 else
28160 if test -n "$ac_tool_prefix"; then
28161 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
28162set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080028163{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28164printf %s "checking for $ac_word... " >&6; }
28165if test ${ac_cv_path_PKGCONFIG+y}
28166then :
28167 printf %s "(cached) " >&6
28168else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070028169 case $PKGCONFIG in
28170 [\\/]* | ?:[\\/]*)
28171 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
28172 ;;
28173 *)
28174 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28175as_dummy="$PATH:/usr/bin:/usr/local/bin"
28176for as_dir in $as_dummy
28177do
28178 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080028179 case $as_dir in #(((
28180 '') as_dir=./ ;;
28181 */) ;;
28182 *) as_dir=$as_dir/ ;;
28183 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070028184 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080028185 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
28186 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
28187 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070028188 break 2
28189 fi
28190done
28191 done
28192IFS=$as_save_IFS
28193
28194 ;;
28195esac
28196fi
28197PKGCONFIG=$ac_cv_path_PKGCONFIG
28198if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080028199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
28200printf "%s\n" "$PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028201else
Elliott Hughesf344baa2021-12-07 09:12:34 -080028202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
28203printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028204fi
28205
28206
28207fi
28208if test -z "$ac_cv_path_PKGCONFIG"; then
28209 ac_pt_PKGCONFIG=$PKGCONFIG
28210 # Extract the first word of "pkg-config", so it can be a program name with args.
28211set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080028212{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28213printf %s "checking for $ac_word... " >&6; }
28214if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
28215then :
28216 printf %s "(cached) " >&6
28217else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070028218 case $ac_pt_PKGCONFIG in
28219 [\\/]* | ?:[\\/]*)
28220 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
28221 ;;
28222 *)
28223 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28224as_dummy="$PATH:/usr/bin:/usr/local/bin"
28225for as_dir in $as_dummy
28226do
28227 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080028228 case $as_dir in #(((
28229 '') as_dir=./ ;;
28230 */) ;;
28231 *) as_dir=$as_dir/ ;;
28232 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070028233 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080028234 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
28235 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
28236 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070028237 break 2
28238 fi
28239done
28240 done
28241IFS=$as_save_IFS
28242
28243 ;;
28244esac
28245fi
28246ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
28247if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080028248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
28249printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028250else
Elliott Hughesf344baa2021-12-07 09:12:34 -080028251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
28252printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028253fi
28254
28255 if test "x$ac_pt_PKGCONFIG" = x; then
28256 PKGCONFIG="no"
28257 else
28258 case $cross_compiling:$ac_tool_warned in
28259yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080028260{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28261printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070028262ac_tool_warned=yes ;;
28263esac
28264 PKGCONFIG=$ac_pt_PKGCONFIG
28265 fi
28266else
28267 PKGCONFIG="$ac_cv_path_PKGCONFIG"
28268fi
28269
28270 fi
28271
28272 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080028273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nss options with pkg-config" >&5
28274printf %s "checking for nss options with pkg-config... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028275 itexists=`
28276 if test -n "$NSS_PCDIR"; then
28277 PKG_CONFIG_LIBDIR="$NSS_PCDIR"
28278 export PKG_CONFIG_LIBDIR
28279 fi
28280 $PKGCONFIG --exists nss >/dev/null 2>&1 && echo 1`
28281
28282 if test -z "$itexists"; then
28283 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080028284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
28285printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028286 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080028287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
28288printf "%s\n" "found" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028289 fi
28290 fi
28291
28292 if test "$PKGCONFIG" != "no" ; then
28293 addld=`
28294 if test -n "$NSS_PCDIR"; then
28295 PKG_CONFIG_LIBDIR="$NSS_PCDIR"
28296 export PKG_CONFIG_LIBDIR
28297 fi
28298 $PKGCONFIG --libs-only-L nss`
28299 addlib=`
28300 if test -n "$NSS_PCDIR"; then
28301 PKG_CONFIG_LIBDIR="$NSS_PCDIR"
28302 export PKG_CONFIG_LIBDIR
28303 fi
28304 $PKGCONFIG --libs-only-l nss`
28305 addcflags=`
28306 if test -n "$NSS_PCDIR"; then
28307 PKG_CONFIG_LIBDIR="$NSS_PCDIR"
28308 export PKG_CONFIG_LIBDIR
28309 fi
28310 $PKGCONFIG --cflags nss`
28311 version=`
28312 if test -n "$NSS_PCDIR"; then
28313 PKG_CONFIG_LIBDIR="$NSS_PCDIR"
28314 export PKG_CONFIG_LIBDIR
28315 fi
28316 $PKGCONFIG --modversion nss`
28317 nssprefix=`
28318 if test -n "$NSS_PCDIR"; then
28319 PKG_CONFIG_LIBDIR="$NSS_PCDIR"
28320 export PKG_CONFIG_LIBDIR
28321 fi
28322 $PKGCONFIG --variable=prefix nss`
28323 fi
28324 fi
28325 fi
28326
28327 if test -z "$addlib"; then
28328 # Without pkg-config, we'll kludge in some defaults
Elliott Hughesf344baa2021-12-07 09:12:34 -080028329 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Using hard-wired libraries and compilation flags for NSS." >&5
28330printf "%s\n" "$as_me: WARNING: Using hard-wired libraries and compilation flags for NSS." >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070028331 addld="-L$OPT_NSS/lib"
28332 addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4"
28333 addcflags="-I$OPT_NSS/include"
28334 version="unknown"
28335 nssprefix=$OPT_NSS
28336 fi
28337
28338 CLEANLDFLAGS="$LDFLAGS"
28339 CLEANLIBS="$LIBS"
28340 CLEANCPPFLAGS="$CPPFLAGS"
28341
28342 LDFLAGS="$addld $LDFLAGS"
28343 LIBS="$addlib $LIBS"
28344 if test "$addcflags" != "-I/usr/include"; then
28345 CPPFLAGS="$CPPFLAGS $addcflags"
28346 fi
28347
Elliott Hughesf344baa2021-12-07 09:12:34 -080028348 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_VersionRangeSet in -lnss3" >&5
28349printf %s "checking for SSL_VersionRangeSet in -lnss3... " >&6; }
28350if test ${ac_cv_lib_nss3_SSL_VersionRangeSet+y}
28351then :
28352 printf %s "(cached) " >&6
28353else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070028354 ac_check_lib_save_LIBS=$LIBS
28355LIBS="-lnss3 $LIBS"
28356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28357/* end confdefs.h. */
28358
28359
28360#ifdef __cplusplus
28361extern "C"
28362#endif
28363char SSL_VersionRangeSet ();
28364int main (void)
28365{
28366return SSL_VersionRangeSet ();
28367 ;
28368 return 0;
28369}
28370_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080028371if ac_fn_c_try_link "$LINENO"
28372then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070028373 ac_cv_lib_nss3_SSL_VersionRangeSet=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080028374else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070028375 ac_cv_lib_nss3_SSL_VersionRangeSet=no
28376fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080028377rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070028378 conftest$ac_exeext conftest.$ac_ext
28379LIBS=$ac_check_lib_save_LIBS
28380fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080028381{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_SSL_VersionRangeSet" >&5
28382printf "%s\n" "$ac_cv_lib_nss3_SSL_VersionRangeSet" >&6; }
28383if test "x$ac_cv_lib_nss3_SSL_VersionRangeSet" = xyes
28384then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070028385
28386
Elliott Hughesf344baa2021-12-07 09:12:34 -080028387printf "%s\n" "#define USE_NSS 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070028388
28389 USE_NSS=1
28390
28391 USE_NSS="yes"
28392 NSS_ENABLED=1
Alex Deymo486467e2017-12-19 19:04:07 +010028393 ssl_msg="NSS"
28394 test nss != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
Elliott Hughes82be86d2017-09-20 17:00:17 -070028395
Elliott Hughesf344baa2021-12-07 09:12:34 -080028396else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070028397
28398 LDFLAGS="$CLEANLDFLAGS"
28399 LIBS="$CLEANLIBS"
28400 CPPFLAGS="$CLEANCPPFLAGS"
28401
28402fi
28403
28404
28405 if test "x$USE_NSS" = "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080028406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: detected NSS version $version" >&5
28407printf "%s\n" "$as_me: detected NSS version $version" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070028408
Elliott Hughescac39802018-04-27 16:19:43 -070028409 ac_fn_c_check_func "$LINENO" "PK11_CreateManagedGenericObject" "ac_cv_func_PK11_CreateManagedGenericObject"
Elliott Hughesf344baa2021-12-07 09:12:34 -080028410if test "x$ac_cv_func_PK11_CreateManagedGenericObject" = xyes
28411then :
Elliott Hughescac39802018-04-27 16:19:43 -070028412
28413
Elliott Hughesf344baa2021-12-07 09:12:34 -080028414printf "%s\n" "#define HAVE_PK11_CREATEMANAGEDGENERICOBJECT 1" >>confdefs.h
Elliott Hughescac39802018-04-27 16:19:43 -070028415
28416
28417fi
28418
28419
Elliott Hughes82be86d2017-09-20 17:00:17 -070028420 NSS_LIBS=$addlib
28421
28422
28423 if test "x$cross_compiling" != "xyes"; then
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070028424 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$nssprefix/lib$libsuff"
28425 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080028426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $nssprefix/lib$libsuff to CURL_LIBRARY_PATH" >&5
28427printf "%s\n" "$as_me: Added $nssprefix/lib$libsuff to CURL_LIBRARY_PATH" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070028428 fi
28429
28430 fi
28431 fi
Alex Deymo486467e2017-12-19 19:04:07 +010028432 test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
Elliott Hughes82be86d2017-09-20 17:00:17 -070028433fi
Alex Deymo486467e2017-12-19 19:04:07 +010028434
Elliott Hughes34dd5f42021-08-10 13:01:18 -070028435
28436
28437if test "x$USE_WIN32_CRYPTO" = "x1" -o "x$USE_SCHANNEL" = "x1"; then
28438 LIBS="-ladvapi32 -lcrypt32 $LIBS"
28439fi
28440
28441case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$MESALINK_ENABLED$BEARSSL_ENABLED$AMISSL_ENABLED$RUSTLS_ENABLED"
28442in
Alex Deymo486467e2017-12-19 19:04:07 +010028443x)
Elliott Hughesf344baa2021-12-07 09:12:34 -080028444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more." >&5
28445printf "%s\n" "$as_me: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more." >&2;}
28446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink, --with-amissl, --with-bearssl or --with-rustls to address this." >&5
28447printf "%s\n" "$as_me: WARNING: Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink, --with-amissl, --with-bearssl or --with-rustls to address this." >&2;}
Alex Deymo486467e2017-12-19 19:04:07 +010028448 ;;
28449x1)
28450 # one SSL backend is enabled
Elliott Hughes82be86d2017-09-20 17:00:17 -070028451
28452 SSL_ENABLED="1"
Elliott Hughesf344baa2021-12-07 09:12:34 -080028453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: built with one SSL backend" >&5
28454printf "%s\n" "$as_me: built with one SSL backend" >&6;}
Alex Deymo486467e2017-12-19 19:04:07 +010028455 ;;
28456*)
28457 # more than one SSL backend is enabled
28458
28459 SSL_ENABLED="1"
28460
28461 CURL_WITH_MULTI_SSL="1"
28462
Elliott Hughesf344baa2021-12-07 09:12:34 -080028463printf "%s\n" "#define CURL_WITH_MULTI_SSL 1" >>confdefs.h
Alex Deymo486467e2017-12-19 19:04:07 +010028464
Elliott Hughesf344baa2021-12-07 09:12:34 -080028465 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: built with multiple SSL backends" >&5
28466printf "%s\n" "$as_me: built with multiple SSL backends" >&6;}
Alex Deymo486467e2017-12-19 19:04:07 +010028467 ;;
28468esac
28469
28470if test -n "$ssl_backends"; then
28471 curl_ssl_msg="enabled ($ssl_backends)"
28472fi
28473
28474if test no = "$VALID_DEFAULT_SSL_BACKEND"
28475then
28476 if test -n "$SSL_ENABLED"
28477 then
28478 as_fn_error $? "Default SSL backend $DEFAULT_SSL_BACKEND not enabled!" "$LINENO" 5
28479 else
28480 as_fn_error $? "Default SSL backend requires SSL!" "$LINENO" 5
28481 fi
28482elif test yes = "$VALID_DEFAULT_SSL_BACKEND"
28483then
28484
Elliott Hughesf344baa2021-12-07 09:12:34 -080028485printf "%s\n" "#define CURL_DEFAULT_SSL_BACKEND \"$DEFAULT_SSL_BACKEND\"" >>confdefs.h
Alex Deymo486467e2017-12-19 19:04:07 +010028486
Elliott Hughes82be86d2017-09-20 17:00:17 -070028487fi
28488
28489
Haibo Huang445085a2019-09-11 13:33:50 -070028490if test -n "$check_for_ca_bundle"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070028491
28492
Elliott Hughesf344baa2021-12-07 09:12:34 -080028493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking default CA cert bundle/path" >&5
28494printf %s "checking default CA cert bundle/path... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028495
28496
28497# Check whether --with-ca-bundle was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080028498if test ${with_ca_bundle+y}
28499then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070028500 withval=$with_ca_bundle;
28501 want_ca="$withval"
28502 if test "x$want_ca" = "xyes"; then
28503 as_fn_error $? "--with-ca-bundle=FILE requires a path to the CA bundle" "$LINENO" 5
28504 fi
28505
Elliott Hughesf344baa2021-12-07 09:12:34 -080028506else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070028507 want_ca="unset"
28508fi
28509
28510
28511# Check whether --with-ca-path was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080028512if test ${with_ca_path+y}
28513then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070028514 withval=$with_ca_path;
28515 want_capath="$withval"
28516 if test "x$want_capath" = "xyes"; then
28517 as_fn_error $? "--with-ca-path=DIRECTORY requires a path to the CA path directory" "$LINENO" 5
28518 fi
28519
Elliott Hughesf344baa2021-12-07 09:12:34 -080028520else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070028521 want_capath="unset"
28522fi
28523
28524
28525 ca_warning=" (warning: certs not found)"
28526 capath_warning=" (warning: certs not found)"
28527 check_capath=""
28528
28529 if test "x$want_ca" != "xno" -a "x$want_ca" != "xunset" -a \
28530 "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
28531 ca="$want_ca"
28532 capath="$want_capath"
28533 elif test "x$want_ca" != "xno" -a "x$want_ca" != "xunset"; then
28534 ca="$want_ca"
28535 capath="no"
28536 elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
Haibo Huangee03b1a2020-03-11 01:33:32 -070028537 if test "x$OPENSSL_ENABLED" != "x1" -a "x$GNUTLS_ENABLED" != "x1" -a "x$MBEDTLS_ENABLED" != "x1"; then
28538 as_fn_error $? "--with-ca-path only works with OpenSSL, GnuTLS or mbedTLS" "$LINENO" 5
Elliott Hughes82be86d2017-09-20 17:00:17 -070028539 fi
28540 capath="$want_capath"
28541 ca="no"
28542 else
28543 ca="no"
28544 capath="no"
28545 if test "x$cross_compiling" != "xyes"; then
28546 if test "x$want_ca" = "xunset"; then
28547 if test "x$prefix" != xNONE; then
28548 cac="${prefix}/share/curl/curl-ca-bundle.crt"
28549 else
28550 cac="$ac_default_prefix/share/curl/curl-ca-bundle.crt"
28551 fi
28552
28553 for a in /etc/ssl/certs/ca-certificates.crt \
28554 /etc/pki/tls/certs/ca-bundle.crt \
28555 /usr/share/ssl/certs/ca-bundle.crt \
28556 /usr/local/share/certs/ca-root-nss.crt \
28557 /etc/ssl/cert.pem \
28558 "$cac"; do
28559 if test -f "$a"; then
28560 ca="$a"
28561 break
28562 fi
28563 done
28564 fi
28565 if test "x$want_capath" = "xunset" -a "x$ca" = "xno" -a \
28566 "x$OPENSSL_ENABLED" = "x1"; then
28567 check_capath="/etc/ssl/certs/"
28568 fi
28569 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080028570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: skipped the ca-cert path detection when cross-compiling" >&5
28571printf "%s\n" "$as_me: WARNING: skipped the ca-cert path detection when cross-compiling" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070028572 fi
28573 fi
28574
28575 if test "x$ca" = "xno" || test -f "$ca"; then
28576 ca_warning=""
28577 fi
28578
28579 if test "x$capath" != "xno"; then
28580 check_capath="$capath"
28581 fi
28582
28583 if test ! -z "$check_capath"; then
28584 for a in "$check_capath"; do
28585 if test -d "$a" && ls "$a"/[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].0 >/dev/null 2>/dev/null; then
28586 if test "x$capath" = "xno"; then
28587 capath="$a"
28588 fi
28589 capath_warning=""
28590 break
28591 fi
28592 done
28593 fi
28594
28595 if test "x$capath" = "xno"; then
28596 capath_warning=""
28597 fi
28598
28599 if test "x$ca" != "xno"; then
28600 CURL_CA_BUNDLE='"'$ca'"'
28601
Elliott Hughesf344baa2021-12-07 09:12:34 -080028602printf "%s\n" "#define CURL_CA_BUNDLE \"$ca\"" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070028603
28604
Elliott Hughesf344baa2021-12-07 09:12:34 -080028605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ca" >&5
28606printf "%s\n" "$ca" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028607 fi
28608 if test "x$capath" != "xno"; then
28609 CURL_CA_PATH="\"$capath\""
28610
Elliott Hughesf344baa2021-12-07 09:12:34 -080028611printf "%s\n" "#define CURL_CA_PATH \"$capath\"" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070028612
Elliott Hughesf344baa2021-12-07 09:12:34 -080028613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $capath (capath)" >&5
28614printf "%s\n" "$capath (capath)" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028615 fi
28616 if test "x$ca" = "xno" && test "x$capath" = "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080028617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
28618printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028619 fi
28620
Elliott Hughesf344baa2021-12-07 09:12:34 -080028621 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use builtin CA store of SSL library" >&5
28622printf %s "checking whether to use builtin CA store of SSL library... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028623
28624# Check whether --with-ca-fallback was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080028625if test ${with_ca_fallback+y}
28626then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070028627 withval=$with_ca_fallback;
28628 if test "x$with_ca_fallback" != "xyes" -a "x$with_ca_fallback" != "xno"; then
28629 as_fn_error $? "--with-ca-fallback only allows yes or no as parameter" "$LINENO" 5
28630 fi
28631
Elliott Hughesf344baa2021-12-07 09:12:34 -080028632else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070028633 with_ca_fallback="no"
28634fi
28635
Elliott Hughesf344baa2021-12-07 09:12:34 -080028636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_ca_fallback" >&5
28637printf "%s\n" "$with_ca_fallback" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028638 if test "x$with_ca_fallback" = "xyes"; then
28639 if test "x$OPENSSL_ENABLED" != "x1" -a "x$GNUTLS_ENABLED" != "x1"; then
28640 as_fn_error $? "--with-ca-fallback only works with OpenSSL or GnuTLS" "$LINENO" 5
28641 fi
28642
Elliott Hughesf344baa2021-12-07 09:12:34 -080028643printf "%s\n" "#define CURL_CA_FALLBACK 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070028644
28645 fi
28646
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070028647fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070028648
28649
28650
28651# Check whether --with-libpsl was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080028652if test ${with_libpsl+y}
28653then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070028654 withval=$with_libpsl; with_libpsl=$withval
Elliott Hughesf344baa2021-12-07 09:12:34 -080028655else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070028656 with_libpsl=yes
28657fi
28658
28659if test $with_libpsl != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080028660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing psl_builtin" >&5
28661printf %s "checking for library containing psl_builtin... " >&6; }
28662if test ${ac_cv_search_psl_builtin+y}
28663then :
28664 printf %s "(cached) " >&6
28665else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070028666 ac_func_search_save_LIBS=$LIBS
28667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28668/* end confdefs.h. */
28669
28670
28671#ifdef __cplusplus
28672extern "C"
28673#endif
28674char psl_builtin ();
28675int main (void)
28676{
28677return psl_builtin ();
28678 ;
28679 return 0;
28680}
28681_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080028682for ac_lib in '' psl
28683do
Elliott Hughes82be86d2017-09-20 17:00:17 -070028684 if test -z "$ac_lib"; then
28685 ac_res="none required"
28686 else
28687 ac_res=-l$ac_lib
28688 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
28689 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080028690 if ac_fn_c_try_link "$LINENO"
28691then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070028692 ac_cv_search_psl_builtin=$ac_res
28693fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080028694rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070028695 conftest$ac_exeext
Elliott Hughesf344baa2021-12-07 09:12:34 -080028696 if test ${ac_cv_search_psl_builtin+y}
28697then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070028698 break
28699fi
28700done
Elliott Hughesf344baa2021-12-07 09:12:34 -080028701if test ${ac_cv_search_psl_builtin+y}
28702then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070028703
Elliott Hughesf344baa2021-12-07 09:12:34 -080028704else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070028705 ac_cv_search_psl_builtin=no
28706fi
28707rm conftest.$ac_ext
28708LIBS=$ac_func_search_save_LIBS
28709fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080028710{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_psl_builtin" >&5
28711printf "%s\n" "$ac_cv_search_psl_builtin" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028712ac_res=$ac_cv_search_psl_builtin
Elliott Hughesf344baa2021-12-07 09:12:34 -080028713if test "$ac_res" != no
28714then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070028715 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Haibo Huang65021c72019-03-27 15:37:23 -070028716 curl_psl_msg="enabled";
Elliott Hughes82be86d2017-09-20 17:00:17 -070028717
Elliott Hughesf344baa2021-12-07 09:12:34 -080028718printf "%s\n" "#define USE_LIBPSL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070028719
28720
Elliott Hughesf344baa2021-12-07 09:12:34 -080028721else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070028722 curl_psl_msg="no (libpsl not found)";
Elliott Hughesf344baa2021-12-07 09:12:34 -080028723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libpsl was not found" >&5
28724printf "%s\n" "$as_me: WARNING: libpsl was not found" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070028725
28726
28727fi
28728
28729fi
Haibo Huang65021c72019-03-27 15:37:23 -070028730 if test "$curl_psl_msg" = "enabled"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070028731 USE_LIBPSL_TRUE=
28732 USE_LIBPSL_FALSE='#'
28733else
28734 USE_LIBPSL_TRUE='#'
28735 USE_LIBPSL_FALSE=
28736fi
28737
28738
28739
Elliott Hughes34dd5f42021-08-10 13:01:18 -070028740
28741
28742# Check whether --with-libgsasl was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080028743if test ${with_libgsasl+y}
28744then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070028745 withval=$with_libgsasl; with_libgsasl=$withval
Elliott Hughesf344baa2021-12-07 09:12:34 -080028746else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070028747 with_libgsasl=yes
28748fi
28749
28750if test $with_libgsasl != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080028751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gsasl_init" >&5
28752printf %s "checking for library containing gsasl_init... " >&6; }
28753if test ${ac_cv_search_gsasl_init+y}
28754then :
28755 printf %s "(cached) " >&6
28756else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070028757 ac_func_search_save_LIBS=$LIBS
28758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28759/* end confdefs.h. */
28760
28761
28762#ifdef __cplusplus
28763extern "C"
28764#endif
28765char gsasl_init ();
28766int main (void)
28767{
28768return gsasl_init ();
28769 ;
28770 return 0;
28771}
28772_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080028773for ac_lib in '' gsasl
28774do
Elliott Hughes34dd5f42021-08-10 13:01:18 -070028775 if test -z "$ac_lib"; then
28776 ac_res="none required"
28777 else
28778 ac_res=-l$ac_lib
28779 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
28780 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080028781 if ac_fn_c_try_link "$LINENO"
28782then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070028783 ac_cv_search_gsasl_init=$ac_res
28784fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080028785rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes34dd5f42021-08-10 13:01:18 -070028786 conftest$ac_exeext
Elliott Hughesf344baa2021-12-07 09:12:34 -080028787 if test ${ac_cv_search_gsasl_init+y}
28788then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070028789 break
28790fi
28791done
Elliott Hughesf344baa2021-12-07 09:12:34 -080028792if test ${ac_cv_search_gsasl_init+y}
28793then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070028794
Elliott Hughesf344baa2021-12-07 09:12:34 -080028795else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070028796 ac_cv_search_gsasl_init=no
28797fi
28798rm conftest.$ac_ext
28799LIBS=$ac_func_search_save_LIBS
28800fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080028801{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gsasl_init" >&5
28802printf "%s\n" "$ac_cv_search_gsasl_init" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070028803ac_res=$ac_cv_search_gsasl_init
Elliott Hughesf344baa2021-12-07 09:12:34 -080028804if test "$ac_res" != no
28805then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070028806 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28807 curl_gsasl_msg="enabled";
28808
Elliott Hughesf344baa2021-12-07 09:12:34 -080028809printf "%s\n" "#define USE_GSASL 1" >>confdefs.h
Elliott Hughes34dd5f42021-08-10 13:01:18 -070028810
28811
Elliott Hughesf344baa2021-12-07 09:12:34 -080028812else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070028813 curl_gsasl_msg="no (libgsasl not found)";
Elliott Hughesf344baa2021-12-07 09:12:34 -080028814 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libgsasl was not found" >&5
28815printf "%s\n" "$as_me: WARNING: libgsasl was not found" >&2;}
Elliott Hughes34dd5f42021-08-10 13:01:18 -070028816
28817
28818fi
28819
28820fi
28821 if test "$curl_gsasl_msg" = "enabled"; then
28822 USE_GSASL_TRUE=
28823 USE_GSASL_FALSE='#'
28824else
28825 USE_GSASL_TRUE='#'
28826 USE_GSASL_FALSE=
28827fi
28828
Elliott Hughes82be86d2017-09-20 17:00:17 -070028829
28830
28831# Check whether --with-libmetalink was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080028832if test ${with_libmetalink+y}
28833then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070028834 withval=$with_libmetalink; as_fn_error $? "--with-libmetalink no longer works!" "$LINENO" 5
Elliott Hughes82be86d2017-09-20 17:00:17 -070028835fi
28836
28837
Elliott Hughes82be86d2017-09-20 17:00:17 -070028838
28839OPT_LIBSSH2=off
28840
28841# Check whether --with-libssh2 was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080028842if test ${with_libssh2+y}
28843then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070028844 withval=$with_libssh2; OPT_LIBSSH2=$withval
Elliott Hughesf344baa2021-12-07 09:12:34 -080028845else $as_nop
Elliott Hughes0128fe42018-02-27 14:57:55 -080028846 OPT_LIBSSH2=no
28847fi
28848
28849
28850
28851OPT_LIBSSH=off
28852
28853# Check whether --with-libssh was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080028854if test ${with_libssh+y}
28855then :
Elliott Hughes0128fe42018-02-27 14:57:55 -080028856 withval=$with_libssh; OPT_LIBSSH=$withval
Elliott Hughesf344baa2021-12-07 09:12:34 -080028857else $as_nop
Elliott Hughes0128fe42018-02-27 14:57:55 -080028858 OPT_LIBSSH=no
Elliott Hughes82be86d2017-09-20 17:00:17 -070028859fi
28860
28861
Haibo Huangb51266f2020-03-04 02:22:48 -080028862OPT_WOLFSSH=off
28863
28864# Check whether --with-wolfssh was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080028865if test ${with_wolfssh+y}
28866then :
Haibo Huangb51266f2020-03-04 02:22:48 -080028867 withval=$with_wolfssh; OPT_WOLFSSH=$withval
Elliott Hughesf344baa2021-12-07 09:12:34 -080028868else $as_nop
Haibo Huangb51266f2020-03-04 02:22:48 -080028869 OPT_WOLFSSH=no
28870fi
28871
28872
Elliott Hughes82be86d2017-09-20 17:00:17 -070028873if test X"$OPT_LIBSSH2" != Xno; then
28874 CLEANLDFLAGS="$LDFLAGS"
28875 CLEANCPPFLAGS="$CPPFLAGS"
28876 CLEANLIBS="$LIBS"
28877
28878 case "$OPT_LIBSSH2" in
28879 yes)
28880
28881 if test -n "$PKG_CONFIG"; then
28882 PKGCONFIG="$PKG_CONFIG"
28883 else
28884 if test -n "$ac_tool_prefix"; then
28885 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
28886set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080028887{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28888printf %s "checking for $ac_word... " >&6; }
28889if test ${ac_cv_path_PKGCONFIG+y}
28890then :
28891 printf %s "(cached) " >&6
28892else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070028893 case $PKGCONFIG in
28894 [\\/]* | ?:[\\/]*)
28895 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
28896 ;;
28897 *)
28898 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28899as_dummy="$PATH:/usr/bin:/usr/local/bin"
28900for as_dir in $as_dummy
28901do
28902 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080028903 case $as_dir in #(((
28904 '') as_dir=./ ;;
28905 */) ;;
28906 *) as_dir=$as_dir/ ;;
28907 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070028908 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080028909 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
28910 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
28911 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070028912 break 2
28913 fi
28914done
28915 done
28916IFS=$as_save_IFS
28917
28918 ;;
28919esac
28920fi
28921PKGCONFIG=$ac_cv_path_PKGCONFIG
28922if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080028923 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
28924printf "%s\n" "$PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028925else
Elliott Hughesf344baa2021-12-07 09:12:34 -080028926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
28927printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028928fi
28929
28930
28931fi
28932if test -z "$ac_cv_path_PKGCONFIG"; then
28933 ac_pt_PKGCONFIG=$PKGCONFIG
28934 # Extract the first word of "pkg-config", so it can be a program name with args.
28935set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080028936{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28937printf %s "checking for $ac_word... " >&6; }
28938if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
28939then :
28940 printf %s "(cached) " >&6
28941else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070028942 case $ac_pt_PKGCONFIG in
28943 [\\/]* | ?:[\\/]*)
28944 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
28945 ;;
28946 *)
28947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28948as_dummy="$PATH:/usr/bin:/usr/local/bin"
28949for as_dir in $as_dummy
28950do
28951 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080028952 case $as_dir in #(((
28953 '') as_dir=./ ;;
28954 */) ;;
28955 *) as_dir=$as_dir/ ;;
28956 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070028957 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080028958 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
28959 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
28960 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070028961 break 2
28962 fi
28963done
28964 done
28965IFS=$as_save_IFS
28966
28967 ;;
28968esac
28969fi
28970ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
28971if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080028972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
28973printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028974else
Elliott Hughesf344baa2021-12-07 09:12:34 -080028975 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
28976printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028977fi
28978
28979 if test "x$ac_pt_PKGCONFIG" = x; then
28980 PKGCONFIG="no"
28981 else
28982 case $cross_compiling:$ac_tool_warned in
28983yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080028984{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28985printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070028986ac_tool_warned=yes ;;
28987esac
28988 PKGCONFIG=$ac_pt_PKGCONFIG
28989 fi
28990else
28991 PKGCONFIG="$ac_cv_path_PKGCONFIG"
28992fi
28993
28994 fi
28995
28996 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080028997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libssh2 options with pkg-config" >&5
28998printf %s "checking for libssh2 options with pkg-config... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070028999 itexists=`
29000 if test -n ""; then
29001 PKG_CONFIG_LIBDIR=""
29002 export PKG_CONFIG_LIBDIR
29003 fi
29004 $PKGCONFIG --exists libssh2 >/dev/null 2>&1 && echo 1`
29005
29006 if test -z "$itexists"; then
29007 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080029008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
29009printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029010 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080029011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
29012printf "%s\n" "found" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029013 fi
29014 fi
29015
29016
29017 if test "$PKGCONFIG" != "no" ; then
Elliott Hughes72d948d2018-08-03 14:37:21 -070029018 LIB_SSH2=`$PKGCONFIG --libs libssh2`
Elliott Hughes82be86d2017-09-20 17:00:17 -070029019 LD_SSH2=`$PKGCONFIG --libs-only-L libssh2`
29020 CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2`
29021 version=`$PKGCONFIG --modversion libssh2`
Haibo Huangca2a8022020-07-10 20:17:42 -070029022 DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/^-L//'`
Elliott Hughes82be86d2017-09-20 17:00:17 -070029023 fi
29024
29025 ;;
29026 off)
29027 ;;
29028 *)
29029 PREFIX_SSH2=$OPT_LIBSSH2
29030 ;;
29031 esac
29032
29033 if test -n "$PREFIX_SSH2"; then
29034 LIB_SSH2="-lssh2"
29035 LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
29036 CPP_SSH2=-I${PREFIX_SSH2}/include
29037 DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
29038 fi
29039
29040 LDFLAGS="$LDFLAGS $LD_SSH2"
29041 CPPFLAGS="$CPPFLAGS $CPP_SSH2"
29042 LIBS="$LIB_SSH2 $LIBS"
29043
Elliott Hughesf344baa2021-12-07 09:12:34 -080029044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libssh2_session_block_directions in -lssh2" >&5
29045printf %s "checking for libssh2_session_block_directions in -lssh2... " >&6; }
29046if test ${ac_cv_lib_ssh2_libssh2_session_block_directions+y}
29047then :
29048 printf %s "(cached) " >&6
29049else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070029050 ac_check_lib_save_LIBS=$LIBS
29051LIBS="-lssh2 $LIBS"
29052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29053/* end confdefs.h. */
29054
29055
29056#ifdef __cplusplus
29057extern "C"
29058#endif
Elliott Hughes34dd5f42021-08-10 13:01:18 -070029059char libssh2_session_block_directions ();
Elliott Hughes82be86d2017-09-20 17:00:17 -070029060int main (void)
29061{
Elliott Hughes34dd5f42021-08-10 13:01:18 -070029062return libssh2_session_block_directions ();
Elliott Hughes82be86d2017-09-20 17:00:17 -070029063 ;
29064 return 0;
29065}
29066_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080029067if ac_fn_c_try_link "$LINENO"
29068then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070029069 ac_cv_lib_ssh2_libssh2_session_block_directions=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080029070else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070029071 ac_cv_lib_ssh2_libssh2_session_block_directions=no
Elliott Hughes82be86d2017-09-20 17:00:17 -070029072fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080029073rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070029074 conftest$ac_exeext conftest.$ac_ext
29075LIBS=$ac_check_lib_save_LIBS
29076fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080029077{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssh2_libssh2_session_block_directions" >&5
29078printf "%s\n" "$ac_cv_lib_ssh2_libssh2_session_block_directions" >&6; }
29079if test "x$ac_cv_lib_ssh2_libssh2_session_block_directions" = xyes
29080then :
29081 printf "%s\n" "#define HAVE_LIBSSH2 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070029082
29083 LIBS="-lssh2 $LIBS"
29084
29085fi
29086
29087
Elliott Hughesf344baa2021-12-07 09:12:34 -080029088 for ac_header in libssh2.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070029089do :
Elliott Hughesf344baa2021-12-07 09:12:34 -080029090 ac_fn_c_check_header_compile "$LINENO" "libssh2.h" "ac_cv_header_libssh2_h" "$ac_includes_default"
29091if test "x$ac_cv_header_libssh2_h" = xyes
29092then :
29093 printf "%s\n" "#define HAVE_LIBSSH2_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070029094 curl_ssh_msg="enabled (libSSH2)"
29095 LIBSSH2_ENABLED=1
29096
Elliott Hughesf344baa2021-12-07 09:12:34 -080029097printf "%s\n" "#define USE_LIBSSH2 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070029098
29099 USE_LIBSSH2=1
29100
29101
29102fi
29103
29104done
29105
Elliott Hughes82be86d2017-09-20 17:00:17 -070029106 if test X"$OPT_LIBSSH2" != Xoff &&
29107 test "$LIBSSH2_ENABLED" != "1"; then
29108 as_fn_error $? "libSSH2 libs and/or directories were not found where specified!" "$LINENO" 5
29109 fi
29110
29111 if test "$LIBSSH2_ENABLED" = "1"; then
29112 if test -n "$DIR_SSH2"; then
29113
29114 if test "x$cross_compiling" != "xyes"; then
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070029115 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH2"
29116 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080029117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_SSH2 to CURL_LIBRARY_PATH" >&5
29118printf "%s\n" "$as_me: Added $DIR_SSH2 to CURL_LIBRARY_PATH" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070029119 fi
29120 fi
29121 else
29122 LDFLAGS=$CLEANLDFLAGS
29123 CPPFLAGS=$CLEANCPPFLAGS
29124 LIBS=$CLEANLIBS
29125 fi
Elliott Hughes0128fe42018-02-27 14:57:55 -080029126elif test X"$OPT_LIBSSH" != Xno; then
29127 CLEANLDFLAGS="$LDFLAGS"
29128 CLEANCPPFLAGS="$CPPFLAGS"
29129 CLEANLIBS="$LIBS"
29130
29131 case "$OPT_LIBSSH" in
29132 yes)
29133
29134 if test -n "$PKG_CONFIG"; then
29135 PKGCONFIG="$PKG_CONFIG"
29136 else
29137 if test -n "$ac_tool_prefix"; then
29138 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
29139set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080029140{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29141printf %s "checking for $ac_word... " >&6; }
29142if test ${ac_cv_path_PKGCONFIG+y}
29143then :
29144 printf %s "(cached) " >&6
29145else $as_nop
Elliott Hughes0128fe42018-02-27 14:57:55 -080029146 case $PKGCONFIG in
29147 [\\/]* | ?:[\\/]*)
29148 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
29149 ;;
29150 *)
29151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29152as_dummy="$PATH:/usr/bin:/usr/local/bin"
29153for as_dir in $as_dummy
29154do
29155 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080029156 case $as_dir in #(((
29157 '') as_dir=./ ;;
29158 */) ;;
29159 *) as_dir=$as_dir/ ;;
29160 esac
Elliott Hughes0128fe42018-02-27 14:57:55 -080029161 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080029162 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
29163 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
29164 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes0128fe42018-02-27 14:57:55 -080029165 break 2
29166 fi
29167done
29168 done
29169IFS=$as_save_IFS
29170
29171 ;;
29172esac
29173fi
29174PKGCONFIG=$ac_cv_path_PKGCONFIG
29175if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080029176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
29177printf "%s\n" "$PKGCONFIG" >&6; }
Elliott Hughes0128fe42018-02-27 14:57:55 -080029178else
Elliott Hughesf344baa2021-12-07 09:12:34 -080029179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
29180printf "%s\n" "no" >&6; }
Elliott Hughes0128fe42018-02-27 14:57:55 -080029181fi
29182
29183
29184fi
29185if test -z "$ac_cv_path_PKGCONFIG"; then
29186 ac_pt_PKGCONFIG=$PKGCONFIG
29187 # Extract the first word of "pkg-config", so it can be a program name with args.
29188set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080029189{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29190printf %s "checking for $ac_word... " >&6; }
29191if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
29192then :
29193 printf %s "(cached) " >&6
29194else $as_nop
Elliott Hughes0128fe42018-02-27 14:57:55 -080029195 case $ac_pt_PKGCONFIG in
29196 [\\/]* | ?:[\\/]*)
29197 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
29198 ;;
29199 *)
29200 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29201as_dummy="$PATH:/usr/bin:/usr/local/bin"
29202for as_dir in $as_dummy
29203do
29204 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080029205 case $as_dir in #(((
29206 '') as_dir=./ ;;
29207 */) ;;
29208 *) as_dir=$as_dir/ ;;
29209 esac
Elliott Hughes0128fe42018-02-27 14:57:55 -080029210 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080029211 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
29212 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
29213 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes0128fe42018-02-27 14:57:55 -080029214 break 2
29215 fi
29216done
29217 done
29218IFS=$as_save_IFS
29219
29220 ;;
29221esac
29222fi
29223ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
29224if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080029225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
29226printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Elliott Hughes0128fe42018-02-27 14:57:55 -080029227else
Elliott Hughesf344baa2021-12-07 09:12:34 -080029228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
29229printf "%s\n" "no" >&6; }
Elliott Hughes0128fe42018-02-27 14:57:55 -080029230fi
29231
29232 if test "x$ac_pt_PKGCONFIG" = x; then
29233 PKGCONFIG="no"
29234 else
29235 case $cross_compiling:$ac_tool_warned in
29236yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080029237{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29238printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes0128fe42018-02-27 14:57:55 -080029239ac_tool_warned=yes ;;
29240esac
29241 PKGCONFIG=$ac_pt_PKGCONFIG
29242 fi
29243else
29244 PKGCONFIG="$ac_cv_path_PKGCONFIG"
29245fi
29246
29247 fi
29248
29249 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080029250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libssh options with pkg-config" >&5
29251printf %s "checking for libssh options with pkg-config... " >&6; }
Elliott Hughes0128fe42018-02-27 14:57:55 -080029252 itexists=`
29253 if test -n ""; then
29254 PKG_CONFIG_LIBDIR=""
29255 export PKG_CONFIG_LIBDIR
29256 fi
29257 $PKGCONFIG --exists libssh >/dev/null 2>&1 && echo 1`
29258
29259 if test -z "$itexists"; then
29260 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080029261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
29262printf "%s\n" "no" >&6; }
Elliott Hughes0128fe42018-02-27 14:57:55 -080029263 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080029264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
29265printf "%s\n" "found" >&6; }
Elliott Hughes0128fe42018-02-27 14:57:55 -080029266 fi
29267 fi
29268
29269
29270 if test "$PKGCONFIG" != "no" ; then
29271 LIB_SSH=`$PKGCONFIG --libs-only-l libssh`
29272 LD_SSH=`$PKGCONFIG --libs-only-L libssh`
29273 CPP_SSH=`$PKGCONFIG --cflags-only-I libssh`
29274 version=`$PKGCONFIG --modversion libssh`
Haibo Huangca2a8022020-07-10 20:17:42 -070029275 DIR_SSH=`echo $LD_SSH | $SED -e 's/^-L//'`
Elliott Hughes0128fe42018-02-27 14:57:55 -080029276 fi
29277
29278 ;;
29279 off)
29280 ;;
29281 *)
29282 PREFIX_SSH=$OPT_LIBSSH
29283 ;;
29284 esac
29285
29286 if test -n "$PREFIX_SSH"; then
29287 LIB_SSH="-lssh"
29288 LD_SSH=-L${PREFIX_SSH}/lib$libsuff
29289 CPP_SSH=-I${PREFIX_SSH}/include
29290 DIR_SSH=${PREFIX_SSH}/lib$libsuff
29291 fi
29292
29293 LDFLAGS="$LDFLAGS $LD_SSH"
29294 CPPFLAGS="$CPPFLAGS $CPP_SSH"
29295 LIBS="$LIB_SSH $LIBS"
29296
Elliott Hughesf344baa2021-12-07 09:12:34 -080029297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssh_new in -lssh" >&5
29298printf %s "checking for ssh_new in -lssh... " >&6; }
29299if test ${ac_cv_lib_ssh_ssh_new+y}
29300then :
29301 printf %s "(cached) " >&6
29302else $as_nop
Elliott Hughes0128fe42018-02-27 14:57:55 -080029303 ac_check_lib_save_LIBS=$LIBS
29304LIBS="-lssh $LIBS"
29305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29306/* end confdefs.h. */
29307
29308
29309#ifdef __cplusplus
29310extern "C"
29311#endif
29312char ssh_new ();
29313int main (void)
29314{
29315return ssh_new ();
29316 ;
29317 return 0;
29318}
29319_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080029320if ac_fn_c_try_link "$LINENO"
29321then :
Elliott Hughes0128fe42018-02-27 14:57:55 -080029322 ac_cv_lib_ssh_ssh_new=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080029323else $as_nop
Elliott Hughes0128fe42018-02-27 14:57:55 -080029324 ac_cv_lib_ssh_ssh_new=no
29325fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080029326rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes0128fe42018-02-27 14:57:55 -080029327 conftest$ac_exeext conftest.$ac_ext
29328LIBS=$ac_check_lib_save_LIBS
29329fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080029330{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssh_ssh_new" >&5
29331printf "%s\n" "$ac_cv_lib_ssh_ssh_new" >&6; }
29332if test "x$ac_cv_lib_ssh_ssh_new" = xyes
29333then :
29334 printf "%s\n" "#define HAVE_LIBSSH 1" >>confdefs.h
Elliott Hughes0128fe42018-02-27 14:57:55 -080029335
29336 LIBS="-lssh $LIBS"
29337
29338fi
29339
29340
Elliott Hughesf344baa2021-12-07 09:12:34 -080029341 for ac_header in libssh/libssh.h
Elliott Hughes0128fe42018-02-27 14:57:55 -080029342do :
Elliott Hughesf344baa2021-12-07 09:12:34 -080029343 ac_fn_c_check_header_compile "$LINENO" "libssh/libssh.h" "ac_cv_header_libssh_libssh_h" "$ac_includes_default"
29344if test "x$ac_cv_header_libssh_libssh_h" = xyes
29345then :
29346 printf "%s\n" "#define HAVE_LIBSSH_LIBSSH_H 1" >>confdefs.h
Elliott Hughes0128fe42018-02-27 14:57:55 -080029347 curl_ssh_msg="enabled (libSSH)"
29348 LIBSSH_ENABLED=1
29349
Elliott Hughesf344baa2021-12-07 09:12:34 -080029350printf "%s\n" "#define USE_LIBSSH 1" >>confdefs.h
Elliott Hughes0128fe42018-02-27 14:57:55 -080029351
29352 USE_LIBSSH=1
29353
29354
29355fi
29356
29357done
29358
Elliott Hughes0128fe42018-02-27 14:57:55 -080029359 if test X"$OPT_LIBSSH" != Xoff &&
29360 test "$LIBSSH_ENABLED" != "1"; then
29361 as_fn_error $? "libSSH libs and/or directories were not found where specified!" "$LINENO" 5
29362 fi
29363
29364 if test "$LIBSSH_ENABLED" = "1"; then
29365 if test -n "$DIR_SSH"; then
29366
29367 if test "x$cross_compiling" != "xyes"; then
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070029368 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH"
29369 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080029370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_SSH to CURL_LIBRARY_PATH" >&5
29371printf "%s\n" "$as_me: Added $DIR_SSH to CURL_LIBRARY_PATH" >&6;}
Elliott Hughes0128fe42018-02-27 14:57:55 -080029372 fi
29373 fi
29374 else
29375 LDFLAGS=$CLEANLDFLAGS
29376 CPPFLAGS=$CLEANCPPFLAGS
29377 LIBS=$CLEANLIBS
29378 fi
Haibo Huangb51266f2020-03-04 02:22:48 -080029379elif test X"$OPT_WOLFSSH" != Xno; then
29380 CLEANLDFLAGS="$LDFLAGS"
29381 CLEANCPPFLAGS="$CPPFLAGS"
29382 CLEANLIBS="$LIBS"
29383
29384
29385 if test "$OPT_WOLFSSH" != yes; then
29386 WOLFCONFIG="$OPT_WOLFSSH/bin/wolfssh-config"
29387 LDFLAGS="$LDFLAGS `$WOLFCONFIG --libs`"
29388 CPPFLAGS="$CPPFLAGS `$WOLFCONFIG --cflags`"
29389 fi
29390
Elliott Hughesf344baa2021-12-07 09:12:34 -080029391 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wolfSSH_Init in -lwolfssh" >&5
29392printf %s "checking for wolfSSH_Init in -lwolfssh... " >&6; }
29393if test ${ac_cv_lib_wolfssh_wolfSSH_Init+y}
29394then :
29395 printf %s "(cached) " >&6
29396else $as_nop
Haibo Huangb51266f2020-03-04 02:22:48 -080029397 ac_check_lib_save_LIBS=$LIBS
29398LIBS="-lwolfssh $LIBS"
29399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29400/* end confdefs.h. */
29401
29402
29403#ifdef __cplusplus
29404extern "C"
29405#endif
29406char wolfSSH_Init ();
29407int main (void)
29408{
29409return wolfSSH_Init ();
29410 ;
29411 return 0;
29412}
29413_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080029414if ac_fn_c_try_link "$LINENO"
29415then :
Haibo Huangb51266f2020-03-04 02:22:48 -080029416 ac_cv_lib_wolfssh_wolfSSH_Init=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080029417else $as_nop
Haibo Huangb51266f2020-03-04 02:22:48 -080029418 ac_cv_lib_wolfssh_wolfSSH_Init=no
29419fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080029420rm -f core conftest.err conftest.$ac_objext conftest.beam \
Haibo Huangb51266f2020-03-04 02:22:48 -080029421 conftest$ac_exeext conftest.$ac_ext
29422LIBS=$ac_check_lib_save_LIBS
29423fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080029424{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wolfssh_wolfSSH_Init" >&5
29425printf "%s\n" "$ac_cv_lib_wolfssh_wolfSSH_Init" >&6; }
29426if test "x$ac_cv_lib_wolfssh_wolfSSH_Init" = xyes
29427then :
29428 printf "%s\n" "#define HAVE_LIBWOLFSSH 1" >>confdefs.h
Haibo Huangb51266f2020-03-04 02:22:48 -080029429
29430 LIBS="-lwolfssh $LIBS"
29431
29432fi
29433
29434
Elliott Hughesf344baa2021-12-07 09:12:34 -080029435 for ac_header in wolfssh/ssh.h
Haibo Huangb51266f2020-03-04 02:22:48 -080029436do :
Elliott Hughesf344baa2021-12-07 09:12:34 -080029437 ac_fn_c_check_header_compile "$LINENO" "wolfssh/ssh.h" "ac_cv_header_wolfssh_ssh_h" "$ac_includes_default"
29438if test "x$ac_cv_header_wolfssh_ssh_h" = xyes
29439then :
29440 printf "%s\n" "#define HAVE_WOLFSSH_SSH_H 1" >>confdefs.h
Haibo Huangb51266f2020-03-04 02:22:48 -080029441 curl_ssh_msg="enabled (wolfSSH)"
29442 WOLFSSH_ENABLED=1
29443
Elliott Hughesf344baa2021-12-07 09:12:34 -080029444printf "%s\n" "#define USE_WOLFSSH 1" >>confdefs.h
Haibo Huangb51266f2020-03-04 02:22:48 -080029445
29446 USE_WOLFSSH=1
29447
29448
29449fi
29450
29451done
29452
Elliott Hughes82be86d2017-09-20 17:00:17 -070029453fi
29454
29455
29456OPT_LIBRTMP=off
29457
29458# Check whether --with-librtmp was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080029459if test ${with_librtmp+y}
29460then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070029461 withval=$with_librtmp; OPT_LIBRTMP=$withval
29462fi
29463
29464
29465if test X"$OPT_LIBRTMP" != Xno; then
29466 CLEANLDFLAGS="$LDFLAGS"
29467 CLEANCPPFLAGS="$CPPFLAGS"
29468 CLEANLIBS="$LIBS"
29469
29470 case "$OPT_LIBRTMP" in
29471 yes)
29472
29473 if test -n "$PKG_CONFIG"; then
29474 PKGCONFIG="$PKG_CONFIG"
29475 else
29476 if test -n "$ac_tool_prefix"; then
29477 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
29478set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080029479{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29480printf %s "checking for $ac_word... " >&6; }
29481if test ${ac_cv_path_PKGCONFIG+y}
29482then :
29483 printf %s "(cached) " >&6
29484else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070029485 case $PKGCONFIG in
29486 [\\/]* | ?:[\\/]*)
29487 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
29488 ;;
29489 *)
29490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29491as_dummy="$PATH:/usr/bin:/usr/local/bin"
29492for as_dir in $as_dummy
29493do
29494 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080029495 case $as_dir in #(((
29496 '') as_dir=./ ;;
29497 */) ;;
29498 *) as_dir=$as_dir/ ;;
29499 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070029500 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080029501 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
29502 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
29503 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070029504 break 2
29505 fi
29506done
29507 done
29508IFS=$as_save_IFS
29509
29510 ;;
29511esac
29512fi
29513PKGCONFIG=$ac_cv_path_PKGCONFIG
29514if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080029515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
29516printf "%s\n" "$PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029517else
Elliott Hughesf344baa2021-12-07 09:12:34 -080029518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
29519printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029520fi
29521
29522
29523fi
29524if test -z "$ac_cv_path_PKGCONFIG"; then
29525 ac_pt_PKGCONFIG=$PKGCONFIG
29526 # Extract the first word of "pkg-config", so it can be a program name with args.
29527set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080029528{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29529printf %s "checking for $ac_word... " >&6; }
29530if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
29531then :
29532 printf %s "(cached) " >&6
29533else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070029534 case $ac_pt_PKGCONFIG in
29535 [\\/]* | ?:[\\/]*)
29536 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
29537 ;;
29538 *)
29539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29540as_dummy="$PATH:/usr/bin:/usr/local/bin"
29541for as_dir in $as_dummy
29542do
29543 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080029544 case $as_dir in #(((
29545 '') as_dir=./ ;;
29546 */) ;;
29547 *) as_dir=$as_dir/ ;;
29548 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070029549 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080029550 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
29551 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
29552 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070029553 break 2
29554 fi
29555done
29556 done
29557IFS=$as_save_IFS
29558
29559 ;;
29560esac
29561fi
29562ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
29563if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080029564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
29565printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029566else
Elliott Hughesf344baa2021-12-07 09:12:34 -080029567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
29568printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029569fi
29570
29571 if test "x$ac_pt_PKGCONFIG" = x; then
29572 PKGCONFIG="no"
29573 else
29574 case $cross_compiling:$ac_tool_warned in
29575yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080029576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29577printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070029578ac_tool_warned=yes ;;
29579esac
29580 PKGCONFIG=$ac_pt_PKGCONFIG
29581 fi
29582else
29583 PKGCONFIG="$ac_cv_path_PKGCONFIG"
29584fi
29585
29586 fi
29587
29588 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080029589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for librtmp options with pkg-config" >&5
29590printf %s "checking for librtmp options with pkg-config... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029591 itexists=`
29592 if test -n ""; then
29593 PKG_CONFIG_LIBDIR=""
29594 export PKG_CONFIG_LIBDIR
29595 fi
29596 $PKGCONFIG --exists librtmp >/dev/null 2>&1 && echo 1`
29597
29598 if test -z "$itexists"; then
29599 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080029600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
29601printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029602 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080029603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
29604printf "%s\n" "found" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029605 fi
29606 fi
29607
29608
29609 if test "$PKGCONFIG" != "no" ; then
29610 LIB_RTMP=`$PKGCONFIG --libs-only-l librtmp`
29611 LD_RTMP=`$PKGCONFIG --libs-only-L librtmp`
29612 CPP_RTMP=`$PKGCONFIG --cflags-only-I librtmp`
29613 version=`$PKGCONFIG --modversion librtmp`
Haibo Huangca2a8022020-07-10 20:17:42 -070029614 DIR_RTMP=`echo $LD_RTMP | $SED -e 's/^-L//'`
Elliott Hughes82be86d2017-09-20 17:00:17 -070029615 else
29616 as_fn_error $? "--librtmp was specified but could not find librtmp pkgconfig file." "$LINENO" 5
29617 fi
29618
29619 ;;
29620 off)
29621 LIB_RTMP="-lrtmp"
29622 ;;
29623 *)
29624 LIB_RTMP="-lrtmp"
29625 PREFIX_RTMP=$OPT_LIBRTMP
29626 ;;
29627 esac
29628
29629 if test -n "$PREFIX_RTMP"; then
29630 LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff
29631 CPP_RTMP=-I${PREFIX_RTMP}/include
29632 DIR_RTMP=${PREFIX_RTMP}/lib$libsuff
29633 fi
29634
29635 LDFLAGS="$LDFLAGS $LD_RTMP"
29636 CPPFLAGS="$CPPFLAGS $CPP_RTMP"
29637 LIBS="$LIB_RTMP $LIBS"
29638
Elliott Hughesf344baa2021-12-07 09:12:34 -080029639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for RTMP_Init in -lrtmp" >&5
29640printf %s "checking for RTMP_Init in -lrtmp... " >&6; }
29641if test ${ac_cv_lib_rtmp_RTMP_Init+y}
29642then :
29643 printf %s "(cached) " >&6
29644else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070029645 ac_check_lib_save_LIBS=$LIBS
29646LIBS="-lrtmp $LIBS"
29647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29648/* end confdefs.h. */
29649
29650
29651#ifdef __cplusplus
29652extern "C"
29653#endif
29654char RTMP_Init ();
29655int main (void)
29656{
29657return RTMP_Init ();
29658 ;
29659 return 0;
29660}
29661_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080029662if ac_fn_c_try_link "$LINENO"
29663then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070029664 ac_cv_lib_rtmp_RTMP_Init=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080029665else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070029666 ac_cv_lib_rtmp_RTMP_Init=no
29667fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080029668rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070029669 conftest$ac_exeext conftest.$ac_ext
29670LIBS=$ac_check_lib_save_LIBS
29671fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080029672{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rtmp_RTMP_Init" >&5
29673printf "%s\n" "$ac_cv_lib_rtmp_RTMP_Init" >&6; }
29674if test "x$ac_cv_lib_rtmp_RTMP_Init" = xyes
29675then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070029676
Elliott Hughesf344baa2021-12-07 09:12:34 -080029677 for ac_header in librtmp/rtmp.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070029678do :
Elliott Hughesf344baa2021-12-07 09:12:34 -080029679 ac_fn_c_check_header_compile "$LINENO" "librtmp/rtmp.h" "ac_cv_header_librtmp_rtmp_h" "$ac_includes_default"
29680if test "x$ac_cv_header_librtmp_rtmp_h" = xyes
29681then :
29682 printf "%s\n" "#define HAVE_LIBRTMP_RTMP_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070029683 curl_rtmp_msg="enabled (librtmp)"
29684 LIBRTMP_ENABLED=1
29685
Elliott Hughesf344baa2021-12-07 09:12:34 -080029686printf "%s\n" "#define USE_LIBRTMP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070029687
29688 USE_LIBRTMP=1
29689
29690
29691fi
29692
29693done
29694
Elliott Hughesf344baa2021-12-07 09:12:34 -080029695else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070029696 LDFLAGS=$CLEANLDFLAGS
29697 CPPFLAGS=$CLEANCPPFLAGS
29698 LIBS=$CLEANLIBS
29699
29700fi
29701
29702
29703 if test X"$OPT_LIBRTMP" != Xoff &&
29704 test "$LIBRTMP_ENABLED" != "1"; then
29705 as_fn_error $? "librtmp libs and/or directories were not found where specified!" "$LINENO" 5
29706 fi
29707
29708fi
29709
29710
29711versioned_symbols_flavour=
Elliott Hughesf344baa2021-12-07 09:12:34 -080029712{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether versioned symbols are wanted" >&5
29713printf %s "checking whether versioned symbols are wanted... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029714# Check whether --enable-versioned-symbols was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080029715if test ${enable_versioned_symbols+y}
29716then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070029717 enableval=$enable_versioned_symbols; case "$enableval" in
Elliott Hughesf344baa2021-12-07 09:12:34 -080029718 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29719printf "%s\n" "yes" >&6; }
29720 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libraries can be versioned" >&5
29721printf %s "checking if libraries can be versioned... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029722 GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
29723 if test -z "$GLD"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080029724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
29725printf "%s\n" "no" >&6; }
29726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: You need an ld version supporting the --version-script option" >&5
29727printf "%s\n" "$as_me: WARNING: You need an ld version supporting the --version-script option" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070029728 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080029729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29730printf "%s\n" "yes" >&6; }
Alex Deymo486467e2017-12-19 19:04:07 +010029731 if test "x$CURL_WITH_MULTI_SSL" = "x1"; then
29732 versioned_symbols_flavour="MULTISSL_"
29733 elif test "x$OPENSSL_ENABLED" = "x1"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070029734 versioned_symbols_flavour="OPENSSL_"
29735 elif test "x$GNUTLS_ENABLED" = "x1"; then
29736 versioned_symbols_flavour="GNUTLS_"
29737 elif test "x$NSS_ENABLED" = "x1"; then
29738 versioned_symbols_flavour="NSS_"
Haibo Huang001784b2019-07-19 05:27:28 -070029739 elif test "x$WOLFSSL_ENABLED" = "x1"; then
29740 versioned_symbols_flavour="WOLFSSL_"
Haibo Huangc3c04f42020-08-19 13:00:07 -070029741 elif test "x$SCHANNEL_ENABLED" = "x1"; then
Haibo Huang65021c72019-03-27 15:37:23 -070029742 versioned_symbols_flavour="SCHANNEL_"
29743 elif test "x$SECURETRANSPORT_ENABLED" = "x1"; then
29744 versioned_symbols_flavour="SECURE_TRANSPORT_"
Elliott Hughes82be86d2017-09-20 17:00:17 -070029745 else
29746 versioned_symbols_flavour=""
29747 fi
29748 versioned_symbols="yes"
29749 fi
29750 ;;
29751
Elliott Hughesf344baa2021-12-07 09:12:34 -080029752 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
29753printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029754 ;;
29755 esac
29756
Elliott Hughesf344baa2021-12-07 09:12:34 -080029757else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070029758
Elliott Hughesf344baa2021-12-07 09:12:34 -080029759{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
29760printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029761
29762
29763fi
29764
29765
29766CURL_LT_SHLIB_VERSIONED_FLAVOUR="$versioned_symbols_flavour"
29767
29768 if test "x$versioned_symbols" = 'xyes'; then
29769 CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE=
29770 CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE='#'
29771else
29772 CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE='#'
29773 CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE=
29774fi
29775
29776
29777
Elliott Hughesf344baa2021-12-07 09:12:34 -080029778{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable Windows native IDN (Windows native builds only)" >&5
29779printf %s "checking whether to enable Windows native IDN (Windows native builds only)... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029780OPT_WINIDN="default"
29781
29782# Check whether --with-winidn was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080029783if test ${with_winidn+y}
29784then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070029785 withval=$with_winidn; OPT_WINIDN=$withval
29786fi
29787
29788case "$OPT_WINIDN" in
29789 no|default)
29790 want_winidn="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080029791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
29792printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029793 ;;
29794 yes)
29795 want_winidn="yes"
29796 want_winidn_path="default"
Elliott Hughesf344baa2021-12-07 09:12:34 -080029797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29798printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029799 ;;
29800 *)
29801 want_winidn="yes"
29802 want_winidn_path="$withval"
Elliott Hughesf344baa2021-12-07 09:12:34 -080029803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes ($withval)" >&5
29804printf "%s\n" "yes ($withval)" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029805 ;;
29806esac
29807
29808if test "$want_winidn" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080029809 clean_CFLAGS="$CFLAGS"
29810 clean_CPPFLAGS="$CPPFLAGS"
Elliott Hughes82be86d2017-09-20 17:00:17 -070029811 clean_LDFLAGS="$LDFLAGS"
29812 clean_LIBS="$LIBS"
29813 WINIDN_LIBS="-lnormaliz"
Elliott Hughesf344baa2021-12-07 09:12:34 -080029814 WINIDN_CPPFLAGS=""
Elliott Hughes82be86d2017-09-20 17:00:17 -070029815 #
29816 if test "$want_winidn_path" != "default"; then
29817 WINIDN_LDFLAGS="-L$want_winidn_path/lib$libsuff"
29818 WINIDN_CPPFLAGS="-I$want_winidn_path/include"
29819 WINIDN_DIR="$want_winidn_path/lib$libsuff"
29820 fi
29821 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080029822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29823/* end confdefs.h. */
29824
29825
29826 #include <windows.h>
29827
29828int main (void)
29829{
29830
29831 #if (WINVER < 0x600) && (_WIN32_WINNT < 0x600)
29832 #error
29833 #endif
29834
29835 ;
29836 return 0;
29837}
29838
29839_ACEOF
29840if ac_fn_c_try_compile "$LINENO"
29841then :
29842
29843
29844else $as_nop
29845
29846 CFLAGS=`echo $CFLAGS | $SED -e 's/-DWINVER=[^ ]*//g'`
29847 CFLAGS=`echo $CFLAGS | $SED -e 's/-D_WIN32_WINNT=[^ ]*//g'`
29848 CPPFLAGS=`echo $CPPFLAGS | $SED -e 's/-DWINVER=[^ ]*//g'`
29849 CPPFLAGS=`echo $CPPFLAGS | $SED -e 's/-D_WIN32_WINNT=[^ ]*//g'`
29850 WINIDN_CPPFLAGS="$WINIDN_CPPFLAGS -DWINVER=0x0600"
29851
29852fi
29853rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29854 #
Elliott Hughes82be86d2017-09-20 17:00:17 -070029855 CPPFLAGS="$CPPFLAGS $WINIDN_CPPFLAGS"
29856 LDFLAGS="$LDFLAGS $WINIDN_LDFLAGS"
29857 LIBS="$WINIDN_LIBS $LIBS"
29858 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080029859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if IdnToUnicode can be linked" >&5
29860printf %s "checking if IdnToUnicode can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29862/* end confdefs.h. */
29863
29864
29865 #include <windows.h>
29866
29867int main (void)
29868{
29869
29870 IdnToUnicode(0, NULL, 0, NULL, 0);
29871
29872 ;
29873 return 0;
29874}
29875
29876_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080029877if ac_fn_c_try_link "$LINENO"
29878then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070029879
Elliott Hughesf344baa2021-12-07 09:12:34 -080029880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29881printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029882 tst_links_winidn="yes"
29883
Elliott Hughesf344baa2021-12-07 09:12:34 -080029884else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070029885
Elliott Hughesf344baa2021-12-07 09:12:34 -080029886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
29887printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029888 tst_links_winidn="no"
29889
29890fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080029891rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070029892 conftest$ac_exeext conftest.$ac_ext
29893 #
29894 if test "$tst_links_winidn" = "yes"; then
29895
Elliott Hughesf344baa2021-12-07 09:12:34 -080029896printf "%s\n" "#define USE_WIN32_IDN 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070029897
29898
Elliott Hughesf344baa2021-12-07 09:12:34 -080029899printf "%s\n" "#define WANT_IDN_PROTOTYPES 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070029900
29901 IDN_ENABLED=1
29902
29903 curl_idn_msg="enabled (Windows-native)"
29904 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080029905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find libraries for IDN support: IDN disabled" >&5
29906printf "%s\n" "$as_me: WARNING: Cannot find libraries for IDN support: IDN disabled" >&2;}
29907 CFLAGS="$clean_CFLAGS"
Elliott Hughes82be86d2017-09-20 17:00:17 -070029908 CPPFLAGS="$clean_CPPFLAGS"
29909 LDFLAGS="$clean_LDFLAGS"
29910 LIBS="$clean_LIBS"
29911 fi
29912fi
29913
29914
Elliott Hughesf344baa2021-12-07 09:12:34 -080029915{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build with libidn2" >&5
29916printf %s "checking whether to build with libidn2... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029917OPT_IDN="default"
29918
29919# Check whether --with-libidn2 was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080029920if test ${with_libidn2+y}
29921then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070029922 withval=$with_libidn2; OPT_IDN=$withval
29923fi
29924
29925case "$OPT_IDN" in
29926 no)
29927 want_idn="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080029928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
29929printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029930 ;;
29931 default)
29932 want_idn="yes"
29933 want_idn_path="default"
Elliott Hughesf344baa2021-12-07 09:12:34 -080029934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (assumed) yes" >&5
29935printf "%s\n" "(assumed) yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029936 ;;
29937 yes)
29938 want_idn="yes"
29939 want_idn_path="default"
Elliott Hughesf344baa2021-12-07 09:12:34 -080029940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29941printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029942 ;;
29943 *)
29944 want_idn="yes"
29945 want_idn_path="$withval"
Elliott Hughesf344baa2021-12-07 09:12:34 -080029946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes ($withval)" >&5
29947printf "%s\n" "yes ($withval)" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070029948 ;;
29949esac
29950
29951if test "$want_idn" = "yes"; then
29952 clean_CPPFLAGS="$CPPFLAGS"
29953 clean_LDFLAGS="$LDFLAGS"
29954 clean_LIBS="$LIBS"
29955 PKGCONFIG="no"
29956 #
29957 if test "$want_idn_path" != "default"; then
29958 IDN_PCDIR="$want_idn_path/lib$libsuff/pkgconfig"
29959
29960 if test -n "$PKG_CONFIG"; then
29961 PKGCONFIG="$PKG_CONFIG"
29962 else
29963 if test -n "$ac_tool_prefix"; then
29964 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
29965set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080029966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29967printf %s "checking for $ac_word... " >&6; }
29968if test ${ac_cv_path_PKGCONFIG+y}
29969then :
29970 printf %s "(cached) " >&6
29971else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070029972 case $PKGCONFIG in
29973 [\\/]* | ?:[\\/]*)
29974 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
29975 ;;
29976 *)
29977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29978as_dummy="$PATH:/usr/bin:/usr/local/bin"
29979for as_dir in $as_dummy
29980do
29981 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080029982 case $as_dir in #(((
29983 '') as_dir=./ ;;
29984 */) ;;
29985 *) as_dir=$as_dir/ ;;
29986 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070029987 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080029988 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
29989 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
29990 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070029991 break 2
29992 fi
29993done
29994 done
29995IFS=$as_save_IFS
29996
29997 ;;
29998esac
29999fi
30000PKGCONFIG=$ac_cv_path_PKGCONFIG
30001if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080030002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
30003printf "%s\n" "$PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030004else
Elliott Hughesf344baa2021-12-07 09:12:34 -080030005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
30006printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030007fi
30008
30009
30010fi
30011if test -z "$ac_cv_path_PKGCONFIG"; then
30012 ac_pt_PKGCONFIG=$PKGCONFIG
30013 # Extract the first word of "pkg-config", so it can be a program name with args.
30014set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080030015{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30016printf %s "checking for $ac_word... " >&6; }
30017if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
30018then :
30019 printf %s "(cached) " >&6
30020else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070030021 case $ac_pt_PKGCONFIG in
30022 [\\/]* | ?:[\\/]*)
30023 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
30024 ;;
30025 *)
30026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30027as_dummy="$PATH:/usr/bin:/usr/local/bin"
30028for as_dir in $as_dummy
30029do
30030 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080030031 case $as_dir in #(((
30032 '') as_dir=./ ;;
30033 */) ;;
30034 *) as_dir=$as_dir/ ;;
30035 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070030036 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080030037 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
30038 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
30039 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070030040 break 2
30041 fi
30042done
30043 done
30044IFS=$as_save_IFS
30045
30046 ;;
30047esac
30048fi
30049ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
30050if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080030051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
30052printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030053else
Elliott Hughesf344baa2021-12-07 09:12:34 -080030054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
30055printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030056fi
30057
30058 if test "x$ac_pt_PKGCONFIG" = x; then
30059 PKGCONFIG="no"
30060 else
30061 case $cross_compiling:$ac_tool_warned in
30062yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080030063{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30064printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070030065ac_tool_warned=yes ;;
30066esac
30067 PKGCONFIG=$ac_pt_PKGCONFIG
30068 fi
30069else
30070 PKGCONFIG="$ac_cv_path_PKGCONFIG"
30071fi
30072
30073 fi
30074
30075 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080030076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libidn2 options with pkg-config" >&5
30077printf %s "checking for libidn2 options with pkg-config... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030078 itexists=`
30079 if test -n "$IDN_PCDIR"; then
30080 PKG_CONFIG_LIBDIR="$IDN_PCDIR"
30081 export PKG_CONFIG_LIBDIR
30082 fi
30083 $PKGCONFIG --exists libidn2 >/dev/null 2>&1 && echo 1`
30084
30085 if test -z "$itexists"; then
30086 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080030087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
30088printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030089 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080030090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
30091printf "%s\n" "found" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030092 fi
30093 fi
30094
30095 if test "$PKGCONFIG" != "no"; then
30096 IDN_LIBS=`
30097 if test -n "$IDN_PCDIR"; then
30098 PKG_CONFIG_LIBDIR="$IDN_PCDIR"
30099 export PKG_CONFIG_LIBDIR
30100 fi
30101 $PKGCONFIG --libs-only-l libidn2 2>/dev/null`
30102 IDN_LDFLAGS=`
30103 if test -n "$IDN_PCDIR"; then
30104 PKG_CONFIG_LIBDIR="$IDN_PCDIR"
30105 export PKG_CONFIG_LIBDIR
30106 fi
30107 $PKGCONFIG --libs-only-L libidn2 2>/dev/null`
30108 IDN_CPPFLAGS=`
30109 if test -n "$IDN_PCDIR"; then
30110 PKG_CONFIG_LIBDIR="$IDN_PCDIR"
30111 export PKG_CONFIG_LIBDIR
30112 fi
30113 $PKGCONFIG --cflags-only-I libidn2 2>/dev/null`
Haibo Huangca2a8022020-07-10 20:17:42 -070030114 IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/^-L//'`
Elliott Hughes82be86d2017-09-20 17:00:17 -070030115 else
30116 IDN_LIBS="-lidn2"
30117 IDN_LDFLAGS="-L$want_idn_path/lib$libsuff"
30118 IDN_CPPFLAGS="-I$want_idn_path/include"
30119 IDN_DIR="$want_idn_path/lib$libsuff"
30120 fi
30121 else
30122
30123 if test -n "$PKG_CONFIG"; then
30124 PKGCONFIG="$PKG_CONFIG"
30125 else
30126 if test -n "$ac_tool_prefix"; then
30127 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
30128set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080030129{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30130printf %s "checking for $ac_word... " >&6; }
30131if test ${ac_cv_path_PKGCONFIG+y}
30132then :
30133 printf %s "(cached) " >&6
30134else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070030135 case $PKGCONFIG in
30136 [\\/]* | ?:[\\/]*)
30137 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
30138 ;;
30139 *)
30140 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30141as_dummy="$PATH:/usr/bin:/usr/local/bin"
30142for as_dir in $as_dummy
30143do
30144 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080030145 case $as_dir in #(((
30146 '') as_dir=./ ;;
30147 */) ;;
30148 *) as_dir=$as_dir/ ;;
30149 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070030150 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080030151 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
30152 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
30153 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070030154 break 2
30155 fi
30156done
30157 done
30158IFS=$as_save_IFS
30159
30160 ;;
30161esac
30162fi
30163PKGCONFIG=$ac_cv_path_PKGCONFIG
30164if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080030165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
30166printf "%s\n" "$PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030167else
Elliott Hughesf344baa2021-12-07 09:12:34 -080030168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
30169printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030170fi
30171
30172
30173fi
30174if test -z "$ac_cv_path_PKGCONFIG"; then
30175 ac_pt_PKGCONFIG=$PKGCONFIG
30176 # Extract the first word of "pkg-config", so it can be a program name with args.
30177set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080030178{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30179printf %s "checking for $ac_word... " >&6; }
30180if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
30181then :
30182 printf %s "(cached) " >&6
30183else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070030184 case $ac_pt_PKGCONFIG in
30185 [\\/]* | ?:[\\/]*)
30186 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
30187 ;;
30188 *)
30189 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30190as_dummy="$PATH:/usr/bin:/usr/local/bin"
30191for as_dir in $as_dummy
30192do
30193 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080030194 case $as_dir in #(((
30195 '') as_dir=./ ;;
30196 */) ;;
30197 *) as_dir=$as_dir/ ;;
30198 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070030199 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080030200 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
30201 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
30202 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070030203 break 2
30204 fi
30205done
30206 done
30207IFS=$as_save_IFS
30208
30209 ;;
30210esac
30211fi
30212ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
30213if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080030214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
30215printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030216else
Elliott Hughesf344baa2021-12-07 09:12:34 -080030217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
30218printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030219fi
30220
30221 if test "x$ac_pt_PKGCONFIG" = x; then
30222 PKGCONFIG="no"
30223 else
30224 case $cross_compiling:$ac_tool_warned in
30225yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080030226{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30227printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070030228ac_tool_warned=yes ;;
30229esac
30230 PKGCONFIG=$ac_pt_PKGCONFIG
30231 fi
30232else
30233 PKGCONFIG="$ac_cv_path_PKGCONFIG"
30234fi
30235
30236 fi
30237
30238 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080030239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libidn2 options with pkg-config" >&5
30240printf %s "checking for libidn2 options with pkg-config... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030241 itexists=`
30242 if test -n ""; then
30243 PKG_CONFIG_LIBDIR=""
30244 export PKG_CONFIG_LIBDIR
30245 fi
30246 $PKGCONFIG --exists libidn2 >/dev/null 2>&1 && echo 1`
30247
30248 if test -z "$itexists"; then
30249 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080030250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
30251printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030252 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080030253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
30254printf "%s\n" "found" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030255 fi
30256 fi
30257
30258 if test "$PKGCONFIG" != "no"; then
30259 IDN_LIBS=`$PKGCONFIG --libs-only-l libidn2 2>/dev/null`
30260 IDN_LDFLAGS=`$PKGCONFIG --libs-only-L libidn2 2>/dev/null`
30261 IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I libidn2 2>/dev/null`
Haibo Huangca2a8022020-07-10 20:17:42 -070030262 IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/^-L//'`
Elliott Hughes82be86d2017-09-20 17:00:17 -070030263 else
30264 IDN_LIBS="-lidn2"
30265 fi
30266 fi
30267 #
30268 if test "$PKGCONFIG" != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080030269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: IDN_LIBS: \"$IDN_LIBS\"" >&5
30270printf "%s\n" "$as_me: pkg-config: IDN_LIBS: \"$IDN_LIBS\"" >&6;}
30271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: IDN_LDFLAGS: \"$IDN_LDFLAGS\"" >&5
30272printf "%s\n" "$as_me: pkg-config: IDN_LDFLAGS: \"$IDN_LDFLAGS\"" >&6;}
30273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: IDN_CPPFLAGS: \"$IDN_CPPFLAGS\"" >&5
30274printf "%s\n" "$as_me: pkg-config: IDN_CPPFLAGS: \"$IDN_CPPFLAGS\"" >&6;}
30275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: IDN_DIR: \"$IDN_DIR\"" >&5
30276printf "%s\n" "$as_me: pkg-config: IDN_DIR: \"$IDN_DIR\"" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070030277 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080030278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: IDN_LIBS: \"$IDN_LIBS\"" >&5
30279printf "%s\n" "$as_me: IDN_LIBS: \"$IDN_LIBS\"" >&6;}
30280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: IDN_LDFLAGS: \"$IDN_LDFLAGS\"" >&5
30281printf "%s\n" "$as_me: IDN_LDFLAGS: \"$IDN_LDFLAGS\"" >&6;}
30282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: IDN_CPPFLAGS: \"$IDN_CPPFLAGS\"" >&5
30283printf "%s\n" "$as_me: IDN_CPPFLAGS: \"$IDN_CPPFLAGS\"" >&6;}
30284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: IDN_DIR: \"$IDN_DIR\"" >&5
30285printf "%s\n" "$as_me: IDN_DIR: \"$IDN_DIR\"" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070030286 fi
30287 #
30288 CPPFLAGS="$CPPFLAGS $IDN_CPPFLAGS"
30289 LDFLAGS="$LDFLAGS $IDN_LDFLAGS"
30290 LIBS="$IDN_LIBS $LIBS"
30291 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080030292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if idn2_lookup_ul can be linked" >&5
30293printf %s "checking if idn2_lookup_ul can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30295/* end confdefs.h. */
30296
30297
30298#define idn2_lookup_ul innocuous_idn2_lookup_ul
30299#ifdef __STDC__
30300# include <limits.h>
30301#else
30302# include <assert.h>
30303#endif
30304#undef idn2_lookup_ul
30305#ifdef __cplusplus
30306extern "C"
30307#endif
30308char idn2_lookup_ul ();
30309#if defined __stub_idn2_lookup_ul || defined __stub___idn2_lookup_ul
30310choke me
30311#endif
30312
30313int main (void)
30314{
30315return idn2_lookup_ul ();
30316 ;
30317 return 0;
30318}
30319
30320_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080030321if ac_fn_c_try_link "$LINENO"
30322then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070030323
Elliott Hughesf344baa2021-12-07 09:12:34 -080030324 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30325printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030326 tst_links_libidn="yes"
30327
Elliott Hughesf344baa2021-12-07 09:12:34 -080030328else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070030329
Elliott Hughesf344baa2021-12-07 09:12:34 -080030330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
30331printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030332 tst_links_libidn="no"
30333
30334fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080030335rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070030336 conftest$ac_exeext conftest.$ac_ext
30337 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080030338 ac_fn_c_check_header_compile "$LINENO" "idn2.h" "ac_cv_header_idn2_h" "$ac_includes_default"
30339if test "x$ac_cv_header_idn2_h" = xyes
30340then :
30341 printf "%s\n" "#define HAVE_IDN2_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070030342
30343fi
30344
Elliott Hughes82be86d2017-09-20 17:00:17 -070030345
30346 if test "$tst_links_libidn" = "yes"; then
30347
Elliott Hughesf344baa2021-12-07 09:12:34 -080030348printf "%s\n" "#define HAVE_LIBIDN2 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070030349
30350
30351 IDN_ENABLED=1
30352
30353 curl_idn_msg="enabled (libidn2)"
30354 if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070030355 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$IDN_DIR"
30356 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080030357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $IDN_DIR to CURL_LIBRARY_PATH" >&5
30358printf "%s\n" "$as_me: Added $IDN_DIR to CURL_LIBRARY_PATH" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070030359 fi
30360 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080030361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find libraries for IDN support: IDN disabled" >&5
30362printf "%s\n" "$as_me: WARNING: Cannot find libraries for IDN support: IDN disabled" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070030363 CPPFLAGS="$clean_CPPFLAGS"
30364 LDFLAGS="$clean_LDFLAGS"
30365 LIBS="$clean_LIBS"
30366 fi
30367fi
30368
30369
Elliott Hughes82be86d2017-09-20 17:00:17 -070030370OPT_H2="yes"
30371
Elliott Hughesf344baa2021-12-07 09:12:34 -080030372if test "x$disable_http" = "xyes" -o X"$want_hyper" != Xno; then
30373 # without HTTP or with Hyper, nghttp2 is no use
Elliott Hughes82be86d2017-09-20 17:00:17 -070030374 OPT_H2="no"
30375fi
30376
30377
30378# Check whether --with-nghttp2 was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080030379if test ${with_nghttp2+y}
30380then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070030381 withval=$with_nghttp2; OPT_H2=$withval
30382fi
30383
30384case "$OPT_H2" in
30385 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080030386 want_nghttp2="no"
Elliott Hughes82be86d2017-09-20 17:00:17 -070030387 ;;
30388 yes)
Elliott Hughesf344baa2021-12-07 09:12:34 -080030389 want_nghttp2="default"
30390 want_nghttp2_path=""
Elliott Hughes82be86d2017-09-20 17:00:17 -070030391 ;;
30392 *)
Elliott Hughesf344baa2021-12-07 09:12:34 -080030393 want_nghttp2="yes"
30394 want_nghttp2_path="$withval/lib/pkgconfig"
Elliott Hughes82be86d2017-09-20 17:00:17 -070030395 ;;
30396esac
30397
Elliott Hughesf344baa2021-12-07 09:12:34 -080030398if test X"$want_nghttp2" != Xno; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070030399 CLEANLDFLAGS="$LDFLAGS"
30400 CLEANCPPFLAGS="$CPPFLAGS"
30401 CLEANLIBS="$LIBS"
30402
30403
30404 if test -n "$PKG_CONFIG"; then
30405 PKGCONFIG="$PKG_CONFIG"
30406 else
30407 if test -n "$ac_tool_prefix"; then
30408 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
30409set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080030410{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30411printf %s "checking for $ac_word... " >&6; }
30412if test ${ac_cv_path_PKGCONFIG+y}
30413then :
30414 printf %s "(cached) " >&6
30415else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070030416 case $PKGCONFIG in
30417 [\\/]* | ?:[\\/]*)
30418 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
30419 ;;
30420 *)
30421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30422as_dummy="$PATH:/usr/bin:/usr/local/bin"
30423for as_dir in $as_dummy
30424do
30425 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080030426 case $as_dir in #(((
30427 '') as_dir=./ ;;
30428 */) ;;
30429 *) as_dir=$as_dir/ ;;
30430 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070030431 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080030432 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
30433 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
30434 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070030435 break 2
30436 fi
30437done
30438 done
30439IFS=$as_save_IFS
30440
30441 ;;
30442esac
30443fi
30444PKGCONFIG=$ac_cv_path_PKGCONFIG
30445if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080030446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
30447printf "%s\n" "$PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030448else
Elliott Hughesf344baa2021-12-07 09:12:34 -080030449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
30450printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030451fi
30452
30453
30454fi
30455if test -z "$ac_cv_path_PKGCONFIG"; then
30456 ac_pt_PKGCONFIG=$PKGCONFIG
30457 # Extract the first word of "pkg-config", so it can be a program name with args.
30458set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080030459{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30460printf %s "checking for $ac_word... " >&6; }
30461if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
30462then :
30463 printf %s "(cached) " >&6
30464else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070030465 case $ac_pt_PKGCONFIG in
30466 [\\/]* | ?:[\\/]*)
30467 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
30468 ;;
30469 *)
30470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30471as_dummy="$PATH:/usr/bin:/usr/local/bin"
30472for as_dir in $as_dummy
30473do
30474 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080030475 case $as_dir in #(((
30476 '') as_dir=./ ;;
30477 */) ;;
30478 *) as_dir=$as_dir/ ;;
30479 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070030480 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080030481 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
30482 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
30483 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070030484 break 2
30485 fi
30486done
30487 done
30488IFS=$as_save_IFS
30489
30490 ;;
30491esac
30492fi
30493ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
30494if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080030495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
30496printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030497else
Elliott Hughesf344baa2021-12-07 09:12:34 -080030498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
30499printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030500fi
30501
30502 if test "x$ac_pt_PKGCONFIG" = x; then
30503 PKGCONFIG="no"
30504 else
30505 case $cross_compiling:$ac_tool_warned in
30506yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080030507{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30508printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070030509ac_tool_warned=yes ;;
30510esac
30511 PKGCONFIG=$ac_pt_PKGCONFIG
30512 fi
30513else
30514 PKGCONFIG="$ac_cv_path_PKGCONFIG"
30515fi
30516
30517 fi
30518
30519 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080030520 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnghttp2 options with pkg-config" >&5
30521printf %s "checking for libnghttp2 options with pkg-config... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030522 itexists=`
Elliott Hughesf344baa2021-12-07 09:12:34 -080030523 if test -n "$want_nghttp2_path"; then
30524 PKG_CONFIG_LIBDIR="$want_nghttp2_path"
Elliott Hughes82be86d2017-09-20 17:00:17 -070030525 export PKG_CONFIG_LIBDIR
30526 fi
30527 $PKGCONFIG --exists libnghttp2 >/dev/null 2>&1 && echo 1`
30528
30529 if test -z "$itexists"; then
30530 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080030531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
30532printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030533 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080030534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
30535printf "%s\n" "found" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070030536 fi
30537 fi
30538
30539
30540 if test "$PKGCONFIG" != "no" ; then
30541 LIB_H2=`
Elliott Hughesf344baa2021-12-07 09:12:34 -080030542 if test -n "$want_nghttp2_path"; then
30543 PKG_CONFIG_LIBDIR="$want_nghttp2_path"
Elliott Hughes82be86d2017-09-20 17:00:17 -070030544 export PKG_CONFIG_LIBDIR
30545 fi
30546
30547 $PKGCONFIG --libs-only-l libnghttp2`
Elliott Hughesf344baa2021-12-07 09:12:34 -080030548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -l is $LIB_H2" >&5
30549printf "%s\n" "$as_me: -l is $LIB_H2" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070030550
30551 CPP_H2=`
Elliott Hughesf344baa2021-12-07 09:12:34 -080030552 if test -n "$want_nghttp2_path"; then
30553 PKG_CONFIG_LIBDIR="$want_nghttp2_path"
Elliott Hughes82be86d2017-09-20 17:00:17 -070030554 export PKG_CONFIG_LIBDIR
30555 fi
30556 $PKGCONFIG --cflags-only-I libnghttp2`
Elliott Hughesf344baa2021-12-07 09:12:34 -080030557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -I is $CPP_H2" >&5
30558printf "%s\n" "$as_me: -I is $CPP_H2" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070030559
30560 LD_H2=`
Elliott Hughesf344baa2021-12-07 09:12:34 -080030561 if test -n "$want_nghttp2_path"; then
30562 PKG_CONFIG_LIBDIR="$want_nghttp2_path"
Elliott Hughes82be86d2017-09-20 17:00:17 -070030563 export PKG_CONFIG_LIBDIR
30564 fi
30565
30566 $PKGCONFIG --libs-only-L libnghttp2`
Elliott Hughesf344baa2021-12-07 09:12:34 -080030567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -L is $LD_H2" >&5
30568printf "%s\n" "$as_me: -L is $LD_H2" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070030569
30570 LDFLAGS="$LDFLAGS $LD_H2"
30571 CPPFLAGS="$CPPFLAGS $CPP_H2"
30572 LIBS="$LIB_H2 $LIBS"
30573
Haibo Huangb51266f2020-03-04 02:22:48 -080030574 # use nghttp2_session_set_local_window_size to require nghttp2
30575 # >= 1.12.0
Elliott Hughesf344baa2021-12-07 09:12:34 -080030576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nghttp2_session_set_local_window_size in -lnghttp2" >&5
30577printf %s "checking for nghttp2_session_set_local_window_size in -lnghttp2... " >&6; }
30578if test ${ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size+y}
30579then :
30580 printf %s "(cached) " >&6
30581else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070030582 ac_check_lib_save_LIBS=$LIBS
Elliott Hughesf344baa2021-12-07 09:12:34 -080030583LIBS="-lnghttp2 $LIBS"
Elliott Hughes82be86d2017-09-20 17:00:17 -070030584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30585/* end confdefs.h. */
30586
30587
30588#ifdef __cplusplus
30589extern "C"
30590#endif
Haibo Huangb51266f2020-03-04 02:22:48 -080030591char nghttp2_session_set_local_window_size ();
Elliott Hughes82be86d2017-09-20 17:00:17 -070030592int main (void)
30593{
Haibo Huangb51266f2020-03-04 02:22:48 -080030594return nghttp2_session_set_local_window_size ();
Elliott Hughes82be86d2017-09-20 17:00:17 -070030595 ;
30596 return 0;
30597}
30598_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080030599if ac_fn_c_try_link "$LINENO"
30600then :
30601 ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size=yes
30602else $as_nop
30603 ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size=no
Elliott Hughes82be86d2017-09-20 17:00:17 -070030604fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080030605rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070030606 conftest$ac_exeext conftest.$ac_ext
30607LIBS=$ac_check_lib_save_LIBS
30608fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080030609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size" >&5
30610printf "%s\n" "$ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size" >&6; }
30611if test "x$ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size" = xyes
30612then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070030613
Elliott Hughesf344baa2021-12-07 09:12:34 -080030614 for ac_header in nghttp2/nghttp2.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070030615do :
Elliott Hughesf344baa2021-12-07 09:12:34 -080030616 ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default"
30617if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes
30618then :
30619 printf "%s\n" "#define HAVE_NGHTTP2_NGHTTP2_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070030620 curl_h2_msg="enabled (nghttp2)"
30621 NGHTTP2_ENABLED=1
30622
Elliott Hughesf344baa2021-12-07 09:12:34 -080030623printf "%s\n" "#define USE_NGHTTP2 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070030624
30625 USE_NGHTTP2=1
30626
30627
30628fi
30629
30630done
30631
Elliott Hughesf344baa2021-12-07 09:12:34 -080030632else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070030633 LDFLAGS=$CLEANLDFLAGS
30634 CPPFLAGS=$CLEANCPPFLAGS
30635 LIBS=$CLEANLIBS
30636
30637fi
30638
30639
30640 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080030641 if test X"$want_nghttp2" != Xdefault; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070030642 as_fn_error $? "--with-nghttp2 was specified but could not find libnghttp2 pkg-config file." "$LINENO" 5
30643 fi
30644 fi
30645
30646fi
30647
30648
Haibo Huang445085a2019-09-11 13:33:50 -070030649OPT_TCP2="yes"
Haibo Huang445085a2019-09-11 13:33:50 -070030650
30651if test "x$disable_http" = "xyes"; then
30652 # without HTTP, ngtcp2 is no use
30653 OPT_TCP2="no"
30654fi
30655
30656
30657# Check whether --with-ngtcp2 was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080030658if test ${with_ngtcp2+y}
30659then :
Haibo Huang445085a2019-09-11 13:33:50 -070030660 withval=$with_ngtcp2; OPT_TCP2=$withval
30661fi
30662
30663case "$OPT_TCP2" in
30664 no)
30665 want_tcp2="no"
30666 ;;
30667 yes)
30668 want_tcp2="default"
30669 want_tcp2_path=""
30670 ;;
30671 *)
30672 want_tcp2="yes"
30673 want_tcp2_path="$withval/lib/pkgconfig"
30674 ;;
30675esac
30676
Haibo Huangb5a52b92020-10-28 22:18:23 -070030677curl_tcp2_msg="no (--with-ngtcp2)"
Haibo Huang445085a2019-09-11 13:33:50 -070030678if test X"$want_tcp2" != Xno; then
30679 CLEANLDFLAGS="$LDFLAGS"
30680 CLEANCPPFLAGS="$CPPFLAGS"
30681 CLEANLIBS="$LIBS"
30682
30683
30684 if test -n "$PKG_CONFIG"; then
30685 PKGCONFIG="$PKG_CONFIG"
30686 else
30687 if test -n "$ac_tool_prefix"; then
30688 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
30689set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080030690{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30691printf %s "checking for $ac_word... " >&6; }
30692if test ${ac_cv_path_PKGCONFIG+y}
30693then :
30694 printf %s "(cached) " >&6
30695else $as_nop
Haibo Huang445085a2019-09-11 13:33:50 -070030696 case $PKGCONFIG in
30697 [\\/]* | ?:[\\/]*)
30698 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
30699 ;;
30700 *)
30701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30702as_dummy="$PATH:/usr/bin:/usr/local/bin"
30703for as_dir in $as_dummy
30704do
30705 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080030706 case $as_dir in #(((
30707 '') as_dir=./ ;;
30708 */) ;;
30709 *) as_dir=$as_dir/ ;;
30710 esac
Haibo Huang445085a2019-09-11 13:33:50 -070030711 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080030712 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
30713 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
30714 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Haibo Huang445085a2019-09-11 13:33:50 -070030715 break 2
30716 fi
30717done
30718 done
30719IFS=$as_save_IFS
30720
30721 ;;
30722esac
30723fi
30724PKGCONFIG=$ac_cv_path_PKGCONFIG
30725if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080030726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
30727printf "%s\n" "$PKGCONFIG" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070030728else
Elliott Hughesf344baa2021-12-07 09:12:34 -080030729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
30730printf "%s\n" "no" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070030731fi
30732
30733
30734fi
30735if test -z "$ac_cv_path_PKGCONFIG"; then
30736 ac_pt_PKGCONFIG=$PKGCONFIG
30737 # Extract the first word of "pkg-config", so it can be a program name with args.
30738set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080030739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30740printf %s "checking for $ac_word... " >&6; }
30741if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
30742then :
30743 printf %s "(cached) " >&6
30744else $as_nop
Haibo Huang445085a2019-09-11 13:33:50 -070030745 case $ac_pt_PKGCONFIG in
30746 [\\/]* | ?:[\\/]*)
30747 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
30748 ;;
30749 *)
30750 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30751as_dummy="$PATH:/usr/bin:/usr/local/bin"
30752for as_dir in $as_dummy
30753do
30754 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080030755 case $as_dir in #(((
30756 '') as_dir=./ ;;
30757 */) ;;
30758 *) as_dir=$as_dir/ ;;
30759 esac
Haibo Huang445085a2019-09-11 13:33:50 -070030760 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080030761 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
30762 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
30763 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Haibo Huang445085a2019-09-11 13:33:50 -070030764 break 2
30765 fi
30766done
30767 done
30768IFS=$as_save_IFS
30769
30770 ;;
30771esac
30772fi
30773ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
30774if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080030775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
30776printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070030777else
Elliott Hughesf344baa2021-12-07 09:12:34 -080030778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
30779printf "%s\n" "no" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070030780fi
30781
30782 if test "x$ac_pt_PKGCONFIG" = x; then
30783 PKGCONFIG="no"
30784 else
30785 case $cross_compiling:$ac_tool_warned in
30786yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080030787{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30788printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Haibo Huang445085a2019-09-11 13:33:50 -070030789ac_tool_warned=yes ;;
30790esac
30791 PKGCONFIG=$ac_pt_PKGCONFIG
30792 fi
30793else
30794 PKGCONFIG="$ac_cv_path_PKGCONFIG"
30795fi
30796
30797 fi
30798
30799 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080030800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libngtcp2 options with pkg-config" >&5
30801printf %s "checking for libngtcp2 options with pkg-config... " >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070030802 itexists=`
30803 if test -n "$want_tcp2_path"; then
30804 PKG_CONFIG_LIBDIR="$want_tcp2_path"
30805 export PKG_CONFIG_LIBDIR
30806 fi
30807 $PKGCONFIG --exists libngtcp2 >/dev/null 2>&1 && echo 1`
30808
30809 if test -z "$itexists"; then
30810 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080030811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
30812printf "%s\n" "no" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070030813 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080030814 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
30815printf "%s\n" "found" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070030816 fi
30817 fi
30818
30819
30820 if test "$PKGCONFIG" != "no" ; then
30821 LIB_TCP2=`
30822 if test -n "$want_tcp2_path"; then
30823 PKG_CONFIG_LIBDIR="$want_tcp2_path"
30824 export PKG_CONFIG_LIBDIR
30825 fi
30826
30827 $PKGCONFIG --libs-only-l libngtcp2`
Elliott Hughesf344baa2021-12-07 09:12:34 -080030828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -l is $LIB_TCP2" >&5
30829printf "%s\n" "$as_me: -l is $LIB_TCP2" >&6;}
Haibo Huang445085a2019-09-11 13:33:50 -070030830
30831 CPP_TCP2=`
30832 if test -n "$want_tcp2_path"; then
30833 PKG_CONFIG_LIBDIR="$want_tcp2_path"
30834 export PKG_CONFIG_LIBDIR
30835 fi
30836 $PKGCONFIG --cflags-only-I libngtcp2`
Elliott Hughesf344baa2021-12-07 09:12:34 -080030837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -I is $CPP_TCP2" >&5
30838printf "%s\n" "$as_me: -I is $CPP_TCP2" >&6;}
Haibo Huang445085a2019-09-11 13:33:50 -070030839
30840 LD_TCP2=`
30841 if test -n "$want_tcp2_path"; then
30842 PKG_CONFIG_LIBDIR="$want_tcp2_path"
30843 export PKG_CONFIG_LIBDIR
30844 fi
30845
30846 $PKGCONFIG --libs-only-L libngtcp2`
Elliott Hughesf344baa2021-12-07 09:12:34 -080030847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -L is $LD_TCP2" >&5
30848printf "%s\n" "$as_me: -L is $LD_TCP2" >&6;}
Haibo Huang445085a2019-09-11 13:33:50 -070030849
30850 LDFLAGS="$LDFLAGS $LD_TCP2"
30851 CPPFLAGS="$CPPFLAGS $CPP_TCP2"
30852 LIBS="$LIB_TCP2 $LIBS"
30853
30854 if test "x$cross_compiling" != "xyes"; then
Haibo Huangca2a8022020-07-10 20:17:42 -070030855 DIR_TCP2=`echo $LD_TCP2 | $SED -e 's/^-L//'`
Haibo Huang445085a2019-09-11 13:33:50 -070030856 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080030857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_conn_client_new_versioned in -lngtcp2" >&5
30858printf %s "checking for ngtcp2_conn_client_new_versioned in -lngtcp2... " >&6; }
30859if test ${ac_cv_lib_ngtcp2_ngtcp2_conn_client_new_versioned+y}
30860then :
30861 printf %s "(cached) " >&6
30862else $as_nop
Haibo Huang445085a2019-09-11 13:33:50 -070030863 ac_check_lib_save_LIBS=$LIBS
30864LIBS="-lngtcp2 $LIBS"
30865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30866/* end confdefs.h. */
30867
30868
30869#ifdef __cplusplus
30870extern "C"
30871#endif
Elliott Hughesf344baa2021-12-07 09:12:34 -080030872char ngtcp2_conn_client_new_versioned ();
Haibo Huang445085a2019-09-11 13:33:50 -070030873int main (void)
30874{
Elliott Hughesf344baa2021-12-07 09:12:34 -080030875return ngtcp2_conn_client_new_versioned ();
Haibo Huang445085a2019-09-11 13:33:50 -070030876 ;
30877 return 0;
30878}
30879_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080030880if ac_fn_c_try_link "$LINENO"
30881then :
30882 ac_cv_lib_ngtcp2_ngtcp2_conn_client_new_versioned=yes
30883else $as_nop
30884 ac_cv_lib_ngtcp2_ngtcp2_conn_client_new_versioned=no
Haibo Huang445085a2019-09-11 13:33:50 -070030885fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080030886rm -f core conftest.err conftest.$ac_objext conftest.beam \
Haibo Huang445085a2019-09-11 13:33:50 -070030887 conftest$ac_exeext conftest.$ac_ext
30888LIBS=$ac_check_lib_save_LIBS
30889fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080030890{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_ngtcp2_conn_client_new_versioned" >&5
30891printf "%s\n" "$ac_cv_lib_ngtcp2_ngtcp2_conn_client_new_versioned" >&6; }
30892if test "x$ac_cv_lib_ngtcp2_ngtcp2_conn_client_new_versioned" = xyes
30893then :
Haibo Huang445085a2019-09-11 13:33:50 -070030894
Elliott Hughesf344baa2021-12-07 09:12:34 -080030895 for ac_header in ngtcp2/ngtcp2.h
Haibo Huang445085a2019-09-11 13:33:50 -070030896do :
Elliott Hughesf344baa2021-12-07 09:12:34 -080030897 ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2.h" "ac_cv_header_ngtcp2_ngtcp2_h" "$ac_includes_default"
30898if test "x$ac_cv_header_ngtcp2_ngtcp2_h" = xyes
30899then :
30900 printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_H 1" >>confdefs.h
Haibo Huang445085a2019-09-11 13:33:50 -070030901 NGTCP2_ENABLED=1
30902
Elliott Hughesf344baa2021-12-07 09:12:34 -080030903printf "%s\n" "#define USE_NGTCP2 1" >>confdefs.h
Haibo Huang445085a2019-09-11 13:33:50 -070030904
30905 USE_NGTCP2=1
30906
30907 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_TCP2"
30908 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080030909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_TCP2 to CURL_LIBRARY_PATH" >&5
30910printf "%s\n" "$as_me: Added $DIR_TCP2 to CURL_LIBRARY_PATH" >&6;}
Haibo Huang445085a2019-09-11 13:33:50 -070030911
30912fi
30913
30914done
30915
Elliott Hughesf344baa2021-12-07 09:12:34 -080030916else $as_nop
Haibo Huang445085a2019-09-11 13:33:50 -070030917 LDFLAGS=$CLEANLDFLAGS
30918 CPPFLAGS=$CLEANCPPFLAGS
30919 LIBS=$CLEANLIBS
30920
30921fi
30922
30923
30924 else
30925 if test X"$want_tcp2" != Xdefault; then
30926 as_fn_error $? "--with-ngtcp2 was specified but could not find ngtcp2 pkg-config file." "$LINENO" 5
30927 fi
30928 fi
30929
30930fi
30931
Haibo Huang24c77a12020-04-29 13:49:57 -070030932if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1"; then
Haibo Huang445085a2019-09-11 13:33:50 -070030933 CLEANLDFLAGS="$LDFLAGS"
30934 CLEANCPPFLAGS="$CPPFLAGS"
30935 CLEANLIBS="$LIBS"
30936
30937
30938 if test -n "$PKG_CONFIG"; then
30939 PKGCONFIG="$PKG_CONFIG"
30940 else
30941 if test -n "$ac_tool_prefix"; then
30942 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
30943set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080030944{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30945printf %s "checking for $ac_word... " >&6; }
30946if test ${ac_cv_path_PKGCONFIG+y}
30947then :
30948 printf %s "(cached) " >&6
30949else $as_nop
Haibo Huang445085a2019-09-11 13:33:50 -070030950 case $PKGCONFIG in
30951 [\\/]* | ?:[\\/]*)
30952 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
30953 ;;
30954 *)
30955 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30956as_dummy="$PATH:/usr/bin:/usr/local/bin"
30957for as_dir in $as_dummy
30958do
30959 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080030960 case $as_dir in #(((
30961 '') as_dir=./ ;;
30962 */) ;;
30963 *) as_dir=$as_dir/ ;;
30964 esac
Haibo Huang445085a2019-09-11 13:33:50 -070030965 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080030966 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
30967 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
30968 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Haibo Huang445085a2019-09-11 13:33:50 -070030969 break 2
30970 fi
30971done
30972 done
30973IFS=$as_save_IFS
30974
30975 ;;
30976esac
30977fi
30978PKGCONFIG=$ac_cv_path_PKGCONFIG
30979if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080030980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
30981printf "%s\n" "$PKGCONFIG" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070030982else
Elliott Hughesf344baa2021-12-07 09:12:34 -080030983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
30984printf "%s\n" "no" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070030985fi
30986
30987
30988fi
30989if test -z "$ac_cv_path_PKGCONFIG"; then
30990 ac_pt_PKGCONFIG=$PKGCONFIG
30991 # Extract the first word of "pkg-config", so it can be a program name with args.
30992set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080030993{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30994printf %s "checking for $ac_word... " >&6; }
30995if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
30996then :
30997 printf %s "(cached) " >&6
30998else $as_nop
Haibo Huang445085a2019-09-11 13:33:50 -070030999 case $ac_pt_PKGCONFIG in
31000 [\\/]* | ?:[\\/]*)
31001 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
31002 ;;
31003 *)
31004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31005as_dummy="$PATH:/usr/bin:/usr/local/bin"
31006for as_dir in $as_dummy
31007do
31008 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080031009 case $as_dir in #(((
31010 '') as_dir=./ ;;
31011 */) ;;
31012 *) as_dir=$as_dir/ ;;
31013 esac
Haibo Huang445085a2019-09-11 13:33:50 -070031014 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080031015 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
31016 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
31017 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Haibo Huang445085a2019-09-11 13:33:50 -070031018 break 2
31019 fi
31020done
31021 done
31022IFS=$as_save_IFS
31023
31024 ;;
31025esac
31026fi
31027ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
31028if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080031029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
31030printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031031else
Elliott Hughesf344baa2021-12-07 09:12:34 -080031032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
31033printf "%s\n" "no" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031034fi
31035
31036 if test "x$ac_pt_PKGCONFIG" = x; then
31037 PKGCONFIG="no"
31038 else
31039 case $cross_compiling:$ac_tool_warned in
31040yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080031041{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31042printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Haibo Huang445085a2019-09-11 13:33:50 -070031043ac_tool_warned=yes ;;
31044esac
31045 PKGCONFIG=$ac_pt_PKGCONFIG
31046 fi
31047else
31048 PKGCONFIG="$ac_cv_path_PKGCONFIG"
31049fi
31050
31051 fi
31052
31053 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080031054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libngtcp2_crypto_openssl options with pkg-config" >&5
31055printf %s "checking for libngtcp2_crypto_openssl options with pkg-config... " >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031056 itexists=`
31057 if test -n "$want_tcp2_path"; then
31058 PKG_CONFIG_LIBDIR="$want_tcp2_path"
31059 export PKG_CONFIG_LIBDIR
31060 fi
31061 $PKGCONFIG --exists libngtcp2_crypto_openssl >/dev/null 2>&1 && echo 1`
31062
31063 if test -z "$itexists"; then
31064 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080031065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
31066printf "%s\n" "no" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031067 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080031068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
31069printf "%s\n" "found" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031070 fi
31071 fi
31072
31073
31074 if test "$PKGCONFIG" != "no" ; then
31075 LIB_NGTCP2_CRYPTO_OPENSSL=`
31076 if test -n "$want_tcp2_path"; then
31077 PKG_CONFIG_LIBDIR="$want_tcp2_path"
31078 export PKG_CONFIG_LIBDIR
31079 fi
31080
31081 $PKGCONFIG --libs-only-l libngtcp2_crypto_openssl`
Elliott Hughesf344baa2021-12-07 09:12:34 -080031082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -l is $LIB_NGTCP2_CRYPTO_OPENSSL" >&5
31083printf "%s\n" "$as_me: -l is $LIB_NGTCP2_CRYPTO_OPENSSL" >&6;}
Haibo Huang445085a2019-09-11 13:33:50 -070031084
31085 CPP_NGTCP2_CRYPTO_OPENSSL=`
31086 if test -n "$want_tcp2_path"; then
31087 PKG_CONFIG_LIBDIR="$want_tcp2_path"
31088 export PKG_CONFIG_LIBDIR
31089 fi
31090 $PKGCONFIG --cflags-only-I libngtcp2_crypto_openssl`
Elliott Hughesf344baa2021-12-07 09:12:34 -080031091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -I is $CPP_NGTCP2_CRYPTO_OPENSSL" >&5
31092printf "%s\n" "$as_me: -I is $CPP_NGTCP2_CRYPTO_OPENSSL" >&6;}
Haibo Huang445085a2019-09-11 13:33:50 -070031093
31094 LD_NGTCP2_CRYPTO_OPENSSL=`
31095 if test -n "$want_tcp2_path"; then
31096 PKG_CONFIG_LIBDIR="$want_tcp2_path"
31097 export PKG_CONFIG_LIBDIR
31098 fi
31099
31100 $PKGCONFIG --libs-only-L libngtcp2_crypto_openssl`
Elliott Hughesf344baa2021-12-07 09:12:34 -080031101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -L is $LD_NGTCP2_CRYPTO_OPENSSL" >&5
31102printf "%s\n" "$as_me: -L is $LD_NGTCP2_CRYPTO_OPENSSL" >&6;}
Haibo Huang445085a2019-09-11 13:33:50 -070031103
31104 LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_OPENSSL"
31105 CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_OPENSSL"
31106 LIBS="$LIB_NGTCP2_CRYPTO_OPENSSL $LIBS"
31107
31108 if test "x$cross_compiling" != "xyes"; then
Haibo Huangca2a8022020-07-10 20:17:42 -070031109 DIR_NGTCP2_CRYPTO_OPENSSL=`echo $LD_NGTCP2_CRYPTO_OPENSSL | $SED -e 's/^-L//'`
Haibo Huang445085a2019-09-11 13:33:50 -070031110 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080031111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_ctx_initial in -lngtcp2_crypto_openssl" >&5
31112printf %s "checking for ngtcp2_crypto_ctx_initial in -lngtcp2_crypto_openssl... " >&6; }
31113if test ${ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial+y}
31114then :
31115 printf %s "(cached) " >&6
31116else $as_nop
Haibo Huang445085a2019-09-11 13:33:50 -070031117 ac_check_lib_save_LIBS=$LIBS
31118LIBS="-lngtcp2_crypto_openssl $LIBS"
31119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31120/* end confdefs.h. */
31121
31122
31123#ifdef __cplusplus
31124extern "C"
31125#endif
31126char ngtcp2_crypto_ctx_initial ();
31127int main (void)
31128{
31129return ngtcp2_crypto_ctx_initial ();
31130 ;
31131 return 0;
31132}
31133_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080031134if ac_fn_c_try_link "$LINENO"
31135then :
Haibo Huang445085a2019-09-11 13:33:50 -070031136 ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080031137else $as_nop
Haibo Huang445085a2019-09-11 13:33:50 -070031138 ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial=no
31139fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080031140rm -f core conftest.err conftest.$ac_objext conftest.beam \
Haibo Huang445085a2019-09-11 13:33:50 -070031141 conftest$ac_exeext conftest.$ac_ext
31142LIBS=$ac_check_lib_save_LIBS
31143fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080031144{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial" >&5
31145printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial" >&6; }
31146if test "x$ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial" = xyes
31147then :
Haibo Huang445085a2019-09-11 13:33:50 -070031148
Elliott Hughesf344baa2021-12-07 09:12:34 -080031149 for ac_header in ngtcp2/ngtcp2_crypto.h
Haibo Huang445085a2019-09-11 13:33:50 -070031150do :
Elliott Hughesf344baa2021-12-07 09:12:34 -080031151 ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2_crypto.h" "ac_cv_header_ngtcp2_ngtcp2_crypto_h" "$ac_includes_default"
31152if test "x$ac_cv_header_ngtcp2_ngtcp2_crypto_h" = xyes
31153then :
31154 printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_CRYPTO_H 1" >>confdefs.h
Haibo Huang445085a2019-09-11 13:33:50 -070031155 NGTCP2_ENABLED=1
31156
Elliott Hughesf344baa2021-12-07 09:12:34 -080031157printf "%s\n" "#define USE_NGTCP2_CRYPTO_OPENSSL 1" >>confdefs.h
Haibo Huang445085a2019-09-11 13:33:50 -070031158
31159 USE_NGTCP2_CRYPTO_OPENSSL=1
31160
31161 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_OPENSSL"
31162 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080031163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_NGTCP2_CRYPTO_OPENSSL to CURL_LIBRARY_PATH" >&5
31164printf "%s\n" "$as_me: Added $DIR_NGTCP2_CRYPTO_OPENSSL to CURL_LIBRARY_PATH" >&6;}
Haibo Huang445085a2019-09-11 13:33:50 -070031165
31166fi
31167
31168done
31169
Elliott Hughesf344baa2021-12-07 09:12:34 -080031170else $as_nop
Haibo Huang445085a2019-09-11 13:33:50 -070031171 LDFLAGS=$CLEANLDFLAGS
31172 CPPFLAGS=$CLEANCPPFLAGS
31173 LIBS=$CLEANLIBS
31174
31175fi
31176
31177
31178 else
31179 if test X"$want_tcp2" != Xdefault; then
31180 as_fn_error $? "--with-ngtcp2 was specified but could not find ngtcp2_crypto_openssl pkg-config file." "$LINENO" 5
31181 fi
31182 fi
31183fi
31184
Haibo Huang24c77a12020-04-29 13:49:57 -070031185if test "x$NGTCP2_ENABLED" = "x1" -a "x$GNUTLS_ENABLED" = "x1"; then
31186 CLEANLDFLAGS="$LDFLAGS"
31187 CLEANCPPFLAGS="$CPPFLAGS"
31188 CLEANLIBS="$LIBS"
31189
31190
31191 if test -n "$PKG_CONFIG"; then
31192 PKGCONFIG="$PKG_CONFIG"
31193 else
31194 if test -n "$ac_tool_prefix"; then
31195 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
31196set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080031197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31198printf %s "checking for $ac_word... " >&6; }
31199if test ${ac_cv_path_PKGCONFIG+y}
31200then :
31201 printf %s "(cached) " >&6
31202else $as_nop
Haibo Huang24c77a12020-04-29 13:49:57 -070031203 case $PKGCONFIG in
31204 [\\/]* | ?:[\\/]*)
31205 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
31206 ;;
31207 *)
31208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31209as_dummy="$PATH:/usr/bin:/usr/local/bin"
31210for as_dir in $as_dummy
31211do
31212 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080031213 case $as_dir in #(((
31214 '') as_dir=./ ;;
31215 */) ;;
31216 *) as_dir=$as_dir/ ;;
31217 esac
Haibo Huang24c77a12020-04-29 13:49:57 -070031218 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080031219 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
31220 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
31221 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Haibo Huang24c77a12020-04-29 13:49:57 -070031222 break 2
31223 fi
31224done
31225 done
31226IFS=$as_save_IFS
31227
31228 ;;
31229esac
31230fi
31231PKGCONFIG=$ac_cv_path_PKGCONFIG
31232if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080031233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
31234printf "%s\n" "$PKGCONFIG" >&6; }
Haibo Huang24c77a12020-04-29 13:49:57 -070031235else
Elliott Hughesf344baa2021-12-07 09:12:34 -080031236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
31237printf "%s\n" "no" >&6; }
Haibo Huang24c77a12020-04-29 13:49:57 -070031238fi
31239
31240
31241fi
31242if test -z "$ac_cv_path_PKGCONFIG"; then
31243 ac_pt_PKGCONFIG=$PKGCONFIG
31244 # Extract the first word of "pkg-config", so it can be a program name with args.
31245set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080031246{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31247printf %s "checking for $ac_word... " >&6; }
31248if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
31249then :
31250 printf %s "(cached) " >&6
31251else $as_nop
Haibo Huang24c77a12020-04-29 13:49:57 -070031252 case $ac_pt_PKGCONFIG in
31253 [\\/]* | ?:[\\/]*)
31254 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
31255 ;;
31256 *)
31257 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31258as_dummy="$PATH:/usr/bin:/usr/local/bin"
31259for as_dir in $as_dummy
31260do
31261 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080031262 case $as_dir in #(((
31263 '') as_dir=./ ;;
31264 */) ;;
31265 *) as_dir=$as_dir/ ;;
31266 esac
Haibo Huang24c77a12020-04-29 13:49:57 -070031267 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080031268 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
31269 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
31270 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Haibo Huang24c77a12020-04-29 13:49:57 -070031271 break 2
31272 fi
31273done
31274 done
31275IFS=$as_save_IFS
31276
31277 ;;
31278esac
31279fi
31280ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
31281if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080031282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
31283printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Haibo Huang24c77a12020-04-29 13:49:57 -070031284else
Elliott Hughesf344baa2021-12-07 09:12:34 -080031285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
31286printf "%s\n" "no" >&6; }
Haibo Huang24c77a12020-04-29 13:49:57 -070031287fi
31288
31289 if test "x$ac_pt_PKGCONFIG" = x; then
31290 PKGCONFIG="no"
31291 else
31292 case $cross_compiling:$ac_tool_warned in
31293yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080031294{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31295printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Haibo Huang24c77a12020-04-29 13:49:57 -070031296ac_tool_warned=yes ;;
31297esac
31298 PKGCONFIG=$ac_pt_PKGCONFIG
31299 fi
31300else
31301 PKGCONFIG="$ac_cv_path_PKGCONFIG"
31302fi
31303
31304 fi
31305
31306 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080031307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libngtcp2_crypto_gnutls options with pkg-config" >&5
31308printf %s "checking for libngtcp2_crypto_gnutls options with pkg-config... " >&6; }
Haibo Huang24c77a12020-04-29 13:49:57 -070031309 itexists=`
31310 if test -n "$want_tcp2_path"; then
31311 PKG_CONFIG_LIBDIR="$want_tcp2_path"
31312 export PKG_CONFIG_LIBDIR
31313 fi
31314 $PKGCONFIG --exists libngtcp2_crypto_gnutls >/dev/null 2>&1 && echo 1`
31315
31316 if test -z "$itexists"; then
31317 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080031318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
31319printf "%s\n" "no" >&6; }
Haibo Huang24c77a12020-04-29 13:49:57 -070031320 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080031321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
31322printf "%s\n" "found" >&6; }
Haibo Huang24c77a12020-04-29 13:49:57 -070031323 fi
31324 fi
31325
31326
31327 if test "$PKGCONFIG" != "no" ; then
31328 LIB_NGTCP2_CRYPTO_GNUTLS=`
31329 if test -n "$want_tcp2_path"; then
31330 PKG_CONFIG_LIBDIR="$want_tcp2_path"
31331 export PKG_CONFIG_LIBDIR
31332 fi
31333
31334 $PKGCONFIG --libs-only-l libngtcp2_crypto_gnutls`
Elliott Hughesf344baa2021-12-07 09:12:34 -080031335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -l is $LIB_NGTCP2_CRYPTO_GNUTLS" >&5
31336printf "%s\n" "$as_me: -l is $LIB_NGTCP2_CRYPTO_GNUTLS" >&6;}
Haibo Huang24c77a12020-04-29 13:49:57 -070031337
31338 CPP_NGTCP2_CRYPTO_GNUTLS=`
31339 if test -n "$want_tcp2_path"; then
31340 PKG_CONFIG_LIBDIR="$want_tcp2_path"
31341 export PKG_CONFIG_LIBDIR
31342 fi
31343 $PKGCONFIG --cflags-only-I libngtcp2_crypto_gnutls`
Elliott Hughesf344baa2021-12-07 09:12:34 -080031344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -I is $CPP_NGTCP2_CRYPTO_GNUTLS" >&5
31345printf "%s\n" "$as_me: -I is $CPP_NGTCP2_CRYPTO_GNUTLS" >&6;}
Haibo Huang24c77a12020-04-29 13:49:57 -070031346
31347 LD_NGTCP2_CRYPTO_GNUTLS=`
31348 if test -n "$want_tcp2_path"; then
31349 PKG_CONFIG_LIBDIR="$want_tcp2_path"
31350 export PKG_CONFIG_LIBDIR
31351 fi
31352
31353 $PKGCONFIG --libs-only-L libngtcp2_crypto_gnutls`
Elliott Hughesf344baa2021-12-07 09:12:34 -080031354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -L is $LD_NGTCP2_CRYPTO_GNUTLS" >&5
31355printf "%s\n" "$as_me: -L is $LD_NGTCP2_CRYPTO_GNUTLS" >&6;}
Haibo Huang24c77a12020-04-29 13:49:57 -070031356
31357 LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_GNUTLS"
31358 CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_GNUTLS"
31359 LIBS="$LIB_NGTCP2_CRYPTO_GNUTLS $LIBS"
31360
31361 if test "x$cross_compiling" != "xyes"; then
Haibo Huangca2a8022020-07-10 20:17:42 -070031362 DIR_NGTCP2_CRYPTO_GNUTLS=`echo $LD_NGTCP2_CRYPTO_GNUTLS | $SED -e 's/^-L//'`
Haibo Huang24c77a12020-04-29 13:49:57 -070031363 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080031364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_ctx_initial in -lngtcp2_crypto_gnutls" >&5
31365printf %s "checking for ngtcp2_crypto_ctx_initial in -lngtcp2_crypto_gnutls... " >&6; }
31366if test ${ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial+y}
31367then :
31368 printf %s "(cached) " >&6
31369else $as_nop
Haibo Huang24c77a12020-04-29 13:49:57 -070031370 ac_check_lib_save_LIBS=$LIBS
31371LIBS="-lngtcp2_crypto_gnutls $LIBS"
31372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31373/* end confdefs.h. */
31374
31375
31376#ifdef __cplusplus
31377extern "C"
31378#endif
31379char ngtcp2_crypto_ctx_initial ();
31380int main (void)
31381{
31382return ngtcp2_crypto_ctx_initial ();
31383 ;
31384 return 0;
31385}
31386_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080031387if ac_fn_c_try_link "$LINENO"
31388then :
Haibo Huang24c77a12020-04-29 13:49:57 -070031389 ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080031390else $as_nop
Haibo Huang24c77a12020-04-29 13:49:57 -070031391 ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial=no
31392fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080031393rm -f core conftest.err conftest.$ac_objext conftest.beam \
Haibo Huang24c77a12020-04-29 13:49:57 -070031394 conftest$ac_exeext conftest.$ac_ext
31395LIBS=$ac_check_lib_save_LIBS
31396fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080031397{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial" >&5
31398printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial" >&6; }
31399if test "x$ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial" = xyes
31400then :
Haibo Huang24c77a12020-04-29 13:49:57 -070031401
Elliott Hughesf344baa2021-12-07 09:12:34 -080031402 for ac_header in ngtcp2/ngtcp2_crypto.h
Haibo Huang24c77a12020-04-29 13:49:57 -070031403do :
Elliott Hughesf344baa2021-12-07 09:12:34 -080031404 ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2_crypto.h" "ac_cv_header_ngtcp2_ngtcp2_crypto_h" "$ac_includes_default"
31405if test "x$ac_cv_header_ngtcp2_ngtcp2_crypto_h" = xyes
31406then :
31407 printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_CRYPTO_H 1" >>confdefs.h
Haibo Huang24c77a12020-04-29 13:49:57 -070031408 NGTCP2_ENABLED=1
31409
Elliott Hughesf344baa2021-12-07 09:12:34 -080031410printf "%s\n" "#define USE_NGTCP2_CRYPTO_GNUTLS 1" >>confdefs.h
Haibo Huang24c77a12020-04-29 13:49:57 -070031411
31412 USE_NGTCP2_CRYPTO_GNUTLS=1
31413
31414 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_GNUTLS"
31415 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080031416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_NGTCP2_CRYPTO_GNUTLS to CURL_LIBRARY_PATH" >&5
31417printf "%s\n" "$as_me: Added $DIR_NGTCP2_CRYPTO_GNUTLS to CURL_LIBRARY_PATH" >&6;}
Haibo Huang24c77a12020-04-29 13:49:57 -070031418
31419fi
31420
31421done
31422
Elliott Hughesf344baa2021-12-07 09:12:34 -080031423else $as_nop
Haibo Huang24c77a12020-04-29 13:49:57 -070031424 LDFLAGS=$CLEANLDFLAGS
31425 CPPFLAGS=$CLEANCPPFLAGS
31426 LIBS=$CLEANLIBS
31427
31428fi
31429
31430
31431 else
31432 if test X"$want_tcp2" != Xdefault; then
31433 as_fn_error $? "--with-ngtcp2 was specified but could not find ngtcp2_crypto_gnutls pkg-config file." "$LINENO" 5
31434 fi
31435 fi
31436fi
31437
Haibo Huang445085a2019-09-11 13:33:50 -070031438
31439OPT_NGHTTP3="yes"
31440
31441if test "x$NGTCP2_ENABLED" = "x"; then
31442 # without ngtcp2, nghttp3 is of no use for us
31443 OPT_NGHTTP3="no"
31444fi
31445
31446
31447# Check whether --with-nghttp3 was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080031448if test ${with_nghttp3+y}
31449then :
Haibo Huang445085a2019-09-11 13:33:50 -070031450 withval=$with_nghttp3; OPT_NGHTTP3=$withval
31451fi
31452
31453case "$OPT_NGHTTP3" in
31454 no)
31455 want_nghttp3="no"
31456 ;;
31457 yes)
31458 want_nghttp3="default"
31459 want_nghttp3_path=""
31460 ;;
31461 *)
31462 want_nghttp3="yes"
31463 want_nghttp3_path="$withval/lib/pkgconfig"
31464 ;;
31465esac
31466
Haibo Huangb5a52b92020-10-28 22:18:23 -070031467curl_http3_msg="no (--with-nghttp3)"
Haibo Huang445085a2019-09-11 13:33:50 -070031468if test X"$want_nghttp3" != Xno; then
31469 CLEANLDFLAGS="$LDFLAGS"
31470 CLEANCPPFLAGS="$CPPFLAGS"
31471 CLEANLIBS="$LIBS"
31472
31473
31474 if test -n "$PKG_CONFIG"; then
31475 PKGCONFIG="$PKG_CONFIG"
31476 else
31477 if test -n "$ac_tool_prefix"; then
31478 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
31479set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080031480{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31481printf %s "checking for $ac_word... " >&6; }
31482if test ${ac_cv_path_PKGCONFIG+y}
31483then :
31484 printf %s "(cached) " >&6
31485else $as_nop
Haibo Huang445085a2019-09-11 13:33:50 -070031486 case $PKGCONFIG in
31487 [\\/]* | ?:[\\/]*)
31488 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
31489 ;;
31490 *)
31491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31492as_dummy="$PATH:/usr/bin:/usr/local/bin"
31493for as_dir in $as_dummy
31494do
31495 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080031496 case $as_dir in #(((
31497 '') as_dir=./ ;;
31498 */) ;;
31499 *) as_dir=$as_dir/ ;;
31500 esac
Haibo Huang445085a2019-09-11 13:33:50 -070031501 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080031502 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
31503 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
31504 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Haibo Huang445085a2019-09-11 13:33:50 -070031505 break 2
31506 fi
31507done
31508 done
31509IFS=$as_save_IFS
31510
31511 ;;
31512esac
31513fi
31514PKGCONFIG=$ac_cv_path_PKGCONFIG
31515if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080031516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
31517printf "%s\n" "$PKGCONFIG" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031518else
Elliott Hughesf344baa2021-12-07 09:12:34 -080031519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
31520printf "%s\n" "no" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031521fi
31522
31523
31524fi
31525if test -z "$ac_cv_path_PKGCONFIG"; then
31526 ac_pt_PKGCONFIG=$PKGCONFIG
31527 # Extract the first word of "pkg-config", so it can be a program name with args.
31528set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080031529{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31530printf %s "checking for $ac_word... " >&6; }
31531if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
31532then :
31533 printf %s "(cached) " >&6
31534else $as_nop
Haibo Huang445085a2019-09-11 13:33:50 -070031535 case $ac_pt_PKGCONFIG in
31536 [\\/]* | ?:[\\/]*)
31537 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
31538 ;;
31539 *)
31540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31541as_dummy="$PATH:/usr/bin:/usr/local/bin"
31542for as_dir in $as_dummy
31543do
31544 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080031545 case $as_dir in #(((
31546 '') as_dir=./ ;;
31547 */) ;;
31548 *) as_dir=$as_dir/ ;;
31549 esac
Haibo Huang445085a2019-09-11 13:33:50 -070031550 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080031551 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
31552 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
31553 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Haibo Huang445085a2019-09-11 13:33:50 -070031554 break 2
31555 fi
31556done
31557 done
31558IFS=$as_save_IFS
31559
31560 ;;
31561esac
31562fi
31563ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
31564if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080031565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
31566printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031567else
Elliott Hughesf344baa2021-12-07 09:12:34 -080031568 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
31569printf "%s\n" "no" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031570fi
31571
31572 if test "x$ac_pt_PKGCONFIG" = x; then
31573 PKGCONFIG="no"
31574 else
31575 case $cross_compiling:$ac_tool_warned in
31576yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080031577{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31578printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Haibo Huang445085a2019-09-11 13:33:50 -070031579ac_tool_warned=yes ;;
31580esac
31581 PKGCONFIG=$ac_pt_PKGCONFIG
31582 fi
31583else
31584 PKGCONFIG="$ac_cv_path_PKGCONFIG"
31585fi
31586
31587 fi
31588
31589 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080031590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnghttp3 options with pkg-config" >&5
31591printf %s "checking for libnghttp3 options with pkg-config... " >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031592 itexists=`
31593 if test -n "$want_nghttp3_path"; then
31594 PKG_CONFIG_LIBDIR="$want_nghttp3_path"
31595 export PKG_CONFIG_LIBDIR
31596 fi
31597 $PKGCONFIG --exists libnghttp3 >/dev/null 2>&1 && echo 1`
31598
31599 if test -z "$itexists"; then
31600 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080031601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
31602printf "%s\n" "no" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031603 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080031604 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
31605printf "%s\n" "found" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031606 fi
31607 fi
31608
31609
31610 if test "$PKGCONFIG" != "no" ; then
31611 LIB_NGHTTP3=`
31612 if test -n "$want_nghttp3_path"; then
31613 PKG_CONFIG_LIBDIR="$want_nghttp3_path"
31614 export PKG_CONFIG_LIBDIR
31615 fi
31616
31617 $PKGCONFIG --libs-only-l libnghttp3`
Elliott Hughesf344baa2021-12-07 09:12:34 -080031618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -l is $LIB_NGHTTP3" >&5
31619printf "%s\n" "$as_me: -l is $LIB_NGHTTP3" >&6;}
Haibo Huang445085a2019-09-11 13:33:50 -070031620
31621 CPP_NGHTTP3=`
31622 if test -n "$want_nghttp3_path"; then
31623 PKG_CONFIG_LIBDIR="$want_nghttp3_path"
31624 export PKG_CONFIG_LIBDIR
31625 fi
31626 $PKGCONFIG --cflags-only-I libnghttp3`
Elliott Hughesf344baa2021-12-07 09:12:34 -080031627 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -I is $CPP_NGHTTP3" >&5
31628printf "%s\n" "$as_me: -I is $CPP_NGHTTP3" >&6;}
Haibo Huang445085a2019-09-11 13:33:50 -070031629
31630 LD_NGHTTP3=`
31631 if test -n "$want_nghttp3_path"; then
31632 PKG_CONFIG_LIBDIR="$want_nghttp3_path"
31633 export PKG_CONFIG_LIBDIR
31634 fi
31635
31636 $PKGCONFIG --libs-only-L libnghttp3`
Elliott Hughesf344baa2021-12-07 09:12:34 -080031637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -L is $LD_NGHTTP3" >&5
31638printf "%s\n" "$as_me: -L is $LD_NGHTTP3" >&6;}
Haibo Huang445085a2019-09-11 13:33:50 -070031639
31640 LDFLAGS="$LDFLAGS $LD_NGHTTP3"
31641 CPPFLAGS="$CPPFLAGS $CPP_NGHTTP3"
31642 LIBS="$LIB_NGHTTP3 $LIBS"
31643
31644 if test "x$cross_compiling" != "xyes"; then
Haibo Huangca2a8022020-07-10 20:17:42 -070031645 DIR_NGHTTP3=`echo $LD_NGHTTP3 | $SED -e 's/^-L//'`
Haibo Huang445085a2019-09-11 13:33:50 -070031646 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080031647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nghttp3_conn_client_new_versioned in -lnghttp3" >&5
31648printf %s "checking for nghttp3_conn_client_new_versioned in -lnghttp3... " >&6; }
31649if test ${ac_cv_lib_nghttp3_nghttp3_conn_client_new_versioned+y}
31650then :
31651 printf %s "(cached) " >&6
31652else $as_nop
Haibo Huang445085a2019-09-11 13:33:50 -070031653 ac_check_lib_save_LIBS=$LIBS
31654LIBS="-lnghttp3 $LIBS"
31655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31656/* end confdefs.h. */
31657
31658
31659#ifdef __cplusplus
31660extern "C"
31661#endif
Elliott Hughesf344baa2021-12-07 09:12:34 -080031662char nghttp3_conn_client_new_versioned ();
Haibo Huang445085a2019-09-11 13:33:50 -070031663int main (void)
31664{
Elliott Hughesf344baa2021-12-07 09:12:34 -080031665return nghttp3_conn_client_new_versioned ();
Haibo Huang445085a2019-09-11 13:33:50 -070031666 ;
31667 return 0;
31668}
31669_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080031670if ac_fn_c_try_link "$LINENO"
31671then :
31672 ac_cv_lib_nghttp3_nghttp3_conn_client_new_versioned=yes
31673else $as_nop
31674 ac_cv_lib_nghttp3_nghttp3_conn_client_new_versioned=no
Haibo Huang445085a2019-09-11 13:33:50 -070031675fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080031676rm -f core conftest.err conftest.$ac_objext conftest.beam \
Haibo Huang445085a2019-09-11 13:33:50 -070031677 conftest$ac_exeext conftest.$ac_ext
31678LIBS=$ac_check_lib_save_LIBS
31679fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080031680{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nghttp3_nghttp3_conn_client_new_versioned" >&5
31681printf "%s\n" "$ac_cv_lib_nghttp3_nghttp3_conn_client_new_versioned" >&6; }
31682if test "x$ac_cv_lib_nghttp3_nghttp3_conn_client_new_versioned" = xyes
31683then :
Haibo Huang445085a2019-09-11 13:33:50 -070031684
Elliott Hughesf344baa2021-12-07 09:12:34 -080031685 for ac_header in nghttp3/nghttp3.h
Haibo Huang445085a2019-09-11 13:33:50 -070031686do :
Elliott Hughesf344baa2021-12-07 09:12:34 -080031687 ac_fn_c_check_header_compile "$LINENO" "nghttp3/nghttp3.h" "ac_cv_header_nghttp3_nghttp3_h" "$ac_includes_default"
31688if test "x$ac_cv_header_nghttp3_nghttp3_h" = xyes
31689then :
31690 printf "%s\n" "#define HAVE_NGHTTP3_NGHTTP3_H 1" >>confdefs.h
Haibo Huang445085a2019-09-11 13:33:50 -070031691 curl_h3_msg="enabled (ngtcp2 + nghttp3)"
31692 NGHTTP3_ENABLED=1
31693
Elliott Hughesf344baa2021-12-07 09:12:34 -080031694printf "%s\n" "#define USE_NGHTTP3 1" >>confdefs.h
Haibo Huang445085a2019-09-11 13:33:50 -070031695
31696 USE_NGHTTP3=1
31697
31698 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGHTTP3"
31699 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080031700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_NGHTTP3 to CURL_LIBRARY_PATH" >&5
31701printf "%s\n" "$as_me: Added $DIR_NGHTTP3 to CURL_LIBRARY_PATH" >&6;}
Haibo Huang445085a2019-09-11 13:33:50 -070031702 experimental="$experimental HTTP3"
31703
31704fi
31705
31706done
31707
Elliott Hughesf344baa2021-12-07 09:12:34 -080031708else $as_nop
Haibo Huang445085a2019-09-11 13:33:50 -070031709 LDFLAGS=$CLEANLDFLAGS
31710 CPPFLAGS=$CLEANCPPFLAGS
31711 LIBS=$CLEANLIBS
31712
31713fi
31714
31715
31716 else
31717 if test X"$want_nghttp3" != Xdefault; then
31718 as_fn_error $? "--with-nghttp3 was specified but could not find nghttp3 pkg-config file." "$LINENO" 5
31719 fi
31720 fi
31721
31722fi
31723
31724
Elliott Hughes34dd5f42021-08-10 13:01:18 -070031725OPT_QUICHE="no"
Haibo Huang445085a2019-09-11 13:33:50 -070031726
31727if test "x$disable_http" = "xyes" -o "x$USE_NGTCP" = "x1"; then
31728 # without HTTP or with ngtcp2, quiche is no use
31729 OPT_QUICHE="no"
31730fi
31731
31732
31733# Check whether --with-quiche was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080031734if test ${with_quiche+y}
31735then :
Haibo Huang445085a2019-09-11 13:33:50 -070031736 withval=$with_quiche; OPT_QUICHE=$withval
31737fi
31738
31739case "$OPT_QUICHE" in
31740 no)
31741 want_quiche="no"
31742 ;;
31743 yes)
31744 want_quiche="default"
31745 want_quiche_path=""
31746 ;;
31747 *)
31748 want_quiche="yes"
31749 want_quiche_path="$withval"
31750 ;;
31751esac
31752
31753if test X"$want_quiche" != Xno; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080031754
31755 if test "$NGHTTP3_ENABLED" = 1; then
31756 as_fn_error $? "--with-quiche and --with-ngtcp2 are mutually exclusive" "$LINENO" 5
31757 fi
31758
Haibo Huang445085a2019-09-11 13:33:50 -070031759 CLEANLDFLAGS="$LDFLAGS"
31760 CLEANCPPFLAGS="$CPPFLAGS"
31761 CLEANLIBS="$LIBS"
31762
31763
31764 if test -n "$PKG_CONFIG"; then
31765 PKGCONFIG="$PKG_CONFIG"
31766 else
31767 if test -n "$ac_tool_prefix"; then
31768 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
31769set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080031770{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31771printf %s "checking for $ac_word... " >&6; }
31772if test ${ac_cv_path_PKGCONFIG+y}
31773then :
31774 printf %s "(cached) " >&6
31775else $as_nop
Haibo Huang445085a2019-09-11 13:33:50 -070031776 case $PKGCONFIG in
31777 [\\/]* | ?:[\\/]*)
31778 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
31779 ;;
31780 *)
31781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31782as_dummy="$PATH:/usr/bin:/usr/local/bin"
31783for as_dir in $as_dummy
31784do
31785 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080031786 case $as_dir in #(((
31787 '') as_dir=./ ;;
31788 */) ;;
31789 *) as_dir=$as_dir/ ;;
31790 esac
Haibo Huang445085a2019-09-11 13:33:50 -070031791 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080031792 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
31793 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
31794 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Haibo Huang445085a2019-09-11 13:33:50 -070031795 break 2
31796 fi
31797done
31798 done
31799IFS=$as_save_IFS
31800
31801 ;;
31802esac
31803fi
31804PKGCONFIG=$ac_cv_path_PKGCONFIG
31805if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080031806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
31807printf "%s\n" "$PKGCONFIG" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031808else
Elliott Hughesf344baa2021-12-07 09:12:34 -080031809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
31810printf "%s\n" "no" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031811fi
31812
31813
31814fi
31815if test -z "$ac_cv_path_PKGCONFIG"; then
31816 ac_pt_PKGCONFIG=$PKGCONFIG
31817 # Extract the first word of "pkg-config", so it can be a program name with args.
31818set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080031819{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31820printf %s "checking for $ac_word... " >&6; }
31821if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
31822then :
31823 printf %s "(cached) " >&6
31824else $as_nop
Haibo Huang445085a2019-09-11 13:33:50 -070031825 case $ac_pt_PKGCONFIG in
31826 [\\/]* | ?:[\\/]*)
31827 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
31828 ;;
31829 *)
31830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31831as_dummy="$PATH:/usr/bin:/usr/local/bin"
31832for as_dir in $as_dummy
31833do
31834 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080031835 case $as_dir in #(((
31836 '') as_dir=./ ;;
31837 */) ;;
31838 *) as_dir=$as_dir/ ;;
31839 esac
Haibo Huang445085a2019-09-11 13:33:50 -070031840 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080031841 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
31842 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
31843 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Haibo Huang445085a2019-09-11 13:33:50 -070031844 break 2
31845 fi
31846done
31847 done
31848IFS=$as_save_IFS
31849
31850 ;;
31851esac
31852fi
31853ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
31854if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080031855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
31856printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031857else
Elliott Hughesf344baa2021-12-07 09:12:34 -080031858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
31859printf "%s\n" "no" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031860fi
31861
31862 if test "x$ac_pt_PKGCONFIG" = x; then
31863 PKGCONFIG="no"
31864 else
31865 case $cross_compiling:$ac_tool_warned in
31866yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080031867{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31868printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Haibo Huang445085a2019-09-11 13:33:50 -070031869ac_tool_warned=yes ;;
31870esac
31871 PKGCONFIG=$ac_pt_PKGCONFIG
31872 fi
31873else
31874 PKGCONFIG="$ac_cv_path_PKGCONFIG"
31875fi
31876
31877 fi
31878
31879 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080031880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for quiche options with pkg-config" >&5
31881printf %s "checking for quiche options with pkg-config... " >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031882 itexists=`
31883 if test -n "$want_quiche_path"; then
31884 PKG_CONFIG_LIBDIR="$want_quiche_path"
31885 export PKG_CONFIG_LIBDIR
31886 fi
31887 $PKGCONFIG --exists quiche >/dev/null 2>&1 && echo 1`
31888
31889 if test -z "$itexists"; then
31890 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080031891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
31892printf "%s\n" "no" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031893 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080031894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
31895printf "%s\n" "found" >&6; }
Haibo Huang445085a2019-09-11 13:33:50 -070031896 fi
31897 fi
31898
31899
31900 if test "$PKGCONFIG" != "no" ; then
31901 LIB_QUICHE=`
31902 if test -n "$want_quiche_path"; then
31903 PKG_CONFIG_LIBDIR="$want_quiche_path"
31904 export PKG_CONFIG_LIBDIR
31905 fi
31906
31907 $PKGCONFIG --libs-only-l quiche`
Elliott Hughesf344baa2021-12-07 09:12:34 -080031908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -l is $LIB_QUICHE" >&5
31909printf "%s\n" "$as_me: -l is $LIB_QUICHE" >&6;}
Haibo Huang445085a2019-09-11 13:33:50 -070031910
31911 CPP_QUICHE=`
31912 if test -n "$want_quiche_path"; then
31913 PKG_CONFIG_LIBDIR="$want_quiche_path"
31914 export PKG_CONFIG_LIBDIR
31915 fi
31916 $PKGCONFIG --cflags-only-I quiche`
Elliott Hughesf344baa2021-12-07 09:12:34 -080031917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -I is $CPP_QUICHE" >&5
31918printf "%s\n" "$as_me: -I is $CPP_QUICHE" >&6;}
Haibo Huang445085a2019-09-11 13:33:50 -070031919
31920 LD_QUICHE=`
31921 if test -n "$want_quiche_path"; then
31922 PKG_CONFIG_LIBDIR="$want_quiche_path"
31923 export PKG_CONFIG_LIBDIR
31924 fi
31925
31926 $PKGCONFIG --libs-only-L quiche`
Elliott Hughesf344baa2021-12-07 09:12:34 -080031927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -L is $LD_QUICHE" >&5
31928printf "%s\n" "$as_me: -L is $LD_QUICHE" >&6;}
Haibo Huang445085a2019-09-11 13:33:50 -070031929
31930 LDFLAGS="$LDFLAGS $LD_QUICHE"
31931 CPPFLAGS="$CPPFLAGS $CPP_QUICHE"
31932 LIBS="$LIB_QUICHE $LIBS"
31933
31934 if test "x$cross_compiling" != "xyes"; then
Haibo Huangca2a8022020-07-10 20:17:42 -070031935 DIR_QUICHE=`echo $LD_QUICHE | $SED -e 's/^-L//'`
Haibo Huang445085a2019-09-11 13:33:50 -070031936 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080031937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for quiche_connect in -lquiche" >&5
31938printf %s "checking for quiche_connect in -lquiche... " >&6; }
31939if test ${ac_cv_lib_quiche_quiche_connect+y}
31940then :
31941 printf %s "(cached) " >&6
31942else $as_nop
Haibo Huang445085a2019-09-11 13:33:50 -070031943 ac_check_lib_save_LIBS=$LIBS
31944LIBS="-lquiche $LIBS"
31945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31946/* end confdefs.h. */
31947
31948
31949#ifdef __cplusplus
31950extern "C"
31951#endif
31952char quiche_connect ();
31953int main (void)
31954{
31955return quiche_connect ();
31956 ;
31957 return 0;
31958}
31959_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080031960if ac_fn_c_try_link "$LINENO"
31961then :
Haibo Huang445085a2019-09-11 13:33:50 -070031962 ac_cv_lib_quiche_quiche_connect=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080031963else $as_nop
Haibo Huang445085a2019-09-11 13:33:50 -070031964 ac_cv_lib_quiche_quiche_connect=no
31965fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080031966rm -f core conftest.err conftest.$ac_objext conftest.beam \
Haibo Huang445085a2019-09-11 13:33:50 -070031967 conftest$ac_exeext conftest.$ac_ext
31968LIBS=$ac_check_lib_save_LIBS
31969fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080031970{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_quiche_quiche_connect" >&5
31971printf "%s\n" "$ac_cv_lib_quiche_quiche_connect" >&6; }
31972if test "x$ac_cv_lib_quiche_quiche_connect" = xyes
31973then :
Haibo Huang445085a2019-09-11 13:33:50 -070031974
Elliott Hughesf344baa2021-12-07 09:12:34 -080031975 for ac_header in quiche.h
Haibo Huang445085a2019-09-11 13:33:50 -070031976do :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070031977 ac_fn_c_check_header_compile "$LINENO" "quiche.h" "ac_cv_header_quiche_h" "
31978$ac_includes_default
31979#include <sys/socket.h>
31980
31981
31982"
Elliott Hughesf344baa2021-12-07 09:12:34 -080031983if test "x$ac_cv_header_quiche_h" = xyes
31984then :
31985 printf "%s\n" "#define HAVE_QUICHE_H 1" >>confdefs.h
Haibo Huang445085a2019-09-11 13:33:50 -070031986 experimental="$experimental HTTP3"
Elliott Hughesf344baa2021-12-07 09:12:34 -080031987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: HTTP3 support is experimental" >&5
31988printf "%s\n" "$as_me: HTTP3 support is experimental" >&6;}
Haibo Huang445085a2019-09-11 13:33:50 -070031989 curl_h3_msg="enabled (quiche)"
31990 QUICHE_ENABLED=1
31991
Elliott Hughesf344baa2021-12-07 09:12:34 -080031992printf "%s\n" "#define USE_QUICHE 1" >>confdefs.h
Haibo Huang445085a2019-09-11 13:33:50 -070031993
31994 USE_QUICHE=1
31995
Elliott Hughesf344baa2021-12-07 09:12:34 -080031996 ac_fn_c_check_func "$LINENO" "quiche_conn_set_qlog_fd" "ac_cv_func_quiche_conn_set_qlog_fd"
31997if test "x$ac_cv_func_quiche_conn_set_qlog_fd" = xyes
31998then :
31999 printf "%s\n" "#define HAVE_QUICHE_CONN_SET_QLOG_FD 1" >>confdefs.h
Haibo Huangca2a8022020-07-10 20:17:42 -070032000
32001fi
Haibo Huangca2a8022020-07-10 20:17:42 -070032002
Haibo Huang445085a2019-09-11 13:33:50 -070032003 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_QUICHE"
32004 export CURL_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080032005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Added $DIR_QUICHE to CURL_LIBRARY_PATH" >&5
32006printf "%s\n" "$as_me: Added $DIR_QUICHE to CURL_LIBRARY_PATH" >&6;}
Haibo Huang445085a2019-09-11 13:33:50 -070032007fi
32008
32009done
32010
Elliott Hughesf344baa2021-12-07 09:12:34 -080032011else $as_nop
Elliott Hughes34dd5f42021-08-10 13:01:18 -070032012 as_fn_error $? "couldn't use quiche" "$LINENO" 5
Haibo Huang445085a2019-09-11 13:33:50 -070032013
32014fi
32015
32016 else
32017 if test X"$want_quiche" != Xdefault; then
32018 as_fn_error $? "--with-quiche was specified but could not find quiche pkg-config file." "$LINENO" 5
32019 fi
32020 fi
32021fi
32022
32023
Elliott Hughes82be86d2017-09-20 17:00:17 -070032024OPT_ZSH_FPATH=default
32025
32026# Check whether --with-zsh-functions-dir was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080032027if test ${with_zsh_functions_dir+y}
32028then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070032029 withval=$with_zsh_functions_dir; OPT_ZSH_FPATH=$withval
32030fi
32031
32032case "$OPT_ZSH_FPATH" in
32033 no)
32034 ;;
32035 default|yes)
32036 ZSH_FUNCTIONS_DIR="$datarootdir/zsh/site-functions"
32037
32038 ;;
32039 *)
32040 ZSH_FUNCTIONS_DIR="$withval"
32041
32042 ;;
32043esac
32044
32045
Haibo Huang65021c72019-03-27 15:37:23 -070032046OPT_FISH_FPATH=default
32047
32048# Check whether --with-fish-functions-dir was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080032049if test ${with_fish_functions_dir+y}
32050then :
Haibo Huang65021c72019-03-27 15:37:23 -070032051 withval=$with_fish_functions_dir; OPT_FISH_FPATH=$withval
32052fi
32053
32054case "$OPT_FISH_FPATH" in
32055 no)
32056 ;;
32057 default|yes)
Haibo Huang34ab3462019-05-22 00:50:27 -070032058
32059 if test -n "$PKG_CONFIG"; then
32060 PKGCONFIG="$PKG_CONFIG"
32061 else
32062 if test -n "$ac_tool_prefix"; then
32063 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
32064set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080032065{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32066printf %s "checking for $ac_word... " >&6; }
32067if test ${ac_cv_path_PKGCONFIG+y}
32068then :
32069 printf %s "(cached) " >&6
32070else $as_nop
Haibo Huang34ab3462019-05-22 00:50:27 -070032071 case $PKGCONFIG in
32072 [\\/]* | ?:[\\/]*)
32073 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
32074 ;;
32075 *)
32076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32077as_dummy="$PATH:/usr/bin:/usr/local/bin"
32078for as_dir in $as_dummy
32079do
32080 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080032081 case $as_dir in #(((
32082 '') as_dir=./ ;;
32083 */) ;;
32084 *) as_dir=$as_dir/ ;;
32085 esac
Haibo Huang34ab3462019-05-22 00:50:27 -070032086 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080032087 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
32088 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
32089 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Haibo Huang34ab3462019-05-22 00:50:27 -070032090 break 2
32091 fi
32092done
32093 done
32094IFS=$as_save_IFS
32095
32096 ;;
32097esac
32098fi
32099PKGCONFIG=$ac_cv_path_PKGCONFIG
32100if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080032101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
32102printf "%s\n" "$PKGCONFIG" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070032103else
Elliott Hughesf344baa2021-12-07 09:12:34 -080032104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
32105printf "%s\n" "no" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070032106fi
32107
32108
32109fi
32110if test -z "$ac_cv_path_PKGCONFIG"; then
32111 ac_pt_PKGCONFIG=$PKGCONFIG
32112 # Extract the first word of "pkg-config", so it can be a program name with args.
32113set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080032114{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32115printf %s "checking for $ac_word... " >&6; }
32116if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
32117then :
32118 printf %s "(cached) " >&6
32119else $as_nop
Haibo Huang34ab3462019-05-22 00:50:27 -070032120 case $ac_pt_PKGCONFIG in
32121 [\\/]* | ?:[\\/]*)
32122 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
32123 ;;
32124 *)
32125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32126as_dummy="$PATH:/usr/bin:/usr/local/bin"
32127for as_dir in $as_dummy
32128do
32129 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080032130 case $as_dir in #(((
32131 '') as_dir=./ ;;
32132 */) ;;
32133 *) as_dir=$as_dir/ ;;
32134 esac
Haibo Huang34ab3462019-05-22 00:50:27 -070032135 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080032136 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
32137 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
32138 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Haibo Huang34ab3462019-05-22 00:50:27 -070032139 break 2
32140 fi
32141done
32142 done
32143IFS=$as_save_IFS
32144
32145 ;;
32146esac
32147fi
32148ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
32149if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080032150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
32151printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070032152else
Elliott Hughesf344baa2021-12-07 09:12:34 -080032153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
32154printf "%s\n" "no" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070032155fi
32156
32157 if test "x$ac_pt_PKGCONFIG" = x; then
32158 PKGCONFIG="no"
32159 else
32160 case $cross_compiling:$ac_tool_warned in
32161yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080032162{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32163printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Haibo Huang34ab3462019-05-22 00:50:27 -070032164ac_tool_warned=yes ;;
32165esac
32166 PKGCONFIG=$ac_pt_PKGCONFIG
32167 fi
32168else
32169 PKGCONFIG="$ac_cv_path_PKGCONFIG"
32170fi
32171
32172 fi
32173
32174 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080032175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fish options with pkg-config" >&5
32176printf %s "checking for fish options with pkg-config... " >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070032177 itexists=`
32178 if test -n ""; then
32179 PKG_CONFIG_LIBDIR=""
32180 export PKG_CONFIG_LIBDIR
32181 fi
32182 $PKGCONFIG --exists fish >/dev/null 2>&1 && echo 1`
32183
32184 if test -z "$itexists"; then
32185 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080032186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
32187printf "%s\n" "no" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070032188 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080032189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
32190printf "%s\n" "found" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070032191 fi
32192 fi
32193
32194 if test "$PKGCONFIG" != "no" ; then
32195 FISH_FUNCTIONS_DIR="$($PKGCONFIG --variable completionsdir fish)"
32196 else
32197 FISH_FUNCTIONS_DIR="$datarootdir/fish/vendor_completions.d"
32198 fi
Haibo Huang65021c72019-03-27 15:37:23 -070032199
32200 ;;
32201 *)
32202 FISH_FUNCTIONS_DIR="$withval"
32203
32204 ;;
32205esac
32206
32207
Elliott Hughesf344baa2021-12-07 09:12:34 -080032208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for malloc.h" >&5
32209printf %s "checking for malloc.h... " >&6; }
32210if test ${curl_cv_header_malloc_h+y}
32211then :
32212 printf %s "(cached) " >&6
32213else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070032214
32215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32216/* end confdefs.h. */
32217
32218
32219#include <malloc.h>
32220
32221int main (void)
32222{
32223
32224 void *p = malloc(10);
32225 void *q = calloc(10,10);
32226 free(p);
32227 free(q);
32228
32229 ;
32230 return 0;
32231}
32232
32233_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080032234if ac_fn_c_try_compile "$LINENO"
32235then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070032236
32237 curl_cv_header_malloc_h="yes"
32238
Elliott Hughesf344baa2021-12-07 09:12:34 -080032239else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070032240
32241 curl_cv_header_malloc_h="no"
32242
32243fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080032244rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070032245
32246fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080032247{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_malloc_h" >&5
32248printf "%s\n" "$curl_cv_header_malloc_h" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070032249 if test "$curl_cv_header_malloc_h" = "yes"; then
32250
Elliott Hughesf344baa2021-12-07 09:12:34 -080032251printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070032252
32253 #
32254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32255/* end confdefs.h. */
32256
32257
32258#include <stdlib.h>
32259
32260int main (void)
32261{
32262
32263 void *p = malloc(10);
32264 void *q = calloc(10,10);
32265 free(p);
32266 free(q);
32267
32268 ;
32269 return 0;
32270}
32271
32272_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080032273if ac_fn_c_try_compile "$LINENO"
32274then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070032275
32276 curl_cv_need_header_malloc_h="no"
32277
Elliott Hughesf344baa2021-12-07 09:12:34 -080032278else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070032279
32280 curl_cv_need_header_malloc_h="yes"
32281
32282fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080032283rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070032284 #
32285 case "$curl_cv_need_header_malloc_h" in
32286 yes)
32287
Elliott Hughesf344baa2021-12-07 09:12:34 -080032288printf "%s\n" "#define NEED_MALLOC_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070032289
32290 ;;
32291 esac
32292 fi
32293
32294
Elliott Hughesf344baa2021-12-07 09:12:34 -080032295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for memory.h" >&5
32296printf %s "checking for memory.h... " >&6; }
32297if test ${curl_cv_header_memory_h+y}
32298then :
32299 printf %s "(cached) " >&6
32300else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070032301
32302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32303/* end confdefs.h. */
32304
32305
32306#include <memory.h>
32307
32308int main (void)
32309{
32310
32311 void *p = malloc(10);
32312 void *q = calloc(10,10);
32313 free(p);
32314 free(q);
32315
32316 ;
32317 return 0;
32318}
32319
32320_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080032321if ac_fn_c_try_compile "$LINENO"
32322then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070032323
32324 curl_cv_header_memory_h="yes"
32325
Elliott Hughesf344baa2021-12-07 09:12:34 -080032326else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070032327
32328 curl_cv_header_memory_h="no"
32329
32330fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080032331rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070032332
32333fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080032334{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_memory_h" >&5
32335printf "%s\n" "$curl_cv_header_memory_h" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070032336 if test "$curl_cv_header_memory_h" = "yes"; then
32337
Elliott Hughesf344baa2021-12-07 09:12:34 -080032338printf "%s\n" "#define HAVE_MEMORY_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070032339
32340 #
32341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32342/* end confdefs.h. */
32343
32344
32345#include <stdlib.h>
32346
32347int main (void)
32348{
32349
32350 void *p = malloc(10);
32351 void *q = calloc(10,10);
32352 free(p);
32353 free(q);
32354
32355 ;
32356 return 0;
32357}
32358
32359_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080032360if ac_fn_c_try_compile "$LINENO"
32361then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070032362
32363 curl_cv_need_header_memory_h="no"
32364
Elliott Hughesf344baa2021-12-07 09:12:34 -080032365else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070032366
32367 curl_cv_need_header_memory_h="yes"
32368
32369fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080032370rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070032371 #
32372 case "$curl_cv_need_header_memory_h" in
32373 yes)
32374
Elliott Hughesf344baa2021-12-07 09:12:34 -080032375printf "%s\n" "#define NEED_MEMORY_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070032376
32377 ;;
32378 esac
32379 fi
32380
32381
Elliott Hughesf344baa2021-12-07 09:12:34 -080032382ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "
Elliott Hughes82be86d2017-09-20 17:00:17 -070032383#ifdef HAVE_SYS_TYPES_H
32384#include <sys/types.h>
32385#endif
32386#ifdef HAVE_SYS_TIME_H
32387#include <sys/time.h>
32388#endif
32389#ifdef HAVE_SYS_SELECT_H
32390#include <sys/select.h>
Haibo Huang24c77a12020-04-29 13:49:57 -070032391#elif defined(HAVE_UNISTD_H)
32392#include <unistd.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070032393#endif
32394#ifdef HAVE_SYS_SOCKET_H
32395#include <sys/socket.h>
32396#endif
32397#ifdef HAVE_NETINET_IN_H
32398#include <netinet/in.h>
32399#endif
Elliott Hughes0128fe42018-02-27 14:57:55 -080032400#ifdef HAVE_NETINET_IN6_H
32401#include <netinet/in6.h>
32402#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070032403#ifdef HAVE_SYS_UN_H
32404#include <sys/un.h>
32405#endif
32406
32407
32408"
Elliott Hughesf344baa2021-12-07 09:12:34 -080032409if test "x$ac_cv_header_sys_types_h" = xyes
32410then :
32411 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
32412
32413fi
32414ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "
32415#ifdef HAVE_SYS_TYPES_H
32416#include <sys/types.h>
32417#endif
32418#ifdef HAVE_SYS_TIME_H
32419#include <sys/time.h>
32420#endif
32421#ifdef HAVE_SYS_SELECT_H
32422#include <sys/select.h>
32423#elif defined(HAVE_UNISTD_H)
32424#include <unistd.h>
32425#endif
32426#ifdef HAVE_SYS_SOCKET_H
32427#include <sys/socket.h>
32428#endif
32429#ifdef HAVE_NETINET_IN_H
32430#include <netinet/in.h>
32431#endif
32432#ifdef HAVE_NETINET_IN6_H
32433#include <netinet/in6.h>
32434#endif
32435#ifdef HAVE_SYS_UN_H
32436#include <sys/un.h>
32437#endif
32438
32439
32440"
32441if test "x$ac_cv_header_sys_time_h" = xyes
32442then :
32443 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
32444
32445fi
32446ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "
32447#ifdef HAVE_SYS_TYPES_H
32448#include <sys/types.h>
32449#endif
32450#ifdef HAVE_SYS_TIME_H
32451#include <sys/time.h>
32452#endif
32453#ifdef HAVE_SYS_SELECT_H
32454#include <sys/select.h>
32455#elif defined(HAVE_UNISTD_H)
32456#include <unistd.h>
32457#endif
32458#ifdef HAVE_SYS_SOCKET_H
32459#include <sys/socket.h>
32460#endif
32461#ifdef HAVE_NETINET_IN_H
32462#include <netinet/in.h>
32463#endif
32464#ifdef HAVE_NETINET_IN6_H
32465#include <netinet/in6.h>
32466#endif
32467#ifdef HAVE_SYS_UN_H
32468#include <sys/un.h>
32469#endif
32470
32471
32472"
32473if test "x$ac_cv_header_sys_select_h" = xyes
32474then :
32475 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
32476
32477fi
32478ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "
32479#ifdef HAVE_SYS_TYPES_H
32480#include <sys/types.h>
32481#endif
32482#ifdef HAVE_SYS_TIME_H
32483#include <sys/time.h>
32484#endif
32485#ifdef HAVE_SYS_SELECT_H
32486#include <sys/select.h>
32487#elif defined(HAVE_UNISTD_H)
32488#include <unistd.h>
32489#endif
32490#ifdef HAVE_SYS_SOCKET_H
32491#include <sys/socket.h>
32492#endif
32493#ifdef HAVE_NETINET_IN_H
32494#include <netinet/in.h>
32495#endif
32496#ifdef HAVE_NETINET_IN6_H
32497#include <netinet/in6.h>
32498#endif
32499#ifdef HAVE_SYS_UN_H
32500#include <sys/un.h>
32501#endif
32502
32503
32504"
32505if test "x$ac_cv_header_sys_socket_h" = xyes
32506then :
32507 printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
32508
32509fi
32510ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "
32511#ifdef HAVE_SYS_TYPES_H
32512#include <sys/types.h>
32513#endif
32514#ifdef HAVE_SYS_TIME_H
32515#include <sys/time.h>
32516#endif
32517#ifdef HAVE_SYS_SELECT_H
32518#include <sys/select.h>
32519#elif defined(HAVE_UNISTD_H)
32520#include <unistd.h>
32521#endif
32522#ifdef HAVE_SYS_SOCKET_H
32523#include <sys/socket.h>
32524#endif
32525#ifdef HAVE_NETINET_IN_H
32526#include <netinet/in.h>
32527#endif
32528#ifdef HAVE_NETINET_IN6_H
32529#include <netinet/in6.h>
32530#endif
32531#ifdef HAVE_SYS_UN_H
32532#include <sys/un.h>
32533#endif
32534
32535
32536"
32537if test "x$ac_cv_header_sys_ioctl_h" = xyes
32538then :
32539 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
32540
32541fi
32542ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "
32543#ifdef HAVE_SYS_TYPES_H
32544#include <sys/types.h>
32545#endif
32546#ifdef HAVE_SYS_TIME_H
32547#include <sys/time.h>
32548#endif
32549#ifdef HAVE_SYS_SELECT_H
32550#include <sys/select.h>
32551#elif defined(HAVE_UNISTD_H)
32552#include <unistd.h>
32553#endif
32554#ifdef HAVE_SYS_SOCKET_H
32555#include <sys/socket.h>
32556#endif
32557#ifdef HAVE_NETINET_IN_H
32558#include <netinet/in.h>
32559#endif
32560#ifdef HAVE_NETINET_IN6_H
32561#include <netinet/in6.h>
32562#endif
32563#ifdef HAVE_SYS_UN_H
32564#include <sys/un.h>
32565#endif
32566
32567
32568"
32569if test "x$ac_cv_header_sys_uio_h" = xyes
32570then :
32571 printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
32572
32573fi
32574ac_fn_c_check_header_compile "$LINENO" "assert.h" "ac_cv_header_assert_h" "
32575#ifdef HAVE_SYS_TYPES_H
32576#include <sys/types.h>
32577#endif
32578#ifdef HAVE_SYS_TIME_H
32579#include <sys/time.h>
32580#endif
32581#ifdef HAVE_SYS_SELECT_H
32582#include <sys/select.h>
32583#elif defined(HAVE_UNISTD_H)
32584#include <unistd.h>
32585#endif
32586#ifdef HAVE_SYS_SOCKET_H
32587#include <sys/socket.h>
32588#endif
32589#ifdef HAVE_NETINET_IN_H
32590#include <netinet/in.h>
32591#endif
32592#ifdef HAVE_NETINET_IN6_H
32593#include <netinet/in6.h>
32594#endif
32595#ifdef HAVE_SYS_UN_H
32596#include <sys/un.h>
32597#endif
32598
32599
32600"
32601if test "x$ac_cv_header_assert_h" = xyes
32602then :
32603 printf "%s\n" "#define HAVE_ASSERT_H 1" >>confdefs.h
32604
32605fi
32606ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "
32607#ifdef HAVE_SYS_TYPES_H
32608#include <sys/types.h>
32609#endif
32610#ifdef HAVE_SYS_TIME_H
32611#include <sys/time.h>
32612#endif
32613#ifdef HAVE_SYS_SELECT_H
32614#include <sys/select.h>
32615#elif defined(HAVE_UNISTD_H)
32616#include <unistd.h>
32617#endif
32618#ifdef HAVE_SYS_SOCKET_H
32619#include <sys/socket.h>
32620#endif
32621#ifdef HAVE_NETINET_IN_H
32622#include <netinet/in.h>
32623#endif
32624#ifdef HAVE_NETINET_IN6_H
32625#include <netinet/in6.h>
32626#endif
32627#ifdef HAVE_SYS_UN_H
32628#include <sys/un.h>
32629#endif
32630
32631
32632"
32633if test "x$ac_cv_header_unistd_h" = xyes
32634then :
32635 printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
32636
32637fi
32638ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "
32639#ifdef HAVE_SYS_TYPES_H
32640#include <sys/types.h>
32641#endif
32642#ifdef HAVE_SYS_TIME_H
32643#include <sys/time.h>
32644#endif
32645#ifdef HAVE_SYS_SELECT_H
32646#include <sys/select.h>
32647#elif defined(HAVE_UNISTD_H)
32648#include <unistd.h>
32649#endif
32650#ifdef HAVE_SYS_SOCKET_H
32651#include <sys/socket.h>
32652#endif
32653#ifdef HAVE_NETINET_IN_H
32654#include <netinet/in.h>
32655#endif
32656#ifdef HAVE_NETINET_IN6_H
32657#include <netinet/in6.h>
32658#endif
32659#ifdef HAVE_SYS_UN_H
32660#include <sys/un.h>
32661#endif
32662
32663
32664"
32665if test "x$ac_cv_header_stdlib_h" = xyes
32666then :
32667 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
32668
32669fi
32670ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "
32671#ifdef HAVE_SYS_TYPES_H
32672#include <sys/types.h>
32673#endif
32674#ifdef HAVE_SYS_TIME_H
32675#include <sys/time.h>
32676#endif
32677#ifdef HAVE_SYS_SELECT_H
32678#include <sys/select.h>
32679#elif defined(HAVE_UNISTD_H)
32680#include <unistd.h>
32681#endif
32682#ifdef HAVE_SYS_SOCKET_H
32683#include <sys/socket.h>
32684#endif
32685#ifdef HAVE_NETINET_IN_H
32686#include <netinet/in.h>
32687#endif
32688#ifdef HAVE_NETINET_IN6_H
32689#include <netinet/in6.h>
32690#endif
32691#ifdef HAVE_SYS_UN_H
32692#include <sys/un.h>
32693#endif
32694
32695
32696"
32697if test "x$ac_cv_header_arpa_inet_h" = xyes
32698then :
32699 printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h
32700
32701fi
32702ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
32703#ifdef HAVE_SYS_TYPES_H
32704#include <sys/types.h>
32705#endif
32706#ifdef HAVE_SYS_TIME_H
32707#include <sys/time.h>
32708#endif
32709#ifdef HAVE_SYS_SELECT_H
32710#include <sys/select.h>
32711#elif defined(HAVE_UNISTD_H)
32712#include <unistd.h>
32713#endif
32714#ifdef HAVE_SYS_SOCKET_H
32715#include <sys/socket.h>
32716#endif
32717#ifdef HAVE_NETINET_IN_H
32718#include <netinet/in.h>
32719#endif
32720#ifdef HAVE_NETINET_IN6_H
32721#include <netinet/in6.h>
32722#endif
32723#ifdef HAVE_SYS_UN_H
32724#include <sys/un.h>
32725#endif
32726
32727
32728"
32729if test "x$ac_cv_header_net_if_h" = xyes
32730then :
32731 printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
32732
32733fi
32734ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "
32735#ifdef HAVE_SYS_TYPES_H
32736#include <sys/types.h>
32737#endif
32738#ifdef HAVE_SYS_TIME_H
32739#include <sys/time.h>
32740#endif
32741#ifdef HAVE_SYS_SELECT_H
32742#include <sys/select.h>
32743#elif defined(HAVE_UNISTD_H)
32744#include <unistd.h>
32745#endif
32746#ifdef HAVE_SYS_SOCKET_H
32747#include <sys/socket.h>
32748#endif
32749#ifdef HAVE_NETINET_IN_H
32750#include <netinet/in.h>
32751#endif
32752#ifdef HAVE_NETINET_IN6_H
32753#include <netinet/in6.h>
32754#endif
32755#ifdef HAVE_SYS_UN_H
32756#include <sys/un.h>
32757#endif
32758
32759
32760"
32761if test "x$ac_cv_header_netinet_in_h" = xyes
32762then :
32763 printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
32764
32765fi
32766ac_fn_c_check_header_compile "$LINENO" "netinet/in6.h" "ac_cv_header_netinet_in6_h" "
32767#ifdef HAVE_SYS_TYPES_H
32768#include <sys/types.h>
32769#endif
32770#ifdef HAVE_SYS_TIME_H
32771#include <sys/time.h>
32772#endif
32773#ifdef HAVE_SYS_SELECT_H
32774#include <sys/select.h>
32775#elif defined(HAVE_UNISTD_H)
32776#include <unistd.h>
32777#endif
32778#ifdef HAVE_SYS_SOCKET_H
32779#include <sys/socket.h>
32780#endif
32781#ifdef HAVE_NETINET_IN_H
32782#include <netinet/in.h>
32783#endif
32784#ifdef HAVE_NETINET_IN6_H
32785#include <netinet/in6.h>
32786#endif
32787#ifdef HAVE_SYS_UN_H
32788#include <sys/un.h>
32789#endif
32790
32791
32792"
32793if test "x$ac_cv_header_netinet_in6_h" = xyes
32794then :
32795 printf "%s\n" "#define HAVE_NETINET_IN6_H 1" >>confdefs.h
32796
32797fi
32798ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "
32799#ifdef HAVE_SYS_TYPES_H
32800#include <sys/types.h>
32801#endif
32802#ifdef HAVE_SYS_TIME_H
32803#include <sys/time.h>
32804#endif
32805#ifdef HAVE_SYS_SELECT_H
32806#include <sys/select.h>
32807#elif defined(HAVE_UNISTD_H)
32808#include <unistd.h>
32809#endif
32810#ifdef HAVE_SYS_SOCKET_H
32811#include <sys/socket.h>
32812#endif
32813#ifdef HAVE_NETINET_IN_H
32814#include <netinet/in.h>
32815#endif
32816#ifdef HAVE_NETINET_IN6_H
32817#include <netinet/in6.h>
32818#endif
32819#ifdef HAVE_SYS_UN_H
32820#include <sys/un.h>
32821#endif
32822
32823
32824"
32825if test "x$ac_cv_header_sys_un_h" = xyes
32826then :
32827 printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
32828
32829fi
32830ac_fn_c_check_header_compile "$LINENO" "linux/tcp.h" "ac_cv_header_linux_tcp_h" "
32831#ifdef HAVE_SYS_TYPES_H
32832#include <sys/types.h>
32833#endif
32834#ifdef HAVE_SYS_TIME_H
32835#include <sys/time.h>
32836#endif
32837#ifdef HAVE_SYS_SELECT_H
32838#include <sys/select.h>
32839#elif defined(HAVE_UNISTD_H)
32840#include <unistd.h>
32841#endif
32842#ifdef HAVE_SYS_SOCKET_H
32843#include <sys/socket.h>
32844#endif
32845#ifdef HAVE_NETINET_IN_H
32846#include <netinet/in.h>
32847#endif
32848#ifdef HAVE_NETINET_IN6_H
32849#include <netinet/in6.h>
32850#endif
32851#ifdef HAVE_SYS_UN_H
32852#include <sys/un.h>
32853#endif
32854
32855
32856"
32857if test "x$ac_cv_header_linux_tcp_h" = xyes
32858then :
32859 printf "%s\n" "#define HAVE_LINUX_TCP_H 1" >>confdefs.h
32860
32861fi
32862ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "
32863#ifdef HAVE_SYS_TYPES_H
32864#include <sys/types.h>
32865#endif
32866#ifdef HAVE_SYS_TIME_H
32867#include <sys/time.h>
32868#endif
32869#ifdef HAVE_SYS_SELECT_H
32870#include <sys/select.h>
32871#elif defined(HAVE_UNISTD_H)
32872#include <unistd.h>
32873#endif
32874#ifdef HAVE_SYS_SOCKET_H
32875#include <sys/socket.h>
32876#endif
32877#ifdef HAVE_NETINET_IN_H
32878#include <netinet/in.h>
32879#endif
32880#ifdef HAVE_NETINET_IN6_H
32881#include <netinet/in6.h>
32882#endif
32883#ifdef HAVE_SYS_UN_H
32884#include <sys/un.h>
32885#endif
32886
32887
32888"
32889if test "x$ac_cv_header_netinet_tcp_h" = xyes
32890then :
32891 printf "%s\n" "#define HAVE_NETINET_TCP_H 1" >>confdefs.h
32892
32893fi
32894ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "
32895#ifdef HAVE_SYS_TYPES_H
32896#include <sys/types.h>
32897#endif
32898#ifdef HAVE_SYS_TIME_H
32899#include <sys/time.h>
32900#endif
32901#ifdef HAVE_SYS_SELECT_H
32902#include <sys/select.h>
32903#elif defined(HAVE_UNISTD_H)
32904#include <unistd.h>
32905#endif
32906#ifdef HAVE_SYS_SOCKET_H
32907#include <sys/socket.h>
32908#endif
32909#ifdef HAVE_NETINET_IN_H
32910#include <netinet/in.h>
32911#endif
32912#ifdef HAVE_NETINET_IN6_H
32913#include <netinet/in6.h>
32914#endif
32915#ifdef HAVE_SYS_UN_H
32916#include <sys/un.h>
32917#endif
32918
32919
32920"
32921if test "x$ac_cv_header_netdb_h" = xyes
32922then :
32923 printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
32924
32925fi
32926ac_fn_c_check_header_compile "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "
32927#ifdef HAVE_SYS_TYPES_H
32928#include <sys/types.h>
32929#endif
32930#ifdef HAVE_SYS_TIME_H
32931#include <sys/time.h>
32932#endif
32933#ifdef HAVE_SYS_SELECT_H
32934#include <sys/select.h>
32935#elif defined(HAVE_UNISTD_H)
32936#include <unistd.h>
32937#endif
32938#ifdef HAVE_SYS_SOCKET_H
32939#include <sys/socket.h>
32940#endif
32941#ifdef HAVE_NETINET_IN_H
32942#include <netinet/in.h>
32943#endif
32944#ifdef HAVE_NETINET_IN6_H
32945#include <netinet/in6.h>
32946#endif
32947#ifdef HAVE_SYS_UN_H
32948#include <sys/un.h>
32949#endif
32950
32951
32952"
32953if test "x$ac_cv_header_sys_sockio_h" = xyes
32954then :
32955 printf "%s\n" "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h
32956
32957fi
32958ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "
32959#ifdef HAVE_SYS_TYPES_H
32960#include <sys/types.h>
32961#endif
32962#ifdef HAVE_SYS_TIME_H
32963#include <sys/time.h>
32964#endif
32965#ifdef HAVE_SYS_SELECT_H
32966#include <sys/select.h>
32967#elif defined(HAVE_UNISTD_H)
32968#include <unistd.h>
32969#endif
32970#ifdef HAVE_SYS_SOCKET_H
32971#include <sys/socket.h>
32972#endif
32973#ifdef HAVE_NETINET_IN_H
32974#include <netinet/in.h>
32975#endif
32976#ifdef HAVE_NETINET_IN6_H
32977#include <netinet/in6.h>
32978#endif
32979#ifdef HAVE_SYS_UN_H
32980#include <sys/un.h>
32981#endif
32982
32983
32984"
32985if test "x$ac_cv_header_sys_stat_h" = xyes
32986then :
32987 printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h
32988
32989fi
32990ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "
32991#ifdef HAVE_SYS_TYPES_H
32992#include <sys/types.h>
32993#endif
32994#ifdef HAVE_SYS_TIME_H
32995#include <sys/time.h>
32996#endif
32997#ifdef HAVE_SYS_SELECT_H
32998#include <sys/select.h>
32999#elif defined(HAVE_UNISTD_H)
33000#include <unistd.h>
33001#endif
33002#ifdef HAVE_SYS_SOCKET_H
33003#include <sys/socket.h>
33004#endif
33005#ifdef HAVE_NETINET_IN_H
33006#include <netinet/in.h>
33007#endif
33008#ifdef HAVE_NETINET_IN6_H
33009#include <netinet/in6.h>
33010#endif
33011#ifdef HAVE_SYS_UN_H
33012#include <sys/un.h>
33013#endif
33014
33015
33016"
33017if test "x$ac_cv_header_sys_param_h" = xyes
33018then :
33019 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
33020
33021fi
33022ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "
33023#ifdef HAVE_SYS_TYPES_H
33024#include <sys/types.h>
33025#endif
33026#ifdef HAVE_SYS_TIME_H
33027#include <sys/time.h>
33028#endif
33029#ifdef HAVE_SYS_SELECT_H
33030#include <sys/select.h>
33031#elif defined(HAVE_UNISTD_H)
33032#include <unistd.h>
33033#endif
33034#ifdef HAVE_SYS_SOCKET_H
33035#include <sys/socket.h>
33036#endif
33037#ifdef HAVE_NETINET_IN_H
33038#include <netinet/in.h>
33039#endif
33040#ifdef HAVE_NETINET_IN6_H
33041#include <netinet/in6.h>
33042#endif
33043#ifdef HAVE_SYS_UN_H
33044#include <sys/un.h>
33045#endif
33046
33047
33048"
33049if test "x$ac_cv_header_termios_h" = xyes
33050then :
33051 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
33052
33053fi
33054ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "
33055#ifdef HAVE_SYS_TYPES_H
33056#include <sys/types.h>
33057#endif
33058#ifdef HAVE_SYS_TIME_H
33059#include <sys/time.h>
33060#endif
33061#ifdef HAVE_SYS_SELECT_H
33062#include <sys/select.h>
33063#elif defined(HAVE_UNISTD_H)
33064#include <unistd.h>
33065#endif
33066#ifdef HAVE_SYS_SOCKET_H
33067#include <sys/socket.h>
33068#endif
33069#ifdef HAVE_NETINET_IN_H
33070#include <netinet/in.h>
33071#endif
33072#ifdef HAVE_NETINET_IN6_H
33073#include <netinet/in6.h>
33074#endif
33075#ifdef HAVE_SYS_UN_H
33076#include <sys/un.h>
33077#endif
33078
33079
33080"
33081if test "x$ac_cv_header_termio_h" = xyes
33082then :
33083 printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
33084
33085fi
33086ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "
33087#ifdef HAVE_SYS_TYPES_H
33088#include <sys/types.h>
33089#endif
33090#ifdef HAVE_SYS_TIME_H
33091#include <sys/time.h>
33092#endif
33093#ifdef HAVE_SYS_SELECT_H
33094#include <sys/select.h>
33095#elif defined(HAVE_UNISTD_H)
33096#include <unistd.h>
33097#endif
33098#ifdef HAVE_SYS_SOCKET_H
33099#include <sys/socket.h>
33100#endif
33101#ifdef HAVE_NETINET_IN_H
33102#include <netinet/in.h>
33103#endif
33104#ifdef HAVE_NETINET_IN6_H
33105#include <netinet/in6.h>
33106#endif
33107#ifdef HAVE_SYS_UN_H
33108#include <sys/un.h>
33109#endif
33110
33111
33112"
33113if test "x$ac_cv_header_fcntl_h" = xyes
33114then :
33115 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
33116
33117fi
33118ac_fn_c_check_header_compile "$LINENO" "alloca.h" "ac_cv_header_alloca_h" "
33119#ifdef HAVE_SYS_TYPES_H
33120#include <sys/types.h>
33121#endif
33122#ifdef HAVE_SYS_TIME_H
33123#include <sys/time.h>
33124#endif
33125#ifdef HAVE_SYS_SELECT_H
33126#include <sys/select.h>
33127#elif defined(HAVE_UNISTD_H)
33128#include <unistd.h>
33129#endif
33130#ifdef HAVE_SYS_SOCKET_H
33131#include <sys/socket.h>
33132#endif
33133#ifdef HAVE_NETINET_IN_H
33134#include <netinet/in.h>
33135#endif
33136#ifdef HAVE_NETINET_IN6_H
33137#include <netinet/in6.h>
33138#endif
33139#ifdef HAVE_SYS_UN_H
33140#include <sys/un.h>
33141#endif
33142
33143
33144"
33145if test "x$ac_cv_header_alloca_h" = xyes
33146then :
33147 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
33148
33149fi
33150ac_fn_c_check_header_compile "$LINENO" "io.h" "ac_cv_header_io_h" "
33151#ifdef HAVE_SYS_TYPES_H
33152#include <sys/types.h>
33153#endif
33154#ifdef HAVE_SYS_TIME_H
33155#include <sys/time.h>
33156#endif
33157#ifdef HAVE_SYS_SELECT_H
33158#include <sys/select.h>
33159#elif defined(HAVE_UNISTD_H)
33160#include <unistd.h>
33161#endif
33162#ifdef HAVE_SYS_SOCKET_H
33163#include <sys/socket.h>
33164#endif
33165#ifdef HAVE_NETINET_IN_H
33166#include <netinet/in.h>
33167#endif
33168#ifdef HAVE_NETINET_IN6_H
33169#include <netinet/in6.h>
33170#endif
33171#ifdef HAVE_SYS_UN_H
33172#include <sys/un.h>
33173#endif
33174
33175
33176"
33177if test "x$ac_cv_header_io_h" = xyes
33178then :
33179 printf "%s\n" "#define HAVE_IO_H 1" >>confdefs.h
33180
33181fi
33182ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "
33183#ifdef HAVE_SYS_TYPES_H
33184#include <sys/types.h>
33185#endif
33186#ifdef HAVE_SYS_TIME_H
33187#include <sys/time.h>
33188#endif
33189#ifdef HAVE_SYS_SELECT_H
33190#include <sys/select.h>
33191#elif defined(HAVE_UNISTD_H)
33192#include <unistd.h>
33193#endif
33194#ifdef HAVE_SYS_SOCKET_H
33195#include <sys/socket.h>
33196#endif
33197#ifdef HAVE_NETINET_IN_H
33198#include <netinet/in.h>
33199#endif
33200#ifdef HAVE_NETINET_IN6_H
33201#include <netinet/in6.h>
33202#endif
33203#ifdef HAVE_SYS_UN_H
33204#include <sys/un.h>
33205#endif
33206
33207
33208"
33209if test "x$ac_cv_header_pwd_h" = xyes
33210then :
33211 printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
33212
33213fi
33214ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "
33215#ifdef HAVE_SYS_TYPES_H
33216#include <sys/types.h>
33217#endif
33218#ifdef HAVE_SYS_TIME_H
33219#include <sys/time.h>
33220#endif
33221#ifdef HAVE_SYS_SELECT_H
33222#include <sys/select.h>
33223#elif defined(HAVE_UNISTD_H)
33224#include <unistd.h>
33225#endif
33226#ifdef HAVE_SYS_SOCKET_H
33227#include <sys/socket.h>
33228#endif
33229#ifdef HAVE_NETINET_IN_H
33230#include <netinet/in.h>
33231#endif
33232#ifdef HAVE_NETINET_IN6_H
33233#include <netinet/in6.h>
33234#endif
33235#ifdef HAVE_SYS_UN_H
33236#include <sys/un.h>
33237#endif
33238
33239
33240"
33241if test "x$ac_cv_header_utime_h" = xyes
33242then :
33243 printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
33244
33245fi
33246ac_fn_c_check_header_compile "$LINENO" "sys/utime.h" "ac_cv_header_sys_utime_h" "
33247#ifdef HAVE_SYS_TYPES_H
33248#include <sys/types.h>
33249#endif
33250#ifdef HAVE_SYS_TIME_H
33251#include <sys/time.h>
33252#endif
33253#ifdef HAVE_SYS_SELECT_H
33254#include <sys/select.h>
33255#elif defined(HAVE_UNISTD_H)
33256#include <unistd.h>
33257#endif
33258#ifdef HAVE_SYS_SOCKET_H
33259#include <sys/socket.h>
33260#endif
33261#ifdef HAVE_NETINET_IN_H
33262#include <netinet/in.h>
33263#endif
33264#ifdef HAVE_NETINET_IN6_H
33265#include <netinet/in6.h>
33266#endif
33267#ifdef HAVE_SYS_UN_H
33268#include <sys/un.h>
33269#endif
33270
33271
33272"
33273if test "x$ac_cv_header_sys_utime_h" = xyes
33274then :
33275 printf "%s\n" "#define HAVE_SYS_UTIME_H 1" >>confdefs.h
33276
33277fi
33278ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "
33279#ifdef HAVE_SYS_TYPES_H
33280#include <sys/types.h>
33281#endif
33282#ifdef HAVE_SYS_TIME_H
33283#include <sys/time.h>
33284#endif
33285#ifdef HAVE_SYS_SELECT_H
33286#include <sys/select.h>
33287#elif defined(HAVE_UNISTD_H)
33288#include <unistd.h>
33289#endif
33290#ifdef HAVE_SYS_SOCKET_H
33291#include <sys/socket.h>
33292#endif
33293#ifdef HAVE_NETINET_IN_H
33294#include <netinet/in.h>
33295#endif
33296#ifdef HAVE_NETINET_IN6_H
33297#include <netinet/in6.h>
33298#endif
33299#ifdef HAVE_SYS_UN_H
33300#include <sys/un.h>
33301#endif
33302
33303
33304"
33305if test "x$ac_cv_header_sys_poll_h" = xyes
33306then :
33307 printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
33308
33309fi
33310ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "
33311#ifdef HAVE_SYS_TYPES_H
33312#include <sys/types.h>
33313#endif
33314#ifdef HAVE_SYS_TIME_H
33315#include <sys/time.h>
33316#endif
33317#ifdef HAVE_SYS_SELECT_H
33318#include <sys/select.h>
33319#elif defined(HAVE_UNISTD_H)
33320#include <unistd.h>
33321#endif
33322#ifdef HAVE_SYS_SOCKET_H
33323#include <sys/socket.h>
33324#endif
33325#ifdef HAVE_NETINET_IN_H
33326#include <netinet/in.h>
33327#endif
33328#ifdef HAVE_NETINET_IN6_H
33329#include <netinet/in6.h>
33330#endif
33331#ifdef HAVE_SYS_UN_H
33332#include <sys/un.h>
33333#endif
33334
33335
33336"
33337if test "x$ac_cv_header_poll_h" = xyes
33338then :
33339 printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
33340
33341fi
33342ac_fn_c_check_header_compile "$LINENO" "socket.h" "ac_cv_header_socket_h" "
33343#ifdef HAVE_SYS_TYPES_H
33344#include <sys/types.h>
33345#endif
33346#ifdef HAVE_SYS_TIME_H
33347#include <sys/time.h>
33348#endif
33349#ifdef HAVE_SYS_SELECT_H
33350#include <sys/select.h>
33351#elif defined(HAVE_UNISTD_H)
33352#include <unistd.h>
33353#endif
33354#ifdef HAVE_SYS_SOCKET_H
33355#include <sys/socket.h>
33356#endif
33357#ifdef HAVE_NETINET_IN_H
33358#include <netinet/in.h>
33359#endif
33360#ifdef HAVE_NETINET_IN6_H
33361#include <netinet/in6.h>
33362#endif
33363#ifdef HAVE_SYS_UN_H
33364#include <sys/un.h>
33365#endif
33366
33367
33368"
33369if test "x$ac_cv_header_socket_h" = xyes
33370then :
33371 printf "%s\n" "#define HAVE_SOCKET_H 1" >>confdefs.h
33372
33373fi
33374ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "
33375#ifdef HAVE_SYS_TYPES_H
33376#include <sys/types.h>
33377#endif
33378#ifdef HAVE_SYS_TIME_H
33379#include <sys/time.h>
33380#endif
33381#ifdef HAVE_SYS_SELECT_H
33382#include <sys/select.h>
33383#elif defined(HAVE_UNISTD_H)
33384#include <unistd.h>
33385#endif
33386#ifdef HAVE_SYS_SOCKET_H
33387#include <sys/socket.h>
33388#endif
33389#ifdef HAVE_NETINET_IN_H
33390#include <netinet/in.h>
33391#endif
33392#ifdef HAVE_NETINET_IN6_H
33393#include <netinet/in6.h>
33394#endif
33395#ifdef HAVE_SYS_UN_H
33396#include <sys/un.h>
33397#endif
33398
33399
33400"
33401if test "x$ac_cv_header_sys_resource_h" = xyes
33402then :
33403 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
33404
33405fi
33406ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "
33407#ifdef HAVE_SYS_TYPES_H
33408#include <sys/types.h>
33409#endif
33410#ifdef HAVE_SYS_TIME_H
33411#include <sys/time.h>
33412#endif
33413#ifdef HAVE_SYS_SELECT_H
33414#include <sys/select.h>
33415#elif defined(HAVE_UNISTD_H)
33416#include <unistd.h>
33417#endif
33418#ifdef HAVE_SYS_SOCKET_H
33419#include <sys/socket.h>
33420#endif
33421#ifdef HAVE_NETINET_IN_H
33422#include <netinet/in.h>
33423#endif
33424#ifdef HAVE_NETINET_IN6_H
33425#include <netinet/in6.h>
33426#endif
33427#ifdef HAVE_SYS_UN_H
33428#include <sys/un.h>
33429#endif
33430
33431
33432"
33433if test "x$ac_cv_header_libgen_h" = xyes
33434then :
33435 printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
33436
33437fi
33438ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "
33439#ifdef HAVE_SYS_TYPES_H
33440#include <sys/types.h>
33441#endif
33442#ifdef HAVE_SYS_TIME_H
33443#include <sys/time.h>
33444#endif
33445#ifdef HAVE_SYS_SELECT_H
33446#include <sys/select.h>
33447#elif defined(HAVE_UNISTD_H)
33448#include <unistd.h>
33449#endif
33450#ifdef HAVE_SYS_SOCKET_H
33451#include <sys/socket.h>
33452#endif
33453#ifdef HAVE_NETINET_IN_H
33454#include <netinet/in.h>
33455#endif
33456#ifdef HAVE_NETINET_IN6_H
33457#include <netinet/in6.h>
33458#endif
33459#ifdef HAVE_SYS_UN_H
33460#include <sys/un.h>
33461#endif
33462
33463
33464"
33465if test "x$ac_cv_header_locale_h" = xyes
33466then :
33467 printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
33468
33469fi
33470ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "
33471#ifdef HAVE_SYS_TYPES_H
33472#include <sys/types.h>
33473#endif
33474#ifdef HAVE_SYS_TIME_H
33475#include <sys/time.h>
33476#endif
33477#ifdef HAVE_SYS_SELECT_H
33478#include <sys/select.h>
33479#elif defined(HAVE_UNISTD_H)
33480#include <unistd.h>
33481#endif
33482#ifdef HAVE_SYS_SOCKET_H
33483#include <sys/socket.h>
33484#endif
33485#ifdef HAVE_NETINET_IN_H
33486#include <netinet/in.h>
33487#endif
33488#ifdef HAVE_NETINET_IN6_H
33489#include <netinet/in6.h>
33490#endif
33491#ifdef HAVE_SYS_UN_H
33492#include <sys/un.h>
33493#endif
33494
33495
33496"
33497if test "x$ac_cv_header_errno_h" = xyes
33498then :
33499 printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
33500
33501fi
33502ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "
33503#ifdef HAVE_SYS_TYPES_H
33504#include <sys/types.h>
33505#endif
33506#ifdef HAVE_SYS_TIME_H
33507#include <sys/time.h>
33508#endif
33509#ifdef HAVE_SYS_SELECT_H
33510#include <sys/select.h>
33511#elif defined(HAVE_UNISTD_H)
33512#include <unistd.h>
33513#endif
33514#ifdef HAVE_SYS_SOCKET_H
33515#include <sys/socket.h>
33516#endif
33517#ifdef HAVE_NETINET_IN_H
33518#include <netinet/in.h>
33519#endif
33520#ifdef HAVE_NETINET_IN6_H
33521#include <netinet/in6.h>
33522#endif
33523#ifdef HAVE_SYS_UN_H
33524#include <sys/un.h>
33525#endif
33526
33527
33528"
33529if test "x$ac_cv_header_stdbool_h" = xyes
33530then :
33531 printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
33532
33533fi
33534ac_fn_c_check_header_compile "$LINENO" "arpa/tftp.h" "ac_cv_header_arpa_tftp_h" "
33535#ifdef HAVE_SYS_TYPES_H
33536#include <sys/types.h>
33537#endif
33538#ifdef HAVE_SYS_TIME_H
33539#include <sys/time.h>
33540#endif
33541#ifdef HAVE_SYS_SELECT_H
33542#include <sys/select.h>
33543#elif defined(HAVE_UNISTD_H)
33544#include <unistd.h>
33545#endif
33546#ifdef HAVE_SYS_SOCKET_H
33547#include <sys/socket.h>
33548#endif
33549#ifdef HAVE_NETINET_IN_H
33550#include <netinet/in.h>
33551#endif
33552#ifdef HAVE_NETINET_IN6_H
33553#include <netinet/in6.h>
33554#endif
33555#ifdef HAVE_SYS_UN_H
33556#include <sys/un.h>
33557#endif
33558
33559
33560"
33561if test "x$ac_cv_header_arpa_tftp_h" = xyes
33562then :
33563 printf "%s\n" "#define HAVE_ARPA_TFTP_H 1" >>confdefs.h
33564
33565fi
33566ac_fn_c_check_header_compile "$LINENO" "sys/filio.h" "ac_cv_header_sys_filio_h" "
33567#ifdef HAVE_SYS_TYPES_H
33568#include <sys/types.h>
33569#endif
33570#ifdef HAVE_SYS_TIME_H
33571#include <sys/time.h>
33572#endif
33573#ifdef HAVE_SYS_SELECT_H
33574#include <sys/select.h>
33575#elif defined(HAVE_UNISTD_H)
33576#include <unistd.h>
33577#endif
33578#ifdef HAVE_SYS_SOCKET_H
33579#include <sys/socket.h>
33580#endif
33581#ifdef HAVE_NETINET_IN_H
33582#include <netinet/in.h>
33583#endif
33584#ifdef HAVE_NETINET_IN6_H
33585#include <netinet/in6.h>
33586#endif
33587#ifdef HAVE_SYS_UN_H
33588#include <sys/un.h>
33589#endif
33590
33591
33592"
33593if test "x$ac_cv_header_sys_filio_h" = xyes
33594then :
33595 printf "%s\n" "#define HAVE_SYS_FILIO_H 1" >>confdefs.h
33596
33597fi
33598ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "
33599#ifdef HAVE_SYS_TYPES_H
33600#include <sys/types.h>
33601#endif
33602#ifdef HAVE_SYS_TIME_H
33603#include <sys/time.h>
33604#endif
33605#ifdef HAVE_SYS_SELECT_H
33606#include <sys/select.h>
33607#elif defined(HAVE_UNISTD_H)
33608#include <unistd.h>
33609#endif
33610#ifdef HAVE_SYS_SOCKET_H
33611#include <sys/socket.h>
33612#endif
33613#ifdef HAVE_NETINET_IN_H
33614#include <netinet/in.h>
33615#endif
33616#ifdef HAVE_NETINET_IN6_H
33617#include <netinet/in6.h>
33618#endif
33619#ifdef HAVE_SYS_UN_H
33620#include <sys/un.h>
33621#endif
33622
33623
33624"
33625if test "x$ac_cv_header_sys_wait_h" = xyes
33626then :
33627 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
33628
33629fi
33630ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "
33631#ifdef HAVE_SYS_TYPES_H
33632#include <sys/types.h>
33633#endif
33634#ifdef HAVE_SYS_TIME_H
33635#include <sys/time.h>
33636#endif
33637#ifdef HAVE_SYS_SELECT_H
33638#include <sys/select.h>
33639#elif defined(HAVE_UNISTD_H)
33640#include <unistd.h>
33641#endif
33642#ifdef HAVE_SYS_SOCKET_H
33643#include <sys/socket.h>
33644#endif
33645#ifdef HAVE_NETINET_IN_H
33646#include <netinet/in.h>
33647#endif
33648#ifdef HAVE_NETINET_IN6_H
33649#include <netinet/in6.h>
33650#endif
33651#ifdef HAVE_SYS_UN_H
33652#include <sys/un.h>
33653#endif
33654
33655
33656"
33657if test "x$ac_cv_header_setjmp_h" = xyes
33658then :
33659 printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070033660
33661fi
33662
Elliott Hughes82be86d2017-09-20 17:00:17 -070033663
33664
Elliott Hughesf344baa2021-12-07 09:12:34 -080033665{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
33666printf %s "checking for an ANSI C-conforming const... " >&6; }
33667if test ${ac_cv_c_const+y}
33668then :
33669 printf %s "(cached) " >&6
33670else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070033671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33672/* end confdefs.h. */
33673
33674int main (void)
33675{
33676
33677#ifndef __cplusplus
33678 /* Ultrix mips cc rejects this sort of thing. */
33679 typedef int charset[2];
33680 const charset cs = { 0, 0 };
33681 /* SunOS 4.1.1 cc rejects this. */
33682 char const *const *pcpcc;
33683 char **ppc;
33684 /* NEC SVR4.0.2 mips cc rejects this. */
33685 struct point {int x, y;};
33686 static struct point const zero = {0,0};
Elliott Hughesf344baa2021-12-07 09:12:34 -080033687 /* IBM XL C 1.02.0.0 rejects this.
Elliott Hughes82be86d2017-09-20 17:00:17 -070033688 It does not let you subtract one const X* pointer from another in
33689 an arm of an if-expression whose if-part is not a constant
33690 expression */
33691 const char *g = "string";
33692 pcpcc = &g + (g ? g-g : 0);
33693 /* HPUX 7.0 cc rejects these. */
33694 ++pcpcc;
33695 ppc = (char**) pcpcc;
33696 pcpcc = (char const *const *) ppc;
33697 { /* SCO 3.2v4 cc rejects this sort of thing. */
33698 char tx;
33699 char *t = &tx;
33700 char const *s = 0 ? (char *) 0 : (char const *) 0;
33701
33702 *t++ = 0;
33703 if (s) return 0;
33704 }
33705 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
33706 int x[] = {25, 17};
33707 const int *foo = &x[0];
33708 ++foo;
33709 }
33710 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
33711 typedef const int *iptr;
33712 iptr p = 0;
33713 ++p;
33714 }
Elliott Hughesf344baa2021-12-07 09:12:34 -080033715 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
Elliott Hughes82be86d2017-09-20 17:00:17 -070033716 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
33717 struct s { int j; const int *ap[3]; } bx;
33718 struct s *b = &bx; b->j = 5;
33719 }
33720 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
33721 const int foo = 10;
33722 if (!foo) return 0;
33723 }
33724 return !cs[0] && !zero.x;
33725#endif
33726
33727 ;
33728 return 0;
33729}
33730_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080033731if ac_fn_c_try_compile "$LINENO"
33732then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070033733 ac_cv_c_const=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080033734else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070033735 ac_cv_c_const=no
33736fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080033737rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070033738fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080033739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
33740printf "%s\n" "$ac_cv_c_const" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070033741if test $ac_cv_c_const = no; then
33742
Elliott Hughesf344baa2021-12-07 09:12:34 -080033743printf "%s\n" "#define const /**/" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070033744
33745fi
33746
33747
Elliott Hughesf344baa2021-12-07 09:12:34 -080033748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler support of C99 variadic macro style" >&5
33749printf %s "checking for compiler support of C99 variadic macro style... " >&6; }
33750if test ${curl_cv_variadic_macros_c99+y}
33751then :
33752 printf %s "(cached) " >&6
33753else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070033754
33755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33756/* end confdefs.h. */
33757
33758
33759#define c99_vmacro3(first, ...) fun3(first, __VA_ARGS__)
33760#define c99_vmacro2(first, ...) fun2(first, __VA_ARGS__)
33761 int fun3(int arg1, int arg2, int arg3);
33762 int fun2(int arg1, int arg2);
33763 int fun3(int arg1, int arg2, int arg3)
33764 { return arg1 + arg2 + arg3; }
33765 int fun2(int arg1, int arg2)
33766 { return arg1 + arg2; }
33767
33768int main (void)
33769{
33770
33771 int res3 = c99_vmacro3(1, 2, 3);
33772 int res2 = c99_vmacro2(1, 2);
33773
33774 ;
33775 return 0;
33776}
33777
33778_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080033779if ac_fn_c_try_compile "$LINENO"
33780then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070033781
33782 curl_cv_variadic_macros_c99="yes"
33783
Elliott Hughesf344baa2021-12-07 09:12:34 -080033784else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070033785
33786 curl_cv_variadic_macros_c99="no"
33787
33788fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080033789rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070033790
33791fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080033792{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_variadic_macros_c99" >&5
33793printf "%s\n" "$curl_cv_variadic_macros_c99" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070033794 case "$curl_cv_variadic_macros_c99" in
33795 yes)
33796
Elliott Hughesf344baa2021-12-07 09:12:34 -080033797printf "%s\n" "#define HAVE_VARIADIC_MACROS_C99 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070033798
33799 ;;
33800 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080033801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler support of old gcc variadic macro style" >&5
33802printf %s "checking for compiler support of old gcc variadic macro style... " >&6; }
33803if test ${curl_cv_variadic_macros_gcc+y}
33804then :
33805 printf %s "(cached) " >&6
33806else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070033807
33808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33809/* end confdefs.h. */
33810
33811
33812#define gcc_vmacro3(first, args...) fun3(first, args)
33813#define gcc_vmacro2(first, args...) fun2(first, args)
33814 int fun3(int arg1, int arg2, int arg3);
33815 int fun2(int arg1, int arg2);
33816 int fun3(int arg1, int arg2, int arg3)
33817 { return arg1 + arg2 + arg3; }
33818 int fun2(int arg1, int arg2)
33819 { return arg1 + arg2; }
33820
33821int main (void)
33822{
33823
33824 int res3 = gcc_vmacro3(1, 2, 3);
33825 int res2 = gcc_vmacro2(1, 2);
33826
33827 ;
33828 return 0;
33829}
33830
33831_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080033832if ac_fn_c_try_compile "$LINENO"
33833then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070033834
33835 curl_cv_variadic_macros_gcc="yes"
33836
Elliott Hughesf344baa2021-12-07 09:12:34 -080033837else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070033838
33839 curl_cv_variadic_macros_gcc="no"
33840
33841fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080033842rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070033843
33844fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080033845{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_variadic_macros_gcc" >&5
33846printf "%s\n" "$curl_cv_variadic_macros_gcc" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070033847 case "$curl_cv_variadic_macros_gcc" in
33848 yes)
33849
Elliott Hughesf344baa2021-12-07 09:12:34 -080033850printf "%s\n" "#define HAVE_VARIADIC_MACROS_GCC 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070033851
33852 ;;
33853 esac
33854
33855ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Elliott Hughesf344baa2021-12-07 09:12:34 -080033856if test "x$ac_cv_type_size_t" = xyes
33857then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070033858
Elliott Hughesf344baa2021-12-07 09:12:34 -080033859else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070033860
Elliott Hughesf344baa2021-12-07 09:12:34 -080033861printf "%s\n" "#define size_t unsigned int" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070033862
33863fi
33864
Elliott Hughes82be86d2017-09-20 17:00:17 -070033865
33866
Elliott Hughesf344baa2021-12-07 09:12:34 -080033867 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
33868if test "x$ac_cv_header_sys_types_h" = xyes
33869then :
33870 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
33871
33872fi
33873ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
33874if test "x$ac_cv_header_sys_time_h" = xyes
33875then :
33876 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
33877
33878fi
33879ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
33880if test "x$ac_cv_header_sys_socket_h" = xyes
33881then :
33882 printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070033883
33884fi
33885
Elliott Hughesf344baa2021-12-07 09:12:34 -080033886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
33887printf %s "checking for struct timeval... " >&6; }
33888if test ${curl_cv_struct_timeval+y}
33889then :
33890 printf %s "(cached) " >&6
33891else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070033892
33893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33894/* end confdefs.h. */
33895
33896
33897#undef inline
33898#ifdef HAVE_WINDOWS_H
33899#ifndef WIN32_LEAN_AND_MEAN
33900#define WIN32_LEAN_AND_MEAN
33901#endif
33902#include <windows.h>
33903#ifdef HAVE_WINSOCK2_H
33904#include <winsock2.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070033905#endif
33906#endif
33907#ifdef HAVE_SYS_TYPES_H
33908#include <sys/types.h>
33909#endif
33910#ifdef HAVE_SYS_TIME_H
33911#include <sys/time.h>
Elliott Hughes34dd5f42021-08-10 13:01:18 -070033912#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070033913#include <time.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070033914#ifdef HAVE_SYS_SOCKET_H
33915#include <sys/socket.h>
33916#endif
33917
33918int main (void)
33919{
33920
33921 struct timeval ts;
33922 ts.tv_sec = 0;
33923 ts.tv_usec = 0;
33924
33925 ;
33926 return 0;
33927}
33928
33929_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080033930if ac_fn_c_try_compile "$LINENO"
33931then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070033932
33933 curl_cv_struct_timeval="yes"
33934
Elliott Hughesf344baa2021-12-07 09:12:34 -080033935else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070033936
33937 curl_cv_struct_timeval="no"
33938
33939fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080033940rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070033941
33942fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080033943{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_struct_timeval" >&5
33944printf "%s\n" "$curl_cv_struct_timeval" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070033945 case "$curl_cv_struct_timeval" in
33946 yes)
33947
Elliott Hughesf344baa2021-12-07 09:12:34 -080033948printf "%s\n" "#define HAVE_STRUCT_TIMEVAL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070033949
33950 ;;
33951 esac
33952
33953
33954
33955 if test "x$cross_compiling" != xyes; then
33956
Elliott Hughesf344baa2021-12-07 09:12:34 -080033957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking run-time libs availability" >&5
33958printf %s "checking run-time libs availability... " >&6; }
Elliott Hughes72d948d2018-08-03 14:37:21 -070033959
Elliott Hughes72d948d2018-08-03 14:37:21 -070033960 old=$LD_LIBRARY_PATH
33961 LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
33962 export LD_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080033963 if test "$cross_compiling" = yes
33964then :
33965 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33966printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070033967as_fn_error $? "cannot run test program while cross compiling
33968See \`config.log' for more details" "$LINENO" 5; }
Elliott Hughesf344baa2021-12-07 09:12:34 -080033969else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070033970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33971/* end confdefs.h. */
33972
Elliott Hughesb1ef70f2018-10-30 11:28:38 -070033973int main()
Elliott Hughes82be86d2017-09-20 17:00:17 -070033974{
33975 return 0;
33976}
33977
33978_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080033979if ac_fn_c_try_run "$LINENO"
33980then :
33981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: fine" >&5
33982printf "%s\n" "fine" >&6; }
33983else $as_nop
33984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
33985printf "%s\n" "failed" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070033986 as_fn_error $? "one or more libs available at link-time are not available run-time. Libs used at link-time: $LIBS" "$LINENO" 5
33987
33988fi
33989rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33990 conftest.$ac_objext conftest.beam conftest.$ac_ext
33991fi
33992
Elliott Hughes72d948d2018-08-03 14:37:21 -070033993 LD_LIBRARY_PATH=$old # restore
33994
Elliott Hughes82be86d2017-09-20 17:00:17 -070033995
33996 fi
33997
33998
Elliott Hughesf344baa2021-12-07 09:12:34 -080033999{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
34000printf %s "checking size of size_t... " >&6; }
34001if test ${ac_cv_sizeof_size_t+y}
34002then :
34003 printf %s "(cached) " >&6
34004else $as_nop
Elliott Hughes72d948d2018-08-03 14:37:21 -070034005 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
34006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34007/* end confdefs.h. */
Elliott Hughes82be86d2017-09-20 17:00:17 -070034008
Elliott Hughes72d948d2018-08-03 14:37:21 -070034009#include <sys/types.h>
34010
34011
34012int main (void)
34013{
34014switch (0) case 0: case (sizeof (size_t) == $ac_size):;
34015 ;
34016 return 0;
34017}
34018_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080034019if ac_fn_c_try_compile "$LINENO"
34020then :
Elliott Hughes72d948d2018-08-03 14:37:21 -070034021 ac_cv_sizeof_size_t=$ac_size
34022fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034023rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes72d948d2018-08-03 14:37:21 -070034024 if test x$ac_cv_sizeof_size_t != x ; then break; fi
34025done
34026
Elliott Hughes82be86d2017-09-20 17:00:17 -070034027fi
34028
Elliott Hughes72d948d2018-08-03 14:37:21 -070034029if test x$ac_cv_sizeof_size_t = x ; then
34030 as_fn_error $? "cannot determine a size for size_t" "$LINENO" 5
Elliott Hughes82be86d2017-09-20 17:00:17 -070034031fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034032{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
34033printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070034034
Elliott Hughesf344baa2021-12-07 09:12:34 -080034035printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034036
34037
Elliott Hughesf344baa2021-12-07 09:12:34 -080034038{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
34039printf %s "checking size of long... " >&6; }
34040if test ${ac_cv_sizeof_long+y}
34041then :
34042 printf %s "(cached) " >&6
34043else $as_nop
Elliott Hughes72d948d2018-08-03 14:37:21 -070034044 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
34045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34046/* end confdefs.h. */
Elliott Hughes82be86d2017-09-20 17:00:17 -070034047
Elliott Hughes72d948d2018-08-03 14:37:21 -070034048#include <sys/types.h>
34049
34050
34051int main (void)
34052{
34053switch (0) case 0: case (sizeof (long) == $ac_size):;
34054 ;
34055 return 0;
34056}
34057_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080034058if ac_fn_c_try_compile "$LINENO"
34059then :
Elliott Hughes72d948d2018-08-03 14:37:21 -070034060 ac_cv_sizeof_long=$ac_size
34061fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034062rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes72d948d2018-08-03 14:37:21 -070034063 if test x$ac_cv_sizeof_long != x ; then break; fi
34064done
34065
Elliott Hughes82be86d2017-09-20 17:00:17 -070034066fi
34067
Elliott Hughes72d948d2018-08-03 14:37:21 -070034068if test x$ac_cv_sizeof_long = x ; then
34069 as_fn_error $? "cannot determine a size for long" "$LINENO" 5
Elliott Hughes82be86d2017-09-20 17:00:17 -070034070fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034071{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
34072printf "%s\n" "$ac_cv_sizeof_long" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070034073
Elliott Hughesf344baa2021-12-07 09:12:34 -080034074printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034075
34076
Elliott Hughesf344baa2021-12-07 09:12:34 -080034077{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
34078printf %s "checking size of int... " >&6; }
34079if test ${ac_cv_sizeof_int+y}
34080then :
34081 printf %s "(cached) " >&6
34082else $as_nop
Elliott Hughes72d948d2018-08-03 14:37:21 -070034083 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
34084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34085/* end confdefs.h. */
Elliott Hughes82be86d2017-09-20 17:00:17 -070034086
Elliott Hughes72d948d2018-08-03 14:37:21 -070034087#include <sys/types.h>
34088
34089
34090int main (void)
34091{
34092switch (0) case 0: case (sizeof (int) == $ac_size):;
34093 ;
34094 return 0;
34095}
34096_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080034097if ac_fn_c_try_compile "$LINENO"
34098then :
Elliott Hughes72d948d2018-08-03 14:37:21 -070034099 ac_cv_sizeof_int=$ac_size
34100fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034101rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes72d948d2018-08-03 14:37:21 -070034102 if test x$ac_cv_sizeof_int != x ; then break; fi
34103done
34104
Elliott Hughes82be86d2017-09-20 17:00:17 -070034105fi
34106
Elliott Hughes72d948d2018-08-03 14:37:21 -070034107if test x$ac_cv_sizeof_int = x ; then
34108 as_fn_error $? "cannot determine a size for int" "$LINENO" 5
Elliott Hughes82be86d2017-09-20 17:00:17 -070034109fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034110{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
34111printf "%s\n" "$ac_cv_sizeof_int" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070034112
Elliott Hughesf344baa2021-12-07 09:12:34 -080034113printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034114
34115
Elliott Hughesf344baa2021-12-07 09:12:34 -080034116{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
34117printf %s "checking size of short... " >&6; }
34118if test ${ac_cv_sizeof_short+y}
34119then :
34120 printf %s "(cached) " >&6
34121else $as_nop
Elliott Hughes72d948d2018-08-03 14:37:21 -070034122 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
34123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34124/* end confdefs.h. */
Elliott Hughes82be86d2017-09-20 17:00:17 -070034125
Elliott Hughes72d948d2018-08-03 14:37:21 -070034126#include <sys/types.h>
34127
34128
34129int main (void)
34130{
34131switch (0) case 0: case (sizeof (short) == $ac_size):;
34132 ;
34133 return 0;
34134}
34135_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080034136if ac_fn_c_try_compile "$LINENO"
34137then :
Elliott Hughes72d948d2018-08-03 14:37:21 -070034138 ac_cv_sizeof_short=$ac_size
34139fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034140rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes72d948d2018-08-03 14:37:21 -070034141 if test x$ac_cv_sizeof_short != x ; then break; fi
34142done
34143
Elliott Hughes82be86d2017-09-20 17:00:17 -070034144fi
34145
Elliott Hughes72d948d2018-08-03 14:37:21 -070034146if test x$ac_cv_sizeof_short = x ; then
34147 as_fn_error $? "cannot determine a size for short" "$LINENO" 5
Elliott Hughes82be86d2017-09-20 17:00:17 -070034148fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034149{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
34150printf "%s\n" "$ac_cv_sizeof_short" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070034151
Elliott Hughesf344baa2021-12-07 09:12:34 -080034152printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034153
34154
Elliott Hughesf344baa2021-12-07 09:12:34 -080034155{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
34156printf %s "checking size of time_t... " >&6; }
34157if test ${ac_cv_sizeof_time_t+y}
34158then :
34159 printf %s "(cached) " >&6
34160else $as_nop
Elliott Hughes72d948d2018-08-03 14:37:21 -070034161 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
34162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34163/* end confdefs.h. */
Elliott Hughes82be86d2017-09-20 17:00:17 -070034164
Elliott Hughes72d948d2018-08-03 14:37:21 -070034165#include <sys/types.h>
34166
34167
34168int main (void)
34169{
34170switch (0) case 0: case (sizeof (time_t) == $ac_size):;
34171 ;
34172 return 0;
34173}
34174_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080034175if ac_fn_c_try_compile "$LINENO"
34176then :
Elliott Hughes72d948d2018-08-03 14:37:21 -070034177 ac_cv_sizeof_time_t=$ac_size
34178fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034179rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes72d948d2018-08-03 14:37:21 -070034180 if test x$ac_cv_sizeof_time_t != x ; then break; fi
34181done
34182
Elliott Hughes82be86d2017-09-20 17:00:17 -070034183fi
34184
Elliott Hughes72d948d2018-08-03 14:37:21 -070034185if test x$ac_cv_sizeof_time_t = x ; then
34186 as_fn_error $? "cannot determine a size for time_t" "$LINENO" 5
Elliott Hughes82be86d2017-09-20 17:00:17 -070034187fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034188{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
34189printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070034190
Elliott Hughesf344baa2021-12-07 09:12:34 -080034191printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034192
34193
Elliott Hughesf344baa2021-12-07 09:12:34 -080034194{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
34195printf %s "checking size of off_t... " >&6; }
34196if test ${ac_cv_sizeof_off_t+y}
34197then :
34198 printf %s "(cached) " >&6
34199else $as_nop
Elliott Hughes72d948d2018-08-03 14:37:21 -070034200 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
34201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34202/* end confdefs.h. */
Elliott Hughes82be86d2017-09-20 17:00:17 -070034203
Elliott Hughes72d948d2018-08-03 14:37:21 -070034204#include <sys/types.h>
34205
34206
34207int main (void)
34208{
34209switch (0) case 0: case (sizeof (off_t) == $ac_size):;
34210 ;
34211 return 0;
34212}
34213_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080034214if ac_fn_c_try_compile "$LINENO"
34215then :
Elliott Hughes72d948d2018-08-03 14:37:21 -070034216 ac_cv_sizeof_off_t=$ac_size
34217fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034218rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes72d948d2018-08-03 14:37:21 -070034219 if test x$ac_cv_sizeof_off_t != x ; then break; fi
34220done
34221
Elliott Hughes82be86d2017-09-20 17:00:17 -070034222fi
34223
Elliott Hughes72d948d2018-08-03 14:37:21 -070034224if test x$ac_cv_sizeof_off_t = x ; then
34225 as_fn_error $? "cannot determine a size for off_t" "$LINENO" 5
Elliott Hughes82be86d2017-09-20 17:00:17 -070034226fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
34228printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070034229
Elliott Hughesf344baa2021-12-07 09:12:34 -080034230printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034231
34232
34233
Alex Deymo486467e2017-12-19 19:04:07 +010034234o=$CPPFLAGS
34235CPPFLAGS="-I$srcdir/include $CPPFLAGS"
Elliott Hughesf344baa2021-12-07 09:12:34 -080034236{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of curl_off_t" >&5
34237printf %s "checking size of curl_off_t... " >&6; }
34238if test ${ac_cv_sizeof_curl_off_t+y}
34239then :
34240 printf %s "(cached) " >&6
34241else $as_nop
Elliott Hughes72d948d2018-08-03 14:37:21 -070034242 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
34243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34244/* end confdefs.h. */
34245
34246#include <sys/types.h>
34247
Alex Deymo486467e2017-12-19 19:04:07 +010034248#include <curl/system.h>
34249
Alex Deymo486467e2017-12-19 19:04:07 +010034250
Elliott Hughes72d948d2018-08-03 14:37:21 -070034251int main (void)
34252{
34253switch (0) case 0: case (sizeof (curl_off_t) == $ac_size):;
34254 ;
34255 return 0;
34256}
34257_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080034258if ac_fn_c_try_compile "$LINENO"
34259then :
Elliott Hughes72d948d2018-08-03 14:37:21 -070034260 ac_cv_sizeof_curl_off_t=$ac_size
34261fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034262rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes72d948d2018-08-03 14:37:21 -070034263 if test x$ac_cv_sizeof_curl_off_t != x ; then break; fi
34264done
34265
Elliott Hughes82be86d2017-09-20 17:00:17 -070034266fi
34267
Elliott Hughes72d948d2018-08-03 14:37:21 -070034268if test x$ac_cv_sizeof_curl_off_t = x ; then
34269 as_fn_error $? "cannot determine a size for curl_off_t" "$LINENO" 5
Alex Deymo486467e2017-12-19 19:04:07 +010034270fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034271{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_curl_off_t" >&5
34272printf "%s\n" "$ac_cv_sizeof_curl_off_t" >&6; }
Alex Deymo486467e2017-12-19 19:04:07 +010034273
Elliott Hughesf344baa2021-12-07 09:12:34 -080034274printf "%s\n" "#define SIZEOF_CURL_OFF_T $ac_cv_sizeof_curl_off_t" >>confdefs.h
Alex Deymo486467e2017-12-19 19:04:07 +010034275
34276
34277CPPFLAGS=$o
Elliott Hughes82be86d2017-09-20 17:00:17 -070034278
34279ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
Elliott Hughesf344baa2021-12-07 09:12:34 -080034280if test "x$ac_cv_type_long_long" = xyes
34281then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070034282
Elliott Hughesf344baa2021-12-07 09:12:34 -080034283printf "%s\n" "#define HAVE_LONGLONG 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034284
34285 longlong="yes"
34286
34287fi
34288
34289
34290if test "xyes" = "x$longlong"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080034291 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if numberLL works" >&5
34292printf %s "checking if numberLL works... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070034293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34294/* end confdefs.h. */
34295
34296
34297
34298int main (void)
34299{
34300
34301 long long val = 1000LL;
34302
34303 ;
34304 return 0;
34305}
34306
34307_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080034308if ac_fn_c_try_compile "$LINENO"
34309then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070034310
Elliott Hughesf344baa2021-12-07 09:12:34 -080034311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34312printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070034313
Elliott Hughesf344baa2021-12-07 09:12:34 -080034314printf "%s\n" "#define HAVE_LL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034315
34316
Elliott Hughesf344baa2021-12-07 09:12:34 -080034317else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070034318
Elliott Hughesf344baa2021-12-07 09:12:34 -080034319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
34320printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070034321
34322fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034323rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070034324fi
34325
34326
34327# check for ssize_t
34328ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Elliott Hughesf344baa2021-12-07 09:12:34 -080034329if test "x$ac_cv_type_ssize_t" = xyes
34330then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070034331
Elliott Hughesf344baa2021-12-07 09:12:34 -080034332else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070034333
Elliott Hughesf344baa2021-12-07 09:12:34 -080034334printf "%s\n" "#define ssize_t int" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034335
34336fi
34337
34338
34339# check for bool type
34340ac_fn_c_check_type "$LINENO" "bool" "ac_cv_type_bool" "
34341#ifdef HAVE_SYS_TYPES_H
34342#include <sys/types.h>
34343#endif
34344#ifdef HAVE_STDBOOL_H
34345#include <stdbool.h>
34346#endif
34347
34348"
Elliott Hughesf344baa2021-12-07 09:12:34 -080034349if test "x$ac_cv_type_bool" = xyes
34350then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070034351
34352
Elliott Hughesf344baa2021-12-07 09:12:34 -080034353printf "%s\n" "#define HAVE_BOOL_T 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034354
34355
34356fi
34357
34358
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070034359# check for sa_family_t
34360ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
34361#ifdef HAVE_SYS_SOCKET_H
34362#include <sys/socket.h>
34363#endif
34364
34365"
Elliott Hughesf344baa2021-12-07 09:12:34 -080034366if test "x$ac_cv_type_sa_family_t" = xyes
34367then :
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070034368
Elliott Hughesf344baa2021-12-07 09:12:34 -080034369printf "%s\n" "#define CURL_SA_FAMILY_T sa_family_t" >>confdefs.h
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070034370
Elliott Hughesf344baa2021-12-07 09:12:34 -080034371else $as_nop
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070034372
34373 # The windows name?
34374 ac_fn_c_check_type "$LINENO" "ADDRESS_FAMILY" "ac_cv_type_ADDRESS_FAMILY" "
34375#ifdef HAVE_SYS_SOCKET_H
34376#include <sys/socket.h>
34377#endif
34378
34379"
Elliott Hughesf344baa2021-12-07 09:12:34 -080034380if test "x$ac_cv_type_ADDRESS_FAMILY" = xyes
34381then :
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070034382
Elliott Hughesf344baa2021-12-07 09:12:34 -080034383printf "%s\n" "#define CURL_SA_FAMILY_T ADDRESS_FAMILY" >>confdefs.h
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070034384
Elliott Hughesf344baa2021-12-07 09:12:34 -080034385else $as_nop
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070034386
Elliott Hughesf344baa2021-12-07 09:12:34 -080034387printf "%s\n" "#define CURL_SA_FAMILY_T unsigned short" >>confdefs.h
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070034388
34389fi
34390
34391
34392fi
34393
34394
Haibo Huangca2a8022020-07-10 20:17:42 -070034395# check for suseconds_t
34396ac_fn_c_check_type "$LINENO" "suseconds_t" "ac_cv_type_suseconds_t" "
34397#ifdef HAVE_SYS_TYPES_H
34398#include <sys/types.h>
34399#endif
34400#ifdef HAVE_SYS_TIME_H
34401#include <sys/time.h>
34402#endif
34403
34404"
Elliott Hughesf344baa2021-12-07 09:12:34 -080034405if test "x$ac_cv_type_suseconds_t" = xyes
34406then :
Haibo Huangca2a8022020-07-10 20:17:42 -070034407
34408
Elliott Hughesf344baa2021-12-07 09:12:34 -080034409printf "%s\n" "#define HAVE_SUSECONDS_T 1" >>confdefs.h
Haibo Huangca2a8022020-07-10 20:17:42 -070034410
34411
34412fi
34413
34414
Elliott Hughesf344baa2021-12-07 09:12:34 -080034415{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if time_t is unsigned" >&5
34416printf %s "checking if time_t is unsigned... " >&6; }
Elliott Hughescac39802018-04-27 16:19:43 -070034417
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070034418 old=$LD_LIBRARY_PATH
Elliott Hughes72d948d2018-08-03 14:37:21 -070034419 LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
34420 export LD_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080034421 if test "$cross_compiling" = yes
34422then :
34423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
34424printf "%s\n" "no" >&6; }
Elliott Hughescac39802018-04-27 16:19:43 -070034425
Elliott Hughesf344baa2021-12-07 09:12:34 -080034426else $as_nop
Elliott Hughescac39802018-04-27 16:19:43 -070034427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34428/* end confdefs.h. */
34429
Elliott Hughescac39802018-04-27 16:19:43 -070034430 #include <time.h>
34431 #include <limits.h>
34432 time_t t = -1;
34433 return (t > 0);
34434
34435_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080034436if ac_fn_c_try_run "$LINENO"
34437then :
34438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34439printf "%s\n" "yes" >&6; }
Elliott Hughescac39802018-04-27 16:19:43 -070034440
Elliott Hughesf344baa2021-12-07 09:12:34 -080034441printf "%s\n" "#define HAVE_TIME_T_UNSIGNED 1" >>confdefs.h
Elliott Hughescac39802018-04-27 16:19:43 -070034442
34443
Elliott Hughesf344baa2021-12-07 09:12:34 -080034444else $as_nop
34445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
34446printf "%s\n" "no" >&6; }
Elliott Hughescac39802018-04-27 16:19:43 -070034447
34448fi
34449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34450 conftest.$ac_objext conftest.beam conftest.$ac_ext
34451fi
34452
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070034453 LD_LIBRARY_PATH=$old # restore
34454
Elliott Hughescac39802018-04-27 16:19:43 -070034455
Elliott Hughes82be86d2017-09-20 17:00:17 -070034456
Elliott Hughes82be86d2017-09-20 17:00:17 -070034457curl_includes_poll="\
34458/* includes start */
34459#ifdef HAVE_SYS_TYPES_H
34460# include <sys/types.h>
34461#endif
34462#ifdef HAVE_POLL_H
34463# include <poll.h>
34464#endif
34465#ifdef HAVE_SYS_POLL_H
34466# include <sys/poll.h>
34467#endif
34468/* includes end */"
Elliott Hughesf344baa2021-12-07 09:12:34 -080034469 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_poll
Elliott Hughes82be86d2017-09-20 17:00:17 -070034470"
Elliott Hughesf344baa2021-12-07 09:12:34 -080034471if test "x$ac_cv_header_sys_types_h" = xyes
34472then :
34473 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034474
34475fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034476ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$curl_includes_poll
34477"
34478if test "x$ac_cv_header_poll_h" = xyes
34479then :
34480 printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034481
Elliott Hughesf344baa2021-12-07 09:12:34 -080034482fi
34483ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$curl_includes_poll
34484"
34485if test "x$ac_cv_header_sys_poll_h" = xyes
34486then :
34487 printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
34488
34489fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070034490
34491
34492
34493 #
34494 tst_poll_events_macro_defined="unknown"
34495 #
34496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34497/* end confdefs.h. */
34498
34499
34500 $curl_includes_poll
34501
34502int main (void)
34503{
34504
34505#if defined(events) || defined(revents)
34506 return 0;
34507#else
34508 force compilation error
34509#endif
34510
34511 ;
34512 return 0;
34513}
34514
34515_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080034516if ac_fn_c_try_compile "$LINENO"
34517then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070034518
34519 tst_poll_events_macro_defined="yes"
34520
Elliott Hughesf344baa2021-12-07 09:12:34 -080034521else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070034522
34523 tst_poll_events_macro_defined="no"
34524
34525fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034526rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070034527 #
34528 if test "$tst_poll_events_macro_defined" = "yes"; then
34529 if test "x$ac_cv_header_sys_poll_h" = "xyes"; then
34530
34531cat >>confdefs.h <<_EOF
34532#define CURL_PULL_SYS_POLL_H 1
34533_EOF
34534
34535 fi
34536 fi
34537 #
34538
34539
34540
34541 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
34542#undef inline
34543#ifdef HAVE_WINDOWS_H
34544#ifndef WIN32_LEAN_AND_MEAN
34545#define WIN32_LEAN_AND_MEAN
34546#endif
34547#include <windows.h>
34548#ifdef HAVE_WINSOCK2_H
34549#include <winsock2.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070034550#endif
34551#else
34552#ifdef HAVE_SYS_TYPES_H
34553#include <sys/types.h>
34554#endif
34555#ifdef HAVE_SYS_SOCKET_H
34556#include <sys/socket.h>
34557#endif
34558#ifdef HAVE_NETINET_IN_H
34559#include <netinet/in.h>
34560#endif
34561#ifdef HAVE_ARPA_INET_H
34562#include <arpa/inet.h>
34563#endif
34564#endif
34565
34566"
Elliott Hughesf344baa2021-12-07 09:12:34 -080034567if test "x$ac_cv_type_in_addr_t" = xyes
34568then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070034569
Elliott Hughesf344baa2021-12-07 09:12:34 -080034570else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070034571
Elliott Hughesf344baa2021-12-07 09:12:34 -080034572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in_addr_t equivalent" >&5
34573printf %s "checking for in_addr_t equivalent... " >&6; }
34574if test ${curl_cv_in_addr_t_equiv+y}
34575then :
34576 printf %s "(cached) " >&6
34577else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070034578
34579 curl_cv_in_addr_t_equiv="unknown"
34580 for t in "unsigned long" int size_t unsigned long; do
34581 if test "$curl_cv_in_addr_t_equiv" = "unknown"; then
34582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34583/* end confdefs.h. */
34584
34585
34586#undef inline
34587#ifdef HAVE_WINDOWS_H
34588#ifndef WIN32_LEAN_AND_MEAN
34589#define WIN32_LEAN_AND_MEAN
34590#endif
34591#include <windows.h>
34592#ifdef HAVE_WINSOCK2_H
34593#include <winsock2.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070034594#endif
34595#else
34596#ifdef HAVE_SYS_TYPES_H
34597#include <sys/types.h>
34598#endif
34599#ifdef HAVE_SYS_SOCKET_H
34600#include <sys/socket.h>
34601#endif
34602#ifdef HAVE_NETINET_IN_H
34603#include <netinet/in.h>
34604#endif
34605#ifdef HAVE_ARPA_INET_H
34606#include <arpa/inet.h>
34607#endif
34608#endif
34609
34610int main (void)
34611{
34612
34613 $t data = inet_addr ("1.2.3.4");
34614
34615 ;
34616 return 0;
34617}
34618
34619_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080034620if ac_fn_c_try_link "$LINENO"
34621then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070034622
34623 curl_cv_in_addr_t_equiv="$t"
34624
34625fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034626rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070034627 conftest$ac_exeext conftest.$ac_ext
34628 fi
34629 done
34630
34631fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034632{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_in_addr_t_equiv" >&5
34633printf "%s\n" "$curl_cv_in_addr_t_equiv" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070034634 case "$curl_cv_in_addr_t_equiv" in
34635 unknown)
34636 as_fn_error $? "Cannot find a type to use in place of in_addr_t" "$LINENO" 5
34637 ;;
34638 *)
34639
Elliott Hughesf344baa2021-12-07 09:12:34 -080034640printf "%s\n" "#define in_addr_t $curl_cv_in_addr_t_equiv" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034641
34642 ;;
34643 esac
34644
34645fi
34646
34647
34648
34649
34650 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
34651#undef inline
34652#ifdef HAVE_WINDOWS_H
34653#ifndef WIN32_LEAN_AND_MEAN
34654#define WIN32_LEAN_AND_MEAN
34655#endif
34656#include <windows.h>
34657#ifdef HAVE_WINSOCK2_H
34658#include <winsock2.h>
34659#endif
34660#else
34661#ifdef HAVE_SYS_TYPES_H
34662#include <sys/types.h>
34663#endif
34664#ifdef HAVE_SYS_SOCKET_H
34665#include <sys/socket.h>
34666#endif
34667#ifdef HAVE_NETINET_IN_H
34668#include <netinet/in.h>
34669#endif
34670#ifdef HAVE_ARPA_INET_H
34671#include <arpa/inet.h>
34672#endif
34673#endif
34674
34675"
Elliott Hughesf344baa2021-12-07 09:12:34 -080034676if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
34677then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070034678
Elliott Hughesf344baa2021-12-07 09:12:34 -080034679printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034680
34681fi
34682
34683
34684
34685
Elliott Hughesf344baa2021-12-07 09:12:34 -080034686 ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
34687if test "x$ac_cv_header_sys_select_h" = xyes
34688then :
34689 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034690
34691fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034692ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
34693if test "x$ac_cv_header_sys_socket_h" = xyes
34694then :
34695 printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034696
34697fi
34698
Elliott Hughes82be86d2017-09-20 17:00:17 -070034699 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080034700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for select" >&5
34701printf %s "checking for select... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070034702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34703/* end confdefs.h. */
34704
34705
34706#undef inline
34707#ifdef HAVE_WINDOWS_H
34708#ifndef WIN32_LEAN_AND_MEAN
34709#define WIN32_LEAN_AND_MEAN
34710#endif
34711#include <windows.h>
34712#ifdef HAVE_WINSOCK2_H
34713#include <winsock2.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070034714#endif
34715#endif
34716#ifdef HAVE_SYS_TYPES_H
34717#include <sys/types.h>
34718#endif
34719#ifdef HAVE_SYS_TIME_H
34720#include <sys/time.h>
Elliott Hughes34dd5f42021-08-10 13:01:18 -070034721#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070034722#include <time.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070034723#ifndef HAVE_WINDOWS_H
34724#ifdef HAVE_SYS_SELECT_H
34725#include <sys/select.h>
Haibo Huang24c77a12020-04-29 13:49:57 -070034726#elif defined(HAVE_UNISTD_H)
34727#include <unistd.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070034728#endif
34729#ifdef HAVE_SYS_SOCKET_H
34730#include <sys/socket.h>
34731#endif
Elliott Hughes34dd5f42021-08-10 13:01:18 -070034732#ifdef HAVE_PROTO_BSDSOCKET_H
34733#include <proto/bsdsocket.h>
34734struct Library *SocketBase = NULL;
34735#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
34736#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070034737#endif
34738
34739int main (void)
34740{
34741
34742 select(0, 0, 0, 0, 0);
34743
34744 ;
34745 return 0;
34746}
34747
34748_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080034749if ac_fn_c_try_link "$LINENO"
34750then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070034751
Elliott Hughesf344baa2021-12-07 09:12:34 -080034752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34753printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070034754 curl_cv_select="yes"
34755
Elliott Hughesf344baa2021-12-07 09:12:34 -080034756else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070034757
Elliott Hughesf344baa2021-12-07 09:12:34 -080034758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
34759printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070034760 curl_cv_select="no"
34761
34762fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034763rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070034764 conftest$ac_exeext conftest.$ac_ext
34765 #
34766 if test "$curl_cv_select" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080034767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of args and return type for select" >&5
34768printf %s "checking types of args and return type for select... " >&6; }
34769if test ${curl_cv_func_select_args+y}
34770then :
34771 printf %s "(cached) " >&6
34772else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070034773
34774 curl_cv_func_select_args="unknown"
34775 for sel_retv in 'int' 'ssize_t'; do
34776 for sel_arg1 in 'int' 'ssize_t' 'size_t' 'unsigned long int' 'unsigned int'; do
34777 for sel_arg234 in 'fd_set *' 'int *' 'void *'; do
34778 for sel_arg5 in 'struct timeval *' 'const struct timeval *'; do
34779 if test "$curl_cv_func_select_args" = "unknown"; then
34780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34781/* end confdefs.h. */
34782
34783
34784#undef inline
34785#ifdef HAVE_WINDOWS_H
34786#ifndef WIN32_LEAN_AND_MEAN
34787#define WIN32_LEAN_AND_MEAN
34788#endif
34789#include <windows.h>
34790#ifdef HAVE_WINSOCK2_H
34791#include <winsock2.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070034792#endif
34793#define SELECTCALLCONV PASCAL
34794#endif
34795#ifdef HAVE_SYS_TYPES_H
34796#include <sys/types.h>
34797#endif
34798#ifdef HAVE_SYS_TIME_H
34799#include <sys/time.h>
Elliott Hughes34dd5f42021-08-10 13:01:18 -070034800#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070034801#include <time.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070034802#ifndef HAVE_WINDOWS_H
34803#ifdef HAVE_SYS_SELECT_H
34804#include <sys/select.h>
Haibo Huang24c77a12020-04-29 13:49:57 -070034805#elif defined(HAVE_UNISTD_H)
34806#include <unistd.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070034807#endif
34808#ifdef HAVE_SYS_SOCKET_H
34809#include <sys/socket.h>
34810#endif
Elliott Hughes34dd5f42021-08-10 13:01:18 -070034811#ifdef HAVE_PROTO_BSDSOCKET_H
34812#include <proto/bsdsocket.h>
34813struct Library *SocketBase = NULL;
34814#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
34815#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070034816#define SELECTCALLCONV
34817#endif
34818#ifndef HAVE_STRUCT_TIMEVAL
34819 struct timeval {
34820 long tv_sec;
34821 long tv_usec;
34822 };
34823#endif
Haibo Huang65021c72019-03-27 15:37:23 -070034824#ifndef HAVE_PROTO_BSDSOCKET_H
Elliott Hughes82be86d2017-09-20 17:00:17 -070034825 extern $sel_retv SELECTCALLCONV
Haibo Huang51d9d882019-02-06 01:36:06 -080034826 select($sel_arg1,
Elliott Hughes82be86d2017-09-20 17:00:17 -070034827 $sel_arg234,
34828 $sel_arg234,
34829 $sel_arg234,
34830 $sel_arg5);
Haibo Huang65021c72019-03-27 15:37:23 -070034831#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070034832
34833int main (void)
34834{
34835
34836 $sel_arg1 nfds=0;
34837 $sel_arg234 rfds=0;
34838 $sel_arg234 wfds=0;
34839 $sel_arg234 efds=0;
34840 $sel_retv res = select(nfds, rfds, wfds, efds, 0);
34841
34842 ;
34843 return 0;
34844}
34845
34846_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080034847if ac_fn_c_try_compile "$LINENO"
34848then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070034849
34850 curl_cv_func_select_args="$sel_arg1,$sel_arg234,$sel_arg5,$sel_retv"
34851
34852fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034853rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070034854 fi
34855 done
34856 done
34857 done
34858 done
34859
34860fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034861{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_func_select_args" >&5
34862printf "%s\n" "$curl_cv_func_select_args" >&6; } # AC-CACHE-CHECK
Elliott Hughes82be86d2017-09-20 17:00:17 -070034863 if test "$curl_cv_func_select_args" = "unknown"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080034864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find proper types to use for select args" >&5
34865printf "%s\n" "$as_me: WARNING: Cannot find proper types to use for select args" >&2;}
34866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: HAVE_SELECT will not be defined" >&5
34867printf "%s\n" "$as_me: WARNING: HAVE_SELECT will not be defined" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070034868 else
34869 select_prev_IFS=$IFS; IFS=','
34870 set dummy `echo "$curl_cv_func_select_args" | sed 's/\*/\*/g'`
34871 IFS=$select_prev_IFS
34872 shift
34873 #
34874 sel_qual_type_arg5=$3
34875 #
34876
Elliott Hughesf344baa2021-12-07 09:12:34 -080034877printf "%s\n" "#define SELECT_TYPE_ARG1 $1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034878
34879
Elliott Hughesf344baa2021-12-07 09:12:34 -080034880printf "%s\n" "#define SELECT_TYPE_ARG234 $2" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034881
34882
Elliott Hughesf344baa2021-12-07 09:12:34 -080034883printf "%s\n" "#define SELECT_TYPE_RETV $4" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034884
34885 #
34886 prev_sh_opts=$-
34887 #
34888 case $prev_sh_opts in
34889 *f*)
34890 ;;
34891 *)
34892 set -f
34893 ;;
34894 esac
34895 #
34896 case "$sel_qual_type_arg5" in
34897 const*)
34898 sel_qual_arg5=const
34899 sel_type_arg5=`echo $sel_qual_type_arg5 | sed 's/^const //'`
34900 ;;
34901 *)
34902 sel_qual_arg5=
34903 sel_type_arg5=$sel_qual_type_arg5
34904 ;;
34905 esac
34906 #
34907
Elliott Hughesf344baa2021-12-07 09:12:34 -080034908printf "%s\n" "#define SELECT_QUAL_ARG5 $sel_qual_arg5" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034909
34910
Elliott Hughesf344baa2021-12-07 09:12:34 -080034911printf "%s\n" "#define SELECT_TYPE_ARG5 $sel_type_arg5" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034912
34913 #
34914 case $prev_sh_opts in
34915 *f*)
34916 ;;
34917 *)
34918 set +f
34919 ;;
34920 esac
34921 #
34922
Elliott Hughesf344baa2021-12-07 09:12:34 -080034923printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034924
34925 curl_cv_func_select="yes"
34926 fi
34927 fi
34928
34929
34930
Elliott Hughesf344baa2021-12-07 09:12:34 -080034931 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
34932if test "x$ac_cv_header_sys_types_h" = xyes
34933then :
34934 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
34935
34936fi
34937ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
34938if test "x$ac_cv_header_sys_socket_h" = xyes
34939then :
34940 printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070034941
34942fi
34943
Elliott Hughes82be86d2017-09-20 17:00:17 -070034944 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080034945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for recv" >&5
34946printf %s "checking for recv... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070034947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34948/* end confdefs.h. */
34949
34950
34951#undef inline
34952#ifdef HAVE_WINDOWS_H
34953#ifndef WIN32_LEAN_AND_MEAN
34954#define WIN32_LEAN_AND_MEAN
34955#endif
34956#include <windows.h>
34957#ifdef HAVE_WINSOCK2_H
34958#include <winsock2.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070034959#endif
34960#else
Haibo Huang65021c72019-03-27 15:37:23 -070034961#ifdef HAVE_PROTO_BSDSOCKET_H
34962#include <proto/bsdsocket.h>
34963struct Library *SocketBase = NULL;
34964#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070034965#ifdef HAVE_SYS_TYPES_H
34966#include <sys/types.h>
34967#endif
34968#ifdef HAVE_SYS_SOCKET_H
34969#include <sys/socket.h>
34970#endif
34971#endif
34972
34973int main (void)
34974{
34975
34976 recv(0, 0, 0, 0);
34977
34978 ;
34979 return 0;
34980}
34981
34982_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080034983if ac_fn_c_try_link "$LINENO"
34984then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070034985
Elliott Hughesf344baa2021-12-07 09:12:34 -080034986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34987printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070034988 curl_cv_recv="yes"
34989
Elliott Hughesf344baa2021-12-07 09:12:34 -080034990else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070034991
Elliott Hughesf344baa2021-12-07 09:12:34 -080034992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
34993printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070034994 curl_cv_recv="no"
34995
34996fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080034997rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070034998 conftest$ac_exeext conftest.$ac_ext
34999 #
35000 if test "$curl_cv_recv" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080035001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of args and return type for recv" >&5
35002printf %s "checking types of args and return type for recv... " >&6; }
35003if test ${curl_cv_func_recv_args+y}
35004then :
35005 printf %s "(cached) " >&6
35006else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070035007
35008 curl_cv_func_recv_args="unknown"
35009 for recv_retv in 'int' 'ssize_t'; do
35010 for recv_arg1 in 'int' 'ssize_t' 'SOCKET'; do
35011 for recv_arg2 in 'char *' 'void *'; do
35012 for recv_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
35013 for recv_arg4 in 'int' 'unsigned int'; do
35014 if test "$curl_cv_func_recv_args" = "unknown"; then
35015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35016/* end confdefs.h. */
35017
35018
35019#undef inline
35020#ifdef HAVE_WINDOWS_H
35021#ifndef WIN32_LEAN_AND_MEAN
35022#define WIN32_LEAN_AND_MEAN
35023#endif
35024#include <windows.h>
35025#ifdef HAVE_WINSOCK2_H
35026#include <winsock2.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070035027#endif
35028#define RECVCALLCONV PASCAL
35029#else
Haibo Huang65021c72019-03-27 15:37:23 -070035030#ifdef HAVE_PROTO_BSDSOCKET_H
35031#include <proto/bsdsocket.h>
35032struct Library *SocketBase = NULL;
35033#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070035034#ifdef HAVE_SYS_TYPES_H
35035#include <sys/types.h>
35036#endif
35037#ifdef HAVE_SYS_SOCKET_H
35038#include <sys/socket.h>
35039#endif
35040#define RECVCALLCONV
35041#endif
Haibo Huang65021c72019-03-27 15:37:23 -070035042#ifndef HAVE_PROTO_BSDSOCKET_H
Elliott Hughes82be86d2017-09-20 17:00:17 -070035043 extern $recv_retv RECVCALLCONV
Elliott Hughes82be86d2017-09-20 17:00:17 -070035044 recv($recv_arg1, $recv_arg2, $recv_arg3, $recv_arg4);
Haibo Huang65021c72019-03-27 15:37:23 -070035045#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070035046
35047int main (void)
35048{
35049
35050 $recv_arg1 s=0;
35051 $recv_arg2 buf=0;
35052 $recv_arg3 len=0;
35053 $recv_arg4 flags=0;
35054 $recv_retv res = recv(s, buf, len, flags);
35055
35056 ;
35057 return 0;
35058}
35059
35060_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080035061if ac_fn_c_try_compile "$LINENO"
35062then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070035063
35064 curl_cv_func_recv_args="$recv_arg1,$recv_arg2,$recv_arg3,$recv_arg4,$recv_retv"
35065
35066fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035067rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070035068 fi
35069 done
35070 done
35071 done
35072 done
35073 done
35074
35075fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035076{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_func_recv_args" >&5
35077printf "%s\n" "$curl_cv_func_recv_args" >&6; } # AC-CACHE-CHECK
Elliott Hughes82be86d2017-09-20 17:00:17 -070035078 if test "$curl_cv_func_recv_args" = "unknown"; then
35079 as_fn_error $? "Cannot find proper types to use for recv args" "$LINENO" 5
35080 else
35081 recv_prev_IFS=$IFS; IFS=','
35082 set dummy `echo "$curl_cv_func_recv_args" | sed 's/\*/\*/g'`
35083 IFS=$recv_prev_IFS
35084 shift
35085 #
35086
Elliott Hughesf344baa2021-12-07 09:12:34 -080035087printf "%s\n" "#define RECV_TYPE_ARG1 $1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035088
35089
Elliott Hughesf344baa2021-12-07 09:12:34 -080035090printf "%s\n" "#define RECV_TYPE_ARG2 $2" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035091
35092
Elliott Hughesf344baa2021-12-07 09:12:34 -080035093printf "%s\n" "#define RECV_TYPE_ARG3 $3" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035094
35095
Elliott Hughesf344baa2021-12-07 09:12:34 -080035096printf "%s\n" "#define RECV_TYPE_ARG4 $4" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035097
35098
Elliott Hughesf344baa2021-12-07 09:12:34 -080035099printf "%s\n" "#define RECV_TYPE_RETV $5" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035100
35101 #
35102
Elliott Hughesf344baa2021-12-07 09:12:34 -080035103printf "%s\n" "#define HAVE_RECV 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035104
35105 curl_cv_func_recv="yes"
35106 fi
35107 else
35108 as_fn_error $? "Unable to link function recv" "$LINENO" 5
35109 fi
35110
35111
Elliott Hughesf344baa2021-12-07 09:12:34 -080035112 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
35113if test "x$ac_cv_header_sys_types_h" = xyes
35114then :
35115 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
35116
35117fi
35118ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
35119if test "x$ac_cv_header_sys_socket_h" = xyes
35120then :
35121 printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035122
35123fi
35124
Elliott Hughes82be86d2017-09-20 17:00:17 -070035125 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080035126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for send" >&5
35127printf %s "checking for send... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35129/* end confdefs.h. */
35130
35131
35132#undef inline
35133#ifdef HAVE_WINDOWS_H
35134#ifndef WIN32_LEAN_AND_MEAN
35135#define WIN32_LEAN_AND_MEAN
35136#endif
35137#include <windows.h>
35138#ifdef HAVE_WINSOCK2_H
35139#include <winsock2.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070035140#endif
35141#else
Haibo Huang65021c72019-03-27 15:37:23 -070035142#ifdef HAVE_PROTO_BSDSOCKET_H
35143#include <proto/bsdsocket.h>
35144struct Library *SocketBase = NULL;
35145#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070035146#ifdef HAVE_SYS_TYPES_H
35147#include <sys/types.h>
35148#endif
35149#ifdef HAVE_SYS_SOCKET_H
35150#include <sys/socket.h>
35151#endif
35152#endif
35153
35154int main (void)
35155{
35156
35157 send(0, 0, 0, 0);
35158
35159 ;
35160 return 0;
35161}
35162
35163_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080035164if ac_fn_c_try_link "$LINENO"
35165then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070035166
Elliott Hughesf344baa2021-12-07 09:12:34 -080035167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35168printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035169 curl_cv_send="yes"
35170
Elliott Hughesf344baa2021-12-07 09:12:34 -080035171else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070035172
Elliott Hughesf344baa2021-12-07 09:12:34 -080035173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
35174printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035175 curl_cv_send="no"
35176
35177fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035178rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070035179 conftest$ac_exeext conftest.$ac_ext
35180 #
35181 if test "$curl_cv_send" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080035182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of args and return type for send" >&5
35183printf %s "checking types of args and return type for send... " >&6; }
35184if test ${curl_cv_func_send_args+y}
35185then :
35186 printf %s "(cached) " >&6
35187else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070035188
35189 curl_cv_func_send_args="unknown"
35190 for send_retv in 'int' 'ssize_t'; do
35191 for send_arg1 in 'int' 'ssize_t' 'SOCKET'; do
35192 for send_arg2 in 'char *' 'void *' 'const char *' 'const void *'; do
35193 for send_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
35194 for send_arg4 in 'int' 'unsigned int'; do
35195 if test "$curl_cv_func_send_args" = "unknown"; then
35196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35197/* end confdefs.h. */
35198
35199
35200#undef inline
35201#ifdef HAVE_WINDOWS_H
35202#ifndef WIN32_LEAN_AND_MEAN
35203#define WIN32_LEAN_AND_MEAN
35204#endif
35205#include <windows.h>
35206#ifdef HAVE_WINSOCK2_H
35207#include <winsock2.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070035208#endif
35209#define SENDCALLCONV PASCAL
35210#else
Haibo Huang65021c72019-03-27 15:37:23 -070035211#ifdef HAVE_PROTO_BSDSOCKET_H
35212#include <proto/bsdsocket.h>
35213struct Library *SocketBase = NULL;
35214#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070035215#ifdef HAVE_SYS_TYPES_H
35216#include <sys/types.h>
35217#endif
35218#ifdef HAVE_SYS_SOCKET_H
35219#include <sys/socket.h>
35220#endif
35221#define SENDCALLCONV
35222#endif
Haibo Huang65021c72019-03-27 15:37:23 -070035223#ifndef HAVE_PROTO_BSDSOCKET_H
Elliott Hughes82be86d2017-09-20 17:00:17 -070035224 extern $send_retv SENDCALLCONV
Elliott Hughes82be86d2017-09-20 17:00:17 -070035225 send($send_arg1, $send_arg2, $send_arg3, $send_arg4);
Haibo Huang65021c72019-03-27 15:37:23 -070035226#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070035227
35228int main (void)
35229{
35230
35231 $send_arg1 s=0;
35232 $send_arg3 len=0;
35233 $send_arg4 flags=0;
35234 $send_retv res = send(s, 0, len, flags);
35235
35236 ;
35237 return 0;
35238}
35239
35240_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080035241if ac_fn_c_try_compile "$LINENO"
35242then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070035243
35244 curl_cv_func_send_args="$send_arg1,$send_arg2,$send_arg3,$send_arg4,$send_retv"
35245
35246fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035247rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070035248 fi
35249 done
35250 done
35251 done
35252 done
35253 done
35254
35255fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035256{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_func_send_args" >&5
35257printf "%s\n" "$curl_cv_func_send_args" >&6; } # AC-CACHE-CHECK
Elliott Hughes82be86d2017-09-20 17:00:17 -070035258 if test "$curl_cv_func_send_args" = "unknown"; then
35259 as_fn_error $? "Cannot find proper types to use for send args" "$LINENO" 5
35260 else
35261 send_prev_IFS=$IFS; IFS=','
35262 set dummy `echo "$curl_cv_func_send_args" | sed 's/\*/\*/g'`
35263 IFS=$send_prev_IFS
35264 shift
35265 #
35266 send_qual_type_arg2=$2
35267 #
35268
Elliott Hughesf344baa2021-12-07 09:12:34 -080035269printf "%s\n" "#define SEND_TYPE_ARG1 $1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035270
35271
Elliott Hughesf344baa2021-12-07 09:12:34 -080035272printf "%s\n" "#define SEND_TYPE_ARG3 $3" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035273
35274
Elliott Hughesf344baa2021-12-07 09:12:34 -080035275printf "%s\n" "#define SEND_TYPE_ARG4 $4" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035276
35277
Elliott Hughesf344baa2021-12-07 09:12:34 -080035278printf "%s\n" "#define SEND_TYPE_RETV $5" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035279
35280 #
35281 prev_sh_opts=$-
35282 #
35283 case $prev_sh_opts in
35284 *f*)
35285 ;;
35286 *)
35287 set -f
35288 ;;
35289 esac
35290 #
35291 case "$send_qual_type_arg2" in
35292 const*)
35293 send_qual_arg2=const
35294 send_type_arg2=`echo $send_qual_type_arg2 | sed 's/^const //'`
35295 ;;
35296 *)
35297 send_qual_arg2=
35298 send_type_arg2=$send_qual_type_arg2
35299 ;;
35300 esac
35301 #
35302
Elliott Hughesf344baa2021-12-07 09:12:34 -080035303printf "%s\n" "#define SEND_QUAL_ARG2 $send_qual_arg2" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035304
35305
Elliott Hughesf344baa2021-12-07 09:12:34 -080035306printf "%s\n" "#define SEND_TYPE_ARG2 $send_type_arg2" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035307
35308 #
35309 case $prev_sh_opts in
35310 *f*)
35311 ;;
35312 *)
35313 set +f
35314 ;;
35315 esac
35316 #
35317
Elliott Hughesf344baa2021-12-07 09:12:34 -080035318printf "%s\n" "#define HAVE_SEND 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035319
35320 curl_cv_func_send="yes"
35321 fi
35322 else
35323 as_fn_error $? "Unable to link function send" "$LINENO" 5
35324 fi
35325
35326
Elliott Hughesf344baa2021-12-07 09:12:34 -080035327 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
35328if test "x$ac_cv_header_sys_types_h" = xyes
35329then :
35330 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
35331
35332fi
35333ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
35334if test "x$ac_cv_header_sys_socket_h" = xyes
35335then :
35336 printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035337
35338fi
35339
Elliott Hughesf344baa2021-12-07 09:12:34 -080035340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MSG_NOSIGNAL" >&5
35341printf %s "checking for MSG_NOSIGNAL... " >&6; }
35342if test ${curl_cv_msg_nosignal+y}
35343then :
35344 printf %s "(cached) " >&6
35345else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070035346
35347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35348/* end confdefs.h. */
35349
35350
35351#undef inline
35352#ifdef HAVE_WINDOWS_H
35353#ifndef WIN32_LEAN_AND_MEAN
35354#define WIN32_LEAN_AND_MEAN
35355#endif
35356#include <windows.h>
35357#ifdef HAVE_WINSOCK2_H
35358#include <winsock2.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070035359#endif
35360#else
Haibo Huang65021c72019-03-27 15:37:23 -070035361#ifdef HAVE_PROTO_BSDSOCKET_H
35362#include <proto/bsdsocket.h>
35363struct Library *SocketBase = NULL;
35364#endif
Elliott Hughes82be86d2017-09-20 17:00:17 -070035365#ifdef HAVE_SYS_TYPES_H
35366#include <sys/types.h>
35367#endif
35368#ifdef HAVE_SYS_SOCKET_H
35369#include <sys/socket.h>
35370#endif
35371#endif
35372
35373int main (void)
35374{
35375
35376 int flag=MSG_NOSIGNAL;
35377
35378 ;
35379 return 0;
35380}
35381
35382_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080035383if ac_fn_c_try_compile "$LINENO"
35384then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070035385
35386 curl_cv_msg_nosignal="yes"
35387
Elliott Hughesf344baa2021-12-07 09:12:34 -080035388else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070035389
35390 curl_cv_msg_nosignal="no"
35391
35392fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035393rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070035394
35395fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_msg_nosignal" >&5
35397printf "%s\n" "$curl_cv_msg_nosignal" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035398 case "$curl_cv_msg_nosignal" in
35399 yes)
35400
Elliott Hughesf344baa2021-12-07 09:12:34 -080035401printf "%s\n" "#define HAVE_MSG_NOSIGNAL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035402
35403 ;;
35404 esac
35405
35406
35407
35408curl_includes_unistd="\
35409/* includes start */
35410#ifdef HAVE_SYS_TYPES_H
35411# include <sys/types.h>
35412#endif
35413#ifdef HAVE_UNISTD_H
35414# include <unistd.h>
35415#endif
35416/* includes end */"
Elliott Hughesf344baa2021-12-07 09:12:34 -080035417 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_unistd
Elliott Hughes82be86d2017-09-20 17:00:17 -070035418"
Elliott Hughesf344baa2021-12-07 09:12:34 -080035419if test "x$ac_cv_header_sys_types_h" = xyes
35420then :
35421 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035422
35423fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035424ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$curl_includes_unistd
35425"
35426if test "x$ac_cv_header_unistd_h" = xyes
35427then :
35428 printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035429
Elliott Hughesf344baa2021-12-07 09:12:34 -080035430fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070035431
35432
35433
35434 #
35435 tst_links_alarm="unknown"
35436 tst_proto_alarm="unknown"
35437 tst_compi_alarm="unknown"
35438 tst_allow_alarm="unknown"
35439 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080035440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if alarm can be linked" >&5
35441printf %s "checking if alarm can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35443/* end confdefs.h. */
35444
35445
35446#define alarm innocuous_alarm
35447#ifdef __STDC__
35448# include <limits.h>
35449#else
35450# include <assert.h>
35451#endif
35452#undef alarm
35453#ifdef __cplusplus
35454extern "C"
35455#endif
35456char alarm ();
35457#if defined __stub_alarm || defined __stub___alarm
35458choke me
35459#endif
35460
35461int main (void)
35462{
35463return alarm ();
35464 ;
35465 return 0;
35466}
35467
35468_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080035469if ac_fn_c_try_link "$LINENO"
35470then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070035471
Elliott Hughesf344baa2021-12-07 09:12:34 -080035472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35473printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035474 tst_links_alarm="yes"
35475
Elliott Hughesf344baa2021-12-07 09:12:34 -080035476else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070035477
Elliott Hughesf344baa2021-12-07 09:12:34 -080035478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
35479printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035480 tst_links_alarm="no"
35481
35482fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035483rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070035484 conftest$ac_exeext conftest.$ac_ext
35485 #
35486 if test "$tst_links_alarm" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080035487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if alarm is prototyped" >&5
35488printf %s "checking if alarm is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35490/* end confdefs.h. */
35491
35492 $curl_includes_unistd
35493
35494_ACEOF
35495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080035496 $EGREP "alarm" >/dev/null 2>&1
35497then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070035498
Elliott Hughesf344baa2021-12-07 09:12:34 -080035499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35500printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035501 tst_proto_alarm="yes"
35502
Elliott Hughesf344baa2021-12-07 09:12:34 -080035503else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070035504
Elliott Hughesf344baa2021-12-07 09:12:34 -080035505 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
35506printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035507 tst_proto_alarm="no"
35508
35509fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035510rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070035511
35512 fi
35513 #
35514 if test "$tst_proto_alarm" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080035515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if alarm is compilable" >&5
35516printf %s "checking if alarm is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35518/* end confdefs.h. */
35519
35520
35521 $curl_includes_unistd
35522
35523int main (void)
35524{
35525
35526 if(0 != alarm(0))
35527 return 1;
35528
35529 ;
35530 return 0;
35531}
35532
35533_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080035534if ac_fn_c_try_compile "$LINENO"
35535then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070035536
Elliott Hughesf344baa2021-12-07 09:12:34 -080035537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35538printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035539 tst_compi_alarm="yes"
35540
Elliott Hughesf344baa2021-12-07 09:12:34 -080035541else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070035542
Elliott Hughesf344baa2021-12-07 09:12:34 -080035543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
35544printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035545 tst_compi_alarm="no"
35546
35547fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035548rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070035549 fi
35550 #
35551 if test "$tst_compi_alarm" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080035552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if alarm usage allowed" >&5
35553printf %s "checking if alarm usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035554 if test "x$curl_disallow_alarm" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080035555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35556printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035557 tst_allow_alarm="yes"
35558 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080035559 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
35560printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035561 tst_allow_alarm="no"
35562 fi
35563 fi
35564 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080035565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if alarm might be used" >&5
35566printf %s "checking if alarm might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035567 if test "$tst_links_alarm" = "yes" &&
35568 test "$tst_proto_alarm" = "yes" &&
35569 test "$tst_compi_alarm" = "yes" &&
35570 test "$tst_allow_alarm" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080035571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35572printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035573
Elliott Hughesf344baa2021-12-07 09:12:34 -080035574printf "%s\n" "#define HAVE_ALARM 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035575
35576 curl_cv_func_alarm="yes"
35577 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080035578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
35579printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035580 curl_cv_func_alarm="no"
35581 fi
35582
35583
35584curl_includes_string="\
35585/* includes start */
35586#ifdef HAVE_SYS_TYPES_H
35587# include <sys/types.h>
35588#endif
35589#ifdef HAVE_STRING_H
35590# include <string.h>
35591#endif
35592#ifdef HAVE_STRINGS_H
35593# include <strings.h>
35594#endif
35595/* includes end */"
Elliott Hughesf344baa2021-12-07 09:12:34 -080035596 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_string
Elliott Hughes82be86d2017-09-20 17:00:17 -070035597"
Elliott Hughesf344baa2021-12-07 09:12:34 -080035598if test "x$ac_cv_header_sys_types_h" = xyes
35599then :
35600 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035601
35602fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035603ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$curl_includes_string
35604"
35605if test "x$ac_cv_header_string_h" = xyes
35606then :
35607 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035608
Elliott Hughesf344baa2021-12-07 09:12:34 -080035609fi
35610ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$curl_includes_string
35611"
35612if test "x$ac_cv_header_strings_h" = xyes
35613then :
35614 printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
35615
35616fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070035617
35618
35619
35620curl_includes_libgen="\
35621/* includes start */
35622#ifdef HAVE_SYS_TYPES_H
35623# include <sys/types.h>
35624#endif
35625#ifdef HAVE_LIBGEN_H
35626# include <libgen.h>
35627#endif
35628/* includes end */"
Elliott Hughesf344baa2021-12-07 09:12:34 -080035629 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_libgen
Elliott Hughes82be86d2017-09-20 17:00:17 -070035630"
Elliott Hughesf344baa2021-12-07 09:12:34 -080035631if test "x$ac_cv_header_sys_types_h" = xyes
35632then :
35633 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035634
35635fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035636ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$curl_includes_libgen
35637"
35638if test "x$ac_cv_header_libgen_h" = xyes
35639then :
35640 printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035641
Elliott Hughesf344baa2021-12-07 09:12:34 -080035642fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070035643
35644
35645
35646 #
35647 tst_links_basename="unknown"
35648 tst_proto_basename="unknown"
35649 tst_compi_basename="unknown"
35650 tst_allow_basename="unknown"
35651 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080035652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if basename can be linked" >&5
35653printf %s "checking if basename can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35655/* end confdefs.h. */
35656
35657
35658#define basename innocuous_basename
35659#ifdef __STDC__
35660# include <limits.h>
35661#else
35662# include <assert.h>
35663#endif
35664#undef basename
35665#ifdef __cplusplus
35666extern "C"
35667#endif
35668char basename ();
35669#if defined __stub_basename || defined __stub___basename
35670choke me
35671#endif
35672
35673int main (void)
35674{
35675return basename ();
35676 ;
35677 return 0;
35678}
35679
35680_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080035681if ac_fn_c_try_link "$LINENO"
35682then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070035683
Elliott Hughesf344baa2021-12-07 09:12:34 -080035684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35685printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035686 tst_links_basename="yes"
35687
Elliott Hughesf344baa2021-12-07 09:12:34 -080035688else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070035689
Elliott Hughesf344baa2021-12-07 09:12:34 -080035690 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
35691printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035692 tst_links_basename="no"
35693
35694fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035695rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070035696 conftest$ac_exeext conftest.$ac_ext
35697 #
35698 if test "$tst_links_basename" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080035699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if basename is prototyped" >&5
35700printf %s "checking if basename is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35702/* end confdefs.h. */
35703
35704 $curl_includes_string
35705 $curl_includes_libgen
35706 $curl_includes_unistd
35707
35708_ACEOF
35709if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080035710 $EGREP "basename" >/dev/null 2>&1
35711then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070035712
Elliott Hughesf344baa2021-12-07 09:12:34 -080035713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35714printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035715 tst_proto_basename="yes"
35716
Elliott Hughesf344baa2021-12-07 09:12:34 -080035717else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070035718
Elliott Hughesf344baa2021-12-07 09:12:34 -080035719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
35720printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035721 tst_proto_basename="no"
35722
35723fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035724rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070035725
35726 fi
35727 #
35728 if test "$tst_proto_basename" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080035729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if basename is compilable" >&5
35730printf %s "checking if basename is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35732/* end confdefs.h. */
35733
35734
35735 $curl_includes_string
35736 $curl_includes_libgen
35737 $curl_includes_unistd
35738
35739int main (void)
35740{
35741
35742 if(0 != basename(0))
35743 return 1;
35744
35745 ;
35746 return 0;
35747}
35748
35749_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080035750if ac_fn_c_try_compile "$LINENO"
35751then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070035752
Elliott Hughesf344baa2021-12-07 09:12:34 -080035753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35754printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035755 tst_compi_basename="yes"
35756
Elliott Hughesf344baa2021-12-07 09:12:34 -080035757else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070035758
Elliott Hughesf344baa2021-12-07 09:12:34 -080035759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
35760printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035761 tst_compi_basename="no"
35762
35763fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035764rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070035765 fi
35766 #
35767 if test "$tst_compi_basename" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080035768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if basename usage allowed" >&5
35769printf %s "checking if basename usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035770 if test "x$curl_disallow_basename" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080035771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35772printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035773 tst_allow_basename="yes"
35774 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080035775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
35776printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035777 tst_allow_basename="no"
35778 fi
35779 fi
35780 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080035781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if basename might be used" >&5
35782printf %s "checking if basename might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035783 if test "$tst_links_basename" = "yes" &&
35784 test "$tst_proto_basename" = "yes" &&
35785 test "$tst_compi_basename" = "yes" &&
35786 test "$tst_allow_basename" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080035787 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35788printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035789
Elliott Hughesf344baa2021-12-07 09:12:34 -080035790printf "%s\n" "#define HAVE_BASENAME 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035791
35792 curl_cv_func_basename="yes"
35793 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080035794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
35795printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035796 curl_cv_func_basename="no"
35797 fi
35798
35799
35800curl_includes_socket="\
35801/* includes start */
35802#ifdef HAVE_SYS_TYPES_H
35803# include <sys/types.h>
35804#endif
35805#ifdef HAVE_SOCKET_H
35806# include <socket.h>
35807#endif
35808/* includes end */"
Elliott Hughesf344baa2021-12-07 09:12:34 -080035809 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_socket
Elliott Hughes82be86d2017-09-20 17:00:17 -070035810"
Elliott Hughesf344baa2021-12-07 09:12:34 -080035811if test "x$ac_cv_header_sys_types_h" = xyes
35812then :
35813 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035814
35815fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035816ac_fn_c_check_header_compile "$LINENO" "socket.h" "ac_cv_header_socket_h" "$curl_includes_socket
35817"
35818if test "x$ac_cv_header_socket_h" = xyes
35819then :
35820 printf "%s\n" "#define HAVE_SOCKET_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035821
Elliott Hughesf344baa2021-12-07 09:12:34 -080035822fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070035823
35824
35825
35826 #
35827 tst_links_closesocket="unknown"
35828 tst_proto_closesocket="unknown"
35829 tst_compi_closesocket="unknown"
35830 tst_allow_closesocket="unknown"
35831 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080035832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if closesocket can be linked" >&5
35833printf %s "checking if closesocket can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35835/* end confdefs.h. */
35836
35837
35838 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070035839 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070035840 $curl_includes_socket
35841
35842int main (void)
35843{
35844
35845 if(0 != closesocket(0))
35846 return 1;
35847
35848 ;
35849 return 0;
35850}
35851
35852_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080035853if ac_fn_c_try_link "$LINENO"
35854then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070035855
Elliott Hughesf344baa2021-12-07 09:12:34 -080035856 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35857printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035858 tst_links_closesocket="yes"
35859
Elliott Hughesf344baa2021-12-07 09:12:34 -080035860else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070035861
Elliott Hughesf344baa2021-12-07 09:12:34 -080035862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
35863printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035864 tst_links_closesocket="no"
35865
35866fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035867rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070035868 conftest$ac_exeext conftest.$ac_ext
35869 #
35870 if test "$tst_links_closesocket" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080035871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if closesocket is prototyped" >&5
35872printf %s "checking if closesocket is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35874/* end confdefs.h. */
35875
35876 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070035877 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070035878 $curl_includes_socket
35879
35880_ACEOF
35881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080035882 $EGREP "closesocket" >/dev/null 2>&1
35883then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070035884
Elliott Hughesf344baa2021-12-07 09:12:34 -080035885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35886printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035887 tst_proto_closesocket="yes"
35888
Elliott Hughesf344baa2021-12-07 09:12:34 -080035889else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070035890
Elliott Hughesf344baa2021-12-07 09:12:34 -080035891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
35892printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035893 tst_proto_closesocket="no"
35894
35895fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035896rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070035897
35898 fi
35899 #
35900 if test "$tst_proto_closesocket" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080035901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if closesocket is compilable" >&5
35902printf %s "checking if closesocket is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35904/* end confdefs.h. */
35905
35906
35907 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070035908 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070035909 $curl_includes_socket
35910
35911int main (void)
35912{
35913
35914 if(0 != closesocket(0))
35915 return 1;
35916
35917 ;
35918 return 0;
35919}
35920
35921_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080035922if ac_fn_c_try_compile "$LINENO"
35923then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070035924
Elliott Hughesf344baa2021-12-07 09:12:34 -080035925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35926printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035927 tst_compi_closesocket="yes"
35928
Elliott Hughesf344baa2021-12-07 09:12:34 -080035929else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070035930
Elliott Hughesf344baa2021-12-07 09:12:34 -080035931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
35932printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035933 tst_compi_closesocket="no"
35934
35935fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035936rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070035937 fi
35938 #
35939 if test "$tst_compi_closesocket" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080035940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if closesocket usage allowed" >&5
35941printf %s "checking if closesocket usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035942 if test "x$curl_disallow_closesocket" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080035943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35944printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035945 tst_allow_closesocket="yes"
35946 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080035947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
35948printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035949 tst_allow_closesocket="no"
35950 fi
35951 fi
35952 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080035953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if closesocket might be used" >&5
35954printf %s "checking if closesocket might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035955 if test "$tst_links_closesocket" = "yes" &&
35956 test "$tst_proto_closesocket" = "yes" &&
35957 test "$tst_compi_closesocket" = "yes" &&
35958 test "$tst_allow_closesocket" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080035959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35960printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035961
Elliott Hughesf344baa2021-12-07 09:12:34 -080035962printf "%s\n" "#define HAVE_CLOSESOCKET 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070035963
35964 curl_cv_func_closesocket="yes"
35965 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080035966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
35967printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070035968 curl_cv_func_closesocket="no"
35969 fi
35970
35971
Elliott Hughesa93fb052018-12-12 14:22:48 -080035972curl_includes_sys_socket="\
35973/* includes start */
35974#ifdef HAVE_SYS_TYPES_H
35975# include <sys/types.h>
35976#endif
35977#ifdef HAVE_SYS_SOCKET_H
35978# include <sys/socket.h>
35979#endif
35980/* includes end */"
Elliott Hughesf344baa2021-12-07 09:12:34 -080035981 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_sys_socket
Elliott Hughesa93fb052018-12-12 14:22:48 -080035982"
Elliott Hughesf344baa2021-12-07 09:12:34 -080035983if test "x$ac_cv_header_sys_types_h" = xyes
35984then :
35985 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
Elliott Hughesa93fb052018-12-12 14:22:48 -080035986
35987fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080035988ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$curl_includes_sys_socket
35989"
35990if test "x$ac_cv_header_sys_socket_h" = xyes
35991then :
35992 printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
Elliott Hughesa93fb052018-12-12 14:22:48 -080035993
Elliott Hughesf344baa2021-12-07 09:12:34 -080035994fi
Elliott Hughesa93fb052018-12-12 14:22:48 -080035995
35996
35997
Elliott Hughes82be86d2017-09-20 17:00:17 -070035998 #
35999 tst_links_closesocket_camel="unknown"
36000 tst_proto_closesocket_camel="unknown"
36001 tst_compi_closesocket_camel="unknown"
36002 tst_allow_closesocket_camel="unknown"
36003 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080036004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if CloseSocket can be linked" >&5
36005printf %s "checking if CloseSocket can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36007/* end confdefs.h. */
36008
36009
36010 $curl_includes_sys_socket
36011
36012int main (void)
36013{
36014
36015 if(0 != CloseSocket(0))
36016 return 1;
36017
36018 ;
36019 return 0;
36020}
36021
36022_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080036023if ac_fn_c_try_link "$LINENO"
36024then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070036025
Elliott Hughesf344baa2021-12-07 09:12:34 -080036026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36027printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036028 tst_links_closesocket_camel="yes"
36029
Elliott Hughesf344baa2021-12-07 09:12:34 -080036030else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070036031
Elliott Hughesf344baa2021-12-07 09:12:34 -080036032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36033printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036034 tst_links_closesocket_camel="no"
36035
36036fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036037rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070036038 conftest$ac_exeext conftest.$ac_ext
36039 #
36040 if test "$tst_links_closesocket_camel" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if CloseSocket is prototyped" >&5
36042printf %s "checking if CloseSocket is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36044/* end confdefs.h. */
36045
36046 $curl_includes_sys_socket
36047
36048_ACEOF
36049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080036050 $EGREP "CloseSocket" >/dev/null 2>&1
36051then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070036052
Elliott Hughesf344baa2021-12-07 09:12:34 -080036053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36054printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036055 tst_proto_closesocket_camel="yes"
36056
Elliott Hughesf344baa2021-12-07 09:12:34 -080036057else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070036058
Elliott Hughesf344baa2021-12-07 09:12:34 -080036059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36060printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036061 tst_proto_closesocket_camel="no"
36062
36063fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036064rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070036065
36066 fi
36067 #
36068 if test "$tst_proto_closesocket_camel" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if CloseSocket is compilable" >&5
36070printf %s "checking if CloseSocket is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36072/* end confdefs.h. */
36073
36074
36075 $curl_includes_sys_socket
36076
36077int main (void)
36078{
36079
36080 if(0 != CloseSocket(0))
36081 return 1;
36082
36083 ;
36084 return 0;
36085}
36086
36087_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080036088if ac_fn_c_try_compile "$LINENO"
36089then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070036090
Elliott Hughesf344baa2021-12-07 09:12:34 -080036091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36092printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036093 tst_compi_closesocket_camel="yes"
36094
Elliott Hughesf344baa2021-12-07 09:12:34 -080036095else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070036096
Elliott Hughesf344baa2021-12-07 09:12:34 -080036097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36098printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036099 tst_compi_closesocket_camel="no"
36100
36101fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036102rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070036103 fi
36104 #
36105 if test "$tst_compi_closesocket_camel" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if CloseSocket usage allowed" >&5
36107printf %s "checking if CloseSocket usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036108 if test "x$curl_disallow_closesocket_camel" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36110printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036111 tst_allow_closesocket_camel="yes"
36112 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080036113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36114printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036115 tst_allow_closesocket_camel="no"
36116 fi
36117 fi
36118 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080036119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if CloseSocket might be used" >&5
36120printf %s "checking if CloseSocket might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036121 if test "$tst_links_closesocket_camel" = "yes" &&
36122 test "$tst_proto_closesocket_camel" = "yes" &&
36123 test "$tst_compi_closesocket_camel" = "yes" &&
36124 test "$tst_allow_closesocket_camel" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36126printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036127
Elliott Hughesf344baa2021-12-07 09:12:34 -080036128printf "%s\n" "#define HAVE_CLOSESOCKET_CAMEL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070036129
36130 curl_cv_func_closesocket_camel="yes"
36131 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080036132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36133printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036134 curl_cv_func_closesocket_camel="no"
36135 fi
36136
36137
36138 #
36139 tst_links_connect="unknown"
36140 tst_proto_connect="unknown"
36141 tst_compi_connect="unknown"
36142 tst_allow_connect="unknown"
36143 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080036144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if connect can be linked" >&5
36145printf %s "checking if connect can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36147/* end confdefs.h. */
36148
36149
36150 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070036151 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070036152 $curl_includes_sys_socket
36153 $curl_includes_socket
36154
36155int main (void)
36156{
36157
36158 if(0 != connect(0, 0, 0))
36159 return 1;
36160
36161 ;
36162 return 0;
36163}
36164
36165_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080036166if ac_fn_c_try_link "$LINENO"
36167then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070036168
Elliott Hughesf344baa2021-12-07 09:12:34 -080036169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36170printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036171 tst_links_connect="yes"
36172
Elliott Hughesf344baa2021-12-07 09:12:34 -080036173else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070036174
Elliott Hughesf344baa2021-12-07 09:12:34 -080036175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36176printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036177 tst_links_connect="no"
36178
36179fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036180rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070036181 conftest$ac_exeext conftest.$ac_ext
36182 #
36183 if test "$tst_links_connect" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if connect is prototyped" >&5
36185printf %s "checking if connect is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36187/* end confdefs.h. */
36188
36189 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070036190 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070036191 $curl_includes_sys_socket
36192 $curl_includes_socket
36193
36194_ACEOF
36195if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080036196 $EGREP "connect" >/dev/null 2>&1
36197then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070036198
Elliott Hughesf344baa2021-12-07 09:12:34 -080036199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36200printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036201 tst_proto_connect="yes"
36202
Elliott Hughesf344baa2021-12-07 09:12:34 -080036203else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070036204
Elliott Hughesf344baa2021-12-07 09:12:34 -080036205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36206printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036207 tst_proto_connect="no"
36208
36209fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036210rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070036211
36212 fi
36213 #
36214 if test "$tst_proto_connect" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if connect is compilable" >&5
36216printf %s "checking if connect is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36218/* end confdefs.h. */
36219
36220
36221 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070036222 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070036223 $curl_includes_sys_socket
36224 $curl_includes_socket
36225
36226int main (void)
36227{
36228
36229 if(0 != connect(0, 0, 0))
36230 return 1;
36231
36232 ;
36233 return 0;
36234}
36235
36236_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080036237if ac_fn_c_try_compile "$LINENO"
36238then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070036239
Elliott Hughesf344baa2021-12-07 09:12:34 -080036240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36241printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036242 tst_compi_connect="yes"
36243
Elliott Hughesf344baa2021-12-07 09:12:34 -080036244else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070036245
Elliott Hughesf344baa2021-12-07 09:12:34 -080036246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36247printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036248 tst_compi_connect="no"
36249
36250fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036251rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070036252 fi
36253 #
36254 if test "$tst_compi_connect" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if connect usage allowed" >&5
36256printf %s "checking if connect usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036257 if test "x$curl_disallow_connect" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36259printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036260 tst_allow_connect="yes"
36261 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080036262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36263printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036264 tst_allow_connect="no"
36265 fi
36266 fi
36267 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080036268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if connect might be used" >&5
36269printf %s "checking if connect might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036270 if test "$tst_links_connect" = "yes" &&
36271 test "$tst_proto_connect" = "yes" &&
36272 test "$tst_compi_connect" = "yes" &&
36273 test "$tst_allow_connect" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36275printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036276
Elliott Hughesf344baa2021-12-07 09:12:34 -080036277printf "%s\n" "#define HAVE_CONNECT 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070036278
36279 curl_cv_func_connect="yes"
36280 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080036281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36282printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036283 curl_cv_func_connect="no"
36284 fi
36285
36286
36287curl_includes_fcntl="\
36288/* includes start */
36289#ifdef HAVE_SYS_TYPES_H
36290# include <sys/types.h>
36291#endif
36292#ifdef HAVE_UNISTD_H
36293# include <unistd.h>
36294#endif
36295#ifdef HAVE_FCNTL_H
36296# include <fcntl.h>
36297#endif
36298/* includes end */"
Elliott Hughesf344baa2021-12-07 09:12:34 -080036299 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_fcntl
Elliott Hughes82be86d2017-09-20 17:00:17 -070036300"
Elliott Hughesf344baa2021-12-07 09:12:34 -080036301if test "x$ac_cv_header_sys_types_h" = xyes
36302then :
36303 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070036304
36305fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036306ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$curl_includes_fcntl
36307"
36308if test "x$ac_cv_header_unistd_h" = xyes
36309then :
36310 printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070036311
Elliott Hughesf344baa2021-12-07 09:12:34 -080036312fi
36313ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$curl_includes_fcntl
36314"
36315if test "x$ac_cv_header_fcntl_h" = xyes
36316then :
36317 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
36318
36319fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070036320
36321
36322
36323 #
36324 tst_links_fcntl="unknown"
36325 tst_proto_fcntl="unknown"
36326 tst_compi_fcntl="unknown"
36327 tst_allow_fcntl="unknown"
36328 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080036329 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if fcntl can be linked" >&5
36330printf %s "checking if fcntl can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36332/* end confdefs.h. */
36333
36334
36335#define fcntl innocuous_fcntl
36336#ifdef __STDC__
36337# include <limits.h>
36338#else
36339# include <assert.h>
36340#endif
36341#undef fcntl
36342#ifdef __cplusplus
36343extern "C"
36344#endif
36345char fcntl ();
36346#if defined __stub_fcntl || defined __stub___fcntl
36347choke me
36348#endif
36349
36350int main (void)
36351{
36352return fcntl ();
36353 ;
36354 return 0;
36355}
36356
36357_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080036358if ac_fn_c_try_link "$LINENO"
36359then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070036360
Elliott Hughesf344baa2021-12-07 09:12:34 -080036361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36362printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036363 tst_links_fcntl="yes"
36364
Elliott Hughesf344baa2021-12-07 09:12:34 -080036365else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070036366
Elliott Hughesf344baa2021-12-07 09:12:34 -080036367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36368printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036369 tst_links_fcntl="no"
36370
36371fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036372rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070036373 conftest$ac_exeext conftest.$ac_ext
36374 #
36375 if test "$tst_links_fcntl" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if fcntl is prototyped" >&5
36377printf %s "checking if fcntl is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36379/* end confdefs.h. */
36380
36381 $curl_includes_fcntl
36382
36383_ACEOF
36384if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080036385 $EGREP "fcntl" >/dev/null 2>&1
36386then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070036387
Elliott Hughesf344baa2021-12-07 09:12:34 -080036388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36389printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036390 tst_proto_fcntl="yes"
36391
Elliott Hughesf344baa2021-12-07 09:12:34 -080036392else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070036393
Elliott Hughesf344baa2021-12-07 09:12:34 -080036394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36395printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036396 tst_proto_fcntl="no"
36397
36398fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036399rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070036400
36401 fi
36402 #
36403 if test "$tst_proto_fcntl" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if fcntl is compilable" >&5
36405printf %s "checking if fcntl is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36407/* end confdefs.h. */
36408
36409
36410 $curl_includes_fcntl
36411
36412int main (void)
36413{
36414
36415 if(0 != fcntl(0, 0, 0))
36416 return 1;
36417
36418 ;
36419 return 0;
36420}
36421
36422_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080036423if ac_fn_c_try_compile "$LINENO"
36424then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070036425
Elliott Hughesf344baa2021-12-07 09:12:34 -080036426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36427printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036428 tst_compi_fcntl="yes"
36429
Elliott Hughesf344baa2021-12-07 09:12:34 -080036430else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070036431
Elliott Hughesf344baa2021-12-07 09:12:34 -080036432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36433printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036434 tst_compi_fcntl="no"
36435
36436fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036437rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070036438 fi
36439 #
36440 if test "$tst_compi_fcntl" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if fcntl usage allowed" >&5
36442printf %s "checking if fcntl usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036443 if test "x$curl_disallow_fcntl" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36445printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036446 tst_allow_fcntl="yes"
36447 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080036448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36449printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036450 tst_allow_fcntl="no"
36451 fi
36452 fi
36453 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080036454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if fcntl might be used" >&5
36455printf %s "checking if fcntl might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036456 if test "$tst_links_fcntl" = "yes" &&
36457 test "$tst_proto_fcntl" = "yes" &&
36458 test "$tst_compi_fcntl" = "yes" &&
36459 test "$tst_allow_fcntl" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36461printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036462
Elliott Hughesf344baa2021-12-07 09:12:34 -080036463printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070036464
36465 curl_cv_func_fcntl="yes"
36466
36467 #
36468 tst_compi_fcntl_o_nonblock="unknown"
36469 tst_allow_fcntl_o_nonblock="unknown"
36470 #
36471 case $host_os in
36472 sunos4* | aix3* | beos*)
36473 curl_disallow_fcntl_o_nonblock="yes"
36474 ;;
36475 esac
36476 #
36477 if test "$curl_cv_func_fcntl" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if fcntl O_NONBLOCK is compilable" >&5
36479printf %s "checking if fcntl O_NONBLOCK is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36481/* end confdefs.h. */
36482
36483
36484 $curl_includes_fcntl
36485
36486int main (void)
36487{
36488
36489 int flags = 0;
36490 if(0 != fcntl(0, F_SETFL, flags | O_NONBLOCK))
36491 return 1;
36492
36493 ;
36494 return 0;
36495}
36496
36497_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080036498if ac_fn_c_try_compile "$LINENO"
36499then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070036500
Elliott Hughesf344baa2021-12-07 09:12:34 -080036501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36502printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036503 tst_compi_fcntl_o_nonblock="yes"
36504
Elliott Hughesf344baa2021-12-07 09:12:34 -080036505else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070036506
Elliott Hughesf344baa2021-12-07 09:12:34 -080036507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36508printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036509 tst_compi_fcntl_o_nonblock="no"
36510
36511fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036512rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070036513 fi
36514 #
36515 if test "$tst_compi_fcntl_o_nonblock" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if fcntl O_NONBLOCK usage allowed" >&5
36517printf %s "checking if fcntl O_NONBLOCK usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036518 if test "x$curl_disallow_fcntl_o_nonblock" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36520printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036521 tst_allow_fcntl_o_nonblock="yes"
36522 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080036523 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36524printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036525 tst_allow_fcntl_o_nonblock="no"
36526 fi
36527 fi
36528 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080036529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if fcntl O_NONBLOCK might be used" >&5
36530printf %s "checking if fcntl O_NONBLOCK might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036531 if test "$tst_compi_fcntl_o_nonblock" = "yes" &&
36532 test "$tst_allow_fcntl_o_nonblock" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36534printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036535
Elliott Hughesf344baa2021-12-07 09:12:34 -080036536printf "%s\n" "#define HAVE_FCNTL_O_NONBLOCK 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070036537
36538 curl_cv_func_fcntl_o_nonblock="yes"
36539 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080036540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36541printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036542 curl_cv_func_fcntl_o_nonblock="no"
36543 fi
36544
36545 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080036546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36547printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036548 curl_cv_func_fcntl="no"
36549 fi
36550
36551
Elliott Hughesa93fb052018-12-12 14:22:48 -080036552curl_includes_ws2tcpip="\
36553/* includes start */
36554#ifdef HAVE_WINDOWS_H
36555# ifndef WIN32_LEAN_AND_MEAN
36556# define WIN32_LEAN_AND_MEAN
36557# endif
36558# include <windows.h>
36559# ifdef HAVE_WINSOCK2_H
36560# include <winsock2.h>
36561# ifdef HAVE_WS2TCPIP_H
36562# include <ws2tcpip.h>
36563# endif
36564# endif
36565#endif
36566/* includes end */"
36567
Elliott Hughesf344baa2021-12-07 09:12:34 -080036568 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for windows.h" >&5
36569printf %s "checking for windows.h... " >&6; }
36570if test ${curl_cv_header_windows_h+y}
36571then :
36572 printf %s "(cached) " >&6
36573else $as_nop
Elliott Hughesa93fb052018-12-12 14:22:48 -080036574
36575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36576/* end confdefs.h. */
36577
36578
36579#undef inline
36580#ifndef WIN32_LEAN_AND_MEAN
36581#define WIN32_LEAN_AND_MEAN
36582#endif
36583#include <windows.h>
36584
36585int main (void)
36586{
36587
36588#if defined(__CYGWIN__) || defined(__CEGCC__)
36589 HAVE_WINDOWS_H shall not be defined.
36590#else
36591 int dummy=2*WINVER;
36592#endif
36593
36594 ;
36595 return 0;
36596}
36597
36598_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080036599if ac_fn_c_try_compile "$LINENO"
36600then :
Elliott Hughesa93fb052018-12-12 14:22:48 -080036601
36602 curl_cv_header_windows_h="yes"
36603
Elliott Hughesf344baa2021-12-07 09:12:34 -080036604else $as_nop
Elliott Hughesa93fb052018-12-12 14:22:48 -080036605
36606 curl_cv_header_windows_h="no"
36607
36608fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036609rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughesa93fb052018-12-12 14:22:48 -080036610
36611fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036612{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_windows_h" >&5
36613printf "%s\n" "$curl_cv_header_windows_h" >&6; }
Elliott Hughesa93fb052018-12-12 14:22:48 -080036614 case "$curl_cv_header_windows_h" in
36615 yes)
36616
Elliott Hughesf344baa2021-12-07 09:12:34 -080036617printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h
Elliott Hughesa93fb052018-12-12 14:22:48 -080036618
36619 ;;
36620 esac
36621
36622
Elliott Hughesf344baa2021-12-07 09:12:34 -080036623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for winsock2.h" >&5
36624printf %s "checking for winsock2.h... " >&6; }
36625if test ${curl_cv_header_winsock2_h+y}
36626then :
36627 printf %s "(cached) " >&6
36628else $as_nop
Elliott Hughesa93fb052018-12-12 14:22:48 -080036629
36630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36631/* end confdefs.h. */
36632
36633
36634#undef inline
36635#ifndef WIN32_LEAN_AND_MEAN
36636#define WIN32_LEAN_AND_MEAN
36637#endif
36638#include <windows.h>
36639#include <winsock2.h>
36640
36641int main (void)
36642{
36643
36644#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__)
36645 HAVE_WINSOCK2_H shall not be defined.
36646#else
36647 int dummy=2*IPPROTO_ESP;
36648#endif
36649
36650 ;
36651 return 0;
36652}
36653
36654_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080036655if ac_fn_c_try_compile "$LINENO"
36656then :
Elliott Hughesa93fb052018-12-12 14:22:48 -080036657
36658 curl_cv_header_winsock2_h="yes"
36659
Elliott Hughesf344baa2021-12-07 09:12:34 -080036660else $as_nop
Elliott Hughesa93fb052018-12-12 14:22:48 -080036661
36662 curl_cv_header_winsock2_h="no"
36663
36664fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036665rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughesa93fb052018-12-12 14:22:48 -080036666
36667fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036668{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winsock2_h" >&5
36669printf "%s\n" "$curl_cv_header_winsock2_h" >&6; }
Elliott Hughesa93fb052018-12-12 14:22:48 -080036670 case "$curl_cv_header_winsock2_h" in
36671 yes)
36672
Elliott Hughesf344baa2021-12-07 09:12:34 -080036673printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
Elliott Hughesa93fb052018-12-12 14:22:48 -080036674
36675 ;;
36676 esac
36677
36678
Elliott Hughesf344baa2021-12-07 09:12:34 -080036679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ws2tcpip.h" >&5
36680printf %s "checking for ws2tcpip.h... " >&6; }
36681if test ${curl_cv_header_ws2tcpip_h+y}
36682then :
36683 printf %s "(cached) " >&6
36684else $as_nop
Elliott Hughesa93fb052018-12-12 14:22:48 -080036685
36686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36687/* end confdefs.h. */
36688
36689
36690#undef inline
36691#ifndef WIN32_LEAN_AND_MEAN
36692#define WIN32_LEAN_AND_MEAN
36693#endif
36694#include <windows.h>
36695#include <winsock2.h>
36696#include <ws2tcpip.h>
36697
36698int main (void)
36699{
36700
36701#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__)
36702 HAVE_WS2TCPIP_H shall not be defined.
36703#else
36704 int dummy=2*IP_PKTINFO;
36705#endif
36706
36707 ;
36708 return 0;
36709}
36710
36711_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080036712if ac_fn_c_try_compile "$LINENO"
36713then :
Elliott Hughesa93fb052018-12-12 14:22:48 -080036714
36715 curl_cv_header_ws2tcpip_h="yes"
36716
Elliott Hughesf344baa2021-12-07 09:12:34 -080036717else $as_nop
Elliott Hughesa93fb052018-12-12 14:22:48 -080036718
36719 curl_cv_header_ws2tcpip_h="no"
36720
36721fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036722rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughesa93fb052018-12-12 14:22:48 -080036723
36724fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036725{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_ws2tcpip_h" >&5
36726printf "%s\n" "$curl_cv_header_ws2tcpip_h" >&6; }
Elliott Hughesa93fb052018-12-12 14:22:48 -080036727 case "$curl_cv_header_ws2tcpip_h" in
36728 yes)
36729
Elliott Hughesf344baa2021-12-07 09:12:34 -080036730printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
Elliott Hughesa93fb052018-12-12 14:22:48 -080036731
36732 ;;
36733 esac
36734
36735
36736
Elliott Hughes82be86d2017-09-20 17:00:17 -070036737curl_includes_netdb="\
36738/* includes start */
36739#ifdef HAVE_SYS_TYPES_H
36740# include <sys/types.h>
36741#endif
36742#ifdef HAVE_NETDB_H
36743# include <netdb.h>
36744#endif
36745/* includes end */"
Elliott Hughesf344baa2021-12-07 09:12:34 -080036746 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_netdb
Elliott Hughes82be86d2017-09-20 17:00:17 -070036747"
Elliott Hughesf344baa2021-12-07 09:12:34 -080036748if test "x$ac_cv_header_sys_types_h" = xyes
36749then :
36750 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070036751
36752fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036753ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$curl_includes_netdb
36754"
36755if test "x$ac_cv_header_netdb_h" = xyes
36756then :
36757 printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070036758
Elliott Hughesf344baa2021-12-07 09:12:34 -080036759fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070036760
36761
36762
36763 #
36764 tst_links_freeaddrinfo="unknown"
36765 tst_proto_freeaddrinfo="unknown"
36766 tst_compi_freeaddrinfo="unknown"
36767 tst_allow_freeaddrinfo="unknown"
36768 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080036769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if freeaddrinfo can be linked" >&5
36770printf %s "checking if freeaddrinfo can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36772/* end confdefs.h. */
36773
36774
36775 $curl_includes_ws2tcpip
36776 $curl_includes_sys_socket
36777 $curl_includes_netdb
36778
36779int main (void)
36780{
36781
36782 freeaddrinfo(0);
36783
36784 ;
36785 return 0;
36786}
36787
36788_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080036789if ac_fn_c_try_link "$LINENO"
36790then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070036791
Elliott Hughesf344baa2021-12-07 09:12:34 -080036792 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36793printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036794 tst_links_freeaddrinfo="yes"
36795
Elliott Hughesf344baa2021-12-07 09:12:34 -080036796else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070036797
Elliott Hughesf344baa2021-12-07 09:12:34 -080036798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36799printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036800 tst_links_freeaddrinfo="no"
36801
36802fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036803rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070036804 conftest$ac_exeext conftest.$ac_ext
36805 #
36806 if test "$tst_links_freeaddrinfo" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if freeaddrinfo is prototyped" >&5
36808printf %s "checking if freeaddrinfo is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36810/* end confdefs.h. */
36811
36812 $curl_includes_ws2tcpip
36813 $curl_includes_sys_socket
36814 $curl_includes_netdb
36815
36816_ACEOF
36817if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080036818 $EGREP "freeaddrinfo" >/dev/null 2>&1
36819then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070036820
Elliott Hughesf344baa2021-12-07 09:12:34 -080036821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36822printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036823 tst_proto_freeaddrinfo="yes"
36824
Elliott Hughesf344baa2021-12-07 09:12:34 -080036825else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070036826
Elliott Hughesf344baa2021-12-07 09:12:34 -080036827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36828printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036829 tst_proto_freeaddrinfo="no"
36830
36831fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036832rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070036833
36834 fi
36835 #
36836 if test "$tst_proto_freeaddrinfo" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if freeaddrinfo is compilable" >&5
36838printf %s "checking if freeaddrinfo is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36840/* end confdefs.h. */
36841
36842
36843 $curl_includes_ws2tcpip
36844 $curl_includes_sys_socket
36845 $curl_includes_netdb
36846
36847int main (void)
36848{
36849
36850 freeaddrinfo(0);
36851
36852 ;
36853 return 0;
36854}
36855
36856_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080036857if ac_fn_c_try_compile "$LINENO"
36858then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070036859
Elliott Hughesf344baa2021-12-07 09:12:34 -080036860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36861printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036862 tst_compi_freeaddrinfo="yes"
36863
Elliott Hughesf344baa2021-12-07 09:12:34 -080036864else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070036865
Elliott Hughesf344baa2021-12-07 09:12:34 -080036866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36867printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036868 tst_compi_freeaddrinfo="no"
36869
36870fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036871rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070036872 fi
36873 #
36874 if test "$tst_compi_freeaddrinfo" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if freeaddrinfo usage allowed" >&5
36876printf %s "checking if freeaddrinfo usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036877 if test "x$curl_disallow_freeaddrinfo" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36879printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036880 tst_allow_freeaddrinfo="yes"
36881 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080036882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36883printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036884 tst_allow_freeaddrinfo="no"
36885 fi
36886 fi
36887 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080036888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if freeaddrinfo might be used" >&5
36889printf %s "checking if freeaddrinfo might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036890 if test "$tst_links_freeaddrinfo" = "yes" &&
36891 test "$tst_proto_freeaddrinfo" = "yes" &&
36892 test "$tst_compi_freeaddrinfo" = "yes" &&
36893 test "$tst_allow_freeaddrinfo" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36895printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036896
Elliott Hughesf344baa2021-12-07 09:12:34 -080036897printf "%s\n" "#define HAVE_FREEADDRINFO 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070036898
36899 curl_cv_func_freeaddrinfo="yes"
36900 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080036901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36902printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036903 curl_cv_func_freeaddrinfo="no"
36904 fi
36905
36906
Elliott Hughes82be86d2017-09-20 17:00:17 -070036907curl_includes_sys_xattr="\
36908/* includes start */
36909#ifdef HAVE_SYS_TYPES_H
36910# include <sys/types.h>
36911#endif
36912#ifdef HAVE_SYS_XATTR_H
36913# include <sys/xattr.h>
36914#endif
36915/* includes end */"
Elliott Hughesf344baa2021-12-07 09:12:34 -080036916 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_sys_xattr
Elliott Hughes82be86d2017-09-20 17:00:17 -070036917"
Elliott Hughesf344baa2021-12-07 09:12:34 -080036918if test "x$ac_cv_header_sys_types_h" = xyes
36919then :
36920 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070036921
36922fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036923ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$curl_includes_sys_xattr
36924"
36925if test "x$ac_cv_header_sys_xattr_h" = xyes
36926then :
36927 printf "%s\n" "#define HAVE_SYS_XATTR_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070036928
Elliott Hughesf344baa2021-12-07 09:12:34 -080036929fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070036930
36931
36932
36933 #
36934 tst_links_fsetxattr="unknown"
36935 tst_proto_fsetxattr="unknown"
36936 tst_compi_fsetxattr="unknown"
36937 tst_allow_fsetxattr="unknown"
36938 tst_nargs_fsetxattr="unknown"
36939 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080036940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if fsetxattr can be linked" >&5
36941printf %s "checking if fsetxattr can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36943/* end confdefs.h. */
36944
36945
36946#define fsetxattr innocuous_fsetxattr
36947#ifdef __STDC__
36948# include <limits.h>
36949#else
36950# include <assert.h>
36951#endif
36952#undef fsetxattr
36953#ifdef __cplusplus
36954extern "C"
36955#endif
36956char fsetxattr ();
36957#if defined __stub_fsetxattr || defined __stub___fsetxattr
36958choke me
36959#endif
36960
36961int main (void)
36962{
36963return fsetxattr ();
36964 ;
36965 return 0;
36966}
36967
36968_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080036969if ac_fn_c_try_link "$LINENO"
36970then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070036971
Elliott Hughesf344baa2021-12-07 09:12:34 -080036972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36973printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036974 tst_links_fsetxattr="yes"
36975
Elliott Hughesf344baa2021-12-07 09:12:34 -080036976else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070036977
Elliott Hughesf344baa2021-12-07 09:12:34 -080036978 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36979printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036980 tst_links_fsetxattr="no"
36981
36982fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080036983rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070036984 conftest$ac_exeext conftest.$ac_ext
36985 #
36986 if test "$tst_links_fsetxattr" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080036987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if fsetxattr is prototyped" >&5
36988printf %s "checking if fsetxattr is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070036989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36990/* end confdefs.h. */
36991
36992 $curl_includes_sys_xattr
36993
36994_ACEOF
36995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080036996 $EGREP "fsetxattr" >/dev/null 2>&1
36997then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070036998
Elliott Hughesf344baa2021-12-07 09:12:34 -080036999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37000printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037001 tst_proto_fsetxattr="yes"
37002
Elliott Hughesf344baa2021-12-07 09:12:34 -080037003else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037004
Elliott Hughesf344baa2021-12-07 09:12:34 -080037005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37006printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037007 tst_proto_fsetxattr="no"
37008
37009fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037010rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070037011
37012 fi
37013 #
37014 if test "$tst_proto_fsetxattr" = "yes"; then
37015 if test "$tst_nargs_fsetxattr" = "unknown"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if fsetxattr takes 5 args." >&5
37017printf %s "checking if fsetxattr takes 5 args.... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37019/* end confdefs.h. */
37020
37021
37022 $curl_includes_sys_xattr
37023
37024int main (void)
37025{
37026
37027 if(0 != fsetxattr(0, 0, 0, 0, 0))
37028 return 1;
37029
37030 ;
37031 return 0;
37032}
37033
37034_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080037035if ac_fn_c_try_compile "$LINENO"
37036then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070037037
Elliott Hughesf344baa2021-12-07 09:12:34 -080037038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37039printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037040 tst_compi_fsetxattr="yes"
37041 tst_nargs_fsetxattr="5"
37042
Elliott Hughesf344baa2021-12-07 09:12:34 -080037043else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037044
Elliott Hughesf344baa2021-12-07 09:12:34 -080037045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37046printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037047 tst_compi_fsetxattr="no"
37048
37049fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037050rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070037051 fi
37052 if test "$tst_nargs_fsetxattr" = "unknown"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if fsetxattr takes 6 args." >&5
37054printf %s "checking if fsetxattr takes 6 args.... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37056/* end confdefs.h. */
37057
37058
37059 $curl_includes_sys_xattr
37060
37061int main (void)
37062{
37063
37064 if(0 != fsetxattr(0, 0, 0, 0, 0, 0))
37065 return 1;
37066
37067 ;
37068 return 0;
37069}
37070
37071_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080037072if ac_fn_c_try_compile "$LINENO"
37073then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070037074
Elliott Hughesf344baa2021-12-07 09:12:34 -080037075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37076printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037077 tst_compi_fsetxattr="yes"
37078 tst_nargs_fsetxattr="6"
37079
Elliott Hughesf344baa2021-12-07 09:12:34 -080037080else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037081
Elliott Hughesf344baa2021-12-07 09:12:34 -080037082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37083printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037084 tst_compi_fsetxattr="no"
37085
37086fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037087rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070037088 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if fsetxattr is compilable" >&5
37090printf %s "checking if fsetxattr is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037091 if test "$tst_compi_fsetxattr" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37093printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037094 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080037095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37096printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037097 fi
37098 fi
37099 #
37100 if test "$tst_compi_fsetxattr" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if fsetxattr usage allowed" >&5
37102printf %s "checking if fsetxattr usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037103 if test "x$curl_disallow_fsetxattr" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37105printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037106 tst_allow_fsetxattr="yes"
37107 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080037108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37109printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037110 tst_allow_fsetxattr="no"
37111 fi
37112 fi
37113 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080037114 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if fsetxattr might be used" >&5
37115printf %s "checking if fsetxattr might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037116 if test "$tst_links_fsetxattr" = "yes" &&
37117 test "$tst_proto_fsetxattr" = "yes" &&
37118 test "$tst_compi_fsetxattr" = "yes" &&
37119 test "$tst_allow_fsetxattr" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37121printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037122
Elliott Hughesf344baa2021-12-07 09:12:34 -080037123printf "%s\n" "#define HAVE_FSETXATTR 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070037124
37125 #
37126 if test "$tst_nargs_fsetxattr" -eq "5"; then
37127
Elliott Hughesf344baa2021-12-07 09:12:34 -080037128printf "%s\n" "#define HAVE_FSETXATTR_5 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070037129
37130 elif test "$tst_nargs_fsetxattr" -eq "6"; then
37131
Elliott Hughesf344baa2021-12-07 09:12:34 -080037132printf "%s\n" "#define HAVE_FSETXATTR_6 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070037133
37134 fi
37135 #
37136 curl_cv_func_fsetxattr="yes"
37137 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080037138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37139printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037140 curl_cv_func_fsetxattr="no"
37141 fi
37142
37143
37144 #
37145 tst_links_ftruncate="unknown"
37146 tst_proto_ftruncate="unknown"
37147 tst_compi_ftruncate="unknown"
37148 tst_allow_ftruncate="unknown"
37149 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080037150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ftruncate can be linked" >&5
37151printf %s "checking if ftruncate can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37153/* end confdefs.h. */
37154
37155
37156#define ftruncate innocuous_ftruncate
37157#ifdef __STDC__
37158# include <limits.h>
37159#else
37160# include <assert.h>
37161#endif
37162#undef ftruncate
37163#ifdef __cplusplus
37164extern "C"
37165#endif
37166char ftruncate ();
37167#if defined __stub_ftruncate || defined __stub___ftruncate
37168choke me
37169#endif
37170
37171int main (void)
37172{
37173return ftruncate ();
37174 ;
37175 return 0;
37176}
37177
37178_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080037179if ac_fn_c_try_link "$LINENO"
37180then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070037181
Elliott Hughesf344baa2021-12-07 09:12:34 -080037182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37183printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037184 tst_links_ftruncate="yes"
37185
Elliott Hughesf344baa2021-12-07 09:12:34 -080037186else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037187
Elliott Hughesf344baa2021-12-07 09:12:34 -080037188 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37189printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037190 tst_links_ftruncate="no"
37191
37192fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037193rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070037194 conftest$ac_exeext conftest.$ac_ext
37195 #
37196 if test "$tst_links_ftruncate" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ftruncate is prototyped" >&5
37198printf %s "checking if ftruncate is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37200/* end confdefs.h. */
37201
37202 $curl_includes_unistd
37203
37204_ACEOF
37205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080037206 $EGREP "ftruncate" >/dev/null 2>&1
37207then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070037208
Elliott Hughesf344baa2021-12-07 09:12:34 -080037209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37210printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037211 tst_proto_ftruncate="yes"
37212
Elliott Hughesf344baa2021-12-07 09:12:34 -080037213else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037214
Elliott Hughesf344baa2021-12-07 09:12:34 -080037215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37216printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037217 tst_proto_ftruncate="no"
37218
37219fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037220rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070037221
37222 fi
37223 #
37224 if test "$tst_proto_ftruncate" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ftruncate is compilable" >&5
37226printf %s "checking if ftruncate is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37228/* end confdefs.h. */
37229
37230
37231 $curl_includes_unistd
37232
37233int main (void)
37234{
37235
37236 if(0 != ftruncate(0, 0))
37237 return 1;
37238
37239 ;
37240 return 0;
37241}
37242
37243_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080037244if ac_fn_c_try_compile "$LINENO"
37245then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070037246
Elliott Hughesf344baa2021-12-07 09:12:34 -080037247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37248printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037249 tst_compi_ftruncate="yes"
37250
Elliott Hughesf344baa2021-12-07 09:12:34 -080037251else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037252
Elliott Hughesf344baa2021-12-07 09:12:34 -080037253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37254printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037255 tst_compi_ftruncate="no"
37256
37257fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037258rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070037259 fi
37260 #
37261 if test "$tst_compi_ftruncate" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ftruncate usage allowed" >&5
37263printf %s "checking if ftruncate usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037264 if test "x$curl_disallow_ftruncate" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37266printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037267 tst_allow_ftruncate="yes"
37268 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080037269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37270printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037271 tst_allow_ftruncate="no"
37272 fi
37273 fi
37274 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080037275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ftruncate might be used" >&5
37276printf %s "checking if ftruncate might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037277 if test "$tst_links_ftruncate" = "yes" &&
37278 test "$tst_proto_ftruncate" = "yes" &&
37279 test "$tst_compi_ftruncate" = "yes" &&
37280 test "$tst_allow_ftruncate" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37282printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037283
Elliott Hughesf344baa2021-12-07 09:12:34 -080037284printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070037285
37286 curl_cv_func_ftruncate="yes"
37287 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080037288 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37289printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037290 curl_cv_func_ftruncate="no"
37291 fi
37292
37293
37294curl_includes_stdlib="\
37295/* includes start */
37296#ifdef HAVE_SYS_TYPES_H
37297# include <sys/types.h>
37298#endif
37299#ifdef HAVE_STDLIB_H
37300# include <stdlib.h>
37301#endif
37302/* includes end */"
Elliott Hughesf344baa2021-12-07 09:12:34 -080037303 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_stdlib
Elliott Hughes82be86d2017-09-20 17:00:17 -070037304"
Elliott Hughesf344baa2021-12-07 09:12:34 -080037305if test "x$ac_cv_header_sys_types_h" = xyes
37306then :
37307 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070037308
37309fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037310ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$curl_includes_stdlib
37311"
37312if test "x$ac_cv_header_stdlib_h" = xyes
37313then :
37314 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070037315
Elliott Hughesf344baa2021-12-07 09:12:34 -080037316fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070037317
37318
37319
37320 #
37321 tst_links_getaddrinfo="unknown"
37322 tst_proto_getaddrinfo="unknown"
37323 tst_compi_getaddrinfo="unknown"
37324 tst_works_getaddrinfo="unknown"
37325 tst_allow_getaddrinfo="unknown"
37326 tst_tsafe_getaddrinfo="unknown"
37327 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080037328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo can be linked" >&5
37329printf %s "checking if getaddrinfo can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37331/* end confdefs.h. */
37332
37333
37334 $curl_includes_ws2tcpip
37335 $curl_includes_sys_socket
37336 $curl_includes_netdb
37337
37338int main (void)
37339{
37340
37341 if(0 != getaddrinfo(0, 0, 0, 0))
37342 return 1;
37343
37344 ;
37345 return 0;
37346}
37347
37348_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080037349if ac_fn_c_try_link "$LINENO"
37350then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070037351
Elliott Hughesf344baa2021-12-07 09:12:34 -080037352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37353printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037354 tst_links_getaddrinfo="yes"
37355
Elliott Hughesf344baa2021-12-07 09:12:34 -080037356else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037357
Elliott Hughesf344baa2021-12-07 09:12:34 -080037358 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37359printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037360 tst_links_getaddrinfo="no"
37361
37362fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037363rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070037364 conftest$ac_exeext conftest.$ac_ext
37365 #
37366 if test "$tst_links_getaddrinfo" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo is prototyped" >&5
37368printf %s "checking if getaddrinfo is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37370/* end confdefs.h. */
37371
37372 $curl_includes_ws2tcpip
37373 $curl_includes_sys_socket
37374 $curl_includes_netdb
37375
37376_ACEOF
37377if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080037378 $EGREP "getaddrinfo" >/dev/null 2>&1
37379then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070037380
Elliott Hughesf344baa2021-12-07 09:12:34 -080037381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37382printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037383 tst_proto_getaddrinfo="yes"
37384
Elliott Hughesf344baa2021-12-07 09:12:34 -080037385else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037386
Elliott Hughesf344baa2021-12-07 09:12:34 -080037387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37388printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037389 tst_proto_getaddrinfo="no"
37390
37391fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037392rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070037393
37394 fi
37395 #
37396 if test "$tst_proto_getaddrinfo" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo is compilable" >&5
37398printf %s "checking if getaddrinfo is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37400/* end confdefs.h. */
37401
37402
37403 $curl_includes_ws2tcpip
37404 $curl_includes_sys_socket
37405 $curl_includes_netdb
37406
37407int main (void)
37408{
37409
37410 if(0 != getaddrinfo(0, 0, 0, 0))
37411 return 1;
37412
37413 ;
37414 return 0;
37415}
37416
37417_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080037418if ac_fn_c_try_compile "$LINENO"
37419then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070037420
Elliott Hughesf344baa2021-12-07 09:12:34 -080037421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37422printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037423 tst_compi_getaddrinfo="yes"
37424
Elliott Hughesf344baa2021-12-07 09:12:34 -080037425else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037426
Elliott Hughesf344baa2021-12-07 09:12:34 -080037427 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37428printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037429 tst_compi_getaddrinfo="no"
37430
37431fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037432rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070037433 fi
37434 #
37435 if test "x$cross_compiling" != "xyes" &&
37436 test "$tst_compi_getaddrinfo" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
37438printf %s "checking if getaddrinfo seems to work... " >&6; }
Elliott Hughesa93fb052018-12-12 14:22:48 -080037439
Elliott Hughesa93fb052018-12-12 14:22:48 -080037440 old=$LD_LIBRARY_PATH
37441 LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
37442 export LD_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080037443 if test "$cross_compiling" = yes
37444then :
37445 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
37446printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070037447as_fn_error $? "cannot run test program while cross compiling
37448See \`config.log' for more details" "$LINENO" 5; }
Elliott Hughesf344baa2021-12-07 09:12:34 -080037449else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37451/* end confdefs.h. */
37452
37453
37454 $curl_includes_ws2tcpip
37455 $curl_includes_stdlib
37456 $curl_includes_string
37457 $curl_includes_sys_socket
37458 $curl_includes_netdb
37459
37460int main (void)
37461{
37462
37463 struct addrinfo hints;
37464 struct addrinfo *ai = 0;
37465 int error;
37466
37467 #ifdef HAVE_WINSOCK2_H
37468 WSADATA wsa;
37469 if (WSAStartup(MAKEWORD(2,2), &wsa))
37470 exit(2);
37471 #endif
37472
37473 memset(&hints, 0, sizeof(hints));
37474 hints.ai_flags = AI_NUMERICHOST;
37475 hints.ai_family = AF_UNSPEC;
37476 hints.ai_socktype = SOCK_STREAM;
37477 error = getaddrinfo("127.0.0.1", 0, &hints, &ai);
37478 if(error || !ai)
37479 exit(1); /* fail */
37480 else
37481 exit(0);
37482
37483 ;
37484 return 0;
37485}
37486
37487_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080037488if ac_fn_c_try_run "$LINENO"
37489then :
37490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37491printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037492 tst_works_getaddrinfo="yes"
37493
Elliott Hughesf344baa2021-12-07 09:12:34 -080037494else $as_nop
37495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37496printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037497 tst_works_getaddrinfo="no"
37498
37499fi
37500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37501 conftest.$ac_objext conftest.beam conftest.$ac_ext
37502fi
37503
Elliott Hughesa93fb052018-12-12 14:22:48 -080037504 LD_LIBRARY_PATH=$old # restore
37505
Elliott Hughes82be86d2017-09-20 17:00:17 -070037506 fi
37507 #
37508 if test "$tst_compi_getaddrinfo" = "yes" &&
37509 test "$tst_works_getaddrinfo" != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo usage allowed" >&5
37511printf %s "checking if getaddrinfo usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037512 if test "x$curl_disallow_getaddrinfo" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037513 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37514printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037515 tst_allow_getaddrinfo="yes"
37516 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080037517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37518printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037519 tst_allow_getaddrinfo="no"
37520 fi
37521 fi
37522 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080037523 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo might be used" >&5
37524printf %s "checking if getaddrinfo might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037525 if test "$tst_links_getaddrinfo" = "yes" &&
37526 test "$tst_proto_getaddrinfo" = "yes" &&
37527 test "$tst_compi_getaddrinfo" = "yes" &&
37528 test "$tst_allow_getaddrinfo" = "yes" &&
37529 test "$tst_works_getaddrinfo" != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37531printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037532
Elliott Hughesf344baa2021-12-07 09:12:34 -080037533printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070037534
37535 curl_cv_func_getaddrinfo="yes"
37536 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080037537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37538printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037539 curl_cv_func_getaddrinfo="no"
37540 curl_cv_func_getaddrinfo_threadsafe="no"
37541 fi
37542 #
37543 if test "$curl_cv_func_getaddrinfo" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo is threadsafe" >&5
37545printf %s "checking if getaddrinfo is threadsafe... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037546 case $host_os in
37547 aix[1234].* | aix5.[01].*)
37548 tst_tsafe_getaddrinfo="no"
37549 ;;
37550 aix*)
37551 tst_tsafe_getaddrinfo="yes"
37552 ;;
37553 darwin[12345].*)
37554 tst_tsafe_getaddrinfo="no"
37555 ;;
37556 darwin*)
37557 tst_tsafe_getaddrinfo="yes"
37558 ;;
37559 freebsd[1234].* | freebsd5.[1234]*)
37560 tst_tsafe_getaddrinfo="no"
37561 ;;
37562 freebsd*)
37563 tst_tsafe_getaddrinfo="yes"
37564 ;;
37565 hpux[123456789].* | hpux10.* | hpux11.0* | hpux11.10*)
37566 tst_tsafe_getaddrinfo="no"
37567 ;;
37568 hpux*)
37569 tst_tsafe_getaddrinfo="yes"
37570 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080037571 midnightbsd*)
37572 tst_tsafe_getaddrinfo="yes"
37573 ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070037574 netbsd[123].*)
37575 tst_tsafe_getaddrinfo="no"
37576 ;;
37577 netbsd*)
37578 tst_tsafe_getaddrinfo="yes"
37579 ;;
37580 *bsd*)
37581 tst_tsafe_getaddrinfo="no"
37582 ;;
37583 solaris2*)
37584 tst_tsafe_getaddrinfo="yes"
37585 ;;
37586 esac
37587 if test "$tst_tsafe_getaddrinfo" = "unknown" &&
37588 test "$curl_cv_native_windows" = "yes"; then
37589 tst_tsafe_getaddrinfo="yes"
37590 fi
37591 if test "$tst_tsafe_getaddrinfo" = "unknown"; then
37592
37593
37594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37595/* end confdefs.h. */
37596
37597
37598 $curl_includes_sys_socket
37599 $curl_includes_netdb
37600
37601int main (void)
37602{
37603#ifdef h_errno
37604 return 0;
37605#else
37606 force compilation error
37607#endif
37608}
37609
37610
37611_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080037612if ac_fn_c_try_compile "$LINENO"
37613then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070037614
37615 tst_symbol_defined="yes"
37616
Elliott Hughesf344baa2021-12-07 09:12:34 -080037617else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037618
37619 tst_symbol_defined="no"
37620
37621fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037622rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070037623 if test "$tst_symbol_defined" = "yes"; then
37624 curl_cv_have_def_h_errno=yes
37625
37626 else
37627 curl_cv_have_def_h_errno=no
37628
37629 fi
37630
37631 if test "$curl_cv_have_def_h_errno" = "yes"; then
37632 tst_h_errno_macro="yes"
37633 else
37634 tst_h_errno_macro="no"
37635 fi
37636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37637/* end confdefs.h. */
37638
37639
37640 $curl_includes_sys_socket
37641 $curl_includes_netdb
37642
37643int main (void)
37644{
37645
37646 h_errno = 2;
37647 if(0 != h_errno)
37648 return 1;
37649
37650 ;
37651 return 0;
37652}
37653
37654_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080037655if ac_fn_c_try_compile "$LINENO"
37656then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070037657
37658 tst_h_errno_modifiable_lvalue="yes"
37659
Elliott Hughesf344baa2021-12-07 09:12:34 -080037660else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037661
37662 tst_h_errno_modifiable_lvalue="no"
37663
37664fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037665rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070037666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37667/* end confdefs.h. */
37668
37669
37670
37671int main (void)
37672{
37673
37674#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L)
37675 return 0;
37676#elif defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 700)
37677 return 0;
37678#else
37679 force compilation error
37680#endif
37681
37682 ;
37683 return 0;
37684}
37685
37686_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080037687if ac_fn_c_try_compile "$LINENO"
37688then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070037689
37690 tst_h_errno_sbs_issue_7="yes"
37691
Elliott Hughesf344baa2021-12-07 09:12:34 -080037692else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037693
37694 tst_h_errno_sbs_issue_7="no"
37695
37696fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037697rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070037698 if test "$tst_h_errno_macro" = "no" &&
37699 test "$tst_h_errno_modifiable_lvalue" = "no" &&
37700 test "$tst_h_errno_sbs_issue_7" = "no"; then
37701 tst_tsafe_getaddrinfo="no"
37702 else
37703 tst_tsafe_getaddrinfo="yes"
37704 fi
37705 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tst_tsafe_getaddrinfo" >&5
37707printf "%s\n" "$tst_tsafe_getaddrinfo" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037708 if test "$tst_tsafe_getaddrinfo" = "yes"; then
37709
Elliott Hughesf344baa2021-12-07 09:12:34 -080037710printf "%s\n" "#define HAVE_GETADDRINFO_THREADSAFE 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070037711
37712 curl_cv_func_getaddrinfo_threadsafe="yes"
37713 else
37714 curl_cv_func_getaddrinfo_threadsafe="no"
37715 fi
37716 fi
37717
37718
37719 #
Elliott Hughes82be86d2017-09-20 17:00:17 -070037720 tst_links_gethostbyname="unknown"
37721 tst_proto_gethostbyname="unknown"
37722 tst_compi_gethostbyname="unknown"
37723 tst_allow_gethostbyname="unknown"
37724 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080037725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostbyname can be linked" >&5
37726printf %s "checking if gethostbyname can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37728/* end confdefs.h. */
37729
37730
37731 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070037732 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070037733 $curl_includes_netdb
37734
37735int main (void)
37736{
37737
37738 if(0 != gethostbyname(0))
37739 return 1;
37740
37741 ;
37742 return 0;
37743}
37744
37745_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080037746if ac_fn_c_try_link "$LINENO"
37747then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070037748
Elliott Hughesf344baa2021-12-07 09:12:34 -080037749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37750printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037751 tst_links_gethostbyname="yes"
37752
Elliott Hughesf344baa2021-12-07 09:12:34 -080037753else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037754
Elliott Hughesf344baa2021-12-07 09:12:34 -080037755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37756printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037757 tst_links_gethostbyname="no"
37758
37759fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037760rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070037761 conftest$ac_exeext conftest.$ac_ext
37762 #
37763 if test "$tst_links_gethostbyname" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostbyname is prototyped" >&5
37765printf %s "checking if gethostbyname is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37767/* end confdefs.h. */
37768
37769 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070037770 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070037771 $curl_includes_netdb
37772
37773_ACEOF
37774if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080037775 $EGREP "gethostbyname" >/dev/null 2>&1
37776then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070037777
Elliott Hughesf344baa2021-12-07 09:12:34 -080037778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37779printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037780 tst_proto_gethostbyname="yes"
37781
Elliott Hughesf344baa2021-12-07 09:12:34 -080037782else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037783
Elliott Hughesf344baa2021-12-07 09:12:34 -080037784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37785printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037786 tst_proto_gethostbyname="no"
37787
37788fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037789rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070037790
37791 fi
37792 #
37793 if test "$tst_proto_gethostbyname" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostbyname is compilable" >&5
37795printf %s "checking if gethostbyname is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37797/* end confdefs.h. */
37798
37799
37800 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070037801 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070037802 $curl_includes_netdb
37803
37804int main (void)
37805{
37806
37807 if(0 != gethostbyname(0))
37808 return 1;
37809
37810 ;
37811 return 0;
37812}
37813
37814_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080037815if ac_fn_c_try_compile "$LINENO"
37816then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070037817
Elliott Hughesf344baa2021-12-07 09:12:34 -080037818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37819printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037820 tst_compi_gethostbyname="yes"
37821
Elliott Hughesf344baa2021-12-07 09:12:34 -080037822else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037823
Elliott Hughesf344baa2021-12-07 09:12:34 -080037824 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37825printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037826 tst_compi_gethostbyname="no"
37827
37828fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037829rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070037830 fi
37831 #
37832 if test "$tst_compi_gethostbyname" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostbyname usage allowed" >&5
37834printf %s "checking if gethostbyname usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037835 if test "x$curl_disallow_gethostbyname" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37837printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037838 tst_allow_gethostbyname="yes"
37839 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080037840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37841printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037842 tst_allow_gethostbyname="no"
37843 fi
37844 fi
37845 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080037846 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostbyname might be used" >&5
37847printf %s "checking if gethostbyname might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037848 if test "$tst_links_gethostbyname" = "yes" &&
37849 test "$tst_proto_gethostbyname" = "yes" &&
37850 test "$tst_compi_gethostbyname" = "yes" &&
37851 test "$tst_allow_gethostbyname" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37853printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037854
Elliott Hughesf344baa2021-12-07 09:12:34 -080037855printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070037856
37857 curl_cv_func_gethostbyname="yes"
37858 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080037859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37860printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037861 curl_cv_func_gethostbyname="no"
37862 fi
37863
37864
37865 #
37866 tst_links_gethostbyname_r="unknown"
37867 tst_proto_gethostbyname_r="unknown"
37868 tst_compi_gethostbyname_r="unknown"
37869 tst_allow_gethostbyname_r="unknown"
37870 tst_nargs_gethostbyname_r="unknown"
37871 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080037872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r can be linked" >&5
37873printf %s "checking if gethostbyname_r can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37875/* end confdefs.h. */
37876
37877
37878#define gethostbyname_r innocuous_gethostbyname_r
37879#ifdef __STDC__
37880# include <limits.h>
37881#else
37882# include <assert.h>
37883#endif
37884#undef gethostbyname_r
37885#ifdef __cplusplus
37886extern "C"
37887#endif
37888char gethostbyname_r ();
37889#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
37890choke me
37891#endif
37892
37893int main (void)
37894{
37895return gethostbyname_r ();
37896 ;
37897 return 0;
37898}
37899
37900_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080037901if ac_fn_c_try_link "$LINENO"
37902then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070037903
Elliott Hughesf344baa2021-12-07 09:12:34 -080037904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37905printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037906 tst_links_gethostbyname_r="yes"
37907
Elliott Hughesf344baa2021-12-07 09:12:34 -080037908else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037909
Elliott Hughesf344baa2021-12-07 09:12:34 -080037910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37911printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037912 tst_links_gethostbyname_r="no"
37913
37914fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037915rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070037916 conftest$ac_exeext conftest.$ac_ext
37917 #
37918 if test "$tst_links_gethostbyname_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r is prototyped" >&5
37920printf %s "checking if gethostbyname_r is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37922/* end confdefs.h. */
37923
37924 $curl_includes_netdb
37925
37926_ACEOF
37927if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080037928 $EGREP "gethostbyname_r" >/dev/null 2>&1
37929then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070037930
Elliott Hughesf344baa2021-12-07 09:12:34 -080037931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37932printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037933 tst_proto_gethostbyname_r="yes"
37934
Elliott Hughesf344baa2021-12-07 09:12:34 -080037935else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037936
Elliott Hughesf344baa2021-12-07 09:12:34 -080037937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37938printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037939 tst_proto_gethostbyname_r="no"
37940
37941fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037942rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070037943
37944 fi
37945 #
37946 if test "$tst_proto_gethostbyname_r" = "yes"; then
37947 if test "$tst_nargs_gethostbyname_r" = "unknown"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r takes 3 args." >&5
37949printf %s "checking if gethostbyname_r takes 3 args.... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37951/* end confdefs.h. */
37952
37953
37954 $curl_includes_netdb
37955
37956int main (void)
37957{
37958
37959 if(0 != gethostbyname_r(0, 0, 0))
37960 return 1;
37961
37962 ;
37963 return 0;
37964}
37965
37966_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080037967if ac_fn_c_try_compile "$LINENO"
37968then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070037969
Elliott Hughesf344baa2021-12-07 09:12:34 -080037970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37971printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037972 tst_compi_gethostbyname_r="yes"
37973 tst_nargs_gethostbyname_r="3"
37974
Elliott Hughesf344baa2021-12-07 09:12:34 -080037975else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070037976
Elliott Hughesf344baa2021-12-07 09:12:34 -080037977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37978printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037979 tst_compi_gethostbyname_r="no"
37980
37981fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080037982rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070037983 fi
37984 if test "$tst_nargs_gethostbyname_r" = "unknown"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080037985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r takes 5 args." >&5
37986printf %s "checking if gethostbyname_r takes 5 args.... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070037987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37988/* end confdefs.h. */
37989
37990
37991 $curl_includes_netdb
37992
37993int main (void)
37994{
37995
37996 if(0 != gethostbyname_r(0, 0, 0, 0, 0))
37997 return 1;
37998
37999 ;
38000 return 0;
38001}
38002
38003_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080038004if ac_fn_c_try_compile "$LINENO"
38005then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070038006
Elliott Hughesf344baa2021-12-07 09:12:34 -080038007 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38008printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038009 tst_compi_gethostbyname_r="yes"
38010 tst_nargs_gethostbyname_r="5"
38011
Elliott Hughesf344baa2021-12-07 09:12:34 -080038012else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070038013
Elliott Hughesf344baa2021-12-07 09:12:34 -080038014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38015printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038016 tst_compi_gethostbyname_r="no"
38017
38018fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038019rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070038020 fi
38021 if test "$tst_nargs_gethostbyname_r" = "unknown"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038022 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r takes 6 args." >&5
38023printf %s "checking if gethostbyname_r takes 6 args.... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38025/* end confdefs.h. */
38026
38027
38028 $curl_includes_netdb
38029
38030int main (void)
38031{
38032
38033 if(0 != gethostbyname_r(0, 0, 0, 0, 0, 0))
38034 return 1;
38035
38036 ;
38037 return 0;
38038}
38039
38040_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080038041if ac_fn_c_try_compile "$LINENO"
38042then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070038043
Elliott Hughesf344baa2021-12-07 09:12:34 -080038044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38045printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038046 tst_compi_gethostbyname_r="yes"
38047 tst_nargs_gethostbyname_r="6"
38048
Elliott Hughesf344baa2021-12-07 09:12:34 -080038049else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070038050
Elliott Hughesf344baa2021-12-07 09:12:34 -080038051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38052printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038053 tst_compi_gethostbyname_r="no"
38054
38055fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038056rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070038057 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038058 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r is compilable" >&5
38059printf %s "checking if gethostbyname_r is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038060 if test "$tst_compi_gethostbyname_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38062printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038063 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080038064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38065printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038066 fi
38067 fi
38068 #
38069 if test "$tst_compi_gethostbyname_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r usage allowed" >&5
38071printf %s "checking if gethostbyname_r usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038072 if test "x$curl_disallow_gethostbyname_r" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38074printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038075 tst_allow_gethostbyname_r="yes"
38076 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080038077 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38078printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038079 tst_allow_gethostbyname_r="no"
38080 fi
38081 fi
38082 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080038083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r might be used" >&5
38084printf %s "checking if gethostbyname_r might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038085 if test "$tst_links_gethostbyname_r" = "yes" &&
38086 test "$tst_proto_gethostbyname_r" = "yes" &&
38087 test "$tst_compi_gethostbyname_r" = "yes" &&
38088 test "$tst_allow_gethostbyname_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38090printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038091
Elliott Hughesf344baa2021-12-07 09:12:34 -080038092printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070038093
38094 #
38095 if test "$tst_nargs_gethostbyname_r" -eq "3"; then
38096
Elliott Hughesf344baa2021-12-07 09:12:34 -080038097printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_3 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070038098
38099 elif test "$tst_nargs_gethostbyname_r" -eq "5"; then
38100
Elliott Hughesf344baa2021-12-07 09:12:34 -080038101printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_5 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070038102
38103 elif test "$tst_nargs_gethostbyname_r" -eq "6"; then
38104
Elliott Hughesf344baa2021-12-07 09:12:34 -080038105printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_6 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070038106
38107 fi
38108 #
38109 curl_cv_func_gethostbyname_r="yes"
38110 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080038111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38112printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038113 curl_cv_func_gethostbyname_r="no"
38114 fi
38115
38116
Elliott Hughesa93fb052018-12-12 14:22:48 -080038117curl_preprocess_callconv="\
38118/* preprocess start */
38119#ifdef HAVE_WINDOWS_H
38120# define FUNCALLCONV __stdcall
38121#else
38122# define FUNCALLCONV
38123#endif
38124/* preprocess end */"
38125
38126
Haibo Huang65021c72019-03-27 15:37:23 -070038127 #
Elliott Hughes82be86d2017-09-20 17:00:17 -070038128 tst_links_gethostname="unknown"
38129 tst_proto_gethostname="unknown"
38130 tst_compi_gethostname="unknown"
38131 tst_allow_gethostname="unknown"
38132 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080038133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostname can be linked" >&5
38134printf %s "checking if gethostname can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38136/* end confdefs.h. */
38137
38138
38139 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070038140 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070038141 $curl_includes_unistd
38142
38143int main (void)
38144{
38145
38146 if(0 != gethostname(0, 0))
38147 return 1;
38148
38149 ;
38150 return 0;
38151}
38152
38153_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080038154if ac_fn_c_try_link "$LINENO"
38155then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070038156
Elliott Hughesf344baa2021-12-07 09:12:34 -080038157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38158printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038159 tst_links_gethostname="yes"
38160
Elliott Hughesf344baa2021-12-07 09:12:34 -080038161else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070038162
Elliott Hughesf344baa2021-12-07 09:12:34 -080038163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38164printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038165 tst_links_gethostname="no"
38166
38167fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038168rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070038169 conftest$ac_exeext conftest.$ac_ext
38170 #
38171 if test "$tst_links_gethostname" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostname is prototyped" >&5
38173printf %s "checking if gethostname is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38175/* end confdefs.h. */
38176
38177 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070038178 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070038179 $curl_includes_unistd
38180
38181_ACEOF
38182if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080038183 $EGREP "gethostname" >/dev/null 2>&1
38184then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070038185
Elliott Hughesf344baa2021-12-07 09:12:34 -080038186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38187printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038188 tst_proto_gethostname="yes"
38189
Elliott Hughesf344baa2021-12-07 09:12:34 -080038190else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070038191
Elliott Hughesf344baa2021-12-07 09:12:34 -080038192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38193printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038194 tst_proto_gethostname="no"
38195
38196fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038197rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070038198
38199 fi
38200 #
38201 if test "$tst_proto_gethostname" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostname is compilable" >&5
38203printf %s "checking if gethostname is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38205/* end confdefs.h. */
38206
38207
38208 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070038209 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070038210 $curl_includes_unistd
38211
38212int main (void)
38213{
38214
38215 if(0 != gethostname(0, 0))
38216 return 1;
38217
38218 ;
38219 return 0;
38220}
38221
38222_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080038223if ac_fn_c_try_compile "$LINENO"
38224then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070038225
Elliott Hughesf344baa2021-12-07 09:12:34 -080038226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38227printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038228 tst_compi_gethostname="yes"
38229
Elliott Hughesf344baa2021-12-07 09:12:34 -080038230else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070038231
Elliott Hughesf344baa2021-12-07 09:12:34 -080038232 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38233printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038234 tst_compi_gethostname="no"
38235
38236fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038237rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070038238 fi
38239 #
38240 if test "$tst_compi_gethostname" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostname arg 2 data type" >&5
38242printf %s "checking for gethostname arg 2 data type... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038243 tst_gethostname_type_arg2="unknown"
38244 for tst_arg1 in 'char *' 'unsigned char *' 'void *'; do
38245 for tst_arg2 in 'int' 'unsigned int' 'size_t'; do
38246 if test "$tst_gethostname_type_arg2" = "unknown"; then
38247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38248/* end confdefs.h. */
38249
38250
38251 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070038252 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070038253 $curl_includes_unistd
38254 $curl_preprocess_callconv
38255 extern int FUNCALLCONV gethostname($tst_arg1, $tst_arg2);
38256
38257int main (void)
38258{
38259
38260 if(0 != gethostname(0, 0))
38261 return 1;
38262
38263 ;
38264 return 0;
38265}
38266
38267_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080038268if ac_fn_c_try_compile "$LINENO"
38269then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070038270
38271 tst_gethostname_type_arg2="$tst_arg2"
38272
38273fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038274rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070038275 fi
38276 done
38277 done
Elliott Hughesf344baa2021-12-07 09:12:34 -080038278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tst_gethostname_type_arg2" >&5
38279printf "%s\n" "$tst_gethostname_type_arg2" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038280 if test "$tst_gethostname_type_arg2" != "unknown"; then
38281
Elliott Hughesf344baa2021-12-07 09:12:34 -080038282printf "%s\n" "#define GETHOSTNAME_TYPE_ARG2 $tst_gethostname_type_arg2" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070038283
38284 fi
38285 fi
38286 #
38287 if test "$tst_compi_gethostname" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038288 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostname usage allowed" >&5
38289printf %s "checking if gethostname usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038290 if test "x$curl_disallow_gethostname" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038291 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38292printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038293 tst_allow_gethostname="yes"
38294 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080038295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38296printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038297 tst_allow_gethostname="no"
38298 fi
38299 fi
38300 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080038301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostname might be used" >&5
38302printf %s "checking if gethostname might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038303 if test "$tst_links_gethostname" = "yes" &&
38304 test "$tst_proto_gethostname" = "yes" &&
38305 test "$tst_compi_gethostname" = "yes" &&
38306 test "$tst_allow_gethostname" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38308printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038309
Elliott Hughesf344baa2021-12-07 09:12:34 -080038310printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070038311
38312 curl_cv_func_gethostname="yes"
38313 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080038314 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38315printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038316 curl_cv_func_gethostname="no"
38317 fi
38318
38319
Haibo Huang34ab3462019-05-22 00:50:27 -070038320 #
38321 tst_links_getpeername="unknown"
38322 tst_proto_getpeername="unknown"
38323 tst_compi_getpeername="unknown"
38324 tst_allow_getpeername="unknown"
38325 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080038326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getpeername can be linked" >&5
38327printf %s "checking if getpeername can be linked... " >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38329/* end confdefs.h. */
38330
38331
38332 $curl_includes_winsock2
38333 $curl_includes_bsdsocket
38334 $curl_includes_sys_socket
38335
38336int main (void)
38337{
38338
38339 if(0 != getpeername(0, (void *)0, (void *)0))
38340 return 1;
38341
38342 ;
38343 return 0;
38344}
38345
38346_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080038347if ac_fn_c_try_link "$LINENO"
38348then :
Haibo Huang34ab3462019-05-22 00:50:27 -070038349
Elliott Hughesf344baa2021-12-07 09:12:34 -080038350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38351printf "%s\n" "yes" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038352 tst_links_getpeername="yes"
38353
Elliott Hughesf344baa2021-12-07 09:12:34 -080038354else $as_nop
Haibo Huang34ab3462019-05-22 00:50:27 -070038355
Elliott Hughesf344baa2021-12-07 09:12:34 -080038356 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38357printf "%s\n" "no" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038358 tst_links_getpeername="no"
38359
38360fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038361rm -f core conftest.err conftest.$ac_objext conftest.beam \
Haibo Huang34ab3462019-05-22 00:50:27 -070038362 conftest$ac_exeext conftest.$ac_ext
38363 #
38364 if test "$tst_links_getpeername" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getpeername is prototyped" >&5
38366printf %s "checking if getpeername is prototyped... " >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38368/* end confdefs.h. */
38369
38370 $curl_includes_winsock2
38371 $curl_includes_bsdsocket
38372 $curl_includes_sys_socket
38373
38374_ACEOF
38375if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080038376 $EGREP "getpeername" >/dev/null 2>&1
38377then :
Haibo Huang34ab3462019-05-22 00:50:27 -070038378
Elliott Hughesf344baa2021-12-07 09:12:34 -080038379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38380printf "%s\n" "yes" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038381 tst_proto_getpeername="yes"
38382
Elliott Hughesf344baa2021-12-07 09:12:34 -080038383else $as_nop
Haibo Huang34ab3462019-05-22 00:50:27 -070038384
Elliott Hughesf344baa2021-12-07 09:12:34 -080038385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38386printf "%s\n" "no" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038387 tst_proto_getpeername="no"
38388
38389fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038390rm -rf conftest*
Haibo Huang34ab3462019-05-22 00:50:27 -070038391
38392 fi
38393 #
38394 if test "$tst_proto_getpeername" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getpeername is compilable" >&5
38396printf %s "checking if getpeername is compilable... " >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38398/* end confdefs.h. */
38399
38400
38401 $curl_includes_winsock2
38402 $curl_includes_bsdsocket
38403 $curl_includes_sys_socket
38404
38405int main (void)
38406{
38407
38408 if(0 != getpeername(0, (void *)0, (void *)0))
38409 return 1;
38410
38411 ;
38412 return 0;
38413}
38414
38415_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080038416if ac_fn_c_try_compile "$LINENO"
38417then :
Haibo Huang34ab3462019-05-22 00:50:27 -070038418
Elliott Hughesf344baa2021-12-07 09:12:34 -080038419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38420printf "%s\n" "yes" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038421 tst_compi_getpeername="yes"
38422
Elliott Hughesf344baa2021-12-07 09:12:34 -080038423else $as_nop
Haibo Huang34ab3462019-05-22 00:50:27 -070038424
Elliott Hughesf344baa2021-12-07 09:12:34 -080038425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38426printf "%s\n" "no" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038427 tst_compi_getpeername="no"
38428
38429fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038430rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Haibo Huang34ab3462019-05-22 00:50:27 -070038431 fi
38432 #
38433 if test "$tst_compi_getpeername" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getpeername usage allowed" >&5
38435printf %s "checking if getpeername usage allowed... " >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038436 if test "x$curl_disallow_getpeername" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38438printf "%s\n" "yes" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038439 tst_allow_getpeername="yes"
38440 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080038441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38442printf "%s\n" "no" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038443 tst_allow_getpeername="no"
38444 fi
38445 fi
38446 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080038447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getpeername might be used" >&5
38448printf %s "checking if getpeername might be used... " >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038449 if test "$tst_links_getpeername" = "yes" &&
38450 test "$tst_proto_getpeername" = "yes" &&
38451 test "$tst_compi_getpeername" = "yes" &&
38452 test "$tst_allow_getpeername" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38454printf "%s\n" "yes" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038455
Elliott Hughesf344baa2021-12-07 09:12:34 -080038456printf "%s\n" "#define HAVE_GETPEERNAME 1" >>confdefs.h
Haibo Huang34ab3462019-05-22 00:50:27 -070038457
38458 curl_cv_func_getpeername="yes"
38459 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080038460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38461printf "%s\n" "no" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038462 curl_cv_func_getpeername="no"
38463 fi
38464
38465
38466 #
38467 tst_links_getsockname="unknown"
38468 tst_proto_getsockname="unknown"
38469 tst_compi_getsockname="unknown"
38470 tst_allow_getsockname="unknown"
38471 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080038472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getsockname can be linked" >&5
38473printf %s "checking if getsockname can be linked... " >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38475/* end confdefs.h. */
38476
38477
38478 $curl_includes_winsock2
38479 $curl_includes_bsdsocket
38480 $curl_includes_sys_socket
38481
38482int main (void)
38483{
38484
38485 if(0 != getsockname(0, (void *)0, (void *)0))
38486 return 1;
38487
38488 ;
38489 return 0;
38490}
38491
38492_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080038493if ac_fn_c_try_link "$LINENO"
38494then :
Haibo Huang34ab3462019-05-22 00:50:27 -070038495
Elliott Hughesf344baa2021-12-07 09:12:34 -080038496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38497printf "%s\n" "yes" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038498 tst_links_getsockname="yes"
38499
Elliott Hughesf344baa2021-12-07 09:12:34 -080038500else $as_nop
Haibo Huang34ab3462019-05-22 00:50:27 -070038501
Elliott Hughesf344baa2021-12-07 09:12:34 -080038502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38503printf "%s\n" "no" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038504 tst_links_getsockname="no"
38505
38506fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038507rm -f core conftest.err conftest.$ac_objext conftest.beam \
Haibo Huang34ab3462019-05-22 00:50:27 -070038508 conftest$ac_exeext conftest.$ac_ext
38509 #
38510 if test "$tst_links_getsockname" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getsockname is prototyped" >&5
38512printf %s "checking if getsockname is prototyped... " >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38514/* end confdefs.h. */
38515
38516 $curl_includes_winsock2
38517 $curl_includes_bsdsocket
38518 $curl_includes_sys_socket
38519
38520_ACEOF
38521if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080038522 $EGREP "getsockname" >/dev/null 2>&1
38523then :
Haibo Huang34ab3462019-05-22 00:50:27 -070038524
Elliott Hughesf344baa2021-12-07 09:12:34 -080038525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38526printf "%s\n" "yes" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038527 tst_proto_getsockname="yes"
38528
Elliott Hughesf344baa2021-12-07 09:12:34 -080038529else $as_nop
Haibo Huang34ab3462019-05-22 00:50:27 -070038530
Elliott Hughesf344baa2021-12-07 09:12:34 -080038531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38532printf "%s\n" "no" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038533 tst_proto_getsockname="no"
38534
38535fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038536rm -rf conftest*
Haibo Huang34ab3462019-05-22 00:50:27 -070038537
38538 fi
38539 #
38540 if test "$tst_proto_getsockname" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getsockname is compilable" >&5
38542printf %s "checking if getsockname is compilable... " >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38544/* end confdefs.h. */
38545
38546
38547 $curl_includes_winsock2
38548 $curl_includes_bsdsocket
38549 $curl_includes_sys_socket
38550
38551int main (void)
38552{
38553
38554 if(0 != getsockname(0, (void *)0, (void *)0))
38555 return 1;
38556
38557 ;
38558 return 0;
38559}
38560
38561_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080038562if ac_fn_c_try_compile "$LINENO"
38563then :
Haibo Huang34ab3462019-05-22 00:50:27 -070038564
Elliott Hughesf344baa2021-12-07 09:12:34 -080038565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38566printf "%s\n" "yes" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038567 tst_compi_getsockname="yes"
38568
Elliott Hughesf344baa2021-12-07 09:12:34 -080038569else $as_nop
Haibo Huang34ab3462019-05-22 00:50:27 -070038570
Elliott Hughesf344baa2021-12-07 09:12:34 -080038571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38572printf "%s\n" "no" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038573 tst_compi_getsockname="no"
38574
38575fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038576rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Haibo Huang34ab3462019-05-22 00:50:27 -070038577 fi
38578 #
38579 if test "$tst_compi_getsockname" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getsockname usage allowed" >&5
38581printf %s "checking if getsockname usage allowed... " >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038582 if test "x$curl_disallow_getsockname" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38584printf "%s\n" "yes" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038585 tst_allow_getsockname="yes"
38586 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080038587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38588printf "%s\n" "no" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038589 tst_allow_getsockname="no"
38590 fi
38591 fi
38592 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080038593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getsockname might be used" >&5
38594printf %s "checking if getsockname might be used... " >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038595 if test "$tst_links_getsockname" = "yes" &&
38596 test "$tst_proto_getsockname" = "yes" &&
38597 test "$tst_compi_getsockname" = "yes" &&
38598 test "$tst_allow_getsockname" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38600printf "%s\n" "yes" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038601
Elliott Hughesf344baa2021-12-07 09:12:34 -080038602printf "%s\n" "#define HAVE_GETSOCKNAME 1" >>confdefs.h
Haibo Huang34ab3462019-05-22 00:50:27 -070038603
38604 curl_cv_func_getsockname="yes"
38605 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080038606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38607printf "%s\n" "no" >&6; }
Haibo Huang34ab3462019-05-22 00:50:27 -070038608 curl_cv_func_getsockname="no"
38609 fi
38610
38611
Haibo Huangb6336c12019-06-05 01:34:44 -070038612curl_includes_netif="\
38613/* includes start */
38614#ifdef HAVE_NET_IF_H
38615# include <net/if.h>
38616#endif
38617/* includes end */"
Haibo Huangb6336c12019-06-05 01:34:44 -070038618 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$curl_includes_netif
38619"
Elliott Hughesf344baa2021-12-07 09:12:34 -080038620if test "x$ac_cv_header_net_if_h" = xyes
38621then :
38622 printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
Haibo Huangb6336c12019-06-05 01:34:44 -070038623
38624fi
38625
Haibo Huangb6336c12019-06-05 01:34:44 -070038626
38627
38628 #
38629 tst_links_if_nametoindex="unknown"
38630 tst_proto_if_nametoindex="unknown"
38631 tst_compi_if_nametoindex="unknown"
38632 tst_allow_if_nametoindex="unknown"
38633 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080038634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if if_nametoindex can be linked" >&5
38635printf %s "checking if if_nametoindex can be linked... " >&6; }
Haibo Huangb6336c12019-06-05 01:34:44 -070038636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38637/* end confdefs.h. */
38638
38639
38640 $curl_includes_winsock2
38641 $curl_includes_bsdsocket
38642 #include <net/if.h>
38643
38644int main (void)
38645{
38646
38647 if(0 != if_nametoindex(""))
38648 return 1;
38649
38650 ;
38651 return 0;
38652}
38653
38654_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080038655if ac_fn_c_try_link "$LINENO"
38656then :
Haibo Huangb6336c12019-06-05 01:34:44 -070038657
Elliott Hughesf344baa2021-12-07 09:12:34 -080038658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38659printf "%s\n" "yes" >&6; }
Haibo Huangb6336c12019-06-05 01:34:44 -070038660 tst_links_if_nametoindex="yes"
38661
Elliott Hughesf344baa2021-12-07 09:12:34 -080038662else $as_nop
Haibo Huangb6336c12019-06-05 01:34:44 -070038663
Elliott Hughesf344baa2021-12-07 09:12:34 -080038664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38665printf "%s\n" "no" >&6; }
Haibo Huangb6336c12019-06-05 01:34:44 -070038666 tst_links_if_nametoindex="no"
38667
38668fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038669rm -f core conftest.err conftest.$ac_objext conftest.beam \
Haibo Huangb6336c12019-06-05 01:34:44 -070038670 conftest$ac_exeext conftest.$ac_ext
38671 #
38672 if test "$tst_links_if_nametoindex" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if if_nametoindex is prototyped" >&5
38674printf %s "checking if if_nametoindex is prototyped... " >&6; }
Haibo Huangb6336c12019-06-05 01:34:44 -070038675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38676/* end confdefs.h. */
38677
38678 $curl_includes_winsock2
38679 $curl_includes_netif
38680
38681_ACEOF
38682if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080038683 $EGREP "if_nametoindex" >/dev/null 2>&1
38684then :
Haibo Huangb6336c12019-06-05 01:34:44 -070038685
Elliott Hughesf344baa2021-12-07 09:12:34 -080038686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38687printf "%s\n" "yes" >&6; }
Haibo Huangb6336c12019-06-05 01:34:44 -070038688 tst_proto_if_nametoindex="yes"
38689
Elliott Hughesf344baa2021-12-07 09:12:34 -080038690else $as_nop
Haibo Huangb6336c12019-06-05 01:34:44 -070038691
Elliott Hughesf344baa2021-12-07 09:12:34 -080038692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38693printf "%s\n" "no" >&6; }
Haibo Huangb6336c12019-06-05 01:34:44 -070038694 tst_proto_if_nametoindex="no"
38695
38696fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038697rm -rf conftest*
Haibo Huangb6336c12019-06-05 01:34:44 -070038698
38699 fi
38700 #
38701 if test "$tst_proto_if_nametoindex" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if if_nametoindex is compilable" >&5
38703printf %s "checking if if_nametoindex is compilable... " >&6; }
Haibo Huangb6336c12019-06-05 01:34:44 -070038704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38705/* end confdefs.h. */
38706
38707
38708 $curl_includes_winsock2
38709 $curl_includes_netif
38710
38711int main (void)
38712{
38713
38714 if(0 != if_nametoindex(""))
38715 return 1;
38716
38717 ;
38718 return 0;
38719}
38720
38721_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080038722if ac_fn_c_try_compile "$LINENO"
38723then :
Haibo Huangb6336c12019-06-05 01:34:44 -070038724
Elliott Hughesf344baa2021-12-07 09:12:34 -080038725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38726printf "%s\n" "yes" >&6; }
Haibo Huangb6336c12019-06-05 01:34:44 -070038727 tst_compi_if_nametoindex="yes"
38728
Elliott Hughesf344baa2021-12-07 09:12:34 -080038729else $as_nop
Haibo Huangb6336c12019-06-05 01:34:44 -070038730
Elliott Hughesf344baa2021-12-07 09:12:34 -080038731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38732printf "%s\n" "no" >&6; }
Haibo Huangb6336c12019-06-05 01:34:44 -070038733 tst_compi_if_nametoindex="no"
38734
38735fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038736rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Haibo Huangb6336c12019-06-05 01:34:44 -070038737 fi
38738 #
38739 if test "$tst_compi_if_nametoindex" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if if_nametoindex usage allowed" >&5
38741printf %s "checking if if_nametoindex usage allowed... " >&6; }
Haibo Huangb6336c12019-06-05 01:34:44 -070038742 if test "x$curl_disallow_if_nametoindex" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38744printf "%s\n" "yes" >&6; }
Haibo Huangb6336c12019-06-05 01:34:44 -070038745 tst_allow_if_nametoindex="yes"
38746 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080038747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38748printf "%s\n" "no" >&6; }
Haibo Huangb6336c12019-06-05 01:34:44 -070038749 tst_allow_if_nametoindex="no"
38750 fi
38751 fi
38752 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080038753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if if_nametoindex might be used" >&5
38754printf %s "checking if if_nametoindex might be used... " >&6; }
Haibo Huangb6336c12019-06-05 01:34:44 -070038755 if test "$tst_links_if_nametoindex" = "yes" &&
38756 test "$tst_proto_if_nametoindex" = "yes" &&
38757 test "$tst_compi_if_nametoindex" = "yes" &&
38758 test "$tst_allow_if_nametoindex" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38760printf "%s\n" "yes" >&6; }
Haibo Huangb6336c12019-06-05 01:34:44 -070038761
Elliott Hughesf344baa2021-12-07 09:12:34 -080038762printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
Haibo Huangb6336c12019-06-05 01:34:44 -070038763
38764 curl_cv_func_if_nametoindex="yes"
38765 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080038766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38767printf "%s\n" "no" >&6; }
Haibo Huangb6336c12019-06-05 01:34:44 -070038768 curl_cv_func_if_nametoindex="no"
38769 fi
38770
38771
Elliott Hughes34dd5f42021-08-10 13:01:18 -070038772curl_includes_ifaddrs="\
38773/* includes start */
38774#ifdef HAVE_SYS_TYPES_H
38775# include <sys/types.h>
38776#endif
38777#ifdef HAVE_SYS_SOCKET_H
38778# include <sys/socket.h>
38779#endif
38780#ifdef HAVE_NETINET_IN_H
38781# include <netinet/in.h>
38782#endif
38783#ifdef HAVE_IFADDRS_H
38784# include <ifaddrs.h>
38785#endif
38786/* includes end */"
Elliott Hughesf344baa2021-12-07 09:12:34 -080038787 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_ifaddrs
Elliott Hughes34dd5f42021-08-10 13:01:18 -070038788"
Elliott Hughesf344baa2021-12-07 09:12:34 -080038789if test "x$ac_cv_header_sys_types_h" = xyes
38790then :
38791 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
Elliott Hughes34dd5f42021-08-10 13:01:18 -070038792
38793fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038794ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$curl_includes_ifaddrs
38795"
38796if test "x$ac_cv_header_sys_socket_h" = xyes
38797then :
38798 printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
Elliott Hughes34dd5f42021-08-10 13:01:18 -070038799
Elliott Hughesf344baa2021-12-07 09:12:34 -080038800fi
38801ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$curl_includes_ifaddrs
38802"
38803if test "x$ac_cv_header_netinet_in_h" = xyes
38804then :
38805 printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
38806
38807fi
38808ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$curl_includes_ifaddrs
38809"
38810if test "x$ac_cv_header_ifaddrs_h" = xyes
38811then :
38812 printf "%s\n" "#define HAVE_IFADDRS_H 1" >>confdefs.h
38813
38814fi
Elliott Hughes34dd5f42021-08-10 13:01:18 -070038815
38816
38817
Elliott Hughes82be86d2017-09-20 17:00:17 -070038818 #
38819 tst_links_getifaddrs="unknown"
38820 tst_proto_getifaddrs="unknown"
38821 tst_compi_getifaddrs="unknown"
38822 tst_works_getifaddrs="unknown"
38823 tst_allow_getifaddrs="unknown"
38824 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080038825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getifaddrs can be linked" >&5
38826printf %s "checking if getifaddrs can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38828/* end confdefs.h. */
38829
38830
38831#define getifaddrs innocuous_getifaddrs
38832#ifdef __STDC__
38833# include <limits.h>
38834#else
38835# include <assert.h>
38836#endif
38837#undef getifaddrs
38838#ifdef __cplusplus
38839extern "C"
38840#endif
38841char getifaddrs ();
38842#if defined __stub_getifaddrs || defined __stub___getifaddrs
38843choke me
38844#endif
38845
38846int main (void)
38847{
38848return getifaddrs ();
38849 ;
38850 return 0;
38851}
38852
38853_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080038854if ac_fn_c_try_link "$LINENO"
38855then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070038856
Elliott Hughesf344baa2021-12-07 09:12:34 -080038857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38858printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038859 tst_links_getifaddrs="yes"
38860
Elliott Hughesf344baa2021-12-07 09:12:34 -080038861else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070038862
Elliott Hughesf344baa2021-12-07 09:12:34 -080038863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38864printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038865 tst_links_getifaddrs="no"
38866
38867fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038868rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070038869 conftest$ac_exeext conftest.$ac_ext
38870 #
38871 if test "$tst_links_getifaddrs" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getifaddrs is prototyped" >&5
38873printf %s "checking if getifaddrs is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38875/* end confdefs.h. */
38876
38877 $curl_includes_ifaddrs
38878
38879_ACEOF
38880if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080038881 $EGREP "getifaddrs" >/dev/null 2>&1
38882then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070038883
Elliott Hughesf344baa2021-12-07 09:12:34 -080038884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38885printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038886 tst_proto_getifaddrs="yes"
38887
Elliott Hughesf344baa2021-12-07 09:12:34 -080038888else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070038889
Elliott Hughesf344baa2021-12-07 09:12:34 -080038890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38891printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038892 tst_proto_getifaddrs="no"
38893
38894fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038895rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070038896
38897 fi
38898 #
38899 if test "$tst_proto_getifaddrs" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getifaddrs is compilable" >&5
38901printf %s "checking if getifaddrs is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38903/* end confdefs.h. */
38904
38905
38906 $curl_includes_ifaddrs
38907
38908int main (void)
38909{
38910
38911 if(0 != getifaddrs(0))
38912 return 1;
38913
38914 ;
38915 return 0;
38916}
38917
38918_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080038919if ac_fn_c_try_compile "$LINENO"
38920then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070038921
Elliott Hughesf344baa2021-12-07 09:12:34 -080038922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38923printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038924 tst_compi_getifaddrs="yes"
38925
Elliott Hughesf344baa2021-12-07 09:12:34 -080038926else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070038927
Elliott Hughesf344baa2021-12-07 09:12:34 -080038928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38929printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038930 tst_compi_getifaddrs="no"
38931
38932fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080038933rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070038934 fi
38935 #
38936 if test "x$cross_compiling" != "xyes" &&
38937 test "$tst_compi_getifaddrs" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getifaddrs seems to work" >&5
38939printf %s "checking if getifaddrs seems to work... " >&6; }
Elliott Hughesa93fb052018-12-12 14:22:48 -080038940
Elliott Hughesa93fb052018-12-12 14:22:48 -080038941 old=$LD_LIBRARY_PATH
38942 LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
38943 export LD_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080038944 if test "$cross_compiling" = yes
38945then :
38946 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
38947printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070038948as_fn_error $? "cannot run test program while cross compiling
38949See \`config.log' for more details" "$LINENO" 5; }
Elliott Hughesf344baa2021-12-07 09:12:34 -080038950else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070038951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38952/* end confdefs.h. */
38953
38954
38955 $curl_includes_stdlib
38956 $curl_includes_ifaddrs
38957
38958int main (void)
38959{
38960
38961 struct ifaddrs *ifa = 0;
38962 int error;
38963
38964 error = getifaddrs(&ifa);
38965 if(error || !ifa)
38966 exit(1); /* fail */
38967 else
38968 exit(0);
38969
38970 ;
38971 return 0;
38972}
38973
38974_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080038975if ac_fn_c_try_run "$LINENO"
38976then :
38977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38978printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038979 tst_works_getifaddrs="yes"
38980
Elliott Hughesf344baa2021-12-07 09:12:34 -080038981else $as_nop
38982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38983printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038984 tst_works_getifaddrs="no"
38985
38986fi
38987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38988 conftest.$ac_objext conftest.beam conftest.$ac_ext
38989fi
38990
Elliott Hughesa93fb052018-12-12 14:22:48 -080038991 LD_LIBRARY_PATH=$old # restore
38992
Elliott Hughes82be86d2017-09-20 17:00:17 -070038993 fi
38994 #
38995 if test "$tst_compi_getifaddrs" = "yes" &&
38996 test "$tst_works_getifaddrs" != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080038997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getifaddrs usage allowed" >&5
38998printf %s "checking if getifaddrs usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070038999 if test "x$curl_disallow_getifaddrs" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39001printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039002 tst_allow_getifaddrs="yes"
39003 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080039004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39005printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039006 tst_allow_getifaddrs="no"
39007 fi
39008 fi
39009 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080039010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getifaddrs might be used" >&5
39011printf %s "checking if getifaddrs might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039012 if test "$tst_links_getifaddrs" = "yes" &&
39013 test "$tst_proto_getifaddrs" = "yes" &&
39014 test "$tst_compi_getifaddrs" = "yes" &&
39015 test "$tst_allow_getifaddrs" = "yes" &&
39016 test "$tst_works_getifaddrs" != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39018printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039019
Elliott Hughesf344baa2021-12-07 09:12:34 -080039020printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070039021
39022 curl_cv_func_getifaddrs="yes"
39023 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080039024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39025printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039026 curl_cv_func_getifaddrs="no"
39027 fi
39028
39029
Elliott Hughes82be86d2017-09-20 17:00:17 -070039030curl_includes_time="\
39031/* includes start */
39032#ifdef HAVE_SYS_TYPES_H
39033# include <sys/types.h>
39034#endif
39035#ifdef HAVE_SYS_TIME_H
39036# include <sys/time.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070039037#endif
Elliott Hughes34dd5f42021-08-10 13:01:18 -070039038#include <time.h>
Elliott Hughes82be86d2017-09-20 17:00:17 -070039039/* includes end */"
Elliott Hughesf344baa2021-12-07 09:12:34 -080039040 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_time
Elliott Hughes82be86d2017-09-20 17:00:17 -070039041"
Elliott Hughesf344baa2021-12-07 09:12:34 -080039042if test "x$ac_cv_header_sys_types_h" = xyes
39043then :
39044 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070039045
39046fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080039047ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$curl_includes_time
39048"
39049if test "x$ac_cv_header_sys_time_h" = xyes
39050then :
39051 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070039052
Elliott Hughesf344baa2021-12-07 09:12:34 -080039053fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070039054
39055
39056
39057 #
39058 tst_links_gmtime_r="unknown"
39059 tst_proto_gmtime_r="unknown"
39060 tst_compi_gmtime_r="unknown"
39061 tst_works_gmtime_r="unknown"
39062 tst_allow_gmtime_r="unknown"
39063 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080039064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gmtime_r can be linked" >&5
39065printf %s "checking if gmtime_r can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39067/* end confdefs.h. */
39068
39069
39070#define gmtime_r innocuous_gmtime_r
39071#ifdef __STDC__
39072# include <limits.h>
39073#else
39074# include <assert.h>
39075#endif
39076#undef gmtime_r
39077#ifdef __cplusplus
39078extern "C"
39079#endif
39080char gmtime_r ();
39081#if defined __stub_gmtime_r || defined __stub___gmtime_r
39082choke me
39083#endif
39084
39085int main (void)
39086{
39087return gmtime_r ();
39088 ;
39089 return 0;
39090}
39091
39092_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080039093if ac_fn_c_try_link "$LINENO"
39094then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070039095
Elliott Hughesf344baa2021-12-07 09:12:34 -080039096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39097printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039098 tst_links_gmtime_r="yes"
39099
Elliott Hughesf344baa2021-12-07 09:12:34 -080039100else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070039101
Elliott Hughesf344baa2021-12-07 09:12:34 -080039102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39103printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039104 tst_links_gmtime_r="no"
39105
39106fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080039107rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070039108 conftest$ac_exeext conftest.$ac_ext
39109 #
39110 if test "$tst_links_gmtime_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gmtime_r is prototyped" >&5
39112printf %s "checking if gmtime_r is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39114/* end confdefs.h. */
39115
39116 $curl_includes_time
39117
39118_ACEOF
39119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080039120 $EGREP "gmtime_r" >/dev/null 2>&1
39121then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070039122
Elliott Hughesf344baa2021-12-07 09:12:34 -080039123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39124printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039125 tst_proto_gmtime_r="yes"
39126
Elliott Hughesf344baa2021-12-07 09:12:34 -080039127else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070039128
Elliott Hughesf344baa2021-12-07 09:12:34 -080039129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39130printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039131 tst_proto_gmtime_r="no"
39132
39133fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080039134rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070039135
39136 fi
39137 #
39138 if test "$tst_proto_gmtime_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gmtime_r is compilable" >&5
39140printf %s "checking if gmtime_r is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39142/* end confdefs.h. */
39143
39144
39145 $curl_includes_time
39146
39147int main (void)
39148{
39149
39150 if(0 != gmtime_r(0, 0))
39151 return 1;
39152
39153 ;
39154 return 0;
39155}
39156
39157_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080039158if ac_fn_c_try_compile "$LINENO"
39159then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070039160
Elliott Hughesf344baa2021-12-07 09:12:34 -080039161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39162printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039163 tst_compi_gmtime_r="yes"
39164
Elliott Hughesf344baa2021-12-07 09:12:34 -080039165else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070039166
Elliott Hughesf344baa2021-12-07 09:12:34 -080039167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39168printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039169 tst_compi_gmtime_r="no"
39170
39171fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080039172rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070039173 fi
39174 #
39175 if test "x$cross_compiling" != "xyes" &&
39176 test "$tst_compi_gmtime_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gmtime_r seems to work" >&5
39178printf %s "checking if gmtime_r seems to work... " >&6; }
Elliott Hughesa93fb052018-12-12 14:22:48 -080039179
Elliott Hughesa93fb052018-12-12 14:22:48 -080039180 old=$LD_LIBRARY_PATH
39181 LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
39182 export LD_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080039183 if test "$cross_compiling" = yes
39184then :
39185 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
39186printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070039187as_fn_error $? "cannot run test program while cross compiling
39188See \`config.log' for more details" "$LINENO" 5; }
Elliott Hughesf344baa2021-12-07 09:12:34 -080039189else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070039190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39191/* end confdefs.h. */
39192
39193
39194 $curl_includes_stdlib
39195 $curl_includes_time
39196
39197int main (void)
39198{
39199
39200 time_t local = 1170352587;
39201 struct tm *gmt = 0;
39202 struct tm result;
39203 gmt = gmtime_r(&local, &result);
39204 if(gmt)
39205 exit(0);
39206 else
39207 exit(1);
39208
39209 ;
39210 return 0;
39211}
39212
39213_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080039214if ac_fn_c_try_run "$LINENO"
39215then :
39216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39217printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039218 tst_works_gmtime_r="yes"
39219
Elliott Hughesf344baa2021-12-07 09:12:34 -080039220else $as_nop
39221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39222printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039223 tst_works_gmtime_r="no"
39224
39225fi
39226rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39227 conftest.$ac_objext conftest.beam conftest.$ac_ext
39228fi
39229
Elliott Hughesa93fb052018-12-12 14:22:48 -080039230 LD_LIBRARY_PATH=$old # restore
39231
Elliott Hughes82be86d2017-09-20 17:00:17 -070039232 fi
39233 #
39234 if test "$tst_compi_gmtime_r" = "yes" &&
39235 test "$tst_works_gmtime_r" != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gmtime_r usage allowed" >&5
39237printf %s "checking if gmtime_r usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039238 if test "x$curl_disallow_gmtime_r" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39240printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039241 tst_allow_gmtime_r="yes"
39242 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080039243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39244printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039245 tst_allow_gmtime_r="no"
39246 fi
39247 fi
39248 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080039249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gmtime_r might be used" >&5
39250printf %s "checking if gmtime_r might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039251 if test "$tst_links_gmtime_r" = "yes" &&
39252 test "$tst_proto_gmtime_r" = "yes" &&
39253 test "$tst_compi_gmtime_r" = "yes" &&
39254 test "$tst_allow_gmtime_r" = "yes" &&
39255 test "$tst_works_gmtime_r" != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39257printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039258
Elliott Hughesf344baa2021-12-07 09:12:34 -080039259printf "%s\n" "#define HAVE_GMTIME_R 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070039260
39261 curl_cv_func_gmtime_r="yes"
39262 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080039263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39264printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039265 curl_cv_func_gmtime_r="no"
39266 fi
39267
39268
39269curl_includes_arpa_inet="\
39270/* includes start */
39271#ifdef HAVE_SYS_TYPES_H
39272# include <sys/types.h>
39273#endif
39274#ifdef HAVE_SYS_SOCKET_H
39275# include <sys/socket.h>
39276#endif
39277#ifdef HAVE_NETINET_IN_H
39278# include <netinet/in.h>
39279#endif
39280#ifdef HAVE_ARPA_INET_H
39281# include <arpa/inet.h>
39282#endif
39283#ifdef HAVE_WINSOCK2_H
39284#include <winsock2.h>
39285#include <ws2tcpip.h>
39286#endif
39287/* includes end */"
Elliott Hughesf344baa2021-12-07 09:12:34 -080039288 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_arpa_inet
Elliott Hughes82be86d2017-09-20 17:00:17 -070039289"
Elliott Hughesf344baa2021-12-07 09:12:34 -080039290if test "x$ac_cv_header_sys_types_h" = xyes
39291then :
39292 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070039293
39294fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080039295ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$curl_includes_arpa_inet
39296"
39297if test "x$ac_cv_header_sys_socket_h" = xyes
39298then :
39299 printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070039300
Elliott Hughesf344baa2021-12-07 09:12:34 -080039301fi
39302ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$curl_includes_arpa_inet
39303"
39304if test "x$ac_cv_header_netinet_in_h" = xyes
39305then :
39306 printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
39307
39308fi
39309ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$curl_includes_arpa_inet
39310"
39311if test "x$ac_cv_header_arpa_inet_h" = xyes
39312then :
39313 printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h
39314
39315fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070039316
39317
39318
Elliott Hughes82be86d2017-09-20 17:00:17 -070039319 #
39320 tst_links_inet_ntop="unknown"
39321 tst_proto_inet_ntop="unknown"
39322 tst_compi_inet_ntop="unknown"
39323 tst_works_inet_ntop="unknown"
39324 tst_allow_inet_ntop="unknown"
39325 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080039326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if inet_ntop can be linked" >&5
39327printf %s "checking if inet_ntop can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39329/* end confdefs.h. */
39330
39331
39332#define inet_ntop innocuous_inet_ntop
39333#ifdef __STDC__
39334# include <limits.h>
39335#else
39336# include <assert.h>
39337#endif
39338#undef inet_ntop
39339#ifdef __cplusplus
39340extern "C"
39341#endif
39342char inet_ntop ();
39343#if defined __stub_inet_ntop || defined __stub___inet_ntop
39344choke me
39345#endif
39346
39347int main (void)
39348{
39349return inet_ntop ();
39350 ;
39351 return 0;
39352}
39353
39354_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080039355if ac_fn_c_try_link "$LINENO"
39356then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070039357
Elliott Hughesf344baa2021-12-07 09:12:34 -080039358 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39359printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039360 tst_links_inet_ntop="yes"
39361
Elliott Hughesf344baa2021-12-07 09:12:34 -080039362else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070039363
Elliott Hughesf344baa2021-12-07 09:12:34 -080039364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39365printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039366 tst_links_inet_ntop="no"
39367
39368fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080039369rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070039370 conftest$ac_exeext conftest.$ac_ext
39371 #
39372 if test "$tst_links_inet_ntop" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if inet_ntop is prototyped" >&5
39374printf %s "checking if inet_ntop is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39376/* end confdefs.h. */
39377
39378 $curl_includes_arpa_inet
39379
39380_ACEOF
39381if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080039382 $EGREP "inet_ntop" >/dev/null 2>&1
39383then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070039384
Elliott Hughesf344baa2021-12-07 09:12:34 -080039385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39386printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039387 tst_proto_inet_ntop="yes"
39388
Elliott Hughesf344baa2021-12-07 09:12:34 -080039389else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070039390
Elliott Hughesf344baa2021-12-07 09:12:34 -080039391 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39392printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039393 tst_proto_inet_ntop="no"
39394
39395fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080039396rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070039397
39398 fi
39399 #
39400 if test "$tst_proto_inet_ntop" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if inet_ntop is compilable" >&5
39402printf %s "checking if inet_ntop is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39404/* end confdefs.h. */
39405
39406
39407 $curl_includes_arpa_inet
39408
39409int main (void)
39410{
39411
39412 if(0 != inet_ntop(0, 0, 0, 0))
39413 return 1;
39414
39415 ;
39416 return 0;
39417}
39418
39419_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080039420if ac_fn_c_try_compile "$LINENO"
39421then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070039422
Elliott Hughesf344baa2021-12-07 09:12:34 -080039423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39424printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039425 tst_compi_inet_ntop="yes"
39426
Elliott Hughesf344baa2021-12-07 09:12:34 -080039427else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070039428
Elliott Hughesf344baa2021-12-07 09:12:34 -080039429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39430printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039431 tst_compi_inet_ntop="no"
39432
39433fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080039434rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070039435 fi
39436 #
39437 if test "x$cross_compiling" != "xyes" &&
39438 test "$tst_compi_inet_ntop" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if inet_ntop seems to work" >&5
39440printf %s "checking if inet_ntop seems to work... " >&6; }
Elliott Hughesa93fb052018-12-12 14:22:48 -080039441
Elliott Hughesa93fb052018-12-12 14:22:48 -080039442 old=$LD_LIBRARY_PATH
39443 LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
39444 export LD_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080039445 if test "$cross_compiling" = yes
39446then :
39447 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
39448printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070039449as_fn_error $? "cannot run test program while cross compiling
39450See \`config.log' for more details" "$LINENO" 5; }
Elliott Hughesf344baa2021-12-07 09:12:34 -080039451else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070039452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39453/* end confdefs.h. */
39454
39455
39456 $curl_includes_stdlib
39457 $curl_includes_arpa_inet
39458 $curl_includes_string
39459
39460int main (void)
39461{
39462
39463 char ipv6res[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
39464 char ipv4res[sizeof "255.255.255.255"];
39465 unsigned char ipv6a[26];
39466 unsigned char ipv4a[5];
39467 char *ipv6ptr = 0;
39468 char *ipv4ptr = 0;
39469 /* - */
39470 ipv4res[0] = '\0';
39471 ipv4a[0] = 0xc0;
39472 ipv4a[1] = 0xa8;
39473 ipv4a[2] = 0x64;
39474 ipv4a[3] = 0x01;
39475 ipv4a[4] = 0x01;
39476 /* - */
39477 ipv4ptr = inet_ntop(AF_INET, ipv4a, ipv4res, sizeof(ipv4res));
39478 if(!ipv4ptr)
39479 exit(1); /* fail */
39480 if(ipv4ptr != ipv4res)
39481 exit(1); /* fail */
39482 if(!ipv4ptr[0])
39483 exit(1); /* fail */
39484 if(memcmp(ipv4res, "192.168.100.1", 13) != 0)
39485 exit(1); /* fail */
39486 /* - */
39487 ipv6res[0] = '\0';
39488 memset(ipv6a, 0, sizeof(ipv6a));
39489 ipv6a[0] = 0xfe;
39490 ipv6a[1] = 0x80;
39491 ipv6a[8] = 0x02;
39492 ipv6a[9] = 0x14;
39493 ipv6a[10] = 0x4f;
39494 ipv6a[11] = 0xff;
39495 ipv6a[12] = 0xfe;
39496 ipv6a[13] = 0x0b;
39497 ipv6a[14] = 0x76;
39498 ipv6a[15] = 0xc8;
39499 ipv6a[25] = 0x01;
39500 /* - */
39501 ipv6ptr = inet_ntop(AF_INET6, ipv6a, ipv6res, sizeof(ipv6res));
39502 if(!ipv6ptr)
39503 exit(1); /* fail */
39504 if(ipv6ptr != ipv6res)
39505 exit(1); /* fail */
39506 if(!ipv6ptr[0])
39507 exit(1); /* fail */
39508 if(memcmp(ipv6res, "fe80::214:4fff:fe0b:76c8", 24) != 0)
39509 exit(1); /* fail */
39510 /* - */
39511 exit(0);
39512
39513 ;
39514 return 0;
39515}
39516
39517_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080039518if ac_fn_c_try_run "$LINENO"
39519then :
39520 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39521printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039522 tst_works_inet_ntop="yes"
39523
Elliott Hughesf344baa2021-12-07 09:12:34 -080039524else $as_nop
39525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39526printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039527 tst_works_inet_ntop="no"
39528
39529fi
39530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39531 conftest.$ac_objext conftest.beam conftest.$ac_ext
39532fi
39533
Elliott Hughesa93fb052018-12-12 14:22:48 -080039534 LD_LIBRARY_PATH=$old # restore
39535
Elliott Hughes82be86d2017-09-20 17:00:17 -070039536 fi
39537 #
39538 if test "$tst_compi_inet_ntop" = "yes" &&
39539 test "$tst_works_inet_ntop" != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if inet_ntop usage allowed" >&5
39541printf %s "checking if inet_ntop usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039542 if test "x$curl_disallow_inet_ntop" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39544printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039545 tst_allow_inet_ntop="yes"
39546 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080039547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39548printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039549 tst_allow_inet_ntop="no"
39550 fi
39551 fi
39552 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080039553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if inet_ntop might be used" >&5
39554printf %s "checking if inet_ntop might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039555 if test "$tst_links_inet_ntop" = "yes" &&
39556 test "$tst_proto_inet_ntop" = "yes" &&
39557 test "$tst_compi_inet_ntop" = "yes" &&
39558 test "$tst_allow_inet_ntop" = "yes" &&
39559 test "$tst_works_inet_ntop" != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39561printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039562
Elliott Hughesf344baa2021-12-07 09:12:34 -080039563printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070039564
39565 curl_cv_func_inet_ntop="yes"
39566 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080039567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39568printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039569 curl_cv_func_inet_ntop="no"
39570 fi
39571
39572
39573 #
39574 tst_links_inet_pton="unknown"
39575 tst_proto_inet_pton="unknown"
39576 tst_compi_inet_pton="unknown"
39577 tst_works_inet_pton="unknown"
39578 tst_allow_inet_pton="unknown"
39579 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080039580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if inet_pton can be linked" >&5
39581printf %s "checking if inet_pton can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39583/* end confdefs.h. */
39584
39585
39586#define inet_pton innocuous_inet_pton
39587#ifdef __STDC__
39588# include <limits.h>
39589#else
39590# include <assert.h>
39591#endif
39592#undef inet_pton
39593#ifdef __cplusplus
39594extern "C"
39595#endif
39596char inet_pton ();
39597#if defined __stub_inet_pton || defined __stub___inet_pton
39598choke me
39599#endif
39600
39601int main (void)
39602{
39603return inet_pton ();
39604 ;
39605 return 0;
39606}
39607
39608_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080039609if ac_fn_c_try_link "$LINENO"
39610then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070039611
Elliott Hughesf344baa2021-12-07 09:12:34 -080039612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39613printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039614 tst_links_inet_pton="yes"
39615
Elliott Hughesf344baa2021-12-07 09:12:34 -080039616else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070039617
Elliott Hughesf344baa2021-12-07 09:12:34 -080039618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39619printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039620 tst_links_inet_pton="no"
39621
39622fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080039623rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070039624 conftest$ac_exeext conftest.$ac_ext
39625 #
39626 if test "$tst_links_inet_pton" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039627 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if inet_pton is prototyped" >&5
39628printf %s "checking if inet_pton is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39630/* end confdefs.h. */
39631
39632 $curl_includes_arpa_inet
39633
39634_ACEOF
39635if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080039636 $EGREP "inet_pton" >/dev/null 2>&1
39637then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070039638
Elliott Hughesf344baa2021-12-07 09:12:34 -080039639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39640printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039641 tst_proto_inet_pton="yes"
39642
Elliott Hughesf344baa2021-12-07 09:12:34 -080039643else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070039644
Elliott Hughesf344baa2021-12-07 09:12:34 -080039645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39646printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039647 tst_proto_inet_pton="no"
39648
39649fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080039650rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070039651
39652 fi
39653 #
39654 if test "$tst_proto_inet_pton" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if inet_pton is compilable" >&5
39656printf %s "checking if inet_pton is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39658/* end confdefs.h. */
39659
39660
39661 $curl_includes_arpa_inet
39662
39663int main (void)
39664{
39665
39666 if(0 != inet_pton(0, 0, 0))
39667 return 1;
39668
39669 ;
39670 return 0;
39671}
39672
39673_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080039674if ac_fn_c_try_compile "$LINENO"
39675then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070039676
Elliott Hughesf344baa2021-12-07 09:12:34 -080039677 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39678printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039679 tst_compi_inet_pton="yes"
39680
Elliott Hughesf344baa2021-12-07 09:12:34 -080039681else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070039682
Elliott Hughesf344baa2021-12-07 09:12:34 -080039683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39684printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039685 tst_compi_inet_pton="no"
39686
39687fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080039688rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070039689 fi
39690 #
39691 if test "x$cross_compiling" != "xyes" &&
39692 test "$tst_compi_inet_pton" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if inet_pton seems to work" >&5
39694printf %s "checking if inet_pton seems to work... " >&6; }
Elliott Hughesa93fb052018-12-12 14:22:48 -080039695
Elliott Hughesa93fb052018-12-12 14:22:48 -080039696 old=$LD_LIBRARY_PATH
39697 LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
39698 export LD_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080039699 if test "$cross_compiling" = yes
39700then :
39701 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
39702printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070039703as_fn_error $? "cannot run test program while cross compiling
39704See \`config.log' for more details" "$LINENO" 5; }
Elliott Hughesf344baa2021-12-07 09:12:34 -080039705else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070039706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39707/* end confdefs.h. */
39708
39709
39710 $curl_includes_stdlib
39711 $curl_includes_arpa_inet
39712 $curl_includes_string
39713
39714int main (void)
39715{
39716
39717 unsigned char ipv6a[16+1];
39718 unsigned char ipv4a[4+1];
39719 const char *ipv6src = "fe80::214:4fff:fe0b:76c8";
39720 const char *ipv4src = "192.168.100.1";
39721 /* - */
39722 memset(ipv4a, 1, sizeof(ipv4a));
39723 if(1 != inet_pton(AF_INET, ipv4src, ipv4a))
39724 exit(1); /* fail */
39725 /* - */
39726 if( (ipv4a[0] != 0xc0) ||
39727 (ipv4a[1] != 0xa8) ||
39728 (ipv4a[2] != 0x64) ||
39729 (ipv4a[3] != 0x01) ||
39730 (ipv4a[4] != 0x01) )
39731 exit(1); /* fail */
39732 /* - */
39733 memset(ipv6a, 1, sizeof(ipv6a));
39734 if(1 != inet_pton(AF_INET6, ipv6src, ipv6a))
39735 exit(1); /* fail */
39736 /* - */
39737 if( (ipv6a[0] != 0xfe) ||
39738 (ipv6a[1] != 0x80) ||
39739 (ipv6a[8] != 0x02) ||
39740 (ipv6a[9] != 0x14) ||
39741 (ipv6a[10] != 0x4f) ||
39742 (ipv6a[11] != 0xff) ||
39743 (ipv6a[12] != 0xfe) ||
39744 (ipv6a[13] != 0x0b) ||
39745 (ipv6a[14] != 0x76) ||
39746 (ipv6a[15] != 0xc8) ||
39747 (ipv6a[16] != 0x01) )
39748 exit(1); /* fail */
39749 /* - */
39750 if( (ipv6a[2] != 0x0) ||
39751 (ipv6a[3] != 0x0) ||
39752 (ipv6a[4] != 0x0) ||
39753 (ipv6a[5] != 0x0) ||
39754 (ipv6a[6] != 0x0) ||
39755 (ipv6a[7] != 0x0) )
39756 exit(1); /* fail */
39757 /* - */
39758 exit(0);
39759
39760 ;
39761 return 0;
39762}
39763
39764_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080039765if ac_fn_c_try_run "$LINENO"
39766then :
39767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39768printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039769 tst_works_inet_pton="yes"
39770
Elliott Hughesf344baa2021-12-07 09:12:34 -080039771else $as_nop
39772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39773printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039774 tst_works_inet_pton="no"
39775
39776fi
39777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39778 conftest.$ac_objext conftest.beam conftest.$ac_ext
39779fi
39780
Elliott Hughesa93fb052018-12-12 14:22:48 -080039781 LD_LIBRARY_PATH=$old # restore
39782
Elliott Hughes82be86d2017-09-20 17:00:17 -070039783 fi
39784 #
39785 if test "$tst_compi_inet_pton" = "yes" &&
39786 test "$tst_works_inet_pton" != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039787 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if inet_pton usage allowed" >&5
39788printf %s "checking if inet_pton usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039789 if test "x$curl_disallow_inet_pton" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39791printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039792 tst_allow_inet_pton="yes"
39793 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080039794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39795printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039796 tst_allow_inet_pton="no"
39797 fi
39798 fi
39799 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080039800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if inet_pton might be used" >&5
39801printf %s "checking if inet_pton might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039802 if test "$tst_links_inet_pton" = "yes" &&
39803 test "$tst_proto_inet_pton" = "yes" &&
39804 test "$tst_compi_inet_pton" = "yes" &&
39805 test "$tst_allow_inet_pton" = "yes" &&
39806 test "$tst_works_inet_pton" != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39808printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039809
Elliott Hughesf344baa2021-12-07 09:12:34 -080039810printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070039811
39812 curl_cv_func_inet_pton="yes"
39813 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080039814 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39815printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039816 curl_cv_func_inet_pton="no"
39817 fi
39818
39819
39820curl_includes_stropts="\
39821/* includes start */
39822#ifdef HAVE_SYS_TYPES_H
39823# include <sys/types.h>
39824#endif
39825#ifdef HAVE_UNISTD_H
39826# include <unistd.h>
39827#endif
39828#ifdef HAVE_SYS_SOCKET_H
39829# include <sys/socket.h>
39830#endif
39831#ifdef HAVE_SYS_IOCTL_H
39832# include <sys/ioctl.h>
39833#endif
39834#ifdef HAVE_STROPTS_H
39835# include <stropts.h>
39836#endif
39837/* includes end */"
Elliott Hughesf344baa2021-12-07 09:12:34 -080039838 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_stropts
Elliott Hughes82be86d2017-09-20 17:00:17 -070039839"
Elliott Hughesf344baa2021-12-07 09:12:34 -080039840if test "x$ac_cv_header_sys_types_h" = xyes
39841then :
39842 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070039843
39844fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080039845ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$curl_includes_stropts
39846"
39847if test "x$ac_cv_header_unistd_h" = xyes
39848then :
39849 printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070039850
Elliott Hughesf344baa2021-12-07 09:12:34 -080039851fi
39852ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$curl_includes_stropts
39853"
39854if test "x$ac_cv_header_sys_socket_h" = xyes
39855then :
39856 printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
39857
39858fi
39859ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$curl_includes_stropts
39860"
39861if test "x$ac_cv_header_sys_ioctl_h" = xyes
39862then :
39863 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
39864
39865fi
39866ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$curl_includes_stropts
39867"
39868if test "x$ac_cv_header_stropts_h" = xyes
39869then :
39870 printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
39871
39872fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070039873
39874
39875
39876 #
39877 tst_links_ioctl="unknown"
39878 tst_proto_ioctl="unknown"
39879 tst_compi_ioctl="unknown"
39880 tst_allow_ioctl="unknown"
39881 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080039882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctl can be linked" >&5
39883printf %s "checking if ioctl can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39885/* end confdefs.h. */
39886
39887
39888#define ioctl innocuous_ioctl
39889#ifdef __STDC__
39890# include <limits.h>
39891#else
39892# include <assert.h>
39893#endif
39894#undef ioctl
39895#ifdef __cplusplus
39896extern "C"
39897#endif
39898char ioctl ();
39899#if defined __stub_ioctl || defined __stub___ioctl
39900choke me
39901#endif
39902
39903int main (void)
39904{
39905return ioctl ();
39906 ;
39907 return 0;
39908}
39909
39910_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080039911if ac_fn_c_try_link "$LINENO"
39912then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070039913
Elliott Hughesf344baa2021-12-07 09:12:34 -080039914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39915printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039916 tst_links_ioctl="yes"
39917
Elliott Hughesf344baa2021-12-07 09:12:34 -080039918else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070039919
Elliott Hughesf344baa2021-12-07 09:12:34 -080039920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39921printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039922 tst_links_ioctl="no"
39923
39924fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080039925rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070039926 conftest$ac_exeext conftest.$ac_ext
39927 #
39928 if test "$tst_links_ioctl" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctl is prototyped" >&5
39930printf %s "checking if ioctl is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39932/* end confdefs.h. */
39933
39934 $curl_includes_stropts
39935
39936_ACEOF
39937if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080039938 $EGREP "ioctl" >/dev/null 2>&1
39939then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070039940
Elliott Hughesf344baa2021-12-07 09:12:34 -080039941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39942printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039943 tst_proto_ioctl="yes"
39944
Elliott Hughesf344baa2021-12-07 09:12:34 -080039945else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070039946
Elliott Hughesf344baa2021-12-07 09:12:34 -080039947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39948printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039949 tst_proto_ioctl="no"
39950
39951fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080039952rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070039953
39954 fi
39955 #
39956 if test "$tst_proto_ioctl" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctl is compilable" >&5
39958printf %s "checking if ioctl is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39960/* end confdefs.h. */
39961
39962
39963 $curl_includes_stropts
39964
39965int main (void)
39966{
39967
39968 if(0 != ioctl(0, 0, 0))
39969 return 1;
39970
39971 ;
39972 return 0;
39973}
39974
39975_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080039976if ac_fn_c_try_compile "$LINENO"
39977then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070039978
Elliott Hughesf344baa2021-12-07 09:12:34 -080039979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39980printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039981 tst_compi_ioctl="yes"
39982
Elliott Hughesf344baa2021-12-07 09:12:34 -080039983else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070039984
Elliott Hughesf344baa2021-12-07 09:12:34 -080039985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39986printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039987 tst_compi_ioctl="no"
39988
39989fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080039990rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070039991 fi
39992 #
39993 if test "$tst_compi_ioctl" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctl usage allowed" >&5
39995printf %s "checking if ioctl usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039996 if test "x$curl_disallow_ioctl" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080039997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39998printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070039999 tst_allow_ioctl="yes"
40000 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080040001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40002printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040003 tst_allow_ioctl="no"
40004 fi
40005 fi
40006 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080040007 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctl might be used" >&5
40008printf %s "checking if ioctl might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040009 if test "$tst_links_ioctl" = "yes" &&
40010 test "$tst_proto_ioctl" = "yes" &&
40011 test "$tst_compi_ioctl" = "yes" &&
40012 test "$tst_allow_ioctl" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40014printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040015
Elliott Hughesf344baa2021-12-07 09:12:34 -080040016printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070040017
40018 curl_cv_func_ioctl="yes"
40019
40020 #
40021 tst_compi_ioctl_fionbio="unknown"
40022 tst_allow_ioctl_fionbio="unknown"
40023 #
40024 if test "$curl_cv_func_ioctl" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctl FIONBIO is compilable" >&5
40026printf %s "checking if ioctl FIONBIO is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40028/* end confdefs.h. */
40029
40030
40031 $curl_includes_stropts
40032
40033int main (void)
40034{
40035
40036 int flags = 0;
40037 if(0 != ioctl(0, FIONBIO, &flags))
40038 return 1;
40039
40040 ;
40041 return 0;
40042}
40043
40044_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080040045if ac_fn_c_try_compile "$LINENO"
40046then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070040047
Elliott Hughesf344baa2021-12-07 09:12:34 -080040048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40049printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040050 tst_compi_ioctl_fionbio="yes"
40051
Elliott Hughesf344baa2021-12-07 09:12:34 -080040052else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040053
Elliott Hughesf344baa2021-12-07 09:12:34 -080040054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40055printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040056 tst_compi_ioctl_fionbio="no"
40057
40058fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080040059rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070040060 fi
40061 #
40062 if test "$tst_compi_ioctl_fionbio" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctl FIONBIO usage allowed" >&5
40064printf %s "checking if ioctl FIONBIO usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040065 if test "x$curl_disallow_ioctl_fionbio" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40067printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040068 tst_allow_ioctl_fionbio="yes"
40069 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080040070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40071printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040072 tst_allow_ioctl_fionbio="no"
40073 fi
40074 fi
40075 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080040076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctl FIONBIO might be used" >&5
40077printf %s "checking if ioctl FIONBIO might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040078 if test "$tst_compi_ioctl_fionbio" = "yes" &&
40079 test "$tst_allow_ioctl_fionbio" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40081printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040082
Elliott Hughesf344baa2021-12-07 09:12:34 -080040083printf "%s\n" "#define HAVE_IOCTL_FIONBIO 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070040084
40085 curl_cv_func_ioctl_fionbio="yes"
40086 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080040087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40088printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040089 curl_cv_func_ioctl_fionbio="no"
40090 fi
40091
40092
40093 #
40094 tst_compi_ioctl_siocgifaddr="unknown"
40095 tst_allow_ioctl_siocgifaddr="unknown"
40096 #
40097 if test "$curl_cv_func_ioctl" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctl SIOCGIFADDR is compilable" >&5
40099printf %s "checking if ioctl SIOCGIFADDR is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40101/* end confdefs.h. */
40102
40103
40104 $curl_includes_stropts
40105 #include <net/if.h>
40106
40107int main (void)
40108{
40109
40110 struct ifreq ifr;
40111 if(0 != ioctl(0, SIOCGIFADDR, &ifr))
40112 return 1;
40113
40114 ;
40115 return 0;
40116}
40117
40118_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080040119if ac_fn_c_try_compile "$LINENO"
40120then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070040121
Elliott Hughesf344baa2021-12-07 09:12:34 -080040122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40123printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040124 tst_compi_ioctl_siocgifaddr="yes"
40125
Elliott Hughesf344baa2021-12-07 09:12:34 -080040126else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040127
Elliott Hughesf344baa2021-12-07 09:12:34 -080040128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40129printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040130 tst_compi_ioctl_siocgifaddr="no"
40131
40132fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080040133rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070040134 fi
40135 #
40136 if test "$tst_compi_ioctl_siocgifaddr" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctl SIOCGIFADDR usage allowed" >&5
40138printf %s "checking if ioctl SIOCGIFADDR usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040139 if test "x$curl_disallow_ioctl_siocgifaddr" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40141printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040142 tst_allow_ioctl_siocgifaddr="yes"
40143 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080040144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40145printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040146 tst_allow_ioctl_siocgifaddr="no"
40147 fi
40148 fi
40149 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080040150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctl SIOCGIFADDR might be used" >&5
40151printf %s "checking if ioctl SIOCGIFADDR might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040152 if test "$tst_compi_ioctl_siocgifaddr" = "yes" &&
40153 test "$tst_allow_ioctl_siocgifaddr" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40155printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040156
Elliott Hughesf344baa2021-12-07 09:12:34 -080040157printf "%s\n" "#define HAVE_IOCTL_SIOCGIFADDR 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070040158
40159 curl_cv_func_ioctl_siocgifaddr="yes"
40160 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080040161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40162printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040163 curl_cv_func_ioctl_siocgifaddr="no"
40164 fi
40165
40166 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080040167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40168printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040169 curl_cv_func_ioctl="no"
40170 fi
40171
40172
40173 #
40174 tst_links_ioctlsocket="unknown"
40175 tst_proto_ioctlsocket="unknown"
40176 tst_compi_ioctlsocket="unknown"
40177 tst_allow_ioctlsocket="unknown"
40178 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080040179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket can be linked" >&5
40180printf %s "checking if ioctlsocket can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40182/* end confdefs.h. */
40183
40184
40185 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070040186 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070040187
40188int main (void)
40189{
40190
40191 if(0 != ioctlsocket(0, 0, 0))
40192 return 1;
40193
40194 ;
40195 return 0;
40196}
40197
40198_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080040199if ac_fn_c_try_link "$LINENO"
40200then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070040201
Elliott Hughesf344baa2021-12-07 09:12:34 -080040202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40203printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040204 tst_links_ioctlsocket="yes"
40205
Elliott Hughesf344baa2021-12-07 09:12:34 -080040206else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040207
Elliott Hughesf344baa2021-12-07 09:12:34 -080040208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40209printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040210 tst_links_ioctlsocket="no"
40211
40212fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080040213rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070040214 conftest$ac_exeext conftest.$ac_ext
40215 #
40216 if test "$tst_links_ioctlsocket" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket is prototyped" >&5
40218printf %s "checking if ioctlsocket is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40220/* end confdefs.h. */
40221
40222 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070040223 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070040224
40225_ACEOF
40226if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080040227 $EGREP "ioctlsocket" >/dev/null 2>&1
40228then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070040229
Elliott Hughesf344baa2021-12-07 09:12:34 -080040230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40231printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040232 tst_proto_ioctlsocket="yes"
40233
Elliott Hughesf344baa2021-12-07 09:12:34 -080040234else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040235
Elliott Hughesf344baa2021-12-07 09:12:34 -080040236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40237printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040238 tst_proto_ioctlsocket="no"
40239
40240fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080040241rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070040242
40243 fi
40244 #
40245 if test "$tst_proto_ioctlsocket" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket is compilable" >&5
40247printf %s "checking if ioctlsocket is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40249/* end confdefs.h. */
40250
40251
40252 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070040253 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070040254
40255int main (void)
40256{
40257
40258 if(0 != ioctlsocket(0, 0, 0))
40259 return 1;
40260
40261 ;
40262 return 0;
40263}
40264
40265_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080040266if ac_fn_c_try_compile "$LINENO"
40267then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070040268
Elliott Hughesf344baa2021-12-07 09:12:34 -080040269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40270printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040271 tst_compi_ioctlsocket="yes"
40272
Elliott Hughesf344baa2021-12-07 09:12:34 -080040273else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040274
Elliott Hughesf344baa2021-12-07 09:12:34 -080040275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40276printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040277 tst_compi_ioctlsocket="no"
40278
40279fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080040280rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070040281 fi
40282 #
40283 if test "$tst_compi_ioctlsocket" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket usage allowed" >&5
40285printf %s "checking if ioctlsocket usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040286 if test "x$curl_disallow_ioctlsocket" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40288printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040289 tst_allow_ioctlsocket="yes"
40290 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080040291 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40292printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040293 tst_allow_ioctlsocket="no"
40294 fi
40295 fi
40296 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080040297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket might be used" >&5
40298printf %s "checking if ioctlsocket might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040299 if test "$tst_links_ioctlsocket" = "yes" &&
40300 test "$tst_proto_ioctlsocket" = "yes" &&
40301 test "$tst_compi_ioctlsocket" = "yes" &&
40302 test "$tst_allow_ioctlsocket" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40304printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040305
Elliott Hughesf344baa2021-12-07 09:12:34 -080040306printf "%s\n" "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070040307
40308 curl_cv_func_ioctlsocket="yes"
40309
40310 #
40311 tst_compi_ioctlsocket_fionbio="unknown"
40312 tst_allow_ioctlsocket_fionbio="unknown"
40313 #
40314 if test "$curl_cv_func_ioctlsocket" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket FIONBIO is compilable" >&5
40316printf %s "checking if ioctlsocket FIONBIO is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40318/* end confdefs.h. */
40319
40320
40321 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070040322 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070040323
40324int main (void)
40325{
40326
40327 int flags = 0;
40328 if(0 != ioctlsocket(0, FIONBIO, &flags))
40329 return 1;
40330
40331 ;
40332 return 0;
40333}
40334
40335_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080040336if ac_fn_c_try_compile "$LINENO"
40337then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070040338
Elliott Hughesf344baa2021-12-07 09:12:34 -080040339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40340printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040341 tst_compi_ioctlsocket_fionbio="yes"
40342
Elliott Hughesf344baa2021-12-07 09:12:34 -080040343else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040344
Elliott Hughesf344baa2021-12-07 09:12:34 -080040345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40346printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040347 tst_compi_ioctlsocket_fionbio="no"
40348
40349fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080040350rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070040351 fi
40352 #
40353 if test "$tst_compi_ioctlsocket_fionbio" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket FIONBIO usage allowed" >&5
40355printf %s "checking if ioctlsocket FIONBIO usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040356 if test "x$curl_disallow_ioctlsocket_fionbio" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40358printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040359 tst_allow_ioctlsocket_fionbio="yes"
40360 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080040361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40362printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040363 tst_allow_ioctlsocket_fionbio="no"
40364 fi
40365 fi
40366 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080040367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket FIONBIO might be used" >&5
40368printf %s "checking if ioctlsocket FIONBIO might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040369 if test "$tst_compi_ioctlsocket_fionbio" = "yes" &&
40370 test "$tst_allow_ioctlsocket_fionbio" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40372printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040373
Elliott Hughesf344baa2021-12-07 09:12:34 -080040374printf "%s\n" "#define HAVE_IOCTLSOCKET_FIONBIO 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070040375
40376 curl_cv_func_ioctlsocket_fionbio="yes"
40377 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080040378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40379printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040380 curl_cv_func_ioctlsocket_fionbio="no"
40381 fi
40382
40383 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080040384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40385printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040386 curl_cv_func_ioctlsocket="no"
40387 fi
40388
40389
40390 #
40391 tst_links_ioctlsocket_camel="unknown"
40392 tst_proto_ioctlsocket_camel="unknown"
40393 tst_compi_ioctlsocket_camel="unknown"
40394 tst_allow_ioctlsocket_camel="unknown"
40395 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080040396 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket can be linked" >&5
40397printf %s "checking if IoctlSocket can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40399/* end confdefs.h. */
40400
40401
40402#define IoctlSocket innocuous_IoctlSocket
40403#ifdef __STDC__
40404# include <limits.h>
40405#else
40406# include <assert.h>
40407#endif
40408#undef IoctlSocket
40409#ifdef __cplusplus
40410extern "C"
40411#endif
40412char IoctlSocket ();
40413#if defined __stub_IoctlSocket || defined __stub___IoctlSocket
40414choke me
40415#endif
40416
40417int main (void)
40418{
40419return IoctlSocket ();
40420 ;
40421 return 0;
40422}
40423
40424_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080040425if ac_fn_c_try_link "$LINENO"
40426then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070040427
Elliott Hughesf344baa2021-12-07 09:12:34 -080040428 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40429printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040430 tst_links_ioctlsocket_camel="yes"
40431
Elliott Hughesf344baa2021-12-07 09:12:34 -080040432else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040433
Elliott Hughesf344baa2021-12-07 09:12:34 -080040434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40435printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040436 tst_links_ioctlsocket_camel="no"
40437
40438fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080040439rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070040440 conftest$ac_exeext conftest.$ac_ext
40441 #
40442 if test "$tst_links_ioctlsocket_camel" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket is prototyped" >&5
40444printf %s "checking if IoctlSocket is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40446/* end confdefs.h. */
40447
40448 $curl_includes_stropts
40449
40450_ACEOF
40451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080040452 $EGREP "IoctlSocket" >/dev/null 2>&1
40453then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070040454
Elliott Hughesf344baa2021-12-07 09:12:34 -080040455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40456printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040457 tst_proto_ioctlsocket_camel="yes"
40458
Elliott Hughesf344baa2021-12-07 09:12:34 -080040459else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040460
Elliott Hughesf344baa2021-12-07 09:12:34 -080040461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40462printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040463 tst_proto_ioctlsocket_camel="no"
40464
40465fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080040466rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070040467
40468 fi
40469 #
40470 if test "$tst_proto_ioctlsocket_camel" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket is compilable" >&5
40472printf %s "checking if IoctlSocket is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40474/* end confdefs.h. */
40475
40476
40477 $curl_includes_stropts
40478
40479int main (void)
40480{
40481
40482 if(0 != IoctlSocket(0, 0, 0))
40483 return 1;
40484
40485 ;
40486 return 0;
40487}
40488
40489_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080040490if ac_fn_c_try_compile "$LINENO"
40491then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070040492
Elliott Hughesf344baa2021-12-07 09:12:34 -080040493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40494printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040495 tst_compi_ioctlsocket_camel="yes"
40496
Elliott Hughesf344baa2021-12-07 09:12:34 -080040497else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040498
Elliott Hughesf344baa2021-12-07 09:12:34 -080040499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40500printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040501 tst_compi_ioctlsocket_camel="no"
40502
40503fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080040504rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070040505 fi
40506 #
40507 if test "$tst_compi_ioctlsocket_camel" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket usage allowed" >&5
40509printf %s "checking if IoctlSocket usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040510 if test "x$curl_disallow_ioctlsocket_camel" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40512printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040513 tst_allow_ioctlsocket_camel="yes"
40514 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080040515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40516printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040517 tst_allow_ioctlsocket_camel="no"
40518 fi
40519 fi
40520 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080040521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket might be used" >&5
40522printf %s "checking if IoctlSocket might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040523 if test "$tst_links_ioctlsocket_camel" = "yes" &&
40524 test "$tst_proto_ioctlsocket_camel" = "yes" &&
40525 test "$tst_compi_ioctlsocket_camel" = "yes" &&
40526 test "$tst_allow_ioctlsocket_camel" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040527 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40528printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040529
Elliott Hughesf344baa2021-12-07 09:12:34 -080040530printf "%s\n" "#define HAVE_IOCTLSOCKET_CAMEL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070040531
40532 curl_cv_func_ioctlsocket_camel="yes"
40533
40534 #
40535 tst_compi_ioctlsocket_camel_fionbio="unknown"
40536 tst_allow_ioctlsocket_camel_fionbio="unknown"
40537 #
40538 if test "$curl_cv_func_ioctlsocket_camel" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket FIONBIO is compilable" >&5
40540printf %s "checking if IoctlSocket FIONBIO is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40542/* end confdefs.h. */
40543
40544
40545 $curl_includes_stropts
40546
40547int main (void)
40548{
40549
40550 long flags = 0;
Elliott Hughes34dd5f42021-08-10 13:01:18 -070040551 if(0 != IoctlSocket(0, FIONBIO, &flags))
Elliott Hughes82be86d2017-09-20 17:00:17 -070040552 return 1;
40553
40554 ;
40555 return 0;
40556}
40557
40558_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080040559if ac_fn_c_try_compile "$LINENO"
40560then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070040561
Elliott Hughesf344baa2021-12-07 09:12:34 -080040562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40563printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040564 tst_compi_ioctlsocket_camel_fionbio="yes"
40565
Elliott Hughesf344baa2021-12-07 09:12:34 -080040566else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040567
Elliott Hughesf344baa2021-12-07 09:12:34 -080040568 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40569printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040570 tst_compi_ioctlsocket_camel_fionbio="no"
40571
40572fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080040573rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070040574 fi
40575 #
40576 if test "$tst_compi_ioctlsocket_camel_fionbio" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket FIONBIO usage allowed" >&5
40578printf %s "checking if IoctlSocket FIONBIO usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040579 if test "x$curl_disallow_ioctlsocket_camel_fionbio" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40581printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040582 tst_allow_ioctlsocket_camel_fionbio="yes"
40583 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080040584 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40585printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040586 tst_allow_ioctlsocket_camel_fionbio="no"
40587 fi
40588 fi
40589 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080040590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket FIONBIO might be used" >&5
40591printf %s "checking if IoctlSocket FIONBIO might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040592 if test "$tst_compi_ioctlsocket_camel_fionbio" = "yes" &&
40593 test "$tst_allow_ioctlsocket_camel_fionbio" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40595printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040596
Elliott Hughesf344baa2021-12-07 09:12:34 -080040597printf "%s\n" "#define HAVE_IOCTLSOCKET_CAMEL_FIONBIO 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070040598
40599 curl_cv_func_ioctlsocket_camel_fionbio="yes"
40600 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080040601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40602printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040603 curl_cv_func_ioctlsocket_camel_fionbio="no"
40604 fi
40605
40606 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080040607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40608printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040609 curl_cv_func_ioctlsocket_camel="no"
40610 fi
40611
40612
40613 #
40614 tst_links_localtime_r="unknown"
40615 tst_proto_localtime_r="unknown"
40616 tst_compi_localtime_r="unknown"
40617 tst_works_localtime_r="unknown"
40618 tst_allow_localtime_r="unknown"
40619 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080040620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if localtime_r can be linked" >&5
40621printf %s "checking if localtime_r can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40623/* end confdefs.h. */
40624
40625
40626#define localtime_r innocuous_localtime_r
40627#ifdef __STDC__
40628# include <limits.h>
40629#else
40630# include <assert.h>
40631#endif
40632#undef localtime_r
40633#ifdef __cplusplus
40634extern "C"
40635#endif
40636char localtime_r ();
40637#if defined __stub_localtime_r || defined __stub___localtime_r
40638choke me
40639#endif
40640
40641int main (void)
40642{
40643return localtime_r ();
40644 ;
40645 return 0;
40646}
40647
40648_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080040649if ac_fn_c_try_link "$LINENO"
40650then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070040651
Elliott Hughesf344baa2021-12-07 09:12:34 -080040652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40653printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040654 tst_links_localtime_r="yes"
40655
Elliott Hughesf344baa2021-12-07 09:12:34 -080040656else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040657
Elliott Hughesf344baa2021-12-07 09:12:34 -080040658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40659printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040660 tst_links_localtime_r="no"
40661
40662fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080040663rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070040664 conftest$ac_exeext conftest.$ac_ext
40665 #
40666 if test "$tst_links_localtime_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if localtime_r is prototyped" >&5
40668printf %s "checking if localtime_r is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40670/* end confdefs.h. */
40671
40672 $curl_includes_time
40673
40674_ACEOF
40675if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080040676 $EGREP "localtime_r" >/dev/null 2>&1
40677then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070040678
Elliott Hughesf344baa2021-12-07 09:12:34 -080040679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40680printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040681 tst_proto_localtime_r="yes"
40682
Elliott Hughesf344baa2021-12-07 09:12:34 -080040683else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040684
Elliott Hughesf344baa2021-12-07 09:12:34 -080040685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40686printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040687 tst_proto_localtime_r="no"
40688
40689fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080040690rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070040691
40692 fi
40693 #
40694 if test "$tst_proto_localtime_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if localtime_r is compilable" >&5
40696printf %s "checking if localtime_r is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40698/* end confdefs.h. */
40699
40700
40701 $curl_includes_time
40702
40703int main (void)
40704{
40705
40706 if(0 != localtime_r(0, 0))
40707 return 1;
40708
40709 ;
40710 return 0;
40711}
40712
40713_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080040714if ac_fn_c_try_compile "$LINENO"
40715then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070040716
Elliott Hughesf344baa2021-12-07 09:12:34 -080040717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40718printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040719 tst_compi_localtime_r="yes"
40720
Elliott Hughesf344baa2021-12-07 09:12:34 -080040721else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040722
Elliott Hughesf344baa2021-12-07 09:12:34 -080040723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40724printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040725 tst_compi_localtime_r="no"
40726
40727fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080040728rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070040729 fi
40730 #
40731 if test "x$cross_compiling" != "xyes" &&
40732 test "$tst_compi_localtime_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if localtime_r seems to work" >&5
40734printf %s "checking if localtime_r seems to work... " >&6; }
Elliott Hughesa93fb052018-12-12 14:22:48 -080040735
Elliott Hughesa93fb052018-12-12 14:22:48 -080040736 old=$LD_LIBRARY_PATH
40737 LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
40738 export LD_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080040739 if test "$cross_compiling" = yes
40740then :
40741 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40742printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070040743as_fn_error $? "cannot run test program while cross compiling
40744See \`config.log' for more details" "$LINENO" 5; }
Elliott Hughesf344baa2021-12-07 09:12:34 -080040745else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40747/* end confdefs.h. */
40748
40749
40750 $curl_includes_stdlib
40751 $curl_includes_time
40752
40753int main (void)
40754{
40755
40756 time_t clock = 1170352587;
40757 struct tm *tmp = 0;
40758 struct tm result;
40759 tmp = localtime_r(&clock, &result);
40760 if(tmp)
40761 exit(0);
40762 else
40763 exit(1);
40764
40765 ;
40766 return 0;
40767}
40768
40769_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080040770if ac_fn_c_try_run "$LINENO"
40771then :
40772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40773printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040774 tst_works_localtime_r="yes"
40775
Elliott Hughesf344baa2021-12-07 09:12:34 -080040776else $as_nop
40777 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40778printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040779 tst_works_localtime_r="no"
40780
40781fi
40782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40783 conftest.$ac_objext conftest.beam conftest.$ac_ext
40784fi
40785
Elliott Hughesa93fb052018-12-12 14:22:48 -080040786 LD_LIBRARY_PATH=$old # restore
40787
Elliott Hughes82be86d2017-09-20 17:00:17 -070040788 fi
40789 #
40790 if test "$tst_compi_localtime_r" = "yes" &&
40791 test "$tst_works_localtime_r" != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040792 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if localtime_r usage allowed" >&5
40793printf %s "checking if localtime_r usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040794 if test "x$curl_disallow_localtime_r" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040795 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40796printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040797 tst_allow_localtime_r="yes"
40798 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080040799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40800printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040801 tst_allow_localtime_r="no"
40802 fi
40803 fi
40804 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080040805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if localtime_r might be used" >&5
40806printf %s "checking if localtime_r might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040807 if test "$tst_links_localtime_r" = "yes" &&
40808 test "$tst_proto_localtime_r" = "yes" &&
40809 test "$tst_compi_localtime_r" = "yes" &&
40810 test "$tst_allow_localtime_r" = "yes" &&
40811 test "$tst_works_localtime_r" != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40813printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040814
Elliott Hughesf344baa2021-12-07 09:12:34 -080040815printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070040816
40817 curl_cv_func_localtime_r="yes"
40818 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080040819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40820printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040821 curl_cv_func_localtime_r="no"
40822 fi
40823
40824
40825 #
40826 tst_links_memrchr="unknown"
40827 tst_macro_memrchr="unknown"
40828 tst_proto_memrchr="unknown"
40829 tst_compi_memrchr="unknown"
40830 tst_allow_memrchr="unknown"
40831 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080040832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if memrchr can be linked" >&5
40833printf %s "checking if memrchr can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40835/* end confdefs.h. */
40836
40837
40838#define memrchr innocuous_memrchr
40839#ifdef __STDC__
40840# include <limits.h>
40841#else
40842# include <assert.h>
40843#endif
40844#undef memrchr
40845#ifdef __cplusplus
40846extern "C"
40847#endif
40848char memrchr ();
40849#if defined __stub_memrchr || defined __stub___memrchr
40850choke me
40851#endif
40852
40853int main (void)
40854{
40855return memrchr ();
40856 ;
40857 return 0;
40858}
40859
40860_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080040861if ac_fn_c_try_link "$LINENO"
40862then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070040863
Elliott Hughesf344baa2021-12-07 09:12:34 -080040864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40865printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040866 tst_links_memrchr="yes"
40867
Elliott Hughesf344baa2021-12-07 09:12:34 -080040868else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040869
Elliott Hughesf344baa2021-12-07 09:12:34 -080040870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40871printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040872 tst_links_memrchr="no"
40873
40874fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080040875rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070040876 conftest$ac_exeext conftest.$ac_ext
40877 #
40878 if test "$tst_links_memrchr" = "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if memrchr seems a macro" >&5
40880printf %s "checking if memrchr seems a macro... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40882/* end confdefs.h. */
40883
40884
40885 $curl_includes_string
40886
40887int main (void)
40888{
40889
40890 if(0 != memrchr(0, 0, 0))
40891 return 1;
40892
40893 ;
40894 return 0;
40895}
40896
40897_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080040898if ac_fn_c_try_link "$LINENO"
40899then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070040900
Elliott Hughesf344baa2021-12-07 09:12:34 -080040901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40902printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040903 tst_macro_memrchr="yes"
40904
Elliott Hughesf344baa2021-12-07 09:12:34 -080040905else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040906
Elliott Hughesf344baa2021-12-07 09:12:34 -080040907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40908printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040909 tst_macro_memrchr="no"
40910
40911fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080040912rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070040913 conftest$ac_exeext conftest.$ac_ext
40914 fi
40915 #
40916 if test "$tst_links_memrchr" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if memrchr is prototyped" >&5
40918printf %s "checking if memrchr is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40920/* end confdefs.h. */
40921
40922 $curl_includes_string
40923
40924_ACEOF
40925if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080040926 $EGREP "memrchr" >/dev/null 2>&1
40927then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070040928
Elliott Hughesf344baa2021-12-07 09:12:34 -080040929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40930printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040931 tst_proto_memrchr="yes"
40932
Elliott Hughesf344baa2021-12-07 09:12:34 -080040933else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040934
Elliott Hughesf344baa2021-12-07 09:12:34 -080040935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40936printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040937 tst_proto_memrchr="no"
40938
40939fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080040940rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070040941
40942 fi
40943 #
40944 if test "$tst_proto_memrchr" = "yes" ||
40945 test "$tst_macro_memrchr" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if memrchr is compilable" >&5
40947printf %s "checking if memrchr is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40949/* end confdefs.h. */
40950
40951
40952 $curl_includes_string
40953
40954int main (void)
40955{
40956
40957 if(0 != memrchr(0, 0, 0))
40958 return 1;
40959
40960 ;
40961 return 0;
40962}
40963
40964_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080040965if ac_fn_c_try_compile "$LINENO"
40966then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070040967
Elliott Hughesf344baa2021-12-07 09:12:34 -080040968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40969printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040970 tst_compi_memrchr="yes"
40971
Elliott Hughesf344baa2021-12-07 09:12:34 -080040972else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070040973
Elliott Hughesf344baa2021-12-07 09:12:34 -080040974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40975printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040976 tst_compi_memrchr="no"
40977
40978fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080040979rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070040980 fi
40981 #
40982 if test "$tst_compi_memrchr" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if memrchr usage allowed" >&5
40984printf %s "checking if memrchr usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040985 if test "x$curl_disallow_memrchr" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080040986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40987printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040988 tst_allow_memrchr="yes"
40989 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080040990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40991printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040992 tst_allow_memrchr="no"
40993 fi
40994 fi
40995 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080040996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if memrchr might be used" >&5
40997printf %s "checking if memrchr might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070040998 if (test "$tst_proto_memrchr" = "yes" ||
40999 test "$tst_macro_memrchr" = "yes") &&
41000 test "$tst_compi_memrchr" = "yes" &&
41001 test "$tst_allow_memrchr" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41003printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041004
Elliott Hughesf344baa2021-12-07 09:12:34 -080041005printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070041006
41007 curl_cv_func_memrchr="yes"
41008 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080041009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41010printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041011 curl_cv_func_memrchr="no"
41012 fi
41013
41014
41015 #
41016 tst_links_poll="unknown"
41017 tst_proto_poll="unknown"
41018 tst_compi_poll="unknown"
41019 tst_works_poll="unknown"
41020 tst_allow_poll="unknown"
41021 #
41022 case $host_os in
41023 darwin*|interix*)
41024 curl_disallow_poll="yes"
41025 tst_compi_poll="no"
41026 ;;
41027 esac
41028 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080041029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if poll can be linked" >&5
41030printf %s "checking if poll can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41032/* end confdefs.h. */
41033
41034
41035 $curl_includes_poll
41036
41037int main (void)
41038{
41039
41040 if(0 != poll(0, 0, 0))
41041 return 1;
41042
41043 ;
41044 return 0;
41045}
41046
41047_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080041048if ac_fn_c_try_link "$LINENO"
41049then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070041050
Elliott Hughesf344baa2021-12-07 09:12:34 -080041051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41052printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041053 tst_links_poll="yes"
41054
Elliott Hughesf344baa2021-12-07 09:12:34 -080041055else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070041056
Elliott Hughesf344baa2021-12-07 09:12:34 -080041057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41058printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041059 tst_links_poll="no"
41060
41061fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041062rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070041063 conftest$ac_exeext conftest.$ac_ext
41064 #
41065 if test "$tst_links_poll" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if poll is prototyped" >&5
41067printf %s "checking if poll is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41069/* end confdefs.h. */
41070
41071 $curl_includes_poll
41072
41073_ACEOF
41074if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080041075 $EGREP "poll" >/dev/null 2>&1
41076then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070041077
Elliott Hughesf344baa2021-12-07 09:12:34 -080041078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41079printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041080 tst_proto_poll="yes"
41081
Elliott Hughesf344baa2021-12-07 09:12:34 -080041082else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070041083
Elliott Hughesf344baa2021-12-07 09:12:34 -080041084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41085printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041086 tst_proto_poll="no"
41087
41088fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041089rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070041090
41091 fi
41092 #
41093 if test "$tst_proto_poll" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041094 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if poll is compilable" >&5
41095printf %s "checking if poll is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41097/* end confdefs.h. */
41098
41099
41100 $curl_includes_poll
41101
41102int main (void)
41103{
41104
41105 if(0 != poll(0, 0, 0))
41106 return 1;
41107
41108 ;
41109 return 0;
41110}
41111
41112_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080041113if ac_fn_c_try_compile "$LINENO"
41114then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070041115
Elliott Hughesf344baa2021-12-07 09:12:34 -080041116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41117printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041118 tst_compi_poll="yes"
41119
Elliott Hughesf344baa2021-12-07 09:12:34 -080041120else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070041121
Elliott Hughesf344baa2021-12-07 09:12:34 -080041122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41123printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041124 tst_compi_poll="no"
41125
41126fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041127rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070041128 fi
41129 #
41130 if test "x$cross_compiling" != "xyes" &&
41131 test "$tst_compi_poll" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if poll seems to work" >&5
41133printf %s "checking if poll seems to work... " >&6; }
Elliott Hughesa93fb052018-12-12 14:22:48 -080041134
Elliott Hughesa93fb052018-12-12 14:22:48 -080041135 old=$LD_LIBRARY_PATH
41136 LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
41137 export LD_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080041138 if test "$cross_compiling" = yes
41139then :
41140 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41141printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070041142as_fn_error $? "cannot run test program while cross compiling
41143See \`config.log' for more details" "$LINENO" 5; }
Elliott Hughesf344baa2021-12-07 09:12:34 -080041144else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070041145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41146/* end confdefs.h. */
41147
41148
41149 $curl_includes_stdlib
41150 $curl_includes_poll
41151 $curl_includes_time
41152
41153int main (void)
41154{
41155
41156 /* detect the original poll() breakage */
41157 if(0 != poll(0, 0, 10))
41158 exit(1); /* fail */
41159 else {
41160 /* detect the 10.12 poll() breakage */
41161 struct timeval before, after;
41162 int rc;
41163 size_t us;
41164
41165 gettimeofday(&before, NULL);
41166 rc = poll(NULL, 0, 500);
41167 gettimeofday(&after, NULL);
41168
41169 us = (after.tv_sec - before.tv_sec) * 1000000 +
41170 (after.tv_usec - before.tv_usec);
41171
41172 if(us < 400000)
41173 exit(1);
41174 }
41175
41176 ;
41177 return 0;
41178}
41179
41180_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080041181if ac_fn_c_try_run "$LINENO"
41182then :
41183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41184printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041185 tst_works_poll="yes"
41186
Elliott Hughesf344baa2021-12-07 09:12:34 -080041187else $as_nop
41188 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41189printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041190 tst_works_poll="no"
41191
41192fi
41193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41194 conftest.$ac_objext conftest.beam conftest.$ac_ext
41195fi
41196
Elliott Hughesa93fb052018-12-12 14:22:48 -080041197 LD_LIBRARY_PATH=$old # restore
41198
Elliott Hughes82be86d2017-09-20 17:00:17 -070041199 fi
41200 #
41201 if test "$tst_compi_poll" = "yes" &&
41202 test "$tst_works_poll" != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if poll usage allowed" >&5
41204printf %s "checking if poll usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041205 if test "x$curl_disallow_poll" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41207printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041208 tst_allow_poll="yes"
41209 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080041210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41211printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041212 tst_allow_poll="no"
41213 fi
41214 fi
41215 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080041216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if poll might be used" >&5
41217printf %s "checking if poll might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041218 if test "$tst_links_poll" = "yes" &&
41219 test "$tst_proto_poll" = "yes" &&
41220 test "$tst_compi_poll" = "yes" &&
41221 test "$tst_allow_poll" = "yes" &&
41222 test "$tst_works_poll" != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41224printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041225
Elliott Hughesf344baa2021-12-07 09:12:34 -080041226printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070041227
41228
Elliott Hughesf344baa2021-12-07 09:12:34 -080041229printf "%s\n" "#define HAVE_POLL_FINE 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070041230
41231 curl_cv_func_poll="yes"
41232 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080041233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41234printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041235 curl_cv_func_poll="no"
41236 fi
41237
41238
41239 #
41240 tst_links_setsockopt="unknown"
41241 tst_proto_setsockopt="unknown"
41242 tst_compi_setsockopt="unknown"
41243 tst_allow_setsockopt="unknown"
41244 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080041245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if setsockopt can be linked" >&5
41246printf %s "checking if setsockopt can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41248/* end confdefs.h. */
41249
41250
41251 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070041252 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070041253 $curl_includes_sys_socket
41254
41255int main (void)
41256{
41257
41258 if(0 != setsockopt(0, 0, 0, 0, 0))
41259 return 1;
41260
41261 ;
41262 return 0;
41263}
41264
41265_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080041266if ac_fn_c_try_link "$LINENO"
41267then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070041268
Elliott Hughesf344baa2021-12-07 09:12:34 -080041269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41270printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041271 tst_links_setsockopt="yes"
41272
Elliott Hughesf344baa2021-12-07 09:12:34 -080041273else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070041274
Elliott Hughesf344baa2021-12-07 09:12:34 -080041275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41276printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041277 tst_links_setsockopt="no"
41278
41279fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041280rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070041281 conftest$ac_exeext conftest.$ac_ext
41282 #
41283 if test "$tst_links_setsockopt" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if setsockopt is prototyped" >&5
41285printf %s "checking if setsockopt is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41287/* end confdefs.h. */
41288
41289 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070041290 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070041291 $curl_includes_sys_socket
41292
41293_ACEOF
41294if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080041295 $EGREP "setsockopt" >/dev/null 2>&1
41296then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070041297
Elliott Hughesf344baa2021-12-07 09:12:34 -080041298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41299printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041300 tst_proto_setsockopt="yes"
41301
Elliott Hughesf344baa2021-12-07 09:12:34 -080041302else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070041303
Elliott Hughesf344baa2021-12-07 09:12:34 -080041304 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41305printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041306 tst_proto_setsockopt="no"
41307
41308fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041309rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070041310
41311 fi
41312 #
41313 if test "$tst_proto_setsockopt" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041314 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if setsockopt is compilable" >&5
41315printf %s "checking if setsockopt is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41317/* end confdefs.h. */
41318
41319
41320 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070041321 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070041322 $curl_includes_sys_socket
41323
41324int main (void)
41325{
41326
41327 if(0 != setsockopt(0, 0, 0, 0, 0))
41328 return 1;
41329
41330 ;
41331 return 0;
41332}
41333
41334_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080041335if ac_fn_c_try_compile "$LINENO"
41336then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070041337
Elliott Hughesf344baa2021-12-07 09:12:34 -080041338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41339printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041340 tst_compi_setsockopt="yes"
41341
Elliott Hughesf344baa2021-12-07 09:12:34 -080041342else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070041343
Elliott Hughesf344baa2021-12-07 09:12:34 -080041344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41345printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041346 tst_compi_setsockopt="no"
41347
41348fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041349rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070041350 fi
41351 #
41352 if test "$tst_compi_setsockopt" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if setsockopt usage allowed" >&5
41354printf %s "checking if setsockopt usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041355 if test "x$curl_disallow_setsockopt" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041356 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41357printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041358 tst_allow_setsockopt="yes"
41359 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080041360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41361printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041362 tst_allow_setsockopt="no"
41363 fi
41364 fi
41365 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080041366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if setsockopt might be used" >&5
41367printf %s "checking if setsockopt might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041368 if test "$tst_links_setsockopt" = "yes" &&
41369 test "$tst_proto_setsockopt" = "yes" &&
41370 test "$tst_compi_setsockopt" = "yes" &&
41371 test "$tst_allow_setsockopt" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041372 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41373printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041374
Elliott Hughesf344baa2021-12-07 09:12:34 -080041375printf "%s\n" "#define HAVE_SETSOCKOPT 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070041376
41377 curl_cv_func_setsockopt="yes"
41378
41379 #
41380 tst_compi_setsockopt_so_nonblock="unknown"
41381 tst_allow_setsockopt_so_nonblock="unknown"
41382 #
41383 if test "$curl_cv_func_setsockopt" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if setsockopt SO_NONBLOCK is compilable" >&5
41385printf %s "checking if setsockopt SO_NONBLOCK is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41387/* end confdefs.h. */
41388
41389
41390 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070041391 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070041392 $curl_includes_sys_socket
41393
41394int main (void)
41395{
41396
41397 if(0 != setsockopt(0, SOL_SOCKET, SO_NONBLOCK, 0, 0))
41398 return 1;
41399
41400 ;
41401 return 0;
41402}
41403
41404_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080041405if ac_fn_c_try_compile "$LINENO"
41406then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070041407
Elliott Hughesf344baa2021-12-07 09:12:34 -080041408 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41409printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041410 tst_compi_setsockopt_so_nonblock="yes"
41411
Elliott Hughesf344baa2021-12-07 09:12:34 -080041412else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070041413
Elliott Hughesf344baa2021-12-07 09:12:34 -080041414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41415printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041416 tst_compi_setsockopt_so_nonblock="no"
41417
41418fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041419rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070041420 fi
41421 #
41422 if test "$tst_compi_setsockopt_so_nonblock" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if setsockopt SO_NONBLOCK usage allowed" >&5
41424printf %s "checking if setsockopt SO_NONBLOCK usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041425 if test "x$curl_disallow_setsockopt_so_nonblock" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41427printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041428 tst_allow_setsockopt_so_nonblock="yes"
41429 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080041430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41431printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041432 tst_allow_setsockopt_so_nonblock="no"
41433 fi
41434 fi
41435 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080041436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if setsockopt SO_NONBLOCK might be used" >&5
41437printf %s "checking if setsockopt SO_NONBLOCK might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041438 if test "$tst_compi_setsockopt_so_nonblock" = "yes" &&
41439 test "$tst_allow_setsockopt_so_nonblock" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41441printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041442
Elliott Hughesf344baa2021-12-07 09:12:34 -080041443printf "%s\n" "#define HAVE_SETSOCKOPT_SO_NONBLOCK 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070041444
41445 curl_cv_func_setsockopt_so_nonblock="yes"
41446 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080041447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41448printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041449 curl_cv_func_setsockopt_so_nonblock="no"
41450 fi
41451
41452 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080041453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41454printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041455 curl_cv_func_setsockopt="no"
41456 fi
41457
41458
41459curl_includes_signal="\
41460/* includes start */
41461#ifdef HAVE_SYS_TYPES_H
41462# include <sys/types.h>
41463#endif
41464#ifdef HAVE_SIGNAL_H
41465# include <signal.h>
41466#endif
41467/* includes end */"
Elliott Hughesf344baa2021-12-07 09:12:34 -080041468 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_signal
Elliott Hughes82be86d2017-09-20 17:00:17 -070041469"
Elliott Hughesf344baa2021-12-07 09:12:34 -080041470if test "x$ac_cv_header_sys_types_h" = xyes
41471then :
41472 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070041473
41474fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041475ac_fn_c_check_header_compile "$LINENO" "signal.h" "ac_cv_header_signal_h" "$curl_includes_signal
41476"
41477if test "x$ac_cv_header_signal_h" = xyes
41478then :
41479 printf "%s\n" "#define HAVE_SIGNAL_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070041480
Elliott Hughesf344baa2021-12-07 09:12:34 -080041481fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070041482
41483
41484
41485 #
41486 tst_links_sigaction="unknown"
41487 tst_proto_sigaction="unknown"
41488 tst_compi_sigaction="unknown"
41489 tst_allow_sigaction="unknown"
41490 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080041491 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sigaction can be linked" >&5
41492printf %s "checking if sigaction can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41494/* end confdefs.h. */
41495
41496
41497#define sigaction innocuous_sigaction
41498#ifdef __STDC__
41499# include <limits.h>
41500#else
41501# include <assert.h>
41502#endif
41503#undef sigaction
41504#ifdef __cplusplus
41505extern "C"
41506#endif
41507char sigaction ();
41508#if defined __stub_sigaction || defined __stub___sigaction
41509choke me
41510#endif
41511
41512int main (void)
41513{
41514return sigaction ();
41515 ;
41516 return 0;
41517}
41518
41519_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080041520if ac_fn_c_try_link "$LINENO"
41521then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070041522
Elliott Hughesf344baa2021-12-07 09:12:34 -080041523 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41524printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041525 tst_links_sigaction="yes"
41526
Elliott Hughesf344baa2021-12-07 09:12:34 -080041527else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070041528
Elliott Hughesf344baa2021-12-07 09:12:34 -080041529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41530printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041531 tst_links_sigaction="no"
41532
41533fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041534rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070041535 conftest$ac_exeext conftest.$ac_ext
41536 #
41537 if test "$tst_links_sigaction" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sigaction is prototyped" >&5
41539printf %s "checking if sigaction is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41541/* end confdefs.h. */
41542
41543 $curl_includes_signal
41544
41545_ACEOF
41546if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080041547 $EGREP "sigaction" >/dev/null 2>&1
41548then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070041549
Elliott Hughesf344baa2021-12-07 09:12:34 -080041550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41551printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041552 tst_proto_sigaction="yes"
41553
Elliott Hughesf344baa2021-12-07 09:12:34 -080041554else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070041555
Elliott Hughesf344baa2021-12-07 09:12:34 -080041556 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41557printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041558 tst_proto_sigaction="no"
41559
41560fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041561rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070041562
41563 fi
41564 #
41565 if test "$tst_proto_sigaction" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sigaction is compilable" >&5
41567printf %s "checking if sigaction is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41569/* end confdefs.h. */
41570
41571
41572 $curl_includes_signal
41573
41574int main (void)
41575{
41576
41577 if(0 != sigaction(0, 0, 0))
41578 return 1;
41579
41580 ;
41581 return 0;
41582}
41583
41584_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080041585if ac_fn_c_try_compile "$LINENO"
41586then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070041587
Elliott Hughesf344baa2021-12-07 09:12:34 -080041588 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41589printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041590 tst_compi_sigaction="yes"
41591
Elliott Hughesf344baa2021-12-07 09:12:34 -080041592else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070041593
Elliott Hughesf344baa2021-12-07 09:12:34 -080041594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41595printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041596 tst_compi_sigaction="no"
41597
41598fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041599rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070041600 fi
41601 #
41602 if test "$tst_compi_sigaction" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sigaction usage allowed" >&5
41604printf %s "checking if sigaction usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041605 if test "x$curl_disallow_sigaction" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41607printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041608 tst_allow_sigaction="yes"
41609 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080041610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41611printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041612 tst_allow_sigaction="no"
41613 fi
41614 fi
41615 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080041616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sigaction might be used" >&5
41617printf %s "checking if sigaction might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041618 if test "$tst_links_sigaction" = "yes" &&
41619 test "$tst_proto_sigaction" = "yes" &&
41620 test "$tst_compi_sigaction" = "yes" &&
41621 test "$tst_allow_sigaction" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41623printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041624
Elliott Hughesf344baa2021-12-07 09:12:34 -080041625printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070041626
41627 curl_cv_func_sigaction="yes"
41628 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080041629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41630printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041631 curl_cv_func_sigaction="no"
41632 fi
41633
41634
41635 #
41636 tst_links_siginterrupt="unknown"
41637 tst_proto_siginterrupt="unknown"
41638 tst_compi_siginterrupt="unknown"
41639 tst_allow_siginterrupt="unknown"
41640 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080041641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if siginterrupt can be linked" >&5
41642printf %s "checking if siginterrupt can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41644/* end confdefs.h. */
41645
41646
41647#define siginterrupt innocuous_siginterrupt
41648#ifdef __STDC__
41649# include <limits.h>
41650#else
41651# include <assert.h>
41652#endif
41653#undef siginterrupt
41654#ifdef __cplusplus
41655extern "C"
41656#endif
41657char siginterrupt ();
41658#if defined __stub_siginterrupt || defined __stub___siginterrupt
41659choke me
41660#endif
41661
41662int main (void)
41663{
41664return siginterrupt ();
41665 ;
41666 return 0;
41667}
41668
41669_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080041670if ac_fn_c_try_link "$LINENO"
41671then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070041672
Elliott Hughesf344baa2021-12-07 09:12:34 -080041673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41674printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041675 tst_links_siginterrupt="yes"
41676
Elliott Hughesf344baa2021-12-07 09:12:34 -080041677else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070041678
Elliott Hughesf344baa2021-12-07 09:12:34 -080041679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41680printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041681 tst_links_siginterrupt="no"
41682
41683fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041684rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070041685 conftest$ac_exeext conftest.$ac_ext
41686 #
41687 if test "$tst_links_siginterrupt" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if siginterrupt is prototyped" >&5
41689printf %s "checking if siginterrupt is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41691/* end confdefs.h. */
41692
41693 $curl_includes_signal
41694
41695_ACEOF
41696if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080041697 $EGREP "siginterrupt" >/dev/null 2>&1
41698then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070041699
Elliott Hughesf344baa2021-12-07 09:12:34 -080041700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41701printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041702 tst_proto_siginterrupt="yes"
41703
Elliott Hughesf344baa2021-12-07 09:12:34 -080041704else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070041705
Elliott Hughesf344baa2021-12-07 09:12:34 -080041706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41707printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041708 tst_proto_siginterrupt="no"
41709
41710fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041711rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070041712
41713 fi
41714 #
41715 if test "$tst_proto_siginterrupt" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if siginterrupt is compilable" >&5
41717printf %s "checking if siginterrupt is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41719/* end confdefs.h. */
41720
41721
41722 $curl_includes_signal
41723
41724int main (void)
41725{
41726
41727 if(0 != siginterrupt(0, 0))
41728 return 1;
41729
41730 ;
41731 return 0;
41732}
41733
41734_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080041735if ac_fn_c_try_compile "$LINENO"
41736then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070041737
Elliott Hughesf344baa2021-12-07 09:12:34 -080041738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41739printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041740 tst_compi_siginterrupt="yes"
41741
Elliott Hughesf344baa2021-12-07 09:12:34 -080041742else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070041743
Elliott Hughesf344baa2021-12-07 09:12:34 -080041744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41745printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041746 tst_compi_siginterrupt="no"
41747
41748fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041749rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070041750 fi
41751 #
41752 if test "$tst_compi_siginterrupt" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if siginterrupt usage allowed" >&5
41754printf %s "checking if siginterrupt usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041755 if test "x$curl_disallow_siginterrupt" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41757printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041758 tst_allow_siginterrupt="yes"
41759 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080041760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41761printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041762 tst_allow_siginterrupt="no"
41763 fi
41764 fi
41765 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080041766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if siginterrupt might be used" >&5
41767printf %s "checking if siginterrupt might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041768 if test "$tst_links_siginterrupt" = "yes" &&
41769 test "$tst_proto_siginterrupt" = "yes" &&
41770 test "$tst_compi_siginterrupt" = "yes" &&
41771 test "$tst_allow_siginterrupt" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41773printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041774
Elliott Hughesf344baa2021-12-07 09:12:34 -080041775printf "%s\n" "#define HAVE_SIGINTERRUPT 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070041776
41777 curl_cv_func_siginterrupt="yes"
41778 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080041779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41780printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041781 curl_cv_func_siginterrupt="no"
41782 fi
41783
41784
41785 #
41786 tst_links_signal="unknown"
41787 tst_proto_signal="unknown"
41788 tst_compi_signal="unknown"
41789 tst_allow_signal="unknown"
41790 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080041791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if signal can be linked" >&5
41792printf %s "checking if signal can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41794/* end confdefs.h. */
41795
41796
41797#define signal innocuous_signal
41798#ifdef __STDC__
41799# include <limits.h>
41800#else
41801# include <assert.h>
41802#endif
41803#undef signal
41804#ifdef __cplusplus
41805extern "C"
41806#endif
41807char signal ();
41808#if defined __stub_signal || defined __stub___signal
41809choke me
41810#endif
41811
41812int main (void)
41813{
41814return signal ();
41815 ;
41816 return 0;
41817}
41818
41819_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080041820if ac_fn_c_try_link "$LINENO"
41821then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070041822
Elliott Hughesf344baa2021-12-07 09:12:34 -080041823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41824printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041825 tst_links_signal="yes"
41826
Elliott Hughesf344baa2021-12-07 09:12:34 -080041827else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070041828
Elliott Hughesf344baa2021-12-07 09:12:34 -080041829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41830printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041831 tst_links_signal="no"
41832
41833fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041834rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070041835 conftest$ac_exeext conftest.$ac_ext
41836 #
41837 if test "$tst_links_signal" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if signal is prototyped" >&5
41839printf %s "checking if signal is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41841/* end confdefs.h. */
41842
41843 $curl_includes_signal
41844
41845_ACEOF
41846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080041847 $EGREP "signal" >/dev/null 2>&1
41848then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070041849
Elliott Hughesf344baa2021-12-07 09:12:34 -080041850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41851printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041852 tst_proto_signal="yes"
41853
Elliott Hughesf344baa2021-12-07 09:12:34 -080041854else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070041855
Elliott Hughesf344baa2021-12-07 09:12:34 -080041856 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41857printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041858 tst_proto_signal="no"
41859
41860fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041861rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070041862
41863 fi
41864 #
41865 if test "$tst_proto_signal" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if signal is compilable" >&5
41867printf %s "checking if signal is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41869/* end confdefs.h. */
41870
41871
41872 $curl_includes_signal
41873
41874int main (void)
41875{
41876
41877 if(0 != signal(0, 0))
41878 return 1;
41879
41880 ;
41881 return 0;
41882}
41883
41884_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080041885if ac_fn_c_try_compile "$LINENO"
41886then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070041887
Elliott Hughesf344baa2021-12-07 09:12:34 -080041888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41889printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041890 tst_compi_signal="yes"
41891
Elliott Hughesf344baa2021-12-07 09:12:34 -080041892else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070041893
Elliott Hughesf344baa2021-12-07 09:12:34 -080041894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41895printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041896 tst_compi_signal="no"
41897
41898fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041899rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070041900 fi
41901 #
41902 if test "$tst_compi_signal" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if signal usage allowed" >&5
41904printf %s "checking if signal usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041905 if test "x$curl_disallow_signal" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41907printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041908 tst_allow_signal="yes"
41909 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080041910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41911printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041912 tst_allow_signal="no"
41913 fi
41914 fi
41915 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080041916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if signal might be used" >&5
41917printf %s "checking if signal might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041918 if test "$tst_links_signal" = "yes" &&
41919 test "$tst_proto_signal" = "yes" &&
41920 test "$tst_compi_signal" = "yes" &&
41921 test "$tst_allow_signal" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080041922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41923printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041924
Elliott Hughesf344baa2021-12-07 09:12:34 -080041925printf "%s\n" "#define HAVE_SIGNAL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070041926
41927 curl_cv_func_signal="yes"
41928 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080041929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41930printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041931 curl_cv_func_signal="no"
41932 fi
41933
41934
41935curl_includes_setjmp="\
41936/* includes start */
41937#ifdef HAVE_SYS_TYPES_H
41938# include <sys/types.h>
41939#endif
41940#ifdef HAVE_SETJMP_H
41941# include <setjmp.h>
41942#endif
41943/* includes end */"
Elliott Hughesf344baa2021-12-07 09:12:34 -080041944 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_setjmp
Elliott Hughes82be86d2017-09-20 17:00:17 -070041945"
Elliott Hughesf344baa2021-12-07 09:12:34 -080041946if test "x$ac_cv_header_sys_types_h" = xyes
41947then :
41948 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070041949
41950fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080041951ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$curl_includes_setjmp
41952"
41953if test "x$ac_cv_header_setjmp_h" = xyes
41954then :
41955 printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070041956
Elliott Hughesf344baa2021-12-07 09:12:34 -080041957fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070041958
41959
41960
41961 #
41962 tst_links_sigsetjmp="unknown"
41963 tst_macro_sigsetjmp="unknown"
41964 tst_proto_sigsetjmp="unknown"
41965 tst_compi_sigsetjmp="unknown"
41966 tst_allow_sigsetjmp="unknown"
41967 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080041968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp can be linked" >&5
41969printf %s "checking if sigsetjmp can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070041970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41971/* end confdefs.h. */
41972
41973
41974#define sigsetjmp innocuous_sigsetjmp
41975#ifdef __STDC__
41976# include <limits.h>
41977#else
41978# include <assert.h>
41979#endif
41980#undef sigsetjmp
41981#ifdef __cplusplus
41982extern "C"
41983#endif
41984char sigsetjmp ();
41985#if defined __stub_sigsetjmp || defined __stub___sigsetjmp
41986choke me
41987#endif
41988
41989int main (void)
41990{
41991return sigsetjmp ();
41992 ;
41993 return 0;
41994}
41995
41996_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080041997if ac_fn_c_try_link "$LINENO"
41998then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070041999
Elliott Hughesf344baa2021-12-07 09:12:34 -080042000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42001printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042002 tst_links_sigsetjmp="yes"
42003
Elliott Hughesf344baa2021-12-07 09:12:34 -080042004else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042005
Elliott Hughesf344baa2021-12-07 09:12:34 -080042006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42007printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042008 tst_links_sigsetjmp="no"
42009
42010fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042011rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070042012 conftest$ac_exeext conftest.$ac_ext
42013 #
42014 if test "$tst_links_sigsetjmp" = "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp seems a macro" >&5
42016printf %s "checking if sigsetjmp seems a macro... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42018/* end confdefs.h. */
42019
42020
42021 $curl_includes_setjmp
42022
42023int main (void)
42024{
42025
42026 sigjmp_buf env;
42027 if(0 != sigsetjmp(env, 0))
42028 return 1;
42029
42030 ;
42031 return 0;
42032}
42033
42034_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080042035if ac_fn_c_try_link "$LINENO"
42036then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042037
Elliott Hughesf344baa2021-12-07 09:12:34 -080042038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42039printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042040 tst_macro_sigsetjmp="yes"
42041
Elliott Hughesf344baa2021-12-07 09:12:34 -080042042else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042043
Elliott Hughesf344baa2021-12-07 09:12:34 -080042044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42045printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042046 tst_macro_sigsetjmp="no"
42047
42048fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042049rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070042050 conftest$ac_exeext conftest.$ac_ext
42051 fi
42052 #
42053 if test "$tst_links_sigsetjmp" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp is prototyped" >&5
42055printf %s "checking if sigsetjmp is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42057/* end confdefs.h. */
42058
42059 $curl_includes_setjmp
42060
42061_ACEOF
42062if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080042063 $EGREP "sigsetjmp" >/dev/null 2>&1
42064then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042065
Elliott Hughesf344baa2021-12-07 09:12:34 -080042066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42067printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042068 tst_proto_sigsetjmp="yes"
42069
Elliott Hughesf344baa2021-12-07 09:12:34 -080042070else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042071
Elliott Hughesf344baa2021-12-07 09:12:34 -080042072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42073printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042074 tst_proto_sigsetjmp="no"
42075
42076fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042077rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070042078
42079 fi
42080 #
42081 if test "$tst_proto_sigsetjmp" = "yes" ||
42082 test "$tst_macro_sigsetjmp" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp is compilable" >&5
42084printf %s "checking if sigsetjmp is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42086/* end confdefs.h. */
42087
42088
42089 $curl_includes_setjmp
42090
42091int main (void)
42092{
42093
42094 sigjmp_buf env;
42095 if(0 != sigsetjmp(env, 0))
42096 return 1;
42097
42098 ;
42099 return 0;
42100}
42101
42102_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080042103if ac_fn_c_try_compile "$LINENO"
42104then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042105
Elliott Hughesf344baa2021-12-07 09:12:34 -080042106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42107printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042108 tst_compi_sigsetjmp="yes"
42109
Elliott Hughesf344baa2021-12-07 09:12:34 -080042110else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042111
Elliott Hughesf344baa2021-12-07 09:12:34 -080042112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42113printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042114 tst_compi_sigsetjmp="no"
42115
42116fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042117rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070042118 fi
42119 #
42120 if test "$tst_compi_sigsetjmp" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp usage allowed" >&5
42122printf %s "checking if sigsetjmp usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042123 if test "x$curl_disallow_sigsetjmp" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042124 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42125printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042126 tst_allow_sigsetjmp="yes"
42127 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080042128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42129printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042130 tst_allow_sigsetjmp="no"
42131 fi
42132 fi
42133 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080042134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp might be used" >&5
42135printf %s "checking if sigsetjmp might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042136 if (test "$tst_proto_sigsetjmp" = "yes" ||
42137 test "$tst_macro_sigsetjmp" = "yes") &&
42138 test "$tst_compi_sigsetjmp" = "yes" &&
42139 test "$tst_allow_sigsetjmp" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42141printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042142
Elliott Hughesf344baa2021-12-07 09:12:34 -080042143printf "%s\n" "#define HAVE_SIGSETJMP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070042144
42145 curl_cv_func_sigsetjmp="yes"
42146 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080042147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42148printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042149 curl_cv_func_sigsetjmp="no"
42150 fi
42151
42152
42153 #
42154 tst_links_socket="unknown"
42155 tst_proto_socket="unknown"
42156 tst_compi_socket="unknown"
42157 tst_allow_socket="unknown"
42158 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080042159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if socket can be linked" >&5
42160printf %s "checking if socket can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42162/* end confdefs.h. */
42163
42164
42165 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070042166 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070042167 $curl_includes_sys_socket
42168 $curl_includes_socket
42169
42170int main (void)
42171{
42172
42173 if(0 != socket(0, 0, 0))
42174 return 1;
42175
42176 ;
42177 return 0;
42178}
42179
42180_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080042181if ac_fn_c_try_link "$LINENO"
42182then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042183
Elliott Hughesf344baa2021-12-07 09:12:34 -080042184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42185printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042186 tst_links_socket="yes"
42187
Elliott Hughesf344baa2021-12-07 09:12:34 -080042188else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042189
Elliott Hughesf344baa2021-12-07 09:12:34 -080042190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42191printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042192 tst_links_socket="no"
42193
42194fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042195rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070042196 conftest$ac_exeext conftest.$ac_ext
42197 #
42198 if test "$tst_links_socket" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if socket is prototyped" >&5
42200printf %s "checking if socket is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42202/* end confdefs.h. */
42203
42204 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070042205 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070042206 $curl_includes_sys_socket
42207 $curl_includes_socket
42208
42209_ACEOF
42210if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080042211 $EGREP "socket" >/dev/null 2>&1
42212then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042213
Elliott Hughesf344baa2021-12-07 09:12:34 -080042214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42215printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042216 tst_proto_socket="yes"
42217
Elliott Hughesf344baa2021-12-07 09:12:34 -080042218else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042219
Elliott Hughesf344baa2021-12-07 09:12:34 -080042220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42221printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042222 tst_proto_socket="no"
42223
42224fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042225rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070042226
42227 fi
42228 #
42229 if test "$tst_proto_socket" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if socket is compilable" >&5
42231printf %s "checking if socket is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42233/* end confdefs.h. */
42234
42235
42236 $curl_includes_winsock2
Haibo Huang65021c72019-03-27 15:37:23 -070042237 $curl_includes_bsdsocket
Elliott Hughes82be86d2017-09-20 17:00:17 -070042238 $curl_includes_sys_socket
42239 $curl_includes_socket
42240
42241int main (void)
42242{
42243
42244 if(0 != socket(0, 0, 0))
42245 return 1;
42246
42247 ;
42248 return 0;
42249}
42250
42251_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080042252if ac_fn_c_try_compile "$LINENO"
42253then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042254
Elliott Hughesf344baa2021-12-07 09:12:34 -080042255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42256printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042257 tst_compi_socket="yes"
42258
Elliott Hughesf344baa2021-12-07 09:12:34 -080042259else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042260
Elliott Hughesf344baa2021-12-07 09:12:34 -080042261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42262printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042263 tst_compi_socket="no"
42264
42265fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042266rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070042267 fi
42268 #
42269 if test "$tst_compi_socket" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if socket usage allowed" >&5
42271printf %s "checking if socket usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042272 if test "x$curl_disallow_socket" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42274printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042275 tst_allow_socket="yes"
42276 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080042277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42278printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042279 tst_allow_socket="no"
42280 fi
42281 fi
42282 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080042283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if socket might be used" >&5
42284printf %s "checking if socket might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042285 if test "$tst_links_socket" = "yes" &&
42286 test "$tst_proto_socket" = "yes" &&
42287 test "$tst_compi_socket" = "yes" &&
42288 test "$tst_allow_socket" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42290printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042291
Elliott Hughesf344baa2021-12-07 09:12:34 -080042292printf "%s\n" "#define HAVE_SOCKET 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070042293
42294 curl_cv_func_socket="yes"
42295 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080042296 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42297printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042298 curl_cv_func_socket="no"
42299 fi
42300
42301
42302 #
42303 tst_links_socketpair="unknown"
42304 tst_proto_socketpair="unknown"
42305 tst_compi_socketpair="unknown"
42306 tst_allow_socketpair="unknown"
42307 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080042308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if socketpair can be linked" >&5
42309printf %s "checking if socketpair can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42311/* end confdefs.h. */
42312
42313
42314#define socketpair innocuous_socketpair
42315#ifdef __STDC__
42316# include <limits.h>
42317#else
42318# include <assert.h>
42319#endif
42320#undef socketpair
42321#ifdef __cplusplus
42322extern "C"
42323#endif
42324char socketpair ();
42325#if defined __stub_socketpair || defined __stub___socketpair
42326choke me
42327#endif
42328
42329int main (void)
42330{
42331return socketpair ();
42332 ;
42333 return 0;
42334}
42335
42336_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080042337if ac_fn_c_try_link "$LINENO"
42338then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042339
Elliott Hughesf344baa2021-12-07 09:12:34 -080042340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42341printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042342 tst_links_socketpair="yes"
42343
Elliott Hughesf344baa2021-12-07 09:12:34 -080042344else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042345
Elliott Hughesf344baa2021-12-07 09:12:34 -080042346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42347printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042348 tst_links_socketpair="no"
42349
42350fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042351rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070042352 conftest$ac_exeext conftest.$ac_ext
42353 #
42354 if test "$tst_links_socketpair" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if socketpair is prototyped" >&5
42356printf %s "checking if socketpair is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42358/* end confdefs.h. */
42359
42360 $curl_includes_sys_socket
42361 $curl_includes_socket
42362
42363_ACEOF
42364if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080042365 $EGREP "socketpair" >/dev/null 2>&1
42366then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042367
Elliott Hughesf344baa2021-12-07 09:12:34 -080042368 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42369printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042370 tst_proto_socketpair="yes"
42371
Elliott Hughesf344baa2021-12-07 09:12:34 -080042372else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042373
Elliott Hughesf344baa2021-12-07 09:12:34 -080042374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42375printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042376 tst_proto_socketpair="no"
42377
42378fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042379rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070042380
42381 fi
42382 #
42383 if test "$tst_proto_socketpair" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if socketpair is compilable" >&5
42385printf %s "checking if socketpair is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42387/* end confdefs.h. */
42388
42389
42390 $curl_includes_sys_socket
42391 $curl_includes_socket
42392
42393int main (void)
42394{
42395
42396 int sv[2];
42397 if(0 != socketpair(0, 0, 0, sv))
42398 return 1;
42399
42400 ;
42401 return 0;
42402}
42403
42404_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080042405if ac_fn_c_try_compile "$LINENO"
42406then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042407
Elliott Hughesf344baa2021-12-07 09:12:34 -080042408 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42409printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042410 tst_compi_socketpair="yes"
42411
Elliott Hughesf344baa2021-12-07 09:12:34 -080042412else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042413
Elliott Hughesf344baa2021-12-07 09:12:34 -080042414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42415printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042416 tst_compi_socketpair="no"
42417
42418fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042419rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070042420 fi
42421 #
42422 if test "$tst_compi_socketpair" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if socketpair usage allowed" >&5
42424printf %s "checking if socketpair usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042425 if test "x$curl_disallow_socketpair" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42427printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042428 tst_allow_socketpair="yes"
42429 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080042430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42431printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042432 tst_allow_socketpair="no"
42433 fi
42434 fi
42435 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080042436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if socketpair might be used" >&5
42437printf %s "checking if socketpair might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042438 if test "$tst_links_socketpair" = "yes" &&
42439 test "$tst_proto_socketpair" = "yes" &&
42440 test "$tst_compi_socketpair" = "yes" &&
42441 test "$tst_allow_socketpair" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042442 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42443printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042444
Elliott Hughesf344baa2021-12-07 09:12:34 -080042445printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070042446
42447 curl_cv_func_socketpair="yes"
42448 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080042449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42450printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042451 curl_cv_func_socketpair="no"
42452 fi
42453
42454
42455 #
42456 tst_links_strcasecmp="unknown"
42457 tst_proto_strcasecmp="unknown"
42458 tst_compi_strcasecmp="unknown"
42459 tst_allow_strcasecmp="unknown"
42460 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080042461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strcasecmp can be linked" >&5
42462printf %s "checking if strcasecmp can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42464/* end confdefs.h. */
42465
42466
42467#define strcasecmp innocuous_strcasecmp
42468#ifdef __STDC__
42469# include <limits.h>
42470#else
42471# include <assert.h>
42472#endif
42473#undef strcasecmp
42474#ifdef __cplusplus
42475extern "C"
42476#endif
42477char strcasecmp ();
42478#if defined __stub_strcasecmp || defined __stub___strcasecmp
42479choke me
42480#endif
42481
42482int main (void)
42483{
42484return strcasecmp ();
42485 ;
42486 return 0;
42487}
42488
42489_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080042490if ac_fn_c_try_link "$LINENO"
42491then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042492
Elliott Hughesf344baa2021-12-07 09:12:34 -080042493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42494printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042495 tst_links_strcasecmp="yes"
42496
Elliott Hughesf344baa2021-12-07 09:12:34 -080042497else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042498
Elliott Hughesf344baa2021-12-07 09:12:34 -080042499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42500printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042501 tst_links_strcasecmp="no"
42502
42503fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042504rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070042505 conftest$ac_exeext conftest.$ac_ext
42506 #
42507 if test "$tst_links_strcasecmp" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strcasecmp is prototyped" >&5
42509printf %s "checking if strcasecmp is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42511/* end confdefs.h. */
42512
42513 $curl_includes_string
42514
42515_ACEOF
42516if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080042517 $EGREP "strcasecmp" >/dev/null 2>&1
42518then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042519
Elliott Hughesf344baa2021-12-07 09:12:34 -080042520 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42521printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042522 tst_proto_strcasecmp="yes"
42523
Elliott Hughesf344baa2021-12-07 09:12:34 -080042524else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042525
Elliott Hughesf344baa2021-12-07 09:12:34 -080042526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42527printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042528 tst_proto_strcasecmp="no"
42529
42530fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042531rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070042532
42533 fi
42534 #
42535 if test "$tst_proto_strcasecmp" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strcasecmp is compilable" >&5
42537printf %s "checking if strcasecmp is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42539/* end confdefs.h. */
42540
42541
42542 $curl_includes_string
42543
42544int main (void)
42545{
42546
42547 if(0 != strcasecmp(0, 0))
42548 return 1;
42549
42550 ;
42551 return 0;
42552}
42553
42554_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080042555if ac_fn_c_try_compile "$LINENO"
42556then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042557
Elliott Hughesf344baa2021-12-07 09:12:34 -080042558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42559printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042560 tst_compi_strcasecmp="yes"
42561
Elliott Hughesf344baa2021-12-07 09:12:34 -080042562else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042563
Elliott Hughesf344baa2021-12-07 09:12:34 -080042564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42565printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042566 tst_compi_strcasecmp="no"
42567
42568fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042569rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070042570 fi
42571 #
42572 if test "$tst_compi_strcasecmp" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strcasecmp usage allowed" >&5
42574printf %s "checking if strcasecmp usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042575 if test "x$curl_disallow_strcasecmp" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42577printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042578 tst_allow_strcasecmp="yes"
42579 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080042580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42581printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042582 tst_allow_strcasecmp="no"
42583 fi
42584 fi
42585 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080042586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strcasecmp might be used" >&5
42587printf %s "checking if strcasecmp might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042588 if test "$tst_links_strcasecmp" = "yes" &&
42589 test "$tst_proto_strcasecmp" = "yes" &&
42590 test "$tst_compi_strcasecmp" = "yes" &&
42591 test "$tst_allow_strcasecmp" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42593printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042594
Elliott Hughesf344baa2021-12-07 09:12:34 -080042595printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070042596
42597 curl_cv_func_strcasecmp="yes"
42598 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080042599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42600printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042601 curl_cv_func_strcasecmp="no"
42602 fi
42603
42604
42605 #
42606 tst_links_strcmpi="unknown"
42607 tst_proto_strcmpi="unknown"
42608 tst_compi_strcmpi="unknown"
42609 tst_allow_strcmpi="unknown"
42610 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080042611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strcmpi can be linked" >&5
42612printf %s "checking if strcmpi can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42614/* end confdefs.h. */
42615
42616
42617#define strcmpi innocuous_strcmpi
42618#ifdef __STDC__
42619# include <limits.h>
42620#else
42621# include <assert.h>
42622#endif
42623#undef strcmpi
42624#ifdef __cplusplus
42625extern "C"
42626#endif
42627char strcmpi ();
42628#if defined __stub_strcmpi || defined __stub___strcmpi
42629choke me
42630#endif
42631
42632int main (void)
42633{
42634return strcmpi ();
42635 ;
42636 return 0;
42637}
42638
42639_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080042640if ac_fn_c_try_link "$LINENO"
42641then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042642
Elliott Hughesf344baa2021-12-07 09:12:34 -080042643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42644printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042645 tst_links_strcmpi="yes"
42646
Elliott Hughesf344baa2021-12-07 09:12:34 -080042647else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042648
Elliott Hughesf344baa2021-12-07 09:12:34 -080042649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42650printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042651 tst_links_strcmpi="no"
42652
42653fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042654rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070042655 conftest$ac_exeext conftest.$ac_ext
42656 #
42657 if test "$tst_links_strcmpi" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strcmpi is prototyped" >&5
42659printf %s "checking if strcmpi is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42661/* end confdefs.h. */
42662
42663 $curl_includes_string
42664
42665_ACEOF
42666if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080042667 $EGREP "strcmpi" >/dev/null 2>&1
42668then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042669
Elliott Hughesf344baa2021-12-07 09:12:34 -080042670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42671printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042672 tst_proto_strcmpi="yes"
42673
Elliott Hughesf344baa2021-12-07 09:12:34 -080042674else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042675
Elliott Hughesf344baa2021-12-07 09:12:34 -080042676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42677printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042678 tst_proto_strcmpi="no"
42679
42680fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042681rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070042682
42683 fi
42684 #
42685 if test "$tst_proto_strcmpi" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strcmpi is compilable" >&5
42687printf %s "checking if strcmpi is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42689/* end confdefs.h. */
42690
42691
42692 $curl_includes_string
42693
42694int main (void)
42695{
42696
42697 if(0 != strcmpi(0, 0))
42698 return 1;
42699
42700 ;
42701 return 0;
42702}
42703
42704_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080042705if ac_fn_c_try_compile "$LINENO"
42706then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042707
Elliott Hughesf344baa2021-12-07 09:12:34 -080042708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42709printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042710 tst_compi_strcmpi="yes"
42711
Elliott Hughesf344baa2021-12-07 09:12:34 -080042712else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042713
Elliott Hughesf344baa2021-12-07 09:12:34 -080042714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42715printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042716 tst_compi_strcmpi="no"
42717
42718fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042719rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070042720 fi
42721 #
42722 if test "$tst_compi_strcmpi" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strcmpi usage allowed" >&5
42724printf %s "checking if strcmpi usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042725 if test "x$curl_disallow_strcmpi" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42727printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042728 tst_allow_strcmpi="yes"
42729 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080042730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42731printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042732 tst_allow_strcmpi="no"
42733 fi
42734 fi
42735 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080042736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strcmpi might be used" >&5
42737printf %s "checking if strcmpi might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042738 if test "$tst_links_strcmpi" = "yes" &&
42739 test "$tst_proto_strcmpi" = "yes" &&
42740 test "$tst_compi_strcmpi" = "yes" &&
42741 test "$tst_allow_strcmpi" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42743printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042744
Elliott Hughesf344baa2021-12-07 09:12:34 -080042745printf "%s\n" "#define HAVE_STRCMPI 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070042746
42747 curl_cv_func_strcmpi="yes"
42748 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080042749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42750printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042751 curl_cv_func_strcmpi="no"
42752 fi
42753
42754
42755 #
42756 tst_links_strdup="unknown"
42757 tst_proto_strdup="unknown"
42758 tst_compi_strdup="unknown"
42759 tst_allow_strdup="unknown"
42760 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080042761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strdup can be linked" >&5
42762printf %s "checking if strdup can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42764/* end confdefs.h. */
42765
42766
42767#define strdup innocuous_strdup
42768#ifdef __STDC__
42769# include <limits.h>
42770#else
42771# include <assert.h>
42772#endif
42773#undef strdup
42774#ifdef __cplusplus
42775extern "C"
42776#endif
42777char strdup ();
42778#if defined __stub_strdup || defined __stub___strdup
42779choke me
42780#endif
42781
42782int main (void)
42783{
42784return strdup ();
42785 ;
42786 return 0;
42787}
42788
42789_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080042790if ac_fn_c_try_link "$LINENO"
42791then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042792
Elliott Hughesf344baa2021-12-07 09:12:34 -080042793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42794printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042795 tst_links_strdup="yes"
42796
Elliott Hughesf344baa2021-12-07 09:12:34 -080042797else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042798
Elliott Hughesf344baa2021-12-07 09:12:34 -080042799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42800printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042801 tst_links_strdup="no"
42802
42803fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042804rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070042805 conftest$ac_exeext conftest.$ac_ext
42806 #
42807 if test "$tst_links_strdup" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042808 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strdup is prototyped" >&5
42809printf %s "checking if strdup is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42811/* end confdefs.h. */
42812
42813 $curl_includes_string
42814
42815_ACEOF
42816if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080042817 $EGREP "strdup" >/dev/null 2>&1
42818then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042819
Elliott Hughesf344baa2021-12-07 09:12:34 -080042820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42821printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042822 tst_proto_strdup="yes"
42823
Elliott Hughesf344baa2021-12-07 09:12:34 -080042824else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042825
Elliott Hughesf344baa2021-12-07 09:12:34 -080042826 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42827printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042828 tst_proto_strdup="no"
42829
42830fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042831rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070042832
42833 fi
42834 #
42835 if test "$tst_proto_strdup" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strdup is compilable" >&5
42837printf %s "checking if strdup is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42839/* end confdefs.h. */
42840
42841
42842 $curl_includes_string
42843
42844int main (void)
42845{
42846
42847 if(0 != strdup(0))
42848 return 1;
42849
42850 ;
42851 return 0;
42852}
42853
42854_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080042855if ac_fn_c_try_compile "$LINENO"
42856then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042857
Elliott Hughesf344baa2021-12-07 09:12:34 -080042858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42859printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042860 tst_compi_strdup="yes"
42861
Elliott Hughesf344baa2021-12-07 09:12:34 -080042862else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042863
Elliott Hughesf344baa2021-12-07 09:12:34 -080042864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42865printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042866 tst_compi_strdup="no"
42867
42868fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042869rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070042870 fi
42871 #
42872 if test "$tst_compi_strdup" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strdup usage allowed" >&5
42874printf %s "checking if strdup usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042875 if test "x$curl_disallow_strdup" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42877printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042878 tst_allow_strdup="yes"
42879 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080042880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42881printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042882 tst_allow_strdup="no"
42883 fi
42884 fi
42885 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080042886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strdup might be used" >&5
42887printf %s "checking if strdup might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042888 if test "$tst_links_strdup" = "yes" &&
42889 test "$tst_proto_strdup" = "yes" &&
42890 test "$tst_compi_strdup" = "yes" &&
42891 test "$tst_allow_strdup" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42893printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042894
Elliott Hughesf344baa2021-12-07 09:12:34 -080042895printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070042896
42897 curl_cv_func_strdup="yes"
42898 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080042899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42900printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042901 curl_cv_func_strdup="no"
42902 fi
42903
42904
42905 #
42906 tst_links_strerror_r="unknown"
42907 tst_proto_strerror_r="unknown"
42908 tst_compi_strerror_r="unknown"
42909 tst_glibc_strerror_r="unknown"
42910 tst_posix_strerror_r="unknown"
42911 tst_allow_strerror_r="unknown"
42912 tst_works_glibc_strerror_r="unknown"
42913 tst_works_posix_strerror_r="unknown"
42914 tst_glibc_strerror_r_type_arg3="unknown"
42915 tst_posix_strerror_r_type_arg3="unknown"
42916 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080042917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strerror_r can be linked" >&5
42918printf %s "checking if strerror_r can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42920/* end confdefs.h. */
42921
42922
42923#define strerror_r innocuous_strerror_r
42924#ifdef __STDC__
42925# include <limits.h>
42926#else
42927# include <assert.h>
42928#endif
42929#undef strerror_r
42930#ifdef __cplusplus
42931extern "C"
42932#endif
42933char strerror_r ();
42934#if defined __stub_strerror_r || defined __stub___strerror_r
42935choke me
42936#endif
42937
42938int main (void)
42939{
42940return strerror_r ();
42941 ;
42942 return 0;
42943}
42944
42945_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080042946if ac_fn_c_try_link "$LINENO"
42947then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042948
Elliott Hughesf344baa2021-12-07 09:12:34 -080042949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42950printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042951 tst_links_strerror_r="yes"
42952
Elliott Hughesf344baa2021-12-07 09:12:34 -080042953else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042954
Elliott Hughesf344baa2021-12-07 09:12:34 -080042955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42956printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042957 tst_links_strerror_r="no"
42958
42959fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042960rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070042961 conftest$ac_exeext conftest.$ac_ext
42962 #
42963 if test "$tst_links_strerror_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strerror_r is prototyped" >&5
42965printf %s "checking if strerror_r is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42967/* end confdefs.h. */
42968
42969 $curl_includes_string
42970
42971_ACEOF
42972if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080042973 $EGREP "strerror_r" >/dev/null 2>&1
42974then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070042975
Elliott Hughesf344baa2021-12-07 09:12:34 -080042976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42977printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042978 tst_proto_strerror_r="yes"
42979
Elliott Hughesf344baa2021-12-07 09:12:34 -080042980else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070042981
Elliott Hughesf344baa2021-12-07 09:12:34 -080042982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42983printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042984 tst_proto_strerror_r="no"
42985
42986fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080042987rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070042988
42989 fi
42990 #
42991 if test "$tst_proto_strerror_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080042992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strerror_r is compilable" >&5
42993printf %s "checking if strerror_r is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070042994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42995/* end confdefs.h. */
42996
42997
42998 $curl_includes_string
42999
43000int main (void)
43001{
43002
43003 if(0 != strerror_r(0, 0, 0))
43004 return 1;
43005
43006 ;
43007 return 0;
43008}
43009
43010_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080043011if ac_fn_c_try_compile "$LINENO"
43012then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070043013
Elliott Hughesf344baa2021-12-07 09:12:34 -080043014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43015printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043016 tst_compi_strerror_r="yes"
43017
Elliott Hughesf344baa2021-12-07 09:12:34 -080043018else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070043019
Elliott Hughesf344baa2021-12-07 09:12:34 -080043020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43021printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043022 tst_compi_strerror_r="no"
43023
43024fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080043025rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070043026 fi
43027 #
43028 if test "$tst_compi_strerror_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strerror_r is glibc like" >&5
43030printf %s "checking if strerror_r is glibc like... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043031 tst_glibc_strerror_r_type_arg3="unknown"
43032 for arg3 in 'size_t' 'int' 'unsigned int'; do
43033 if test "$tst_glibc_strerror_r_type_arg3" = "unknown"; then
43034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43035/* end confdefs.h. */
43036
43037
43038 $curl_includes_string
43039 char *strerror_r(int errnum, char *workbuf, $arg3 bufsize);
43040
43041int main (void)
43042{
43043
43044 if(0 != strerror_r(0, 0, 0))
43045 return 1;
43046
43047 ;
43048 return 0;
43049}
43050
43051_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080043052if ac_fn_c_try_compile "$LINENO"
43053then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070043054
43055 tst_glibc_strerror_r_type_arg3="$arg3"
43056
43057fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080043058rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070043059 fi
43060 done
43061 case "$tst_glibc_strerror_r_type_arg3" in
43062 unknown)
Elliott Hughesf344baa2021-12-07 09:12:34 -080043063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43064printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043065 tst_glibc_strerror_r="no"
43066 ;;
43067 *)
Elliott Hughesf344baa2021-12-07 09:12:34 -080043068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43069printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043070 tst_glibc_strerror_r="yes"
43071 ;;
43072 esac
43073 fi
43074 #
43075 if test "x$cross_compiling" != "xyes" &&
43076 test "$tst_glibc_strerror_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043077 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strerror_r seems to work" >&5
43078printf %s "checking if strerror_r seems to work... " >&6; }
Elliott Hughesa93fb052018-12-12 14:22:48 -080043079
Elliott Hughesa93fb052018-12-12 14:22:48 -080043080 old=$LD_LIBRARY_PATH
43081 LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
43082 export LD_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080043083 if test "$cross_compiling" = yes
43084then :
43085 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
43086printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070043087as_fn_error $? "cannot run test program while cross compiling
43088See \`config.log' for more details" "$LINENO" 5; }
Elliott Hughesf344baa2021-12-07 09:12:34 -080043089else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070043090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43091/* end confdefs.h. */
43092
43093
43094 $curl_includes_stdlib
43095 $curl_includes_string
43096# include <errno.h>
43097
43098int main (void)
43099{
43100
43101 char buffer[1024];
43102 char *string = 0;
43103 buffer[0] = '\0';
43104 string = strerror_r(EACCES, buffer, sizeof(buffer));
43105 if(!string)
43106 exit(1); /* fail */
43107 if(!string[0])
43108 exit(1); /* fail */
43109 else
43110 exit(0);
43111
43112 ;
43113 return 0;
43114}
43115
43116_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080043117if ac_fn_c_try_run "$LINENO"
43118then :
43119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43120printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043121 tst_works_glibc_strerror_r="yes"
43122
Elliott Hughesf344baa2021-12-07 09:12:34 -080043123else $as_nop
43124 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43125printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043126 tst_works_glibc_strerror_r="no"
43127
43128fi
43129rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43130 conftest.$ac_objext conftest.beam conftest.$ac_ext
43131fi
43132
Elliott Hughesa93fb052018-12-12 14:22:48 -080043133 LD_LIBRARY_PATH=$old # restore
43134
Elliott Hughes82be86d2017-09-20 17:00:17 -070043135 fi
43136 #
43137 if test "$tst_compi_strerror_r" = "yes" &&
43138 test "$tst_works_glibc_strerror_r" != "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strerror_r is POSIX like" >&5
43140printf %s "checking if strerror_r is POSIX like... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043141 tst_posix_strerror_r_type_arg3="unknown"
43142 for arg3 in 'size_t' 'int' 'unsigned int'; do
43143 if test "$tst_posix_strerror_r_type_arg3" = "unknown"; then
43144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43145/* end confdefs.h. */
43146
43147
43148 $curl_includes_string
43149 int strerror_r(int errnum, char *resultbuf, $arg3 bufsize);
43150
43151int main (void)
43152{
43153
43154 if(0 != strerror_r(0, 0, 0))
43155 return 1;
43156
43157 ;
43158 return 0;
43159}
43160
43161_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080043162if ac_fn_c_try_compile "$LINENO"
43163then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070043164
43165 tst_posix_strerror_r_type_arg3="$arg3"
43166
43167fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080043168rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070043169 fi
43170 done
43171 case "$tst_posix_strerror_r_type_arg3" in
43172 unknown)
Elliott Hughesf344baa2021-12-07 09:12:34 -080043173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43174printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043175 tst_posix_strerror_r="no"
43176 ;;
43177 *)
Elliott Hughesf344baa2021-12-07 09:12:34 -080043178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43179printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043180 tst_posix_strerror_r="yes"
43181 ;;
43182 esac
43183 fi
43184 #
43185 if test "x$cross_compiling" != "xyes" &&
43186 test "$tst_posix_strerror_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strerror_r seems to work" >&5
43188printf %s "checking if strerror_r seems to work... " >&6; }
Elliott Hughesa93fb052018-12-12 14:22:48 -080043189
Elliott Hughesa93fb052018-12-12 14:22:48 -080043190 old=$LD_LIBRARY_PATH
43191 LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
43192 export LD_LIBRARY_PATH
Elliott Hughesf344baa2021-12-07 09:12:34 -080043193 if test "$cross_compiling" = yes
43194then :
43195 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
43196printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070043197as_fn_error $? "cannot run test program while cross compiling
43198See \`config.log' for more details" "$LINENO" 5; }
Elliott Hughesf344baa2021-12-07 09:12:34 -080043199else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070043200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43201/* end confdefs.h. */
43202
43203
43204 $curl_includes_stdlib
43205 $curl_includes_string
43206# include <errno.h>
43207
43208int main (void)
43209{
43210
43211 char buffer[1024];
43212 int error = 1;
43213 buffer[0] = '\0';
43214 error = strerror_r(EACCES, buffer, sizeof(buffer));
43215 if(error)
43216 exit(1); /* fail */
43217 if(buffer[0] == '\0')
43218 exit(1); /* fail */
43219 else
43220 exit(0);
43221
43222 ;
43223 return 0;
43224}
43225
43226_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080043227if ac_fn_c_try_run "$LINENO"
43228then :
43229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43230printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043231 tst_works_posix_strerror_r="yes"
43232
Elliott Hughesf344baa2021-12-07 09:12:34 -080043233else $as_nop
43234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43235printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043236 tst_works_posix_strerror_r="no"
43237
43238fi
43239rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43240 conftest.$ac_objext conftest.beam conftest.$ac_ext
43241fi
43242
Elliott Hughesa93fb052018-12-12 14:22:48 -080043243 LD_LIBRARY_PATH=$old # restore
43244
Elliott Hughes82be86d2017-09-20 17:00:17 -070043245 fi
43246 #
43247 if test "$tst_works_glibc_strerror_r" = "yes"; then
43248 tst_posix_strerror_r="no"
43249 fi
43250 if test "$tst_works_posix_strerror_r" = "yes"; then
43251 tst_glibc_strerror_r="no"
43252 fi
43253 if test "$tst_glibc_strerror_r" = "yes" &&
43254 test "$tst_works_glibc_strerror_r" != "no" &&
43255 test "$tst_posix_strerror_r" != "yes"; then
43256 tst_allow_strerror_r="check"
43257 fi
43258 if test "$tst_posix_strerror_r" = "yes" &&
43259 test "$tst_works_posix_strerror_r" != "no" &&
43260 test "$tst_glibc_strerror_r" != "yes"; then
43261 tst_allow_strerror_r="check"
43262 fi
43263 if test "$tst_allow_strerror_r" = "check"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strerror_r usage allowed" >&5
43265printf %s "checking if strerror_r usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043266 if test "x$curl_disallow_strerror_r" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43268printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043269 tst_allow_strerror_r="yes"
43270 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080043271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43272printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043273 tst_allow_strerror_r="no"
43274 fi
43275 fi
43276 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080043277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strerror_r might be used" >&5
43278printf %s "checking if strerror_r might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043279 if test "$tst_links_strerror_r" = "yes" &&
43280 test "$tst_proto_strerror_r" = "yes" &&
43281 test "$tst_compi_strerror_r" = "yes" &&
43282 test "$tst_allow_strerror_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43284printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043285 if test "$tst_glibc_strerror_r" = "yes"; then
43286
Elliott Hughesf344baa2021-12-07 09:12:34 -080043287printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070043288
43289
Elliott Hughesf344baa2021-12-07 09:12:34 -080043290printf "%s\n" "#define HAVE_GLIBC_STRERROR_R 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070043291
43292
Elliott Hughesf344baa2021-12-07 09:12:34 -080043293printf "%s\n" "#define STRERROR_R_TYPE_ARG3 $tst_glibc_strerror_r_type_arg3" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070043294
43295 fi
43296 if test "$tst_posix_strerror_r" = "yes"; then
43297
Elliott Hughesf344baa2021-12-07 09:12:34 -080043298printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070043299
43300
Elliott Hughesf344baa2021-12-07 09:12:34 -080043301printf "%s\n" "#define HAVE_POSIX_STRERROR_R 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070043302
43303
Elliott Hughesf344baa2021-12-07 09:12:34 -080043304printf "%s\n" "#define STRERROR_R_TYPE_ARG3 $tst_posix_strerror_r_type_arg3" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070043305
43306 fi
43307 curl_cv_func_strerror_r="yes"
43308 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080043309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43310printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043311 curl_cv_func_strerror_r="no"
43312 fi
43313 #
43314 if test "$tst_compi_strerror_r" = "yes" &&
43315 test "$tst_allow_strerror_r" = "unknown"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043316 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine strerror_r() style: edit lib/curl_config.h manually." >&5
43317printf "%s\n" "$as_me: WARNING: cannot determine strerror_r() style: edit lib/curl_config.h manually." >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070043318 fi
43319 #
43320
43321
43322 #
43323 tst_links_stricmp="unknown"
43324 tst_proto_stricmp="unknown"
43325 tst_compi_stricmp="unknown"
43326 tst_allow_stricmp="unknown"
43327 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080043328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if stricmp can be linked" >&5
43329printf %s "checking if stricmp can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43331/* end confdefs.h. */
43332
43333
43334#define stricmp innocuous_stricmp
43335#ifdef __STDC__
43336# include <limits.h>
43337#else
43338# include <assert.h>
43339#endif
43340#undef stricmp
43341#ifdef __cplusplus
43342extern "C"
43343#endif
43344char stricmp ();
43345#if defined __stub_stricmp || defined __stub___stricmp
43346choke me
43347#endif
43348
43349int main (void)
43350{
43351return stricmp ();
43352 ;
43353 return 0;
43354}
43355
43356_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080043357if ac_fn_c_try_link "$LINENO"
43358then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070043359
Elliott Hughesf344baa2021-12-07 09:12:34 -080043360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43361printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043362 tst_links_stricmp="yes"
43363
Elliott Hughesf344baa2021-12-07 09:12:34 -080043364else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070043365
Elliott Hughesf344baa2021-12-07 09:12:34 -080043366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43367printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043368 tst_links_stricmp="no"
43369
43370fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080043371rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070043372 conftest$ac_exeext conftest.$ac_ext
43373 #
43374 if test "$tst_links_stricmp" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if stricmp is prototyped" >&5
43376printf %s "checking if stricmp is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43378/* end confdefs.h. */
43379
43380 $curl_includes_string
43381
43382_ACEOF
43383if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080043384 $EGREP "stricmp" >/dev/null 2>&1
43385then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070043386
Elliott Hughesf344baa2021-12-07 09:12:34 -080043387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43388printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043389 tst_proto_stricmp="yes"
43390
Elliott Hughesf344baa2021-12-07 09:12:34 -080043391else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070043392
Elliott Hughesf344baa2021-12-07 09:12:34 -080043393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43394printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043395 tst_proto_stricmp="no"
43396
43397fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080043398rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070043399
43400 fi
43401 #
43402 if test "$tst_proto_stricmp" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if stricmp is compilable" >&5
43404printf %s "checking if stricmp is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43406/* end confdefs.h. */
43407
43408
43409 $curl_includes_string
43410
43411int main (void)
43412{
43413
43414 if(0 != stricmp(0, 0))
43415 return 1;
43416
43417 ;
43418 return 0;
43419}
43420
43421_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080043422if ac_fn_c_try_compile "$LINENO"
43423then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070043424
Elliott Hughesf344baa2021-12-07 09:12:34 -080043425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43426printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043427 tst_compi_stricmp="yes"
43428
Elliott Hughesf344baa2021-12-07 09:12:34 -080043429else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070043430
Elliott Hughesf344baa2021-12-07 09:12:34 -080043431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43432printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043433 tst_compi_stricmp="no"
43434
43435fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080043436rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070043437 fi
43438 #
43439 if test "$tst_compi_stricmp" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if stricmp usage allowed" >&5
43441printf %s "checking if stricmp usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043442 if test "x$curl_disallow_stricmp" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43444printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043445 tst_allow_stricmp="yes"
43446 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080043447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43448printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043449 tst_allow_stricmp="no"
43450 fi
43451 fi
43452 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080043453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if stricmp might be used" >&5
43454printf %s "checking if stricmp might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043455 if test "$tst_links_stricmp" = "yes" &&
43456 test "$tst_proto_stricmp" = "yes" &&
43457 test "$tst_compi_stricmp" = "yes" &&
43458 test "$tst_allow_stricmp" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043459 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43460printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043461
Elliott Hughesf344baa2021-12-07 09:12:34 -080043462printf "%s\n" "#define HAVE_STRICMP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070043463
43464 curl_cv_func_stricmp="yes"
43465 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080043466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43467printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043468 curl_cv_func_stricmp="no"
43469 fi
43470
43471
43472 #
Elliott Hughes82be86d2017-09-20 17:00:17 -070043473 tst_links_strncmpi="unknown"
43474 tst_proto_strncmpi="unknown"
43475 tst_compi_strncmpi="unknown"
43476 tst_allow_strncmpi="unknown"
43477 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080043478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strncmpi can be linked" >&5
43479printf %s "checking if strncmpi can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43481/* end confdefs.h. */
43482
43483
43484#define strncmpi innocuous_strncmpi
43485#ifdef __STDC__
43486# include <limits.h>
43487#else
43488# include <assert.h>
43489#endif
43490#undef strncmpi
43491#ifdef __cplusplus
43492extern "C"
43493#endif
43494char strncmpi ();
43495#if defined __stub_strncmpi || defined __stub___strncmpi
43496choke me
43497#endif
43498
43499int main (void)
43500{
43501return strncmpi ();
43502 ;
43503 return 0;
43504}
43505
43506_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080043507if ac_fn_c_try_link "$LINENO"
43508then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070043509
Elliott Hughesf344baa2021-12-07 09:12:34 -080043510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43511printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043512 tst_links_strncmpi="yes"
43513
Elliott Hughesf344baa2021-12-07 09:12:34 -080043514else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070043515
Elliott Hughesf344baa2021-12-07 09:12:34 -080043516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43517printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043518 tst_links_strncmpi="no"
43519
43520fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080043521rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070043522 conftest$ac_exeext conftest.$ac_ext
43523 #
43524 if test "$tst_links_strncmpi" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strncmpi is prototyped" >&5
43526printf %s "checking if strncmpi is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43528/* end confdefs.h. */
43529
43530 $curl_includes_string
43531
43532_ACEOF
43533if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080043534 $EGREP "strncmpi" >/dev/null 2>&1
43535then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070043536
Elliott Hughesf344baa2021-12-07 09:12:34 -080043537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43538printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043539 tst_proto_strncmpi="yes"
43540
Elliott Hughesf344baa2021-12-07 09:12:34 -080043541else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070043542
Elliott Hughesf344baa2021-12-07 09:12:34 -080043543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43544printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043545 tst_proto_strncmpi="no"
43546
43547fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080043548rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070043549
43550 fi
43551 #
43552 if test "$tst_proto_strncmpi" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strncmpi is compilable" >&5
43554printf %s "checking if strncmpi is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43556/* end confdefs.h. */
43557
43558
43559 $curl_includes_string
43560
43561int main (void)
43562{
43563
43564 if(0 != strncmpi(0, 0))
43565 return 1;
43566
43567 ;
43568 return 0;
43569}
43570
43571_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080043572if ac_fn_c_try_compile "$LINENO"
43573then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070043574
Elliott Hughesf344baa2021-12-07 09:12:34 -080043575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43576printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043577 tst_compi_strncmpi="yes"
43578
Elliott Hughesf344baa2021-12-07 09:12:34 -080043579else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070043580
Elliott Hughesf344baa2021-12-07 09:12:34 -080043581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43582printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043583 tst_compi_strncmpi="no"
43584
43585fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080043586rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070043587 fi
43588 #
43589 if test "$tst_compi_strncmpi" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strncmpi usage allowed" >&5
43591printf %s "checking if strncmpi usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043592 if test "x$curl_disallow_strncmpi" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43594printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043595 tst_allow_strncmpi="yes"
43596 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080043597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43598printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043599 tst_allow_strncmpi="no"
43600 fi
43601 fi
43602 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080043603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strncmpi might be used" >&5
43604printf %s "checking if strncmpi might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043605 if test "$tst_links_strncmpi" = "yes" &&
43606 test "$tst_proto_strncmpi" = "yes" &&
43607 test "$tst_compi_strncmpi" = "yes" &&
43608 test "$tst_allow_strncmpi" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43610printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043611
Elliott Hughesf344baa2021-12-07 09:12:34 -080043612printf "%s\n" "#define HAVE_STRNCMPI 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070043613
43614 curl_cv_func_strncmpi="yes"
43615 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080043616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43617printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043618 curl_cv_func_strncmpi="no"
43619 fi
43620
43621
43622 #
43623 tst_links_strnicmp="unknown"
43624 tst_proto_strnicmp="unknown"
43625 tst_compi_strnicmp="unknown"
43626 tst_allow_strnicmp="unknown"
43627 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080043628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strnicmp can be linked" >&5
43629printf %s "checking if strnicmp can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43631/* end confdefs.h. */
43632
43633
43634#define strnicmp innocuous_strnicmp
43635#ifdef __STDC__
43636# include <limits.h>
43637#else
43638# include <assert.h>
43639#endif
43640#undef strnicmp
43641#ifdef __cplusplus
43642extern "C"
43643#endif
43644char strnicmp ();
43645#if defined __stub_strnicmp || defined __stub___strnicmp
43646choke me
43647#endif
43648
43649int main (void)
43650{
43651return strnicmp ();
43652 ;
43653 return 0;
43654}
43655
43656_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080043657if ac_fn_c_try_link "$LINENO"
43658then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070043659
Elliott Hughesf344baa2021-12-07 09:12:34 -080043660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43661printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043662 tst_links_strnicmp="yes"
43663
Elliott Hughesf344baa2021-12-07 09:12:34 -080043664else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070043665
Elliott Hughesf344baa2021-12-07 09:12:34 -080043666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43667printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043668 tst_links_strnicmp="no"
43669
43670fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080043671rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070043672 conftest$ac_exeext conftest.$ac_ext
43673 #
43674 if test "$tst_links_strnicmp" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strnicmp is prototyped" >&5
43676printf %s "checking if strnicmp is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43678/* end confdefs.h. */
43679
43680 $curl_includes_string
43681
43682_ACEOF
43683if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080043684 $EGREP "strnicmp" >/dev/null 2>&1
43685then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070043686
Elliott Hughesf344baa2021-12-07 09:12:34 -080043687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43688printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043689 tst_proto_strnicmp="yes"
43690
Elliott Hughesf344baa2021-12-07 09:12:34 -080043691else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070043692
Elliott Hughesf344baa2021-12-07 09:12:34 -080043693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43694printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043695 tst_proto_strnicmp="no"
43696
43697fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080043698rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070043699
43700 fi
43701 #
43702 if test "$tst_proto_strnicmp" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strnicmp is compilable" >&5
43704printf %s "checking if strnicmp is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43706/* end confdefs.h. */
43707
43708
43709 $curl_includes_string
43710
43711int main (void)
43712{
43713
43714 if(0 != strnicmp(0, 0))
43715 return 1;
43716
43717 ;
43718 return 0;
43719}
43720
43721_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080043722if ac_fn_c_try_compile "$LINENO"
43723then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070043724
Elliott Hughesf344baa2021-12-07 09:12:34 -080043725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43726printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043727 tst_compi_strnicmp="yes"
43728
Elliott Hughesf344baa2021-12-07 09:12:34 -080043729else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070043730
Elliott Hughesf344baa2021-12-07 09:12:34 -080043731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43732printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043733 tst_compi_strnicmp="no"
43734
43735fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080043736rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070043737 fi
43738 #
43739 if test "$tst_compi_strnicmp" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strnicmp usage allowed" >&5
43741printf %s "checking if strnicmp usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043742 if test "x$curl_disallow_strnicmp" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43744printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043745 tst_allow_strnicmp="yes"
43746 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080043747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43748printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043749 tst_allow_strnicmp="no"
43750 fi
43751 fi
43752 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080043753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strnicmp might be used" >&5
43754printf %s "checking if strnicmp might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043755 if test "$tst_links_strnicmp" = "yes" &&
43756 test "$tst_proto_strnicmp" = "yes" &&
43757 test "$tst_compi_strnicmp" = "yes" &&
43758 test "$tst_allow_strnicmp" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43760printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043761
Elliott Hughesf344baa2021-12-07 09:12:34 -080043762printf "%s\n" "#define HAVE_STRNICMP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070043763
43764 curl_cv_func_strnicmp="yes"
43765 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080043766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43767printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043768 curl_cv_func_strnicmp="no"
43769 fi
43770
43771
43772 #
43773 tst_links_strstr="unknown"
43774 tst_proto_strstr="unknown"
43775 tst_compi_strstr="unknown"
43776 tst_allow_strstr="unknown"
43777 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080043778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strstr can be linked" >&5
43779printf %s "checking if strstr can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43781/* end confdefs.h. */
43782
43783
43784#define strstr innocuous_strstr
43785#ifdef __STDC__
43786# include <limits.h>
43787#else
43788# include <assert.h>
43789#endif
43790#undef strstr
43791#ifdef __cplusplus
43792extern "C"
43793#endif
43794char strstr ();
43795#if defined __stub_strstr || defined __stub___strstr
43796choke me
43797#endif
43798
43799int main (void)
43800{
43801return strstr ();
43802 ;
43803 return 0;
43804}
43805
43806_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080043807if ac_fn_c_try_link "$LINENO"
43808then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070043809
Elliott Hughesf344baa2021-12-07 09:12:34 -080043810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43811printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043812 tst_links_strstr="yes"
43813
Elliott Hughesf344baa2021-12-07 09:12:34 -080043814else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070043815
Elliott Hughesf344baa2021-12-07 09:12:34 -080043816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43817printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043818 tst_links_strstr="no"
43819
43820fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080043821rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070043822 conftest$ac_exeext conftest.$ac_ext
43823 #
43824 if test "$tst_links_strstr" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strstr is prototyped" >&5
43826printf %s "checking if strstr is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43828/* end confdefs.h. */
43829
43830 $curl_includes_string
43831
43832_ACEOF
43833if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080043834 $EGREP "strstr" >/dev/null 2>&1
43835then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070043836
Elliott Hughesf344baa2021-12-07 09:12:34 -080043837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43838printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043839 tst_proto_strstr="yes"
43840
Elliott Hughesf344baa2021-12-07 09:12:34 -080043841else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070043842
Elliott Hughesf344baa2021-12-07 09:12:34 -080043843 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43844printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043845 tst_proto_strstr="no"
43846
43847fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080043848rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070043849
43850 fi
43851 #
43852 if test "$tst_proto_strstr" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strstr is compilable" >&5
43854printf %s "checking if strstr is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43856/* end confdefs.h. */
43857
43858
43859 $curl_includes_string
43860
43861int main (void)
43862{
43863
43864 if(0 != strstr(0, 0))
43865 return 1;
43866
43867 ;
43868 return 0;
43869}
43870
43871_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080043872if ac_fn_c_try_compile "$LINENO"
43873then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070043874
Elliott Hughesf344baa2021-12-07 09:12:34 -080043875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43876printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043877 tst_compi_strstr="yes"
43878
Elliott Hughesf344baa2021-12-07 09:12:34 -080043879else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070043880
Elliott Hughesf344baa2021-12-07 09:12:34 -080043881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43882printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043883 tst_compi_strstr="no"
43884
43885fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080043886rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070043887 fi
43888 #
43889 if test "$tst_compi_strstr" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strstr usage allowed" >&5
43891printf %s "checking if strstr usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043892 if test "x$curl_disallow_strstr" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43894printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043895 tst_allow_strstr="yes"
43896 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080043897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43898printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043899 tst_allow_strstr="no"
43900 fi
43901 fi
43902 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080043903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strstr might be used" >&5
43904printf %s "checking if strstr might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043905 if test "$tst_links_strstr" = "yes" &&
43906 test "$tst_proto_strstr" = "yes" &&
43907 test "$tst_compi_strstr" = "yes" &&
43908 test "$tst_allow_strstr" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43910printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043911
Elliott Hughesf344baa2021-12-07 09:12:34 -080043912printf "%s\n" "#define HAVE_STRSTR 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070043913
43914 curl_cv_func_strstr="yes"
43915 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080043916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43917printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043918 curl_cv_func_strstr="no"
43919 fi
43920
43921
43922 #
43923 tst_links_strtok_r="unknown"
43924 tst_proto_strtok_r="unknown"
43925 tst_compi_strtok_r="unknown"
43926 tst_allow_strtok_r="unknown"
43927 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080043928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strtok_r can be linked" >&5
43929printf %s "checking if strtok_r can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43931/* end confdefs.h. */
43932
43933
43934#define strtok_r innocuous_strtok_r
43935#ifdef __STDC__
43936# include <limits.h>
43937#else
43938# include <assert.h>
43939#endif
43940#undef strtok_r
43941#ifdef __cplusplus
43942extern "C"
43943#endif
43944char strtok_r ();
43945#if defined __stub_strtok_r || defined __stub___strtok_r
43946choke me
43947#endif
43948
43949int main (void)
43950{
43951return strtok_r ();
43952 ;
43953 return 0;
43954}
43955
43956_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080043957if ac_fn_c_try_link "$LINENO"
43958then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070043959
Elliott Hughesf344baa2021-12-07 09:12:34 -080043960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43961printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043962 tst_links_strtok_r="yes"
43963
Elliott Hughesf344baa2021-12-07 09:12:34 -080043964else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070043965
Elliott Hughesf344baa2021-12-07 09:12:34 -080043966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43967printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043968 tst_links_strtok_r="no"
43969
43970fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080043971rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070043972 conftest$ac_exeext conftest.$ac_ext
43973 #
43974 if test "$tst_links_strtok_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080043975 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strtok_r is prototyped" >&5
43976printf %s "checking if strtok_r is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43978/* end confdefs.h. */
43979
43980 $curl_includes_string
43981
43982_ACEOF
43983if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080043984 $EGREP "strtok_r" >/dev/null 2>&1
43985then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070043986
Elliott Hughesf344baa2021-12-07 09:12:34 -080043987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43988printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043989 tst_proto_strtok_r="yes"
43990
Elliott Hughesf344baa2021-12-07 09:12:34 -080043991else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070043992
Elliott Hughesf344baa2021-12-07 09:12:34 -080043993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43994printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070043995 tst_proto_strtok_r="no"
43996
43997fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080043998rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070043999
44000 fi
44001 #
44002 if test "$tst_proto_strtok_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strtok_r is compilable" >&5
44004printf %s "checking if strtok_r is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44006/* end confdefs.h. */
44007
44008
44009 $curl_includes_string
44010
44011int main (void)
44012{
44013
44014 if(0 != strtok_r(0, 0, 0))
44015 return 1;
44016
44017 ;
44018 return 0;
44019}
44020
44021_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080044022if ac_fn_c_try_compile "$LINENO"
44023then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070044024
Elliott Hughesf344baa2021-12-07 09:12:34 -080044025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44026printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044027 tst_compi_strtok_r="yes"
44028
Elliott Hughesf344baa2021-12-07 09:12:34 -080044029else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070044030
Elliott Hughesf344baa2021-12-07 09:12:34 -080044031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44032printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044033 tst_compi_strtok_r="no"
44034
44035fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080044036rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070044037 fi
44038 #
44039 if test "$tst_compi_strtok_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strtok_r usage allowed" >&5
44041printf %s "checking if strtok_r usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044042 if test "x$curl_disallow_strtok_r" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44044printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044045 tst_allow_strtok_r="yes"
44046 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080044047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44048printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044049 tst_allow_strtok_r="no"
44050 fi
44051 fi
44052 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080044053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strtok_r might be used" >&5
44054printf %s "checking if strtok_r might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044055 if test "$tst_links_strtok_r" = "yes" &&
44056 test "$tst_proto_strtok_r" = "yes" &&
44057 test "$tst_compi_strtok_r" = "yes" &&
44058 test "$tst_allow_strtok_r" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44060printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044061
Elliott Hughesf344baa2021-12-07 09:12:34 -080044062printf "%s\n" "#define HAVE_STRTOK_R 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070044063
44064 curl_cv_func_strtok_r="yes"
44065 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080044066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44067printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044068 curl_cv_func_strtok_r="no"
44069 fi
44070
44071
44072 #
44073 tst_links_strtoll="unknown"
44074 tst_proto_strtoll="unknown"
44075 tst_compi_strtoll="unknown"
44076 tst_allow_strtoll="unknown"
44077 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080044078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strtoll can be linked" >&5
44079printf %s "checking if strtoll can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44081/* end confdefs.h. */
44082
44083
44084#define strtoll innocuous_strtoll
44085#ifdef __STDC__
44086# include <limits.h>
44087#else
44088# include <assert.h>
44089#endif
44090#undef strtoll
44091#ifdef __cplusplus
44092extern "C"
44093#endif
44094char strtoll ();
44095#if defined __stub_strtoll || defined __stub___strtoll
44096choke me
44097#endif
44098
44099int main (void)
44100{
44101return strtoll ();
44102 ;
44103 return 0;
44104}
44105
44106_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080044107if ac_fn_c_try_link "$LINENO"
44108then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070044109
Elliott Hughesf344baa2021-12-07 09:12:34 -080044110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44111printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044112 tst_links_strtoll="yes"
44113
Elliott Hughesf344baa2021-12-07 09:12:34 -080044114else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070044115
Elliott Hughesf344baa2021-12-07 09:12:34 -080044116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44117printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044118 tst_links_strtoll="no"
44119
44120fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080044121rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070044122 conftest$ac_exeext conftest.$ac_ext
44123 #
44124 if test "$tst_links_strtoll" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strtoll is prototyped" >&5
44126printf %s "checking if strtoll is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44128/* end confdefs.h. */
44129
44130 $curl_includes_stdlib
44131
44132_ACEOF
44133if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080044134 $EGREP "strtoll" >/dev/null 2>&1
44135then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070044136
Elliott Hughesf344baa2021-12-07 09:12:34 -080044137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44138printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044139 tst_proto_strtoll="yes"
44140
Elliott Hughesf344baa2021-12-07 09:12:34 -080044141else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070044142
Elliott Hughesf344baa2021-12-07 09:12:34 -080044143 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44144printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044145 tst_proto_strtoll="no"
44146
44147fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080044148rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070044149
44150 fi
44151 #
44152 if test "$tst_proto_strtoll" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strtoll is compilable" >&5
44154printf %s "checking if strtoll is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44156/* end confdefs.h. */
44157
44158
44159 $curl_includes_stdlib
44160
44161int main (void)
44162{
44163
44164 if(0 != strtoll(0, 0, 0))
44165 return 1;
44166
44167 ;
44168 return 0;
44169}
44170
44171_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080044172if ac_fn_c_try_compile "$LINENO"
44173then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070044174
Elliott Hughesf344baa2021-12-07 09:12:34 -080044175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44176printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044177 tst_compi_strtoll="yes"
44178
Elliott Hughesf344baa2021-12-07 09:12:34 -080044179else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070044180
Elliott Hughesf344baa2021-12-07 09:12:34 -080044181 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44182printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044183 tst_compi_strtoll="no"
44184
44185fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080044186rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070044187 fi
44188 #
44189 if test "$tst_compi_strtoll" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strtoll usage allowed" >&5
44191printf %s "checking if strtoll usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044192 if test "x$curl_disallow_strtoll" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44194printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044195 tst_allow_strtoll="yes"
44196 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080044197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44198printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044199 tst_allow_strtoll="no"
44200 fi
44201 fi
44202 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080044203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strtoll might be used" >&5
44204printf %s "checking if strtoll might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044205 if test "$tst_links_strtoll" = "yes" &&
44206 test "$tst_proto_strtoll" = "yes" &&
44207 test "$tst_compi_strtoll" = "yes" &&
44208 test "$tst_allow_strtoll" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44210printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044211
Elliott Hughesf344baa2021-12-07 09:12:34 -080044212printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070044213
44214 curl_cv_func_strtoll="yes"
44215 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080044216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44217printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044218 curl_cv_func_strtoll="no"
44219 fi
44220
44221
44222curl_includes_sys_uio="\
44223/* includes start */
44224#ifdef HAVE_SYS_TYPES_H
44225# include <sys/types.h>
44226#endif
44227#ifdef HAVE_SYS_UIO_H
44228# include <sys/uio.h>
44229#endif
44230/* includes end */"
Elliott Hughesf344baa2021-12-07 09:12:34 -080044231 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$curl_includes_sys_uio
Elliott Hughes82be86d2017-09-20 17:00:17 -070044232"
Elliott Hughesf344baa2021-12-07 09:12:34 -080044233if test "x$ac_cv_header_sys_types_h" = xyes
44234then :
44235 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070044236
44237fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080044238ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$curl_includes_sys_uio
44239"
44240if test "x$ac_cv_header_sys_uio_h" = xyes
44241then :
44242 printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070044243
Elliott Hughesf344baa2021-12-07 09:12:34 -080044244fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070044245
44246
44247
44248 #
44249 tst_links_writev="unknown"
44250 tst_proto_writev="unknown"
44251 tst_compi_writev="unknown"
44252 tst_allow_writev="unknown"
44253 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080044254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if writev can be linked" >&5
44255printf %s "checking if writev can be linked... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44257/* end confdefs.h. */
44258
44259
44260#define writev innocuous_writev
44261#ifdef __STDC__
44262# include <limits.h>
44263#else
44264# include <assert.h>
44265#endif
44266#undef writev
44267#ifdef __cplusplus
44268extern "C"
44269#endif
44270char writev ();
44271#if defined __stub_writev || defined __stub___writev
44272choke me
44273#endif
44274
44275int main (void)
44276{
44277return writev ();
44278 ;
44279 return 0;
44280}
44281
44282_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080044283if ac_fn_c_try_link "$LINENO"
44284then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070044285
Elliott Hughesf344baa2021-12-07 09:12:34 -080044286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44287printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044288 tst_links_writev="yes"
44289
Elliott Hughesf344baa2021-12-07 09:12:34 -080044290else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070044291
Elliott Hughesf344baa2021-12-07 09:12:34 -080044292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44293printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044294 tst_links_writev="no"
44295
44296fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080044297rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070044298 conftest$ac_exeext conftest.$ac_ext
44299 #
44300 if test "$tst_links_writev" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if writev is prototyped" >&5
44302printf %s "checking if writev is prototyped... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44304/* end confdefs.h. */
44305
44306 $curl_includes_sys_uio
44307
44308_ACEOF
44309if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Elliott Hughesf344baa2021-12-07 09:12:34 -080044310 $EGREP "writev" >/dev/null 2>&1
44311then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070044312
Elliott Hughesf344baa2021-12-07 09:12:34 -080044313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44314printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044315 tst_proto_writev="yes"
44316
Elliott Hughesf344baa2021-12-07 09:12:34 -080044317else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070044318
Elliott Hughesf344baa2021-12-07 09:12:34 -080044319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44320printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044321 tst_proto_writev="no"
44322
44323fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080044324rm -rf conftest*
Elliott Hughes82be86d2017-09-20 17:00:17 -070044325
44326 fi
44327 #
44328 if test "$tst_proto_writev" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044329 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if writev is compilable" >&5
44330printf %s "checking if writev is compilable... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44332/* end confdefs.h. */
44333
44334
44335 $curl_includes_sys_uio
44336
44337int main (void)
44338{
44339
44340 if(0 != writev(0, 0, 0))
44341 return 1;
44342
44343 ;
44344 return 0;
44345}
44346
44347_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080044348if ac_fn_c_try_compile "$LINENO"
44349then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070044350
Elliott Hughesf344baa2021-12-07 09:12:34 -080044351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44352printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044353 tst_compi_writev="yes"
44354
Elliott Hughesf344baa2021-12-07 09:12:34 -080044355else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070044356
Elliott Hughesf344baa2021-12-07 09:12:34 -080044357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44358printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044359 tst_compi_writev="no"
44360
44361fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080044362rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Elliott Hughes82be86d2017-09-20 17:00:17 -070044363 fi
44364 #
44365 if test "$tst_compi_writev" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if writev usage allowed" >&5
44367printf %s "checking if writev usage allowed... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044368 if test "x$curl_disallow_writev" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44370printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044371 tst_allow_writev="yes"
44372 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080044373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44374printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044375 tst_allow_writev="no"
44376 fi
44377 fi
44378 #
Elliott Hughesf344baa2021-12-07 09:12:34 -080044379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if writev might be used" >&5
44380printf %s "checking if writev might be used... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044381 if test "$tst_links_writev" = "yes" &&
44382 test "$tst_proto_writev" = "yes" &&
44383 test "$tst_compi_writev" = "yes" &&
44384 test "$tst_allow_writev" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44386printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044387
Elliott Hughesf344baa2021-12-07 09:12:34 -080044388printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070044389
44390 curl_cv_func_writev="yes"
44391 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080044392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44393printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044394 curl_cv_func_writev="no"
44395 fi
44396
44397
44398case $host in
44399 *msdosdjgpp)
44400 ac_cv_func_pipe=no
44401 skipcheck_pipe=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080044402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: skip check for pipe on msdosdjgpp" >&5
44403printf "%s\n" "$as_me: skip check for pipe on msdosdjgpp" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070044404 ;;
44405esac
44406
Elliott Hughesf344baa2021-12-07 09:12:34 -080044407{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
44408printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
44409if test ${ac_cv_c_undeclared_builtin_options+y}
44410then :
44411 printf %s "(cached) " >&6
44412else $as_nop
44413 ac_save_CFLAGS=$CFLAGS
44414 ac_cv_c_undeclared_builtin_options='cannot detect'
44415 for ac_arg in '' -fno-builtin; do
44416 CFLAGS="$ac_save_CFLAGS $ac_arg"
44417 # This test program should *not* compile successfully.
44418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44419/* end confdefs.h. */
44420
44421int main (void)
44422{
44423(void) strchr;
44424 ;
44425 return 0;
44426}
44427_ACEOF
44428if ac_fn_c_try_compile "$LINENO"
44429then :
44430
44431else $as_nop
44432 # This test program should compile successfully.
44433 # No library function is consistently available on
44434 # freestanding implementations, so test against a dummy
44435 # declaration. Include always-available headers on the
44436 # off chance that they somehow elicit warnings.
44437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44438/* end confdefs.h. */
44439#include <float.h>
44440#include <limits.h>
44441#include <stdarg.h>
44442#include <stddef.h>
44443extern void ac_decl (int, char *);
44444
44445int main (void)
44446{
44447(void) ac_decl (0, (char *) 0);
44448 (void) ac_decl;
44449
44450 ;
44451 return 0;
44452}
44453_ACEOF
44454if ac_fn_c_try_compile "$LINENO"
44455then :
44456 if test x"$ac_arg" = x
44457then :
44458 ac_cv_c_undeclared_builtin_options='none needed'
44459else $as_nop
44460 ac_cv_c_undeclared_builtin_options=$ac_arg
44461fi
44462 break
44463fi
44464rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
44465fi
44466rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
44467 done
44468 CFLAGS=$ac_save_CFLAGS
44469
44470fi
44471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
44472printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
44473 case $ac_cv_c_undeclared_builtin_options in #(
44474 'cannot detect') :
44475 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
44476printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
44477as_fn_error $? "cannot make $CC report undeclared builtins
44478See \`config.log' for more details" "$LINENO" 5; } ;; #(
44479 'none needed') :
44480 ac_c_undeclared_builtin_options='' ;; #(
44481 *) :
44482 ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
44483esac
44484
44485ac_fn_check_decl "$LINENO" "getpwuid_r" "ac_cv_have_decl_getpwuid_r" "#include <pwd.h>
Elliott Hughes72d948d2018-08-03 14:37:21 -070044486 #include <sys/types.h>
Elliott Hughesf344baa2021-12-07 09:12:34 -080044487" "$ac_c_undeclared_builtin_options" "CFLAGS"
44488if test "x$ac_cv_have_decl_getpwuid_r" = xyes
44489then :
Elliott Hughes72d948d2018-08-03 14:37:21 -070044490 ac_have_decl=1
Elliott Hughesf344baa2021-12-07 09:12:34 -080044491else $as_nop
Elliott Hughes72d948d2018-08-03 14:37:21 -070044492 ac_have_decl=0
44493fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080044494printf "%s\n" "#define HAVE_DECL_GETPWUID_R $ac_have_decl" >>confdefs.h
44495if test $ac_have_decl = 1
44496then :
Elliott Hughes72d948d2018-08-03 14:37:21 -070044497
Elliott Hughesf344baa2021-12-07 09:12:34 -080044498else $as_nop
Elliott Hughes72d948d2018-08-03 14:37:21 -070044499
Elliott Hughesf344baa2021-12-07 09:12:34 -080044500printf "%s\n" "#define HAVE_DECL_GETPWUID_R_MISSING 1" >>confdefs.h
Elliott Hughes72d948d2018-08-03 14:37:21 -070044501
44502fi
44503
44504
44505
Elliott Hughes82be86d2017-09-20 17:00:17 -070044506
Elliott Hughesf344baa2021-12-07 09:12:34 -080044507 for ac_func in fnmatch geteuid getpass_r getppid getpwuid getpwuid_r getrlimit gettimeofday if_nametoindex mach_absolute_time pipe setlocale setmode setrlimit usleep utime utimes
Elliott Hughes82be86d2017-09-20 17:00:17 -070044508do :
Elliott Hughesf344baa2021-12-07 09:12:34 -080044509 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
Elliott Hughes82be86d2017-09-20 17:00:17 -070044510ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Elliott Hughesf344baa2021-12-07 09:12:34 -080044511if eval test \"x\$"$as_ac_var"\" = x"yes"
44512then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070044513 cat >>confdefs.h <<_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080044514#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
Elliott Hughes82be86d2017-09-20 17:00:17 -070044515_ACEOF
44516
44517
Elliott Hughesf344baa2021-12-07 09:12:34 -080044518else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070044519
44520 func="$ac_func"
44521 eval skipcheck=\$skipcheck_$func
44522 if test "x$skipcheck" != "xyes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044523 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking deeper for $func" >&5
44524printf %s "checking deeper for $func... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44526/* end confdefs.h. */
44527
44528
44529
44530int main (void)
44531{
44532
44533 $func ();
44534
44535 ;
44536 return 0;
44537}
44538
44539_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080044540if ac_fn_c_try_link "$LINENO"
44541then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070044542
Elliott Hughesf344baa2021-12-07 09:12:34 -080044543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44544printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044545 eval "ac_cv_func_$func=yes"
44546
44547cat >>confdefs.h <<_ACEOF
44548#define `echo "HAVE_$func" | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' | sed 's/^A-Z0-9_/_/g'` 1
44549_ACEOF
44550
44551
Elliott Hughesf344baa2021-12-07 09:12:34 -080044552else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070044553
Elliott Hughesf344baa2021-12-07 09:12:34 -080044554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: but still no" >&5
44555printf "%s\n" "but still no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044556
44557fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080044558rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070044559 conftest$ac_exeext conftest.$ac_ext
44560 fi
44561
44562fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070044563
Elliott Hughesf344baa2021-12-07 09:12:34 -080044564done
Elliott Hughes82be86d2017-09-20 17:00:17 -070044565
Elliott Hughes82be86d2017-09-20 17:00:17 -070044566
44567 #
44568 tst_method="unknown"
44569
Elliott Hughesf344baa2021-12-07 09:12:34 -080044570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to set a socket into non-blocking mode" >&5
44571printf %s "checking how to set a socket into non-blocking mode... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044572 if test "x$curl_cv_func_fcntl_o_nonblock" = "xyes"; then
44573 tst_method="fcntl O_NONBLOCK"
44574 elif test "x$curl_cv_func_ioctl_fionbio" = "xyes"; then
44575 tst_method="ioctl FIONBIO"
44576 elif test "x$curl_cv_func_ioctlsocket_fionbio" = "xyes"; then
44577 tst_method="ioctlsocket FIONBIO"
44578 elif test "x$curl_cv_func_ioctlsocket_camel_fionbio" = "xyes"; then
44579 tst_method="IoctlSocket FIONBIO"
44580 elif test "x$curl_cv_func_setsockopt_so_nonblock" = "xyes"; then
44581 tst_method="setsockopt SO_NONBLOCK"
44582 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080044583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tst_method" >&5
44584printf "%s\n" "$tst_method" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044585 if test "$tst_method" = "unknown"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine non-blocking socket method." >&5
44587printf "%s\n" "$as_me: WARNING: cannot determine non-blocking socket method." >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070044588 fi
44589
44590
44591
44592# Extract the first word of "perl", so it can be a program name with args.
44593set dummy perl; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080044594{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44595printf %s "checking for $ac_word... " >&6; }
44596if test ${ac_cv_path_PERL+y}
44597then :
44598 printf %s "(cached) " >&6
44599else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070044600 case $PERL in
44601 [\\/]* | ?:[\\/]*)
44602 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
44603 ;;
44604 *)
44605 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44606as_dummy="$PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin "
44607for as_dir in $as_dummy
44608do
44609 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080044610 case $as_dir in #(((
44611 '') as_dir=./ ;;
44612 */) ;;
44613 *) as_dir=$as_dir/ ;;
44614 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070044615 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080044616 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
44617 ac_cv_path_PERL="$as_dir$ac_word$ac_exec_ext"
44618 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070044619 break 2
44620 fi
44621done
44622 done
44623IFS=$as_save_IFS
44624
44625 ;;
44626esac
44627fi
44628PERL=$ac_cv_path_PERL
44629if test -n "$PERL"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
44631printf "%s\n" "$PERL" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044632else
Elliott Hughesf344baa2021-12-07 09:12:34 -080044633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44634printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044635fi
44636
44637
44638
44639
44640for ac_prog in gnroff nroff
44641do
44642 # Extract the first word of "$ac_prog", so it can be a program name with args.
44643set dummy $ac_prog; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080044644{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44645printf %s "checking for $ac_word... " >&6; }
44646if test ${ac_cv_path_NROFF+y}
44647then :
44648 printf %s "(cached) " >&6
44649else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070044650 case $NROFF in
44651 [\\/]* | ?:[\\/]*)
44652 ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
44653 ;;
44654 *)
44655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44656as_dummy="$PATH:/usr/bin/:/usr/local/bin "
44657for as_dir in $as_dummy
44658do
44659 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080044660 case $as_dir in #(((
44661 '') as_dir=./ ;;
44662 */) ;;
44663 *) as_dir=$as_dir/ ;;
44664 esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070044665 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080044666 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
44667 ac_cv_path_NROFF="$as_dir$ac_word$ac_exec_ext"
44668 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes82be86d2017-09-20 17:00:17 -070044669 break 2
44670 fi
44671done
44672 done
44673IFS=$as_save_IFS
44674
44675 ;;
44676esac
44677fi
44678NROFF=$ac_cv_path_NROFF
44679if test -n "$NROFF"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
44681printf "%s\n" "$NROFF" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044682else
Elliott Hughesf344baa2021-12-07 09:12:34 -080044683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44684printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044685fi
44686
44687
44688 test -n "$NROFF" && break
44689done
44690
44691
44692
44693if test -n "$NROFF"; then
44694
Elliott Hughesf344baa2021-12-07 09:12:34 -080044695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to use *nroff to get plain text from man pages" >&5
44696printf %s "checking how to use *nroff to get plain text from man pages... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044697 MANOPT="-man"
44698 mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
44699 if test -z "$mancheck"; then
44700 MANOPT="-mandoc"
44701 mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
44702 if test -z "$mancheck"; then
44703 MANOPT=""
Elliott Hughesf344baa2021-12-07 09:12:34 -080044704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
44705printf "%s\n" "failed" >&6; }
44706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: found no *nroff option to get plaintext from man pages" >&5
44707printf "%s\n" "$as_me: WARNING: found no *nroff option to get plaintext from man pages" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070044708 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080044709 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANOPT" >&5
44710printf "%s\n" "$MANOPT" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044711 fi
44712 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080044713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANOPT" >&5
44714printf "%s\n" "$MANOPT" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070044715 fi
44716
44717fi
44718
44719if test -z "$MANOPT"
44720then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: disabling built-in manual" >&5
44722printf "%s\n" "$as_me: WARNING: disabling built-in manual" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070044723 USE_MANUAL="no";
44724fi
44725
44726
44727if test "$USE_MANUAL" = "1"; then
44728
Elliott Hughesf344baa2021-12-07 09:12:34 -080044729printf "%s\n" "#define USE_MANUAL 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070044730
44731 curl_manual_msg="enabled"
44732fi
44733
44734 if test x"$USE_MANUAL" = x1; then
44735 USE_MANUAL_TRUE=
44736 USE_MANUAL_FALSE='#'
44737else
44738 USE_MANUAL_TRUE='#'
44739 USE_MANUAL_FALSE=
44740fi
44741
44742
44743
44744
44745
44746 #
44747 if test "$want_ares" = "yes"; then
44748 clean_CPPFLAGS="$CPPFLAGS"
44749 clean_LDFLAGS="$LDFLAGS"
44750 clean_LIBS="$LIBS"
44751 embedded_ares="unknown"
44752 configure_runpath=`pwd`
44753 embedded_ares_builddir="$configure_runpath/ares"
44754 if test -n "$want_ares_path"; then
Elliott Hughes72d948d2018-08-03 14:37:21 -070044755 ARES_PCDIR="$want_ares_path/lib/pkgconfig"
44756
44757 if test -n "$PKG_CONFIG"; then
44758 PKGCONFIG="$PKG_CONFIG"
44759 else
44760 if test -n "$ac_tool_prefix"; then
44761 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
44762set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080044763{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44764printf %s "checking for $ac_word... " >&6; }
44765if test ${ac_cv_path_PKGCONFIG+y}
44766then :
44767 printf %s "(cached) " >&6
44768else $as_nop
Elliott Hughes72d948d2018-08-03 14:37:21 -070044769 case $PKGCONFIG in
44770 [\\/]* | ?:[\\/]*)
44771 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
44772 ;;
44773 *)
44774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44775as_dummy="$PATH:/usr/bin:/usr/local/bin"
44776for as_dir in $as_dummy
44777do
44778 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080044779 case $as_dir in #(((
44780 '') as_dir=./ ;;
44781 */) ;;
44782 *) as_dir=$as_dir/ ;;
44783 esac
Elliott Hughes72d948d2018-08-03 14:37:21 -070044784 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080044785 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
44786 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
44787 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes72d948d2018-08-03 14:37:21 -070044788 break 2
44789 fi
44790done
44791 done
44792IFS=$as_save_IFS
44793
44794 ;;
44795esac
44796fi
44797PKGCONFIG=$ac_cv_path_PKGCONFIG
44798if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
44800printf "%s\n" "$PKGCONFIG" >&6; }
Elliott Hughes72d948d2018-08-03 14:37:21 -070044801else
Elliott Hughesf344baa2021-12-07 09:12:34 -080044802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44803printf "%s\n" "no" >&6; }
Elliott Hughes72d948d2018-08-03 14:37:21 -070044804fi
44805
44806
44807fi
44808if test -z "$ac_cv_path_PKGCONFIG"; then
44809 ac_pt_PKGCONFIG=$PKGCONFIG
44810 # Extract the first word of "pkg-config", so it can be a program name with args.
44811set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080044812{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44813printf %s "checking for $ac_word... " >&6; }
44814if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
44815then :
44816 printf %s "(cached) " >&6
44817else $as_nop
Elliott Hughes72d948d2018-08-03 14:37:21 -070044818 case $ac_pt_PKGCONFIG in
44819 [\\/]* | ?:[\\/]*)
44820 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
44821 ;;
44822 *)
44823 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44824as_dummy="$PATH:/usr/bin:/usr/local/bin"
44825for as_dir in $as_dummy
44826do
44827 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080044828 case $as_dir in #(((
44829 '') as_dir=./ ;;
44830 */) ;;
44831 *) as_dir=$as_dir/ ;;
44832 esac
Elliott Hughes72d948d2018-08-03 14:37:21 -070044833 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080044834 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
44835 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
44836 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes72d948d2018-08-03 14:37:21 -070044837 break 2
44838 fi
44839done
44840 done
44841IFS=$as_save_IFS
44842
44843 ;;
44844esac
44845fi
44846ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
44847if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044848 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
44849printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Elliott Hughes72d948d2018-08-03 14:37:21 -070044850else
Elliott Hughesf344baa2021-12-07 09:12:34 -080044851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44852printf "%s\n" "no" >&6; }
Elliott Hughes72d948d2018-08-03 14:37:21 -070044853fi
44854
44855 if test "x$ac_pt_PKGCONFIG" = x; then
44856 PKGCONFIG="no"
44857 else
44858 case $cross_compiling:$ac_tool_warned in
44859yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080044860{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44861printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes72d948d2018-08-03 14:37:21 -070044862ac_tool_warned=yes ;;
44863esac
44864 PKGCONFIG=$ac_pt_PKGCONFIG
44865 fi
44866else
44867 PKGCONFIG="$ac_cv_path_PKGCONFIG"
44868fi
44869
44870 fi
44871
44872 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcares options with pkg-config" >&5
44874printf %s "checking for libcares options with pkg-config... " >&6; }
Elliott Hughes72d948d2018-08-03 14:37:21 -070044875 itexists=`
44876 if test -n "$ARES_PCDIR"; then
44877 PKG_CONFIG_LIBDIR="$ARES_PCDIR"
44878 export PKG_CONFIG_LIBDIR
44879 fi
44880 $PKGCONFIG --exists libcares >/dev/null 2>&1 && echo 1`
44881
44882 if test -z "$itexists"; then
44883 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080044884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44885printf "%s\n" "no" >&6; }
Elliott Hughes72d948d2018-08-03 14:37:21 -070044886 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080044887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
44888printf "%s\n" "found" >&6; }
Elliott Hughes72d948d2018-08-03 14:37:21 -070044889 fi
44890 fi
44891
44892 if test "$PKGCONFIG" != "no" ; then
44893 ares_LIBS=`
44894 if test -n "$ARES_PCDIR"; then
44895 PKG_CONFIG_LIBDIR="$ARES_PCDIR"
44896 export PKG_CONFIG_LIBDIR
44897 fi
44898
44899 $PKGCONFIG --libs-only-l libcares`
44900 ares_LDFLAGS=`
44901 if test -n "$ARES_PCDIR"; then
44902 PKG_CONFIG_LIBDIR="$ARES_PCDIR"
44903 export PKG_CONFIG_LIBDIR
44904 fi
44905
44906 $PKGCONFIG --libs-only-L libcares`
44907 ares_CPPFLAGS=`
44908 if test -n "$ARES_PCDIR"; then
44909 PKG_CONFIG_LIBDIR="$ARES_PCDIR"
44910 export PKG_CONFIG_LIBDIR
44911 fi
44912
44913 $PKGCONFIG --cflags-only-I libcares`
Elliott Hughesf344baa2021-12-07 09:12:34 -080044914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: ares LIBS: \"$ares_LIBS\"" >&5
44915printf "%s\n" "$as_me: pkg-config: ares LIBS: \"$ares_LIBS\"" >&6;}
44916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: ares LDFLAGS: \"$ares_LDFLAGS\"" >&5
44917printf "%s\n" "$as_me: pkg-config: ares LDFLAGS: \"$ares_LDFLAGS\"" >&6;}
44918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: ares CPPFLAGS: \"$ares_CPPFLAGS\"" >&5
44919printf "%s\n" "$as_me: pkg-config: ares CPPFLAGS: \"$ares_CPPFLAGS\"" >&6;}
Elliott Hughes72d948d2018-08-03 14:37:21 -070044920 else
44921 ares_CPPFLAGS="-I$want_ares_path/include"
44922 ares_LDFLAGS="-L$want_ares_path/lib"
44923 ares_LIBS="-lcares"
44924 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070044925 else
44926 if test -d "$srcdir/ares"; then
44927 embedded_ares="yes"
44928 subdirs="$subdirs ares"
44929
44930 ares_CPPFLAGS=""
44931 ares_LDFLAGS="-L$embedded_ares_builddir"
44932 ares_LIBS="-lcares"
44933 else
Elliott Hughes72d948d2018-08-03 14:37:21 -070044934
44935 if test -n "$PKG_CONFIG"; then
44936 PKGCONFIG="$PKG_CONFIG"
44937 else
44938 if test -n "$ac_tool_prefix"; then
44939 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
44940set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080044941{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44942printf %s "checking for $ac_word... " >&6; }
44943if test ${ac_cv_path_PKGCONFIG+y}
44944then :
44945 printf %s "(cached) " >&6
44946else $as_nop
Elliott Hughes72d948d2018-08-03 14:37:21 -070044947 case $PKGCONFIG in
44948 [\\/]* | ?:[\\/]*)
44949 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
44950 ;;
44951 *)
44952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44953as_dummy="$PATH:/usr/bin:/usr/local/bin"
44954for as_dir in $as_dummy
44955do
44956 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080044957 case $as_dir in #(((
44958 '') as_dir=./ ;;
44959 */) ;;
44960 *) as_dir=$as_dir/ ;;
44961 esac
Elliott Hughes72d948d2018-08-03 14:37:21 -070044962 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080044963 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
44964 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
44965 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes72d948d2018-08-03 14:37:21 -070044966 break 2
44967 fi
44968done
44969 done
44970IFS=$as_save_IFS
44971
44972 ;;
44973esac
44974fi
44975PKGCONFIG=$ac_cv_path_PKGCONFIG
44976if test -n "$PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080044977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
44978printf "%s\n" "$PKGCONFIG" >&6; }
Elliott Hughes72d948d2018-08-03 14:37:21 -070044979else
Elliott Hughesf344baa2021-12-07 09:12:34 -080044980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
44981printf "%s\n" "no" >&6; }
Elliott Hughes72d948d2018-08-03 14:37:21 -070044982fi
44983
44984
44985fi
44986if test -z "$ac_cv_path_PKGCONFIG"; then
44987 ac_pt_PKGCONFIG=$PKGCONFIG
44988 # Extract the first word of "pkg-config", so it can be a program name with args.
44989set dummy pkg-config; ac_word=$2
Elliott Hughesf344baa2021-12-07 09:12:34 -080044990{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44991printf %s "checking for $ac_word... " >&6; }
44992if test ${ac_cv_path_ac_pt_PKGCONFIG+y}
44993then :
44994 printf %s "(cached) " >&6
44995else $as_nop
Elliott Hughes72d948d2018-08-03 14:37:21 -070044996 case $ac_pt_PKGCONFIG in
44997 [\\/]* | ?:[\\/]*)
44998 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
44999 ;;
45000 *)
45001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45002as_dummy="$PATH:/usr/bin:/usr/local/bin"
45003for as_dir in $as_dummy
45004do
45005 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080045006 case $as_dir in #(((
45007 '') as_dir=./ ;;
45008 */) ;;
45009 *) as_dir=$as_dir/ ;;
45010 esac
Elliott Hughes72d948d2018-08-03 14:37:21 -070045011 for ac_exec_ext in '' $ac_executable_extensions; do
Elliott Hughesf344baa2021-12-07 09:12:34 -080045012 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
45013 ac_cv_path_ac_pt_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
45014 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Elliott Hughes72d948d2018-08-03 14:37:21 -070045015 break 2
45016 fi
45017done
45018 done
45019IFS=$as_save_IFS
45020
45021 ;;
45022esac
45023fi
45024ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
45025if test -n "$ac_pt_PKGCONFIG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080045026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
45027printf "%s\n" "$ac_pt_PKGCONFIG" >&6; }
Elliott Hughes72d948d2018-08-03 14:37:21 -070045028else
Elliott Hughesf344baa2021-12-07 09:12:34 -080045029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45030printf "%s\n" "no" >&6; }
Elliott Hughes72d948d2018-08-03 14:37:21 -070045031fi
45032
45033 if test "x$ac_pt_PKGCONFIG" = x; then
45034 PKGCONFIG="no"
45035 else
45036 case $cross_compiling:$ac_tool_warned in
45037yes:)
Elliott Hughesf344baa2021-12-07 09:12:34 -080045038{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
45039printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Elliott Hughes72d948d2018-08-03 14:37:21 -070045040ac_tool_warned=yes ;;
45041esac
45042 PKGCONFIG=$ac_pt_PKGCONFIG
45043 fi
45044else
45045 PKGCONFIG="$ac_cv_path_PKGCONFIG"
45046fi
45047
45048 fi
45049
45050 if test "x$PKGCONFIG" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080045051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcares options with pkg-config" >&5
45052printf %s "checking for libcares options with pkg-config... " >&6; }
Elliott Hughes72d948d2018-08-03 14:37:21 -070045053 itexists=`
45054 if test -n ""; then
45055 PKG_CONFIG_LIBDIR=""
45056 export PKG_CONFIG_LIBDIR
45057 fi
45058 $PKGCONFIG --exists libcares >/dev/null 2>&1 && echo 1`
45059
45060 if test -z "$itexists"; then
45061 PKGCONFIG="no"
Elliott Hughesf344baa2021-12-07 09:12:34 -080045062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45063printf "%s\n" "no" >&6; }
Elliott Hughes72d948d2018-08-03 14:37:21 -070045064 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080045065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
45066printf "%s\n" "found" >&6; }
Elliott Hughes72d948d2018-08-03 14:37:21 -070045067 fi
45068 fi
45069
45070 if test "$PKGCONFIG" != "no" ; then
45071 ares_LIBS=`$PKGCONFIG --libs-only-l libcares`
45072 ares_LDFLAGS=`$PKGCONFIG --libs-only-L libcares`
45073 ares_CPPFLAGS=`$PKGCONFIG --cflags-only-I libcares`
Elliott Hughesf344baa2021-12-07 09:12:34 -080045074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: ares_LIBS: \"$ares_LIBS\"" >&5
45075printf "%s\n" "$as_me: pkg-config: ares_LIBS: \"$ares_LIBS\"" >&6;}
45076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: ares_LDFLAGS: \"$ares_LDFLAGS\"" >&5
45077printf "%s\n" "$as_me: pkg-config: ares_LDFLAGS: \"$ares_LDFLAGS\"" >&6;}
45078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: ares_CPPFLAGS: \"$ares_CPPFLAGS\"" >&5
45079printf "%s\n" "$as_me: pkg-config: ares_CPPFLAGS: \"$ares_CPPFLAGS\"" >&6;}
Elliott Hughes72d948d2018-08-03 14:37:21 -070045080 else
45081 ares_CPPFLAGS=""
45082 ares_LDFLAGS=""
45083 ares_LIBS="-lcares"
45084 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070045085 fi
45086 fi
45087 #
45088 CPPFLAGS="$clean_CPPFLAGS $ares_CPPFLAGS"
45089 LDFLAGS="$clean_LDFLAGS $ares_LDFLAGS"
45090 LIBS="$ares_LIBS $clean_LIBS"
45091 #
45092 if test "$embedded_ares" != "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080045093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that c-ares is good and recent enough" >&5
45094printf %s "checking that c-ares is good and recent enough... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45096/* end confdefs.h. */
45097
45098
45099#include <ares.h>
45100 /* set of dummy functions in case c-ares was built with debug */
45101 void curl_dofree() { }
45102 void curl_sclose() { }
45103 void curl_domalloc() { }
45104 void curl_docalloc() { }
45105 void curl_socket() { }
45106
45107int main (void)
45108{
45109
45110 ares_channel channel;
45111 ares_cancel(channel); /* added in 1.2.0 */
45112 ares_process_fd(channel, 0, 0); /* added in 1.4.0 */
45113 ares_dup(&channel, channel); /* added in 1.6.0 */
45114
45115 ;
45116 return 0;
45117}
45118
45119_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080045120if ac_fn_c_try_link "$LINENO"
45121then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070045122
Elliott Hughesf344baa2021-12-07 09:12:34 -080045123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45124printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045125
Elliott Hughesf344baa2021-12-07 09:12:34 -080045126else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070045127
Elliott Hughesf344baa2021-12-07 09:12:34 -080045128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45129printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045130 as_fn_error $? "c-ares library defective or too old" "$LINENO" 5
45131 CPPFLAGS="$clean_CPPFLAGS"
45132 LDFLAGS="$clean_LDFLAGS"
45133 LIBS="$clean_LIBS"
45134 # prevent usage
45135 want_ares="no"
45136
45137fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080045138rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070045139 conftest$ac_exeext conftest.$ac_ext
45140 fi
45141 if test "$want_ares" = "yes"; then
45142
Elliott Hughesf344baa2021-12-07 09:12:34 -080045143printf "%s\n" "#define USE_ARES 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070045144
45145 USE_ARES=1
45146
45147 curl_res_msg="c-ares"
45148 fi
45149 fi
45150
45151 if test x$embedded_ares = xyes; then
45152 USE_EMBEDDED_ARES_TRUE=
45153 USE_EMBEDDED_ARES_FALSE='#'
45154else
45155 USE_EMBEDDED_ARES_TRUE='#'
45156 USE_EMBEDDED_ARES_FALSE=
45157fi
45158
45159
45160if test "x$curl_cv_native_windows" != "xyes" &&
45161 test "x$enable_shared" = "xyes"; then
45162 build_libhostname=yes
45163else
45164 build_libhostname=no
45165fi
45166 if test x$build_libhostname = xyes; then
45167 BUILD_LIBHOSTNAME_TRUE=
45168 BUILD_LIBHOSTNAME_FALSE='#'
45169else
45170 BUILD_LIBHOSTNAME_TRUE='#'
45171 BUILD_LIBHOSTNAME_FALSE=
45172fi
45173
45174
45175if test "x$want_ares" != xyes; then
45176
Elliott Hughesf344baa2021-12-07 09:12:34 -080045177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable the threaded resolver" >&5
45178printf %s "checking whether to enable the threaded resolver... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045179 OPT_THRES="default"
45180 # Check whether --enable-threaded_resolver was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045181if test ${enable_threaded_resolver+y}
45182then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070045183 enableval=$enable_threaded_resolver; OPT_THRES=$enableval
45184fi
45185
45186 case "$OPT_THRES" in
Elliott Hughes82be86d2017-09-20 17:00:17 -070045187 no)
45188 want_thres="no"
45189 ;;
Alex Deymo486467e2017-12-19 19:04:07 +010045190 *)
45191 want_thres="yes"
45192 ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070045193 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $want_thres" >&5
45195printf "%s\n" "$want_thres" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045196
45197fi
45198
Elliott Hughesf344baa2021-12-07 09:12:34 -080045199{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use POSIX threads for threaded resolver" >&5
45200printf %s "checking whether to use POSIX threads for threaded resolver... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045201# Check whether --enable-pthreads was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045202if test ${enable_pthreads+y}
45203then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070045204 enableval=$enable_pthreads; case "$enableval" in
Elliott Hughesf344baa2021-12-07 09:12:34 -080045205 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45206printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045207 want_pthreads=no
45208 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045209 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45210printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045211 want_pthreads=yes
45212 ;;
45213 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045214else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070045215
Elliott Hughesf344baa2021-12-07 09:12:34 -080045216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto" >&5
45217printf "%s\n" "auto" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045218 want_pthreads=auto
45219
45220
45221fi
45222
45223
45224if test "$want_pthreads" != "no"; then
45225 if test "$want_pthreads" = "yes" && test "$dontwant_rt" = "yes"; then
45226 as_fn_error $? "options --enable-pthreads and --disable-rt are mutually exclusive" "$LINENO" 5
45227 fi
45228 if test "$dontwant_rt" != "no"; then
45229 if test "$want_pthreads" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080045230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-pthreads Ignored since librt is disabled." >&5
45231printf "%s\n" "$as_me: WARNING: --enable-pthreads Ignored since librt is disabled." >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070045232 fi
45233 want_pthreads=no
45234 fi
45235fi
45236
45237if test "$want_pthreads" != "no" && test "$want_thres" != "yes"; then
45238 want_pthreads=no
45239fi
45240
45241if test "$want_pthreads" != "no"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080045242 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
45243if test "x$ac_cv_header_pthread_h" = xyes
45244then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070045245
Elliott Hughesf344baa2021-12-07 09:12:34 -080045246printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070045247
45248 save_CFLAGS="$CFLAGS"
Haibo Huangca2a8022020-07-10 20:17:42 -070045249 save_LIBS="$LIBS"
Elliott Hughes82be86d2017-09-20 17:00:17 -070045250
Haibo Huangca2a8022020-07-10 20:17:42 -070045251 LIBS=
Elliott Hughes82be86d2017-09-20 17:00:17 -070045252 ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create"
Elliott Hughesf344baa2021-12-07 09:12:34 -080045253if test "x$ac_cv_func_pthread_create" = xyes
45254then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070045255 USE_THREADS_POSIX=1
45256fi
45257
Haibo Huangca2a8022020-07-10 20:17:42 -070045258 LIBS="$save_LIBS"
Elliott Hughes82be86d2017-09-20 17:00:17 -070045259
Elliott Hughesa93fb052018-12-12 14:22:48 -080045260 case $host in
45261 *-hp-hpux*)
45262 USE_THREADS_POSIX=""
45263 ;;
45264 *)
45265 ;;
45266 esac
45267
Elliott Hughes82be86d2017-09-20 17:00:17 -070045268 if test "$USE_THREADS_POSIX" != "1"
45269 then
45270 CFLAGS="$CFLAGS -pthread"
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045271 # assign PTHREAD for pkg-config use
45272 PTHREAD=" -pthread"
Elliott Hughesf344baa2021-12-07 09:12:34 -080045273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
45274printf %s "checking for pthread_create in -lpthread... " >&6; }
45275if test ${ac_cv_lib_pthread_pthread_create+y}
45276then :
45277 printf %s "(cached) " >&6
45278else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070045279 ac_check_lib_save_LIBS=$LIBS
45280LIBS="-lpthread $LIBS"
45281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45282/* end confdefs.h. */
45283
45284
45285#ifdef __cplusplus
45286extern "C"
45287#endif
45288char pthread_create ();
45289int main (void)
45290{
45291return pthread_create ();
45292 ;
45293 return 0;
45294}
45295_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080045296if ac_fn_c_try_link "$LINENO"
45297then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070045298 ac_cv_lib_pthread_pthread_create=yes
Elliott Hughesf344baa2021-12-07 09:12:34 -080045299else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070045300 ac_cv_lib_pthread_pthread_create=no
45301fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080045302rm -f core conftest.err conftest.$ac_objext conftest.beam \
Elliott Hughes82be86d2017-09-20 17:00:17 -070045303 conftest$ac_exeext conftest.$ac_ext
45304LIBS=$ac_check_lib_save_LIBS
45305fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080045306{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
45307printf "%s\n" "$ac_cv_lib_pthread_pthread_create" >&6; }
45308if test "x$ac_cv_lib_pthread_pthread_create" = xyes
45309then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070045310 USE_THREADS_POSIX=1
Elliott Hughesf344baa2021-12-07 09:12:34 -080045311else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070045312 CFLAGS="$save_CFLAGS"
45313fi
45314
45315 fi
45316
45317 if test "x$USE_THREADS_POSIX" = "x1"
45318 then
45319
Elliott Hughesf344baa2021-12-07 09:12:34 -080045320printf "%s\n" "#define USE_THREADS_POSIX 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070045321
45322 curl_res_msg="POSIX threaded"
45323 fi
45324
45325fi
45326
Elliott Hughes82be86d2017-09-20 17:00:17 -070045327fi
45328
45329if test "$want_thres" = "yes" && test "x$USE_THREADS_POSIX" != "x1"; then
45330 if test "$want_pthreads" = "yes"; then
45331 as_fn_error $? "--enable-pthreads but pthreads was not found" "$LINENO" 5
45332 fi
45333 if test "$curl_cv_native_windows" = "yes"; then
45334 USE_THREADS_WIN32=1
45335
Elliott Hughesf344baa2021-12-07 09:12:34 -080045336printf "%s\n" "#define USE_THREADS_WIN32 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070045337
45338 curl_res_msg="Win32 threaded"
45339 else
45340 as_fn_error $? "Threaded resolver enabled but no thread library found" "$LINENO" 5
45341 fi
45342fi
45343
Haibo Huang24c77a12020-04-29 13:49:57 -070045344
Elliott Hughesf344baa2021-12-07 09:12:34 -080045345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking convert -I options to -isystem" >&5
45346printf %s "checking convert -I options to -isystem... " >&6; }
Haibo Huang24c77a12020-04-29 13:49:57 -070045347 if test "$compiler_id" = "GNU_C" ||
45348 test "$compiler_id" = "CLANG"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080045349 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45350printf "%s\n" "yes" >&6; }
Haibo Huang24c77a12020-04-29 13:49:57 -070045351 tmp_has_include="no"
45352 tmp_chg_FLAGS="$CFLAGS"
45353 for word1 in $tmp_chg_FLAGS; do
45354 case "$word1" in
45355 -I*)
45356 tmp_has_include="yes"
45357 ;;
45358 esac
45359 done
45360 if test "$tmp_has_include" = "yes"; then
45361 tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
45362 tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
45363 CFLAGS="$tmp_chg_FLAGS"
45364 squeeze CFLAGS
45365 fi
45366 tmp_has_include="no"
45367 tmp_chg_FLAGS="$CPPFLAGS"
45368 for word1 in $tmp_chg_FLAGS; do
45369 case "$word1" in
45370 -I*)
45371 tmp_has_include="yes"
45372 ;;
45373 esac
45374 done
45375 if test "$tmp_has_include" = "yes"; then
45376 tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
45377 tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
45378 CPPFLAGS="$tmp_chg_FLAGS"
45379 squeeze CPPFLAGS
45380 fi
45381 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080045382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45383printf "%s\n" "no" >&6; }
Haibo Huang24c77a12020-04-29 13:49:57 -070045384 fi
45385
45386
Elliott Hughesf344baa2021-12-07 09:12:34 -080045387{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable verbose strings" >&5
45388printf %s "checking whether to enable verbose strings... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045389# Check whether --enable-verbose was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045390if test ${enable_verbose+y}
45391then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070045392 enableval=$enable_verbose; case "$enableval" in
45393 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080045394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45395printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045396
Elliott Hughesf344baa2021-12-07 09:12:34 -080045397printf "%s\n" "#define CURL_DISABLE_VERBOSE_STRINGS 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070045398
45399 curl_verbose_msg="no"
45400 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045401 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45402printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045403 ;;
45404 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045405else $as_nop
45406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45407printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045408
45409fi
45410
45411
Elliott Hughesf344baa2021-12-07 09:12:34 -080045412{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable SSPI support (Windows native builds only)" >&5
45413printf %s "checking whether to enable SSPI support (Windows native builds only)... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045414# Check whether --enable-sspi was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045415if test ${enable_sspi+y}
45416then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070045417 enableval=$enable_sspi; case "$enableval" in
45418 yes)
45419 if test "$curl_cv_native_windows" = "yes"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080045420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45421printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045422
Elliott Hughesf344baa2021-12-07 09:12:34 -080045423printf "%s\n" "#define USE_WINDOWS_SSPI 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070045424
45425 USE_WINDOWS_SSPI=1
45426
45427 curl_sspi_msg="enabled"
45428 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080045429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45430printf "%s\n" "no" >&6; }
45431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-sspi Ignored. Only supported on native Windows builds." >&5
45432printf "%s\n" "$as_me: WARNING: --enable-sspi Ignored. Only supported on native Windows builds." >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070045433 fi
45434 ;;
45435 *)
Haibo Huangc3c04f42020-08-19 13:00:07 -070045436 if test "x$SCHANNEL_ENABLED" = "x1"; then
45437 # --with-schannel implies --enable-sspi
Elliott Hughesf344baa2021-12-07 09:12:34 -080045438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45439printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045440 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080045441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45442printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045443 fi
45444 ;;
45445 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045446else $as_nop
Haibo Huangc3c04f42020-08-19 13:00:07 -070045447 if test "x$SCHANNEL_ENABLED" = "x1"; then
45448 # --with-schannel implies --enable-sspi
Elliott Hughesf344baa2021-12-07 09:12:34 -080045449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45450printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045451 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080045452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45453printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045454 fi
45455
45456fi
45457
45458
Elliott Hughesf344baa2021-12-07 09:12:34 -080045459{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable cryptographic authentication methods" >&5
45460printf %s "checking whether to enable cryptographic authentication methods... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045461# Check whether --enable-crypto-auth was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045462if test ${enable_crypto_auth+y}
45463then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070045464 enableval=$enable_crypto_auth; case "$enableval" in
45465 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080045466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45467printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045468
Elliott Hughesf344baa2021-12-07 09:12:34 -080045469printf "%s\n" "#define CURL_DISABLE_CRYPTO_AUTH 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070045470
45471 CURL_DISABLE_CRYPTO_AUTH=1
45472 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045473 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45474printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045475 ;;
45476 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045477else $as_nop
45478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45479printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045480
45481fi
45482
45483
Elliott Hughesf344baa2021-12-07 09:12:34 -080045484{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support NTLM" >&5
45485printf %s "checking whether to support NTLM... " >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045486# Check whether --enable-ntlm was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045487if test ${enable_ntlm+y}
45488then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045489 enableval=$enable_ntlm; case "$enableval" in
45490 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080045491 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45492printf "%s\n" "no" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045493
Elliott Hughesf344baa2021-12-07 09:12:34 -080045494printf "%s\n" "#define CURL_DISABLE_NTLM 1" >>confdefs.h
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045495
45496 CURL_DISABLE_NTLM=1
45497 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045498 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45499printf "%s\n" "yes" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045500 ;;
45501 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045502else $as_nop
45503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45504printf "%s\n" "yes" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045505
45506fi
45507
45508
Elliott Hughes82be86d2017-09-20 17:00:17 -070045509
45510 OPT_NTLM_WB="default"
45511 # Check whether --enable-ntlm-wb was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045512if test ${enable_ntlm_wb+y}
45513then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070045514 enableval=$enable_ntlm_wb; OPT_NTLM_WB=$enableval
45515fi
45516
45517 want_ntlm_wb_file="/usr/bin/ntlm_auth"
45518 case "$OPT_NTLM_WB" in
45519 no)
45520 want_ntlm_wb="no"
45521 ;;
45522 default)
45523 want_ntlm_wb="yes"
45524 ;;
45525 *)
45526 want_ntlm_wb="yes"
45527 if test -n "$enableval" && test "$enableval" != "yes"; then
45528 want_ntlm_wb_file="$enableval"
45529 fi
45530 ;;
45531 esac
45532
45533
45534
Elliott Hughesf344baa2021-12-07 09:12:34 -080045535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable NTLM delegation to winbind's helper" >&5
45536printf %s "checking whether to enable NTLM delegation to winbind's helper... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045537 if test "$curl_cv_native_windows" = "yes" ||
45538 test "x$SSL_ENABLED" = "x"; then
45539 want_ntlm_wb_file=""
45540 want_ntlm_wb="no"
45541 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080045542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $want_ntlm_wb" >&5
45543printf "%s\n" "$want_ntlm_wb" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045544 if test "$want_ntlm_wb" = "yes"; then
45545
Elliott Hughesf344baa2021-12-07 09:12:34 -080045546printf "%s\n" "#define NTLM_WB_ENABLED 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070045547
45548
Elliott Hughesf344baa2021-12-07 09:12:34 -080045549printf "%s\n" "#define NTLM_WB_FILE \"$want_ntlm_wb_file\"" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070045550
45551 NTLM_WB_ENABLED=1
45552 fi
45553
45554
Elliott Hughesf344baa2021-12-07 09:12:34 -080045555{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable TLS-SRP authentication" >&5
45556printf %s "checking whether to enable TLS-SRP authentication... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045557# Check whether --enable-tls-srp was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045558if test ${enable_tls_srp+y}
45559then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070045560 enableval=$enable_tls_srp; case "$enableval" in
45561 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080045562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45563printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045564 want_tls_srp=no
45565 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045566 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45567printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045568 want_tls_srp=yes
45569 ;;
45570 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045571else $as_nop
45572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45573printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045574 want_tls_srp=yes
45575
45576fi
45577
45578
45579if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_OPENSSL_SRP" = "x1") ; then
45580
Elliott Hughesf344baa2021-12-07 09:12:34 -080045581printf "%s\n" "#define USE_TLS_SRP 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070045582
45583 USE_TLS_SRP=1
45584 curl_tls_srp_msg="enabled"
45585fi
45586
Elliott Hughesf344baa2021-12-07 09:12:34 -080045587{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable Unix domain sockets" >&5
45588printf %s "checking whether to enable Unix domain sockets... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045589# Check whether --enable-unix-sockets was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045590if test ${enable_unix_sockets+y}
45591then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070045592 enableval=$enable_unix_sockets; case "$enableval" in
Elliott Hughesf344baa2021-12-07 09:12:34 -080045593 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45594printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045595 want_unix_sockets=no
45596 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045597 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45598printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045599 want_unix_sockets=yes
45600 ;;
45601 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045602else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070045603
Elliott Hughesf344baa2021-12-07 09:12:34 -080045604 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto" >&5
45605printf "%s\n" "auto" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045606 want_unix_sockets=auto
45607
45608
45609fi
45610
45611if test "x$want_unix_sockets" != "xno"; then
45612 ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_path" "ac_cv_member_struct_sockaddr_un_sun_path" "
45613 #include <sys/un.h>
45614
45615"
Elliott Hughesf344baa2021-12-07 09:12:34 -080045616if test "x$ac_cv_member_struct_sockaddr_un_sun_path" = xyes
45617then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070045618
45619
Elliott Hughesf344baa2021-12-07 09:12:34 -080045620printf "%s\n" "#define USE_UNIX_SOCKETS 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070045621
45622 USE_UNIX_SOCKETS=1
45623
45624 curl_unix_sockets_msg="enabled"
45625
Elliott Hughesf344baa2021-12-07 09:12:34 -080045626else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070045627
45628 if test "x$want_unix_sockets" = "xyes"; then
45629 as_fn_error $? "--enable-unix-sockets is not available on this platform!" "$LINENO" 5
45630 fi
45631
45632fi
45633
45634fi
45635
Elliott Hughesf344baa2021-12-07 09:12:34 -080045636{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support cookies" >&5
45637printf %s "checking whether to support cookies... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045638# Check whether --enable-cookies was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045639if test ${enable_cookies+y}
45640then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070045641 enableval=$enable_cookies; case "$enableval" in
45642 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080045643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45644printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045645
Elliott Hughesf344baa2021-12-07 09:12:34 -080045646printf "%s\n" "#define CURL_DISABLE_COOKIES 1" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070045647
45648 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045649 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45650printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045651 ;;
45652 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045653else $as_nop
45654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45655printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045656
45657fi
45658
45659
Elliott Hughesf344baa2021-12-07 09:12:34 -080045660{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support socketpair" >&5
45661printf %s "checking whether to support socketpair... " >&6; }
Haibo Huangb5a52b92020-10-28 22:18:23 -070045662# Check whether --enable-socketpair was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045663if test ${enable_socketpair+y}
45664then :
Haibo Huangb5a52b92020-10-28 22:18:23 -070045665 enableval=$enable_socketpair; case "$enableval" in
45666 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080045667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45668printf "%s\n" "no" >&6; }
Haibo Huangb5a52b92020-10-28 22:18:23 -070045669
Elliott Hughesf344baa2021-12-07 09:12:34 -080045670printf "%s\n" "#define CURL_DISABLE_SOCKETPAIR 1" >>confdefs.h
Haibo Huangb5a52b92020-10-28 22:18:23 -070045671
45672 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045673 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45674printf "%s\n" "yes" >&6; }
Haibo Huangb5a52b92020-10-28 22:18:23 -070045675 ;;
45676 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045677else $as_nop
45678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45679printf "%s\n" "yes" >&6; }
Haibo Huangb5a52b92020-10-28 22:18:23 -070045680
45681fi
45682
45683
Elliott Hughesf344baa2021-12-07 09:12:34 -080045684{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support HTTP authentication" >&5
45685printf %s "checking whether to support HTTP authentication... " >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045686# Check whether --enable-http-auth was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045687if test ${enable_http_auth+y}
45688then :
Haibo Huang001784b2019-07-19 05:27:28 -070045689 enableval=$enable_http_auth; case "$enableval" in
45690 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080045691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45692printf "%s\n" "no" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045693
Elliott Hughesf344baa2021-12-07 09:12:34 -080045694printf "%s\n" "#define CURL_DISABLE_HTTP_AUTH 1" >>confdefs.h
Haibo Huang001784b2019-07-19 05:27:28 -070045695
45696 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045697 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45698printf "%s\n" "yes" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045699 ;;
45700 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045701else $as_nop
45702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45703printf "%s\n" "yes" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045704
45705fi
45706
45707
Elliott Hughesf344baa2021-12-07 09:12:34 -080045708{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support DoH" >&5
45709printf %s "checking whether to support DoH... " >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045710# Check whether --enable-doh was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045711if test ${enable_doh+y}
45712then :
Haibo Huang001784b2019-07-19 05:27:28 -070045713 enableval=$enable_doh; case "$enableval" in
45714 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080045715 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45716printf "%s\n" "no" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045717
Elliott Hughesf344baa2021-12-07 09:12:34 -080045718printf "%s\n" "#define CURL_DISABLE_DOH 1" >>confdefs.h
Haibo Huang001784b2019-07-19 05:27:28 -070045719
45720 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045721 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45722printf "%s\n" "yes" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045723 ;;
45724 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045725else $as_nop
45726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45727printf "%s\n" "yes" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045728
45729fi
45730
45731
Elliott Hughesf344baa2021-12-07 09:12:34 -080045732{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support the MIME API" >&5
45733printf %s "checking whether to support the MIME API... " >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045734# Check whether --enable-mime was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045735if test ${enable_mime+y}
45736then :
Haibo Huang001784b2019-07-19 05:27:28 -070045737 enableval=$enable_mime; case "$enableval" in
45738 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080045739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45740printf "%s\n" "no" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045741
Elliott Hughesf344baa2021-12-07 09:12:34 -080045742printf "%s\n" "#define CURL_DISABLE_MIME 1" >>confdefs.h
Haibo Huang001784b2019-07-19 05:27:28 -070045743
45744 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045745 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45746printf "%s\n" "yes" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045747 ;;
45748 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045749else $as_nop
45750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45751printf "%s\n" "yes" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045752
45753fi
45754
45755
Elliott Hughesf344baa2021-12-07 09:12:34 -080045756{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support date parsing" >&5
45757printf %s "checking whether to support date parsing... " >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045758# Check whether --enable-dateparse was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045759if test ${enable_dateparse+y}
45760then :
Haibo Huang001784b2019-07-19 05:27:28 -070045761 enableval=$enable_dateparse; case "$enableval" in
45762 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080045763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45764printf "%s\n" "no" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045765
Elliott Hughesf344baa2021-12-07 09:12:34 -080045766printf "%s\n" "#define CURL_DISABLE_PARSEDATE 1" >>confdefs.h
Haibo Huang001784b2019-07-19 05:27:28 -070045767
45768 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045769 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45770printf "%s\n" "yes" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045771 ;;
45772 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045773else $as_nop
45774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45775printf "%s\n" "yes" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045776
45777fi
45778
45779
Elliott Hughesf344baa2021-12-07 09:12:34 -080045780{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support netrc parsing" >&5
45781printf %s "checking whether to support netrc parsing... " >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045782# Check whether --enable-netrc was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045783if test ${enable_netrc+y}
45784then :
Haibo Huang001784b2019-07-19 05:27:28 -070045785 enableval=$enable_netrc; case "$enableval" in
45786 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080045787 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45788printf "%s\n" "no" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045789
Elliott Hughesf344baa2021-12-07 09:12:34 -080045790printf "%s\n" "#define CURL_DISABLE_NETRC 1" >>confdefs.h
Haibo Huang001784b2019-07-19 05:27:28 -070045791
45792 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045793 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45794printf "%s\n" "yes" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045795 ;;
45796 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045797else $as_nop
45798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45799printf "%s\n" "yes" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045800
45801fi
45802
45803
Elliott Hughesf344baa2021-12-07 09:12:34 -080045804{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support progress-meter" >&5
45805printf %s "checking whether to support progress-meter... " >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045806# Check whether --enable-progress-meter was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045807if test ${enable_progress_meter+y}
45808then :
Haibo Huang001784b2019-07-19 05:27:28 -070045809 enableval=$enable_progress_meter; case "$enableval" in
45810 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080045811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45812printf "%s\n" "no" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045813
Elliott Hughesf344baa2021-12-07 09:12:34 -080045814printf "%s\n" "#define CURL_DISABLE_PROGRESS_METER 1" >>confdefs.h
Haibo Huang001784b2019-07-19 05:27:28 -070045815
45816 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045817 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45818printf "%s\n" "yes" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045819 ;;
45820 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045821else $as_nop
45822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45823printf "%s\n" "yes" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045824
45825fi
45826
45827
Elliott Hughesf344baa2021-12-07 09:12:34 -080045828{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support DNS shuffling" >&5
45829printf %s "checking whether to support DNS shuffling... " >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045830# Check whether --enable-dnsshuffle was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045831if test ${enable_dnsshuffle+y}
45832then :
Haibo Huang001784b2019-07-19 05:27:28 -070045833 enableval=$enable_dnsshuffle; case "$enableval" in
45834 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080045835 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45836printf "%s\n" "no" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045837
Elliott Hughesf344baa2021-12-07 09:12:34 -080045838printf "%s\n" "#define CURL_DISABLE_SHUFFLE_DNS 1" >>confdefs.h
Haibo Huang001784b2019-07-19 05:27:28 -070045839
45840 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045841 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45842printf "%s\n" "yes" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045843 ;;
45844 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045845else $as_nop
45846 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45847printf "%s\n" "yes" >&6; }
Haibo Huang001784b2019-07-19 05:27:28 -070045848
45849fi
45850
45851
Elliott Hughesf344baa2021-12-07 09:12:34 -080045852{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support curl_easy_option*" >&5
45853printf %s "checking whether to support curl_easy_option*... " >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045854# Check whether --enable-get-easy-options was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045855if test ${enable_get_easy_options+y}
45856then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045857 enableval=$enable_get_easy_options; case "$enableval" in
Haibo Huangb5a52b92020-10-28 22:18:23 -070045858 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080045859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45860printf "%s\n" "no" >&6; }
Haibo Huangb5a52b92020-10-28 22:18:23 -070045861
Elliott Hughesf344baa2021-12-07 09:12:34 -080045862printf "%s\n" "#define CURL_DISABLE_GETOPTIONS 1" >>confdefs.h
Haibo Huangb5a52b92020-10-28 22:18:23 -070045863
45864 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045865 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45866printf "%s\n" "yes" >&6; }
Haibo Huangb5a52b92020-10-28 22:18:23 -070045867 ;;
45868 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045869else $as_nop
45870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45871printf "%s\n" "yes" >&6; }
Haibo Huangb5a52b92020-10-28 22:18:23 -070045872
45873fi
45874
45875
Elliott Hughesf344baa2021-12-07 09:12:34 -080045876{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support alt-svc" >&5
45877printf %s "checking whether to support alt-svc... " >&6; }
Haibo Huang65021c72019-03-27 15:37:23 -070045878# Check whether --enable-alt-svc was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045879if test ${enable_alt_svc+y}
45880then :
Haibo Huang65021c72019-03-27 15:37:23 -070045881 enableval=$enable_alt_svc; case "$enableval" in
45882 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080045883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45884printf "%s\n" "no" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045885
Elliott Hughesf344baa2021-12-07 09:12:34 -080045886printf "%s\n" "#define CURL_DISABLE_ALTSVC 1" >>confdefs.h
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045887
45888 curl_altsvc_msg="no";
45889 enable_altsvc="no"
Haibo Huang65021c72019-03-27 15:37:23 -070045890 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045891 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45892printf "%s\n" "yes" >&6; }
Haibo Huang65021c72019-03-27 15:37:23 -070045893 ;;
45894 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045895else $as_nop
45896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45897printf "%s\n" "no" >&6; }
Haibo Huang65021c72019-03-27 15:37:23 -070045898
45899fi
45900
45901
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045902if test -n "$SSL_ENABLED"; then
Haibo Huang65021c72019-03-27 15:37:23 -070045903
Elliott Hughesf344baa2021-12-07 09:12:34 -080045904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support HSTS" >&5
45905printf %s "checking whether to support HSTS... " >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045906 # Check whether --enable-hsts was given.
Elliott Hughesf344baa2021-12-07 09:12:34 -080045907if test ${enable_hsts+y}
45908then :
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045909 enableval=$enable_hsts; case "$enableval" in
45910 no)
Elliott Hughesf344baa2021-12-07 09:12:34 -080045911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45912printf "%s\n" "no" >&6; }
45913 hsts="no"
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045914 ;;
Elliott Hughesf344baa2021-12-07 09:12:34 -080045915 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45916printf "%s\n" "yes" >&6; }
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045917 ;;
45918 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080045919else $as_nop
45920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hsts" >&5
45921printf "%s\n" "$hsts" >&6; }
Haibo Huang65021c72019-03-27 15:37:23 -070045922
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045923fi
45924
45925else
Elliott Hughesf344baa2021-12-07 09:12:34 -080045926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: disables HSTS due to lack of SSL" >&5
45927printf "%s\n" "$as_me: disables HSTS due to lack of SSL" >&6;}
45928 hsts="no"
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045929fi
45930
Elliott Hughesf344baa2021-12-07 09:12:34 -080045931if test "x$hsts" != "xyes"; then
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045932 curl_hsts_msg="no (--enable-hsts)";
45933
Elliott Hughesf344baa2021-12-07 09:12:34 -080045934printf "%s\n" "#define CURL_DISABLE_HSTS 1" >>confdefs.h
Elliott Hughes34dd5f42021-08-10 13:01:18 -070045935
Haibo Huang65021c72019-03-27 15:37:23 -070045936fi
45937
Haibo Huangb5a52b92020-10-28 22:18:23 -070045938if test "x$want_ech" != "xno"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080045939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ECH support is available" >&5
45940printf %s "checking whether ECH support is available... " >&6; }
Haibo Huang31944072019-11-06 02:28:57 -080045941
Haibo Huangb5a52b92020-10-28 22:18:23 -070045942 ECH_ENABLED=0
45943 ECH_SUPPORT=''
Haibo Huang31944072019-11-06 02:28:57 -080045944
Haibo Huangb51266f2020-03-04 02:22:48 -080045945 if test "x$OPENSSL_ENABLED" = "x1"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080045946
45947 for ac_func in SSL_get_ech_status
Haibo Huang31944072019-11-06 02:28:57 -080045948do :
Haibo Huangb5a52b92020-10-28 22:18:23 -070045949 ac_fn_c_check_func "$LINENO" "SSL_get_ech_status" "ac_cv_func_SSL_get_ech_status"
Elliott Hughesf344baa2021-12-07 09:12:34 -080045950if test "x$ac_cv_func_SSL_get_ech_status" = xyes
45951then :
45952 printf "%s\n" "#define HAVE_SSL_GET_ECH_STATUS 1" >>confdefs.h
Haibo Huangb5a52b92020-10-28 22:18:23 -070045953 ECH_SUPPORT="ECH support available (OpenSSL with SSL_get_ech_status)"
45954 ECH_ENABLED=1
Haibo Huang31944072019-11-06 02:28:57 -080045955fi
Haibo Huang31944072019-11-06 02:28:57 -080045956
Elliott Hughesf344baa2021-12-07 09:12:34 -080045957done
Haibo Huang31944072019-11-06 02:28:57 -080045958
45959 fi
45960
Haibo Huangb5a52b92020-10-28 22:18:23 -070045961 if test "x$ECH_ENABLED" = "x1"; then
Haibo Huang31944072019-11-06 02:28:57 -080045962
Elliott Hughesf344baa2021-12-07 09:12:34 -080045963printf "%s\n" "#define USE_ECH 1" >>confdefs.h
Haibo Huang31944072019-11-06 02:28:57 -080045964
Elliott Hughesf344baa2021-12-07 09:12:34 -080045965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ECH_SUPPORT" >&5
45966printf "%s\n" "$ECH_SUPPORT" >&6; }
Haibo Huangb5a52b92020-10-28 22:18:23 -070045967 experimental="$experimental ECH"
Haibo Huang31944072019-11-06 02:28:57 -080045968 else
Haibo Huangb5a52b92020-10-28 22:18:23 -070045969 as_fn_error $? "--enable-ech ignored: No ECH support found" "$LINENO" 5
Haibo Huang31944072019-11-06 02:28:57 -080045970 fi
45971fi
45972
Elliott Hughes82be86d2017-09-20 17:00:17 -070045973
Elliott Hughesf344baa2021-12-07 09:12:34 -080045974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether hiding of library internal symbols will actually happen" >&5
45975printf %s "checking whether hiding of library internal symbols will actually happen... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045976 CFLAG_CURL_SYMBOL_HIDING=""
45977 doing_symbol_hiding="no"
45978 if test x"$curl_cv_native_windows" != "xyes" &&
45979 test "$want_symbol_hiding" = "yes" &&
45980 test "$supports_symbol_hiding" = "yes"; then
45981 doing_symbol_hiding="yes"
45982 CFLAG_CURL_SYMBOL_HIDING="$symbol_hiding_CFLAGS"
45983
Elliott Hughesf344baa2021-12-07 09:12:34 -080045984printf "%s\n" "#define CURL_EXTERN_SYMBOL $symbol_hiding_EXTERN" >>confdefs.h
Elliott Hughes82be86d2017-09-20 17:00:17 -070045985
Elliott Hughesf344baa2021-12-07 09:12:34 -080045986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45987printf "%s\n" "yes" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045988 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080045989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45990printf "%s\n" "no" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070045991 fi
45992 if test x$doing_symbol_hiding = xyes; then
45993 DOING_CURL_SYMBOL_HIDING_TRUE=
45994 DOING_CURL_SYMBOL_HIDING_FALSE='#'
45995else
45996 DOING_CURL_SYMBOL_HIDING_TRUE='#'
45997 DOING_CURL_SYMBOL_HIDING_FALSE=
45998fi
45999
46000
46001
46002
Elliott Hughes34dd5f42021-08-10 13:01:18 -070046003LIBCURL_LIBS="$LIBS$PTHREAD"
Elliott Hughes82be86d2017-09-20 17:00:17 -070046004
46005
46006
46007
46008
46009BLANK_AT_MAKETIME=
46010
46011
46012 if test x$cross_compiling = xyes; then
46013 CROSSCOMPILING_TRUE=
46014 CROSSCOMPILING_FALSE='#'
46015else
46016 CROSSCOMPILING_TRUE='#'
46017 CROSSCOMPILING_FALSE=
46018fi
46019
46020
46021ENABLE_SHARED="$enable_shared"
46022
46023
46024ENABLE_STATIC="$enable_static"
46025
46026
Haibo Huangca2a8022020-07-10 20:17:42 -070046027if test "x$enable_shared" = "xno"; then
46028 LIBCURL_NO_SHARED=$LIBCURL_LIBS
46029else
46030 LIBCURL_NO_SHARED=
46031fi
46032
Elliott Hughes82be86d2017-09-20 17:00:17 -070046033
46034
46035if test "x$OPENSSL_ENABLED" = "x1"; then
46036 SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
46037elif test -n "$SSL_ENABLED"; then
46038 SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
46039fi
46040if test "x$IPV6_ENABLED" = "x1"; then
46041 SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6"
46042fi
46043if test "x$USE_UNIX_SOCKETS" = "x1"; then
46044 SUPPORT_FEATURES="$SUPPORT_FEATURES UnixSockets"
46045fi
46046if test "x$HAVE_LIBZ" = "x1"; then
46047 SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
46048fi
Alex Deymo486467e2017-12-19 19:04:07 +010046049if test "x$HAVE_BROTLI" = "x1"; then
46050 SUPPORT_FEATURES="$SUPPORT_FEATURES brotli"
46051fi
Haibo Huangc3c04f42020-08-19 13:00:07 -070046052if test "x$HAVE_ZSTD" = "x1"; then
46053 SUPPORT_FEATURES="$SUPPORT_FEATURES zstd"
46054fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070046055if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1" \
46056 -o "x$USE_THREADS_WIN32" = "x1"; then
46057 SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
46058fi
46059if test "x$IDN_ENABLED" = "x1"; then
46060 SUPPORT_FEATURES="$SUPPORT_FEATURES IDN"
46061fi
46062if test "x$USE_WINDOWS_SSPI" = "x1"; then
46063 SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
46064fi
46065
46066if test "x$HAVE_GSSAPI" = "x1"; then
46067 SUPPORT_FEATURES="$SUPPORT_FEATURES GSS-API"
46068fi
46069
Haibo Huang65021c72019-03-27 15:37:23 -070046070if test "x$curl_psl_msg" = "xenabled"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070046071 SUPPORT_FEATURES="$SUPPORT_FEATURES PSL"
46072fi
46073
Elliott Hughes34dd5f42021-08-10 13:01:18 -070046074if test "x$curl_gsasl_msg" = "xenabled"; then
46075 SUPPORT_FEATURES="$SUPPORT_FEATURES GSASL"
46076fi
46077
Haibo Huang65021c72019-03-27 15:37:23 -070046078if test "x$enable_altsvc" = "xyes"; then
46079 SUPPORT_FEATURES="$SUPPORT_FEATURES alt-svc"
46080fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080046081if test "x$hsts" = "xyes"; then
Elliott Hughes34dd5f42021-08-10 13:01:18 -070046082 SUPPORT_FEATURES="$SUPPORT_FEATURES HSTS"
46083fi
Haibo Huang65021c72019-03-27 15:37:23 -070046084
Elliott Hughes82be86d2017-09-20 17:00:17 -070046085if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
46086 \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
46087 SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO"
46088fi
46089
46090if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
46091 \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
46092 SUPPORT_FEATURES="$SUPPORT_FEATURES Kerberos"
46093fi
46094
Elliott Hughes34dd5f42021-08-10 13:01:18 -070046095use_curl_ntlm_core=no
46096
46097if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
46098 "x$CURL_DISABLE_NTLM" != "x1"; then
46099 if test "x$OPENSSL_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \
46100 -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \
46101 -o "x$SECURETRANSPORT_ENABLED" = "x1" \
46102 -o "x$USE_WIN32_CRYPTO" = "x1" \
Haibo Huangca2a8022020-07-10 20:17:42 -070046103 -o "x$WOLFSSL_NTLM" = "x1"; then
Elliott Hughes34dd5f42021-08-10 13:01:18 -070046104 use_curl_ntlm_core=yes
46105 fi
46106
46107 if test "x$use_curl_ntlm_core" = "xyes" \
46108 -o "x$USE_WINDOWS_SSPI" = "x1"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070046109 SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
46110
46111 if test "x$CURL_DISABLE_HTTP" != "x1" -a \
46112 "x$NTLM_WB_ENABLED" = "x1"; then
46113 SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM_WB"
46114 fi
46115 fi
46116fi
46117
46118if test "x$USE_TLS_SRP" = "x1"; then
46119 SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
46120fi
46121
Elliott Hughes34dd5f42021-08-10 13:01:18 -070046122if test "x$USE_NGHTTP2" = "x1" -o "x$USE_HYPER" = "x1"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070046123 SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2"
46124fi
46125
Haibo Huang445085a2019-09-11 13:33:50 -070046126if test "x$USE_NGTCP2" = "x1" -o "x$USE_QUICHE" = "x1"; then
46127 SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP3"
46128fi
46129
Alex Deymo486467e2017-12-19 19:04:07 +010046130if test "x$CURL_WITH_MULTI_SSL" = "x1"; then
46131 SUPPORT_FEATURES="$SUPPORT_FEATURES MultiSSL"
46132fi
46133
Haibo Huangb5a52b92020-10-28 22:18:23 -070046134if test "x$https_proxy" != "xno"; then
46135 if test "x$OPENSSL_ENABLED" = "x1" -o "x$GNUTLS_ENABLED" = "x1" \
46136 -o "x$NSS_ENABLED" = "x1"; then
46137 SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy"
46138 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070046139fi
46140
Haibo Huangb5a52b92020-10-28 22:18:23 -070046141if test "x$ECH_ENABLED" = "x1"; then
46142 SUPPORT_FEATURES="$SUPPORT_FEATURES ECH"
Haibo Huang31944072019-11-06 02:28:57 -080046143fi
46144
Elliott Hughes34dd5f42021-08-10 13:01:18 -070046145if test ${ac_cv_sizeof_curl_off_t} -gt 4; then
46146 if test ${ac_cv_sizeof_off_t} -gt 4 -o \
46147 "$curl_win32_file_api" = "win32_large_files"; then
46148 SUPPORT_FEATURES="$SUPPORT_FEATURES Largefile"
46149 fi
46150fi
46151
Haibo Huangc3c04f42020-08-19 13:00:07 -070046152SUPPORT_FEATURES=`echo $SUPPORT_FEATURES | tr ' ' '\012' | sort | tr '\012' ' '`
Elliott Hughes82be86d2017-09-20 17:00:17 -070046153
46154
46155if test "x$CURL_DISABLE_HTTP" != "x1"; then
46156 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP"
46157 if test "x$SSL_ENABLED" = "x1"; then
46158 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS"
46159 fi
46160fi
46161if test "x$CURL_DISABLE_FTP" != "x1"; then
46162 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP"
46163 if test "x$SSL_ENABLED" = "x1"; then
46164 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS"
46165 fi
46166fi
46167if test "x$CURL_DISABLE_FILE" != "x1"; then
46168 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE"
46169fi
46170if test "x$CURL_DISABLE_TELNET" != "x1"; then
46171 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET"
46172fi
46173if test "x$CURL_DISABLE_LDAP" != "x1"; then
46174 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP"
46175 if test "x$CURL_DISABLE_LDAPS" != "x1"; then
46176 if (test "x$USE_OPENLDAP" = "x1" && test "x$SSL_ENABLED" = "x1") ||
46177 (test "x$USE_OPENLDAP" != "x1" && test "x$HAVE_LDAP_SSL" = "x1"); then
46178 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS"
46179 fi
46180 fi
46181fi
46182if test "x$CURL_DISABLE_DICT" != "x1"; then
46183 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT"
46184fi
46185if test "x$CURL_DISABLE_TFTP" != "x1"; then
46186 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP"
46187fi
46188if test "x$CURL_DISABLE_GOPHER" != "x1"; then
46189 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER"
Elliott Hughes34dd5f42021-08-10 13:01:18 -070046190 if test "x$SSL_ENABLED" = "x1"; then
46191 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHERS"
46192 fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070046193fi
Haibo Huangb5a52b92020-10-28 22:18:23 -070046194if test "x$CURL_DISABLE_MQTT" != "x1"; then
Haibo Huang24c77a12020-04-29 13:49:57 -070046195 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS MQTT"
46196fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070046197if test "x$CURL_DISABLE_POP3" != "x1"; then
46198 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3"
46199 if test "x$SSL_ENABLED" = "x1"; then
46200 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3S"
46201 fi
46202fi
46203if test "x$CURL_DISABLE_IMAP" != "x1"; then
46204 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAP"
46205 if test "x$SSL_ENABLED" = "x1"; then
46206 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAPS"
46207 fi
46208fi
46209if test "x$CURL_DISABLE_SMB" != "x1" \
Elliott Hughes34dd5f42021-08-10 13:01:18 -070046210 -a "x$use_curl_ntlm_core" = "xyes"; then
Elliott Hughes82be86d2017-09-20 17:00:17 -070046211 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB"
46212 if test "x$SSL_ENABLED" = "x1"; then
46213 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMBS"
46214 fi
46215fi
46216if test "x$CURL_DISABLE_SMTP" != "x1"; then
46217 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTP"
46218 if test "x$SSL_ENABLED" = "x1"; then
46219 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTPS"
46220 fi
46221fi
46222if test "x$USE_LIBSSH2" = "x1"; then
46223 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
46224 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
46225fi
Elliott Hughes0128fe42018-02-27 14:57:55 -080046226if test "x$USE_LIBSSH" = "x1"; then
46227 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
46228 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
46229fi
Haibo Huangb51266f2020-03-04 02:22:48 -080046230if test "x$USE_WOLFSSH" = "x1"; then
Haibo Huangb51266f2020-03-04 02:22:48 -080046231 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
46232fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070046233if test "x$CURL_DISABLE_RTSP" != "x1"; then
46234 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP"
46235fi
46236if test "x$USE_LIBRTMP" = "x1"; then
46237 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTMP"
46238fi
46239
46240SUPPORT_PROTOCOLS=`echo $SUPPORT_PROTOCOLS | tr ' ' '\012' | sort | tr '\012' ' '`
46241
46242
46243
46244
46245squeeze CFLAGS
46246squeeze CPPFLAGS
46247squeeze DEFS
46248squeeze LDFLAGS
46249squeeze LIBS
46250
46251squeeze LIBCURL_LIBS
46252squeeze CURL_NETWORK_LIBS
46253squeeze CURL_NETWORK_AND_TIME_LIBS
46254
46255squeeze SUPPORT_FEATURES
46256squeeze SUPPORT_PROTOCOLS
46257
46258
46259
46260 xc_bad_var_libs=no
46261 for xc_word in $LIBS; do
46262 case "$xc_word" in
46263 -l* | --library=*)
46264 :
46265 ;;
46266 *)
46267 xc_bad_var_libs=yes
46268 ;;
46269 esac
46270 done
46271 if test $xc_bad_var_libs = yes; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080046272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using LIBS: $LIBS" >&5
46273printf "%s\n" "$as_me: using LIBS: $LIBS" >&6;}
46274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LIBS note: LIBS should only be used to specify libraries (-lname)." >&5
46275printf "%s\n" "$as_me: LIBS note: LIBS should only be used to specify libraries (-lname)." >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046276 fi
46277
46278
46279 xc_bad_var_ldflags=no
46280 for xc_word in $LDFLAGS; do
46281 case "$xc_word" in
46282 -D*)
46283 xc_bad_var_ldflags=yes
46284 ;;
46285 -U*)
46286 xc_bad_var_ldflags=yes
46287 ;;
46288 -I*)
46289 xc_bad_var_ldflags=yes
46290 ;;
46291 -l* | --library=*)
46292 xc_bad_var_ldflags=yes
46293 ;;
46294 esac
46295 done
46296 if test $xc_bad_var_ldflags = yes; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080046297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using LDFLAGS: $LDFLAGS" >&5
46298printf "%s\n" "$as_me: using LDFLAGS: $LDFLAGS" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046299 xc_bad_var_msg="LDFLAGS note: LDFLAGS should only be used to specify linker flags, not"
46300 for xc_word in $LDFLAGS; do
46301 case "$xc_word" in
46302 -D*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080046303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&5
46304printf "%s\n" "$as_me: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046305 ;;
46306 -U*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080046307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&5
46308printf "%s\n" "$as_me: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046309 ;;
46310 -I*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080046311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&5
46312printf "%s\n" "$as_me: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046313 ;;
46314 -l* | --library=*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080046315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5
46316printf "%s\n" "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046317 ;;
46318 esac
46319 done
46320 fi
46321
46322
46323 xc_bad_var_cppflags=no
46324 for xc_word in $CPPFLAGS; do
46325 case "$xc_word" in
46326 -rpath*)
46327 xc_bad_var_cppflags=yes
46328 ;;
46329 -L* | --library-path=*)
46330 xc_bad_var_cppflags=yes
46331 ;;
46332 -l* | --library=*)
46333 xc_bad_var_cppflags=yes
46334 ;;
46335 esac
46336 done
46337 if test $xc_bad_var_cppflags = yes; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080046338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using CPPFLAGS: $CPPFLAGS" >&5
46339printf "%s\n" "$as_me: using CPPFLAGS: $CPPFLAGS" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046340 xc_bad_var_msg="CPPFLAGS note: CPPFLAGS should only be used to specify C preprocessor flags, not"
46341 for xc_word in $CPPFLAGS; do
46342 case "$xc_word" in
46343 -rpath*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080046344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&5
46345printf "%s\n" "$as_me: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046346 ;;
46347 -L* | --library-path=*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080046348 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&5
46349printf "%s\n" "$as_me: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046350 ;;
46351 -l* | --library=*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080046352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5
46353printf "%s\n" "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046354 ;;
46355 esac
46356 done
46357 fi
46358
46359
46360 xc_bad_var_cflags=no
46361 for xc_word in $CFLAGS; do
46362 case "$xc_word" in
46363 -D*)
46364 xc_bad_var_cflags=yes
46365 ;;
46366 -U*)
46367 xc_bad_var_cflags=yes
46368 ;;
46369 -I*)
46370 xc_bad_var_cflags=yes
46371 ;;
46372 -rpath*)
46373 xc_bad_var_cflags=yes
46374 ;;
46375 -L* | --library-path=*)
46376 xc_bad_var_cflags=yes
46377 ;;
46378 -l* | --library=*)
46379 xc_bad_var_cflags=yes
46380 ;;
46381 esac
46382 done
46383 if test $xc_bad_var_cflags = yes; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080046384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using CFLAGS: $CFLAGS" >&5
46385printf "%s\n" "$as_me: using CFLAGS: $CFLAGS" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046386 xc_bad_var_msg="CFLAGS note: CFLAGS should only be used to specify C compiler flags, not"
46387 for xc_word in $CFLAGS; do
46388 case "$xc_word" in
46389 -D*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080046390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&5
46391printf "%s\n" "$as_me: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046392 ;;
46393 -U*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080046394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&5
46395printf "%s\n" "$as_me: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046396 ;;
46397 -I*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080046398 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&5
46399printf "%s\n" "$as_me: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046400 ;;
46401 -rpath*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080046402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&5
46403printf "%s\n" "$as_me: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046404 ;;
46405 -L* | --library-path=*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080046406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&5
46407printf "%s\n" "$as_me: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046408 ;;
46409 -l* | --library=*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080046410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5
46411printf "%s\n" "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046412 ;;
46413 esac
46414 done
46415 fi
46416
46417 if test $xc_bad_var_libs = yes ||
46418 test $xc_bad_var_cflags = yes ||
46419 test $xc_bad_var_ldflags = yes ||
46420 test $xc_bad_var_cppflags = yes; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080046421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Continuing even with errors mentioned immediately above this line." >&5
46422printf "%s\n" "$as_me: WARNING: Continuing even with errors mentioned immediately above this line." >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046423 fi
46424
46425
Elliott Hughes0128fe42018-02-27 14:57:55 -080046426SSL_BACKENDS=${ssl_backends}
46427
46428
Elliott Hughes82be86d2017-09-20 17:00:17 -070046429if test "x$want_curldebug_assumed" = "xyes" &&
46430 test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then
46431 ac_configure_args="$ac_configure_args --enable-curldebug"
46432fi
46433
Haibo Huang21926d52019-01-08 14:27:10 -080046434ac_config_files="$ac_config_files Makefile docs/Makefile docs/examples/Makefile docs/libcurl/Makefile docs/libcurl/opts/Makefile docs/cmdline-opts/Makefile include/Makefile include/curl/Makefile src/Makefile lib/Makefile scripts/Makefile lib/libcurl.vers tests/Makefile tests/certs/Makefile tests/certs/scripts/Makefile tests/data/Makefile tests/server/Makefile tests/libtest/Makefile tests/unit/Makefile packages/Makefile packages/vms/Makefile curl-config libcurl.pc"
Elliott Hughes82be86d2017-09-20 17:00:17 -070046435
46436cat >confcache <<\_ACEOF
46437# This file is a shell script that caches the results of configure
46438# tests run on this system so they can be shared between configure
46439# scripts and configure runs, see configure's option --config-cache.
46440# It is not useful on other systems. If it contains results you don't
46441# want to keep, you may remove or edit it.
46442#
46443# config.status only pays attention to the cache file if you give it
46444# the --recheck option to rerun configure.
46445#
46446# `ac_cv_env_foo' variables (set or unset) will be overridden when
46447# loading this file, other *unset* `ac_cv_foo' will be assigned the
46448# following values.
46449
46450_ACEOF
46451
46452# The following way of writing the cache mishandles newlines in values,
46453# but we know of no workaround that is simple, portable, and efficient.
46454# So, we kill variables containing newlines.
46455# Ultrix sh set writes to stderr and can't be redirected directly,
46456# and sets the high bit in the cache file unless we assign to the vars.
46457(
46458 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
46459 eval ac_val=\$$ac_var
46460 case $ac_val in #(
46461 *${as_nl}*)
46462 case $ac_var in #(
Elliott Hughesf344baa2021-12-07 09:12:34 -080046463 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
46464printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070046465 esac
46466 case $ac_var in #(
46467 _ | IFS | as_nl) ;; #(
46468 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
46469 *) { eval $ac_var=; unset $ac_var;} ;;
46470 esac ;;
46471 esac
46472 done
46473
46474 (set) 2>&1 |
46475 case $as_nl`(ac_space=' '; set) 2>&1` in #(
46476 *${as_nl}ac_space=\ *)
46477 # `set' does not quote correctly, so add quotes: double-quote
46478 # substitution turns \\\\ into \\, and sed turns \\ into \.
46479 sed -n \
46480 "s/'/'\\\\''/g;
46481 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
46482 ;; #(
46483 *)
46484 # `set' quotes correctly as required by POSIX, so do not add quotes.
46485 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
46486 ;;
46487 esac |
46488 sort
46489) |
46490 sed '
46491 /^ac_cv_env_/b end
46492 t clear
46493 :clear
Elliott Hughesf344baa2021-12-07 09:12:34 -080046494 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
Elliott Hughes82be86d2017-09-20 17:00:17 -070046495 t end
46496 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
46497 :end' >>confcache
46498if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
46499 if test -w "$cache_file"; then
46500 if test "x$cache_file" != "x/dev/null"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080046501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
46502printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046503 if test ! -f "$cache_file" || test -h "$cache_file"; then
46504 cat confcache >"$cache_file"
46505 else
46506 case $cache_file in #(
46507 */* | ?:*)
46508 mv -f confcache "$cache_file"$$ &&
46509 mv -f "$cache_file"$$ "$cache_file" ;; #(
46510 *)
46511 mv -f confcache "$cache_file" ;;
46512 esac
46513 fi
46514 fi
46515 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080046516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
46517printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046518 fi
46519fi
46520rm -f confcache
46521
46522test "x$prefix" = xNONE && prefix=$ac_default_prefix
46523# Let make expand exec_prefix.
46524test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
46525
46526DEFS=-DHAVE_CONFIG_H
46527
46528ac_libobjs=
46529ac_ltlibobjs=
46530U=
46531for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
46532 # 1. Remove the extension, and $U if already installed.
46533 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Elliott Hughesf344baa2021-12-07 09:12:34 -080046534 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
Elliott Hughes82be86d2017-09-20 17:00:17 -070046535 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
46536 # will be set to the directory where LIBOBJS objects are built.
46537 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
46538 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
46539done
46540LIBOBJS=$ac_libobjs
46541
46542LTLIBOBJS=$ac_ltlibobjs
46543
46544
46545if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
46546 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
46547Usually this means the macro was only invoked conditionally." "$LINENO" 5
46548fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080046549{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
46550printf %s "checking that generated files are newer than configure... " >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070046551 if test -n "$am_sleep_pid"; then
46552 # Hide warnings about reused PIDs.
46553 wait $am_sleep_pid 2>/dev/null
46554 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080046555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
46556printf "%s\n" "done" >&6; }
Elliott Hughes82be86d2017-09-20 17:00:17 -070046557if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
46558 as_fn_error $? "conditional \"AMDEP\" was never defined.
46559Usually this means the macro was only invoked conditionally." "$LINENO" 5
46560fi
46561if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
46562 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
46563Usually this means the macro was only invoked conditionally." "$LINENO" 5
46564fi
46565 if test -n "$EXEEXT"; then
46566 am__EXEEXT_TRUE=
46567 am__EXEEXT_FALSE='#'
46568else
46569 am__EXEEXT_TRUE='#'
46570 am__EXEEXT_FALSE=
46571fi
46572
46573if test -z "${CURL_LT_SHLIB_USE_VERSION_INFO_TRUE}" && test -z "${CURL_LT_SHLIB_USE_VERSION_INFO_FALSE}"; then
46574 as_fn_error $? "conditional \"CURL_LT_SHLIB_USE_VERSION_INFO\" was never defined.
46575Usually this means the macro was only invoked conditionally." "$LINENO" 5
46576fi
46577if test -z "${CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE}" && test -z "${CURL_LT_SHLIB_USE_NO_UNDEFINED_FALSE}"; then
46578 as_fn_error $? "conditional \"CURL_LT_SHLIB_USE_NO_UNDEFINED\" was never defined.
46579Usually this means the macro was only invoked conditionally." "$LINENO" 5
46580fi
46581if test -z "${CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE}" && test -z "${CURL_LT_SHLIB_USE_MIMPURE_TEXT_FALSE}"; then
46582 as_fn_error $? "conditional \"CURL_LT_SHLIB_USE_MIMPURE_TEXT\" was never defined.
46583Usually this means the macro was only invoked conditionally." "$LINENO" 5
46584fi
46585if test -z "${USE_CPPFLAG_CURL_STATICLIB_TRUE}" && test -z "${USE_CPPFLAG_CURL_STATICLIB_FALSE}"; then
46586 as_fn_error $? "conditional \"USE_CPPFLAG_CURL_STATICLIB\" was never defined.
46587Usually this means the macro was only invoked conditionally." "$LINENO" 5
46588fi
46589if test -z "${USE_EXPLICIT_LIB_DEPS_TRUE}" && test -z "${USE_EXPLICIT_LIB_DEPS_FALSE}"; then
46590 as_fn_error $? "conditional \"USE_EXPLICIT_LIB_DEPS\" was never defined.
46591Usually this means the macro was only invoked conditionally." "$LINENO" 5
46592fi
46593if test -z "${CURLDEBUG_TRUE}" && test -z "${CURLDEBUG_FALSE}"; then
46594 as_fn_error $? "conditional \"CURLDEBUG\" was never defined.
46595Usually this means the macro was only invoked conditionally." "$LINENO" 5
46596fi
46597if test -z "${BUILD_UNITTESTS_TRUE}" && test -z "${BUILD_UNITTESTS_FALSE}"; then
46598 as_fn_error $? "conditional \"BUILD_UNITTESTS\" was never defined.
46599Usually this means the macro was only invoked conditionally." "$LINENO" 5
46600fi
46601if test -z "${DOING_NATIVE_WINDOWS_TRUE}" && test -z "${DOING_NATIVE_WINDOWS_FALSE}"; then
46602 as_fn_error $? "conditional \"DOING_NATIVE_WINDOWS\" was never defined.
46603Usually this means the macro was only invoked conditionally." "$LINENO" 5
46604fi
46605if test -z "${HAVE_LIBZ_TRUE}" && test -z "${HAVE_LIBZ_FALSE}"; then
46606 as_fn_error $? "conditional \"HAVE_LIBZ\" was never defined.
46607Usually this means the macro was only invoked conditionally." "$LINENO" 5
46608fi
Alex Deymo486467e2017-12-19 19:04:07 +010046609if test -z "${BUILD_STUB_GSS_TRUE}" && test -z "${BUILD_STUB_GSS_FALSE}"; then
46610 as_fn_error $? "conditional \"BUILD_STUB_GSS\" was never defined.
46611Usually this means the macro was only invoked conditionally." "$LINENO" 5
46612fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070046613if test -z "${USE_LIBPSL_TRUE}" && test -z "${USE_LIBPSL_FALSE}"; then
46614 as_fn_error $? "conditional \"USE_LIBPSL\" was never defined.
46615Usually this means the macro was only invoked conditionally." "$LINENO" 5
46616fi
Elliott Hughes34dd5f42021-08-10 13:01:18 -070046617if test -z "${USE_GSASL_TRUE}" && test -z "${USE_GSASL_FALSE}"; then
46618 as_fn_error $? "conditional \"USE_GSASL\" was never defined.
46619Usually this means the macro was only invoked conditionally." "$LINENO" 5
46620fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070046621if test -z "${CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE}" && test -z "${CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE}"; then
46622 as_fn_error $? "conditional \"CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS\" was never defined.
46623Usually this means the macro was only invoked conditionally." "$LINENO" 5
46624fi
46625if test -z "${USE_MANUAL_TRUE}" && test -z "${USE_MANUAL_FALSE}"; then
46626 as_fn_error $? "conditional \"USE_MANUAL\" was never defined.
46627Usually this means the macro was only invoked conditionally." "$LINENO" 5
46628fi
46629if test -z "${USE_EMBEDDED_ARES_TRUE}" && test -z "${USE_EMBEDDED_ARES_FALSE}"; then
46630 as_fn_error $? "conditional \"USE_EMBEDDED_ARES\" was never defined.
46631Usually this means the macro was only invoked conditionally." "$LINENO" 5
46632fi
46633if test -z "${BUILD_LIBHOSTNAME_TRUE}" && test -z "${BUILD_LIBHOSTNAME_FALSE}"; then
46634 as_fn_error $? "conditional \"BUILD_LIBHOSTNAME\" was never defined.
46635Usually this means the macro was only invoked conditionally." "$LINENO" 5
46636fi
46637if test -z "${DOING_CURL_SYMBOL_HIDING_TRUE}" && test -z "${DOING_CURL_SYMBOL_HIDING_FALSE}"; then
46638 as_fn_error $? "conditional \"DOING_CURL_SYMBOL_HIDING\" was never defined.
46639Usually this means the macro was only invoked conditionally." "$LINENO" 5
46640fi
Elliott Hughes82be86d2017-09-20 17:00:17 -070046641if test -z "${CROSSCOMPILING_TRUE}" && test -z "${CROSSCOMPILING_FALSE}"; then
46642 as_fn_error $? "conditional \"CROSSCOMPILING\" was never defined.
46643Usually this means the macro was only invoked conditionally." "$LINENO" 5
46644fi
46645
46646: "${CONFIG_STATUS=./config.status}"
46647ac_write_fail=0
46648ac_clean_files_save=$ac_clean_files
46649ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Elliott Hughesf344baa2021-12-07 09:12:34 -080046650{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
46651printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070046652as_write_fail=0
46653cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
46654#! $SHELL
46655# Generated by $as_me.
46656# Run this file to recreate the current configuration.
46657# Compiler output produced by configure, useful for debugging
46658# configure, is in config.log if it exists.
46659
46660debug=false
46661ac_cs_recheck=false
46662ac_cs_silent=false
46663
46664SHELL=\${CONFIG_SHELL-$SHELL}
46665export SHELL
46666_ASEOF
46667cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
46668## -------------------- ##
46669## M4sh Initialization. ##
46670## -------------------- ##
46671
46672# Be more Bourne compatible
46673DUALCASE=1; export DUALCASE # for MKS sh
Elliott Hughesf344baa2021-12-07 09:12:34 -080046674as_nop=:
46675if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
46676then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070046677 emulate sh
46678 NULLCMD=:
46679 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
46680 # is contrary to our usage. Disable this feature.
46681 alias -g '${1+"$@"}'='"$@"'
46682 setopt NO_GLOB_SUBST
Elliott Hughesf344baa2021-12-07 09:12:34 -080046683else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070046684 case `(set -o) 2>/dev/null` in #(
46685 *posix*) :
46686 set -o posix ;; #(
46687 *) :
46688 ;;
46689esac
46690fi
46691
46692
Elliott Hughesf344baa2021-12-07 09:12:34 -080046693
46694# Reset variables that may have inherited troublesome values from
46695# the environment.
46696
46697# IFS needs to be set, to space, tab, and newline, in precisely that order.
46698# (If _AS_PATH_WALK were called with IFS unset, it would have the
46699# side effect of setting IFS to empty, thus disabling word splitting.)
46700# Quoting is to prevent editors from complaining about space-tab.
Elliott Hughes82be86d2017-09-20 17:00:17 -070046701as_nl='
46702'
46703export as_nl
Elliott Hughes82be86d2017-09-20 17:00:17 -070046704IFS=" "" $as_nl"
46705
Elliott Hughesf344baa2021-12-07 09:12:34 -080046706PS1='$ '
46707PS2='> '
46708PS4='+ '
46709
46710# Ensure predictable behavior from utilities with locale-dependent output.
46711LC_ALL=C
46712export LC_ALL
46713LANGUAGE=C
46714export LANGUAGE
46715
46716# We cannot yet rely on "unset" to work, but we need these variables
46717# to be unset--not just set to an empty or harmless value--now, to
46718# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
46719# also avoids known problems related to "unset" and subshell syntax
46720# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
46721for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
46722do eval test \${$as_var+y} \
46723 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
46724done
46725
46726# Ensure that fds 0, 1, and 2 are open.
46727if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
46728if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
46729if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
46730
46731
46732
Elliott Hughes82be86d2017-09-20 17:00:17 -070046733# Find who we are. Look in the path if we contain no directory separator.
46734as_myself=
46735case $0 in #((
46736 *[\\/]* ) as_myself=$0 ;;
46737 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46738for as_dir in $PATH
46739do
46740 IFS=$as_save_IFS
Elliott Hughesf344baa2021-12-07 09:12:34 -080046741 case $as_dir in #(((
46742 '') as_dir=./ ;;
46743 */) ;;
46744 *) as_dir=$as_dir/ ;;
46745 esac
46746 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Elliott Hughes82be86d2017-09-20 17:00:17 -070046747 done
46748IFS=$as_save_IFS
46749
46750 ;;
46751esac
46752# We did not find ourselves, most probably we were run as `sh COMMAND'
46753# in which case we are not to be found in the path.
46754if test "x$as_myself" = x; then
46755 as_myself=$0
46756fi
46757if test ! -f "$as_myself"; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080046758 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Elliott Hughes82be86d2017-09-20 17:00:17 -070046759 exit 1
46760fi
46761
Elliott Hughes82be86d2017-09-20 17:00:17 -070046762
46763
46764# as_fn_error STATUS ERROR [LINENO LOG_FD]
46765# ----------------------------------------
46766# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
46767# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
46768# script with STATUS, using 1 if that was 0.
46769as_fn_error ()
46770{
46771 as_status=$1; test $as_status -eq 0 && as_status=1
46772 if test "$4"; then
46773 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Elliott Hughesf344baa2021-12-07 09:12:34 -080046774 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Elliott Hughes82be86d2017-09-20 17:00:17 -070046775 fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080046776 printf "%s\n" "$as_me: error: $2" >&2
Elliott Hughes82be86d2017-09-20 17:00:17 -070046777 as_fn_exit $as_status
46778} # as_fn_error
46779
46780
Elliott Hughesf344baa2021-12-07 09:12:34 -080046781
Elliott Hughes82be86d2017-09-20 17:00:17 -070046782# as_fn_set_status STATUS
46783# -----------------------
46784# Set $? to STATUS, without forking.
46785as_fn_set_status ()
46786{
46787 return $1
46788} # as_fn_set_status
46789
46790# as_fn_exit STATUS
46791# -----------------
46792# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
46793as_fn_exit ()
46794{
46795 set +e
46796 as_fn_set_status $1
46797 exit $1
46798} # as_fn_exit
46799
46800# as_fn_unset VAR
46801# ---------------
46802# Portably unset VAR.
46803as_fn_unset ()
46804{
46805 { eval $1=; unset $1;}
46806}
46807as_unset=as_fn_unset
Elliott Hughesf344baa2021-12-07 09:12:34 -080046808
Elliott Hughes82be86d2017-09-20 17:00:17 -070046809# as_fn_append VAR VALUE
46810# ----------------------
46811# Append the text in VALUE to the end of the definition contained in VAR. Take
46812# advantage of any shell optimizations that allow amortized linear growth over
46813# repeated appends, instead of the typical quadratic growth present in naive
46814# implementations.
Elliott Hughesf344baa2021-12-07 09:12:34 -080046815if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
46816then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070046817 eval 'as_fn_append ()
46818 {
46819 eval $1+=\$2
46820 }'
Elliott Hughesf344baa2021-12-07 09:12:34 -080046821else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070046822 as_fn_append ()
46823 {
46824 eval $1=\$$1\$2
46825 }
46826fi # as_fn_append
46827
46828# as_fn_arith ARG...
46829# ------------------
46830# Perform arithmetic evaluation on the ARGs, and store the result in the
46831# global $as_val. Take advantage of shells that can avoid forks. The arguments
46832# must be portable across $(()) and expr.
Elliott Hughesf344baa2021-12-07 09:12:34 -080046833if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
46834then :
Elliott Hughes82be86d2017-09-20 17:00:17 -070046835 eval 'as_fn_arith ()
46836 {
46837 as_val=$(( $* ))
46838 }'
Elliott Hughesf344baa2021-12-07 09:12:34 -080046839else $as_nop
Elliott Hughes82be86d2017-09-20 17:00:17 -070046840 as_fn_arith ()
46841 {
46842 as_val=`expr "$@" || test $? -eq 1`
46843 }
46844fi # as_fn_arith
46845
46846
46847if expr a : '\(a\)' >/dev/null 2>&1 &&
46848 test "X`expr 00001 : '.*\(...\)'`" = X001; then
46849 as_expr=expr
46850else
46851 as_expr=false
46852fi
46853
46854if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
46855 as_basename=basename
46856else
46857 as_basename=false
46858fi
46859
46860if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
46861 as_dirname=dirname
46862else
46863 as_dirname=false
46864fi
46865
46866as_me=`$as_basename -- "$0" ||
46867$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
46868 X"$0" : 'X\(//\)$' \| \
46869 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Elliott Hughesf344baa2021-12-07 09:12:34 -080046870printf "%s\n" X/"$0" |
Elliott Hughes82be86d2017-09-20 17:00:17 -070046871 sed '/^.*\/\([^/][^/]*\)\/*$/{
46872 s//\1/
46873 q
46874 }
46875 /^X\/\(\/\/\)$/{
46876 s//\1/
46877 q
46878 }
46879 /^X\/\(\/\).*/{
46880 s//\1/
46881 q
46882 }
46883 s/.*/./; q'`
46884
46885# Avoid depending upon Character Ranges.
46886as_cr_letters='abcdefghijklmnopqrstuvwxyz'
46887as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
46888as_cr_Letters=$as_cr_letters$as_cr_LETTERS
46889as_cr_digits='0123456789'
46890as_cr_alnum=$as_cr_Letters$as_cr_digits
46891
Elliott Hughesf344baa2021-12-07 09:12:34 -080046892
46893# Determine whether it's possible to make 'echo' print without a newline.
46894# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
46895# for compatibility with existing Makefiles.
Elliott Hughes82be86d2017-09-20 17:00:17 -070046896ECHO_C= ECHO_N= ECHO_T=
46897case `echo -n x` in #(((((
46898-n*)
46899 case `echo 'xy\c'` in
46900 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
46901 xy) ECHO_C='\c';;
46902 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
46903 ECHO_T=' ';;
46904 esac;;
46905*)
46906 ECHO_N='-n';;
46907esac
46908
Elliott Hughesf344baa2021-12-07 09:12:34 -080046909# For backward compatibility with old third-party macros, we provide
46910# the shell variables $as_echo and $as_echo_n. New code should use
46911# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
46912as_echo='printf %s\n'
46913as_echo_n='printf %s'
46914
Elliott Hughes82be86d2017-09-20 17:00:17 -070046915rm -f conf$$ conf$$.exe conf$$.file
46916if test -d conf$$.dir; then
46917 rm -f conf$$.dir/conf$$.file
46918else
46919 rm -f conf$$.dir
46920 mkdir conf$$.dir 2>/dev/null
46921fi
46922if (echo >conf$$.file) 2>/dev/null; then
46923 if ln -s conf$$.file conf$$ 2>/dev/null; then
46924 as_ln_s='ln -s'
46925 # ... but there are two gotchas:
46926 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
46927 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
46928 # In both cases, we have to default to `cp -pR'.
46929 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
46930 as_ln_s='cp -pR'
46931 elif ln conf$$.file conf$$ 2>/dev/null; then
46932 as_ln_s=ln
46933 else
46934 as_ln_s='cp -pR'
46935 fi
46936else
46937 as_ln_s='cp -pR'
46938fi
46939rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
46940rmdir conf$$.dir 2>/dev/null
46941
46942
46943# as_fn_mkdir_p
46944# -------------
46945# Create "$as_dir" as a directory, including parents if necessary.
46946as_fn_mkdir_p ()
46947{
46948
46949 case $as_dir in #(
46950 -*) as_dir=./$as_dir;;
46951 esac
46952 test -d "$as_dir" || eval $as_mkdir_p || {
46953 as_dirs=
46954 while :; do
46955 case $as_dir in #(
Elliott Hughesf344baa2021-12-07 09:12:34 -080046956 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Elliott Hughes82be86d2017-09-20 17:00:17 -070046957 *) as_qdir=$as_dir;;
46958 esac
46959 as_dirs="'$as_qdir' $as_dirs"
46960 as_dir=`$as_dirname -- "$as_dir" ||
46961$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46962 X"$as_dir" : 'X\(//\)[^/]' \| \
46963 X"$as_dir" : 'X\(//\)$' \| \
46964 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Elliott Hughesf344baa2021-12-07 09:12:34 -080046965printf "%s\n" X"$as_dir" |
Elliott Hughes82be86d2017-09-20 17:00:17 -070046966 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
46967 s//\1/
46968 q
46969 }
46970 /^X\(\/\/\)[^/].*/{
46971 s//\1/
46972 q
46973 }
46974 /^X\(\/\/\)$/{
46975 s//\1/
46976 q
46977 }
46978 /^X\(\/\).*/{
46979 s//\1/
46980 q
46981 }
46982 s/.*/./; q'`
46983 test -d "$as_dir" && break
46984 done
46985 test -z "$as_dirs" || eval "mkdir $as_dirs"
46986 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
46987
46988
46989} # as_fn_mkdir_p
46990if mkdir -p . 2>/dev/null; then
46991 as_mkdir_p='mkdir -p "$as_dir"'
46992else
46993 test -d ./-p && rmdir ./-p
46994 as_mkdir_p=false
46995fi
46996
46997
46998# as_fn_executable_p FILE
46999# -----------------------
47000# Test if FILE is an executable regular file.
47001as_fn_executable_p ()
47002{
47003 test -f "$1" && test -x "$1"
47004} # as_fn_executable_p
47005as_test_x='test -x'
47006as_executable_p=as_fn_executable_p
47007
47008# Sed expression to map a string onto a valid CPP name.
47009as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
47010
47011# Sed expression to map a string onto a valid variable name.
47012as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
47013
47014
47015exec 6>&1
47016## ----------------------------------- ##
47017## Main body of $CONFIG_STATUS script. ##
47018## ----------------------------------- ##
47019_ASEOF
47020test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
47021
47022cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47023# Save the log message, to keep $0 and so on meaningful, and to
47024# report actual input values of CONFIG_FILES etc. instead of their
47025# values after options handling.
47026ac_log="
47027This file was extended by curl $as_me -, which was
Elliott Hughesf344baa2021-12-07 09:12:34 -080047028generated by GNU Autoconf 2.71. Invocation command line was
Elliott Hughes82be86d2017-09-20 17:00:17 -070047029
47030 CONFIG_FILES = $CONFIG_FILES
47031 CONFIG_HEADERS = $CONFIG_HEADERS
47032 CONFIG_LINKS = $CONFIG_LINKS
47033 CONFIG_COMMANDS = $CONFIG_COMMANDS
47034 $ $0 $@
47035
47036on `(hostname || uname -n) 2>/dev/null | sed 1q`
47037"
47038
47039_ACEOF
47040
47041case $ac_config_files in *"
47042"*) set x $ac_config_files; shift; ac_config_files=$*;;
47043esac
47044
47045case $ac_config_headers in *"
47046"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
47047esac
47048
47049
47050cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47051# Files that config.status was made for.
47052config_files="$ac_config_files"
47053config_headers="$ac_config_headers"
47054config_commands="$ac_config_commands"
47055
47056_ACEOF
47057
47058cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47059ac_cs_usage="\
47060\`$as_me' instantiates files and other configuration actions
47061from templates according to the current configuration. Unless the files
47062and actions are specified as TAGs, all are instantiated by default.
47063
47064Usage: $0 [OPTION]... [TAG]...
47065
47066 -h, --help print this help, then exit
47067 -V, --version print version number and configuration settings, then exit
47068 --config print configuration, then exit
47069 -q, --quiet, --silent
47070 do not print progress messages
47071 -d, --debug don't remove temporary files
47072 --recheck update $as_me by reconfiguring in the same conditions
47073 --file=FILE[:TEMPLATE]
47074 instantiate the configuration file FILE
47075 --header=FILE[:TEMPLATE]
47076 instantiate the configuration header FILE
47077
47078Configuration files:
47079$config_files
47080
47081Configuration headers:
47082$config_headers
47083
47084Configuration commands:
47085$config_commands
47086
Elliott Hughes34dd5f42021-08-10 13:01:18 -070047087Report bugs to <a suitable curl mailing list: https://curl.se/mail/>."
Elliott Hughes82be86d2017-09-20 17:00:17 -070047088
47089_ACEOF
Elliott Hughesf344baa2021-12-07 09:12:34 -080047090ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
47091ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
Elliott Hughes82be86d2017-09-20 17:00:17 -070047092cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Elliott Hughesf344baa2021-12-07 09:12:34 -080047093ac_cs_config='$ac_cs_config_escaped'
Elliott Hughes82be86d2017-09-20 17:00:17 -070047094ac_cs_version="\\
47095curl config.status -
Elliott Hughesf344baa2021-12-07 09:12:34 -080047096configured by $0, generated by GNU Autoconf 2.71,
Elliott Hughes82be86d2017-09-20 17:00:17 -070047097 with options \\"\$ac_cs_config\\"
47098
Elliott Hughesf344baa2021-12-07 09:12:34 -080047099Copyright (C) 2021 Free Software Foundation, Inc.
Elliott Hughes82be86d2017-09-20 17:00:17 -070047100This config.status script is free software; the Free Software Foundation
47101gives unlimited permission to copy, distribute and modify it."
47102
47103ac_pwd='$ac_pwd'
47104srcdir='$srcdir'
47105INSTALL='$INSTALL'
47106MKDIR_P='$MKDIR_P'
47107AWK='$AWK'
47108test -n "\$AWK" || AWK=awk
47109_ACEOF
47110
47111cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47112# The default lists apply if the user does not specify any file.
47113ac_need_defaults=:
47114while test $# != 0
47115do
47116 case $1 in
47117 --*=?*)
47118 ac_option=`expr "X$1" : 'X\([^=]*\)='`
47119 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
47120 ac_shift=:
47121 ;;
47122 --*=)
47123 ac_option=`expr "X$1" : 'X\([^=]*\)='`
47124 ac_optarg=
47125 ac_shift=:
47126 ;;
47127 *)
47128 ac_option=$1
47129 ac_optarg=$2
47130 ac_shift=shift
47131 ;;
47132 esac
47133
47134 case $ac_option in
47135 # Handling of the options.
47136 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
47137 ac_cs_recheck=: ;;
47138 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Elliott Hughesf344baa2021-12-07 09:12:34 -080047139 printf "%s\n" "$ac_cs_version"; exit ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070047140 --config | --confi | --conf | --con | --co | --c )
Elliott Hughesf344baa2021-12-07 09:12:34 -080047141 printf "%s\n" "$ac_cs_config"; exit ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070047142 --debug | --debu | --deb | --de | --d | -d )
47143 debug=: ;;
47144 --file | --fil | --fi | --f )
47145 $ac_shift
47146 case $ac_optarg in
Elliott Hughesf344baa2021-12-07 09:12:34 -080047147 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070047148 '') as_fn_error $? "missing file argument" ;;
47149 esac
47150 as_fn_append CONFIG_FILES " '$ac_optarg'"
47151 ac_need_defaults=false;;
47152 --header | --heade | --head | --hea )
47153 $ac_shift
47154 case $ac_optarg in
Elliott Hughesf344baa2021-12-07 09:12:34 -080047155 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070047156 esac
47157 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
47158 ac_need_defaults=false;;
47159 --he | --h)
47160 # Conflict between --help and --header
47161 as_fn_error $? "ambiguous option: \`$1'
47162Try \`$0 --help' for more information.";;
47163 --help | --hel | -h )
Elliott Hughesf344baa2021-12-07 09:12:34 -080047164 printf "%s\n" "$ac_cs_usage"; exit ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070047165 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
47166 | -silent | --silent | --silen | --sile | --sil | --si | --s)
47167 ac_cs_silent=: ;;
47168
47169 # This is an error.
47170 -*) as_fn_error $? "unrecognized option: \`$1'
47171Try \`$0 --help' for more information." ;;
47172
47173 *) as_fn_append ac_config_targets " $1"
47174 ac_need_defaults=false ;;
47175
47176 esac
47177 shift
47178done
47179
47180ac_configure_extra_args=
47181
47182if $ac_cs_silent; then
47183 exec 6>/dev/null
47184 ac_configure_extra_args="$ac_configure_extra_args --silent"
47185fi
47186
47187_ACEOF
47188cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47189if \$ac_cs_recheck; then
47190 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
47191 shift
Elliott Hughesf344baa2021-12-07 09:12:34 -080047192 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
Elliott Hughes82be86d2017-09-20 17:00:17 -070047193 CONFIG_SHELL='$SHELL'
47194 export CONFIG_SHELL
47195 exec "\$@"
47196fi
47197
47198_ACEOF
47199cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47200exec 5>>config.log
47201{
47202 echo
47203 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
47204## Running $as_me. ##
47205_ASBOX
Elliott Hughesf344baa2021-12-07 09:12:34 -080047206 printf "%s\n" "$ac_log"
Elliott Hughes82be86d2017-09-20 17:00:17 -070047207} >&5
47208
47209_ACEOF
47210cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47211#
47212# INIT-COMMANDS
47213#
Haibo Huang001784b2019-07-19 05:27:28 -070047214AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
Elliott Hughes82be86d2017-09-20 17:00:17 -070047215
47216
47217# The HP-UX ksh and POSIX shell print the target directory to stdout
47218# if CDPATH is set.
47219(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
47220
47221sed_quote_subst='$sed_quote_subst'
47222double_quote_subst='$double_quote_subst'
47223delay_variable_subst='$delay_variable_subst'
47224macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
47225macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
47226AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`'
47227DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
47228OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
47229enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
47230enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
47231pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
47232enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
47233shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
47234SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
47235ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
47236PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
47237host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
47238host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
47239host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
47240build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
47241build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
47242build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
47243SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
47244Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
47245GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
47246EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
47247FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
47248LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
47249NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
47250LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
47251max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
47252ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
47253exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
47254lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
47255lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
47256lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
47257lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
47258lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
47259reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
47260reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
47261deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
47262file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
47263file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
47264want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
47265sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
47266AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
47267AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
47268archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
47269STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
47270RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
47271old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
47272old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
47273old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
47274lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
47275CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
47276CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
47277compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
47278GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
47279lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
47280lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
47281lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
47282lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
47283lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
47284lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
47285nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
47286lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
47287lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
47288objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
47289MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
47290lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
47291lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
47292lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
47293lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
47294lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
47295need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
47296MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
47297DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
47298NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
47299LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
47300OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
47301OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
47302libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
47303shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
47304extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
47305archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
47306enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
47307export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
47308whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
47309compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
47310old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
47311old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
47312archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
47313archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
47314module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
47315module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
47316with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
47317allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
47318no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
47319hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
47320hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
47321hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
47322hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
47323hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
47324hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
47325hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
47326inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
47327link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
47328always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
47329export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
47330exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
47331include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
47332prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
47333postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
47334file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
47335variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
47336need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
47337need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
47338version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
47339runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
47340shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
47341shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
47342libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
47343library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
47344soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
47345install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
47346postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
47347postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
47348finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
47349finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
47350hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
47351sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
47352configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
47353configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
47354hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
47355enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
47356enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
47357enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
47358old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
47359striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
47360
47361LTCC='$LTCC'
47362LTCFLAGS='$LTCFLAGS'
47363compiler='$compiler_DEFAULT'
47364
47365# A function that is used when there is no print builtin or printf.
47366func_fallback_echo ()
47367{
47368 eval 'cat <<_LTECHO_EOF
47369\$1
47370_LTECHO_EOF'
47371}
47372
47373# Quote evaled strings.
47374for var in AS \
47375DLLTOOL \
47376OBJDUMP \
47377SHELL \
47378ECHO \
47379PATH_SEPARATOR \
47380SED \
47381GREP \
47382EGREP \
47383FGREP \
47384LD \
47385NM \
47386LN_S \
47387lt_SP2NL \
47388lt_NL2SP \
47389reload_flag \
47390deplibs_check_method \
47391file_magic_cmd \
47392file_magic_glob \
47393want_nocaseglob \
47394sharedlib_from_linklib_cmd \
47395AR \
47396AR_FLAGS \
47397archiver_list_spec \
47398STRIP \
47399RANLIB \
47400CC \
47401CFLAGS \
47402compiler \
47403lt_cv_sys_global_symbol_pipe \
47404lt_cv_sys_global_symbol_to_cdecl \
47405lt_cv_sys_global_symbol_to_import \
47406lt_cv_sys_global_symbol_to_c_name_address \
47407lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
47408lt_cv_nm_interface \
47409nm_file_list_spec \
47410lt_cv_truncate_bin \
47411lt_prog_compiler_no_builtin_flag \
47412lt_prog_compiler_pic \
47413lt_prog_compiler_wl \
47414lt_prog_compiler_static \
47415lt_cv_prog_compiler_c_o \
47416need_locks \
47417MANIFEST_TOOL \
47418DSYMUTIL \
47419NMEDIT \
47420LIPO \
47421OTOOL \
47422OTOOL64 \
47423shrext_cmds \
47424export_dynamic_flag_spec \
47425whole_archive_flag_spec \
47426compiler_needs_object \
47427with_gnu_ld \
47428allow_undefined_flag \
47429no_undefined_flag \
47430hardcode_libdir_flag_spec \
47431hardcode_libdir_separator \
47432exclude_expsyms \
47433include_expsyms \
47434file_list_spec \
47435variables_saved_for_relink \
47436libname_spec \
47437library_names_spec \
47438soname_spec \
47439install_override_mode \
47440finish_eval \
47441old_striplib \
47442striplib; do
47443 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
47444 *[\\\\\\\`\\"\\\$]*)
47445 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
47446 ;;
47447 *)
47448 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
47449 ;;
47450 esac
47451done
47452
47453# Double-quote double-evaled strings.
47454for var in reload_cmds \
47455old_postinstall_cmds \
47456old_postuninstall_cmds \
47457old_archive_cmds \
47458extract_expsyms_cmds \
47459old_archive_from_new_cmds \
47460old_archive_from_expsyms_cmds \
47461archive_cmds \
47462archive_expsym_cmds \
47463module_cmds \
47464module_expsym_cmds \
47465export_symbols_cmds \
47466prelink_cmds \
47467postlink_cmds \
47468postinstall_cmds \
47469postuninstall_cmds \
47470finish_cmds \
47471sys_lib_search_path_spec \
47472configure_time_dlsearch_path \
47473configure_time_lt_sys_library_path; do
47474 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
47475 *[\\\\\\\`\\"\\\$]*)
47476 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
47477 ;;
47478 *)
47479 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
47480 ;;
47481 esac
47482done
47483
47484ac_aux_dir='$ac_aux_dir'
47485
47486# See if we are running on zsh, and set the options that allow our
47487# commands through without removal of \ escapes INIT.
47488if test -n "\${ZSH_VERSION+set}"; then
47489 setopt NO_GLOB_SUBST
47490fi
47491
47492
47493 PACKAGE='$PACKAGE'
47494 VERSION='$VERSION'
47495 RM='$RM'
47496 ofile='$ofile'
47497
47498
47499
47500
47501_ACEOF
47502
47503cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47504
47505# Handling of arguments.
47506for ac_config_target in $ac_config_targets
47507do
47508 case $ac_config_target in
47509 "lib/curl_config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/curl_config.h" ;;
47510 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
47511 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
47512 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
47513 "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
47514 "docs/examples/Makefile") CONFIG_FILES="$CONFIG_FILES docs/examples/Makefile" ;;
47515 "docs/libcurl/Makefile") CONFIG_FILES="$CONFIG_FILES docs/libcurl/Makefile" ;;
47516 "docs/libcurl/opts/Makefile") CONFIG_FILES="$CONFIG_FILES docs/libcurl/opts/Makefile" ;;
47517 "docs/cmdline-opts/Makefile") CONFIG_FILES="$CONFIG_FILES docs/cmdline-opts/Makefile" ;;
47518 "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
47519 "include/curl/Makefile") CONFIG_FILES="$CONFIG_FILES include/curl/Makefile" ;;
47520 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
47521 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
47522 "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
47523 "lib/libcurl.vers") CONFIG_FILES="$CONFIG_FILES lib/libcurl.vers" ;;
47524 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
47525 "tests/certs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/certs/Makefile" ;;
47526 "tests/certs/scripts/Makefile") CONFIG_FILES="$CONFIG_FILES tests/certs/scripts/Makefile" ;;
47527 "tests/data/Makefile") CONFIG_FILES="$CONFIG_FILES tests/data/Makefile" ;;
47528 "tests/server/Makefile") CONFIG_FILES="$CONFIG_FILES tests/server/Makefile" ;;
47529 "tests/libtest/Makefile") CONFIG_FILES="$CONFIG_FILES tests/libtest/Makefile" ;;
47530 "tests/unit/Makefile") CONFIG_FILES="$CONFIG_FILES tests/unit/Makefile" ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070047531 "packages/Makefile") CONFIG_FILES="$CONFIG_FILES packages/Makefile" ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070047532 "packages/vms/Makefile") CONFIG_FILES="$CONFIG_FILES packages/vms/Makefile" ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070047533 "curl-config") CONFIG_FILES="$CONFIG_FILES curl-config" ;;
47534 "libcurl.pc") CONFIG_FILES="$CONFIG_FILES libcurl.pc" ;;
47535
47536 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
47537 esac
47538done
47539
47540
47541# If the user did not use the arguments to specify the items to instantiate,
47542# then the envvar interface is used. Set only those that are not.
47543# We use the long form for the default assignment because of an extremely
47544# bizarre bug on SunOS 4.1.3.
47545if $ac_need_defaults; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080047546 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
47547 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
47548 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
Elliott Hughes82be86d2017-09-20 17:00:17 -070047549fi
47550
47551# Have a temporary directory for convenience. Make it in the build tree
47552# simply because there is no reason against having it here, and in addition,
47553# creating and moving files from /tmp can sometimes cause problems.
47554# Hook for its removal unless debugging.
47555# Note that there is a small window in which the directory will not be cleaned:
47556# after its creation but before its name has been assigned to `$tmp'.
47557$debug ||
47558{
47559 tmp= ac_tmp=
47560 trap 'exit_status=$?
47561 : "${ac_tmp:=$tmp}"
47562 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
47563' 0
47564 trap 'as_fn_exit 1' 1 2 13 15
47565}
47566# Create a (secure) tmp directory for tmp files.
47567
47568{
47569 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
47570 test -d "$tmp"
47571} ||
47572{
47573 tmp=./conf$$-$RANDOM
47574 (umask 077 && mkdir "$tmp")
47575} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
47576ac_tmp=$tmp
47577
47578# Set up the scripts for CONFIG_FILES section.
47579# No need to generate them if there are no CONFIG_FILES.
47580# This happens for instance with `./config.status config.h'.
47581if test -n "$CONFIG_FILES"; then
47582
47583
47584ac_cr=`echo X | tr X '\015'`
47585# On cygwin, bash can eat \r inside `` if the user requested igncr.
47586# But we know of no other shell where ac_cr would be empty at this
47587# point, so we can use a bashism as a fallback.
47588if test "x$ac_cr" = x; then
47589 eval ac_cr=\$\'\\r\'
47590fi
47591ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
47592if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
47593 ac_cs_awk_cr='\\r'
47594else
47595 ac_cs_awk_cr=$ac_cr
47596fi
47597
47598echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
47599_ACEOF
47600
47601
47602{
47603 echo "cat >conf$$subs.awk <<_ACEOF" &&
47604 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
47605 echo "_ACEOF"
47606} >conf$$subs.sh ||
47607 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
47608ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
47609ac_delim='%!_!# '
47610for ac_last_try in false false false false false :; do
47611 . ./conf$$subs.sh ||
47612 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
47613
47614 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
47615 if test $ac_delim_n = $ac_delim_num; then
47616 break
47617 elif $ac_last_try; then
47618 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
47619 else
47620 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
47621 fi
47622done
47623rm -f conf$$subs.sh
47624
47625cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47626cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
47627_ACEOF
47628sed -n '
47629h
47630s/^/S["/; s/!.*/"]=/
47631p
47632g
47633s/^[^!]*!//
47634:repl
47635t repl
47636s/'"$ac_delim"'$//
47637t delim
47638:nl
47639h
47640s/\(.\{148\}\)..*/\1/
47641t more1
47642s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
47643p
47644n
47645b repl
47646:more1
47647s/["\\]/\\&/g; s/^/"/; s/$/"\\/
47648p
47649g
47650s/.\{148\}//
47651t nl
47652:delim
47653h
47654s/\(.\{148\}\)..*/\1/
47655t more2
47656s/["\\]/\\&/g; s/^/"/; s/$/"/
47657p
47658b
47659:more2
47660s/["\\]/\\&/g; s/^/"/; s/$/"\\/
47661p
47662g
47663s/.\{148\}//
47664t delim
47665' <conf$$subs.awk | sed '
47666/^[^""]/{
47667 N
47668 s/\n//
47669}
47670' >>$CONFIG_STATUS || ac_write_fail=1
47671rm -f conf$$subs.awk
47672cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47673_ACAWK
47674cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
47675 for (key in S) S_is_set[key] = 1
47676 FS = ""
47677
47678}
47679{
47680 line = $ 0
47681 nfields = split(line, field, "@")
47682 substed = 0
47683 len = length(field[1])
47684 for (i = 2; i < nfields; i++) {
47685 key = field[i]
47686 keylen = length(key)
47687 if (S_is_set[key]) {
47688 value = S[key]
47689 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
47690 len += length(value) + length(field[++i])
47691 substed = 1
47692 } else
47693 len += 1 + keylen
47694 }
47695
47696 print line
47697}
47698
47699_ACAWK
47700_ACEOF
47701cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47702if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
47703 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
47704else
47705 cat
47706fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
47707 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
47708_ACEOF
47709
47710# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
47711# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
47712# trailing colons and then remove the whole line if VPATH becomes empty
47713# (actually we leave an empty line to preserve line numbers).
47714if test "x$srcdir" = x.; then
47715 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
47716h
47717s///
47718s/^/:/
47719s/[ ]*$/:/
47720s/:\$(srcdir):/:/g
47721s/:\${srcdir}:/:/g
47722s/:@srcdir@:/:/g
47723s/^:*//
47724s/:*$//
47725x
47726s/\(=[ ]*\).*/\1/
47727G
47728s/\n//
47729s/^[^=]*=[ ]*$//
47730}'
47731fi
47732
47733cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47734fi # test -n "$CONFIG_FILES"
47735
47736# Set up the scripts for CONFIG_HEADERS section.
47737# No need to generate them if there are no CONFIG_HEADERS.
47738# This happens for instance with `./config.status Makefile'.
47739if test -n "$CONFIG_HEADERS"; then
47740cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
47741BEGIN {
47742_ACEOF
47743
47744# Transform confdefs.h into an awk script `defines.awk', embedded as
47745# here-document in config.status, that substitutes the proper values into
47746# config.h.in to produce config.h.
47747
47748# Create a delimiter string that does not exist in confdefs.h, to ease
47749# handling of long lines.
47750ac_delim='%!_!# '
47751for ac_last_try in false false :; do
47752 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
47753 if test -z "$ac_tt"; then
47754 break
47755 elif $ac_last_try; then
47756 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
47757 else
47758 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
47759 fi
47760done
47761
47762# For the awk script, D is an array of macro values keyed by name,
47763# likewise P contains macro parameters if any. Preserve backslash
47764# newline sequences.
47765
47766ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
47767sed -n '
47768s/.\{148\}/&'"$ac_delim"'/g
47769t rset
47770:rset
47771s/^[ ]*#[ ]*define[ ][ ]*/ /
47772t def
47773d
47774:def
47775s/\\$//
47776t bsnl
47777s/["\\]/\\&/g
47778s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
47779D["\1"]=" \3"/p
47780s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
47781d
47782:bsnl
47783s/["\\]/\\&/g
47784s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
47785D["\1"]=" \3\\\\\\n"\\/p
47786t cont
47787s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
47788t cont
47789d
47790:cont
47791n
47792s/.\{148\}/&'"$ac_delim"'/g
47793t clear
47794:clear
47795s/\\$//
47796t bsnlc
47797s/["\\]/\\&/g; s/^/"/; s/$/"/p
47798d
47799:bsnlc
47800s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
47801b cont
47802' <confdefs.h | sed '
47803s/'"$ac_delim"'/"\\\
47804"/g' >>$CONFIG_STATUS || ac_write_fail=1
47805
47806cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47807 for (key in D) D_is_set[key] = 1
47808 FS = ""
47809}
47810/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
47811 line = \$ 0
47812 split(line, arg, " ")
47813 if (arg[1] == "#") {
47814 defundef = arg[2]
47815 mac1 = arg[3]
47816 } else {
47817 defundef = substr(arg[1], 2)
47818 mac1 = arg[2]
47819 }
47820 split(mac1, mac2, "(") #)
47821 macro = mac2[1]
47822 prefix = substr(line, 1, index(line, defundef) - 1)
47823 if (D_is_set[macro]) {
47824 # Preserve the white space surrounding the "#".
47825 print prefix "define", macro P[macro] D[macro]
47826 next
47827 } else {
47828 # Replace #undef with comments. This is necessary, for example,
47829 # in the case of _POSIX_SOURCE, which is predefined and required
47830 # on some systems where configure will not decide to define it.
47831 if (defundef == "undef") {
47832 print "/*", prefix defundef, macro, "*/"
47833 next
47834 }
47835 }
47836}
47837{ print }
47838_ACAWK
47839_ACEOF
47840cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47841 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
47842fi # test -n "$CONFIG_HEADERS"
47843
47844
47845eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
47846shift
47847for ac_tag
47848do
47849 case $ac_tag in
47850 :[FHLC]) ac_mode=$ac_tag; continue;;
47851 esac
47852 case $ac_mode$ac_tag in
47853 :[FHL]*:*);;
47854 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
47855 :[FH]-) ac_tag=-:-;;
47856 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
47857 esac
47858 ac_save_IFS=$IFS
47859 IFS=:
47860 set x $ac_tag
47861 IFS=$ac_save_IFS
47862 shift
47863 ac_file=$1
47864 shift
47865
47866 case $ac_mode in
47867 :L) ac_source=$1;;
47868 :[FH])
47869 ac_file_inputs=
47870 for ac_f
47871 do
47872 case $ac_f in
47873 -) ac_f="$ac_tmp/stdin";;
47874 *) # Look for the file first in the build tree, then in the source tree
47875 # (if the path is not absolute). The absolute path cannot be DOS-style,
47876 # because $ac_f cannot contain `:'.
47877 test -f "$ac_f" ||
47878 case $ac_f in
47879 [\\/$]*) false;;
47880 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
47881 esac ||
47882 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
47883 esac
Elliott Hughesf344baa2021-12-07 09:12:34 -080047884 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070047885 as_fn_append ac_file_inputs " '$ac_f'"
47886 done
47887
47888 # Let's still pretend it is `configure' which instantiates (i.e., don't
47889 # use $as_me), people would be surprised to read:
47890 # /* config.h. Generated by config.status. */
47891 configure_input='Generated from '`
Elliott Hughesf344baa2021-12-07 09:12:34 -080047892 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Elliott Hughes82be86d2017-09-20 17:00:17 -070047893 `' by configure.'
47894 if test x"$ac_file" != x-; then
47895 configure_input="$ac_file. $configure_input"
Elliott Hughesf344baa2021-12-07 09:12:34 -080047896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
47897printf "%s\n" "$as_me: creating $ac_file" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070047898 fi
47899 # Neutralize special characters interpreted by sed in replacement strings.
47900 case $configure_input in #(
47901 *\&* | *\|* | *\\* )
Elliott Hughesf344baa2021-12-07 09:12:34 -080047902 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
Elliott Hughes82be86d2017-09-20 17:00:17 -070047903 sed 's/[\\\\&|]/\\\\&/g'`;; #(
47904 *) ac_sed_conf_input=$configure_input;;
47905 esac
47906
47907 case $ac_tag in
47908 *:-:* | *:-) cat >"$ac_tmp/stdin" \
47909 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
47910 esac
47911 ;;
47912 esac
47913
47914 ac_dir=`$as_dirname -- "$ac_file" ||
47915$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
47916 X"$ac_file" : 'X\(//\)[^/]' \| \
47917 X"$ac_file" : 'X\(//\)$' \| \
47918 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Elliott Hughesf344baa2021-12-07 09:12:34 -080047919printf "%s\n" X"$ac_file" |
Elliott Hughes82be86d2017-09-20 17:00:17 -070047920 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
47921 s//\1/
47922 q
47923 }
47924 /^X\(\/\/\)[^/].*/{
47925 s//\1/
47926 q
47927 }
47928 /^X\(\/\/\)$/{
47929 s//\1/
47930 q
47931 }
47932 /^X\(\/\).*/{
47933 s//\1/
47934 q
47935 }
47936 s/.*/./; q'`
47937 as_dir="$ac_dir"; as_fn_mkdir_p
47938 ac_builddir=.
47939
47940case "$ac_dir" in
47941.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
47942*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080047943 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Elliott Hughes82be86d2017-09-20 17:00:17 -070047944 # A ".." for each directory in $ac_dir_suffix.
Elliott Hughesf344baa2021-12-07 09:12:34 -080047945 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Elliott Hughes82be86d2017-09-20 17:00:17 -070047946 case $ac_top_builddir_sub in
47947 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
47948 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
47949 esac ;;
47950esac
47951ac_abs_top_builddir=$ac_pwd
47952ac_abs_builddir=$ac_pwd$ac_dir_suffix
47953# for backward compatibility:
47954ac_top_builddir=$ac_top_build_prefix
47955
47956case $srcdir in
47957 .) # We are building in place.
47958 ac_srcdir=.
47959 ac_top_srcdir=$ac_top_builddir_sub
47960 ac_abs_top_srcdir=$ac_pwd ;;
47961 [\\/]* | ?:[\\/]* ) # Absolute name.
47962 ac_srcdir=$srcdir$ac_dir_suffix;
47963 ac_top_srcdir=$srcdir
47964 ac_abs_top_srcdir=$srcdir ;;
47965 *) # Relative name.
47966 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
47967 ac_top_srcdir=$ac_top_build_prefix$srcdir
47968 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
47969esac
47970ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
47971
47972
47973 case $ac_mode in
47974 :F)
47975 #
47976 # CONFIG_FILE
47977 #
47978
47979 case $INSTALL in
47980 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
47981 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
47982 esac
47983 ac_MKDIR_P=$MKDIR_P
47984 case $MKDIR_P in
47985 [\\/$]* | ?:[\\/]* ) ;;
47986 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
47987 esac
47988_ACEOF
47989
47990cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47991# If the template does not know about datarootdir, expand it.
47992# FIXME: This hack should be removed a few years after 2.60.
47993ac_datarootdir_hack=; ac_datarootdir_seen=
47994ac_sed_dataroot='
47995/datarootdir/ {
47996 p
47997 q
47998}
47999/@datadir@/p
48000/@docdir@/p
48001/@infodir@/p
48002/@localedir@/p
48003/@mandir@/p'
48004case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
48005*datarootdir*) ac_datarootdir_seen=yes;;
48006*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080048007 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
48008printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070048009_ACEOF
48010cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
48011 ac_datarootdir_hack='
48012 s&@datadir@&$datadir&g
48013 s&@docdir@&$docdir&g
48014 s&@infodir@&$infodir&g
48015 s&@localedir@&$localedir&g
48016 s&@mandir@&$mandir&g
48017 s&\\\${datarootdir}&$datarootdir&g' ;;
48018esac
48019_ACEOF
48020
48021# Neutralize VPATH when `$srcdir' = `.'.
48022# Shell code in configure.ac might set extrasub.
48023# FIXME: do we really want to maintain this feature?
48024cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
48025ac_sed_extra="$ac_vpsub
48026$extrasub
48027_ACEOF
48028cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
48029:t
48030/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
48031s|@configure_input@|$ac_sed_conf_input|;t t
48032s&@top_builddir@&$ac_top_builddir_sub&;t t
48033s&@top_build_prefix@&$ac_top_build_prefix&;t t
48034s&@srcdir@&$ac_srcdir&;t t
48035s&@abs_srcdir@&$ac_abs_srcdir&;t t
48036s&@top_srcdir@&$ac_top_srcdir&;t t
48037s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
48038s&@builddir@&$ac_builddir&;t t
48039s&@abs_builddir@&$ac_abs_builddir&;t t
48040s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
48041s&@INSTALL@&$ac_INSTALL&;t t
48042s&@MKDIR_P@&$ac_MKDIR_P&;t t
48043$ac_datarootdir_hack
48044"
48045eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
48046 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
48047
48048test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
48049 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
48050 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
48051 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Elliott Hughesf344baa2021-12-07 09:12:34 -080048052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Elliott Hughes82be86d2017-09-20 17:00:17 -070048053which seems to be undefined. Please make sure it is defined" >&5
Elliott Hughesf344baa2021-12-07 09:12:34 -080048054printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Elliott Hughes82be86d2017-09-20 17:00:17 -070048055which seems to be undefined. Please make sure it is defined" >&2;}
48056
48057 rm -f "$ac_tmp/stdin"
48058 case $ac_file in
48059 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
48060 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
48061 esac \
48062 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
48063 ;;
48064 :H)
48065 #
48066 # CONFIG_HEADER
48067 #
48068 if test x"$ac_file" != x-; then
48069 {
Elliott Hughesf344baa2021-12-07 09:12:34 -080048070 printf "%s\n" "/* $configure_input */" >&1 \
Elliott Hughes82be86d2017-09-20 17:00:17 -070048071 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
48072 } >"$ac_tmp/config.h" \
48073 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
48074 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080048075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
48076printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070048077 else
48078 rm -f "$ac_file"
48079 mv "$ac_tmp/config.h" "$ac_file" \
48080 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
48081 fi
48082 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080048083 printf "%s\n" "/* $configure_input */" >&1 \
Elliott Hughes82be86d2017-09-20 17:00:17 -070048084 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
48085 || as_fn_error $? "could not create -" "$LINENO" 5
48086 fi
48087# Compute "$ac_file"'s index in $config_headers.
48088_am_arg="$ac_file"
48089_am_stamp_count=1
48090for _am_header in $config_headers :; do
48091 case $_am_header in
48092 $_am_arg | $_am_arg:* )
48093 break ;;
48094 * )
48095 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
48096 esac
48097done
48098echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
48099$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
48100 X"$_am_arg" : 'X\(//\)[^/]' \| \
48101 X"$_am_arg" : 'X\(//\)$' \| \
48102 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
Elliott Hughesf344baa2021-12-07 09:12:34 -080048103printf "%s\n" X"$_am_arg" |
Elliott Hughes82be86d2017-09-20 17:00:17 -070048104 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
48105 s//\1/
48106 q
48107 }
48108 /^X\(\/\/\)[^/].*/{
48109 s//\1/
48110 q
48111 }
48112 /^X\(\/\/\)$/{
48113 s//\1/
48114 q
48115 }
48116 /^X\(\/\).*/{
48117 s//\1/
48118 q
48119 }
48120 s/.*/./; q'`/stamp-h$_am_stamp_count
48121 ;;
48122
Elliott Hughesf344baa2021-12-07 09:12:34 -080048123 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
48124printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070048125 ;;
48126 esac
48127
48128
48129 case $ac_file$ac_mode in
48130 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
48131 # Older Autoconf quotes --file arguments for eval, but not when files
48132 # are listed without --file. Let's play safe and only enable the eval
48133 # if we detect the quoting.
Haibo Huang001784b2019-07-19 05:27:28 -070048134 # TODO: see whether this extra hack can be removed once we start
48135 # requiring Autoconf 2.70 or later.
48136 case $CONFIG_FILES in #(
48137 *\'*) :
48138 eval set x "$CONFIG_FILES" ;; #(
48139 *) :
48140 set x $CONFIG_FILES ;; #(
48141 *) :
48142 ;;
48143esac
Elliott Hughes82be86d2017-09-20 17:00:17 -070048144 shift
Haibo Huang001784b2019-07-19 05:27:28 -070048145 # Used to flag and report bootstrapping failures.
48146 am_rc=0
48147 for am_mf
Elliott Hughes82be86d2017-09-20 17:00:17 -070048148 do
48149 # Strip MF so we end up with the name of the file.
Elliott Hughesf344baa2021-12-07 09:12:34 -080048150 am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
Haibo Huang001784b2019-07-19 05:27:28 -070048151 # Check whether this is an Automake generated Makefile which includes
48152 # dependency-tracking related rules and includes.
48153 # Grep'ing the whole file directly is not great: AIX grep has a line
Elliott Hughes82be86d2017-09-20 17:00:17 -070048154 # limit of 2048, but all sed's we know have understand at least 4000.
Haibo Huang001784b2019-07-19 05:27:28 -070048155 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
48156 || continue
48157 am_dirpart=`$as_dirname -- "$am_mf" ||
48158$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
48159 X"$am_mf" : 'X\(//\)[^/]' \| \
48160 X"$am_mf" : 'X\(//\)$' \| \
48161 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
Elliott Hughesf344baa2021-12-07 09:12:34 -080048162printf "%s\n" X"$am_mf" |
Elliott Hughes82be86d2017-09-20 17:00:17 -070048163 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
48164 s//\1/
48165 q
48166 }
48167 /^X\(\/\/\)[^/].*/{
48168 s//\1/
48169 q
48170 }
48171 /^X\(\/\/\)$/{
48172 s//\1/
48173 q
48174 }
48175 /^X\(\/\).*/{
48176 s//\1/
48177 q
48178 }
48179 s/.*/./; q'`
Haibo Huang001784b2019-07-19 05:27:28 -070048180 am_filepart=`$as_basename -- "$am_mf" ||
48181$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
48182 X"$am_mf" : 'X\(//\)$' \| \
48183 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
Elliott Hughesf344baa2021-12-07 09:12:34 -080048184printf "%s\n" X/"$am_mf" |
Haibo Huang001784b2019-07-19 05:27:28 -070048185 sed '/^.*\/\([^/][^/]*\)\/*$/{
Elliott Hughes82be86d2017-09-20 17:00:17 -070048186 s//\1/
48187 q
48188 }
Haibo Huang001784b2019-07-19 05:27:28 -070048189 /^X\/\(\/\/\)$/{
Elliott Hughes82be86d2017-09-20 17:00:17 -070048190 s//\1/
48191 q
48192 }
Haibo Huang001784b2019-07-19 05:27:28 -070048193 /^X\/\(\/\).*/{
Elliott Hughes82be86d2017-09-20 17:00:17 -070048194 s//\1/
48195 q
48196 }
48197 s/.*/./; q'`
Haibo Huang001784b2019-07-19 05:27:28 -070048198 { echo "$as_me:$LINENO: cd "$am_dirpart" \
48199 && sed -e '/# am--include-marker/d' "$am_filepart" \
48200 | $MAKE -f - am--depfiles" >&5
48201 (cd "$am_dirpart" \
48202 && sed -e '/# am--include-marker/d' "$am_filepart" \
48203 | $MAKE -f - am--depfiles) >&5 2>&5
48204 ac_status=$?
48205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
48206 (exit $ac_status); } || am_rc=$?
Elliott Hughes82be86d2017-09-20 17:00:17 -070048207 done
Haibo Huang001784b2019-07-19 05:27:28 -070048208 if test $am_rc -ne 0; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080048209 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48210printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Haibo Huang001784b2019-07-19 05:27:28 -070048211as_fn_error $? "Something went wrong bootstrapping makefile fragments
Haibo Huangc3c04f42020-08-19 13:00:07 -070048212 for automatic dependency tracking. If GNU make was not used, consider
48213 re-running the configure script with MAKE=\"gmake\" (or whatever is
48214 necessary). You can also try re-running configure with the
Haibo Huang001784b2019-07-19 05:27:28 -070048215 '--disable-dependency-tracking' option to at least be able to build
48216 the package (albeit without support for automatic dependency tracking).
48217See \`config.log' for more details" "$LINENO" 5; }
48218 fi
48219 { am_dirpart=; unset am_dirpart;}
48220 { am_filepart=; unset am_filepart;}
48221 { am_mf=; unset am_mf;}
48222 { am_rc=; unset am_rc;}
48223 rm -f conftest-deps.mk
Elliott Hughes82be86d2017-09-20 17:00:17 -070048224}
48225 ;;
48226 "libtool":C)
48227
48228 # See if we are running on zsh, and set the options that allow our
48229 # commands through without removal of \ escapes.
48230 if test -n "${ZSH_VERSION+set}"; then
48231 setopt NO_GLOB_SUBST
48232 fi
48233
48234 cfgfile=${ofile}T
48235 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
48236 $RM "$cfgfile"
48237
48238 cat <<_LT_EOF >> "$cfgfile"
48239#! $SHELL
48240# Generated automatically by $as_me ($PACKAGE) $VERSION
48241# NOTE: Changes made to this file will be lost: look at ltmain.sh.
48242
48243# Provide generalized library-building support services.
48244# Written by Gordon Matzigkeit, 1996
48245
48246# Copyright (C) 2014 Free Software Foundation, Inc.
48247# This is free software; see the source for copying conditions. There is NO
48248# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48249
48250# GNU Libtool is free software; you can redistribute it and/or modify
48251# it under the terms of the GNU General Public License as published by
48252# the Free Software Foundation; either version 2 of of the License, or
48253# (at your option) any later version.
48254#
48255# As a special exception to the GNU General Public License, if you
48256# distribute this file as part of a program or library that is built
48257# using GNU Libtool, you may include this file under the same
48258# distribution terms that you use for the rest of that program.
48259#
48260# GNU Libtool is distributed in the hope that it will be useful, but
48261# WITHOUT ANY WARRANTY; without even the implied warranty of
48262# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48263# GNU General Public License for more details.
48264#
48265# You should have received a copy of the GNU General Public License
48266# along with this program. If not, see <http://www.gnu.org/licenses/>.
48267
48268
48269# The names of the tagged configurations supported by this script.
48270available_tags=''
48271
48272# Configured defaults for sys_lib_dlsearch_path munging.
48273: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
48274
48275# ### BEGIN LIBTOOL CONFIG
48276
48277# Which release of libtool.m4 was used?
48278macro_version=$macro_version
48279macro_revision=$macro_revision
48280
48281# Assembler program.
48282AS=$lt_AS
48283
48284# DLL creation program.
48285DLLTOOL=$lt_DLLTOOL
48286
48287# Object dumper program.
48288OBJDUMP=$lt_OBJDUMP
48289
48290# Whether or not to build shared libraries.
48291build_libtool_libs=$enable_shared
48292
48293# Whether or not to build static libraries.
48294build_old_libs=$enable_static
48295
48296# What type of objects to build.
48297pic_mode=$pic_mode
48298
48299# Whether or not to optimize for fast installation.
48300fast_install=$enable_fast_install
48301
48302# Shared archive member basename,for filename based shared library versioning on AIX.
48303shared_archive_member_spec=$shared_archive_member_spec
48304
48305# Shell to use when invoking shell scripts.
48306SHELL=$lt_SHELL
48307
48308# An echo program that protects backslashes.
48309ECHO=$lt_ECHO
48310
48311# The PATH separator for the build system.
48312PATH_SEPARATOR=$lt_PATH_SEPARATOR
48313
48314# The host system.
48315host_alias=$host_alias
48316host=$host
48317host_os=$host_os
48318
48319# The build system.
48320build_alias=$build_alias
48321build=$build
48322build_os=$build_os
48323
48324# A sed program that does not truncate output.
48325SED=$lt_SED
48326
48327# Sed that helps us avoid accidentally triggering echo(1) options like -n.
48328Xsed="\$SED -e 1s/^X//"
48329
48330# A grep program that handles long lines.
48331GREP=$lt_GREP
48332
48333# An ERE matcher.
48334EGREP=$lt_EGREP
48335
48336# A literal string matcher.
48337FGREP=$lt_FGREP
48338
48339# A BSD- or MS-compatible name lister.
48340NM=$lt_NM
48341
48342# Whether we need soft or hard links.
48343LN_S=$lt_LN_S
48344
48345# What is the maximum length of a command?
48346max_cmd_len=$max_cmd_len
48347
48348# Object file suffix (normally "o").
48349objext=$ac_objext
48350
48351# Executable file suffix (normally "").
48352exeext=$exeext
48353
48354# whether the shell understands "unset".
48355lt_unset=$lt_unset
48356
48357# turn spaces into newlines.
48358SP2NL=$lt_lt_SP2NL
48359
48360# turn newlines into spaces.
48361NL2SP=$lt_lt_NL2SP
48362
48363# convert \$build file names to \$host format.
48364to_host_file_cmd=$lt_cv_to_host_file_cmd
48365
48366# convert \$build files to toolchain format.
48367to_tool_file_cmd=$lt_cv_to_tool_file_cmd
48368
48369# Method to check whether dependent libraries are shared objects.
48370deplibs_check_method=$lt_deplibs_check_method
48371
48372# Command to use when deplibs_check_method = "file_magic".
48373file_magic_cmd=$lt_file_magic_cmd
48374
48375# How to find potential files when deplibs_check_method = "file_magic".
48376file_magic_glob=$lt_file_magic_glob
48377
48378# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
48379want_nocaseglob=$lt_want_nocaseglob
48380
48381# Command to associate shared and link libraries.
48382sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
48383
48384# The archiver.
48385AR=$lt_AR
48386
48387# Flags to create an archive.
48388AR_FLAGS=$lt_AR_FLAGS
48389
48390# How to feed a file listing to the archiver.
48391archiver_list_spec=$lt_archiver_list_spec
48392
48393# A symbol stripping program.
48394STRIP=$lt_STRIP
48395
48396# Commands used to install an old-style archive.
48397RANLIB=$lt_RANLIB
48398old_postinstall_cmds=$lt_old_postinstall_cmds
48399old_postuninstall_cmds=$lt_old_postuninstall_cmds
48400
48401# Whether to use a lock for old archive extraction.
48402lock_old_archive_extraction=$lock_old_archive_extraction
48403
48404# A C compiler.
48405LTCC=$lt_CC
48406
48407# LTCC compiler flags.
48408LTCFLAGS=$lt_CFLAGS
48409
48410# Take the output of nm and produce a listing of raw symbols and C names.
48411global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
48412
48413# Transform the output of nm in a proper C declaration.
48414global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
48415
48416# Transform the output of nm into a list of symbols to manually relocate.
48417global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
48418
48419# Transform the output of nm in a C name address pair.
48420global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
48421
48422# Transform the output of nm in a C name address pair when lib prefix is needed.
48423global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
48424
48425# The name lister interface.
48426nm_interface=$lt_lt_cv_nm_interface
48427
48428# Specify filename containing input files for \$NM.
48429nm_file_list_spec=$lt_nm_file_list_spec
48430
48431# The root where to search for dependent libraries,and where our libraries should be installed.
48432lt_sysroot=$lt_sysroot
48433
48434# Command to truncate a binary pipe.
48435lt_truncate_bin=$lt_lt_cv_truncate_bin
48436
48437# The name of the directory that contains temporary libtool files.
48438objdir=$objdir
48439
48440# Used to examine libraries when file_magic_cmd begins with "file".
48441MAGIC_CMD=$MAGIC_CMD
48442
48443# Must we lock files when doing compilation?
48444need_locks=$lt_need_locks
48445
48446# Manifest tool.
48447MANIFEST_TOOL=$lt_MANIFEST_TOOL
48448
48449# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
48450DSYMUTIL=$lt_DSYMUTIL
48451
48452# Tool to change global to local symbols on Mac OS X.
48453NMEDIT=$lt_NMEDIT
48454
48455# Tool to manipulate fat objects and archives on Mac OS X.
48456LIPO=$lt_LIPO
48457
48458# ldd/readelf like tool for Mach-O binaries on Mac OS X.
48459OTOOL=$lt_OTOOL
48460
48461# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
48462OTOOL64=$lt_OTOOL64
48463
48464# Old archive suffix (normally "a").
48465libext=$libext
48466
48467# Shared library suffix (normally ".so").
48468shrext_cmds=$lt_shrext_cmds
48469
48470# The commands to extract the exported symbol list from a shared archive.
48471extract_expsyms_cmds=$lt_extract_expsyms_cmds
48472
48473# Variables whose values should be saved in libtool wrapper scripts and
48474# restored at link time.
48475variables_saved_for_relink=$lt_variables_saved_for_relink
48476
48477# Do we need the "lib" prefix for modules?
48478need_lib_prefix=$need_lib_prefix
48479
48480# Do we need a version for libraries?
48481need_version=$need_version
48482
48483# Library versioning type.
48484version_type=$version_type
48485
48486# Shared library runtime path variable.
48487runpath_var=$runpath_var
48488
48489# Shared library path variable.
48490shlibpath_var=$shlibpath_var
48491
48492# Is shlibpath searched before the hard-coded library search path?
48493shlibpath_overrides_runpath=$shlibpath_overrides_runpath
48494
48495# Format of library name prefix.
48496libname_spec=$lt_libname_spec
48497
48498# List of archive names. First name is the real one, the rest are links.
48499# The last name is the one that the linker finds with -lNAME
48500library_names_spec=$lt_library_names_spec
48501
48502# The coded name of the library, if different from the real name.
48503soname_spec=$lt_soname_spec
48504
48505# Permission mode override for installation of shared libraries.
48506install_override_mode=$lt_install_override_mode
48507
48508# Command to use after installation of a shared archive.
48509postinstall_cmds=$lt_postinstall_cmds
48510
48511# Command to use after uninstallation of a shared archive.
48512postuninstall_cmds=$lt_postuninstall_cmds
48513
48514# Commands used to finish a libtool library installation in a directory.
48515finish_cmds=$lt_finish_cmds
48516
48517# As "finish_cmds", except a single script fragment to be evaled but
48518# not shown.
48519finish_eval=$lt_finish_eval
48520
48521# Whether we should hardcode library paths into libraries.
48522hardcode_into_libs=$hardcode_into_libs
48523
48524# Compile-time system search path for libraries.
48525sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
48526
48527# Detected run-time system search path for libraries.
48528sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
48529
48530# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
48531configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
48532
48533# Whether dlopen is supported.
48534dlopen_support=$enable_dlopen
48535
48536# Whether dlopen of programs is supported.
48537dlopen_self=$enable_dlopen_self
48538
48539# Whether dlopen of statically linked programs is supported.
48540dlopen_self_static=$enable_dlopen_self_static
48541
48542# Commands to strip libraries.
48543old_striplib=$lt_old_striplib
48544striplib=$lt_striplib
48545
48546
48547# The linker used to build libraries.
48548LD=$lt_LD
48549
48550# How to create reloadable object files.
48551reload_flag=$lt_reload_flag
48552reload_cmds=$lt_reload_cmds
48553
48554# Commands used to build an old-style archive.
48555old_archive_cmds=$lt_old_archive_cmds
48556
48557# A language specific compiler.
48558CC=$lt_compiler
48559
48560# Is the compiler the GNU compiler?
48561with_gcc=$GCC
48562
48563# Compiler flag to turn off builtin functions.
48564no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
48565
48566# Additional compiler flags for building library objects.
48567pic_flag=$lt_lt_prog_compiler_pic
48568
48569# How to pass a linker flag through the compiler.
48570wl=$lt_lt_prog_compiler_wl
48571
48572# Compiler flag to prevent dynamic linking.
48573link_static_flag=$lt_lt_prog_compiler_static
48574
48575# Does compiler simultaneously support -c and -o options?
48576compiler_c_o=$lt_lt_cv_prog_compiler_c_o
48577
48578# Whether or not to add -lc for building shared libraries.
48579build_libtool_need_lc=$archive_cmds_need_lc
48580
48581# Whether or not to disallow shared libs when runtime libs are static.
48582allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
48583
48584# Compiler flag to allow reflexive dlopens.
48585export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
48586
48587# Compiler flag to generate shared objects directly from archives.
48588whole_archive_flag_spec=$lt_whole_archive_flag_spec
48589
48590# Whether the compiler copes with passing no objects directly.
48591compiler_needs_object=$lt_compiler_needs_object
48592
48593# Create an old-style archive from a shared archive.
48594old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
48595
48596# Create a temporary old-style archive to link instead of a shared archive.
48597old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
48598
48599# Commands used to build a shared archive.
48600archive_cmds=$lt_archive_cmds
48601archive_expsym_cmds=$lt_archive_expsym_cmds
48602
48603# Commands used to build a loadable module if different from building
48604# a shared archive.
48605module_cmds=$lt_module_cmds
48606module_expsym_cmds=$lt_module_expsym_cmds
48607
48608# Whether we are building with GNU ld or not.
48609with_gnu_ld=$lt_with_gnu_ld
48610
48611# Flag that allows shared libraries with undefined symbols to be built.
48612allow_undefined_flag=$lt_allow_undefined_flag
48613
48614# Flag that enforces no undefined symbols.
48615no_undefined_flag=$lt_no_undefined_flag
48616
48617# Flag to hardcode \$libdir into a binary during linking.
48618# This must work even if \$libdir does not exist
48619hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
48620
48621# Whether we need a single "-rpath" flag with a separated argument.
48622hardcode_libdir_separator=$lt_hardcode_libdir_separator
48623
48624# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
48625# DIR into the resulting binary.
48626hardcode_direct=$hardcode_direct
48627
48628# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
48629# DIR into the resulting binary and the resulting library dependency is
48630# "absolute",i.e impossible to change by setting \$shlibpath_var if the
48631# library is relocated.
48632hardcode_direct_absolute=$hardcode_direct_absolute
48633
48634# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
48635# into the resulting binary.
48636hardcode_minus_L=$hardcode_minus_L
48637
48638# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
48639# into the resulting binary.
48640hardcode_shlibpath_var=$hardcode_shlibpath_var
48641
48642# Set to "yes" if building a shared library automatically hardcodes DIR
48643# into the library and all subsequent libraries and executables linked
48644# against it.
48645hardcode_automatic=$hardcode_automatic
48646
48647# Set to yes if linker adds runtime paths of dependent libraries
48648# to runtime path list.
48649inherit_rpath=$inherit_rpath
48650
48651# Whether libtool must link a program against all its dependency libraries.
48652link_all_deplibs=$link_all_deplibs
48653
48654# Set to "yes" if exported symbols are required.
48655always_export_symbols=$always_export_symbols
48656
48657# The commands to list exported symbols.
48658export_symbols_cmds=$lt_export_symbols_cmds
48659
48660# Symbols that should not be listed in the preloaded symbols.
48661exclude_expsyms=$lt_exclude_expsyms
48662
48663# Symbols that must always be exported.
48664include_expsyms=$lt_include_expsyms
48665
48666# Commands necessary for linking programs (against libraries) with templates.
48667prelink_cmds=$lt_prelink_cmds
48668
48669# Commands necessary for finishing linking programs.
48670postlink_cmds=$lt_postlink_cmds
48671
48672# Specify filename containing input files.
48673file_list_spec=$lt_file_list_spec
48674
48675# How to hardcode a shared library path into an executable.
48676hardcode_action=$hardcode_action
48677
48678# ### END LIBTOOL CONFIG
48679
48680_LT_EOF
48681
48682 cat <<'_LT_EOF' >> "$cfgfile"
48683
48684# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
48685
48686# func_munge_path_list VARIABLE PATH
48687# -----------------------------------
48688# VARIABLE is name of variable containing _space_ separated list of
48689# directories to be munged by the contents of PATH, which is string
48690# having a format:
48691# "DIR[:DIR]:"
48692# string "DIR[ DIR]" will be prepended to VARIABLE
48693# ":DIR[:DIR]"
48694# string "DIR[ DIR]" will be appended to VARIABLE
48695# "DIRP[:DIRP]::[DIRA:]DIRA"
48696# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
48697# "DIRA[ DIRA]" will be appended to VARIABLE
48698# "DIR[:DIR]"
48699# VARIABLE will be replaced by "DIR[ DIR]"
48700func_munge_path_list ()
48701{
48702 case x$2 in
48703 x)
48704 ;;
48705 *:)
48706 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
48707 ;;
48708 x:*)
48709 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
48710 ;;
48711 *::*)
48712 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
48713 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
48714 ;;
48715 *)
48716 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
48717 ;;
48718 esac
48719}
48720
48721
48722# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
48723func_cc_basename ()
48724{
48725 for cc_temp in $*""; do
48726 case $cc_temp in
48727 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
48728 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
48729 \-*) ;;
48730 *) break;;
48731 esac
48732 done
48733 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
48734}
48735
48736
48737# ### END FUNCTIONS SHARED WITH CONFIGURE
48738
48739_LT_EOF
48740
48741 case $host_os in
48742 aix3*)
48743 cat <<\_LT_EOF >> "$cfgfile"
48744# AIX sometimes has problems with the GCC collect2 program. For some
48745# reason, if we set the COLLECT_NAMES environment variable, the problems
48746# vanish in a puff of smoke.
48747if test set != "${COLLECT_NAMES+set}"; then
48748 COLLECT_NAMES=
48749 export COLLECT_NAMES
48750fi
48751_LT_EOF
48752 ;;
48753 esac
48754
48755
Elliott Hughesf344baa2021-12-07 09:12:34 -080048756
Elliott Hughes82be86d2017-09-20 17:00:17 -070048757ltmain=$ac_aux_dir/ltmain.sh
48758
48759
48760 # We use sed instead of cat because bash on DJGPP gets confused if
48761 # if finds mixed CR/LF and LF-only lines. Since sed operates in
48762 # text mode, it properly converts lines to CR/LF. This bash problem
48763 # is reportedly fixed, but why not run on old versions too?
48764 sed '$q' "$ltmain" >> "$cfgfile" \
48765 || (rm -f "$cfgfile"; exit 1)
48766
48767 mv -f "$cfgfile" "$ofile" ||
48768 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
48769 chmod +x "$ofile"
48770
48771 ;;
48772
48773 esac
48774done # for ac_tag
48775
48776
48777as_fn_exit 0
48778_ACEOF
48779ac_clean_files=$ac_clean_files_save
48780
48781test $ac_write_fail = 0 ||
48782 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
48783
48784
48785# configure is writing to config.log, and then calls config.status.
48786# config.status does its own redirection, appending to config.log.
48787# Unfortunately, on DOS this fails, as config.log is still kept open
48788# by configure, so config.status won't be able to write to it; its
48789# output is simply discarded. So we exec the FD to /dev/null,
48790# effectively closing config.log, so it can be properly (re)opened and
48791# appended to by config.status. When coming back to configure, we
48792# need to make the FD available again.
48793if test "$no_create" != yes; then
48794 ac_cs_success=:
48795 ac_config_status_args=
48796 test "$silent" = yes &&
48797 ac_config_status_args="$ac_config_status_args --quiet"
48798 exec 5>/dev/null
48799 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
48800 exec 5>>config.log
48801 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
48802 # would make configure fail if this is the last instruction.
48803 $ac_cs_success || as_fn_exit 1
48804fi
48805
48806#
48807# CONFIG_SUBDIRS section.
48808#
48809if test "$no_recursion" != yes; then
48810
48811 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
48812 # so they do not pile up.
48813 ac_sub_configure_args=
48814 ac_prev=
48815 eval "set x $ac_configure_args"
48816 shift
48817 for ac_arg
48818 do
48819 if test -n "$ac_prev"; then
48820 ac_prev=
48821 continue
48822 fi
48823 case $ac_arg in
48824 -cache-file | --cache-file | --cache-fil | --cache-fi \
48825 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
48826 ac_prev=cache_file ;;
48827 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
48828 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
48829 | --c=*)
48830 ;;
48831 --config-cache | -C)
48832 ;;
48833 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
48834 ac_prev=srcdir ;;
48835 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
48836 ;;
48837 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
48838 ac_prev=prefix ;;
48839 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
48840 ;;
48841 --disable-option-checking)
48842 ;;
48843 *)
48844 case $ac_arg in
Elliott Hughesf344baa2021-12-07 09:12:34 -080048845 *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070048846 esac
48847 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
48848 esac
48849 done
48850
48851 # Always prepend --prefix to ensure using the same prefix
48852 # in subdir configurations.
48853 ac_arg="--prefix=$prefix"
48854 case $ac_arg in
Elliott Hughesf344baa2021-12-07 09:12:34 -080048855 *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Elliott Hughes82be86d2017-09-20 17:00:17 -070048856 esac
48857 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
48858
48859 # Pass --silent
48860 if test "$silent" = yes; then
48861 ac_sub_configure_args="--silent $ac_sub_configure_args"
48862 fi
48863
48864 # Always prepend --disable-option-checking to silence warnings, since
48865 # different subdirs can have different --enable and --with options.
48866 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
48867
48868 ac_popdir=`pwd`
48869 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
48870
48871 # Do not complain, so a configure script can configure whichever
48872 # parts of a large source tree are present.
48873 test -d "$srcdir/$ac_dir" || continue
48874
48875 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
Elliott Hughesf344baa2021-12-07 09:12:34 -080048876 printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
48877 printf "%s\n" "$ac_msg" >&6
Elliott Hughes82be86d2017-09-20 17:00:17 -070048878 as_dir="$ac_dir"; as_fn_mkdir_p
48879 ac_builddir=.
48880
48881case "$ac_dir" in
48882.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
48883*)
Elliott Hughesf344baa2021-12-07 09:12:34 -080048884 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Elliott Hughes82be86d2017-09-20 17:00:17 -070048885 # A ".." for each directory in $ac_dir_suffix.
Elliott Hughesf344baa2021-12-07 09:12:34 -080048886 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Elliott Hughes82be86d2017-09-20 17:00:17 -070048887 case $ac_top_builddir_sub in
48888 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
48889 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
48890 esac ;;
48891esac
48892ac_abs_top_builddir=$ac_pwd
48893ac_abs_builddir=$ac_pwd$ac_dir_suffix
48894# for backward compatibility:
48895ac_top_builddir=$ac_top_build_prefix
48896
48897case $srcdir in
48898 .) # We are building in place.
48899 ac_srcdir=.
48900 ac_top_srcdir=$ac_top_builddir_sub
48901 ac_abs_top_srcdir=$ac_pwd ;;
48902 [\\/]* | ?:[\\/]* ) # Absolute name.
48903 ac_srcdir=$srcdir$ac_dir_suffix;
48904 ac_top_srcdir=$srcdir
48905 ac_abs_top_srcdir=$srcdir ;;
48906 *) # Relative name.
48907 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
48908 ac_top_srcdir=$ac_top_build_prefix$srcdir
48909 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
48910esac
48911ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
48912
48913
48914 cd "$ac_dir"
48915
Elliott Hughesf344baa2021-12-07 09:12:34 -080048916 # Check for configure.gnu first; this name is used for a wrapper for
48917 # Metaconfig's "Configure" on case-insensitive file systems.
Elliott Hughes82be86d2017-09-20 17:00:17 -070048918 if test -f "$ac_srcdir/configure.gnu"; then
48919 ac_sub_configure=$ac_srcdir/configure.gnu
48920 elif test -f "$ac_srcdir/configure"; then
48921 ac_sub_configure=$ac_srcdir/configure
Elliott Hughes82be86d2017-09-20 17:00:17 -070048922 else
Elliott Hughesf344baa2021-12-07 09:12:34 -080048923 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
48924printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070048925 ac_sub_configure=
48926 fi
48927
48928 # The recursion is here.
48929 if test -n "$ac_sub_configure"; then
48930 # Make the cache file name correct relative to the subdirectory.
48931 case $cache_file in
48932 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
48933 *) # Relative name.
48934 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
48935 esac
48936
Elliott Hughesf344baa2021-12-07 09:12:34 -080048937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
48938printf "%s\n" "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070048939 # The eval makes quoting arguments work.
48940 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
48941 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
48942 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
48943 fi
48944
48945 cd "$ac_popdir"
48946 done
48947fi
48948if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Elliott Hughesf344baa2021-12-07 09:12:34 -080048949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
48950printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070048951fi
48952
48953
48954
48955 tmp_cpp=`eval echo "$ac_cpp" 2>/dev/null`
48956 if test -z "$tmp_cpp"; then
48957 tmp_cpp='cpp'
48958 fi
48959 cat >./tests/configurehelp.pm <<_EOF
48960# This is a generated file. Do not edit.
48961
48962package configurehelp;
48963
48964use strict;
48965use warnings;
48966use Exporter;
48967
48968use vars qw(
48969 @ISA
48970 @EXPORT_OK
48971 \$Cpreprocessor
48972 );
48973
48974@ISA = qw(Exporter);
48975
48976@EXPORT_OK = qw(
48977 \$Cpreprocessor
48978 );
48979
48980\$Cpreprocessor = '$tmp_cpp';
48981
489821;
48983_EOF
48984
48985
48986
48987## ---------------------------------- ##
48988## Start of distclean amending code ##
48989## ---------------------------------- ##
48990
48991for xc_subdir in lib src tests/unit tests/server tests/libtest docs/examples
48992do
48993
48994if test ! -f "$xc_subdir/Makefile"; then
48995 echo "$xc_msg_err $xc_subdir/Makefile file not found. $xc_msg_abrt" >&2
48996 exit 1
48997fi
48998
48999# Fetch dependency tracking file list from Makefile include lines.
49000
49001xc_inc_lines=`grep '^include .*(DEPDIR)' "$xc_subdir/Makefile" 2>/dev/null`
49002xc_cnt_words=`echo "$xc_inc_lines" | wc -w | tr -d "$xc_space$xc_tab"`
49003
49004# --disable-dependency-tracking might have been used, consequently
49005# there is nothing to amend without a dependency tracking file list.
49006
49007if test $xc_cnt_words -gt 0; then
49008
Elliott Hughesf344baa2021-12-07 09:12:34 -080049009{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: amending $xc_subdir/Makefile" >&5
49010printf "%s\n" "$as_me: amending $xc_subdir/Makefile" >&6;}
Elliott Hughes82be86d2017-09-20 17:00:17 -070049011
49012# Build Makefile specific patch hunk.
49013
49014xc_p="$xc_subdir/xc_patch.tmp"
49015
49016xc_rm_depfiles=`echo "$xc_inc_lines" \
49017 | $SED 's%include% -rm -f%' 2>/dev/null`
49018
49019xc_dep_subdirs=`echo "$xc_inc_lines" \
49020 | $SED 's%include[ ][ ]*%%' 2>/dev/null \
49021 | $SED 's%(DEPDIR)/.*%(DEPDIR)%' 2>/dev/null \
49022 | sort | uniq`
49023
49024echo "$xc_rm_depfiles" >$xc_p
49025
49026for xc_dep_dir in $xc_dep_subdirs; do
49027 echo "${xc_tab}@xm_dep_cnt=\`ls $xc_dep_dir | wc -l 2>/dev/null\`; \\" >>$xc_p
49028 echo "${xc_tab}if test \$\$xm_dep_cnt -eq 0 && test -d $xc_dep_dir; then \\" >>$xc_p
49029 echo "${xc_tab} rm -rf $xc_dep_dir; \\" >>$xc_p
49030 echo "${xc_tab}fi" >>$xc_p
49031done
49032
49033# Build Makefile patching sed scripts.
49034
49035xc_s1="$xc_subdir/xc_script_1.tmp"
49036xc_s2="$xc_subdir/xc_script_2.tmp"
49037xc_s3="$xc_subdir/xc_script_3.tmp"
49038
49039cat >$xc_s1 <<\_EOT
49040/^distclean[ ]*:/,/^[^ ][^ ]*:/{
49041 s/^.*(DEPDIR)/___xc_depdir_line___/
49042}
49043/^maintainer-clean[ ]*:/,/^[^ ][^ ]*:/{
49044 s/^.*(DEPDIR)/___xc_depdir_line___/
49045}
49046_EOT
49047
49048cat >$xc_s2 <<\_EOT
49049/___xc_depdir_line___$/{
49050 N
49051 /___xc_depdir_line___$/D
49052}
49053_EOT
49054
49055cat >$xc_s3 <<_EOT
49056/^___xc_depdir_line___/{
49057 r $xc_p
49058 d
49059}
49060_EOT
49061
49062# Apply patch to Makefile and cleanup.
49063
49064$SED -f "$xc_s1" "$xc_subdir/Makefile" >"$xc_subdir/Makefile.tmp1"
49065$SED -f "$xc_s2" "$xc_subdir/Makefile.tmp1" >"$xc_subdir/Makefile.tmp2"
49066$SED -f "$xc_s3" "$xc_subdir/Makefile.tmp2" >"$xc_subdir/Makefile.tmp3"
49067
49068if test -f "$xc_subdir/Makefile.tmp3"; then
49069 mv -f "$xc_subdir/Makefile.tmp3" "$xc_subdir/Makefile"
49070fi
49071
49072test -f "$xc_subdir/Makefile.tmp1" && rm -f "$xc_subdir/Makefile.tmp1"
49073test -f "$xc_subdir/Makefile.tmp2" && rm -f "$xc_subdir/Makefile.tmp2"
49074test -f "$xc_subdir/Makefile.tmp3" && rm -f "$xc_subdir/Makefile.tmp3"
49075
49076test -f "$xc_p" && rm -f "$xc_p"
49077test -f "$xc_s1" && rm -f "$xc_s1"
49078test -f "$xc_s2" && rm -f "$xc_s2"
49079test -f "$xc_s3" && rm -f "$xc_s3"
49080
49081fi
49082
49083done
49084
49085## -------------------------------- ##
49086## End of distclean amending code ##
49087## -------------------------------- ##
49088
49089
49090
Elliott Hughesf344baa2021-12-07 09:12:34 -080049091{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Configured to build curl/libcurl:
Elliott Hughes82be86d2017-09-20 17:00:17 -070049092
Elliott Hughes82be86d2017-09-20 17:00:17 -070049093 Host setup: ${host}
49094 Install prefix: ${prefix}
49095 Compiler: ${CC}
Haibo Huang21926d52019-01-08 14:27:10 -080049096 CFLAGS: ${CFLAGS}
49097 CPPFLAGS: ${CPPFLAGS}
49098 LDFLAGS: ${LDFLAGS}
49099 LIBS: ${LIBS}
49100
49101 curl version: ${CURLVERSION}
Haibo Huang65021c72019-03-27 15:37:23 -070049102 SSL: ${curl_ssl_msg}
49103 SSH: ${curl_ssh_msg}
49104 zlib: ${curl_zlib_msg}
49105 brotli: ${curl_brotli_msg}
Haibo Huangc3c04f42020-08-19 13:00:07 -070049106 zstd: ${curl_zstd_msg}
Haibo Huang65021c72019-03-27 15:37:23 -070049107 GSS-API: ${curl_gss_msg}
Elliott Hughes34dd5f42021-08-10 13:01:18 -070049108 GSASL: ${curl_gsasl_msg}
Haibo Huang65021c72019-03-27 15:37:23 -070049109 TLS-SRP: ${curl_tls_srp_msg}
Elliott Hughes82be86d2017-09-20 17:00:17 -070049110 resolver: ${curl_res_msg}
Haibo Huang65021c72019-03-27 15:37:23 -070049111 IPv6: ${curl_ipv6_msg}
49112 Unix sockets: ${curl_unix_sockets_msg}
49113 IDN: ${curl_idn_msg}
Elliott Hughes82be86d2017-09-20 17:00:17 -070049114 Build libcurl: Shared=${enable_shared}, Static=${enable_static}
49115 Built-in manual: ${curl_manual_msg}
49116 --libcurl option: ${curl_libcurl_msg}
49117 Verbose errors: ${curl_verbose_msg}
Haibo Huang51d9d882019-02-06 01:36:06 -080049118 Code coverage: ${curl_coverage_msg}
Haibo Huang65021c72019-03-27 15:37:23 -070049119 SSPI: ${curl_sspi_msg}
Elliott Hughes82be86d2017-09-20 17:00:17 -070049120 ca cert bundle: ${ca}${ca_warning}
49121 ca cert path: ${capath}${capath_warning}
49122 ca fallback: ${with_ca_fallback}
Haibo Huang65021c72019-03-27 15:37:23 -070049123 LDAP: ${curl_ldap_msg}
49124 LDAPS: ${curl_ldaps_msg}
49125 RTSP: ${curl_rtsp_msg}
49126 RTMP: ${curl_rtmp_msg}
Haibo Huang65021c72019-03-27 15:37:23 -070049127 PSL: ${curl_psl_msg}
49128 Alt-svc: ${curl_altsvc_msg}
Elliott Hughes34dd5f42021-08-10 13:01:18 -070049129 HSTS: ${curl_hsts_msg}
49130 HTTP1: ${curl_h1_msg}
Haibo Huang65021c72019-03-27 15:37:23 -070049131 HTTP2: ${curl_h2_msg}
Haibo Huang445085a2019-09-11 13:33:50 -070049132 HTTP3: ${curl_h3_msg}
Haibo Huangb5a52b92020-10-28 22:18:23 -070049133 ECH: ${curl_ech_msg}
Elliott Hughes82be86d2017-09-20 17:00:17 -070049134 Protocols: ${SUPPORT_PROTOCOLS}
Haibo Huang65021c72019-03-27 15:37:23 -070049135 Features: ${SUPPORT_FEATURES}
Elliott Hughes82be86d2017-09-20 17:00:17 -070049136" >&5
Elliott Hughesf344baa2021-12-07 09:12:34 -080049137printf "%s\n" "$as_me: Configured to build curl/libcurl:
Elliott Hughes82be86d2017-09-20 17:00:17 -070049138
Elliott Hughes82be86d2017-09-20 17:00:17 -070049139 Host setup: ${host}
49140 Install prefix: ${prefix}
49141 Compiler: ${CC}
Haibo Huang21926d52019-01-08 14:27:10 -080049142 CFLAGS: ${CFLAGS}
49143 CPPFLAGS: ${CPPFLAGS}
49144 LDFLAGS: ${LDFLAGS}
49145 LIBS: ${LIBS}
49146
49147 curl version: ${CURLVERSION}
Haibo Huang65021c72019-03-27 15:37:23 -070049148 SSL: ${curl_ssl_msg}
49149 SSH: ${curl_ssh_msg}
49150 zlib: ${curl_zlib_msg}
49151 brotli: ${curl_brotli_msg}
Haibo Huangc3c04f42020-08-19 13:00:07 -070049152 zstd: ${curl_zstd_msg}
Haibo Huang65021c72019-03-27 15:37:23 -070049153 GSS-API: ${curl_gss_msg}
Elliott Hughes34dd5f42021-08-10 13:01:18 -070049154 GSASL: ${curl_gsasl_msg}
Haibo Huang65021c72019-03-27 15:37:23 -070049155 TLS-SRP: ${curl_tls_srp_msg}
Elliott Hughes82be86d2017-09-20 17:00:17 -070049156 resolver: ${curl_res_msg}
Haibo Huang65021c72019-03-27 15:37:23 -070049157 IPv6: ${curl_ipv6_msg}
49158 Unix sockets: ${curl_unix_sockets_msg}
49159 IDN: ${curl_idn_msg}
Elliott Hughes82be86d2017-09-20 17:00:17 -070049160 Build libcurl: Shared=${enable_shared}, Static=${enable_static}
49161 Built-in manual: ${curl_manual_msg}
49162 --libcurl option: ${curl_libcurl_msg}
49163 Verbose errors: ${curl_verbose_msg}
Haibo Huang51d9d882019-02-06 01:36:06 -080049164 Code coverage: ${curl_coverage_msg}
Haibo Huang65021c72019-03-27 15:37:23 -070049165 SSPI: ${curl_sspi_msg}
Elliott Hughes82be86d2017-09-20 17:00:17 -070049166 ca cert bundle: ${ca}${ca_warning}
49167 ca cert path: ${capath}${capath_warning}
49168 ca fallback: ${with_ca_fallback}
Haibo Huang65021c72019-03-27 15:37:23 -070049169 LDAP: ${curl_ldap_msg}
49170 LDAPS: ${curl_ldaps_msg}
49171 RTSP: ${curl_rtsp_msg}
49172 RTMP: ${curl_rtmp_msg}
Haibo Huang65021c72019-03-27 15:37:23 -070049173 PSL: ${curl_psl_msg}
49174 Alt-svc: ${curl_altsvc_msg}
Elliott Hughes34dd5f42021-08-10 13:01:18 -070049175 HSTS: ${curl_hsts_msg}
49176 HTTP1: ${curl_h1_msg}
Haibo Huang65021c72019-03-27 15:37:23 -070049177 HTTP2: ${curl_h2_msg}
Haibo Huang445085a2019-09-11 13:33:50 -070049178 HTTP3: ${curl_h3_msg}
Haibo Huangb5a52b92020-10-28 22:18:23 -070049179 ECH: ${curl_ech_msg}
Elliott Hughes82be86d2017-09-20 17:00:17 -070049180 Protocols: ${SUPPORT_PROTOCOLS}
Haibo Huang65021c72019-03-27 15:37:23 -070049181 Features: ${SUPPORT_FEATURES}
Elliott Hughes82be86d2017-09-20 17:00:17 -070049182" >&6;}
Haibo Huang65021c72019-03-27 15:37:23 -070049183if test -n "$experimental"; then
49184 cat >&2 << _EOF
Haibo Huang445085a2019-09-11 13:33:50 -070049185 WARNING: $experimental enabled but marked EXPERIMENTAL. Use with caution!
Haibo Huang65021c72019-03-27 15:37:23 -070049186_EOF
49187fi
Elliott Hughesf344baa2021-12-07 09:12:34 -080049188