]> jfr.im git - irc/unrealircd/unrealircd.git/blame - configure
Don't put insecure gatewayed/proxied connections in 'tls-users' security group.
[irc/unrealircd/unrealircd.git] / configure
CommitLineData
f40ec73c 1#! /bin/sh
f40ec73c 2# Guess values for system-dependent variables and create Makefiles.
5a17e551 3# Generated by GNU Autoconf 2.71 for unrealircd 6.1.6-git.
2828e7f8 4#
ed1f47f8 5# Report bugs to <https://bugs.unrealircd.org/>.
c0790e90 6#
94c2b583 7#
bb0a50d8
BM
8# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
9# Inc.
94c2b583 10#
11#
f40ec73c 12# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
94c2b583 14## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
f69335e6 17
cadd4230
BM
18# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
bb0a50d8
BM
20as_nop=:
21if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
22then :
f69335e6 23 emulate sh
24 NULLCMD=:
94c2b583 25 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
545d087a
BM
26 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
cadd4230 28 setopt NO_GLOB_SUBST
bb0a50d8 29else $as_nop
94c2b583 30 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
cadd4230 35esac
cadd4230
BM
36fi
37
38
bb0a50d8
BM
39
40# Reset variables that may have inherited troublesome values from
41# the environment.
42
43# IFS needs to be set, to space, tab, and newline, in precisely that order.
44# (If _AS_PATH_WALK were called with IFS unset, it would have the
45# side effect of setting IFS to empty, thus disabling word splitting.)
46# Quoting is to prevent editors from complaining about space-tab.
94c2b583 47as_nl='
48'
49export as_nl
bb0a50d8
BM
50IFS=" "" $as_nl"
51
52PS1='$ '
53PS2='> '
54PS4='+ '
55
56# Ensure predictable behavior from utilities with locale-dependent output.
57LC_ALL=C
58export LC_ALL
59LANGUAGE=C
60export LANGUAGE
61
62# We cannot yet rely on "unset" to work, but we need these variables
63# to be unset--not just set to an empty or harmless value--now, to
64# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
65# also avoids known problems related to "unset" and subshell syntax
66# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
67for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
68do eval test \${$as_var+y} \
69 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
70done
71
72# Ensure that fds 0, 1, and 2 are open.
73if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
74if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
75if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
f69335e6 76
94c2b583 77# The user is always right.
bb0a50d8 78if ${PATH_SEPARATOR+false} :; then
94c2b583 79 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
f69335e6 84fi
85
545d087a 86
cadd4230 87# Find who we are. Look in the path if we contain no directory separator.
0ff0b04a 88as_myself=
94c2b583 89case $0 in #((
cadd4230
BM
90 *[\\/]* ) as_myself=$0 ;;
91 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
92for as_dir in $PATH
93do
94 IFS=$as_save_IFS
bb0a50d8
BM
95 case $as_dir in #(((
96 '') as_dir=./ ;;
97 */) ;;
98 *) as_dir=$as_dir/ ;;
99 esac
100 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
94c2b583 101 done
cadd4230
BM
102IFS=$as_save_IFS
103
104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
bb0a50d8 112 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
94c2b583 113 exit 1
cadd4230
BM
114fi
115
94c2b583 116
f1c5f885
BM
117# Use a proper internal environment variable to ensure we don't fall
118 # into an infinite loop, continuously re-executing ourselves.
119 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
120 _as_can_reexec=no; export _as_can_reexec;
121 # We cannot yet assume a decent shell, so we have to provide a
122# neutralization value for shells without unset; and this also
123# works around shells that cannot unset nonexistent variables.
124# Preserve -v and -x to the replacement shell.
125BASH_ENV=/dev/null
126ENV=/dev/null
127(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
128case $- in # ((((
129 *v*x* | *x*v* ) as_opts=-vx ;;
130 *v* ) as_opts=-v ;;
131 *x* ) as_opts=-x ;;
132 * ) as_opts= ;;
133esac
134exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
135# Admittedly, this is quite paranoid, since all the known shells bail
136# out after a failed `exec'.
bb0a50d8
BM
137printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
138exit 255
f1c5f885
BM
139 fi
140 # We don't want this to propagate to other subprocesses.
141 { _as_can_reexec=; unset _as_can_reexec;}
94c2b583 142if test "x$CONFIG_SHELL" = x; then
bb0a50d8
BM
143 as_bourne_compatible="as_nop=:
144if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
145then :
94c2b583 146 emulate sh
147 NULLCMD=:
148 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
149 # is contrary to our usage. Disable this feature.
150 alias -g '\${1+\"\$@\"}'='\"\$@\"'
151 setopt NO_GLOB_SUBST
bb0a50d8 152else \$as_nop
94c2b583 153 case \`(set -o) 2>/dev/null\` in #(
154 *posix*) :
155 set -o posix ;; #(
156 *) :
157 ;;
158esac
159fi
160"
161 as_required="as_fn_return () { (exit \$1); }
162as_fn_success () { as_fn_return 0; }
163as_fn_failure () { as_fn_return 1; }
164as_fn_ret_success () { return 0; }
165as_fn_ret_failure () { return 1; }
166
167exitcode=0
168as_fn_success || { exitcode=1; echo as_fn_success failed.; }
169as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
170as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
171as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
bb0a50d8
BM
172if ( set x; as_fn_ret_success y && test x = \"\$1\" )
173then :
94c2b583 174
bb0a50d8 175else \$as_nop
94c2b583 176 exitcode=1; echo positional parameters were not saved.
177fi
f1c5f885 178test x\$exitcode = x0 || exit 1
bb0a50d8
BM
179blah=\$(echo \$(echo blah))
180test x\"\$blah\" = xblah || exit 1
f1c5f885 181test -x / || exit 1"
94c2b583 182 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
183 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
184 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
185 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
186test \$(( 1 + 1 )) = 2 || exit 1"
bb0a50d8
BM
187 if (eval "$as_required") 2>/dev/null
188then :
94c2b583 189 as_have_required=yes
bb0a50d8 190else $as_nop
94c2b583 191 as_have_required=no
192fi
bb0a50d8
BM
193 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
194then :
94c2b583 195
bb0a50d8 196else $as_nop
94c2b583 197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
198as_found=false
199for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
4eff1e84 200do
94c2b583 201 IFS=$as_save_IFS
bb0a50d8
BM
202 case $as_dir in #(((
203 '') as_dir=./ ;;
204 */) ;;
205 *) as_dir=$as_dir/ ;;
206 esac
94c2b583 207 as_found=:
208 case $as_dir in #(
209 /*)
210 for as_base in sh bash ksh sh5; do
211 # Try only shells that exist, to save several forks.
bb0a50d8 212 as_shell=$as_dir$as_base
94c2b583 213 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
bb0a50d8
BM
214 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
215then :
94c2b583 216 CONFIG_SHELL=$as_shell as_have_required=yes
bb0a50d8
BM
217 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
218then :
94c2b583 219 break 2
220fi
221fi
222 done;;
223 esac
224 as_found=false
225done
94c2b583 226IFS=$as_save_IFS
bb0a50d8
BM
227if $as_found
228then :
229
230else $as_nop
231 if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
233then :
234 CONFIG_SHELL=$SHELL as_have_required=yes
235fi
236fi
94c2b583 237
238
bb0a50d8
BM
239 if test "x$CONFIG_SHELL" != x
240then :
f1c5f885
BM
241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
bb0a50d8 258printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
f1c5f885 259exit 255
94c2b583 260fi
261
bb0a50d8
BM
262 if test x$as_have_required = xno
263then :
264 printf "%s\n" "$0: This script requires a shell more modern than all"
265 printf "%s\n" "$0: the shells that I found on your system."
266 if test ${ZSH_VERSION+y} ; then
267 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
4eff1e84 269 else
bb0a50d8 270 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
ed1f47f8 271$0: https://bugs.unrealircd.org/ about your system,
94c2b583 272$0: including any error possibly output before this
273$0: message. Then install a modern shell, or manually run
274$0: the script under such a shell if you do have one."
4eff1e84 275 fi
94c2b583 276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
bb0a50d8 298
94c2b583 299# as_fn_set_status STATUS
300# -----------------------
301# Set $? to STATUS, without forking.
302as_fn_set_status ()
303{
304 return $1
305} # as_fn_set_status
306
307# as_fn_exit STATUS
308# -----------------
309# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310as_fn_exit ()
311{
312 set +e
313 as_fn_set_status $1
314 exit $1
315} # as_fn_exit
bb0a50d8
BM
316# as_fn_nop
317# ---------
318# Do nothing but, unlike ":", preserve the value of $?.
319as_fn_nop ()
320{
321 return $?
322}
323as_nop=as_fn_nop
94c2b583 324
325# as_fn_mkdir_p
326# -------------
327# Create "$as_dir" as a directory, including parents if necessary.
328as_fn_mkdir_p ()
329{
330
331 case $as_dir in #(
332 -*) as_dir=./$as_dir;;
333 esac
334 test -d "$as_dir" || eval $as_mkdir_p || {
335 as_dirs=
336 while :; do
337 case $as_dir in #(
bb0a50d8 338 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
94c2b583 339 *) as_qdir=$as_dir;;
340 esac
341 as_dirs="'$as_qdir' $as_dirs"
342 as_dir=`$as_dirname -- "$as_dir" ||
343$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
344 X"$as_dir" : 'X\(//\)[^/]' \| \
345 X"$as_dir" : 'X\(//\)$' \| \
346 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
bb0a50d8 347printf "%s\n" X"$as_dir" |
94c2b583 348 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
349 s//\1/
350 q
351 }
352 /^X\(\/\/\)[^/].*/{
353 s//\1/
354 q
355 }
356 /^X\(\/\/\)$/{
357 s//\1/
358 q
359 }
360 /^X\(\/\).*/{
361 s//\1/
362 q
363 }
364 s/.*/./; q'`
365 test -d "$as_dir" && break
366 done
367 test -z "$as_dirs" || eval "mkdir $as_dirs"
0ff0b04a 368 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
94c2b583 369
370
371} # as_fn_mkdir_p
f1c5f885
BM
372
373# as_fn_executable_p FILE
374# -----------------------
375# Test if FILE is an executable regular file.
376as_fn_executable_p ()
377{
378 test -f "$1" && test -x "$1"
379} # as_fn_executable_p
94c2b583 380# as_fn_append VAR VALUE
381# ----------------------
382# Append the text in VALUE to the end of the definition contained in VAR. Take
383# advantage of any shell optimizations that allow amortized linear growth over
384# repeated appends, instead of the typical quadratic growth present in naive
385# implementations.
bb0a50d8
BM
386if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
387then :
94c2b583 388 eval 'as_fn_append ()
389 {
390 eval $1+=\$2
391 }'
bb0a50d8 392else $as_nop
94c2b583 393 as_fn_append ()
394 {
395 eval $1=\$$1\$2
396 }
397fi # as_fn_append
398
399# as_fn_arith ARG...
400# ------------------
401# Perform arithmetic evaluation on the ARGs, and store the result in the
402# global $as_val. Take advantage of shells that can avoid forks. The arguments
403# must be portable across $(()) and expr.
bb0a50d8
BM
404if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
405then :
94c2b583 406 eval 'as_fn_arith ()
407 {
408 as_val=$(( $* ))
409 }'
bb0a50d8 410else $as_nop
94c2b583 411 as_fn_arith ()
412 {
413 as_val=`expr "$@" || test $? -eq 1`
414 }
415fi # as_fn_arith
416
bb0a50d8
BM
417# as_fn_nop
418# ---------
419# Do nothing but, unlike ":", preserve the value of $?.
420as_fn_nop ()
421{
422 return $?
423}
424as_nop=as_fn_nop
94c2b583 425
0ff0b04a
NPB
426# as_fn_error STATUS ERROR [LINENO LOG_FD]
427# ----------------------------------------
94c2b583 428# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
429# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
0ff0b04a 430# script with STATUS, using 1 if that was 0.
94c2b583 431as_fn_error ()
432{
0ff0b04a
NPB
433 as_status=$1; test $as_status -eq 0 && as_status=1
434 if test "$4"; then
435 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
bb0a50d8 436 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
94c2b583 437 fi
bb0a50d8 438 printf "%s\n" "$as_me: error: $2" >&2
94c2b583 439 as_fn_exit $as_status
440} # as_fn_error
4eff1e84 441
cadd4230
BM
442if expr a : '\(a\)' >/dev/null 2>&1 &&
443 test "X`expr 00001 : '.*\(...\)'`" = X001; then
545d087a
BM
444 as_expr=expr
445else
446 as_expr=false
447fi
448
cadd4230 449if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
545d087a
BM
450 as_basename=basename
451else
452 as_basename=false
453fi
f69335e6 454
94c2b583 455if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
456 as_dirname=dirname
457else
458 as_dirname=false
459fi
f69335e6 460
cadd4230 461as_me=`$as_basename -- "$0" ||
f69335e6 462$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
463 X"$0" : 'X\(//\)$' \| \
cadd4230 464 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
bb0a50d8 465printf "%s\n" X/"$0" |
cadd4230
BM
466 sed '/^.*\/\([^/][^/]*\)\/*$/{
467 s//\1/
468 q
469 }
470 /^X\/\(\/\/\)$/{
471 s//\1/
472 q
473 }
474 /^X\/\(\/\).*/{
475 s//\1/
476 q
477 }
478 s/.*/./; q'`
f69335e6 479
94c2b583 480# Avoid depending upon Character Ranges.
481as_cr_letters='abcdefghijklmnopqrstuvwxyz'
482as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
483as_cr_Letters=$as_cr_letters$as_cr_LETTERS
484as_cr_digits='0123456789'
485as_cr_alnum=$as_cr_Letters$as_cr_digits
545d087a 486
f69335e6 487
94c2b583 488 as_lineno_1=$LINENO as_lineno_1a=$LINENO
489 as_lineno_2=$LINENO as_lineno_2a=$LINENO
490 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
491 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
492 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
493 sed -n '
494 p
495 /[$]LINENO/=
496 ' <$as_myself |
497 sed '
498 s/[$]LINENO.*/&-/
499 t lineno
500 b
501 :lineno
502 N
503 :loop
504 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
505 t loop
506 s/-\n.*//
507 ' >$as_me.lineno &&
508 chmod +x "$as_me.lineno" ||
bb0a50d8 509 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
f69335e6 510
f1c5f885
BM
511 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
512 # already done that, so ensure we don't try to do so again and fall
513 # in an infinite loop. This has already happened in practice.
514 _as_can_reexec=no; export _as_can_reexec
94c2b583 515 # Don't try to exec as it changes $[0], causing all sort of problems
516 # (the dirname of $[0] is not the place where we might find the
517 # original and so on. Autoconf is especially sensitive to this).
518 . "./$as_me.lineno"
519 # Exit status is that of the last command.
520 exit
cadd4230 521}
f69335e6 522
bb0a50d8
BM
523
524# Determine whether it's possible to make 'echo' print without a newline.
525# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
526# for compatibility with existing Makefiles.
94c2b583 527ECHO_C= ECHO_N= ECHO_T=
528case `echo -n x` in #(((((
529-n*)
530 case `echo 'xy\c'` in
531 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
532 xy) ECHO_C='\c';;
533 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
534 ECHO_T=' ';;
535 esac;;
536*)
537 ECHO_N='-n';;
538esac
85904c22 539
bb0a50d8
BM
540# For backward compatibility with old third-party macros, we provide
541# the shell variables $as_echo and $as_echo_n. New code should use
542# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
543as_echo='printf %s\n'
544as_echo_n='printf %s'
545
546
94c2b583 547rm -f conf$$ conf$$.exe conf$$.file
548if test -d conf$$.dir; then
549 rm -f conf$$.dir/conf$$.file
4eff1e84 550else
94c2b583 551 rm -f conf$$.dir
552 mkdir conf$$.dir 2>/dev/null
553fi
554if (echo >conf$$.file) 2>/dev/null; then
555 if ln -s conf$$.file conf$$ 2>/dev/null; then
556 as_ln_s='ln -s'
557 # ... but there are two gotchas:
558 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
559 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
f1c5f885 560 # In both cases, we have to default to `cp -pR'.
94c2b583 561 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
f1c5f885 562 as_ln_s='cp -pR'
94c2b583 563 elif ln conf$$.file conf$$ 2>/dev/null; then
564 as_ln_s=ln
565 else
f1c5f885 566 as_ln_s='cp -pR'
94c2b583 567 fi
cadd4230 568else
f1c5f885 569 as_ln_s='cp -pR'
cadd4230 570fi
94c2b583 571rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
572rmdir conf$$.dir 2>/dev/null
cadd4230 573
94c2b583 574if mkdir -p . 2>/dev/null; then
575 as_mkdir_p='mkdir -p "$as_dir"'
85904c22 576else
94c2b583 577 test -d ./-p && rmdir ./-p
578 as_mkdir_p=false
579fi
cadd4230 580
f1c5f885
BM
581as_test_x='test -x'
582as_executable_p=as_fn_executable_p
f69335e6 583
94c2b583 584# Sed expression to map a string onto a valid CPP name.
585as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
85904c22 586
94c2b583 587# Sed expression to map a string onto a valid variable name.
588as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
85904c22 589
85904c22 590
94c2b583 591test -n "$DJDIR" || exec 7<&0 </dev/null
592exec 6>&1
85904c22
BM
593
594# Name of the host.
0ff0b04a 595# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
85904c22
BM
596# so uname gets run too.
597ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
598
599#
600# Initializations.
601#
602ac_default_prefix=/usr/local
603ac_clean_files=
604ac_config_libobj_dir=.
605LIBOBJS=
606cross_compiling=no
607subdirs=
f69335e6 608MFLAGS=
609MAKEFLAGS=
f69335e6 610
f69335e6 611# Identity of this package.
2828e7f8 612PACKAGE_NAME='unrealircd'
613PACKAGE_TARNAME='unrealircd'
5a17e551
BM
614PACKAGE_VERSION='6.1.6-git'
615PACKAGE_STRING='unrealircd 6.1.6-git'
ed1f47f8
BM
616PACKAGE_BUGREPORT='https://bugs.unrealircd.org/'
617PACKAGE_URL='https://unrealircd.org/'
f69335e6 618
619ac_unique_file="src/ircd.c"
620# Factoring default headers for most tests.
621ac_includes_default="\
bb0a50d8
BM
622#include <stddef.h>
623#ifdef HAVE_STDIO_H
624# include <stdio.h>
f69335e6 625#endif
bb0a50d8 626#ifdef HAVE_STDLIB_H
f69335e6 627# include <stdlib.h>
f69335e6 628#endif
cadd4230 629#ifdef HAVE_STRING_H
f69335e6 630# include <string.h>
631#endif
cadd4230 632#ifdef HAVE_INTTYPES_H
f69335e6 633# include <inttypes.h>
f69335e6 634#endif
cadd4230
BM
635#ifdef HAVE_STDINT_H
636# include <stdint.h>
637#endif
bb0a50d8
BM
638#ifdef HAVE_STRINGS_H
639# include <strings.h>
640#endif
641#ifdef HAVE_SYS_TYPES_H
642# include <sys/types.h>
643#endif
644#ifdef HAVE_SYS_STAT_H
645# include <sys/stat.h>
646#endif
cadd4230 647#ifdef HAVE_UNISTD_H
f69335e6 648# include <unistd.h>
649#endif"
650
bb0a50d8 651ac_header_c_list=
94c2b583 652ac_subst_vars='LTLIBOBJS
85904c22 653LIBOBJS
101d2dd6 654UNRLINCDIR
aff3c16c 655IRCDLIBS
9c3d5dff 656GEOIP_MAXMIND_OBJECTS
657LIBMAXMINDDB_LIBS
658LIBMAXMINDDB_CFLAGS
ed7bf1da
BM
659GEOIP_CLASSIC_OBJECTS
660GEOIP_CLASSIC_LIBS
661GEOIP_CLASSIC_CFLAGS
2c7d2c8f 662URL
f81d2207
BM
663PTHREAD_CFLAGS
664PTHREAD_LIBS
665PTHREAD_CC
666ax_pthread_config
0136ac3c
TM
667host_os
668host_vendor
669host_cpu
670host
671build_os
672build_vendor
673build_cpu
674build
f89348d2
BM
675JANSSON_LIBS
676JANSSON_CFLAGS
94c2b583 677CARES_LIBS
678CARES_CFLAGS
5daf7e7e
BM
679SODIUM_LIBS
680SODIUM_CFLAGS
a852b480
BM
681ARGON2_LIBS
682ARGON2_CFLAGS
05e3ed63
BM
683PCRE2_LIBS
684PCRE2_CFLAGS
42d8a95c
WP
685PKG_CONFIG_LIBDIR
686PKG_CONFIG_PATH
c0790e90 687PKG_CONFIG
9252ce30 688LDFLAGS_PRIVATELIBS
39688517 689CONTROLFILE
5e94fc9c
BM
690PIDFILE
691DOCDIR
e5ec2a64 692PERMDATADIR
5e94fc9c
BM
693TMPDIR
694CACHEDIR
695LOGDIR
696MODULESDIR
697CONFDIR
698SCRIPTDIR
94c2b583 699BINDIR
dfa83aa6 700BUILDDIR
ecf260df 701DYNAMIC_LDFLAGS
94c2b583 702MODULEFLAGS
703CRYPTOLIB
bb0a50d8
BM
704EGREP
705GREP
706CPP
4fd616f9
BM
707HARDEN_BINLDFLAGS
708HARDEN_BINCFLAGS
bae1dcf1
BM
709HARDEN_LDFLAGS
710HARDEN_CFLAGS
54a2fad8
BM
711GMAKE
712MAKER
dd2af3b3
BM
713OBJEXT
714EXEEXT
715ac_ct_CC
716CPPFLAGS
717LDFLAGS
718CFLAGS
719CC
94c2b583 720PKGCONFIG
721GUNZIP
94c2b583 722INSTALL
723OPENSSLPATH
724TOUCH
725CP
726RM
94c2b583 727target_alias
728host_alias
729build_alias
730LIBS
731ECHO_T
732ECHO_N
733ECHO_C
734DEFS
735mandir
736localedir
737libdir
738psdir
739pdfdir
740dvidir
741htmldir
742infodir
743docdir
744oldincludedir
745includedir
5e0ed6d6 746runstatedir
94c2b583 747localstatedir
748sharedstatedir
749sysconfdir
750datadir
751datarootdir
752libexecdir
753sbindir
754bindir
755program_transform_name
756prefix
757exec_prefix
758PACKAGE_URL
759PACKAGE_BUGREPORT
760PACKAGE_STRING
761PACKAGE_VERSION
762PACKAGE_TARNAME
763PACKAGE_NAME
764PATH_SEPARATOR
765SHELL'
766ac_subst_files=''
767ac_user_opts='
768enable_option_checking
bae1dcf1 769enable_hardening
94c2b583 770with_nick_history
94c2b583 771with_permissions
5e94fc9c
BM
772with_bindir
773with_scriptdir
774with_confdir
dfa83aa6 775with_builddir
5e94fc9c
BM
776with_modulesdir
777with_logdir
778with_cachedir
779with_tmpdir
780with_datadir
781with_docdir
782with_pidfile
39688517 783with_controlfile
fd35f965 784with_privatelibdir
6d3a9865 785with_maxconnections
94c2b583 786with_no_operoverride
94c2b583 787with_operoverride_verify
547b2d69 788with_system_pcre2
a852b480 789with_system_argon2
5daf7e7e 790with_system_sodium
94c2b583 791with_system_cares
f89348d2 792with_system_jansson
94c2b583 793enable_ssl
94c2b583 794enable_dynamic_linking
821a0464 795enable_werror
aff3c16c 796enable_asan
94c2b583 797enable_libcurl
ed7bf1da 798enable_geoip_classic
9c3d5dff 799enable_libmaxminddb
94c2b583 800'
801 ac_precious_vars='build_alias
802host_alias
803target_alias
804CC
805CFLAGS
806LDFLAGS
807LIBS
808CPPFLAGS
809CPP
810PKG_CONFIG
42d8a95c
WP
811PKG_CONFIG_PATH
812PKG_CONFIG_LIBDIR
547b2d69
BM
813PCRE2_CFLAGS
814PCRE2_LIBS
a852b480
BM
815ARGON2_CFLAGS
816ARGON2_LIBS
5daf7e7e
BM
817SODIUM_CFLAGS
818SODIUM_LIBS
94c2b583 819CARES_CFLAGS
f89348d2
BM
820CARES_LIBS
821JANSSON_CFLAGS
ed7bf1da
BM
822JANSSON_LIBS
823GEOIP_CLASSIC_CFLAGS
9c3d5dff 824GEOIP_CLASSIC_LIBS
825LIBMAXMINDDB_CFLAGS
826LIBMAXMINDDB_LIBS'
94c2b583 827
828
829# Initialize some variables set by options.
c0790e90 830ac_init_help=
f69335e6 831ac_init_version=false
94c2b583 832ac_unrecognized_opts=
833ac_unrecognized_sep=
f40ec73c 834# The variables have the same names as the options, with
835# dashes changed to underlines.
f69335e6 836cache_file=/dev/null
f40ec73c 837exec_prefix=NONE
f40ec73c 838no_create=
f40ec73c 839no_recursion=
840prefix=NONE
841program_prefix=NONE
842program_suffix=NONE
843program_transform_name=s,x,x,
844silent=
845site=
846srcdir=
f40ec73c 847verbose=
848x_includes=NONE
849x_libraries=NONE
f69335e6 850
851# Installation directory options.
852# These are left unexpanded so users can "make install exec_prefix=/foo"
853# and all the variables that are supposed to be based on exec_prefix
854# by default will actually change.
855# Use braces instead of parens because sh, perl, etc. also accept them.
cadd4230 856# (The list follows the same order as the GNU Coding Standards.)
f40ec73c 857bindir='${exec_prefix}/bin'
858sbindir='${exec_prefix}/sbin'
859libexecdir='${exec_prefix}/libexec'
cadd4230
BM
860datarootdir='${prefix}/share'
861datadir='${datarootdir}'
f40ec73c 862sysconfdir='${prefix}/etc'
863sharedstatedir='${prefix}/com'
864localstatedir='${prefix}/var'
5e0ed6d6 865runstatedir='${localstatedir}/run'
f40ec73c 866includedir='${prefix}/include'
867oldincludedir='/usr/include'
2828e7f8 868docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
cadd4230
BM
869infodir='${datarootdir}/info'
870htmldir='${docdir}'
871dvidir='${docdir}'
872pdfdir='${docdir}'
873psdir='${docdir}'
874libdir='${exec_prefix}/lib'
875localedir='${datarootdir}/locale'
876mandir='${datarootdir}/man'
f40ec73c 877
f40ec73c 878ac_prev=
cadd4230 879ac_dashdash=
f40ec73c 880for ac_option
881do
f40ec73c 882 # If the previous option needs an argument, assign it.
883 if test -n "$ac_prev"; then
cadd4230 884 eval $ac_prev=\$ac_option
f40ec73c 885 ac_prev=
886 continue
887 fi
888
cadd4230 889 case $ac_option in
0ff0b04a
NPB
890 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
891 *=) ac_optarg= ;;
892 *) ac_optarg=yes ;;
cadd4230 893 esac
f40ec73c 894
cadd4230
BM
895 case $ac_dashdash$ac_option in
896 --)
897 ac_dashdash=yes ;;
f40ec73c 898
899 -bindir | --bindir | --bindi | --bind | --bin | --bi)
900 ac_prev=bindir ;;
901 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
f69335e6 902 bindir=$ac_optarg ;;
f40ec73c 903
904 -build | --build | --buil | --bui | --bu)
f69335e6 905 ac_prev=build_alias ;;
f40ec73c 906 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
f69335e6 907 build_alias=$ac_optarg ;;
f40ec73c 908
909 -cache-file | --cache-file | --cache-fil | --cache-fi \
910 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
911 ac_prev=cache_file ;;
912 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
913 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
f69335e6 914 cache_file=$ac_optarg ;;
915
916 --config-cache | -C)
917 cache_file=config.cache ;;
f40ec73c 918
cadd4230 919 -datadir | --datadir | --datadi | --datad)
f40ec73c 920 ac_prev=datadir ;;
cadd4230 921 -datadir=* | --datadir=* | --datadi=* | --datad=*)
f69335e6 922 datadir=$ac_optarg ;;
f40ec73c 923
cadd4230
BM
924 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
925 | --dataroo | --dataro | --datar)
926 ac_prev=datarootdir ;;
927 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
928 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
929 datarootdir=$ac_optarg ;;
930
f40ec73c 931 -disable-* | --disable-*)
94c2b583 932 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
f40ec73c 933 # Reject names that are not valid shell variable names.
94c2b583 934 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
bb0a50d8 935 as_fn_error $? "invalid feature name: \`$ac_useropt'"
94c2b583 936 ac_useropt_orig=$ac_useropt
bb0a50d8 937 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
94c2b583 938 case $ac_user_opts in
939 *"
940"enable_$ac_useropt"
941"*) ;;
942 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
943 ac_unrecognized_sep=', ';;
944 esac
945 eval enable_$ac_useropt=no ;;
cadd4230
BM
946
947 -docdir | --docdir | --docdi | --doc | --do)
948 ac_prev=docdir ;;
949 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
950 docdir=$ac_optarg ;;
951
952 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
953 ac_prev=dvidir ;;
954 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
955 dvidir=$ac_optarg ;;
f40ec73c 956
957 -enable-* | --enable-*)
94c2b583 958 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
f40ec73c 959 # Reject names that are not valid shell variable names.
94c2b583 960 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
bb0a50d8 961 as_fn_error $? "invalid feature name: \`$ac_useropt'"
94c2b583 962 ac_useropt_orig=$ac_useropt
bb0a50d8 963 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
94c2b583 964 case $ac_user_opts in
965 *"
966"enable_$ac_useropt"
967"*) ;;
968 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
969 ac_unrecognized_sep=', ';;
970 esac
971 eval enable_$ac_useropt=\$ac_optarg ;;
f40ec73c 972
973 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
974 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
975 | --exec | --exe | --ex)
976 ac_prev=exec_prefix ;;
977 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
978 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
979 | --exec=* | --exe=* | --ex=*)
f69335e6 980 exec_prefix=$ac_optarg ;;
f40ec73c 981
982 -gas | --gas | --ga | --g)
983 # Obsolete; use --with-gas.
984 with_gas=yes ;;
985
f69335e6 986 -help | --help | --hel | --he | -h)
987 ac_init_help=long ;;
988 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
989 ac_init_help=recursive ;;
990 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
991 ac_init_help=short ;;
f40ec73c 992
993 -host | --host | --hos | --ho)
f69335e6 994 ac_prev=host_alias ;;
f40ec73c 995 -host=* | --host=* | --hos=* | --ho=*)
f69335e6 996 host_alias=$ac_optarg ;;
f40ec73c 997
cadd4230
BM
998 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
999 ac_prev=htmldir ;;
1000 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1001 | --ht=*)
1002 htmldir=$ac_optarg ;;
1003
f40ec73c 1004 -includedir | --includedir | --includedi | --included | --include \
1005 | --includ | --inclu | --incl | --inc)
1006 ac_prev=includedir ;;
1007 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1008 | --includ=* | --inclu=* | --incl=* | --inc=*)
f69335e6 1009 includedir=$ac_optarg ;;
f40ec73c 1010
1011 -infodir | --infodir | --infodi | --infod | --info | --inf)
1012 ac_prev=infodir ;;
1013 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
f69335e6 1014 infodir=$ac_optarg ;;
f40ec73c 1015
1016 -libdir | --libdir | --libdi | --libd)
1017 ac_prev=libdir ;;
1018 -libdir=* | --libdir=* | --libdi=* | --libd=*)
f69335e6 1019 libdir=$ac_optarg ;;
f40ec73c 1020
1021 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1022 | --libexe | --libex | --libe)
1023 ac_prev=libexecdir ;;
1024 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1025 | --libexe=* | --libex=* | --libe=*)
f69335e6 1026 libexecdir=$ac_optarg ;;
f40ec73c 1027
cadd4230
BM
1028 -localedir | --localedir | --localedi | --localed | --locale)
1029 ac_prev=localedir ;;
1030 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1031 localedir=$ac_optarg ;;
1032
f40ec73c 1033 -localstatedir | --localstatedir | --localstatedi | --localstated \
cadd4230 1034 | --localstate | --localstat | --localsta | --localst | --locals)
f40ec73c 1035 ac_prev=localstatedir ;;
1036 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
cadd4230 1037 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
f69335e6 1038 localstatedir=$ac_optarg ;;
f40ec73c 1039
1040 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1041 ac_prev=mandir ;;
1042 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
f69335e6 1043 mandir=$ac_optarg ;;
f40ec73c 1044
1045 -nfp | --nfp | --nf)
1046 # Obsolete; use --without-fp.
1047 with_fp=no ;;
1048
1049 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
f69335e6 1050 | --no-cr | --no-c | -n)
f40ec73c 1051 no_create=yes ;;
1052
1053 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1054 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1055 no_recursion=yes ;;
1056
1057 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1058 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1059 | --oldin | --oldi | --old | --ol | --o)
1060 ac_prev=oldincludedir ;;
1061 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1062 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1063 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
f69335e6 1064 oldincludedir=$ac_optarg ;;
f40ec73c 1065
1066 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1067 ac_prev=prefix ;;
1068 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
f69335e6 1069 prefix=$ac_optarg ;;
f40ec73c 1070
1071 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1072 | --program-pre | --program-pr | --program-p)
1073 ac_prev=program_prefix ;;
1074 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1075 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
f69335e6 1076 program_prefix=$ac_optarg ;;
f40ec73c 1077
1078 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1079 | --program-suf | --program-su | --program-s)
1080 ac_prev=program_suffix ;;
1081 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1082 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
f69335e6 1083 program_suffix=$ac_optarg ;;
f40ec73c 1084
1085 -program-transform-name | --program-transform-name \
1086 | --program-transform-nam | --program-transform-na \
1087 | --program-transform-n | --program-transform- \
1088 | --program-transform | --program-transfor \
1089 | --program-transfo | --program-transf \
1090 | --program-trans | --program-tran \
1091 | --progr-tra | --program-tr | --program-t)
1092 ac_prev=program_transform_name ;;
1093 -program-transform-name=* | --program-transform-name=* \
1094 | --program-transform-nam=* | --program-transform-na=* \
1095 | --program-transform-n=* | --program-transform-=* \
1096 | --program-transform=* | --program-transfor=* \
1097 | --program-transfo=* | --program-transf=* \
1098 | --program-trans=* | --program-tran=* \
1099 | --progr-tra=* | --program-tr=* | --program-t=*)
f69335e6 1100 program_transform_name=$ac_optarg ;;
f40ec73c 1101
cadd4230
BM
1102 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1103 ac_prev=pdfdir ;;
1104 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1105 pdfdir=$ac_optarg ;;
1106
1107 -psdir | --psdir | --psdi | --psd | --ps)
1108 ac_prev=psdir ;;
1109 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1110 psdir=$ac_optarg ;;
1111
f40ec73c 1112 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1113 | -silent | --silent | --silen | --sile | --sil)
1114 silent=yes ;;
1115
5e0ed6d6
BM
1116 -runstatedir | --runstatedir | --runstatedi | --runstated \
1117 | --runstate | --runstat | --runsta | --runst | --runs \
1118 | --run | --ru | --r)
1119 ac_prev=runstatedir ;;
1120 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1121 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1122 | --run=* | --ru=* | --r=*)
1123 runstatedir=$ac_optarg ;;
1124
f40ec73c 1125 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1126 ac_prev=sbindir ;;
1127 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1128 | --sbi=* | --sb=*)
f69335e6 1129 sbindir=$ac_optarg ;;
f40ec73c 1130
1131 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1132 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1133 | --sharedst | --shareds | --shared | --share | --shar \
1134 | --sha | --sh)
1135 ac_prev=sharedstatedir ;;
1136 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1137 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1138 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1139 | --sha=* | --sh=*)
f69335e6 1140 sharedstatedir=$ac_optarg ;;
f40ec73c 1141
1142 -site | --site | --sit)
1143 ac_prev=site ;;
1144 -site=* | --site=* | --sit=*)
f69335e6 1145 site=$ac_optarg ;;
f40ec73c 1146
1147 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1148 ac_prev=srcdir ;;
1149 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
f69335e6 1150 srcdir=$ac_optarg ;;
f40ec73c 1151
1152 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1153 | --syscon | --sysco | --sysc | --sys | --sy)
1154 ac_prev=sysconfdir ;;
1155 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1156 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
f69335e6 1157 sysconfdir=$ac_optarg ;;
f40ec73c 1158
1159 -target | --target | --targe | --targ | --tar | --ta | --t)
f69335e6 1160 ac_prev=target_alias ;;
f40ec73c 1161 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
f69335e6 1162 target_alias=$ac_optarg ;;
f40ec73c 1163
1164 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1165 verbose=yes ;;
1166
f69335e6 1167 -version | --version | --versio | --versi | --vers | -V)
1168 ac_init_version=: ;;
f40ec73c 1169
1170 -with-* | --with-*)
94c2b583 1171 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
f40ec73c 1172 # Reject names that are not valid shell variable names.
94c2b583 1173 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
bb0a50d8 1174 as_fn_error $? "invalid package name: \`$ac_useropt'"
94c2b583 1175 ac_useropt_orig=$ac_useropt
bb0a50d8 1176 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
94c2b583 1177 case $ac_user_opts in
1178 *"
1179"with_$ac_useropt"
1180"*) ;;
1181 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1182 ac_unrecognized_sep=', ';;
1183 esac
1184 eval with_$ac_useropt=\$ac_optarg ;;
f40ec73c 1185
1186 -without-* | --without-*)
94c2b583 1187 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
f40ec73c 1188 # Reject names that are not valid shell variable names.
94c2b583 1189 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
bb0a50d8 1190 as_fn_error $? "invalid package name: \`$ac_useropt'"
94c2b583 1191 ac_useropt_orig=$ac_useropt
bb0a50d8 1192 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
94c2b583 1193 case $ac_user_opts in
1194 *"
1195"with_$ac_useropt"
1196"*) ;;
1197 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1198 ac_unrecognized_sep=', ';;
1199 esac
1200 eval with_$ac_useropt=no ;;
f40ec73c 1201
1202 --x)
1203 # Obsolete; use --with-x.
1204 with_x=yes ;;
1205
1206 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1207 | --x-incl | --x-inc | --x-in | --x-i)
1208 ac_prev=x_includes ;;
1209 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1210 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
f69335e6 1211 x_includes=$ac_optarg ;;
f40ec73c 1212
1213 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1214 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1215 ac_prev=x_libraries ;;
1216 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1217 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
f69335e6 1218 x_libraries=$ac_optarg ;;
f40ec73c 1219
0ff0b04a
NPB
1220 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1221Try \`$0 --help' for more information"
f40ec73c 1222 ;;
1223
f69335e6 1224 *=*)
1225 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1226 # Reject names that are not valid shell variable names.
94c2b583 1227 case $ac_envvar in #(
1228 '' | [0-9]* | *[!_$as_cr_alnum]* )
0ff0b04a 1229 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
94c2b583 1230 esac
cadd4230 1231 eval $ac_envvar=\$ac_optarg
f69335e6 1232 export $ac_envvar ;;
1233
f40ec73c 1234 *)
f69335e6 1235 # FIXME: should be removed in autoconf 3.0.
bb0a50d8 1236 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
f69335e6 1237 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
bb0a50d8 1238 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
0ff0b04a 1239 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
f40ec73c 1240 ;;
1241
1242 esac
1243done
1244
1245if test -n "$ac_prev"; then
f69335e6 1246 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
0ff0b04a 1247 as_fn_error $? "missing argument to $ac_option"
94c2b583 1248fi
1249
1250if test -n "$ac_unrecognized_opts"; then
1251 case $enable_option_checking in
1252 no) ;;
0ff0b04a 1253 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
bb0a50d8 1254 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
94c2b583 1255 esac
c0790e90 1256fi
1257
94c2b583 1258# Check all directory arguments for consistency.
cadd4230
BM
1259for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1260 datadir sysconfdir sharedstatedir localstatedir includedir \
1261 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
5e0ed6d6 1262 libdir localedir mandir runstatedir
f40ec73c 1263do
cadd4230 1264 eval ac_val=\$$ac_var
94c2b583 1265 # Remove trailing slashes.
1266 case $ac_val in
1267 */ )
1268 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1269 eval $ac_var=\$ac_val;;
1270 esac
1271 # Be sure to have absolute directory names.
f69335e6 1272 case $ac_val in
cadd4230
BM
1273 [\\/$]* | ?:[\\/]* ) continue;;
1274 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
f40ec73c 1275 esac
0ff0b04a 1276 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
f40ec73c 1277done
1278
f69335e6 1279# There might be people who depend on the old broken behavior: `$host'
1280# used to hold the argument of --host etc.
1281# FIXME: To remove some day.
1282build=$build_alias
1283host=$host_alias
1284target=$target_alias
1285
1286# FIXME: To remove some day.
1287if test "x$host_alias" != x; then
1288 if test "x$build_alias" = x; then
1289 cross_compiling=maybe
f69335e6 1290 elif test "x$build_alias" != "x$host_alias"; then
1291 cross_compiling=yes
1292 fi
1293fi
f40ec73c 1294
f69335e6 1295ac_tool_prefix=
1296test -n "$host_alias" && ac_tool_prefix=$host_alias-
1297
1298test "$silent" = yes && exec 6>/dev/null
f40ec73c 1299
f40ec73c 1300
cadd4230
BM
1301ac_pwd=`pwd` && test -n "$ac_pwd" &&
1302ac_ls_di=`ls -di .` &&
1303ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
0ff0b04a 1304 as_fn_error $? "working directory cannot be determined"
cadd4230 1305test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
0ff0b04a 1306 as_fn_error $? "pwd does not report name of working directory"
cadd4230
BM
1307
1308
f40ec73c 1309# Find the source files, if location was not specified.
1310if test -z "$srcdir"; then
1311 ac_srcdir_defaulted=yes
cadd4230 1312 # Try the directory containing this script, then the parent directory.
94c2b583 1313 ac_confdir=`$as_dirname -- "$as_myself" ||
1314$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1315 X"$as_myself" : 'X\(//\)[^/]' \| \
1316 X"$as_myself" : 'X\(//\)$' \| \
1317 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
bb0a50d8 1318printf "%s\n" X"$as_myself" |
cadd4230
BM
1319 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1320 s//\1/
1321 q
1322 }
1323 /^X\(\/\/\)[^/].*/{
1324 s//\1/
1325 q
1326 }
1327 /^X\(\/\/\)$/{
1328 s//\1/
1329 q
1330 }
1331 /^X\(\/\).*/{
1332 s//\1/
1333 q
1334 }
1335 s/.*/./; q'`
f40ec73c 1336 srcdir=$ac_confdir
cadd4230 1337 if test ! -r "$srcdir/$ac_unique_file"; then
f40ec73c 1338 srcdir=..
1339 fi
1340else
1341 ac_srcdir_defaulted=no
1342fi
cadd4230
BM
1343if test ! -r "$srcdir/$ac_unique_file"; then
1344 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
0ff0b04a 1345 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
f40ec73c 1346fi
cadd4230
BM
1347ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1348ac_abs_confdir=`(
0ff0b04a 1349 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
cadd4230
BM
1350 pwd)`
1351# When building in place, set srcdir=.
1352if test "$ac_abs_confdir" = "$ac_pwd"; then
1353 srcdir=.
1354fi
1355# Remove unnecessary trailing slashes from srcdir.
1356# Double slashes in file names in object file debugging info
1357# mess up M-x gdb in Emacs.
1358case $srcdir in
1359*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1360esac
1361for ac_var in $ac_precious_vars; do
1362 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1363 eval ac_env_${ac_var}_value=\$${ac_var}
1364 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1365 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1366done
f69335e6 1367
1368#
1369# Report the --help message.
1370#
1371if test "$ac_init_help" = "long"; then
1372 # Omit some internal or obsolete options to make the list less imposing.
1373 # This message is too long to be a string in the A/UX 3.1 sh.
1374 cat <<_ACEOF
5a17e551 1375\`configure' configures unrealircd 6.1.6-git to adapt to many kinds of systems.
f69335e6 1376
1377Usage: $0 [OPTION]... [VAR=VALUE]...
1378
1379To assign environment variables (e.g., CC, CFLAGS...), specify them as
1380VAR=VALUE. See below for descriptions of some of the useful variables.
1381
1382Defaults for the options are specified in brackets.
1383
1384Configuration:
1385 -h, --help display this help and exit
1386 --help=short display options specific to this package
1387 --help=recursive display the short help of all the included packages
1388 -V, --version display version information and exit
0ff0b04a 1389 -q, --quiet, --silent do not print \`checking ...' messages
f69335e6 1390 --cache-file=FILE cache test results in FILE [disabled]
1391 -C, --config-cache alias for \`--cache-file=config.cache'
1392 -n, --no-create do not create output files
1393 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1394
f69335e6 1395Installation directories:
1396 --prefix=PREFIX install architecture-independent files in PREFIX
94c2b583 1397 [$ac_default_prefix]
f69335e6 1398 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
94c2b583 1399 [PREFIX]
f69335e6 1400
1401By default, \`make install' will install all the files in
1402\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1403an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1404for instance \`--prefix=\$HOME'.
1405
1406For better control, use the options below.
1407
1408Fine tuning of the installation directories:
94c2b583 1409 --bindir=DIR user executables [EPREFIX/bin]
1410 --sbindir=DIR system admin executables [EPREFIX/sbin]
1411 --libexecdir=DIR program executables [EPREFIX/libexec]
1412 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1413 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1414 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
5e0ed6d6 1415 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
94c2b583 1416 --libdir=DIR object code libraries [EPREFIX/lib]
1417 --includedir=DIR C header files [PREFIX/include]
1418 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1419 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1420 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1421 --infodir=DIR info documentation [DATAROOTDIR/info]
1422 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1423 --mandir=DIR man documentation [DATAROOTDIR/man]
1424 --docdir=DIR documentation root [DATAROOTDIR/doc/unrealircd]
1425 --htmldir=DIR html documentation [DOCDIR]
1426 --dvidir=DIR dvi documentation [DOCDIR]
1427 --pdfdir=DIR pdf documentation [DOCDIR]
1428 --psdir=DIR ps documentation [DOCDIR]
f69335e6 1429_ACEOF
1430
1431 cat <<\_ACEOF
f81d2207
BM
1432
1433System types:
1434 --build=BUILD configure for building on BUILD [guessed]
1435 --host=HOST cross-compile to build programs to run on HOST [BUILD]
f69335e6 1436_ACEOF
1437fi
1438
1439if test -n "$ac_init_help"; then
2828e7f8 1440 case $ac_init_help in
5a17e551 1441 short | recursive ) echo "Configuration of unrealircd 6.1.6-git:";;
2828e7f8 1442 esac
f69335e6 1443 cat <<\_ACEOF
1444
1445Optional Features:
94c2b583 1446 --disable-option-checking ignore unrecognized --enable/--with options
f69335e6 1447 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1448 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
bae1dcf1
BM
1449 --enable-hardening Enable compiler and linker options to frustrate
1450 memory corruption exploits [yes]
c342b432
BM
1451 --enable-ssl= enable ssl will check /usr/local/opt/openssl
1452 /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg
1453 /usr/sfw /usr/local /usr
7dbf154d 1454 --disable-dynamic-linking
1455 Make the IRCd statically link with shared objects
1456 rather than dynamically (noone knows if disabling
1457 dynamic linking actually does anything or not)
821a0464 1458 --enable-werror Turn compilation warnings into errors (-Werror)
001c1e78 1459 --enable-asan Enable address sanitizer and other debugging
d9166bd6 1460 options, not recommended for production servers!
b2e4cf82 1461 --enable-libcurl=DIR enable libcurl (remote include) support
ed7bf1da
BM
1462 --enable-geoip-classic=no/yes
1463 enable GeoIP Classic support
9c3d5dff 1464 --enable-libmaxminddb=no/yes
1465 enable GeoIP libmaxminddb support
f69335e6 1466
1467Optional Packages:
1468 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1469 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
af289c86 1470 --with-nick-history=length
1471 Specify the length of the nickname history
af289c86 1472 --with-permissions=permissions
1473 Specify the default permissions for configuration
1474 files
5e94fc9c
BM
1475 --with-bindir=path Specify the directory for the unrealircd binary
1476 --with-scriptdir=path Specify the directory for the unrealircd start-stop
1477 script
1478 --with-confdir=path Specify the directory where configuration files are
af289c86 1479 stored
dfa83aa6 1480 --with-builddir=path Specify the build directory
5e94fc9c
BM
1481 --with-modulesdir=path Specify the directory for loadable modules
1482 --with-logdir=path Specify the directory where log files are stored
1483 --with-cachedir=path Specify the directory where cached files are stored
1484 --with-tmpdir=path Specify the directory where private temporary files
1485 are stored. Should not be readable or writable by
1486 others, so not /tmp!!
1487 --with-datadir=path Specify the directory where permanent data is stored
1488 --with-docdir=path Specify the directory where documentation is stored
1489 --with-pidfile=path Specify the path of the pid file
39688517 1490 --with-controlfile=path Specify the path of the control socket
fd35f965
BM
1491 --with-privatelibdir=path
1492 Specify the directory where private libraries are
590e345b 1493 stored. Disable when building a package for a distro
6d3a9865
BM
1494 --with-maxconnections=size
1495 Specify the max file descriptors to use
1bb24f05 1496 --with-no-operoverride Disable OperOverride
1bb24f05 1497 --with-operoverride-verify
1498 Require opers to invite themselves to +s/+p channels
05e3ed63 1499 --without-system-pcre2 Use the system pcre2 package instead of bundled,
547b2d69 1500 discovered using pkg-config
5688825e
BM
1501 --with-system-argon2 Use system argon2 instead of bundled version.
1502 Normally we prefer the one shipped with unrealircd
1503 because it is much faster
5daf7e7e
BM
1504 --without-system-sodium Use bundled version instead of system sodium
1505 library. Normally autodetected via pkg-config
c133dfd3
BM
1506 --without-system-cares Use bundled version instead of system c-ares.
1507 Normally autodetected via pkg-config.
f89348d2
BM
1508 --without-system-jansson
1509 Use bundled version instead of system jansson.
1510 Normally autodetected via pkg-config.
f69335e6 1511
1512Some influential environment variables:
1513 CC C compiler command
1514 CFLAGS C compiler flags
1515 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1516 nonstandard directory <lib dir>
cadd4230 1517 LIBS libraries to pass to the linker, e.g. -l<library>
94c2b583 1518 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
cadd4230 1519 you have headers in a nonstandard directory <include dir>
f69335e6 1520 CPP C preprocessor
70ec1b1e 1521 PKG_CONFIG path to pkg-config utility
42d8a95c
WP
1522 PKG_CONFIG_PATH
1523 directories to add to pkg-config's search path
1524 PKG_CONFIG_LIBDIR
1525 path overriding pkg-config's built-in search path
547b2d69
BM
1526 PCRE2_CFLAGS
1527 C compiler flags for PCRE2, overriding pkg-config
1528 PCRE2_LIBS linker flags for PCRE2, overriding pkg-config
a852b480
BM
1529 ARGON2_CFLAGS
1530 C compiler flags for ARGON2, overriding pkg-config
1531 ARGON2_LIBS linker flags for ARGON2, overriding pkg-config
5daf7e7e
BM
1532 SODIUM_CFLAGS
1533 C compiler flags for SODIUM, overriding pkg-config
1534 SODIUM_LIBS linker flags for SODIUM, overriding pkg-config
5f727eec
BM
1535 CARES_CFLAGS
1536 C compiler flags for CARES, overriding pkg-config
1537 CARES_LIBS linker flags for CARES, overriding pkg-config
f89348d2
BM
1538 JANSSON_CFLAGS
1539 C compiler flags for JANSSON, overriding pkg-config
1540 JANSSON_LIBS
1541 linker flags for JANSSON, overriding pkg-config
ed7bf1da
BM
1542 GEOIP_CLASSIC_CFLAGS
1543 C compiler flags for GEOIP_CLASSIC, overriding pkg-config
1544 GEOIP_CLASSIC_LIBS
1545 linker flags for GEOIP_CLASSIC, overriding pkg-config
9c3d5dff 1546 LIBMAXMINDDB_CFLAGS
1547 C compiler flags for LIBMAXMINDDB, overriding pkg-config
1548 LIBMAXMINDDB_LIBS
1549 linker flags for LIBMAXMINDDB, overriding pkg-config
f69335e6 1550
1551Use these variables to override the choices made by `configure' or to help
1552it to find libraries and programs with nonstandard names/locations.
1553
ed1f47f8
BM
1554Report bugs to <https://bugs.unrealircd.org/>.
1555unrealircd home page: <https://unrealircd.org/>.
f69335e6 1556_ACEOF
cadd4230 1557ac_status=$?
f69335e6 1558fi
1559
1560if test "$ac_init_help" = "recursive"; then
1561 # If there are subdirs, report their specific --help.
f69335e6 1562 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
94c2b583 1563 test -d "$ac_dir" ||
1564 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1565 continue
f69335e6 1566 ac_builddir=.
1567
cadd4230
BM
1568case "$ac_dir" in
1569.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1570*)
bb0a50d8 1571 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
cadd4230 1572 # A ".." for each directory in $ac_dir_suffix.
bb0a50d8 1573 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
cadd4230
BM
1574 case $ac_top_builddir_sub in
1575 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1576 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1577 esac ;;
1578esac
1579ac_abs_top_builddir=$ac_pwd
1580ac_abs_builddir=$ac_pwd$ac_dir_suffix
1581# for backward compatibility:
1582ac_top_builddir=$ac_top_build_prefix
f69335e6 1583
1584case $srcdir in
cadd4230 1585 .) # We are building in place.
f69335e6 1586 ac_srcdir=.
cadd4230
BM
1587 ac_top_srcdir=$ac_top_builddir_sub
1588 ac_abs_top_srcdir=$ac_pwd ;;
1589 [\\/]* | ?:[\\/]* ) # Absolute name.
f69335e6 1590 ac_srcdir=$srcdir$ac_dir_suffix;
cadd4230
BM
1591 ac_top_srcdir=$srcdir
1592 ac_abs_top_srcdir=$srcdir ;;
1593 *) # Relative name.
1594 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1595 ac_top_srcdir=$ac_top_build_prefix$srcdir
1596 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
545d087a 1597esac
cadd4230
BM
1598ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1599
1600 cd "$ac_dir" || { ac_status=$?; continue; }
bb0a50d8
BM
1601 # Check for configure.gnu first; this name is used for a wrapper for
1602 # Metaconfig's "Configure" on case-insensitive file systems.
cadd4230
BM
1603 if test -f "$ac_srcdir/configure.gnu"; then
1604 echo &&
1605 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1606 elif test -f "$ac_srcdir/configure"; then
1607 echo &&
1608 $SHELL "$ac_srcdir/configure" --help=recursive
f69335e6 1609 else
bb0a50d8 1610 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
cadd4230
BM
1611 fi || ac_status=$?
1612 cd "$ac_pwd" || { ac_status=$?; break; }
f69335e6 1613 done
1614fi
1615
cadd4230 1616test -n "$ac_init_help" && exit $ac_status
f69335e6 1617if $ac_init_version; then
1618 cat <<\_ACEOF
5a17e551 1619unrealircd configure 6.1.6-git
bb0a50d8 1620generated by GNU Autoconf 2.71
f69335e6 1621
bb0a50d8 1622Copyright (C) 2021 Free Software Foundation, Inc.
f69335e6 1623This configure script is free software; the Free Software Foundation
1624gives unlimited permission to copy, distribute and modify it.
1625_ACEOF
cadd4230 1626 exit
f69335e6 1627fi
f69335e6 1628
94c2b583 1629## ------------------------ ##
1630## Autoconf initialization. ##
1631## ------------------------ ##
7dbf154d 1632
94c2b583 1633# ac_fn_c_try_compile LINENO
1634# --------------------------
1635# Try to compile conftest.$ac_ext, and return whether this succeeded.
1636ac_fn_c_try_compile ()
7dbf154d 1637{
94c2b583 1638 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
bb0a50d8 1639 rm -f conftest.$ac_objext conftest.beam
94c2b583 1640 if { { ac_try="$ac_compile"
1641case "(($ac_try" in
1642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1643 *) ac_try_echo=$ac_try;;
1644esac
1645eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
bb0a50d8 1646printf "%s\n" "$ac_try_echo"; } >&5
94c2b583 1647 (eval "$ac_compile") 2>conftest.err
1648 ac_status=$?
1649 if test -s conftest.err; then
1650 grep -v '^ *+' conftest.err >conftest.er1
1651 cat conftest.er1 >&5
1652 mv -f conftest.er1 conftest.err
1653 fi
bb0a50d8 1654 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
94c2b583 1655 test $ac_status = 0; } && {
1656 test -z "$ac_c_werror_flag" ||
1657 test ! -s conftest.err
bb0a50d8
BM
1658 } && test -s conftest.$ac_objext
1659then :
94c2b583 1660 ac_retval=0
bb0a50d8
BM
1661else $as_nop
1662 printf "%s\n" "$as_me: failed program was:" >&5
94c2b583 1663sed 's/^/| /' conftest.$ac_ext >&5
7dbf154d 1664
94c2b583 1665 ac_retval=1
1666fi
0ff0b04a 1667 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
94c2b583 1668 as_fn_set_status $ac_retval
7dbf154d 1669
94c2b583 1670} # ac_fn_c_try_compile
4eff1e84 1671
94c2b583 1672# ac_fn_c_try_link LINENO
1673# -----------------------
1674# Try to link conftest.$ac_ext, and return whether this succeeded.
1675ac_fn_c_try_link ()
1676{
1677 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
bb0a50d8 1678 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
94c2b583 1679 if { { ac_try="$ac_link"
1680case "(($ac_try" in
1681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1682 *) ac_try_echo=$ac_try;;
1683esac
1684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
bb0a50d8 1685printf "%s\n" "$ac_try_echo"; } >&5
94c2b583 1686 (eval "$ac_link") 2>conftest.err
1687 ac_status=$?
1688 if test -s conftest.err; then
1689 grep -v '^ *+' conftest.err >conftest.er1
1690 cat conftest.er1 >&5
1691 mv -f conftest.er1 conftest.err
1692 fi
bb0a50d8 1693 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
94c2b583 1694 test $ac_status = 0; } && {
1695 test -z "$ac_c_werror_flag" ||
1696 test ! -s conftest.err
1697 } && test -s conftest$ac_exeext && {
1698 test "$cross_compiling" = yes ||
f1c5f885 1699 test -x conftest$ac_exeext
bb0a50d8
BM
1700 }
1701then :
94c2b583 1702 ac_retval=0
bb0a50d8
BM
1703else $as_nop
1704 printf "%s\n" "$as_me: failed program was:" >&5
94c2b583 1705sed 's/^/| /' conftest.$ac_ext >&5
4eff1e84 1706
94c2b583 1707 ac_retval=1
1708fi
1709 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1710 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1711 # interfere with the next link command; also delete a directory that is
1712 # left behind by Apple's compiler. We do this before executing the actions.
1713 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
0ff0b04a 1714 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
94c2b583 1715 as_fn_set_status $ac_retval
7dbf154d 1716
94c2b583 1717} # ac_fn_c_try_link
7dbf154d 1718
c19165c8
BM
1719# ac_fn_c_try_run LINENO
1720# ----------------------
bb0a50d8
BM
1721# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1722# executables *can* be run.
c19165c8
BM
1723ac_fn_c_try_run ()
1724{
1725 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1726 if { { ac_try="$ac_link"
1727case "(($ac_try" in
1728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1729 *) ac_try_echo=$ac_try;;
1730esac
1731eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
bb0a50d8 1732printf "%s\n" "$ac_try_echo"; } >&5
c19165c8
BM
1733 (eval "$ac_link") 2>&5
1734 ac_status=$?
bb0a50d8 1735 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
c19165c8
BM
1736 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1737 { { case "(($ac_try" in
1738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1739 *) ac_try_echo=$ac_try;;
1740esac
1741eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
bb0a50d8 1742printf "%s\n" "$ac_try_echo"; } >&5
c19165c8
BM
1743 (eval "$ac_try") 2>&5
1744 ac_status=$?
bb0a50d8
BM
1745 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1746 test $ac_status = 0; }; }
1747then :
c19165c8 1748 ac_retval=0
bb0a50d8
BM
1749else $as_nop
1750 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1751 printf "%s\n" "$as_me: failed program was:" >&5
c19165c8
BM
1752sed 's/^/| /' conftest.$ac_ext >&5
1753
1754 ac_retval=$ac_status
1755fi
1756 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1757 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1758 as_fn_set_status $ac_retval
1759
1760} # ac_fn_c_try_run
1761
8783280a
BM
1762# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1763# -------------------------------------------------------
1764# Tests whether HEADER exists and can be compiled using the include files in
1765# INCLUDES, setting the cache variable VAR accordingly.
1766ac_fn_c_check_header_compile ()
1767{
1768 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
bb0a50d8
BM
1769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1770printf %s "checking for $2... " >&6; }
1771if eval test \${$3+y}
1772then :
1773 printf %s "(cached) " >&6
1774else $as_nop
8783280a
BM
1775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1776/* end confdefs.h. */
1777$4
1778#include <$2>
1779_ACEOF
bb0a50d8
BM
1780if ac_fn_c_try_compile "$LINENO"
1781then :
8783280a 1782 eval "$3=yes"
bb0a50d8 1783else $as_nop
8783280a
BM
1784 eval "$3=no"
1785fi
bb0a50d8 1786rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8783280a
BM
1787fi
1788eval ac_res=\$$3
bb0a50d8
BM
1789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1790printf "%s\n" "$ac_res" >&6; }
8783280a
BM
1791 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1792
1793} # ac_fn_c_check_header_compile
1794
94c2b583 1795# ac_fn_c_check_func LINENO FUNC VAR
1796# ----------------------------------
1797# Tests whether FUNC exists, setting the cache variable VAR accordingly
1798ac_fn_c_check_func ()
1799{
1800 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
bb0a50d8
BM
1801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1802printf %s "checking for $2... " >&6; }
1803if eval test \${$3+y}
1804then :
1805 printf %s "(cached) " >&6
1806else $as_nop
94c2b583 1807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85904c22 1808/* end confdefs.h. */
94c2b583 1809/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1810 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1811#define $2 innocuous_$2
1812
1813/* System header to define __stub macros and hopefully few prototypes,
bb0a50d8 1814 which can conflict with char $2 (); below. */
94c2b583 1815
bb0a50d8 1816#include <limits.h>
94c2b583 1817#undef $2
1818
1819/* Override any GCC internal prototype to avoid an error.
1820 Use char because int might match the return type of a GCC
1821 builtin and then its argument prototype would still apply. */
1822#ifdef __cplusplus
1823extern "C"
1824#endif
1825char $2 ();
1826/* The GNU C library defines this for functions which it implements
1827 to always fail with ENOSYS. Some functions are actually named
1828 something starting with __ and the normal name is an alias. */
1829#if defined __stub_$2 || defined __stub___$2
1830choke me
1831#endif
1832
85904c22 1833int
bb0a50d8 1834main (void)
85904c22 1835{
94c2b583 1836return $2 ();
85904c22
BM
1837 ;
1838 return 0;
1839}
1840_ACEOF
bb0a50d8
BM
1841if ac_fn_c_try_link "$LINENO"
1842then :
94c2b583 1843 eval "$3=yes"
bb0a50d8 1844else $as_nop
94c2b583 1845 eval "$3=no"
85904c22 1846fi
bb0a50d8 1847rm -f core conftest.err conftest.$ac_objext conftest.beam \
94c2b583 1848 conftest$ac_exeext conftest.$ac_ext
85904c22 1849fi
94c2b583 1850eval ac_res=\$$3
bb0a50d8
BM
1851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1852printf "%s\n" "$ac_res" >&6; }
0ff0b04a 1853 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
85904c22 1854
94c2b583 1855} # ac_fn_c_check_func
bb0a50d8
BM
1856
1857# ac_fn_c_try_cpp LINENO
1858# ----------------------
1859# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1860ac_fn_c_try_cpp ()
1861{
1862 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1863 if { { ac_try="$ac_cpp conftest.$ac_ext"
1864case "(($ac_try" in
1865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1866 *) ac_try_echo=$ac_try;;
1867esac
1868eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1869printf "%s\n" "$ac_try_echo"; } >&5
1870 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1871 ac_status=$?
1872 if test -s conftest.err; then
1873 grep -v '^ *+' conftest.err >conftest.er1
1874 cat conftest.er1 >&5
1875 mv -f conftest.er1 conftest.err
1876 fi
1877 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1878 test $ac_status = 0; } > conftest.i && {
1879 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1880 test ! -s conftest.err
1881 }
1882then :
1883 ac_retval=0
1884else $as_nop
1885 printf "%s\n" "$as_me: failed program was:" >&5
1886sed 's/^/| /' conftest.$ac_ext >&5
1887
1888 ac_retval=1
1889fi
1890 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1891 as_fn_set_status $ac_retval
1892
1893} # ac_fn_c_try_cpp
1894ac_configure_args_raw=
1895for ac_arg
1896do
1897 case $ac_arg in
1898 *\'*)
1899 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1900 esac
1901 as_fn_append ac_configure_args_raw " '$ac_arg'"
1902done
1903
1904case $ac_configure_args_raw in
1905 *$as_nl*)
1906 ac_safe_unquote= ;;
1907 *)
1908 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
1909 ac_unsafe_a="$ac_unsafe_z#~"
1910 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
1911 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
1912esac
1913
94c2b583 1914cat >config.log <<_ACEOF
1915This file contains any messages produced by compilers while
1916running configure, to aid debugging if configure makes a mistake.
85904c22 1917
5a17e551 1918It was created by unrealircd $as_me 6.1.6-git, which was
bb0a50d8 1919generated by GNU Autoconf 2.71. Invocation command line was
94c2b583 1920
bb0a50d8 1921 $ $0$ac_configure_args_raw
85904c22 1922
85904c22 1923_ACEOF
94c2b583 1924exec 5>>config.log
85904c22 1925{
94c2b583 1926cat <<_ASUNAME
1927## --------- ##
1928## Platform. ##
1929## --------- ##
1930
1931hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1932uname -m = `(uname -m) 2>/dev/null || echo unknown`
1933uname -r = `(uname -r) 2>/dev/null || echo unknown`
1934uname -s = `(uname -s) 2>/dev/null || echo unknown`
1935uname -v = `(uname -v) 2>/dev/null || echo unknown`
1936
1937/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1938/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1939
1940/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1941/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1942/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1943/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1944/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1945/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1946/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1947
1948_ASUNAME
1949
1950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1951for as_dir in $PATH
1952do
1953 IFS=$as_save_IFS
bb0a50d8
BM
1954 case $as_dir in #(((
1955 '') as_dir=./ ;;
1956 */) ;;
1957 *) as_dir=$as_dir/ ;;
1958 esac
1959 printf "%s\n" "PATH: $as_dir"
94c2b583 1960 done
1961IFS=$as_save_IFS
1962
1963} >&5
1964
1965cat >&5 <<_ACEOF
1966
1967
1968## ----------- ##
1969## Core tests. ##
1970## ----------- ##
1971
85904c22 1972_ACEOF
85904c22 1973
85904c22 1974
94c2b583 1975# Keep a trace of the command line.
1976# Strip out --no-create and --no-recursion so they do not pile up.
1977# Strip out --silent because we don't want to record it for future runs.
1978# Also quote any args containing shell meta-characters.
1979# Make two passes to allow for proper duplicate-argument suppression.
1980ac_configure_args=
1981ac_configure_args0=
1982ac_configure_args1=
1983ac_must_keep_next=false
1984for ac_pass in 1 2
1985do
1986 for ac_arg
1987 do
1988 case $ac_arg in
1989 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1990 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1991 | -silent | --silent | --silen | --sile | --sil)
1992 continue ;;
1993 *\'*)
bb0a50d8 1994 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
94c2b583 1995 esac
1996 case $ac_pass in
1997 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1998 2)
1999 as_fn_append ac_configure_args1 " '$ac_arg'"
2000 if test $ac_must_keep_next = true; then
2001 ac_must_keep_next=false # Got value, back to normal.
2002 else
2003 case $ac_arg in
2004 *=* | --config-cache | -C | -disable-* | --disable-* \
2005 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2006 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2007 | -with-* | --with-* | -without-* | --without-* | --x)
2008 case "$ac_configure_args0 " in
2009 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2010 esac
2011 ;;
2012 -* ) ac_must_keep_next=true ;;
2013 esac
2014 fi
2015 as_fn_append ac_configure_args " '$ac_arg'"
2016 ;;
2017 esac
2018 done
2019done
2020{ ac_configure_args0=; unset ac_configure_args0;}
2021{ ac_configure_args1=; unset ac_configure_args1;}
2022
2023# When interrupted or exit'd, cleanup temporary files, and complete
2024# config.log. We remove comments because anyway the quotes in there
2025# would cause problems or look ugly.
2026# WARNING: Use '\'' to represent an apostrophe within the trap.
2027# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2028trap 'exit_status=$?
bb0a50d8
BM
2029 # Sanitize IFS.
2030 IFS=" "" $as_nl"
94c2b583 2031 # Save into config.log some information that might help in debugging.
2032 {
2033 echo
2034
bb0a50d8 2035 printf "%s\n" "## ---------------- ##
94c2b583 2036## Cache variables. ##
0ff0b04a 2037## ---------------- ##"
94c2b583 2038 echo
2039 # The following way of writing the cache mishandles newlines in values,
2040(
2041 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2042 eval ac_val=\$$ac_var
2043 case $ac_val in #(
2044 *${as_nl}*)
2045 case $ac_var in #(
bb0a50d8
BM
2046 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2047printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
94c2b583 2048 esac
2049 case $ac_var in #(
2050 _ | IFS | as_nl) ;; #(
2051 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2052 *) { eval $ac_var=; unset $ac_var;} ;;
2053 esac ;;
2054 esac
2055 done
2056 (set) 2>&1 |
2057 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2058 *${as_nl}ac_space=\ *)
2059 sed -n \
2060 "s/'\''/'\''\\\\'\'''\''/g;
2061 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2062 ;; #(
2063 *)
2064 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2065 ;;
2066 esac |
2067 sort
2068)
2069 echo
2070
bb0a50d8 2071 printf "%s\n" "## ----------------- ##
94c2b583 2072## Output variables. ##
0ff0b04a 2073## ----------------- ##"
94c2b583 2074 echo
2075 for ac_var in $ac_subst_vars
2076 do
2077 eval ac_val=\$$ac_var
2078 case $ac_val in
bb0a50d8 2079 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
94c2b583 2080 esac
bb0a50d8 2081 printf "%s\n" "$ac_var='\''$ac_val'\''"
94c2b583 2082 done | sort
2083 echo
2084
2085 if test -n "$ac_subst_files"; then
bb0a50d8 2086 printf "%s\n" "## ------------------- ##
94c2b583 2087## File substitutions. ##
0ff0b04a 2088## ------------------- ##"
94c2b583 2089 echo
2090 for ac_var in $ac_subst_files
2091 do
2092 eval ac_val=\$$ac_var
2093 case $ac_val in
bb0a50d8 2094 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
94c2b583 2095 esac
bb0a50d8 2096 printf "%s\n" "$ac_var='\''$ac_val'\''"
94c2b583 2097 done | sort
2098 echo
2099 fi
2100
2101 if test -s confdefs.h; then
bb0a50d8 2102 printf "%s\n" "## ----------- ##
94c2b583 2103## confdefs.h. ##
0ff0b04a 2104## ----------- ##"
94c2b583 2105 echo
2106 cat confdefs.h
2107 echo
2108 fi
2109 test "$ac_signal" != 0 &&
bb0a50d8
BM
2110 printf "%s\n" "$as_me: caught signal $ac_signal"
2111 printf "%s\n" "$as_me: exit $exit_status"
94c2b583 2112 } >&5
2113 rm -f core *.core core.conftest.* &&
2114 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2115 exit $exit_status
2116' 0
2117for ac_signal in 1 2 13 15; do
2118 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2119done
2120ac_signal=0
2121
2122# confdefs.h avoids OS command line length limits that DEFS can exceed.
2123rm -f -r conftest* confdefs.h
2124
bb0a50d8 2125printf "%s\n" "/* confdefs.h */" > confdefs.h
94c2b583 2126
2127# Predefined preprocessor variables.
85904c22 2128
bb0a50d8 2129printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
85904c22 2130
bb0a50d8 2131printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
94c2b583 2132
bb0a50d8 2133printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
85904c22 2134
bb0a50d8 2135printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
85904c22 2136
bb0a50d8 2137printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
85904c22 2138
bb0a50d8 2139printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
85904c22 2140
85904c22 2141
94c2b583 2142# Let the site file select an alternate cache file if it wants to.
2143# Prefer an explicitly selected file to automatically selected ones.
94c2b583 2144if test -n "$CONFIG_SITE"; then
bb0a50d8 2145 ac_site_files="$CONFIG_SITE"
94c2b583 2146elif test "x$prefix" != xNONE; then
bb0a50d8 2147 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
85904c22 2148else
bb0a50d8 2149 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
94c2b583 2150fi
bb0a50d8
BM
2151
2152for ac_site_file in $ac_site_files
94c2b583 2153do
bb0a50d8
BM
2154 case $ac_site_file in #(
2155 */*) :
2156 ;; #(
2157 *) :
2158 ac_site_file=./$ac_site_file ;;
2159esac
2160 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2162printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
94c2b583 2163 sed 's/^/| /' "$ac_site_file" >&5
0ff0b04a 2164 . "$ac_site_file" \
bb0a50d8
BM
2165 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2166printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
0ff0b04a
NPB
2167as_fn_error $? "failed to load site script $ac_site_file
2168See \`config.log' for more details" "$LINENO" 5; }
94c2b583 2169 fi
2170done
2171
2172if test -r "$cache_file"; then
2173 # Some versions of bash will fail to source /dev/null (special files
2174 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2175 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
bb0a50d8
BM
2176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2177printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
94c2b583 2178 case $cache_file in
2179 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2180 *) . "./$cache_file";;
2181 esac
2182 fi
85904c22 2183else
bb0a50d8
BM
2184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2185printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
94c2b583 2186 >$cache_file
2187fi
85904c22 2188
bb0a50d8
BM
2189# Test code for whether the C compiler supports C89 (global declarations)
2190ac_c_conftest_c89_globals='
2191/* Does the compiler advertise C89 conformance?
2192 Do not test the value of __STDC__, because some compilers set it to 0
2193 while being otherwise adequately conformant. */
2194#if !defined __STDC__
2195# error "Compiler does not advertise C89 conformance"
2196#endif
85904c22 2197
bb0a50d8
BM
2198#include <stddef.h>
2199#include <stdarg.h>
2200struct stat;
2201/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
2202struct buf { int x; };
2203struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2204static char *e (p, i)
2205 char **p;
2206 int i;
2207{
2208 return p[i];
2209}
2210static char *f (char * (*g) (char **, int), char **p, ...)
2211{
2212 char *s;
2213 va_list v;
2214 va_start (v,p);
2215 s = g (p, va_arg (v,int));
2216 va_end (v);
2217 return s;
2218}
94c2b583 2219
bb0a50d8
BM
2220/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2221 function prototypes and stuff, but not \xHH hex character constants.
2222 These do not provoke an error unfortunately, instead are silently treated
2223 as an "x". The following induces an error, until -std is added to get
2224 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2225 array size at least. It is necessary to write \x00 == 0 to get something
2226 that is true only with -std. */
2227int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
94c2b583 2228
bb0a50d8
BM
2229/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2230 inside strings and character constants. */
2231#define FOO(x) '\''x'\''
2232int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
94c2b583 2233
bb0a50d8
BM
2234int test (int i, double x);
2235struct s1 {int (*f) (int a);};
2236struct s2 {int (*f) (double a);};
2237int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2238 int, int);'
94c2b583 2239
bb0a50d8
BM
2240# Test code for whether the C compiler supports C89 (body of main).
2241ac_c_conftest_c89_main='
2242ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2243'
85904c22 2244
bb0a50d8
BM
2245# Test code for whether the C compiler supports C99 (global declarations)
2246ac_c_conftest_c99_globals='
2247// Does the compiler advertise C99 conformance?
2248#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2249# error "Compiler does not advertise C99 conformance"
2250#endif
94c2b583 2251
bb0a50d8
BM
2252#include <stdbool.h>
2253extern int puts (const char *);
2254extern int printf (const char *, ...);
2255extern int dprintf (int, const char *, ...);
2256extern void *malloc (size_t);
94c2b583 2257
bb0a50d8
BM
2258// Check varargs macros. These examples are taken from C99 6.10.3.5.
2259// dprintf is used instead of fprintf to avoid needing to declare
2260// FILE and stderr.
2261#define debug(...) dprintf (2, __VA_ARGS__)
2262#define showlist(...) puts (#__VA_ARGS__)
2263#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2264static void
2265test_varargs_macros (void)
2266{
2267 int x = 1234;
2268 int y = 5678;
2269 debug ("Flag");
2270 debug ("X = %d\n", x);
2271 showlist (The first, second, and third items.);
2272 report (x>y, "x is %d but y is %d", x, y);
2273}
85904c22 2274
bb0a50d8
BM
2275// Check long long types.
2276#define BIG64 18446744073709551615ull
2277#define BIG32 4294967295ul
2278#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2279#if !BIG_OK
2280 #error "your preprocessor is broken"
2281#endif
2282#if BIG_OK
2283#else
2284 #error "your preprocessor is broken"
2285#endif
2286static long long int bignum = -9223372036854775807LL;
2287static unsigned long long int ubignum = BIG64;
94c2b583 2288
bb0a50d8
BM
2289struct incomplete_array
2290{
2291 int datasize;
2292 double data[];
2293};
85904c22 2294
bb0a50d8
BM
2295struct named_init {
2296 int number;
2297 const wchar_t *name;
2298 double average;
2299};
74ea7af9 2300
bb0a50d8 2301typedef const char *ccp;
21d0af6e 2302
bb0a50d8
BM
2303static inline int
2304test_restrict (ccp restrict text)
2305{
2306 // See if C++-style comments work.
2307 // Iterate through items via the restricted pointer.
2308 // Also check for declarations in for loops.
2309 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2310 continue;
2311 return 0;
2312}
23516d8e 2313
bb0a50d8
BM
2314// Check varargs and va_copy.
2315static bool
2316test_varargs (const char *format, ...)
2317{
2318 va_list args;
2319 va_start (args, format);
2320 va_list args_copy;
2321 va_copy (args_copy, args);
23516d8e 2322
bb0a50d8
BM
2323 const char *str = "";
2324 int number = 0;
2325 float fnumber = 0;
23516d8e 2326
bb0a50d8
BM
2327 while (*format)
2328 {
2329 switch (*format++)
2330 {
2331 case '\''s'\'': // string
2332 str = va_arg (args_copy, const char *);
2333 break;
2334 case '\''d'\'': // int
2335 number = va_arg (args_copy, int);
2336 break;
2337 case '\''f'\'': // float
2338 fnumber = va_arg (args_copy, double);
2339 break;
2340 default:
2341 break;
2342 }
2343 }
2344 va_end (args_copy);
2345 va_end (args);
23516d8e 2346
bb0a50d8
BM
2347 return *str && number && fnumber;
2348}
2349'
23516d8e 2350
bb0a50d8
BM
2351# Test code for whether the C compiler supports C99 (body of main).
2352ac_c_conftest_c99_main='
2353 // Check bool.
2354 _Bool success = false;
2355 success |= (argc != 0);
23516d8e 2356
bb0a50d8
BM
2357 // Check restrict.
2358 if (test_restrict ("String literal") == 0)
2359 success = true;
2360 char *restrict newvar = "Another string";
23516d8e 2361
bb0a50d8
BM
2362 // Check varargs.
2363 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2364 test_varargs_macros ();
23516d8e 2365
bb0a50d8
BM
2366 // Check flexible array members.
2367 struct incomplete_array *ia =
2368 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2369 ia->datasize = 10;
2370 for (int i = 0; i < ia->datasize; ++i)
2371 ia->data[i] = i * 1.234;
23516d8e 2372
bb0a50d8
BM
2373 // Check named initializers.
2374 struct named_init ni = {
2375 .number = 34,
2376 .name = L"Test wide string",
2377 .average = 543.34343,
2378 };
23516d8e 2379
bb0a50d8 2380 ni.number = 58;
23516d8e 2381
bb0a50d8
BM
2382 int dynamic_array[ni.number];
2383 dynamic_array[0] = argv[0][0];
2384 dynamic_array[ni.number - 1] = 543;
23516d8e 2385
bb0a50d8
BM
2386 // work around unused variable warnings
2387 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2388 || dynamic_array[ni.number - 1] != 543);
2389'
85904c22 2390
bb0a50d8
BM
2391# Test code for whether the C compiler supports C11 (global declarations)
2392ac_c_conftest_c11_globals='
2393// Does the compiler advertise C11 conformance?
2394#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2395# error "Compiler does not advertise C11 conformance"
2396#endif
85904c22 2397
bb0a50d8
BM
2398// Check _Alignas.
2399char _Alignas (double) aligned_as_double;
2400char _Alignas (0) no_special_alignment;
2401extern char aligned_as_int;
2402char _Alignas (0) _Alignas (int) aligned_as_int;
85904c22 2403
bb0a50d8
BM
2404// Check _Alignof.
2405enum
2406{
2407 int_alignment = _Alignof (int),
2408 int_array_alignment = _Alignof (int[100]),
2409 char_alignment = _Alignof (char)
2410};
2411_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2412
2413// Check _Noreturn.
2414int _Noreturn does_not_return (void) { for (;;) continue; }
2415
2416// Check _Static_assert.
2417struct test_static_assert
2418{
2419 int x;
2420 _Static_assert (sizeof (int) <= sizeof (long int),
2421 "_Static_assert does not work in struct");
2422 long int y;
2423};
2424
2425// Check UTF-8 literals.
2426#define u8 syntax error!
2427char const utf8_literal[] = u8"happens to be ASCII" "another string";
2428
2429// Check duplicate typedefs.
2430typedef long *long_ptr;
2431typedef long int *long_ptr;
2432typedef long_ptr long_ptr;
2433
2434// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2435struct anonymous
2436{
2437 union {
2438 struct { int i; int j; };
2439 struct { int k; long int l; } w;
2440 };
2441 int m;
2442} v1;
2443'
2444
2445# Test code for whether the C compiler supports C11 (body of main).
2446ac_c_conftest_c11_main='
2447 _Static_assert ((offsetof (struct anonymous, i)
2448 == offsetof (struct anonymous, w.k)),
2449 "Anonymous union alignment botch");
2450 v1.i = 2;
2451 v1.w.k = 5;
2452 ok |= v1.i != 5;
2453'
2454
2455# Test code for whether the C compiler supports C11 (complete).
2456ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2457${ac_c_conftest_c99_globals}
2458${ac_c_conftest_c11_globals}
2459
2460int
2461main (int argc, char **argv)
2462{
2463 int ok = 0;
2464 ${ac_c_conftest_c89_main}
2465 ${ac_c_conftest_c99_main}
2466 ${ac_c_conftest_c11_main}
2467 return ok;
2468}
2469"
2470
2471# Test code for whether the C compiler supports C99 (complete).
2472ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2473${ac_c_conftest_c99_globals}
2474
2475int
2476main (int argc, char **argv)
2477{
2478 int ok = 0;
2479 ${ac_c_conftest_c89_main}
2480 ${ac_c_conftest_c99_main}
2481 return ok;
2482}
2483"
2484
2485# Test code for whether the C compiler supports C89 (complete).
2486ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2487
2488int
2489main (int argc, char **argv)
2490{
2491 int ok = 0;
2492 ${ac_c_conftest_c89_main}
2493 return ok;
2494}
2495"
2496
2497as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2498as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2499as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2500as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2501as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2502as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2503as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2504as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2505as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2506
2507# Auxiliary files required by this configure script.
2508ac_aux_files="config.guess config.sub"
2509
2510# Locations in which to look for auxiliary files.
2511ac_aux_dir_candidates="${srcdir}/autoconf"
2512
2513# Search for a directory containing all of the required auxiliary files,
2514# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
2515# If we don't find one directory that contains all the files we need,
2516# we report the set of missing files from the *first* directory in
2517# $ac_aux_dir_candidates and give up.
2518ac_missing_aux_files=""
2519ac_first_candidate=:
2520printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
2521as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2522as_found=false
2523for as_dir in $ac_aux_dir_candidates
94c2b583 2524do
2525 IFS=$as_save_IFS
bb0a50d8
BM
2526 case $as_dir in #(((
2527 '') as_dir=./ ;;
2528 */) ;;
2529 *) as_dir=$as_dir/ ;;
2530 esac
2531 as_found=:
2532
2533 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
2534 ac_aux_dir_found=yes
2535 ac_install_sh=
2536 for ac_aux in $ac_aux_files
2537 do
2538 # As a special case, if "install-sh" is required, that requirement
2539 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
2540 # and $ac_install_sh is set appropriately for whichever one is found.
2541 if test x"$ac_aux" = x"install-sh"
2542 then
2543 if test -f "${as_dir}install-sh"; then
2544 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
2545 ac_install_sh="${as_dir}install-sh -c"
2546 elif test -f "${as_dir}install.sh"; then
2547 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
2548 ac_install_sh="${as_dir}install.sh -c"
2549 elif test -f "${as_dir}shtool"; then
2550 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
2551 ac_install_sh="${as_dir}shtool install -c"
2552 else
2553 ac_aux_dir_found=no
2554 if $ac_first_candidate; then
2555 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
2556 else
2557 break
2558 fi
2559 fi
2560 else
2561 if test -f "${as_dir}${ac_aux}"; then
2562 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
2563 else
2564 ac_aux_dir_found=no
2565 if $ac_first_candidate; then
2566 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
2567 else
2568 break
2569 fi
2570 fi
2571 fi
2572 done
2573 if test "$ac_aux_dir_found" = yes; then
2574 ac_aux_dir="$as_dir"
2575 break
94c2b583 2576 fi
bb0a50d8
BM
2577 ac_first_candidate=false
2578
2579 as_found=false
94c2b583 2580done
94c2b583 2581IFS=$as_save_IFS
bb0a50d8
BM
2582if $as_found
2583then :
85904c22 2584
bb0a50d8
BM
2585else $as_nop
2586 as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
94c2b583 2587fi
85904c22 2588
85904c22 2589
bb0a50d8
BM
2590# These three variables are undocumented and unsupported,
2591# and are intended to be withdrawn in a future Autoconf release.
2592# They can cause serious problems if a builder's source tree is in a directory
2593# whose full name contains unusual characters.
2594if test -f "${ac_aux_dir}config.guess"; then
2595 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
2596fi
2597if test -f "${ac_aux_dir}config.sub"; then
2598 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
2599fi
2600if test -f "$ac_aux_dir/configure"; then
2601 ac_configure="$SHELL ${ac_aux_dir}configure"
2602fi
2603
2604# Check that the precious variables saved in the cache have kept the same
2605# value.
2606ac_cache_corrupted=false
2607for ac_var in $ac_precious_vars; do
2608 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2609 eval ac_new_set=\$ac_env_${ac_var}_set
2610 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2611 eval ac_new_val=\$ac_env_${ac_var}_value
2612 case $ac_old_set,$ac_new_set in
2613 set,)
2614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2615printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2616 ac_cache_corrupted=: ;;
2617 ,set)
2618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2619printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2620 ac_cache_corrupted=: ;;
2621 ,);;
2622 *)
2623 if test "x$ac_old_val" != "x$ac_new_val"; then
2624 # differences in whitespace do not lead to failure.
2625 ac_old_val_w=`echo x $ac_old_val`
2626 ac_new_val_w=`echo x $ac_new_val`
2627 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2629printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2630 ac_cache_corrupted=:
2631 else
2632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2633printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2634 eval $ac_var=\$ac_old_val
2635 fi
2636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2637printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
2638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2639printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
2640 fi;;
2641 esac
2642 # Pass precious variables to config.status.
2643 if test "$ac_new_set" = set; then
2644 case $ac_new_val in
2645 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2646 *) ac_arg=$ac_var=$ac_new_val ;;
2647 esac
2648 case " $ac_configure_args " in
2649 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2650 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2651 esac
2652 fi
2653done
2654if $ac_cache_corrupted; then
2655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2656printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2658printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
2659 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
2660 and start over" "$LINENO" 5
2661fi
2662## -------------------- ##
2663## Main body of script. ##
2664## -------------------- ##
2665
2666ac_ext=c
2667ac_cpp='$CPP $CPPFLAGS'
2668ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2669ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2670ac_compiler_gnu=$ac_cv_c_compiler_gnu
2671
2672
2673
2674ac_config_headers="$ac_config_headers include/setup.h"
2675
2676
2677
2678
2679if test "x$enable_dynamic_linking" = "x"; then
2680 echo "Please use ./Config instead of ./configure"
2681 exit 1
2682fi
2683
2684orig_cflags="$CFLAGS"
2685
2686BUILDDIR_NOW="`pwd`"
2687
2688# Generation version number (e.g.: X in X.Y.Z)
2689UNREAL_VERSION_GENERATION="6"
2690
2691printf "%s\n" "#define UNREAL_VERSION_GENERATION $UNREAL_VERSION_GENERATION" >>confdefs.h
2692
2693
2694# Major version number (e.g.: Y in X.Y.Z)
b093ba53 2695UNREAL_VERSION_MAJOR="1"
bb0a50d8
BM
2696
2697printf "%s\n" "#define UNREAL_VERSION_MAJOR $UNREAL_VERSION_MAJOR" >>confdefs.h
2698
2699
2700# Minor version number (e.g.: Z in X.Y.Z)
5a17e551 2701UNREAL_VERSION_MINOR="6"
bb0a50d8
BM
2702
2703printf "%s\n" "#define UNREAL_VERSION_MINOR $UNREAL_VERSION_MINOR" >>confdefs.h
2704
2705
2706# The version suffix such as a beta marker or release candidate
2707# marker. (e.g.: -rcX for unrealircd-3.2.9-rcX). This macro is a
2708# string instead of an integer because it contains arbitrary data.
5a17e551 2709UNREAL_VERSION_SUFFIX="-git"
bb0a50d8
BM
2710
2711printf "%s\n" "#define UNREAL_VERSION_SUFFIX \"$UNREAL_VERSION_SUFFIX\"" >>confdefs.h
2712
2713
2714# Extract the first word of "rm", so it can be a program name with args.
2715set dummy rm; ac_word=$2
2716{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2717printf %s "checking for $ac_word... " >&6; }
2718if test ${ac_cv_path_RM+y}
2719then :
2720 printf %s "(cached) " >&6
2721else $as_nop
2722 case $RM in
2723 [\\/]* | ?:[\\/]*)
2724 ac_cv_path_RM="$RM" # Let the user override the test with a path.
2725 ;;
2726 *)
2727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2728for as_dir in $PATH
2729do
2730 IFS=$as_save_IFS
2731 case $as_dir in #(((
2732 '') as_dir=./ ;;
2733 */) ;;
2734 *) as_dir=$as_dir/ ;;
2735 esac
2736 for ac_exec_ext in '' $ac_executable_extensions; do
2737 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
2738 ac_cv_path_RM="$as_dir$ac_word$ac_exec_ext"
2739 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
2740 break 2
2741 fi
2742done
2743 done
2744IFS=$as_save_IFS
2745
2746 ;;
2747esac
2748fi
2749RM=$ac_cv_path_RM
2750if test -n "$RM"; then
2751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
2752printf "%s\n" "$RM" >&6; }
2753else
2754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2755printf "%s\n" "no" >&6; }
2756fi
2757
2758
2759# Extract the first word of "cp", so it can be a program name with args.
2760set dummy cp; ac_word=$2
2761{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2762printf %s "checking for $ac_word... " >&6; }
2763if test ${ac_cv_path_CP+y}
2764then :
2765 printf %s "(cached) " >&6
2766else $as_nop
2767 case $CP in
2768 [\\/]* | ?:[\\/]*)
2769 ac_cv_path_CP="$CP" # Let the user override the test with a path.
2770 ;;
2771 *)
2772 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2773for as_dir in $PATH
2774do
2775 IFS=$as_save_IFS
2776 case $as_dir in #(((
2777 '') as_dir=./ ;;
2778 */) ;;
2779 *) as_dir=$as_dir/ ;;
2780 esac
2781 for ac_exec_ext in '' $ac_executable_extensions; do
2782 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
2783 ac_cv_path_CP="$as_dir$ac_word$ac_exec_ext"
2784 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
2785 break 2
2786 fi
2787done
2788 done
2789IFS=$as_save_IFS
2790
2791 ;;
2792esac
2793fi
2794CP=$ac_cv_path_CP
2795if test -n "$CP"; then
2796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
2797printf "%s\n" "$CP" >&6; }
2798else
2799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2800printf "%s\n" "no" >&6; }
2801fi
2802
2803
2804# Extract the first word of "touch", so it can be a program name with args.
2805set dummy touch; ac_word=$2
2806{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2807printf %s "checking for $ac_word... " >&6; }
2808if test ${ac_cv_path_TOUCH+y}
2809then :
2810 printf %s "(cached) " >&6
2811else $as_nop
2812 case $TOUCH in
2813 [\\/]* | ?:[\\/]*)
2814 ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
dd2af3b3
BM
2815 ;;
2816 *)
2817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94c2b583 2818for as_dir in $PATH
2819do
2820 IFS=$as_save_IFS
bb0a50d8
BM
2821 case $as_dir in #(((
2822 '') as_dir=./ ;;
2823 */) ;;
2824 *) as_dir=$as_dir/ ;;
2825 esac
94c2b583 2826 for ac_exec_ext in '' $ac_executable_extensions; do
bb0a50d8
BM
2827 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
2828 ac_cv_path_TOUCH="$as_dir$ac_word$ac_exec_ext"
2829 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
94c2b583 2830 break 2
2831 fi
2832done
2833 done
2834IFS=$as_save_IFS
85904c22 2835
dd2af3b3
BM
2836 ;;
2837esac
85904c22 2838fi
dd2af3b3
BM
2839TOUCH=$ac_cv_path_TOUCH
2840if test -n "$TOUCH"; then
bb0a50d8
BM
2841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
2842printf "%s\n" "$TOUCH" >&6; }
85904c22 2843else
bb0a50d8
BM
2844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2845printf "%s\n" "no" >&6; }
85904c22
BM
2846fi
2847
94c2b583 2848
dd2af3b3
BM
2849# Extract the first word of "openssl", so it can be a program name with args.
2850set dummy openssl; ac_word=$2
bb0a50d8
BM
2851{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2852printf %s "checking for $ac_word... " >&6; }
2853if test ${ac_cv_path_OPENSSLPATH+y}
2854then :
2855 printf %s "(cached) " >&6
2856else $as_nop
dd2af3b3
BM
2857 case $OPENSSLPATH in
2858 [\\/]* | ?:[\\/]*)
2859 ac_cv_path_OPENSSLPATH="$OPENSSLPATH" # Let the user override the test with a path.
2860 ;;
2861 *)
2862 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94c2b583 2863for as_dir in $PATH
2864do
2865 IFS=$as_save_IFS
bb0a50d8
BM
2866 case $as_dir in #(((
2867 '') as_dir=./ ;;
2868 */) ;;
2869 *) as_dir=$as_dir/ ;;
2870 esac
94c2b583 2871 for ac_exec_ext in '' $ac_executable_extensions; do
bb0a50d8
BM
2872 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
2873 ac_cv_path_OPENSSLPATH="$as_dir$ac_word$ac_exec_ext"
2874 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
94c2b583 2875 break 2
2876 fi
2877done
2878 done
2879IFS=$as_save_IFS
85904c22 2880
dd2af3b3
BM
2881 ;;
2882esac
94c2b583 2883fi
dd2af3b3
BM
2884OPENSSLPATH=$ac_cv_path_OPENSSLPATH
2885if test -n "$OPENSSLPATH"; then
bb0a50d8
BM
2886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OPENSSLPATH" >&5
2887printf "%s\n" "$OPENSSLPATH" >&6; }
85904c22 2888else
bb0a50d8
BM
2889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2890printf "%s\n" "no" >&6; }
94c2b583 2891fi
85904c22 2892
85904c22 2893
bb0a50d8
BM
2894if test x"$OPENSSLPATH" = "x"
2895then :
81e2099f
BM
2896
2897echo ""
2898echo "Apparently you do not have both the openssl binary and openssl development libraries installed."
2899echo "The following packages are required:"
2900echo "1) The library package is often called 'openssl-dev', 'openssl-devel' or 'libssl-dev'"
2901echo "2) The binary package is usually called 'openssl'."
2902echo "NOTE: you or your system administrator needs to install the library AND the binary package."
2903echo "After doing so, simply re-run ./Config"
2904exit 1
2905
2906fi
2907
dd2af3b3
BM
2908# Extract the first word of "install", so it can be a program name with args.
2909set dummy install; ac_word=$2
bb0a50d8
BM
2910{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2911printf %s "checking for $ac_word... " >&6; }
2912if test ${ac_cv_path_INSTALL+y}
2913then :
2914 printf %s "(cached) " >&6
2915else $as_nop
dd2af3b3
BM
2916 case $INSTALL in
2917 [\\/]* | ?:[\\/]*)
2918 ac_cv_path_INSTALL="$INSTALL" # Let the user override the test with a path.
2919 ;;
2920 *)
2921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94c2b583 2922for as_dir in $PATH
2923do
2924 IFS=$as_save_IFS
bb0a50d8
BM
2925 case $as_dir in #(((
2926 '') as_dir=./ ;;
2927 */) ;;
2928 *) as_dir=$as_dir/ ;;
2929 esac
94c2b583 2930 for ac_exec_ext in '' $ac_executable_extensions; do
bb0a50d8
BM
2931 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
2932 ac_cv_path_INSTALL="$as_dir$ac_word$ac_exec_ext"
2933 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
94c2b583 2934 break 2
2935 fi
2936done
2937 done
2938IFS=$as_save_IFS
85904c22 2939
dd2af3b3
BM
2940 ;;
2941esac
94c2b583 2942fi
dd2af3b3
BM
2943INSTALL=$ac_cv_path_INSTALL
2944if test -n "$INSTALL"; then
bb0a50d8
BM
2945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2946printf "%s\n" "$INSTALL" >&6; }
85904c22 2947else
bb0a50d8
BM
2948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2949printf "%s\n" "no" >&6; }
85904c22
BM
2950fi
2951
94c2b583 2952
dd2af3b3
BM
2953# Extract the first word of "gunzip", so it can be a program name with args.
2954set dummy gunzip; ac_word=$2
bb0a50d8
BM
2955{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2956printf %s "checking for $ac_word... " >&6; }
2957if test ${ac_cv_path_GUNZIP+y}
2958then :
2959 printf %s "(cached) " >&6
2960else $as_nop
dd2af3b3
BM
2961 case $GUNZIP in
2962 [\\/]* | ?:[\\/]*)
2963 ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
2964 ;;
2965 *)
2966 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2967for as_dir in $PATH
2968do
2969 IFS=$as_save_IFS
bb0a50d8
BM
2970 case $as_dir in #(((
2971 '') as_dir=./ ;;
2972 */) ;;
2973 *) as_dir=$as_dir/ ;;
2974 esac
dd2af3b3 2975 for ac_exec_ext in '' $ac_executable_extensions; do
bb0a50d8
BM
2976 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
2977 ac_cv_path_GUNZIP="$as_dir$ac_word$ac_exec_ext"
2978 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
dd2af3b3 2979 break 2
94c2b583 2980 fi
85904c22 2981done
dd2af3b3
BM
2982 done
2983IFS=$as_save_IFS
94c2b583 2984
dd2af3b3
BM
2985 ;;
2986esac
2987fi
2988GUNZIP=$ac_cv_path_GUNZIP
2989if test -n "$GUNZIP"; then
bb0a50d8
BM
2990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
2991printf "%s\n" "$GUNZIP" >&6; }
dd2af3b3 2992else
bb0a50d8
BM
2993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2994printf "%s\n" "no" >&6; }
dd2af3b3
BM
2995fi
2996
2997
2998# Extract the first word of "pkg-config", so it can be a program name with args.
2999set dummy pkg-config; ac_word=$2
bb0a50d8
BM
3000{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3001printf %s "checking for $ac_word... " >&6; }
3002if test ${ac_cv_path_PKGCONFIG+y}
3003then :
3004 printf %s "(cached) " >&6
3005else $as_nop
dd2af3b3
BM
3006 case $PKGCONFIG in
3007 [\\/]* | ?:[\\/]*)
3008 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
3009 ;;
3010 *)
3011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3012for as_dir in $PATH
3013do
3014 IFS=$as_save_IFS
bb0a50d8
BM
3015 case $as_dir in #(((
3016 '') as_dir=./ ;;
3017 */) ;;
3018 *) as_dir=$as_dir/ ;;
3019 esac
dd2af3b3 3020 for ac_exec_ext in '' $ac_executable_extensions; do
bb0a50d8
BM
3021 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3022 ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext"
3023 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
dd2af3b3
BM
3024 break 2
3025 fi
3026done
3027 done
3028IFS=$as_save_IFS
3029
3030 ;;
3031esac
3032fi
3033PKGCONFIG=$ac_cv_path_PKGCONFIG
3034if test -n "$PKGCONFIG"; then
bb0a50d8
BM
3035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
3036printf "%s\n" "$PKGCONFIG" >&6; }
dd2af3b3 3037else
bb0a50d8
BM
3038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3039printf "%s\n" "no" >&6; }
dd2af3b3
BM
3040fi
3041
3042
3043
bb0a50d8
BM
3044
3045
3046
3047
3048
3049
3050
3051
3052
dd2af3b3
BM
3053ac_ext=c
3054ac_cpp='$CPP $CPPFLAGS'
3055ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3056ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3057ac_compiler_gnu=$ac_cv_c_compiler_gnu
3058if test -n "$ac_tool_prefix"; then
3059 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3060set dummy ${ac_tool_prefix}gcc; ac_word=$2
bb0a50d8
BM
3061{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3062printf %s "checking for $ac_word... " >&6; }
3063if test ${ac_cv_prog_CC+y}
3064then :
3065 printf %s "(cached) " >&6
3066else $as_nop
dd2af3b3
BM
3067 if test -n "$CC"; then
3068 ac_cv_prog_CC="$CC" # Let the user override the test.
3069else
3070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3071for as_dir in $PATH
3072do
3073 IFS=$as_save_IFS
bb0a50d8
BM
3074 case $as_dir in #(((
3075 '') as_dir=./ ;;
3076 */) ;;
3077 *) as_dir=$as_dir/ ;;
3078 esac
dd2af3b3 3079 for ac_exec_ext in '' $ac_executable_extensions; do
bb0a50d8 3080 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
dd2af3b3 3081 ac_cv_prog_CC="${ac_tool_prefix}gcc"
bb0a50d8 3082 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
dd2af3b3
BM
3083 break 2
3084 fi
3085done
3086 done
3087IFS=$as_save_IFS
3088
3089fi
3090fi
3091CC=$ac_cv_prog_CC
3092if test -n "$CC"; then
bb0a50d8
BM
3093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3094printf "%s\n" "$CC" >&6; }
dd2af3b3 3095else
bb0a50d8
BM
3096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3097printf "%s\n" "no" >&6; }
dd2af3b3
BM
3098fi
3099
3100
3101fi
3102if test -z "$ac_cv_prog_CC"; then
3103 ac_ct_CC=$CC
3104 # Extract the first word of "gcc", so it can be a program name with args.
3105set dummy gcc; ac_word=$2
bb0a50d8
BM
3106{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3107printf %s "checking for $ac_word... " >&6; }
3108if test ${ac_cv_prog_ac_ct_CC+y}
3109then :
3110 printf %s "(cached) " >&6
3111else $as_nop
dd2af3b3
BM
3112 if test -n "$ac_ct_CC"; then
3113 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3114else
3115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3116for as_dir in $PATH
3117do
3118 IFS=$as_save_IFS
bb0a50d8
BM
3119 case $as_dir in #(((
3120 '') as_dir=./ ;;
3121 */) ;;
3122 *) as_dir=$as_dir/ ;;
3123 esac
dd2af3b3 3124 for ac_exec_ext in '' $ac_executable_extensions; do
bb0a50d8 3125 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
dd2af3b3 3126 ac_cv_prog_ac_ct_CC="gcc"
bb0a50d8 3127 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
dd2af3b3
BM
3128 break 2
3129 fi
3130done
3131 done
3132IFS=$as_save_IFS
3133
3134fi
3135fi
3136ac_ct_CC=$ac_cv_prog_ac_ct_CC
3137if test -n "$ac_ct_CC"; then
bb0a50d8
BM
3138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3139printf "%s\n" "$ac_ct_CC" >&6; }
dd2af3b3 3140else
bb0a50d8
BM
3141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3142printf "%s\n" "no" >&6; }
dd2af3b3
BM
3143fi
3144
3145 if test "x$ac_ct_CC" = x; then
3146 CC=""
3147 else
3148 case $cross_compiling:$ac_tool_warned in
3149yes:)
bb0a50d8
BM
3150{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3151printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
dd2af3b3
BM
3152ac_tool_warned=yes ;;
3153esac
3154 CC=$ac_ct_CC
3155 fi
3156else
3157 CC="$ac_cv_prog_CC"
3158fi
3159
3160if test -z "$CC"; then
3161 if test -n "$ac_tool_prefix"; then
3162 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3163set dummy ${ac_tool_prefix}cc; ac_word=$2
bb0a50d8
BM
3164{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3165printf %s "checking for $ac_word... " >&6; }
3166if test ${ac_cv_prog_CC+y}
3167then :
3168 printf %s "(cached) " >&6
3169else $as_nop
dd2af3b3
BM
3170 if test -n "$CC"; then
3171 ac_cv_prog_CC="$CC" # Let the user override the test.
3172else
3173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3174for as_dir in $PATH
3175do
3176 IFS=$as_save_IFS
bb0a50d8
BM
3177 case $as_dir in #(((
3178 '') as_dir=./ ;;
3179 */) ;;
3180 *) as_dir=$as_dir/ ;;
3181 esac
dd2af3b3 3182 for ac_exec_ext in '' $ac_executable_extensions; do
bb0a50d8 3183 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
dd2af3b3 3184 ac_cv_prog_CC="${ac_tool_prefix}cc"
bb0a50d8 3185 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
dd2af3b3
BM
3186 break 2
3187 fi
3188done
3189 done
3190IFS=$as_save_IFS
3191
3192fi
3193fi
3194CC=$ac_cv_prog_CC
3195if test -n "$CC"; then
bb0a50d8
BM
3196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3197printf "%s\n" "$CC" >&6; }
dd2af3b3 3198else
bb0a50d8
BM
3199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3200printf "%s\n" "no" >&6; }
dd2af3b3
BM
3201fi
3202
3203
3204 fi
3205fi
3206if test -z "$CC"; then
3207 # Extract the first word of "cc", so it can be a program name with args.
3208set dummy cc; ac_word=$2
bb0a50d8
BM
3209{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3210printf %s "checking for $ac_word... " >&6; }
3211if test ${ac_cv_prog_CC+y}
3212then :
3213 printf %s "(cached) " >&6
3214else $as_nop
dd2af3b3
BM
3215 if test -n "$CC"; then
3216 ac_cv_prog_CC="$CC" # Let the user override the test.
3217else
3218 ac_prog_rejected=no
3219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3220for as_dir in $PATH
3221do
3222 IFS=$as_save_IFS
bb0a50d8
BM
3223 case $as_dir in #(((
3224 '') as_dir=./ ;;
3225 */) ;;
3226 *) as_dir=$as_dir/ ;;
3227 esac
dd2af3b3 3228 for ac_exec_ext in '' $ac_executable_extensions; do
bb0a50d8
BM
3229 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3230 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
dd2af3b3
BM
3231 ac_prog_rejected=yes
3232 continue
3233 fi
3234 ac_cv_prog_CC="cc"
bb0a50d8 3235 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
dd2af3b3
BM
3236 break 2
3237 fi
3238done
3239 done
3240IFS=$as_save_IFS
3241
3242if test $ac_prog_rejected = yes; then
3243 # We found a bogon in the path, so make sure we never use it.
3244 set dummy $ac_cv_prog_CC
3245 shift
3246 if test $# != 0; then
3247 # We chose a different compiler from the bogus one.
3248 # However, it has the same basename, so the bogon will be chosen
3249 # first if we set CC to just the basename; use the full file name.
3250 shift
bb0a50d8 3251 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
dd2af3b3
BM
3252 fi
3253fi
3254fi
3255fi
3256CC=$ac_cv_prog_CC
3257if test -n "$CC"; then
bb0a50d8
BM
3258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3259printf "%s\n" "$CC" >&6; }
dd2af3b3 3260else
bb0a50d8
BM
3261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3262printf "%s\n" "no" >&6; }
dd2af3b3
BM
3263fi
3264
3265
3266fi
3267if test -z "$CC"; then
3268 if test -n "$ac_tool_prefix"; then
3269 for ac_prog in cl.exe
3270 do
3271 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3272set dummy $ac_tool_prefix$ac_prog; ac_word=$2
bb0a50d8
BM
3273{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3274printf %s "checking for $ac_word... " >&6; }
3275if test ${ac_cv_prog_CC+y}
3276then :
3277 printf %s "(cached) " >&6
3278else $as_nop
dd2af3b3
BM
3279 if test -n "$CC"; then
3280 ac_cv_prog_CC="$CC" # Let the user override the test.
3281else
3282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3283for as_dir in $PATH
3284do
3285 IFS=$as_save_IFS
bb0a50d8
BM
3286 case $as_dir in #(((
3287 '') as_dir=./ ;;
3288 */) ;;
3289 *) as_dir=$as_dir/ ;;
3290 esac
dd2af3b3 3291 for ac_exec_ext in '' $ac_executable_extensions; do
bb0a50d8 3292 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
dd2af3b3 3293 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
bb0a50d8 3294 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
dd2af3b3
BM
3295 break 2
3296 fi
3297done
3298 done
3299IFS=$as_save_IFS
3300
3301fi
3302fi
3303CC=$ac_cv_prog_CC
3304if test -n "$CC"; then
bb0a50d8
BM
3305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3306printf "%s\n" "$CC" >&6; }
dd2af3b3 3307else
bb0a50d8
BM
3308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3309printf "%s\n" "no" >&6; }
dd2af3b3
BM
3310fi
3311
3312
3313 test -n "$CC" && break
3314 done
3315fi
3316if test -z "$CC"; then
3317 ac_ct_CC=$CC
3318 for ac_prog in cl.exe
3319do
3320 # Extract the first word of "$ac_prog", so it can be a program name with args.
3321set dummy $ac_prog; ac_word=$2
bb0a50d8
BM
3322{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3323printf %s "checking for $ac_word... " >&6; }
3324if test ${ac_cv_prog_ac_ct_CC+y}
3325then :
3326 printf %s "(cached) " >&6
3327else $as_nop
dd2af3b3
BM
3328 if test -n "$ac_ct_CC"; then
3329 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3330else
3331as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3332for as_dir in $PATH
3333do
3334 IFS=$as_save_IFS
bb0a50d8
BM
3335 case $as_dir in #(((
3336 '') as_dir=./ ;;
3337 */) ;;
3338 *) as_dir=$as_dir/ ;;
3339 esac
dd2af3b3 3340 for ac_exec_ext in '' $ac_executable_extensions; do
bb0a50d8 3341 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
dd2af3b3 3342 ac_cv_prog_ac_ct_CC="$ac_prog"
bb0a50d8 3343 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
dd2af3b3
BM
3344 break 2
3345 fi
3346done
3347 done
3348IFS=$as_save_IFS
3349
3350fi
3351fi
3352ac_ct_CC=$ac_cv_prog_ac_ct_CC
3353if test -n "$ac_ct_CC"; then
bb0a50d8
BM
3354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3355printf "%s\n" "$ac_ct_CC" >&6; }
dd2af3b3 3356else
bb0a50d8
BM
3357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3358printf "%s\n" "no" >&6; }
dd2af3b3
BM
3359fi
3360
3361
3362 test -n "$ac_ct_CC" && break
3363done
3364
3365 if test "x$ac_ct_CC" = x; then
3366 CC=""
3367 else
3368 case $cross_compiling:$ac_tool_warned in
3369yes:)
bb0a50d8
BM
3370{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3371printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3372ac_tool_warned=yes ;;
3373esac
3374 CC=$ac_ct_CC
3375 fi
3376fi
3377
3378fi
3379if test -z "$CC"; then
3380 if test -n "$ac_tool_prefix"; then
3381 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3382set dummy ${ac_tool_prefix}clang; ac_word=$2
3383{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3384printf %s "checking for $ac_word... " >&6; }
3385if test ${ac_cv_prog_CC+y}
3386then :
3387 printf %s "(cached) " >&6
3388else $as_nop
3389 if test -n "$CC"; then
3390 ac_cv_prog_CC="$CC" # Let the user override the test.
3391else
3392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3393for as_dir in $PATH
3394do
3395 IFS=$as_save_IFS
3396 case $as_dir in #(((
3397 '') as_dir=./ ;;
3398 */) ;;
3399 *) as_dir=$as_dir/ ;;
3400 esac
3401 for ac_exec_ext in '' $ac_executable_extensions; do
3402 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3403 ac_cv_prog_CC="${ac_tool_prefix}clang"
3404 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3405 break 2
3406 fi
3407done
3408 done
3409IFS=$as_save_IFS
3410
3411fi
3412fi
3413CC=$ac_cv_prog_CC
3414if test -n "$CC"; then
3415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3416printf "%s\n" "$CC" >&6; }
3417else
3418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3419printf "%s\n" "no" >&6; }
3420fi
3421
3422
3423fi
3424if test -z "$ac_cv_prog_CC"; then
3425 ac_ct_CC=$CC
3426 # Extract the first word of "clang", so it can be a program name with args.
3427set dummy clang; ac_word=$2
3428{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3429printf %s "checking for $ac_word... " >&6; }
3430if test ${ac_cv_prog_ac_ct_CC+y}
3431then :
3432 printf %s "(cached) " >&6
3433else $as_nop
3434 if test -n "$ac_ct_CC"; then
3435 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3436else
3437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3438for as_dir in $PATH
3439do
3440 IFS=$as_save_IFS
3441 case $as_dir in #(((
3442 '') as_dir=./ ;;
3443 */) ;;
3444 *) as_dir=$as_dir/ ;;
3445 esac
3446 for ac_exec_ext in '' $ac_executable_extensions; do
3447 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3448 ac_cv_prog_ac_ct_CC="clang"
3449 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3450 break 2
3451 fi
3452done
3453 done
3454IFS=$as_save_IFS
3455
3456fi
3457fi
3458ac_ct_CC=$ac_cv_prog_ac_ct_CC
3459if test -n "$ac_ct_CC"; then
3460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3461printf "%s\n" "$ac_ct_CC" >&6; }
3462else
3463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3464printf "%s\n" "no" >&6; }
3465fi
3466
3467 if test "x$ac_ct_CC" = x; then
3468 CC=""
3469 else
3470 case $cross_compiling:$ac_tool_warned in
3471yes:)
3472{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3473printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
dd2af3b3
BM
3474ac_tool_warned=yes ;;
3475esac
3476 CC=$ac_ct_CC
3477 fi
bb0a50d8
BM
3478else
3479 CC="$ac_cv_prog_CC"
dd2af3b3
BM
3480fi
3481
3482fi
3483
3484
bb0a50d8
BM
3485test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3486printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
dd2af3b3
BM
3487as_fn_error $? "no acceptable C compiler found in \$PATH
3488See \`config.log' for more details" "$LINENO" 5; }
3489
3490# Provide some information about the compiler.
bb0a50d8 3491printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
dd2af3b3
BM
3492set X $ac_compile
3493ac_compiler=$2
bb0a50d8 3494for ac_option in --version -v -V -qversion -version; do
dd2af3b3
BM
3495 { { ac_try="$ac_compiler $ac_option >&5"
3496case "(($ac_try" in
3497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3498 *) ac_try_echo=$ac_try;;
3499esac
3500eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
bb0a50d8 3501printf "%s\n" "$ac_try_echo"; } >&5
dd2af3b3
BM
3502 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3503 ac_status=$?
3504 if test -s conftest.err; then
3505 sed '10a\
3506... rest of stderr output deleted ...
3507 10q' conftest.err >conftest.er1
3508 cat conftest.er1 >&5
3509 fi
3510 rm -f conftest.er1 conftest.err
bb0a50d8 3511 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
dd2af3b3
BM
3512 test $ac_status = 0; }
3513done
3514
3515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3516/* end confdefs.h. */
3517
3518int
bb0a50d8 3519main (void)
dd2af3b3
BM
3520{
3521
3522 ;
3523 return 0;
3524}
3525_ACEOF
3526ac_clean_files_save=$ac_clean_files
3527ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3528# Try to create an executable without -o first, disregard a.out.
3529# It will help us diagnose broken compilers, and finding out an intuition
3530# of exeext.
bb0a50d8
BM
3531{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3532printf %s "checking whether the C compiler works... " >&6; }
3533ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
dd2af3b3
BM
3534
3535# The possible output files:
3536ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3537
3538ac_rmfiles=
3539for ac_file in $ac_files
3540do
3541 case $ac_file in
3542 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3543 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3544 esac
3545done
3546rm -f $ac_rmfiles
3547
3548if { { ac_try="$ac_link_default"
3549case "(($ac_try" in
3550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3551 *) ac_try_echo=$ac_try;;
3552esac
3553eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
bb0a50d8 3554printf "%s\n" "$ac_try_echo"; } >&5
dd2af3b3
BM
3555 (eval "$ac_link_default") 2>&5
3556 ac_status=$?
bb0a50d8
BM
3557 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3558 test $ac_status = 0; }
3559then :
dd2af3b3
BM
3560 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3561# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3562# in a Makefile. We should not override ac_cv_exeext if it was cached,
3563# so that the user can short-circuit this test for compilers unknown to
3564# Autoconf.
3565for ac_file in $ac_files ''
3566do
3567 test -f "$ac_file" || continue
3568 case $ac_file in
3569 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3570 ;;
3571 [ab].out )
3572 # We found the default executable, but exeext='' is most
3573 # certainly right.
3574 break;;
3575 *.* )
bb0a50d8 3576 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
dd2af3b3
BM
3577 then :; else
3578 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3579 fi
3580 # We set ac_cv_exeext here because the later test for it is not
3581 # safe: cross compilers may not add the suffix if given an `-o'
3582 # argument, so we may need to know it at that point already.
3583 # Even if this section looks crufty: it has the advantage of
3584 # actually working.
3585 break;;
3586 * )
3587 break;;
3588 esac
3589done
3590test "$ac_cv_exeext" = no && ac_cv_exeext=
3591
bb0a50d8 3592else $as_nop
dd2af3b3
BM
3593 ac_file=''
3594fi
bb0a50d8
BM
3595if test -z "$ac_file"
3596then :
3597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3598printf "%s\n" "no" >&6; }
3599printf "%s\n" "$as_me: failed program was:" >&5
dd2af3b3
BM
3600sed 's/^/| /' conftest.$ac_ext >&5
3601
bb0a50d8
BM
3602{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3603printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
dd2af3b3
BM
3604as_fn_error 77 "C compiler cannot create executables
3605See \`config.log' for more details" "$LINENO" 5; }
bb0a50d8
BM
3606else $as_nop
3607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3608printf "%s\n" "yes" >&6; }
3609fi
3610{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3611printf %s "checking for C compiler default output file name... " >&6; }
3612{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3613printf "%s\n" "$ac_file" >&6; }
dd2af3b3
BM
3614ac_exeext=$ac_cv_exeext
3615
3616rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3617ac_clean_files=$ac_clean_files_save
bb0a50d8
BM
3618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3619printf %s "checking for suffix of executables... " >&6; }
dd2af3b3
BM
3620if { { ac_try="$ac_link"
3621case "(($ac_try" in
3622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3623 *) ac_try_echo=$ac_try;;
3624esac
3625eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
bb0a50d8 3626printf "%s\n" "$ac_try_echo"; } >&5
dd2af3b3
BM
3627 (eval "$ac_link") 2>&5
3628 ac_status=$?
bb0a50d8
BM
3629 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3630 test $ac_status = 0; }
3631then :
dd2af3b3
BM
3632 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3633# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3634# work properly (i.e., refer to `conftest.exe'), while it won't with
3635# `rm'.
3636for ac_file in conftest.exe conftest conftest.*; do
3637 test -f "$ac_file" || continue
3638 case $ac_file in
3639 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3640 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3641 break;;
3642 * ) break;;
3643 esac
3644done
bb0a50d8
BM
3645else $as_nop
3646 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3647printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
dd2af3b3
BM
3648as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3649See \`config.log' for more details" "$LINENO" 5; }
3650fi
3651rm -f conftest conftest$ac_cv_exeext
bb0a50d8
BM
3652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3653printf "%s\n" "$ac_cv_exeext" >&6; }
dd2af3b3
BM
3654
3655rm -f conftest.$ac_ext
3656EXEEXT=$ac_cv_exeext
3657ac_exeext=$EXEEXT
3658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3659/* end confdefs.h. */
3660#include <stdio.h>
3661int
bb0a50d8 3662main (void)
dd2af3b3
BM
3663{
3664FILE *f = fopen ("conftest.out", "w");
3665 return ferror (f) || fclose (f) != 0;
3666
3667 ;
3668 return 0;
3669}
3670_ACEOF
3671ac_clean_files="$ac_clean_files conftest.out"
3672# Check that the compiler produces executables we can run. If not, either
3673# the compiler is broken, or we cross compile.
bb0a50d8
BM
3674{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3675printf %s "checking whether we are cross compiling... " >&6; }
dd2af3b3
BM
3676if test "$cross_compiling" != yes; then
3677 { { ac_try="$ac_link"
3678case "(($ac_try" in
3679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3680 *) ac_try_echo=$ac_try;;
3681esac
3682eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
bb0a50d8 3683printf "%s\n" "$ac_try_echo"; } >&5
dd2af3b3
BM
3684 (eval "$ac_link") 2>&5
3685 ac_status=$?
bb0a50d8 3686 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
dd2af3b3
BM
3687 test $ac_status = 0; }
3688 if { ac_try='./conftest$ac_cv_exeext'
3689 { { case "(($ac_try" in
3690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3691 *) ac_try_echo=$ac_try;;
3692esac
3693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
bb0a50d8 3694printf "%s\n" "$ac_try_echo"; } >&5
dd2af3b3
BM
3695 (eval "$ac_try") 2>&5
3696 ac_status=$?
bb0a50d8 3697 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
dd2af3b3
BM
3698 test $ac_status = 0; }; }; then
3699 cross_compiling=no
3700 else
3701 if test "$cross_compiling" = maybe; then
3702 cross_compiling=yes
3703 else
bb0a50d8
BM
3704 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3705printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3706as_fn_error 77 "cannot run C compiled programs.
dd2af3b3
BM
3707If you meant to cross compile, use \`--host'.
3708See \`config.log' for more details" "$LINENO" 5; }
3709 fi
3710 fi
3711fi
bb0a50d8
BM
3712{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3713printf "%s\n" "$cross_compiling" >&6; }
dd2af3b3
BM
3714
3715rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3716ac_clean_files=$ac_clean_files_save
bb0a50d8
BM
3717{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3718printf %s "checking for suffix of object files... " >&6; }
3719if test ${ac_cv_objext+y}
3720then :
3721 printf %s "(cached) " >&6
3722else $as_nop
dd2af3b3
BM
3723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3724/* end confdefs.h. */
3725
3726int
bb0a50d8 3727main (void)
dd2af3b3
BM
3728{
3729
3730 ;
3731 return 0;
3732}
3733_ACEOF
3734rm -f conftest.o conftest.obj
3735if { { ac_try="$ac_compile"
3736case "(($ac_try" in
3737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3738 *) ac_try_echo=$ac_try;;
3739esac
3740eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
bb0a50d8 3741printf "%s\n" "$ac_try_echo"; } >&5
dd2af3b3
BM
3742 (eval "$ac_compile") 2>&5
3743 ac_status=$?
bb0a50d8
BM
3744 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3745 test $ac_status = 0; }
3746then :
dd2af3b3
BM
3747 for ac_file in conftest.o conftest.obj conftest.*; do
3748 test -f "$ac_file" || continue;
3749 case $ac_file in
3750 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3751 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
bb0a50d8
BM
3752 break;;
3753 esac
54a2fad8 3754done
bb0a50d8
BM
3755else $as_nop
3756 printf "%s\n" "$as_me: failed program was:" >&5
3757sed 's/^/| /' conftest.$ac_ext >&5
54a2fad8 3758
bb0a50d8
BM
3759{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3760printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3761as_fn_error $? "cannot compute suffix of object files: cannot compile
3762See \`config.log' for more details" "$LINENO" 5; }
54a2fad8 3763fi
bb0a50d8 3764rm -f conftest.$ac_cv_objext conftest.$ac_ext
54a2fad8 3765fi
bb0a50d8
BM
3766{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3767printf "%s\n" "$ac_cv_objext" >&6; }
3768OBJEXT=$ac_cv_objext
3769ac_objext=$OBJEXT
3770{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
3771printf %s "checking whether the compiler supports GNU C... " >&6; }
3772if test ${ac_cv_c_compiler_gnu+y}
3773then :
3774 printf %s "(cached) " >&6
3775else $as_nop
3776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3777/* end confdefs.h. */
54a2fad8 3778
bb0a50d8
BM
3779int
3780main (void)
3781{
3782#ifndef __GNUC__
3783 choke me
3784#endif
54a2fad8 3785
bb0a50d8
BM
3786 ;
3787 return 0;
3788}
3789_ACEOF
3790if ac_fn_c_try_compile "$LINENO"
3791then :
3792 ac_compiler_gnu=yes
3793else $as_nop
3794 ac_compiler_gnu=no
54a2fad8 3795fi
bb0a50d8
BM
3796rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3797ac_cv_c_compiler_gnu=$ac_compiler_gnu
54a2fad8 3798
bb0a50d8
BM
3799fi
3800{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3801printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
3802ac_compiler_gnu=$ac_cv_c_compiler_gnu
54a2fad8 3803
bb0a50d8
BM
3804if test $ac_compiler_gnu = yes; then
3805 GCC=yes
54a2fad8 3806else
bb0a50d8 3807 GCC=
54a2fad8 3808fi
bb0a50d8
BM
3809ac_test_CFLAGS=${CFLAGS+y}
3810ac_save_CFLAGS=$CFLAGS
3811{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3812printf %s "checking whether $CC accepts -g... " >&6; }
3813if test ${ac_cv_prog_cc_g+y}
3814then :
3815 printf %s "(cached) " >&6
3816else $as_nop
3817 ac_save_c_werror_flag=$ac_c_werror_flag
3818 ac_c_werror_flag=yes
3819 ac_cv_prog_cc_g=no
3820 CFLAGS="-g"
3821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3822/* end confdefs.h. */
54a2fad8 3823
bb0a50d8
BM
3824int
3825main (void)
3826{
dd2af3b3 3827
bb0a50d8
BM
3828 ;
3829 return 0;
3830}
3831_ACEOF
3832if ac_fn_c_try_compile "$LINENO"
3833then :
3834 ac_cv_prog_cc_g=yes
3835else $as_nop
3836 CFLAGS=""
3837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
dd2af3b3
BM
3838/* end confdefs.h. */
3839
dd2af3b3 3840int
bb0a50d8 3841main (void)
dd2af3b3 3842{
bb0a50d8 3843
dd2af3b3
BM
3844 ;
3845 return 0;
3846}
3847_ACEOF
bb0a50d8
BM
3848if ac_fn_c_try_compile "$LINENO"
3849then :
dd2af3b3 3850
bb0a50d8
BM
3851else $as_nop
3852 ac_c_werror_flag=$ac_save_c_werror_flag
3853 CFLAGS="-g"
3854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
dd2af3b3
BM
3855/* end confdefs.h. */
3856
dd2af3b3 3857int
bb0a50d8 3858main (void)
dd2af3b3 3859{
bb0a50d8 3860
dd2af3b3
BM
3861 ;
3862 return 0;
3863}
3864_ACEOF
bb0a50d8
BM
3865if ac_fn_c_try_compile "$LINENO"
3866then :
3867 ac_cv_prog_cc_g=yes
dd2af3b3 3868fi
bb0a50d8 3869rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
dd2af3b3 3870fi
bb0a50d8 3871rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
dd2af3b3 3872fi
bb0a50d8
BM
3873rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3874 ac_c_werror_flag=$ac_save_c_werror_flag
8783280a 3875fi
bb0a50d8
BM
3876{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3877printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
3878if test $ac_test_CFLAGS; then
3879 CFLAGS=$ac_save_CFLAGS
3880elif test $ac_cv_prog_cc_g = yes; then
3881 if test "$GCC" = yes; then
3882 CFLAGS="-g -O2"
3883 else
3884 CFLAGS="-g"
3885 fi
8783280a 3886else
bb0a50d8
BM
3887 if test "$GCC" = yes; then
3888 CFLAGS="-O2"
3889 else
3890 CFLAGS=
3891 fi
8783280a 3892fi
bb0a50d8
BM
3893ac_prog_cc_stdc=no
3894if test x$ac_prog_cc_stdc = xno
3895then :
3896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
3897printf %s "checking for $CC option to enable C11 features... " >&6; }
3898if test ${ac_cv_prog_cc_c11+y}
3899then :
3900 printf %s "(cached) " >&6
3901else $as_nop
3902 ac_cv_prog_cc_c11=no
3903ac_save_CC=$CC
3904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8783280a 3905/* end confdefs.h. */
bb0a50d8 3906$ac_c_conftest_c11_program
dd2af3b3 3907_ACEOF
bb0a50d8
BM
3908for ac_arg in '' -std=gnu11
3909do
3910 CC="$ac_save_CC $ac_arg"
3911 if ac_fn_c_try_compile "$LINENO"
3912then :
3913 ac_cv_prog_cc_c11=$ac_arg
dd2af3b3 3914fi
bb0a50d8
BM
3915rm -f core conftest.err conftest.$ac_objext conftest.beam
3916 test "x$ac_cv_prog_cc_c11" != "xno" && break
8783280a 3917done
bb0a50d8
BM
3918rm -f conftest.$ac_ext
3919CC=$ac_save_CC
dd2af3b3 3920fi
8783280a 3921
bb0a50d8
BM
3922if test "x$ac_cv_prog_cc_c11" = xno
3923then :
3924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3925printf "%s\n" "unsupported" >&6; }
3926else $as_nop
3927 if test "x$ac_cv_prog_cc_c11" = x
3928then :
3929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3930printf "%s\n" "none needed" >&6; }
3931else $as_nop
3932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
3933printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
3934 CC="$CC $ac_cv_prog_cc_c11"
3935fi
3936 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
3937 ac_prog_cc_stdc=c11
3938fi
3939fi
3940if test x$ac_prog_cc_stdc = xno
3941then :
3942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
3943printf %s "checking for $CC option to enable C99 features... " >&6; }
3944if test ${ac_cv_prog_cc_c99+y}
3945then :
3946 printf %s "(cached) " >&6
3947else $as_nop
3948 ac_cv_prog_cc_c99=no
3949ac_save_CC=$CC
3950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8783280a 3951/* end confdefs.h. */
bb0a50d8 3952$ac_c_conftest_c99_program
8783280a 3953_ACEOF
bb0a50d8
BM
3954for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
3955do
3956 CC="$ac_save_CC $ac_arg"
3957 if ac_fn_c_try_compile "$LINENO"
3958then :
3959 ac_cv_prog_cc_c99=$ac_arg
3960fi
3961rm -f core conftest.err conftest.$ac_objext conftest.beam
3962 test "x$ac_cv_prog_cc_c99" != "xno" && break
3963done
3964rm -f conftest.$ac_ext
3965CC=$ac_save_CC
dd2af3b3
BM
3966fi
3967
bb0a50d8
BM
3968if test "x$ac_cv_prog_cc_c99" = xno
3969then :
3970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3971printf "%s\n" "unsupported" >&6; }
3972else $as_nop
3973 if test "x$ac_cv_prog_cc_c99" = x
3974then :
3975 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3976printf "%s\n" "none needed" >&6; }
3977else $as_nop
3978 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3979printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
3980 CC="$CC $ac_cv_prog_cc_c99"
3981fi
3982 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
3983 ac_prog_cc_stdc=c99
3984fi
3985fi
3986if test x$ac_prog_cc_stdc = xno
3987then :
3988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
3989printf %s "checking for $CC option to enable C89 features... " >&6; }
3990if test ${ac_cv_prog_cc_c89+y}
3991then :
3992 printf %s "(cached) " >&6
3993else $as_nop
3994 ac_cv_prog_cc_c89=no
3995ac_save_CC=$CC
3996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8783280a 3997/* end confdefs.h. */
bb0a50d8 3998$ac_c_conftest_c89_program
8783280a 3999_ACEOF
bb0a50d8
BM
4000for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4001do
4002 CC="$ac_save_CC $ac_arg"
4003 if ac_fn_c_try_compile "$LINENO"
4004then :
4005 ac_cv_prog_cc_c89=$ac_arg
4006fi
4007rm -f core conftest.err conftest.$ac_objext conftest.beam
4008 test "x$ac_cv_prog_cc_c89" != "xno" && break
4009done
4010rm -f conftest.$ac_ext
4011CC=$ac_save_CC
8783280a 4012fi
dd2af3b3 4013
bb0a50d8
BM
4014if test "x$ac_cv_prog_cc_c89" = xno
4015then :
4016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4017printf "%s\n" "unsupported" >&6; }
4018else $as_nop
4019 if test "x$ac_cv_prog_cc_c89" = x
4020then :
4021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4022printf "%s\n" "none needed" >&6; }
4023else $as_nop
4024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4025printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4026 CC="$CC $ac_cv_prog_cc_c89"
4027fi
4028 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4029 ac_prog_cc_stdc=c89
4030fi
8783280a
BM
4031fi
4032
4033ac_ext=c
dd2af3b3
BM
4034ac_cpp='$CPP $CPPFLAGS'
4035ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4036ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4037ac_compiler_gnu=$ac_cv_c_compiler_gnu
4038
8783280a 4039
bb0a50d8
BM
4040if test "$ac_cv_prog_cc_c99" = "no"
4041then :
4042 as_fn_error $? "No C99 compiler was found. Please install gcc or clang and other build tools. Eg, on Debian/Ubuntu you probably want to run the following as root: apt-get install build-essential " "$LINENO" 5
4043fi
4044
4045# Extract the first word of "gmake", so it can be a program name with args.
4046set dummy gmake; ac_word=$2
4047{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4048printf %s "checking for $ac_word... " >&6; }
4049if test ${ac_cv_prog_MAKER+y}
4050then :
4051 printf %s "(cached) " >&6
4052else $as_nop
4053 if test -n "$MAKER"; then
4054 ac_cv_prog_MAKER="$MAKER" # Let the user override the test.
dd2af3b3 4055else
bb0a50d8
BM
4056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4057for as_dir in $PATH
8783280a
BM
4058do
4059 IFS=$as_save_IFS
bb0a50d8
BM
4060 case $as_dir in #(((
4061 '') as_dir=./ ;;
4062 */) ;;
4063 *) as_dir=$as_dir/ ;;
4064 esac
8783280a 4065 for ac_exec_ext in '' $ac_executable_extensions; do
bb0a50d8
BM
4066 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4067 ac_cv_prog_MAKER="gmake"
4068 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4069 break 2
4070 fi
4071done
8783280a
BM
4072 done
4073IFS=$as_save_IFS
8783280a 4074
bb0a50d8
BM
4075 test -z "$ac_cv_prog_MAKER" && ac_cv_prog_MAKER="make"
4076fi
4077fi
4078MAKER=$ac_cv_prog_MAKER
4079if test -n "$MAKER"; then
4080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAKER" >&5
4081printf "%s\n" "$MAKER" >&6; }
4082else
4083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4084printf "%s\n" "no" >&6; }
dd2af3b3 4085fi
8783280a
BM
4086
4087
bb0a50d8
BM
4088# Extract the first word of "gmake", so it can be a program name with args.
4089set dummy gmake; ac_word=$2
4090{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4091printf %s "checking for $ac_word... " >&6; }
4092if test ${ac_cv_path_GMAKE+y}
4093then :
4094 printf %s "(cached) " >&6
4095else $as_nop
4096 case $GMAKE in
4097 [\\/]* | ?:[\\/]*)
4098 ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path.
4099 ;;
4100 *)
8783280a 4101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
bb0a50d8 4102for as_dir in $PATH
8783280a
BM
4103do
4104 IFS=$as_save_IFS
bb0a50d8
BM
4105 case $as_dir in #(((
4106 '') as_dir=./ ;;
4107 */) ;;
4108 *) as_dir=$as_dir/ ;;
4109 esac
8783280a 4110 for ac_exec_ext in '' $ac_executable_extensions; do
bb0a50d8
BM
4111 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4112 ac_cv_path_GMAKE="$as_dir$ac_word$ac_exec_ext"
4113 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4114 break 2
4115 fi
4116done
8783280a
BM
4117 done
4118IFS=$as_save_IFS
bb0a50d8
BM
4119
4120 ;;
4121esac
4122fi
4123GMAKE=$ac_cv_path_GMAKE
4124if test -n "$GMAKE"; then
4125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMAKE" >&5
4126printf "%s\n" "$GMAKE" >&6; }
8783280a 4127else
bb0a50d8
BM
4128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4129printf "%s\n" "no" >&6; }
8783280a 4130fi
dd2af3b3 4131
bb0a50d8
BM
4132
4133if $MAKER --version | grep -q "GNU Make"
4134then :
4135 GNUMAKE="0"
4136else $as_nop
4137 as_fn_error $? "It seems your system does not have make/gmake installed. If you are on Linux then install make, otherwise install gmake." "$LINENO" 5
8783280a 4138fi
dd2af3b3 4139
dd2af3b3 4140
bb0a50d8
BM
4141{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for crypt in -ldescrypt" >&5
4142printf %s "checking for crypt in -ldescrypt... " >&6; }
4143if test ${ac_cv_lib_descrypt_crypt+y}
4144then :
4145 printf %s "(cached) " >&6
4146else $as_nop
4147 ac_check_lib_save_LIBS=$LIBS
4148LIBS="-ldescrypt $LIBS"
4149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
dd2af3b3
BM
4150/* end confdefs.h. */
4151
bb0a50d8
BM
4152/* Override any GCC internal prototype to avoid an error.
4153 Use char because int might match the return type of a GCC
4154 builtin and then its argument prototype would still apply. */
4155char crypt ();
85904c22 4156int
bb0a50d8 4157main (void)
85904c22 4158{
bb0a50d8 4159return crypt ();
85904c22
BM
4160 ;
4161 return 0;
4162}
4163_ACEOF
bb0a50d8
BM
4164if ac_fn_c_try_link "$LINENO"
4165then :
4166 ac_cv_lib_descrypt_crypt=yes
4167else $as_nop
4168 ac_cv_lib_descrypt_crypt=no
dd2af3b3 4169fi
bb0a50d8
BM
4170rm -f core conftest.err conftest.$ac_objext conftest.beam \
4171 conftest$ac_exeext conftest.$ac_ext
4172LIBS=$ac_check_lib_save_LIBS
8783280a 4173fi
bb0a50d8
BM
4174{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_descrypt_crypt" >&5
4175printf "%s\n" "$ac_cv_lib_descrypt_crypt" >&6; }
4176if test "x$ac_cv_lib_descrypt_crypt" = xyes
4177then :
dd2af3b3 4178
bb0a50d8 4179printf "%s\n" "#define HAVE_CRYPT /**/" >>confdefs.h
8783280a 4180
bb0a50d8
BM
4181 IRCDLIBS="$IRCDLIBS-ldescrypt "
4182else $as_nop
4183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
4184printf %s "checking for crypt in -lcrypt... " >&6; }
4185if test ${ac_cv_lib_crypt_crypt+y}
4186then :
4187 printf %s "(cached) " >&6
4188else $as_nop
4189 ac_check_lib_save_LIBS=$LIBS
4190LIBS="-lcrypt $LIBS"
4191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85904c22
BM
4192/* end confdefs.h. */
4193
bb0a50d8
BM
4194/* Override any GCC internal prototype to avoid an error.
4195 Use char because int might match the return type of a GCC
4196 builtin and then its argument prototype would still apply. */
4197char crypt ();
94c2b583 4198int
bb0a50d8 4199main (void)
94c2b583 4200{
bb0a50d8
BM
4201return crypt ();
4202 ;
94c2b583 4203 return 0;
4204}
4205_ACEOF
bb0a50d8
BM
4206if ac_fn_c_try_link "$LINENO"
4207then :
4208 ac_cv_lib_crypt_crypt=yes
4209else $as_nop
4210 ac_cv_lib_crypt_crypt=no
85904c22 4211fi
bb0a50d8
BM
4212rm -f core conftest.err conftest.$ac_objext conftest.beam \
4213 conftest$ac_exeext conftest.$ac_ext
4214LIBS=$ac_check_lib_save_LIBS
85904c22 4215fi
bb0a50d8
BM
4216{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
4217printf "%s\n" "$ac_cv_lib_crypt_crypt" >&6; }
4218if test "x$ac_cv_lib_crypt_crypt" = xyes
4219then :
8783280a 4220
bb0a50d8
BM
4221printf "%s\n" "#define HAVE_CRYPT /**/" >>confdefs.h
4222
4223 IRCDLIBS="$IRCDLIBS-lcrypt "
dd2af3b3 4224fi
bb0a50d8 4225
8783280a 4226fi
85904c22 4227
85904c22 4228
bb0a50d8
BM
4229case $host_cpu in #(
4230 i?86|amd64|x86_64) :
4231 ac_cv_c_bigendian=no
4232 ;; #(
4233 *) :
4234 ;;
4235esac
4236ac_header= ac_cache=
4237for ac_item in $ac_header_c_list
4238do
4239 if test $ac_cache; then
4240 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4241 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4242 printf "%s\n" "#define $ac_item 1" >> confdefs.h
4243 fi
4244 ac_header= ac_cache=
4245 elif test $ac_header; then
4246 ac_cache=$ac_item
4247 else
4248 ac_header=$ac_item
4249 fi
4250done
dd2af3b3 4251
8783280a 4252
8783280a 4253
8783280a
BM
4254
4255
bb0a50d8
BM
4256
4257
4258
4259if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
4260then :
4261
4262printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
4263
4264fi
4265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
4266printf %s "checking whether byte ordering is bigendian... " >&6; }
4267if test ${ac_cv_c_bigendian+y}
4268then :
4269 printf %s "(cached) " >&6
4270else $as_nop
8783280a
BM
4271 ac_cv_c_bigendian=unknown
4272 # See if we're dealing with a universal compiler.
4273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4274/* end confdefs.h. */
4275#ifndef __APPLE_CC__
4276 not a universal capable compiler
4277 #endif
4278 typedef int dummy;
dd2af3b3 4279
8783280a 4280_ACEOF
bb0a50d8
BM
4281if ac_fn_c_try_compile "$LINENO"
4282then :
8783280a
BM
4283
4284 # Check for potential -arch flags. It is not universal unless
4285 # there are at least two -arch flags with different values.
4286 ac_arch=
4287 ac_prev=
4288 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
4289 if test -n "$ac_prev"; then
4290 case $ac_word in
4291 i?86 | x86_64 | ppc | ppc64)
4292 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
4293 ac_arch=$ac_word
4294 else
4295 ac_cv_c_bigendian=universal
4296 break
4297 fi
4298 ;;
4299 esac
4300 ac_prev=
4301 elif test "x$ac_word" = "x-arch"; then
4302 ac_prev=arch
4303 fi
4304 done
4305fi
bb0a50d8 4306rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8783280a
BM
4307 if test $ac_cv_c_bigendian = unknown; then
4308 # See if sys/param.h defines the BYTE_ORDER macro.
4309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85904c22 4310/* end confdefs.h. */
8783280a
BM
4311#include <sys/types.h>
4312 #include <sys/param.h>
85904c22 4313
85904c22 4314int
bb0a50d8 4315main (void)
85904c22 4316{
8783280a
BM
4317#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
4318 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
4319 && LITTLE_ENDIAN)
4320 bogus endian macros
4321 #endif
94c2b583 4322
85904c22
BM
4323 ;
4324 return 0;
4325}
4326_ACEOF
bb0a50d8
BM
4327if ac_fn_c_try_compile "$LINENO"
4328then :
8783280a
BM
4329 # It does; now see whether it defined to BIG_ENDIAN or not.
4330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4331/* end confdefs.h. */
4332#include <sys/types.h>
4333 #include <sys/param.h>
4334
4335int
bb0a50d8 4336main (void)
8783280a
BM
4337{
4338#if BYTE_ORDER != BIG_ENDIAN
4339 not big endian
4340 #endif
4341
4342 ;
4343 return 0;
4344}
4345_ACEOF
bb0a50d8
BM
4346if ac_fn_c_try_compile "$LINENO"
4347then :
8783280a 4348 ac_cv_c_bigendian=yes
bb0a50d8 4349else $as_nop
8783280a 4350 ac_cv_c_bigendian=no
85904c22 4351fi
bb0a50d8 4352rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
85904c22 4353fi
bb0a50d8 4354rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8783280a
BM
4355 fi
4356 if test $ac_cv_c_bigendian = unknown; then
4357 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
4358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4359/* end confdefs.h. */
4360#include <limits.h>
4361
4362int
bb0a50d8 4363main (void)
8783280a
BM
4364{
4365#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
4366 bogus endian macros
4367 #endif
4368
4369 ;
4370 return 0;
4371}
4372_ACEOF
bb0a50d8
BM
4373if ac_fn_c_try_compile "$LINENO"
4374then :
8783280a
BM
4375 # It does; now see whether it defined to _BIG_ENDIAN or not.
4376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4377/* end confdefs.h. */
4378#include <limits.h>
4379
4380int
bb0a50d8 4381main (void)
8783280a
BM
4382{
4383#ifndef _BIG_ENDIAN
4384 not big endian
4385 #endif
4386
4387 ;
4388 return 0;
4389}
4390_ACEOF
bb0a50d8
BM
4391if ac_fn_c_try_compile "$LINENO"
4392then :
8783280a 4393 ac_cv_c_bigendian=yes
bb0a50d8 4394else $as_nop
8783280a
BM
4395 ac_cv_c_bigendian=no
4396fi
bb0a50d8 4397rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
dd2af3b3 4398fi
bb0a50d8 4399rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8783280a
BM
4400 fi
4401 if test $ac_cv_c_bigendian = unknown; then
4402 # Compile a test program.
bb0a50d8
BM
4403 if test "$cross_compiling" = yes
4404then :
8783280a
BM
4405 # Try to guess by grepping values from an object file.
4406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4407/* end confdefs.h. */
bb0a50d8 4408unsigned short int ascii_mm[] =
8783280a 4409 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
bb0a50d8 4410 unsigned short int ascii_ii[] =
8783280a
BM
4411 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4412 int use_ascii (int i) {
4413 return ascii_mm[i] + ascii_ii[i];
4414 }
bb0a50d8 4415 unsigned short int ebcdic_ii[] =
8783280a 4416 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
bb0a50d8 4417 unsigned short int ebcdic_mm[] =
8783280a
BM
4418 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4419 int use_ebcdic (int i) {
4420 return ebcdic_mm[i] + ebcdic_ii[i];
4421 }
4422 extern int foo;
85904c22 4423
8783280a 4424int
bb0a50d8 4425main (void)
8783280a
BM
4426{
4427return use_ascii (foo) == use_ebcdic (foo);
4428 ;
4429 return 0;
4430}
4431_ACEOF
bb0a50d8
BM
4432if ac_fn_c_try_compile "$LINENO"
4433then :
8783280a
BM
4434 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
4435 ac_cv_c_bigendian=yes
4436 fi
4437 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4438 if test "$ac_cv_c_bigendian" = unknown; then
4439 ac_cv_c_bigendian=no
4440 else
4441 # finding both strings is unlikely to happen, but who knows?
4442 ac_cv_c_bigendian=unknown
4443 fi
4444 fi
4445fi
bb0a50d8
BM
4446rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4447else $as_nop
8783280a
BM
4448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4449/* end confdefs.h. */
4450$ac_includes_default
4451int
bb0a50d8 4452main (void)
8783280a
BM
4453{
4454
4455 /* Are we little or big endian? From Harbison&Steele. */
4456 union
4457 {
4458 long int l;
4459 char c[sizeof (long int)];
4460 } u;
4461 u.l = 1;
4462 return u.c[sizeof (long int) - 1] == 1;
85904c22 4463
8783280a
BM
4464 ;
4465 return 0;
4466}
4467_ACEOF
bb0a50d8
BM
4468if ac_fn_c_try_run "$LINENO"
4469then :
8783280a 4470 ac_cv_c_bigendian=no
bb0a50d8 4471else $as_nop
8783280a
BM
4472 ac_cv_c_bigendian=yes
4473fi
4474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4475 conftest.$ac_objext conftest.beam conftest.$ac_ext
4476fi
4477
4478 fi
dd2af3b3 4479fi
bb0a50d8
BM
4480{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
4481printf "%s\n" "$ac_cv_c_bigendian" >&6; }
8783280a
BM
4482 case $ac_cv_c_bigendian in #(
4483 yes)
4484
bb0a50d8 4485printf "%s\n" "#define NATIVE_BIG_ENDIAN 1" >>confdefs.h
8783280a
BM
4486;; #(
4487 no)
4488
bb0a50d8 4489printf "%s\n" "#define NATIVE_LITTLE_ENDIAN 1" >>confdefs.h
8783280a
BM
4490 ;; #(
4491 universal)
4492 as_fn_error $? "universal endianness is not supported - compile separately and use lipo(1)" "$LINENO" 5
4493
4494 ;; #(
4495 *)
4496 as_fn_error $? "unknown endianness" "$LINENO" 5 ;;
4497 esac
4498
4499
4500# We want to check for compiler flag support, but there is no way to make
4501# clang's "argument unused" warning fatal. So we invoke the compiler through a
4502# wrapper script that greps for this message.
4503saved_CC="$CC"
4504saved_CXX="$CXX"
4505saved_LD="$LD"
4506flag_wrap="$srcdir/extras/wrap-compiler-for-flag-check"
4507CC="$flag_wrap $CC"
4508CXX="$flag_wrap $CXX"
4509LD="$flag_wrap $LD"
4510
4511# We use the same hardening flags for C and C++. We must check that each flag
4512# is supported by both compilers.
85904c22 4513
8783280a
BM
4514
4515
4516
4517# Check whether --enable-hardening was given.
bb0a50d8
BM
4518if test ${enable_hardening+y}
4519then :
8783280a 4520 enableval=$enable_hardening; hardening="$enableval"
bb0a50d8 4521else $as_nop
8783280a 4522 hardening="yes"
94c2b583 4523fi
94c2b583 4524
e50b599b 4525
8783280a
BM
4526HARDEN_CFLAGS=""
4527HARDEN_LDFLAGS=""
bb0a50d8
BM
4528if test x"$hardening" != x"no"
4529then :
e50b599b 4530
e50b599b
BM
4531 ac_ext=c
4532ac_cpp='$CPP $CPPFLAGS'
4533ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4534ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4535ac_compiler_gnu=$ac_cv_c_compiler_gnu
4536
bb0a50d8
BM
4537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-strict-overflow" >&5
4538printf %s "checking whether C compiler accepts -fno-strict-overflow... " >&6; }
4539if test ${ax_cv_check_cflags__Werror___fno_strict_overflow+y}
4540then :
4541 printf %s "(cached) " >&6
4542else $as_nop
e50b599b
BM
4543
4544 ax_check_save_flags=$CFLAGS
8783280a 4545 CFLAGS="$CFLAGS -Werror -fno-strict-overflow"
e50b599b
BM
4546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4547/* end confdefs.h. */
4548
4549int
bb0a50d8 4550main (void)
e50b599b
BM
4551{
4552
4553 ;
4554 return 0;
4555}
4556_ACEOF
bb0a50d8
BM
4557if ac_fn_c_try_compile "$LINENO"
4558then :
8783280a 4559 ax_cv_check_cflags__Werror___fno_strict_overflow=yes
bb0a50d8 4560else $as_nop
8783280a 4561 ax_cv_check_cflags__Werror___fno_strict_overflow=no
e50b599b 4562fi
bb0a50d8 4563rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
e50b599b
BM
4564 CFLAGS=$ax_check_save_flags
4565fi
bb0a50d8
BM
4566{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___fno_strict_overflow" >&5
4567printf "%s\n" "$ax_cv_check_cflags__Werror___fno_strict_overflow" >&6; }
4568if test x"$ax_cv_check_cflags__Werror___fno_strict_overflow" = xyes
4569then :
8783280a 4570 HARDEN_CFLAGS="$HARDEN_CFLAGS -fno-strict-overflow"
bb0a50d8 4571else $as_nop
e50b599b
BM
4572 :
4573fi
4574
4575 ac_ext=c
4576ac_cpp='$CPP $CPPFLAGS'
4577ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15a5905d
BM
4578ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4579ac_compiler_gnu=$ac_cv_c_compiler_gnu
4580
4581
8783280a 4582 # This one will likely succeed, even on platforms where it does nothing.
15a5905d
BM
4583 ac_ext=c
4584ac_cpp='$CPP $CPPFLAGS'
4585ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4586ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4587ac_compiler_gnu=$ac_cv_c_compiler_gnu
4588
a24e53c0
BM
4589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -D_FORTIFY_SOURCE=3" >&5
4590printf %s "checking whether C compiler accepts -D_FORTIFY_SOURCE=3... " >&6; }
4591if test ${ax_cv_check_cflags__Werror___D_FORTIFY_SOURCE_3+y}
bb0a50d8
BM
4592then :
4593 printf %s "(cached) " >&6
4594else $as_nop
15a5905d
BM
4595
4596 ax_check_save_flags=$CFLAGS
a24e53c0 4597 CFLAGS="$CFLAGS -Werror -D_FORTIFY_SOURCE=3"
15a5905d
BM
4598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4599/* end confdefs.h. */
4600
4601int
bb0a50d8 4602main (void)
15a5905d
BM
4603{
4604
4605 ;
4606 return 0;
4607}
4608_ACEOF
bb0a50d8
BM
4609if ac_fn_c_try_compile "$LINENO"
4610then :
a24e53c0 4611 ax_cv_check_cflags__Werror___D_FORTIFY_SOURCE_3=yes
bb0a50d8 4612else $as_nop
a24e53c0 4613 ax_cv_check_cflags__Werror___D_FORTIFY_SOURCE_3=no
15a5905d 4614fi
bb0a50d8 4615rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15a5905d
BM
4616 CFLAGS=$ax_check_save_flags
4617fi
a24e53c0
BM
4618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___D_FORTIFY_SOURCE_3" >&5
4619printf "%s\n" "$ax_cv_check_cflags__Werror___D_FORTIFY_SOURCE_3" >&6; }
4620if test x"$ax_cv_check_cflags__Werror___D_FORTIFY_SOURCE_3" = xyes
bb0a50d8 4621then :
a24e53c0 4622 HARDEN_CFLAGS="$HARDEN_CFLAGS -D_FORTIFY_SOURCE=3"
bb0a50d8 4623else $as_nop
15a5905d
BM
4624 :
4625fi
4626
4627 ac_ext=c
4628ac_cpp='$CPP $CPPFLAGS'
4629ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
dd2af3b3
BM
4630ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4631ac_compiler_gnu=$ac_cv_c_compiler_gnu
4632
94c2b583 4633
dd2af3b3 4634 ac_ext=c
94c2b583 4635ac_cpp='$CPP $CPPFLAGS'
4636ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4637ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4638ac_compiler_gnu=$ac_cv_c_compiler_gnu
4639
bb0a50d8
BM
4640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fstack-protector-all" >&5
4641printf %s "checking whether C compiler accepts -fstack-protector-all... " >&6; }
4642if test ${ax_cv_check_cflags__Werror___fstack_protector_all+y}
4643then :
4644 printf %s "(cached) " >&6
4645else $as_nop
94c2b583 4646
dd2af3b3 4647 ax_check_save_flags=$CFLAGS
8783280a 4648 CFLAGS="$CFLAGS -Werror -fstack-protector-all"
dd2af3b3 4649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85904c22 4650/* end confdefs.h. */
94c2b583 4651
f5358606 4652int
bb0a50d8 4653main (void)
f5358606
BM
4654{
4655
4656 ;
4657 return 0;
4658}
4659_ACEOF
bb0a50d8
BM
4660if ac_fn_c_try_compile "$LINENO"
4661then :
8783280a 4662 ax_cv_check_cflags__Werror___fstack_protector_all=yes
bb0a50d8 4663else $as_nop
8783280a 4664 ax_cv_check_cflags__Werror___fstack_protector_all=no
f5358606 4665fi
bb0a50d8 4666rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
dd2af3b3 4667 CFLAGS=$ax_check_save_flags
f5358606 4668fi
bb0a50d8
BM
4669{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___fstack_protector_all" >&5
4670printf "%s\n" "$ax_cv_check_cflags__Werror___fstack_protector_all" >&6; }
4671if test x"$ax_cv_check_cflags__Werror___fstack_protector_all" = xyes
4672then :
4673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -fstack-protector-all" >&5
4674printf %s "checking whether the linker accepts -fstack-protector-all... " >&6; }
4675if test ${ax_cv_check_ldflags__Werror___fstack_protector_all+y}
4676then :
4677 printf %s "(cached) " >&6
4678else $as_nop
f5358606 4679
dd2af3b3 4680 ax_check_save_flags=$LDFLAGS
8783280a 4681 LDFLAGS="$LDFLAGS -Werror -fstack-protector-all"
dd2af3b3 4682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f5358606
BM
4683/* end confdefs.h. */
4684
4685int
bb0a50d8 4686main (void)
f5358606
BM
4687{
4688
4689 ;
4690 return 0;
4691}
4692_ACEOF
bb0a50d8
BM
4693if ac_fn_c_try_link "$LINENO"
4694then :
8783280a 4695 ax_cv_check_ldflags__Werror___fstack_protector_all=yes
bb0a50d8 4696else $as_nop
8783280a 4697 ax_cv_check_ldflags__Werror___fstack_protector_all=no
f5358606 4698fi
bb0a50d8 4699rm -f core conftest.err conftest.$ac_objext conftest.beam \
dd2af3b3
BM
4700 conftest$ac_exeext conftest.$ac_ext
4701 LDFLAGS=$ax_check_save_flags
f5358606 4702fi
bb0a50d8
BM
4703{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags__Werror___fstack_protector_all" >&5
4704printf "%s\n" "$ax_cv_check_ldflags__Werror___fstack_protector_all" >&6; }
4705if test x"$ax_cv_check_ldflags__Werror___fstack_protector_all" = xyes
4706then :
8783280a
BM
4707 HARDEN_CFLAGS="$HARDEN_CFLAGS -fstack-protector-all"
4708 ac_ext=c
4709ac_cpp='$CPP $CPPFLAGS'
4710ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4711ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4712ac_compiler_gnu=$ac_cv_c_compiler_gnu
4713
bb0a50d8
BM
4714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wstack-protector" >&5
4715printf %s "checking whether C compiler accepts -Wstack-protector... " >&6; }
4716if test ${ax_cv_check_cflags__Werror__fstack_protector_all__Wstack_protector+y}
4717then :
4718 printf %s "(cached) " >&6
4719else $as_nop
255223b3 4720
8783280a
BM
4721 ax_check_save_flags=$CFLAGS
4722 CFLAGS="$CFLAGS -Werror -fstack-protector-all -Wstack-protector"
dd2af3b3 4723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
255223b3
BM
4724/* end confdefs.h. */
4725
4726int
bb0a50d8 4727main (void)
255223b3
BM
4728{
4729
4730 ;
4731 return 0;
4732}
4733_ACEOF
bb0a50d8
BM
4734if ac_fn_c_try_compile "$LINENO"
4735then :
8783280a 4736 ax_cv_check_cflags__Werror__fstack_protector_all__Wstack_protector=yes
bb0a50d8 4737else $as_nop
8783280a 4738 ax_cv_check_cflags__Werror__fstack_protector_all__Wstack_protector=no
dd2af3b3 4739fi
bb0a50d8 4740rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8783280a 4741 CFLAGS=$ax_check_save_flags
255223b3 4742fi
bb0a50d8
BM
4743{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__fstack_protector_all__Wstack_protector" >&5
4744printf "%s\n" "$ax_cv_check_cflags__Werror__fstack_protector_all__Wstack_protector" >&6; }
4745if test x"$ax_cv_check_cflags__Werror__fstack_protector_all__Wstack_protector" = xyes
4746then :
8783280a 4747 HARDEN_CFLAGS="$HARDEN_CFLAGS -Wstack-protector"
bb0a50d8 4748else $as_nop
dd2af3b3 4749 :
255223b3 4750fi
dd2af3b3 4751
f320e32b 4752 ac_ext=c
dd2af3b3
BM
4753ac_cpp='$CPP $CPPFLAGS'
4754ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4755ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4756ac_compiler_gnu=$ac_cv_c_compiler_gnu
4757
8783280a
BM
4758 ac_ext=c
4759ac_cpp='$CPP $CPPFLAGS'
4760ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4761ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4762ac_compiler_gnu=$ac_cv_c_compiler_gnu
dd2af3b3 4763
bb0a50d8
BM
4764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts --param ssp-buffer-size=1" >&5
4765printf %s "checking whether C compiler accepts --param ssp-buffer-size=1... " >&6; }
4766if test ${ax_cv_check_cflags__Werror__fstack_protector_all___param_ssp_buffer_size_1+y}
4767then :
4768 printf %s "(cached) " >&6
4769else $as_nop
47bfcf75 4770
8783280a
BM
4771 ax_check_save_flags=$CFLAGS
4772 CFLAGS="$CFLAGS -Werror -fstack-protector-all --param ssp-buffer-size=1"
dd2af3b3 4773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47bfcf75
BM
4774/* end confdefs.h. */
4775
4776int
bb0a50d8 4777main (void)
47bfcf75
BM
4778{
4779
4780 ;
4781 return 0;
4782}
4783_ACEOF
bb0a50d8
BM
4784if ac_fn_c_try_compile "$LINENO"
4785then :
8783280a 4786 ax_cv_check_cflags__Werror__fstack_protector_all___param_ssp_buffer_size_1=yes
bb0a50d8 4787else $as_nop
8783280a 4788 ax_cv_check_cflags__Werror__fstack_protector_all___param_ssp_buffer_size_1=no
47bfcf75 4789fi
bb0a50d8 4790rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8783280a 4791 CFLAGS=$ax_check_save_flags
47bfcf75 4792fi
bb0a50d8
BM
4793{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__fstack_protector_all___param_ssp_buffer_size_1" >&5
4794printf "%s\n" "$ax_cv_check_cflags__Werror__fstack_protector_all___param_ssp_buffer_size_1" >&6; }
4795if test x"$ax_cv_check_cflags__Werror__fstack_protector_all___param_ssp_buffer_size_1" = xyes
4796then :
8783280a 4797 HARDEN_CFLAGS="$HARDEN_CFLAGS --param ssp-buffer-size=1"
bb0a50d8 4798else $as_nop
8783280a
BM
4799 :
4800fi
98709bee 4801
8783280a
BM
4802 ac_ext=c
4803ac_cpp='$CPP $CPPFLAGS'
4804ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4805ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4806ac_compiler_gnu=$ac_cv_c_compiler_gnu
98709bee 4807
bb0a50d8 4808else $as_nop
dd2af3b3 4809 :
98709bee
BM
4810fi
4811
bb0a50d8 4812else $as_nop
dd2af3b3 4813 :
85904c22 4814fi
dd2af3b3 4815
8783280a
BM
4816 ac_ext=c
4817ac_cpp='$CPP $CPPFLAGS'
4818ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4819ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4820ac_compiler_gnu=$ac_cv_c_compiler_gnu
dd2af3b3 4821
dd2af3b3 4822
8783280a
BM
4823 # Added in UnrealIRCd 5.0.5 (default on Ubuntu 19.10)
4824 ac_ext=c
f320e32b
BM
4825ac_cpp='$CPP $CPPFLAGS'
4826ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4827ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4828ac_compiler_gnu=$ac_cv_c_compiler_gnu
4829
bb0a50d8
BM
4830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fstack-clash-protection" >&5
4831printf %s "checking whether C compiler accepts -fstack-clash-protection... " >&6; }
4832if test ${ax_cv_check_cflags__Werror___fstack_clash_protection+y}
4833then :
4834 printf %s "(cached) " >&6
4835else $as_nop
85904c22 4836
dd2af3b3 4837 ax_check_save_flags=$CFLAGS
8783280a 4838 CFLAGS="$CFLAGS -Werror -fstack-clash-protection"
dd2af3b3
BM
4839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4840/* end confdefs.h. */
4841
4842int
bb0a50d8 4843main (void)
dd2af3b3
BM
4844{
4845
4846 ;
4847 return 0;
4848}
4849_ACEOF
bb0a50d8
BM
4850if ac_fn_c_try_compile "$LINENO"
4851then :
8783280a 4852 ax_cv_check_cflags__Werror___fstack_clash_protection=yes
bb0a50d8 4853else $as_nop
8783280a 4854 ax_cv_check_cflags__Werror___fstack_clash_protection=no
85904c22 4855fi
bb0a50d8 4856rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
dd2af3b3
BM
4857 CFLAGS=$ax_check_save_flags
4858fi
bb0a50d8
BM
4859{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___fstack_clash_protection" >&5
4860printf "%s\n" "$ax_cv_check_cflags__Werror___fstack_clash_protection" >&6; }
4861if test x"$ax_cv_check_cflags__Werror___fstack_clash_protection" = xyes
4862then :
8783280a 4863 HARDEN_CFLAGS="$HARDEN_CFLAGS -fstack-clash-protection"
bb0a50d8 4864else $as_nop
dd2af3b3 4865 :
85904c22 4866fi
85904c22 4867
dd2af3b3
BM
4868 ac_ext=c
4869ac_cpp='$CPP $CPPFLAGS'
4870ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
70a8985d
BM
4871ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4872ac_compiler_gnu=$ac_cv_c_compiler_gnu
4873
4874
8783280a
BM
4875 # Control Flow Enforcement (ROP hardening) - requires CPU hardware support
4876 ac_ext=c
70a8985d
BM
4877ac_cpp='$CPP $CPPFLAGS'
4878ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4879ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4880ac_compiler_gnu=$ac_cv_c_compiler_gnu
4881
bb0a50d8
BM
4882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fcf-protection" >&5
4883printf %s "checking whether C compiler accepts -fcf-protection... " >&6; }
4884if test ${ax_cv_check_cflags__Werror___fcf_protection+y}
4885then :
4886 printf %s "(cached) " >&6
4887else $as_nop
70a8985d
BM
4888
4889 ax_check_save_flags=$CFLAGS
8783280a 4890 CFLAGS="$CFLAGS -Werror -fcf-protection"
70a8985d
BM
4891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4892/* end confdefs.h. */
4893
4894int
bb0a50d8 4895main (void)
70a8985d
BM
4896{
4897
4898 ;
4899 return 0;
4900}
4901_ACEOF
bb0a50d8
BM
4902if ac_fn_c_try_compile "$LINENO"
4903then :
8783280a 4904 ax_cv_check_cflags__Werror___fcf_protection=yes
bb0a50d8 4905else $as_nop
8783280a 4906 ax_cv_check_cflags__Werror___fcf_protection=no
70a8985d 4907fi
bb0a50d8 4908rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
70a8985d
BM
4909 CFLAGS=$ax_check_save_flags
4910fi
bb0a50d8
BM
4911{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___fcf_protection" >&5
4912printf "%s\n" "$ax_cv_check_cflags__Werror___fcf_protection" >&6; }
4913if test x"$ax_cv_check_cflags__Werror___fcf_protection" = xyes
4914then :
8783280a 4915 HARDEN_CFLAGS="$HARDEN_CFLAGS -fcf-protection"
bb0a50d8 4916else $as_nop
70a8985d
BM
4917 :
4918fi
4919
4920 ac_ext=c
4921ac_cpp='$CPP $CPPFLAGS'
4922ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
dd2af3b3
BM
4923ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4924ac_compiler_gnu=$ac_cv_c_compiler_gnu
4925
85904c22 4926
8783280a
BM
4927 # At the link step, we might want -pie (GCC) or -Wl,-pie (Clang on OS X)
4928 #
4929 # The linker checks also compile code, so we need to include -fPIE as well.
4930 ac_ext=c
dd2af3b3
BM
4931ac_cpp='$CPP $CPPFLAGS'
4932ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4933ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4934ac_compiler_gnu=$ac_cv_c_compiler_gnu
4935
bb0a50d8
BM
4936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fPIE" >&5
4937printf %s "checking whether C compiler accepts -fPIE... " >&6; }
4938if test ${ax_cv_check_cflags__Werror___fPIE+y}
4939then :
4940 printf %s "(cached) " >&6
4941else $as_nop
85904c22 4942
dd2af3b3 4943 ax_check_save_flags=$CFLAGS
8783280a 4944 CFLAGS="$CFLAGS -Werror -fPIE"
dd2af3b3
BM
4945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4946/* end confdefs.h. */
4947
dd2af3b3 4948int
bb0a50d8 4949main (void)
dd2af3b3
BM
4950{
4951
4952 ;
4953 return 0;
4954}
4955_ACEOF
bb0a50d8
BM
4956if ac_fn_c_try_compile "$LINENO"
4957then :
8783280a 4958 ax_cv_check_cflags__Werror___fPIE=yes
bb0a50d8 4959else $as_nop
8783280a 4960 ax_cv_check_cflags__Werror___fPIE=no
85904c22 4961fi
bb0a50d8 4962rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
dd2af3b3 4963 CFLAGS=$ax_check_save_flags
94c2b583 4964fi
bb0a50d8
BM
4965{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___fPIE" >&5
4966printf "%s\n" "$ax_cv_check_cflags__Werror___fPIE" >&6; }
4967if test x"$ax_cv_check_cflags__Werror___fPIE" = xyes
4968then :
4969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -fPIE -pie" >&5
4970printf %s "checking whether the linker accepts -fPIE -pie... " >&6; }
4971if test ${ax_cv_check_ldflags__Werror___fPIE__pie+y}
4972then :
4973 printf %s "(cached) " >&6
4974else $as_nop
85904c22 4975
8783280a
BM
4976 ax_check_save_flags=$LDFLAGS
4977 LDFLAGS="$LDFLAGS -Werror -fPIE -pie"
dd2af3b3
BM
4978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4979/* end confdefs.h. */
4980
4981int
bb0a50d8 4982main (void)
dd2af3b3
BM
4983{
4984
4985 ;
4986 return 0;
4987}
4988_ACEOF
bb0a50d8
BM
4989if ac_fn_c_try_link "$LINENO"
4990then :
8783280a 4991 ax_cv_check_ldflags__Werror___fPIE__pie=yes
bb0a50d8 4992else $as_nop
8783280a 4993 ax_cv_check_ldflags__Werror___fPIE__pie=no
dd2af3b3 4994fi
bb0a50d8 4995rm -f core conftest.err conftest.$ac_objext conftest.beam \
8783280a
BM
4996 conftest$ac_exeext conftest.$ac_ext
4997 LDFLAGS=$ax_check_save_flags
f320e32b 4998fi
bb0a50d8
BM
4999{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags__Werror___fPIE__pie" >&5
5000printf "%s\n" "$ax_cv_check_ldflags__Werror___fPIE__pie" >&6; }
5001if test x"$ax_cv_check_ldflags__Werror___fPIE__pie" = xyes
5002then :
8783280a
BM
5003 HARDEN_BINCFLAGS="-fPIE"
5004 HARDEN_BINLDFLAGS="-pie"
bb0a50d8
BM
5005else $as_nop
5006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -fPIE -Wl,-pie" >&5
5007printf %s "checking whether the linker accepts -fPIE -Wl,-pie... " >&6; }
5008if test ${ax_cv_check_ldflags__Werror___fPIE__Wl__pie+y}
5009then :
5010 printf %s "(cached) " >&6
5011else $as_nop
94c2b583 5012
8783280a
BM
5013 ax_check_save_flags=$LDFLAGS
5014 LDFLAGS="$LDFLAGS -Werror -fPIE -Wl,-pie"
dd2af3b3
BM
5015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5016/* end confdefs.h. */
5017
5018int
bb0a50d8 5019main (void)
dd2af3b3
BM
5020{
5021
5022 ;
5023 return 0;
5024}
5025_ACEOF
bb0a50d8
BM
5026if ac_fn_c_try_link "$LINENO"
5027then :
8783280a 5028 ax_cv_check_ldflags__Werror___fPIE__Wl__pie=yes
bb0a50d8 5029else $as_nop
8783280a 5030 ax_cv_check_ldflags__Werror___fPIE__Wl__pie=no
85904c22 5031fi
bb0a50d8 5032rm -f core conftest.err conftest.$ac_objext conftest.beam \
8783280a
BM
5033 conftest$ac_exeext conftest.$ac_ext
5034 LDFLAGS=$ax_check_save_flags
dd2af3b3 5035fi
bb0a50d8
BM
5036{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags__Werror___fPIE__Wl__pie" >&5
5037printf "%s\n" "$ax_cv_check_ldflags__Werror___fPIE__Wl__pie" >&6; }
5038if test x"$ax_cv_check_ldflags__Werror___fPIE__Wl__pie" = xyes
5039then :
8783280a
BM
5040 HARDEN_BINCFLAGS="-fPIE"
5041 HARDEN_BINLDFLAGS="-Wl,-pie"
bb0a50d8 5042else $as_nop
8783280a
BM
5043 :
5044fi
5045
5046fi
5047
bb0a50d8 5048else $as_nop
dd2af3b3
BM
5049 :
5050fi
94c2b583 5051
dd2af3b3
BM
5052 ac_ext=c
5053ac_cpp='$CPP $CPPFLAGS'
5054ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5055ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5056ac_compiler_gnu=$ac_cv_c_compiler_gnu
5057
dd2af3b3 5058
bb0a50d8
BM
5059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-z,relro" >&5
5060printf %s "checking whether the linker accepts -Wl,-z,relro... " >&6; }
5061if test ${ax_cv_check_ldflags__Werror___Wl__z_relro+y}
5062then :
5063 printf %s "(cached) " >&6
5064else $as_nop
dd2af3b3 5065
8783280a
BM
5066 ax_check_save_flags=$LDFLAGS
5067 LDFLAGS="$LDFLAGS -Werror -Wl,-z,relro"
dd2af3b3 5068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85904c22 5069/* end confdefs.h. */
85904c22 5070
85904c22 5071int
bb0a50d8 5072main (void)
85904c22 5073{
dd2af3b3 5074
85904c22
BM
5075 ;
5076 return 0;
5077}
5078_ACEOF
bb0a50d8
BM
5079if ac_fn_c_try_link "$LINENO"
5080then :
8783280a 5081 ax_cv_check_ldflags__Werror___Wl__z_relro=yes
bb0a50d8 5082else $as_nop
8783280a 5083 ax_cv_check_ldflags__Werror___Wl__z_relro=no
85904c22 5084fi
bb0a50d8 5085rm -f core conftest.err conftest.$ac_objext conftest.beam \
8783280a
BM
5086 conftest$ac_exeext conftest.$ac_ext
5087 LDFLAGS=$ax_check_save_flags
85904c22 5088fi
bb0a50d8
BM
5089{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags__Werror___Wl__z_relro" >&5
5090printf "%s\n" "$ax_cv_check_ldflags__Werror___Wl__z_relro" >&6; }
5091if test x"$ax_cv_check_ldflags__Werror___Wl__z_relro" = xyes
5092then :
8783280a 5093 HARDEN_LDFLAGS="$HARDEN_LDFLAGS -Wl,-z,relro"
bb0a50d8
BM
5094 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-z,now" >&5
5095printf %s "checking whether the linker accepts -Wl,-z,now... " >&6; }
5096if test ${ax_cv_check_ldflags__Werror___Wl__z_now+y}
5097then :
5098 printf %s "(cached) " >&6
5099else $as_nop
8783280a
BM
5100
5101 ax_check_save_flags=$LDFLAGS
5102 LDFLAGS="$LDFLAGS -Werror -Wl,-z,now"
5103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5104/* end confdefs.h. */
5105
5106int
bb0a50d8 5107main (void)
8783280a
BM
5108{
5109
5110 ;
5111 return 0;
5112}
5113_ACEOF
bb0a50d8
BM
5114if ac_fn_c_try_link "$LINENO"
5115then :
8783280a 5116 ax_cv_check_ldflags__Werror___Wl__z_now=yes
bb0a50d8 5117else $as_nop
8783280a
BM
5118 ax_cv_check_ldflags__Werror___Wl__z_now=no
5119fi
bb0a50d8 5120rm -f core conftest.err conftest.$ac_objext conftest.beam \
8783280a
BM
5121 conftest$ac_exeext conftest.$ac_ext
5122 LDFLAGS=$ax_check_save_flags
5123fi
bb0a50d8
BM
5124{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags__Werror___Wl__z_now" >&5
5125printf "%s\n" "$ax_cv_check_ldflags__Werror___Wl__z_now" >&6; }
5126if test x"$ax_cv_check_ldflags__Werror___Wl__z_now" = xyes
5127then :
8783280a 5128 HARDEN_LDFLAGS="$HARDEN_LDFLAGS -Wl,-z,now"
bb0a50d8 5129else $as_nop
f320e32b
BM
5130 :
5131fi
5132
bb0a50d8 5133else $as_nop
8783280a
BM
5134 :
5135fi
5136
5137fi
5138
5139
85904c22 5140
f320e32b
BM
5141
5142
8783280a
BM
5143# End of flag tests.
5144CC="$saved_CC"
5145CXX="$saved_CXX"
5146LD="$saved_LD"
5147
f320e32b
BM
5148ac_ext=c
5149ac_cpp='$CPP $CPPFLAGS'
5150ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5151ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5152ac_compiler_gnu=$ac_cv_c_compiler_gnu
5153
bb0a50d8
BM
5154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-strict-aliasing" >&5
5155printf %s "checking whether C compiler accepts -fno-strict-aliasing... " >&6; }
5156if test ${ax_cv_check_cflags__Werror___fno_strict_aliasing+y}
5157then :
5158 printf %s "(cached) " >&6
5159else $as_nop
dd2af3b3
BM
5160
5161 ax_check_save_flags=$CFLAGS
8783280a 5162 CFLAGS="$CFLAGS -Werror -fno-strict-aliasing"
dd2af3b3 5163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85904c22 5164/* end confdefs.h. */
85904c22 5165
85904c22 5166int
bb0a50d8 5167main (void)
85904c22 5168{
dd2af3b3 5169
85904c22
BM
5170 ;
5171 return 0;
5172}
5173_ACEOF
bb0a50d8
BM
5174if ac_fn_c_try_compile "$LINENO"
5175then :
8783280a 5176 ax_cv_check_cflags__Werror___fno_strict_aliasing=yes
bb0a50d8 5177else $as_nop
8783280a 5178 ax_cv_check_cflags__Werror___fno_strict_aliasing=no
85904c22 5179fi
bb0a50d8 5180rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
dd2af3b3
BM
5181 CFLAGS=$ax_check_save_flags
5182fi
bb0a50d8
BM
5183{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___fno_strict_aliasing" >&5
5184printf "%s\n" "$ax_cv_check_cflags__Werror___fno_strict_aliasing" >&6; }
5185if test x"$ax_cv_check_cflags__Werror___fno_strict_aliasing" = xyes
5186then :
8783280a 5187 CFLAGS="$CFLAGS -fno-strict-aliasing"
bb0a50d8 5188else $as_nop
dd2af3b3 5189 :
85904c22 5190fi
85904c22 5191
dd2af3b3
BM
5192 ac_ext=c
5193ac_cpp='$CPP $CPPFLAGS'
5194ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5195ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5196ac_compiler_gnu=$ac_cv_c_compiler_gnu
85904c22 5197
f320e32b 5198
dd2af3b3
BM
5199ac_ext=c
5200ac_cpp='$CPP $CPPFLAGS'
5201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5203ac_compiler_gnu=$ac_cv_c_compiler_gnu
5204
bb0a50d8
BM
5205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-common" >&5
5206printf %s "checking whether C compiler accepts -fno-common... " >&6; }
5207if test ${ax_cv_check_cflags__Werror___fno_common+y}
5208then :
5209 printf %s "(cached) " >&6
5210else $as_nop
dd2af3b3
BM
5211
5212 ax_check_save_flags=$CFLAGS
8783280a 5213 CFLAGS="$CFLAGS -Werror -fno-common"
dd2af3b3
BM
5214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5215/* end confdefs.h. */
5216
5217int
bb0a50d8 5218main (void)
dd2af3b3
BM
5219{
5220
5221 ;
5222 return 0;
5223}
5224_ACEOF
bb0a50d8
BM
5225if ac_fn_c_try_compile "$LINENO"
5226then :
8783280a 5227 ax_cv_check_cflags__Werror___fno_common=yes
bb0a50d8 5228else $as_nop
8783280a 5229 ax_cv_check_cflags__Werror___fno_common=no
dd2af3b3 5230fi
bb0a50d8 5231rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
dd2af3b3
BM
5232 CFLAGS=$ax_check_save_flags
5233fi
bb0a50d8
BM
5234{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___fno_common" >&5
5235printf "%s\n" "$ax_cv_check_cflags__Werror___fno_common" >&6; }
5236if test x"$ax_cv_check_cflags__Werror___fno_common" = xyes
5237then :
8783280a 5238 CFLAGS="$CFLAGS -fno-common"
bb0a50d8 5239else $as_nop
f320e32b
BM
5240 :
5241fi
5242
dd2af3b3
BM
5243 ac_ext=c
5244ac_cpp='$CPP $CPPFLAGS'
5245ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5246ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5247ac_compiler_gnu=$ac_cv_c_compiler_gnu
5248
f320e32b 5249
8783280a
BM
5250CFLAGS="$CFLAGS -funsigned-char"
5251
5252
8e264068 5253
8783280a
BM
5254CFLAGS="$CFLAGS -Wall"
5255
f320e32b
BM
5256ac_ext=c
5257ac_cpp='$CPP $CPPFLAGS'
5258ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5259ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5260ac_compiler_gnu=$ac_cv_c_compiler_gnu
5261
bb0a50d8
BM
5262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wextra" >&5
5263printf %s "checking whether C compiler accepts -Wextra... " >&6; }
5264if test ${ax_cv_check_cflags__Werror___Wextra+y}
5265then :
5266 printf %s "(cached) " >&6
5267else $as_nop
dd2af3b3
BM
5268
5269 ax_check_save_flags=$CFLAGS
8783280a 5270 CFLAGS="$CFLAGS -Werror -Wextra"
dd2af3b3 5271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85904c22 5272/* end confdefs.h. */
85904c22 5273
85904c22 5274int
bb0a50d8 5275main (void)
85904c22 5276{
dd2af3b3 5277
85904c22
BM
5278 ;
5279 return 0;
5280}
5281_ACEOF
bb0a50d8
BM
5282if ac_fn_c_try_compile "$LINENO"
5283then :
8783280a 5284 ax_cv_check_cflags__Werror___Wextra=yes
bb0a50d8 5285else $as_nop
8783280a 5286 ax_cv_check_cflags__Werror___Wextra=no
85904c22 5287fi
bb0a50d8 5288rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
dd2af3b3 5289 CFLAGS=$ax_check_save_flags
85904c22 5290fi
bb0a50d8
BM
5291{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wextra" >&5
5292printf "%s\n" "$ax_cv_check_cflags__Werror___Wextra" >&6; }
5293if test x"$ax_cv_check_cflags__Werror___Wextra" = xyes
5294then :
8783280a 5295 CFLAGS="$CFLAGS -Wextra"
bb0a50d8 5296else $as_nop
dd2af3b3
BM
5297 :
5298fi
5299
5300 ac_ext=c
5301ac_cpp='$CPP $CPPFLAGS'
5302ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5303ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5304ac_compiler_gnu=$ac_cv_c_compiler_gnu
5305
dd2af3b3
BM
5306ac_ext=c
5307ac_cpp='$CPP $CPPFLAGS'
5308ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5309ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5310ac_compiler_gnu=$ac_cv_c_compiler_gnu
5311
bb0a50d8
BM
5312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Waggregate-return" >&5
5313printf %s "checking whether C compiler accepts -Waggregate-return... " >&6; }
5314if test ${ax_cv_check_cflags__Werror___Waggregate_return+y}
5315then :
5316 printf %s "(cached) " >&6
5317else $as_nop
dd2af3b3
BM
5318
5319 ax_check_save_flags=$CFLAGS
8783280a 5320 CFLAGS="$CFLAGS -Werror -Waggregate-return"
dd2af3b3 5321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85904c22 5322/* end confdefs.h. */
85904c22 5323
85904c22 5324int
bb0a50d8 5325main (void)
85904c22 5326{
dd2af3b3 5327
85904c22
BM
5328 ;
5329 return 0;
5330}
5331_ACEOF
bb0a50d8
BM
5332if ac_fn_c_try_compile "$LINENO"
5333then :
8783280a 5334 ax_cv_check_cflags__Werror___Waggregate_return=yes
bb0a50d8 5335else $as_nop
8783280a 5336 ax_cv_check_cflags__Werror___Waggregate_return=no
94c2b583 5337fi
bb0a50d8 5338rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
dd2af3b3 5339 CFLAGS=$ax_check_save_flags
94c2b583 5340fi
bb0a50d8
BM
5341{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Waggregate_return" >&5
5342printf "%s\n" "$ax_cv_check_cflags__Werror___Waggregate_return" >&6; }
5343if test x"$ax_cv_check_cflags__Werror___Waggregate_return" = xyes
5344then :
8783280a 5345 CFLAGS="$CFLAGS -Waggregate-return"
bb0a50d8 5346else $as_nop
f320e32b 5347 :
bae1dcf1 5348fi
f320e32b 5349
bae1dcf1
BM
5350 ac_ext=c
5351ac_cpp='$CPP $CPPFLAGS'
5352ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5353ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5354ac_compiler_gnu=$ac_cv_c_compiler_gnu
5355
1068960b
BM
5356ac_ext=c
5357ac_cpp='$CPP $CPPFLAGS'
5358ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5359ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5360ac_compiler_gnu=$ac_cv_c_compiler_gnu
5361
bb0a50d8
BM
5362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wformat-nonliteral" >&5
5363printf %s "checking whether C compiler accepts -Wformat-nonliteral... " >&6; }
5364if test ${ax_cv_check_cflags__Werror___Wformat_nonliteral+y}
5365then :
5366 printf %s "(cached) " >&6
5367else $as_nop
1068960b
BM
5368
5369 ax_check_save_flags=$CFLAGS
5370 CFLAGS="$CFLAGS -Werror -Wformat-nonliteral"
5371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5372/* end confdefs.h. */
5373
5374int
bb0a50d8 5375main (void)
1068960b
BM
5376{
5377
5378 ;
5379 return 0;
5380}
5381_ACEOF
bb0a50d8
BM
5382if ac_fn_c_try_compile "$LINENO"
5383then :
1068960b 5384 ax_cv_check_cflags__Werror___Wformat_nonliteral=yes
bb0a50d8 5385else $as_nop
1068960b
BM
5386 ax_cv_check_cflags__Werror___Wformat_nonliteral=no
5387fi
bb0a50d8 5388rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1068960b
BM
5389 CFLAGS=$ax_check_save_flags
5390fi
bb0a50d8
BM
5391{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wformat_nonliteral" >&5
5392printf "%s\n" "$ax_cv_check_cflags__Werror___Wformat_nonliteral" >&6; }
5393if test x"$ax_cv_check_cflags__Werror___Wformat_nonliteral" = xyes
5394then :
1068960b 5395 CFLAGS="$CFLAGS -Wformat-nonliteral"
bb0a50d8 5396else $as_nop
1068960b
BM
5397 :
5398fi
5399
5400 ac_ext=c
5401ac_cpp='$CPP $CPPFLAGS'
5402ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5403ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5404ac_compiler_gnu=$ac_cv_c_compiler_gnu
5405
5406
f320e32b
BM
5407ac_ext=c
5408ac_cpp='$CPP $CPPFLAGS'
5409ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5410ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5411ac_compiler_gnu=$ac_cv_c_compiler_gnu
5412
bb0a50d8
BM
5413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wduplicated-cond" >&5
5414printf %s "checking whether C compiler accepts -Wduplicated-cond... " >&6; }
5415if test ${ax_cv_check_cflags__Werror___Wduplicated_cond+y}
5416then :
5417 printf %s "(cached) " >&6
5418else $as_nop
bae1dcf1
BM
5419
5420 ax_check_save_flags=$CFLAGS
8783280a 5421 CFLAGS="$CFLAGS -Werror -Wduplicated-cond"
bae1dcf1
BM
5422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5423/* end confdefs.h. */
5424
5425int
bb0a50d8 5426main (void)
bae1dcf1
BM
5427{
5428
5429 ;
5430 return 0;
5431}
5432_ACEOF
bb0a50d8
BM
5433if ac_fn_c_try_compile "$LINENO"
5434then :
8783280a 5435 ax_cv_check_cflags__Werror___Wduplicated_cond=yes
bb0a50d8 5436else $as_nop
8783280a 5437 ax_cv_check_cflags__Werror___Wduplicated_cond=no
bae1dcf1 5438fi
bb0a50d8 5439rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
bae1dcf1
BM
5440 CFLAGS=$ax_check_save_flags
5441fi
bb0a50d8
BM
5442{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wduplicated_cond" >&5
5443printf "%s\n" "$ax_cv_check_cflags__Werror___Wduplicated_cond" >&6; }
5444if test x"$ax_cv_check_cflags__Werror___Wduplicated_cond" = xyes
5445then :
8783280a 5446 CFLAGS="$CFLAGS -Wduplicated-cond"
bb0a50d8 5447else $as_nop
bae1dcf1
BM
5448 :
5449fi
5450
5451 ac_ext=c
5452ac_cpp='$CPP $CPPFLAGS'
5453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5455ac_compiler_gnu=$ac_cv_c_compiler_gnu
5456
dd2af3b3 5457ac_ext=c
bae1dcf1
BM
5458ac_cpp='$CPP $CPPFLAGS'
5459ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5460ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5461ac_compiler_gnu=$ac_cv_c_compiler_gnu
5462
bb0a50d8
BM
5463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wduplicated-branches" >&5
5464printf %s "checking whether C compiler accepts -Wduplicated-branches... " >&6; }
5465if test ${ax_cv_check_cflags__Werror___Wduplicated_branches+y}
5466then :
5467 printf %s "(cached) " >&6
5468else $as_nop
bae1dcf1
BM
5469
5470 ax_check_save_flags=$CFLAGS
8783280a 5471 CFLAGS="$CFLAGS -Werror -Wduplicated-branches"
bae1dcf1
BM
5472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5473/* end confdefs.h. */
5474
bae1dcf1 5475int
bb0a50d8 5476main (void)
bae1dcf1
BM
5477{
5478
5479 ;
5480 return 0;
5481}
5482_ACEOF
bb0a50d8
BM
5483if ac_fn_c_try_compile "$LINENO"
5484then :
8783280a 5485 ax_cv_check_cflags__Werror___Wduplicated_branches=yes
bb0a50d8 5486else $as_nop
8783280a 5487 ax_cv_check_cflags__Werror___Wduplicated_branches=no
bae1dcf1 5488fi
bb0a50d8 5489rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
bae1dcf1
BM
5490 CFLAGS=$ax_check_save_flags
5491fi
bb0a50d8
BM
5492{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wduplicated_branches" >&5
5493printf "%s\n" "$ax_cv_check_cflags__Werror___Wduplicated_branches" >&6; }
5494if test x"$ax_cv_check_cflags__Werror___Wduplicated_branches" = xyes
5495then :
8783280a 5496 CFLAGS="$CFLAGS -Wduplicated-branches"
bb0a50d8 5497else $as_nop
bae1dcf1
BM
5498 :
5499fi
5500
5501 ac_ext=c
5502ac_cpp='$CPP $CPPFLAGS'
5503ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5504ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5505ac_compiler_gnu=$ac_cv_c_compiler_gnu
5506
8783280a 5507
8e264068
BM
5508ac_ext=c
5509ac_cpp='$CPP $CPPFLAGS'
5510ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5511ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5512ac_compiler_gnu=$ac_cv_c_compiler_gnu
5513
bb0a50d8
BM
5514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wparentheses" >&5
5515printf %s "checking whether C compiler accepts -Wparentheses... " >&6; }
5516if test ${ax_cv_check_cflags__Werror___Wparentheses+y}
5517then :
5518 printf %s "(cached) " >&6
5519else $as_nop
8e264068
BM
5520
5521 ax_check_save_flags=$CFLAGS
5522 CFLAGS="$CFLAGS -Werror -Wparentheses"
5523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5524/* end confdefs.h. */
5525
5526int
bb0a50d8 5527main (void)
8e264068
BM
5528{
5529
5530 ;
5531 return 0;
5532}
5533_ACEOF
bb0a50d8
BM
5534if ac_fn_c_try_compile "$LINENO"
5535then :
8e264068 5536 ax_cv_check_cflags__Werror___Wparentheses=yes
bb0a50d8 5537else $as_nop
8e264068
BM
5538 ax_cv_check_cflags__Werror___Wparentheses=no
5539fi
bb0a50d8 5540rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8e264068
BM
5541 CFLAGS=$ax_check_save_flags
5542fi
bb0a50d8
BM
5543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wparentheses" >&5
5544printf "%s\n" "$ax_cv_check_cflags__Werror___Wparentheses" >&6; }
5545if test x"$ax_cv_check_cflags__Werror___Wparentheses" = xyes
5546then :
8e264068 5547 CFLAGS="$CFLAGS -Wparentheses"
bb0a50d8 5548else $as_nop
8e264068
BM
5549 :
5550fi
5551
5552 ac_ext=c
5553ac_cpp='$CPP $CPPFLAGS'
5554ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5555ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5556ac_compiler_gnu=$ac_cv_c_compiler_gnu
5557
5558
5559
8783280a 5560
efe73de7
BM
5561ac_ext=c
5562ac_cpp='$CPP $CPPFLAGS'
5563ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5564ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5565ac_compiler_gnu=$ac_cv_c_compiler_gnu
5566
bb0a50d8
BM
5567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wpointer-sign" >&5
5568printf %s "checking whether C compiler accepts -Wpointer-sign... " >&6; }
5569if test ${ax_cv_check_cflags__Werror___Wpointer_sign+y}
5570then :
5571 printf %s "(cached) " >&6
5572else $as_nop
efe73de7
BM
5573
5574 ax_check_save_flags=$CFLAGS
8783280a 5575 CFLAGS="$CFLAGS -Werror -Wpointer-sign"
efe73de7
BM
5576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5577/* end confdefs.h. */
5578
5579int
bb0a50d8 5580main (void)
efe73de7
BM
5581{
5582
5583 ;
5584 return 0;
5585}
5586_ACEOF
bb0a50d8
BM
5587if ac_fn_c_try_compile "$LINENO"
5588then :
8783280a 5589 ax_cv_check_cflags__Werror___Wpointer_sign=yes
bb0a50d8 5590else $as_nop
8783280a 5591 ax_cv_check_cflags__Werror___Wpointer_sign=no
efe73de7 5592fi
bb0a50d8 5593rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
efe73de7
BM
5594 CFLAGS=$ax_check_save_flags
5595fi
bb0a50d8
BM
5596{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wpointer_sign" >&5
5597printf "%s\n" "$ax_cv_check_cflags__Werror___Wpointer_sign" >&6; }
5598if test x"$ax_cv_check_cflags__Werror___Wpointer_sign" = xyes
5599then :
8783280a 5600 CFLAGS="$CFLAGS -Wno-pointer-sign"
bb0a50d8 5601else $as_nop
efe73de7
BM
5602 :
5603fi
5604
5605 ac_ext=c
5606ac_cpp='$CPP $CPPFLAGS'
5607ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5608ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5609ac_compiler_gnu=$ac_cv_c_compiler_gnu
5610
bae1dcf1 5611
dd2af3b3 5612ac_ext=c
bae1dcf1
BM
5613ac_cpp='$CPP $CPPFLAGS'
5614ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5615ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5616ac_compiler_gnu=$ac_cv_c_compiler_gnu
5617
bb0a50d8
BM
5618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Winvalid-source-encoding" >&5
5619printf %s "checking whether C compiler accepts -Winvalid-source-encoding... " >&6; }
5620if test ${ax_cv_check_cflags__Werror___Winvalid_source_encoding+y}
5621then :
5622 printf %s "(cached) " >&6
5623else $as_nop
bae1dcf1
BM
5624
5625 ax_check_save_flags=$CFLAGS
8783280a 5626 CFLAGS="$CFLAGS -Werror -Winvalid-source-encoding"
bae1dcf1
BM
5627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5628/* end confdefs.h. */
5629
bae1dcf1 5630int
bb0a50d8 5631main (void)
bae1dcf1
BM
5632{
5633
5634 ;
5635 return 0;
5636}
5637_ACEOF
bb0a50d8
BM
5638if ac_fn_c_try_compile "$LINENO"
5639then :
8783280a 5640 ax_cv_check_cflags__Werror___Winvalid_source_encoding=yes
bb0a50d8 5641else $as_nop
8783280a 5642 ax_cv_check_cflags__Werror___Winvalid_source_encoding=no
bae1dcf1 5643fi
bb0a50d8 5644rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
bae1dcf1
BM
5645 CFLAGS=$ax_check_save_flags
5646fi
bb0a50d8
BM
5647{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Winvalid_source_encoding" >&5
5648printf "%s\n" "$ax_cv_check_cflags__Werror___Winvalid_source_encoding" >&6; }
5649if test x"$ax_cv_check_cflags__Werror___Winvalid_source_encoding" = xyes
5650then :
8783280a 5651 CFLAGS="$CFLAGS -Wno-invalid-source-encoding"
bb0a50d8 5652else $as_nop
dd2af3b3
BM
5653 :
5654fi
5655
5656 ac_ext=c
5657ac_cpp='$CPP $CPPFLAGS'
5658ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5659ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5660ac_compiler_gnu=$ac_cv_c_compiler_gnu
5661
5662
5663ac_ext=c
5664ac_cpp='$CPP $CPPFLAGS'
5665ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5666ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5667ac_compiler_gnu=$ac_cv_c_compiler_gnu
5668
bb0a50d8
BM
5669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wformat-zero-length" >&5
5670printf %s "checking whether C compiler accepts -Wformat-zero-length... " >&6; }
5671if test ${ax_cv_check_cflags__Werror___Wformat_zero_length+y}
5672then :
5673 printf %s "(cached) " >&6
5674else $as_nop
bae1dcf1 5675
dd2af3b3 5676 ax_check_save_flags=$CFLAGS
8783280a 5677 CFLAGS="$CFLAGS -Werror -Wformat-zero-length"
bae1dcf1
BM
5678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5679/* end confdefs.h. */
5680
bae1dcf1 5681int
bb0a50d8 5682main (void)
bae1dcf1
BM
5683{
5684
5685 ;
5686 return 0;
5687}
5688_ACEOF
bb0a50d8
BM
5689if ac_fn_c_try_compile "$LINENO"
5690then :
8783280a 5691 ax_cv_check_cflags__Werror___Wformat_zero_length=yes
bb0a50d8 5692else $as_nop
8783280a 5693 ax_cv_check_cflags__Werror___Wformat_zero_length=no
bae1dcf1 5694fi
bb0a50d8 5695rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
dd2af3b3 5696 CFLAGS=$ax_check_save_flags
bae1dcf1 5697fi
bb0a50d8
BM
5698{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wformat_zero_length" >&5
5699printf "%s\n" "$ax_cv_check_cflags__Werror___Wformat_zero_length" >&6; }
5700if test x"$ax_cv_check_cflags__Werror___Wformat_zero_length" = xyes
5701then :
8783280a 5702 CFLAGS="$CFLAGS -Wno-format-zero-length"
bb0a50d8 5703else $as_nop
8b222a1e
BM
5704 :
5705fi
5706
5707 ac_ext=c
5708ac_cpp='$CPP $CPPFLAGS'
5709ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5710ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5711ac_compiler_gnu=$ac_cv_c_compiler_gnu
5712
5713
5714ac_ext=c
5715ac_cpp='$CPP $CPPFLAGS'
5716ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5717ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5718ac_compiler_gnu=$ac_cv_c_compiler_gnu
5719
bb0a50d8
BM
5720 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wformat-truncation" >&5
5721printf %s "checking whether C compiler accepts -Wformat-truncation... " >&6; }
5722if test ${ax_cv_check_cflags__Werror___Wformat_truncation+y}
5723then :
5724 printf %s "(cached) " >&6
5725else $as_nop
8b222a1e
BM
5726
5727 ax_check_save_flags=$CFLAGS
8783280a 5728 CFLAGS="$CFLAGS -Werror -Wformat-truncation"
8b222a1e
BM
5729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5730/* end confdefs.h. */
5731
8b222a1e 5732int
bb0a50d8 5733main (void)
8b222a1e
BM
5734{
5735
5736 ;
5737 return 0;
5738}
5739_ACEOF
bb0a50d8
BM
5740if ac_fn_c_try_compile "$LINENO"
5741then :
8783280a 5742 ax_cv_check_cflags__Werror___Wformat_truncation=yes
bb0a50d8 5743else $as_nop
8783280a 5744 ax_cv_check_cflags__Werror___Wformat_truncation=no
8b222a1e 5745fi
bb0a50d8 5746rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8b222a1e
BM
5747 CFLAGS=$ax_check_save_flags
5748fi
bb0a50d8
BM
5749{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wformat_truncation" >&5
5750printf "%s\n" "$ax_cv_check_cflags__Werror___Wformat_truncation" >&6; }
5751if test x"$ax_cv_check_cflags__Werror___Wformat_truncation" = xyes
5752then :
8783280a 5753 CFLAGS="$CFLAGS -Wno-format-truncation"
bb0a50d8 5754else $as_nop
bae1dcf1
BM
5755 :
5756fi
5757
5758 ac_ext=c
5759ac_cpp='$CPP $CPPFLAGS'
b183a3ea
BM
5760ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5761ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5762ac_compiler_gnu=$ac_cv_c_compiler_gnu
5763
5764
5765ac_ext=c
5766ac_cpp='$CPP $CPPFLAGS'
5767ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5768ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5769ac_compiler_gnu=$ac_cv_c_compiler_gnu
5770
bb0a50d8
BM
5771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wformat-overflow" >&5
5772printf %s "checking whether C compiler accepts -Wformat-overflow... " >&6; }
5773if test ${ax_cv_check_cflags__Werror___Wformat_overflow+y}
5774then :
5775 printf %s "(cached) " >&6
5776else $as_nop
b183a3ea
BM
5777
5778 ax_check_save_flags=$CFLAGS
5779 CFLAGS="$CFLAGS -Werror -Wformat-overflow"
5780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5781/* end confdefs.h. */
5782
5783int
bb0a50d8 5784main (void)
b183a3ea
BM
5785{
5786
5787 ;
5788 return 0;
5789}
5790_ACEOF
bb0a50d8
BM
5791if ac_fn_c_try_compile "$LINENO"
5792then :
b183a3ea 5793 ax_cv_check_cflags__Werror___Wformat_overflow=yes
bb0a50d8 5794else $as_nop
b183a3ea
BM
5795 ax_cv_check_cflags__Werror___Wformat_overflow=no
5796fi
bb0a50d8 5797rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
b183a3ea
BM
5798 CFLAGS=$ax_check_save_flags
5799fi
bb0a50d8
BM
5800{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wformat_overflow" >&5
5801printf "%s\n" "$ax_cv_check_cflags__Werror___Wformat_overflow" >&6; }
5802if test x"$ax_cv_check_cflags__Werror___Wformat_overflow" = xyes
5803then :
b183a3ea 5804 CFLAGS="$CFLAGS -Wno-format-overflow"
bb0a50d8 5805else $as_nop
b183a3ea
BM
5806 :
5807fi
5808
5809 ac_ext=c
5810ac_cpp='$CPP $CPPFLAGS'
bae1dcf1
BM
5811ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5812ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5813ac_compiler_gnu=$ac_cv_c_compiler_gnu
5814
5815
dd2af3b3
BM
5816ac_ext=c
5817ac_cpp='$CPP $CPPFLAGS'
5818ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5819ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5820ac_compiler_gnu=$ac_cv_c_compiler_gnu
5821
bb0a50d8
BM
5822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wunused" >&5
5823printf %s "checking whether C compiler accepts -Wunused... " >&6; }
5824if test ${ax_cv_check_cflags__Werror___Wunused+y}
5825then :
5826 printf %s "(cached) " >&6
5827else $as_nop
bae1dcf1 5828
dd2af3b3 5829 ax_check_save_flags=$CFLAGS
8783280a 5830 CFLAGS="$CFLAGS -Werror -Wunused"
bae1dcf1
BM
5831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5832/* end confdefs.h. */
5833
bae1dcf1 5834int
bb0a50d8 5835main (void)
bae1dcf1
BM
5836{
5837
5838 ;
5839 return 0;
5840}
5841_ACEOF
bb0a50d8
BM
5842if ac_fn_c_try_compile "$LINENO"
5843then :
8783280a 5844 ax_cv_check_cflags__Werror___Wunused=yes
bb0a50d8 5845else $as_nop
8783280a 5846 ax_cv_check_cflags__Werror___Wunused=no
bae1dcf1 5847fi
bb0a50d8 5848rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
dd2af3b3 5849 CFLAGS=$ax_check_save_flags
bae1dcf1 5850fi
bb0a50d8
BM
5851{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wunused" >&5
5852printf "%s\n" "$ax_cv_check_cflags__Werror___Wunused" >&6; }
5853if test x"$ax_cv_check_cflags__Werror___Wunused" = xyes
5854then :
8783280a 5855 CFLAGS="$CFLAGS -Wno-unused"
bb0a50d8 5856else $as_nop
bae1dcf1
BM
5857 :
5858fi
5859
dd2af3b3
BM
5860 ac_ext=c
5861ac_cpp='$CPP $CPPFLAGS'
5862ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5863ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5864ac_compiler_gnu=$ac_cv_c_compiler_gnu
bae1dcf1 5865
657985bf
BM
5866ac_ext=c
5867ac_cpp='$CPP $CPPFLAGS'
5868ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5869ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5870ac_compiler_gnu=$ac_cv_c_compiler_gnu
5871
bb0a50d8
BM
5872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wunused-parameter" >&5
5873printf %s "checking whether C compiler accepts -Wunused-parameter... " >&6; }
5874if test ${ax_cv_check_cflags__Werror___Wunused_parameter+y}
5875then :
5876 printf %s "(cached) " >&6
5877else $as_nop
657985bf
BM
5878
5879 ax_check_save_flags=$CFLAGS
8783280a 5880 CFLAGS="$CFLAGS -Werror -Wunused-parameter"
657985bf
BM
5881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5882/* end confdefs.h. */
5883
5884int
bb0a50d8 5885main (void)
657985bf
BM
5886{
5887
5888 ;
5889 return 0;
5890}
5891_ACEOF
bb0a50d8
BM
5892if ac_fn_c_try_compile "$LINENO"
5893then :
8783280a 5894 ax_cv_check_cflags__Werror___Wunused_parameter=yes
bb0a50d8 5895else $as_nop
8783280a 5896 ax_cv_check_cflags__Werror___Wunused_parameter=no
657985bf 5897fi
bb0a50d8 5898rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
657985bf
BM
5899 CFLAGS=$ax_check_save_flags
5900fi
bb0a50d8
BM
5901{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wunused_parameter" >&5
5902printf "%s\n" "$ax_cv_check_cflags__Werror___Wunused_parameter" >&6; }
5903if test x"$ax_cv_check_cflags__Werror___Wunused_parameter" = xyes
5904then :
8783280a 5905 CFLAGS="$CFLAGS -Wno-unused-parameter"
bb0a50d8 5906else $as_nop
657985bf
BM
5907 :
5908fi
5909
5910 ac_ext=c
5911ac_cpp='$CPP $CPPFLAGS'
5912ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5913ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5914ac_compiler_gnu=$ac_cv_c_compiler_gnu
5915
94c2b583 5916ac_ext=c
5917ac_cpp='$CPP $CPPFLAGS'
5918ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5919ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5920ac_compiler_gnu=$ac_cv_c_compiler_gnu
94c2b583 5921
bb0a50d8
BM
5922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wunused-but-set-parameter" >&5
5923printf %s "checking whether C compiler accepts -Wunused-but-set-parameter... " >&6; }
5924if test ${ax_cv_check_cflags__Werror___Wunused_but_set_parameter+y}
5925then :
5926 printf %s "(cached) " >&6
5927else $as_nop
85904c22 5928
8783280a
BM
5929 ax_check_save_flags=$CFLAGS
5930 CFLAGS="$CFLAGS -Werror -Wunused-but-set-parameter"
94c2b583 5931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5932/* end confdefs.h. */
94c2b583 5933
8783280a 5934int
bb0a50d8 5935main (void)
8783280a 5936{
85904c22 5937
8783280a
BM
5938 ;
5939 return 0;
5940}
94c2b583 5941_ACEOF
bb0a50d8
BM
5942if ac_fn_c_try_compile "$LINENO"
5943then :
8783280a 5944 ax_cv_check_cflags__Werror___Wunused_but_set_parameter=yes
bb0a50d8 5945else $as_nop
8783280a 5946 ax_cv_check_cflags__Werror___Wunused_but_set_parameter=no
94c2b583 5947fi
bb0a50d8 5948rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8783280a
BM
5949 CFLAGS=$ax_check_save_flags
5950fi
bb0a50d8
BM
5951{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wunused_but_set_parameter" >&5
5952printf "%s\n" "$ax_cv_check_cflags__Werror___Wunused_but_set_parameter" >&6; }
5953if test x"$ax_cv_check_cflags__Werror___Wunused_but_set_parameter" = xyes
5954then :
8783280a 5955 CFLAGS="$CFLAGS -Wno-unused-but-set-parameter"
bb0a50d8 5956else $as_nop
8783280a 5957 :
85904c22 5958fi
94c2b583 5959
8783280a
BM
5960 ac_ext=c
5961ac_cpp='$CPP $CPPFLAGS'
5962ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5963ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5964ac_compiler_gnu=$ac_cv_c_compiler_gnu
85904c22 5965
85904c22 5966
94c2b583 5967ac_ext=c
5968ac_cpp='$CPP $CPPFLAGS'
5969ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5970ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5971ac_compiler_gnu=$ac_cv_c_compiler_gnu
5972
bb0a50d8
BM
5973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wchar-subscripts" >&5
5974printf %s "checking whether C compiler accepts -Wchar-subscripts... " >&6; }
5975if test ${ax_cv_check_cflags__Werror___Wchar_subscripts+y}
5976then :
5977 printf %s "(cached) " >&6
5978else $as_nop
94c2b583 5979
8783280a
BM
5980 ax_check_save_flags=$CFLAGS
5981 CFLAGS="$CFLAGS -Werror -Wchar-subscripts"
5982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5983/* end confdefs.h. */
85904c22 5984
8783280a 5985int
bb0a50d8 5986main (void)
8783280a 5987{
85904c22 5988
8783280a
BM
5989 ;
5990 return 0;
5991}
5992_ACEOF
bb0a50d8
BM
5993if ac_fn_c_try_compile "$LINENO"
5994then :
8783280a 5995 ax_cv_check_cflags__Werror___Wchar_subscripts=yes
bb0a50d8 5996else $as_nop
8783280a
BM
5997 ax_cv_check_cflags__Werror___Wchar_subscripts=no
5998fi
bb0a50d8 5999rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8783280a
BM
6000 CFLAGS=$ax_check_save_flags
6001fi
bb0a50d8
BM
6002{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wchar_subscripts" >&5
6003printf "%s\n" "$ax_cv_check_cflags__Werror___Wchar_subscripts" >&6; }
6004if test x"$ax_cv_check_cflags__Werror___Wchar_subscripts" = xyes
6005then :
8783280a 6006 CFLAGS="$CFLAGS -Wno-char-subscripts"
bb0a50d8 6007else $as_nop
8783280a 6008 :
94c2b583 6009fi
85904c22 6010
8783280a
BM
6011 ac_ext=c
6012ac_cpp='$CPP $CPPFLAGS'
6013ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6014ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6015ac_compiler_gnu=$ac_cv_c_compiler_gnu
85904c22 6016
85904c22 6017
8783280a
BM
6018ac_ext=c
6019ac_cpp='$CPP $CPPFLAGS'
6020ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6021ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6022ac_compiler_gnu=$ac_cv_c_compiler_gnu
6023
bb0a50d8
BM
6024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wsign-compare" >&5
6025printf %s "checking whether C compiler accepts -Wsign-compare... " >&6; }
6026if test ${ax_cv_check_cflags__Werror___Wsign_compare+y}
6027then :
6028 printf %s "(cached) " >&6
6029else $as_nop
8783280a
BM
6030
6031 ax_check_save_flags=$CFLAGS
6032 CFLAGS="$CFLAGS -Werror -Wsign-compare"
94c2b583 6033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6034/* end confdefs.h. */
85904c22
BM
6035
6036int
bb0a50d8 6037main (void)
85904c22 6038{
94c2b583 6039
85904c22
BM
6040 ;
6041 return 0;
6042}
6043_ACEOF
bb0a50d8
BM
6044if ac_fn_c_try_compile "$LINENO"
6045then :
8783280a 6046 ax_cv_check_cflags__Werror___Wsign_compare=yes
bb0a50d8 6047else $as_nop
8783280a 6048 ax_cv_check_cflags__Werror___Wsign_compare=no
85904c22 6049fi
bb0a50d8 6050rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8783280a
BM
6051 CFLAGS=$ax_check_save_flags
6052fi
bb0a50d8
BM
6053{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wsign_compare" >&5
6054printf "%s\n" "$ax_cv_check_cflags__Werror___Wsign_compare" >&6; }
6055if test x"$ax_cv_check_cflags__Werror___Wsign_compare" = xyes
6056then :
8783280a 6057 CFLAGS="$CFLAGS -Wno-sign-compare"
bb0a50d8 6058else $as_nop
8783280a
BM
6059 :
6060fi
85904c22 6061
8783280a
BM
6062 ac_ext=c
6063ac_cpp='$CPP $CPPFLAGS'
6064ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6065ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6066ac_compiler_gnu=$ac_cv_c_compiler_gnu
6067
6068
6069ac_ext=c
6070ac_cpp='$CPP $CPPFLAGS'
6071ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6072ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6073ac_compiler_gnu=$ac_cv_c_compiler_gnu
6074
bb0a50d8
BM
6075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wempty-body" >&5
6076printf %s "checking whether C compiler accepts -Wempty-body... " >&6; }
6077if test ${ax_cv_check_cflags__Werror___Wempty_body+y}
6078then :
6079 printf %s "(cached) " >&6
6080else $as_nop
8783280a
BM
6081
6082 ax_check_save_flags=$CFLAGS
6083 CFLAGS="$CFLAGS -Werror -Wempty-body"
94c2b583 6084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6085/* end confdefs.h. */
85904c22 6086
8783280a 6087int
bb0a50d8 6088main (void)
8783280a 6089{
85904c22 6090
8783280a
BM
6091 ;
6092 return 0;
6093}
6094_ACEOF
bb0a50d8
BM
6095if ac_fn_c_try_compile "$LINENO"
6096then :
8783280a 6097 ax_cv_check_cflags__Werror___Wempty_body=yes
bb0a50d8 6098else $as_nop
8783280a 6099 ax_cv_check_cflags__Werror___Wempty_body=no
85904c22 6100fi
bb0a50d8 6101rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8783280a
BM
6102 CFLAGS=$ax_check_save_flags
6103fi
bb0a50d8
BM
6104{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wempty_body" >&5
6105printf "%s\n" "$ax_cv_check_cflags__Werror___Wempty_body" >&6; }
6106if test x"$ax_cv_check_cflags__Werror___Wempty_body" = xyes
6107then :
8783280a 6108 CFLAGS="$CFLAGS -Wno-empty-body"
bb0a50d8 6109else $as_nop
8783280a 6110 :
94c2b583 6111fi
85904c22 6112
8783280a
BM
6113 ac_ext=c
6114ac_cpp='$CPP $CPPFLAGS'
6115ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6116ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6117ac_compiler_gnu=$ac_cv_c_compiler_gnu
6118
6119
e767dc5e
BM
6120ac_ext=c
6121ac_cpp='$CPP $CPPFLAGS'
6122ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6123ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6124ac_compiler_gnu=$ac_cv_c_compiler_gnu
6125
6126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wdeprecated-non-prototype" >&5
6127printf %s "checking whether C compiler accepts -Wdeprecated-non-prototype... " >&6; }
6128if test ${ax_cv_check_cflags__Werror___Wdeprecated_non_prototype+y}
6129then :
6130 printf %s "(cached) " >&6
6131else $as_nop
6132
6133 ax_check_save_flags=$CFLAGS
6134 CFLAGS="$CFLAGS -Werror -Wdeprecated-non-prototype"
6135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6136/* end confdefs.h. */
6137
6138int
6139main (void)
6140{
6141
6142 ;
6143 return 0;
6144}
6145_ACEOF
6146if ac_fn_c_try_compile "$LINENO"
6147then :
6148 ax_cv_check_cflags__Werror___Wdeprecated_non_prototype=yes
6149else $as_nop
6150 ax_cv_check_cflags__Werror___Wdeprecated_non_prototype=no
6151fi
6152rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6153 CFLAGS=$ax_check_save_flags
6154fi
6155{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wdeprecated_non_prototype" >&5
6156printf "%s\n" "$ax_cv_check_cflags__Werror___Wdeprecated_non_prototype" >&6; }
6157if test x"$ax_cv_check_cflags__Werror___Wdeprecated_non_prototype" = xyes
6158then :
6159 CFLAGS="$CFLAGS -Wno-deprecated-non-prototype"
6160else $as_nop
6161 :
6162fi
6163
6164 ac_ext=c
6165ac_cpp='$CPP $CPPFLAGS'
6166ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6167ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6168ac_compiler_gnu=$ac_cv_c_compiler_gnu
6169
6170
bb0a50d8
BM
6171if $CC --version | grep -q "clang version 3."
6172then :
22bae6ec 6173 CFLAGS="$CFLAGS -Wno-tautological-compare -Wno-pragmas"
3b5b2b5c
BM
6174fi
6175
f8811c1f
BM
6176ac_ext=c
6177ac_cpp='$CPP $CPPFLAGS'
6178ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6179ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6180ac_compiler_gnu=$ac_cv_c_compiler_gnu
6181
bb0a50d8
BM
6182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wpragmas" >&5
6183printf %s "checking whether C compiler accepts -Wpragmas... " >&6; }
6184if test ${ax_cv_check_cflags__Werror___Wpragmas+y}
6185then :
6186 printf %s "(cached) " >&6
6187else $as_nop
f8811c1f
BM
6188
6189 ax_check_save_flags=$CFLAGS
d35a1bae 6190 CFLAGS="$CFLAGS -Werror -Wpragmas"
f8811c1f
BM
6191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6192/* end confdefs.h. */
6193
6194int
bb0a50d8 6195main (void)
f8811c1f
BM
6196{
6197
6198 ;
6199 return 0;
6200}
6201_ACEOF
bb0a50d8
BM
6202if ac_fn_c_try_compile "$LINENO"
6203then :
d35a1bae 6204 ax_cv_check_cflags__Werror___Wpragmas=yes
bb0a50d8 6205else $as_nop
d35a1bae 6206 ax_cv_check_cflags__Werror___Wpragmas=no
f8811c1f 6207fi
bb0a50d8 6208rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
f8811c1f
BM
6209 CFLAGS=$ax_check_save_flags
6210fi
bb0a50d8
BM
6211{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wpragmas" >&5
6212printf "%s\n" "$ax_cv_check_cflags__Werror___Wpragmas" >&6; }
6213if test x"$ax_cv_check_cflags__Werror___Wpragmas" = xyes
6214then :
d35a1bae 6215 no_pragmas=1
bb0a50d8 6216else $as_nop
d35a1bae 6217 no_pragmas=0
f8811c1f
BM
6218fi
6219
6220 ac_ext=c
6221ac_cpp='$CPP $CPPFLAGS'
6222ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6223ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6224ac_compiler_gnu=$ac_cv_c_compiler_gnu
6225
8783280a
BM
6226ac_ext=c
6227ac_cpp='$CPP $CPPFLAGS'
6228ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6229ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6230ac_compiler_gnu=$ac_cv_c_compiler_gnu
6231
bb0a50d8
BM
6232 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wunknown-warning-option" >&5
6233printf %s "checking whether C compiler accepts -Wunknown-warning-option... " >&6; }
6234if test ${ax_cv_check_cflags__Werror___Wunknown_warning_option+y}
6235then :
6236 printf %s "(cached) " >&6
6237else $as_nop
8783280a
BM
6238
6239 ax_check_save_flags=$CFLAGS
3b5b2b5c 6240 CFLAGS="$CFLAGS -Werror -Wunknown-warning-option"
94c2b583 6241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6242/* end confdefs.h. */
85904c22
BM
6243
6244int
bb0a50d8 6245main (void)
85904c22 6246{
8783280a
BM
6247
6248 ;
85904c22
BM
6249 return 0;
6250}
6251_ACEOF
bb0a50d8
BM
6252if ac_fn_c_try_compile "$LINENO"
6253then :
3b5b2b5c 6254 ax_cv_check_cflags__Werror___Wunknown_warning_option=yes
bb0a50d8 6255else $as_nop
3b5b2b5c 6256 ax_cv_check_cflags__Werror___Wunknown_warning_option=no
94c2b583 6257fi
bb0a50d8 6258rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8783280a 6259 CFLAGS=$ax_check_save_flags
85904c22 6260fi
bb0a50d8
BM
6261{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror___Wunknown_warning_option" >&5
6262printf "%s\n" "$ax_cv_check_cflags__Werror___Wunknown_warning_option" >&6; }
6263if test x"$ax_cv_check_cflags__Werror___Wunknown_warning_option" = xyes
6264then :
a55f2e0c 6265 unknown_warning_option=1
bb0a50d8 6266else $as_nop
a55f2e0c 6267 unknown_warning_option=0
94c2b583 6268fi
94c2b583 6269
8783280a
BM
6270 ac_ext=c
6271ac_cpp='$CPP $CPPFLAGS'
6272ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6273ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6274ac_compiler_gnu=$ac_cv_c_compiler_gnu
85904c22 6275
85904c22 6276
a55f2e0c
BM
6277if test "$unknown_warning_option" = "1"; then
6278 CFLAGS="$CFLAGS -Wno-unknown-warning-option"
6279else
d35a1bae 6280 if test "$no_pragmas" = "1"; then
58ebadf0 6281 CFLAGS="$CFLAGS -Wno-pragmas"
a55f2e0c
BM
6282 fi
6283fi
6284
85904c22 6285
8783280a
BM
6286
6287
6288
bb0a50d8
BM
6289{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if your system has IPv6 support" >&5
6290printf %s "checking if your system has IPv6 support... " >&6; }
6291if test ${ac_cv_ip6+y}
6292then :
6293 printf %s "(cached) " >&6
6294else $as_nop
8783280a 6295
bb0a50d8
BM
6296if test "$cross_compiling" = yes
6297then :
6298 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6299printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8783280a
BM
6300as_fn_error $? "cannot run test program while cross compiling
6301See \`config.log' for more details" "$LINENO" 5; }
bb0a50d8 6302else $as_nop
8783280a
BM
6303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6304/* end confdefs.h. */
6305
6306#include <sys/types.h>
6307#include <sys/socket.h>
db30b3c7
BM
6308#include <stdlib.h>
6309int main(void) {
8783280a
BM
6310int s = socket(AF_INET6, SOCK_STREAM, 0);
6311exit(0); /* We only check if the code compiles, that's enough. We can deal with missing runtime IPv6 */
6312}
6313
6314_ACEOF
bb0a50d8
BM
6315if ac_fn_c_try_run "$LINENO"
6316then :
8783280a 6317 ac_cv_ip6=yes
bb0a50d8 6318else $as_nop
8783280a
BM
6319 ac_cv_ip6=no
6320fi
6321rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6322 conftest.$ac_objext conftest.beam conftest.$ac_ext
85904c22 6323fi
94c2b583 6324
85904c22 6325
8783280a 6326fi
bb0a50d8
BM
6327{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ip6" >&5
6328printf "%s\n" "$ac_cv_ip6" >&6; }
8783280a
BM
6329if test "$ac_cv_ip6" = "no"; then
6330 as_fn_error $? "Your system does not support IPv6" "$LINENO" 5
6331fi
85904c22 6332
0e7ef37a
BM
6333{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if you have getsockopt TCP_INFO" >&5
6334printf %s "checking if you have getsockopt TCP_INFO... " >&6; }
099e9950
BM
6335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6336/* end confdefs.h. */
6337#include <sys/types.h>
6338 #include <stdlib.h>
6339 #include <sys/socket.h>
6340 #include <netinet/in.h>
6341 #include <netinet/tcp.h>
6342 #include <sys/socket.h>
6343int
6344main (void)
6345{
6346
6347 socklen_t optlen = sizeof(struct tcp_info);
6348 struct tcp_info ti;
6349 ti.tcpi_rtt = 0;
6350 ti.tcpi_rttvar = 0;
0e7ef37a
BM
6351 #if defined(__FreeBSD__)
6352 ti.__tcpi_pmtu = 0;
6353 #else
099e9950 6354 ti.tcpi_pmtu = 0;
0e7ef37a 6355 #endif
099e9950
BM
6356 ti.tcpi_snd_cwnd = 0;
6357 ti.tcpi_snd_mss = 0;
6358 ti.tcpi_rcv_mss = 0;
6359 getsockopt(0, IPPROTO_TCP, TCP_INFO, &ti, &optlen);
6360
6361 ;
6362 return 0;
6363}
6364_ACEOF
6365if ac_fn_c_try_compile "$LINENO"
6366then :
6367
6368printf "%s\n" "#define HAVE_TCP_INFO 1" >>confdefs.h
6369
0e7ef37a 6370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
099e9950
BM
6371printf "%s\n" "yes" >&6; }
6372else $as_nop
0e7ef37a 6373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
099e9950
BM
6374printf "%s\n" "no" >&6; }
6375fi
6376rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6377
bb0a50d8
BM
6378ac_fn_c_check_header_compile "$LINENO" "sys/syslog.h" "ac_cv_header_sys_syslog_h" "$ac_includes_default"
6379if test "x$ac_cv_header_sys_syslog_h" = xyes
6380then :
94c2b583 6381
bb0a50d8 6382printf "%s\n" "#define SYSSYSLOGH /**/" >>confdefs.h
c0790e90 6383
85904c22
BM
6384fi
6385
bb0a50d8
BM
6386ac_fn_c_check_header_compile "$LINENO" "sys/rusage.h" "ac_cv_header_sys_rusage_h" "$ac_includes_default"
6387if test "x$ac_cv_header_sys_rusage_h" = xyes
6388then :
85904c22 6389
bb0a50d8 6390printf "%s\n" "#define RUSAGEH /**/" >>confdefs.h
85904c22
BM
6391
6392fi
7dbf154d 6393
bb0a50d8
BM
6394ac_fn_c_check_header_compile "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
6395if test "x$ac_cv_header_glob_h" = xyes
6396then :
85904c22 6397
bb0a50d8 6398printf "%s\n" "#define GLOBH /**/" >>confdefs.h
85904c22 6399
94c2b583 6400fi
7dbf154d 6401
bb0a50d8
BM
6402ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
6403if test "x$ac_cv_header_stdint_h" = xyes
6404then :
6405 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
94c2b583 6406
bb0a50d8
BM
6407fi
6408ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
6409if test "x$ac_cv_header_inttypes_h" = xyes
6410then :
6411 printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
9f710925 6412
6413fi
6414
9f710925 6415
9e9390e5 6416
bb0a50d8 6417 for ac_func in strlcpy
94c2b583 6418do :
6419 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
bb0a50d8
BM
6420if test "x$ac_cv_func_strlcpy" = xyes
6421then :
6422 printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
f40ec73c 6423
bb0a50d8 6424printf "%s\n" "#define HAVE_STRLCPY /**/" >>confdefs.h
94c2b583 6425
c0790e90 6426fi
bb0a50d8 6427
c0790e90 6428done
545d087a 6429
bb0a50d8 6430 for ac_func in strlcat
94c2b583 6431do :
6432 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
bb0a50d8
BM
6433if test "x$ac_cv_func_strlcat" = xyes
6434then :
6435 printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
545d087a 6436
bb0a50d8 6437printf "%s\n" "#define HAVE_STRLCAT /**/" >>confdefs.h
85904c22 6438
94c2b583 6439fi
bb0a50d8 6440
94c2b583 6441done
cadd4230 6442
bb0a50d8 6443 for ac_func in strlncat
94c2b583 6444do :
6445 ac_fn_c_check_func "$LINENO" "strlncat" "ac_cv_func_strlncat"
bb0a50d8
BM
6446if test "x$ac_cv_func_strlncat" = xyes
6447then :
6448 printf "%s\n" "#define HAVE_STRLNCAT 1" >>confdefs.h
7dbf154d 6449
bb0a50d8 6450printf "%s\n" "#define HAVE_STRLNCAT /**/" >>confdefs.h
c0790e90 6451
7dbf154d 6452fi
bb0a50d8 6453
94c2b583 6454done
6455
bb0a50d8 6456 for ac_func in strlncpy
c550d956
BM
6457do :
6458 ac_fn_c_check_func "$LINENO" "strlncpy" "ac_cv_func_strlncpy"
bb0a50d8
BM
6459if test "x$ac_cv_func_strlncpy" = xyes
6460then :
6461 printf "%s\n" "#define HAVE_STRLNCPY 1" >>confdefs.h
6462
6463printf "%s\n" "#define HAVE_STRLNCPY /**/" >>confdefs.h
6464
6465fi
6466
6467done
6468
6469
6470 for ac_func in getrusage
6471do :
6472 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
6473if test "x$ac_cv_func_getrusage" = xyes
6474then :
6475 printf "%s\n" "#define HAVE_GETRUSAGE 1" >>confdefs.h
6476
6477printf "%s\n" "#define GETRUSAGE_2 /**/" >>confdefs.h
6478
6479else $as_nop
6480
6481 for ac_func in times
6482do :
6483 ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times"
6484if test "x$ac_cv_func_times" = xyes
6485then :
6486 printf "%s\n" "#define HAVE_TIMES 1" >>confdefs.h
6487
6488printf "%s\n" "#define TIMES_2 /**/" >>confdefs.h
6489
6490fi
6491
6492done
6493fi
6494
6495done
6496ac_ext=c
6497ac_cpp='$CPP $CPPFLAGS'
6498ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6499ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6500ac_compiler_gnu=$ac_cv_c_compiler_gnu
6501{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6502printf %s "checking how to run the C preprocessor... " >&6; }
6503# On Suns, sometimes $CPP names a directory.
6504if test -n "$CPP" && test -d "$CPP"; then
6505 CPP=
6506fi
6507if test -z "$CPP"; then
6508 if test ${ac_cv_prog_CPP+y}
6509then :
6510 printf %s "(cached) " >&6
6511else $as_nop
6512 # Double quotes because $CC needs to be expanded
6513 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
6514 do
6515 ac_preproc_ok=false
6516for ac_c_preproc_warn_flag in '' yes
6517do
6518 # Use a header file that comes with gcc, so configuring glibc
6519 # with a fresh cross-compiler works.
6520 # On the NeXT, cc -E runs the code through the compiler's parser,
6521 # not just through cpp. "Syntax error" is here to catch this case.
6522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6523/* end confdefs.h. */
6524#include <limits.h>
6525 Syntax error
6526_ACEOF
6527if ac_fn_c_try_cpp "$LINENO"
6528then :
6529
6530else $as_nop
6531 # Broken: fails on valid input.
6532continue
6533fi
6534rm -f conftest.err conftest.i conftest.$ac_ext
6535
6536 # OK, works on sane cases. Now check whether nonexistent headers
6537 # can be detected and how.
6538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6539/* end confdefs.h. */
6540#include <ac_nonexistent.h>
6541_ACEOF
6542if ac_fn_c_try_cpp "$LINENO"
6543then :
6544 # Broken: success on invalid input.
6545continue
6546else $as_nop
6547 # Passes both tests.
6548ac_preproc_ok=:
6549break
6550fi
6551rm -f conftest.err conftest.i conftest.$ac_ext
6552
6553done
6554# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6555rm -f conftest.i conftest.err conftest.$ac_ext
6556if $ac_preproc_ok
6557then :
6558 break
6559fi
6560
6561 done
6562 ac_cv_prog_CPP=$CPP
6563
6564fi
6565 CPP=$ac_cv_prog_CPP
6566else
6567 ac_cv_prog_CPP=$CPP
6568fi
6569{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6570printf "%s\n" "$CPP" >&6; }
6571ac_preproc_ok=false
6572for ac_c_preproc_warn_flag in '' yes
6573do
6574 # Use a header file that comes with gcc, so configuring glibc
6575 # with a fresh cross-compiler works.
6576 # On the NeXT, cc -E runs the code through the compiler's parser,
6577 # not just through cpp. "Syntax error" is here to catch this case.
6578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6579/* end confdefs.h. */
6580#include <limits.h>
6581 Syntax error
6582_ACEOF
6583if ac_fn_c_try_cpp "$LINENO"
6584then :
6585
6586else $as_nop
6587 # Broken: fails on valid input.
6588continue
6589fi
6590rm -f conftest.err conftest.i conftest.$ac_ext
6591
6592 # OK, works on sane cases. Now check whether nonexistent headers
6593 # can be detected and how.
6594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6595/* end confdefs.h. */
6596#include <ac_nonexistent.h>
c550d956 6597_ACEOF
bb0a50d8
BM
6598if ac_fn_c_try_cpp "$LINENO"
6599then :
6600 # Broken: success on invalid input.
6601continue
6602else $as_nop
6603 # Passes both tests.
6604ac_preproc_ok=:
6605break
6606fi
6607rm -f conftest.err conftest.i conftest.$ac_ext
6608
6609done
6610# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6611rm -f conftest.i conftest.err conftest.$ac_ext
6612if $ac_preproc_ok
6613then :
6614
6615else $as_nop
6616 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6617printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
6618as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6619See \`config.log' for more details" "$LINENO" 5; }
6620fi
6621
6622ac_ext=c
6623ac_cpp='$CPP $CPPFLAGS'
6624ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6625ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6626ac_compiler_gnu=$ac_cv_c_compiler_gnu
c550d956 6627
c550d956 6628
bb0a50d8
BM
6629{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6630printf %s "checking for grep that handles long lines and -e... " >&6; }
6631if test ${ac_cv_path_GREP+y}
6632then :
6633 printf %s "(cached) " >&6
6634else $as_nop
6635 if test -z "$GREP"; then
6636 ac_path_GREP_found=false
6637 # Loop through the user's path and test for each of PROGNAME-LIST
6638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6639for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6640do
6641 IFS=$as_save_IFS
6642 case $as_dir in #(((
6643 '') as_dir=./ ;;
6644 */) ;;
6645 *) as_dir=$as_dir/ ;;
6646 esac
6647 for ac_prog in grep ggrep
6648 do
6649 for ac_exec_ext in '' $ac_executable_extensions; do
6650 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
6651 as_fn_executable_p "$ac_path_GREP" || continue
6652# Check for GNU ac_path_GREP and select it if it is found.
6653 # Check for GNU $ac_path_GREP
6654case `"$ac_path_GREP" --version 2>&1` in
6655*GNU*)
6656 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6657*)
6658 ac_count=0
6659 printf %s 0123456789 >"conftest.in"
6660 while :
6661 do
6662 cat "conftest.in" "conftest.in" >"conftest.tmp"
6663 mv "conftest.tmp" "conftest.in"
6664 cp "conftest.in" "conftest.nl"
6665 printf "%s\n" 'GREP' >> "conftest.nl"
6666 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6667 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6668 as_fn_arith $ac_count + 1 && ac_count=$as_val
6669 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6670 # Best one so far, save it but keep looking for a better one
6671 ac_cv_path_GREP="$ac_path_GREP"
6672 ac_path_GREP_max=$ac_count
6673 fi
6674 # 10*(2^10) chars as input seems more than enough
6675 test $ac_count -gt 10 && break
6676 done
6677 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6678esac
6679
6680 $ac_path_GREP_found && break 3
6681 done
6682 done
6683 done
6684IFS=$as_save_IFS
6685 if test -z "$ac_cv_path_GREP"; then
6686 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6687 fi
6688else
6689 ac_cv_path_GREP=$GREP
c550d956 6690fi
c550d956 6691
bb0a50d8
BM
6692fi
6693{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6694printf "%s\n" "$ac_cv_path_GREP" >&6; }
6695 GREP="$ac_cv_path_GREP"
f69335e6 6696
f69335e6 6697
bb0a50d8
BM
6698{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6699printf %s "checking for egrep... " >&6; }
6700if test ${ac_cv_path_EGREP+y}
6701then :
6702 printf %s "(cached) " >&6
6703else $as_nop
6704 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6705 then ac_cv_path_EGREP="$GREP -E"
6706 else
6707 if test -z "$EGREP"; then
6708 ac_path_EGREP_found=false
6709 # Loop through the user's path and test for each of PROGNAME-LIST
6710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6711for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6712do
6713 IFS=$as_save_IFS
6714 case $as_dir in #(((
6715 '') as_dir=./ ;;
6716 */) ;;
6717 *) as_dir=$as_dir/ ;;
6718 esac
6719 for ac_prog in egrep
6720 do
6721 for ac_exec_ext in '' $ac_executable_extensions; do
6722 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
6723 as_fn_executable_p "$ac_path_EGREP" || continue
6724# Check for GNU ac_path_EGREP and select it if it is found.
6725 # Check for GNU $ac_path_EGREP
6726case `"$ac_path_EGREP" --version 2>&1` in
6727*GNU*)
6728 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6729*)
6730 ac_count=0
6731 printf %s 0123456789 >"conftest.in"
6732 while :
6733 do
6734 cat "conftest.in" "conftest.in" >"conftest.tmp"
6735 mv "conftest.tmp" "conftest.in"
6736 cp "conftest.in" "conftest.nl"
6737 printf "%s\n" 'EGREP' >> "conftest.nl"
6738 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6739 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6740 as_fn_arith $ac_count + 1 && ac_count=$as_val
6741 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6742 # Best one so far, save it but keep looking for a better one
6743 ac_cv_path_EGREP="$ac_path_EGREP"
6744 ac_path_EGREP_max=$ac_count
6745 fi
6746 # 10*(2^10) chars as input seems more than enough
6747 test $ac_count -gt 10 && break
6748 done
6749 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6750esac
f40ec73c 6751
bb0a50d8
BM
6752 $ac_path_EGREP_found && break 3
6753 done
6754 done
6755 done
6756IFS=$as_save_IFS
6757 if test -z "$ac_cv_path_EGREP"; then
6758 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6759 fi
94c2b583 6760else
bb0a50d8 6761 ac_cv_path_EGREP=$EGREP
c0790e90 6762fi
f69335e6 6763
bb0a50d8 6764 fi
94c2b583 6765fi
bb0a50d8
BM
6766{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6767printf "%s\n" "$ac_cv_path_EGREP" >&6; }
6768 EGREP="$ac_cv_path_EGREP"
545d087a 6769
7dbf154d 6770
85904c22 6771
bb0a50d8
BM
6772 for ac_func in setproctitle
6773do :
6774 ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
6775if test "x$ac_cv_func_setproctitle" = xyes
6776then :
6777 printf "%s\n" "#define HAVE_SETPROCTITLE 1" >>confdefs.h
6778
6779printf "%s\n" "#define HAVE_SETPROCTITLE /**/" >>confdefs.h
6780
6781else $as_nop
6782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setproctitle in -lutil" >&5
6783printf %s "checking for setproctitle in -lutil... " >&6; }
6784if test ${ac_cv_lib_util_setproctitle+y}
6785then :
6786 printf %s "(cached) " >&6
6787else $as_nop
94c2b583 6788 ac_check_lib_save_LIBS=$LIBS
6789LIBS="-lutil $LIBS"
6790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6791/* end confdefs.h. */
545d087a 6792
cadd4230
BM
6793/* Override any GCC internal prototype to avoid an error.
6794 Use char because int might match the return type of a GCC
6795 builtin and then its argument prototype would still apply. */
94c2b583 6796char setproctitle ();
545d087a 6797int
bb0a50d8 6798main (void)
545d087a 6799{
94c2b583 6800return setproctitle ();
f69335e6 6801 ;
6802 return 0;
6803}
6804_ACEOF
bb0a50d8
BM
6805if ac_fn_c_try_link "$LINENO"
6806then :
94c2b583 6807 ac_cv_lib_util_setproctitle=yes
bb0a50d8 6808else $as_nop
94c2b583 6809 ac_cv_lib_util_setproctitle=no
4eff1e84 6810fi
bb0a50d8 6811rm -f core conftest.err conftest.$ac_objext conftest.beam \
94c2b583 6812 conftest$ac_exeext conftest.$ac_ext
6813LIBS=$ac_check_lib_save_LIBS
4eff1e84 6814fi
bb0a50d8
BM
6815{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_setproctitle" >&5
6816printf "%s\n" "$ac_cv_lib_util_setproctitle" >&6; }
6817if test "x$ac_cv_lib_util_setproctitle" = xyes
6818then :
94c2b583 6819
bb0a50d8 6820printf "%s\n" "#define HAVE_SETPROCTITLE /**/" >>confdefs.h
94c2b583 6821
6822 IRCDLIBS="$IRCDLIBS-lutil"
bb0a50d8 6823else $as_nop
94c2b583 6824
6825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6826/* end confdefs.h. */
6827#include <sys/exec.h>
6828
85904c22 6829_ACEOF
94c2b583 6830if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb0a50d8
BM
6831 $EGREP "#define.*PS_STRINGS.*" >/dev/null 2>&1
6832then :
94c2b583 6833
bb0a50d8
BM
6834printf "%s\n" "#define HAVE_PSSTRINGS /**/" >>confdefs.h
6835
6836else $as_nop
4eff1e84 6837
94c2b583 6838 for ac_func in pstat
6839do :
6840 ac_fn_c_check_func "$LINENO" "pstat" "ac_cv_func_pstat"
bb0a50d8
BM
6841if test "x$ac_cv_func_pstat" = xyes
6842then :
6843 printf "%s\n" "#define HAVE_PSTAT 1" >>confdefs.h
4eff1e84 6844
bb0a50d8 6845printf "%s\n" "#define HAVE_PSTAT /**/" >>confdefs.h
94c2b583 6846
4eff1e84 6847fi
4eff1e84 6848
bb0a50d8 6849done
94c2b583 6850fi
bb0a50d8 6851rm -rf conftest*
4eff1e84 6852
94c2b583 6853
6854fi
6855
6856
6857
6858fi
bb0a50d8 6859
94c2b583 6860done
6861
6862
bb0a50d8 6863 for ac_func in explicit_bzero
3b3f63b9
BM
6864do :
6865 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
bb0a50d8
BM
6866if test "x$ac_cv_func_explicit_bzero" = xyes
6867then :
6868 printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
3b3f63b9 6869
bb0a50d8 6870printf "%s\n" "#define HAVE_EXPLICIT_BZERO /**/" >>confdefs.h
65a2668e 6871
7dbf154d 6872fi
bb0a50d8 6873
4eff1e84 6874done
6875
bb0a50d8 6876 for ac_func in syslog
94c2b583 6877do :
6878 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
bb0a50d8
BM
6879if test "x$ac_cv_func_syslog" = xyes
6880then :
6881 printf "%s\n" "#define HAVE_SYSLOG 1" >>confdefs.h
c0790e90 6882
bb0a50d8 6883printf "%s\n" "#define HAVE_SYSLOG /**/" >>confdefs.h
4eff1e84 6884
65a2668e 6885fi
bb0a50d8 6886
65a2668e 6887done
6888
bb0a50d8 6889 for ac_func in strnlen
401ab6f5
BM
6890do :
6891 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
bb0a50d8
BM
6892if test "x$ac_cv_func_strnlen" = xyes
6893then :
6894 printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
401ab6f5 6895
bb0a50d8 6896printf "%s\n" "#define HAVE_STRNLEN /**/" >>confdefs.h
401ab6f5
BM
6897
6898fi
401ab6f5 6899
bb0a50d8 6900done
f40ec73c 6901
6902
6903
6904
cadd4230 6905# Check whether --with-nick-history was given.
bb0a50d8
BM
6906if test ${with_nick_history+y}
6907then :
7dbf154d 6908 withval=$with_nick_history;
bb0a50d8 6909printf "%s\n" "#define NICKNAMEHISTORYLENGTH $withval" >>confdefs.h
f40ec73c 6910
bb0a50d8 6911else $as_nop
cadd4230 6912
bb0a50d8 6913printf "%s\n" "#define NICKNAMEHISTORYLENGTH 2000" >>confdefs.h
f40ec73c 6914
cadd4230
BM
6915fi
6916
f40ec73c 6917
cadd4230 6918# Check whether --with-permissions was given.
bb0a50d8
BM
6919if test ${with_permissions+y}
6920then :
7dbf154d 6921 withval=$with_permissions;
bb0a50d8 6922printf "%s\n" "#define DEFAULT_PERMISSIONS 0$withval" >>confdefs.h
f40ec73c 6923
bb0a50d8 6924else $as_nop
7dbf154d 6925
bb0a50d8 6926printf "%s\n" "#define DEFAULT_PERMISSIONS 0600" >>confdefs.h
f69335e6 6927
cadd4230
BM
6928fi
6929
f40ec73c 6930
5e94fc9c
BM
6931
6932# Check whether --with-bindir was given.
bb0a50d8
BM
6933if test ${with_bindir+y}
6934then :
5e94fc9c 6935 withval=$with_bindir;
bb0a50d8 6936printf "%s\n" "#define BINDIR \"$withval\"" >>confdefs.h
7dbf154d 6937
5e94fc9c 6938 BINDIR="$withval"
bb0a50d8 6939else $as_nop
7dbf154d 6940
bb0a50d8 6941printf "%s\n" "#define BINDIR \"$HOME/unrealircd/bin\"" >>confdefs.h
7dbf154d 6942
5e94fc9c 6943 BINDIR="$HOME/unrealircd/bin"
cadd4230 6944fi
f40ec73c 6945
cadd4230 6946
7dbf154d 6947
5e94fc9c 6948# Check whether --with-scriptdir was given.
bb0a50d8
BM
6949if test ${with_scriptdir+y}
6950then :
5e94fc9c 6951 withval=$with_scriptdir;
bb0a50d8 6952printf "%s\n" "#define SCRIPTDIR \"$withval\"" >>confdefs.h
5e94fc9c
BM
6953
6954 SCRIPTDIR="$withval"
bb0a50d8 6955else $as_nop
5e94fc9c 6956
bb0a50d8 6957printf "%s\n" "#define SCRIPTDIR \"$HOME/unrealircd\"" >>confdefs.h
5e94fc9c
BM
6958
6959 SCRIPTDIR="$HOME/unrealircd"
cadd4230
BM
6960fi
6961
7dbf154d 6962
5e94fc9c
BM
6963
6964# Check whether --with-confdir was given.
bb0a50d8
BM
6965if test ${with_confdir+y}
6966then :
5e94fc9c 6967 withval=$with_confdir;
bb0a50d8 6968printf "%s\n" "#define CONFDIR \"$withval\"" >>confdefs.h
f69335e6 6969
5e94fc9c 6970 CONFDIR="$withval"
bb0a50d8 6971else $as_nop
3b0d1625 6972
bb0a50d8 6973printf "%s\n" "#define CONFDIR \"$HOME/unrealircd/conf\"" >>confdefs.h
5e94fc9c
BM
6974
6975 CONFDIR="$HOME/unrealircd/conf"
6976fi
7dbf154d 6977
5e94fc9c
BM
6978
6979
dfa83aa6 6980# Check whether --with-builddir was given.
bb0a50d8
BM
6981if test ${with_builddir+y}
6982then :
dfa83aa6 6983 withval=$with_builddir;
bb0a50d8 6984printf "%s\n" "#define BUILDDIR \"$withval\"" >>confdefs.h
dfa83aa6
BM
6985
6986 BUILDDIR="$withval"
bb0a50d8 6987else $as_nop
dfa83aa6 6988
bb0a50d8 6989printf "%s\n" "#define BUILDDIR \"$BUILDDIR_NOW\"" >>confdefs.h
dfa83aa6
BM
6990
6991 BUILDDIR="$BUILDDIR_NOW"
6992fi
6993
6994
6995
5e94fc9c 6996# Check whether --with-modulesdir was given.
bb0a50d8
BM
6997if test ${with_modulesdir+y}
6998then :
5e94fc9c 6999 withval=$with_modulesdir;
bb0a50d8 7000printf "%s\n" "#define MODULESDIR \"$withval\"" >>confdefs.h
7dbf154d 7001
5e94fc9c 7002 MODULESDIR="$withval"
bb0a50d8 7003else $as_nop
5e94fc9c 7004
bb0a50d8 7005printf "%s\n" "#define MODULESDIR \"$HOME/unrealircd/modules\"" >>confdefs.h
5e94fc9c
BM
7006
7007 MODULESDIR="$HOME/unrealircd/modules"
7008fi
7009
7010
7011
7012# Check whether --with-logdir was given.
bb0a50d8
BM
7013if test ${with_logdir+y}
7014then :
5e94fc9c 7015 withval=$with_logdir;
bb0a50d8 7016printf "%s\n" "#define LOGDIR \"$withval\"" >>confdefs.h
5e94fc9c
BM
7017
7018 LOGDIR="$withval"
bb0a50d8 7019else $as_nop
5e94fc9c 7020
bb0a50d8 7021printf "%s\n" "#define LOGDIR \"$HOME/unrealircd/logs\"" >>confdefs.h
5e94fc9c
BM
7022
7023 LOGDIR="$HOME/unrealircd/logs"
7024fi
7025
7026
7027
7028# Check whether --with-cachedir was given.
bb0a50d8
BM
7029if test ${with_cachedir+y}
7030then :
5e94fc9c 7031 withval=$with_cachedir;
bb0a50d8 7032printf "%s\n" "#define CACHEDIR \"$withval\"" >>confdefs.h
5e94fc9c
BM
7033
7034 CACHEDIR="$withval"
bb0a50d8 7035else $as_nop
5e94fc9c 7036
bb0a50d8 7037printf "%s\n" "#define CACHEDIR \"$HOME/unrealircd/cache\"" >>confdefs.h
5e94fc9c
BM
7038
7039 CACHEDIR="$HOME/unrealircd/cache"
7040fi
7041
7042
7043
7044# Check whether --with-tmpdir was given.
bb0a50d8
BM
7045if test ${with_tmpdir+y}
7046then :
5e94fc9c 7047 withval=$with_tmpdir;
bb0a50d8 7048printf "%s\n" "#define TMPDIR \"$withval\"" >>confdefs.h
5e94fc9c
BM
7049
7050 TMPDIR="$withval"
bb0a50d8 7051else $as_nop
5e94fc9c 7052
bb0a50d8 7053printf "%s\n" "#define TMPDIR \"$HOME/unrealircd/tmp\"" >>confdefs.h
5e94fc9c
BM
7054
7055 TMPDIR="$HOME/unrealircd/tmp"
7056fi
7057
7058
7059
7060# Check whether --with-datadir was given.
bb0a50d8
BM
7061if test ${with_datadir+y}
7062then :
5e94fc9c 7063 withval=$with_datadir;
bb0a50d8 7064printf "%s\n" "#define PERMDATADIR \"$withval\"" >>confdefs.h
5e94fc9c 7065
e5ec2a64 7066 PERMDATADIR="$withval"
bb0a50d8 7067else $as_nop
7dbf154d 7068
bb0a50d8 7069printf "%s\n" "#define DATADIR \"$HOME/unrealircd/data\"" >>confdefs.h
7dbf154d 7070
e5ec2a64 7071 PERMDATADIR="$HOME/unrealircd/data"
cadd4230
BM
7072fi
7073
7dbf154d 7074
5e94fc9c
BM
7075
7076# Check whether --with-docdir was given.
bb0a50d8
BM
7077if test ${with_docdir+y}
7078then :
5e94fc9c 7079 withval=$with_docdir;
bb0a50d8 7080printf "%s\n" "#define DOCDIR \"$withval\"" >>confdefs.h
5e94fc9c
BM
7081
7082 DOCDIR="$withval"
bb0a50d8 7083else $as_nop
5e94fc9c 7084
bb0a50d8 7085printf "%s\n" "#define DOCDIR \"$HOME/unrealircd/doc\"" >>confdefs.h
5e94fc9c
BM
7086
7087 DOCDIR="$HOME/unrealircd/doc"
7088fi
7089
7090
7091
7092# Check whether --with-pidfile was given.
bb0a50d8
BM
7093if test ${with_pidfile+y}
7094then :
5e94fc9c 7095 withval=$with_pidfile;
bb0a50d8 7096printf "%s\n" "#define PIDFILE \"$withval\"" >>confdefs.h
5e94fc9c
BM
7097
7098 PIDFILE="$withval"
bb0a50d8 7099else $as_nop
5e94fc9c 7100
bb0a50d8 7101printf "%s\n" "#define PIDFILE \"$HOME/unrealircd/data/unrealircd.pid\"" >>confdefs.h
5e94fc9c 7102
c0f18b3e 7103 PIDFILE="$HOME/unrealircd/data/unrealircd.pid"
5e94fc9c
BM
7104fi
7105
fd35f965 7106
9252ce30 7107
39688517 7108# Check whether --with-controlfile was given.
bb0a50d8
BM
7109if test ${with_controlfile+y}
7110then :
39688517 7111 withval=$with_controlfile;
bb0a50d8 7112printf "%s\n" "#define CONTROLFILE \"$withval\"" >>confdefs.h
39688517
BM
7113
7114 CONTROLFILE="$withval"
bb0a50d8 7115else $as_nop
39688517 7116
bb0a50d8 7117printf "%s\n" "#define CONTROLFILE \"$HOME/unrealircd/data/unrealircd.ctl\"" >>confdefs.h
39688517
BM
7118
7119 CONTROLFILE="$HOME/unrealircd/data/unrealircd.ctl"
7120fi
7121
7122
7123
fd35f965 7124# Check whether --with-privatelibdir was given.
bb0a50d8
BM
7125if test ${with_privatelibdir+y}
7126then :
fd35f965 7127 withval=$with_privatelibdir;
bb0a50d8 7128else $as_nop
590e345b
BM
7129 with_privatelibdir="yes"
7130fi
fd35f965 7131
bb0a50d8
BM
7132if test "x$with_privatelibdir" = "xno"
7133then :
590e345b 7134 PRIVATELIBDIR=
bb0a50d8
BM
7135elif test "x$with_privatelibdir" = "xyes"
7136then :
590e345b 7137 PRIVATELIBDIR="$HOME/unrealircd/lib"
bb0a50d8 7138else $as_nop
590e345b
BM
7139 PRIVATELIBDIR="$with_privatelibdir"
7140fi
bb0a50d8
BM
7141if test "x$PRIVATELIBDIR" = "x"
7142then :
590e345b 7143 LDFLAGS_PRIVATELIBS=""
bb0a50d8 7144else $as_nop
fd35f965 7145
bb0a50d8 7146printf "%s\n" "#define PRIVATELIBDIR \"$PRIVATELIBDIR\"" >>confdefs.h
fd35f965 7147
d1d87d4d 7148 LDFLAGS_PRIVATELIBS="-Wl,-rpath,$PRIVATELIBDIR"
9252ce30
BM
7149 LDFLAGS="$LDFLAGS $LDFLAGS_PRIVATELIBS"
7150 export LDFLAGS
fd35f965
BM
7151fi
7152
7153
7154
5e94fc9c
BM
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
dfa83aa6 7166
39688517 7167
6d3a9865 7168# Check whether --with-maxconnections was given.
bb0a50d8
BM
7169if test ${with_maxconnections+y}
7170then :
6d3a9865 7171 withval=$with_maxconnections; ac_fd=$withval
bb0a50d8 7172else $as_nop
6d3a9865 7173 ac_fd=0
5e94fc9c
BM
7174fi
7175
7176
bb0a50d8 7177printf "%s\n" "#define MAXCONNECTIONS_REQUEST $ac_fd" >>confdefs.h
5e94fc9c
BM
7178
7179
06dc8646 7180
cadd4230 7181# Check whether --with-no-operoverride was given.
bb0a50d8
BM
7182if test ${with_no_operoverride+y}
7183then :
7184 withval=$with_no_operoverride; if test $withval = "yes"
7185then :
7dbf154d 7186
bb0a50d8 7187printf "%s\n" "#define NO_OPEROVERRIDE /**/" >>confdefs.h
7dbf154d 7188
7189fi
cadd4230
BM
7190fi
7191
1bb24f05 7192
cadd4230 7193# Check whether --with-operoverride-verify was given.
bb0a50d8
BM
7194if test ${with_operoverride_verify+y}
7195then :
7196 withval=$with_operoverride_verify; if test $withval = "yes"
7197then :
7dbf154d 7198
bb0a50d8 7199printf "%s\n" "#define OPEROVERRIDE_VERIFY /**/" >>confdefs.h
7dbf154d 7200
7201fi
cadd4230
BM
7202fi
7203
1bb24f05 7204
547b2d69 7205# Check whether --with-system-pcre2 was given.
bb0a50d8
BM
7206if test ${with_system_pcre2+y}
7207then :
547b2d69 7208 withval=$with_system_pcre2;
bb0a50d8 7209else $as_nop
05e3ed63 7210 with_system_pcre2=yes
547b2d69
BM
7211fi
7212
7213
a852b480 7214# Check whether --with-system-argon2 was given.
bb0a50d8
BM
7215if test ${with_system_argon2+y}
7216then :
a852b480 7217 withval=$with_system_argon2;
bb0a50d8 7218else $as_nop
5688825e 7219 with_system_argon2=no
a852b480
BM
7220fi
7221
7222
5daf7e7e 7223# Check whether --with-system-sodium was given.
bb0a50d8
BM
7224if test ${with_system_sodium+y}
7225then :
5daf7e7e 7226 withval=$with_system_sodium;
bb0a50d8 7227else $as_nop
5daf7e7e
BM
7228 with_system_sodium=yes
7229fi
7230
7231
5f727eec 7232# Check whether --with-system-cares was given.
bb0a50d8
BM
7233if test ${with_system_cares+y}
7234then :
5f727eec 7235 withval=$with_system_cares;
bb0a50d8 7236else $as_nop
60d14e7d 7237 with_system_cares=yes
5f727eec
BM
7238fi
7239
7240
f89348d2 7241# Check whether --with-system-jansson was given.
bb0a50d8
BM
7242if test ${with_system_jansson+y}
7243then :
f89348d2 7244 withval=$with_system_jansson;
bb0a50d8 7245else $as_nop
f89348d2
BM
7246 with_system_jansson=yes
7247fi
7248
7249
cadd4230 7250# Check whether --enable-ssl was given.
bb0a50d8
BM
7251if test ${enable_ssl+y}
7252then :
cadd4230 7253 enableval=$enable_ssl;
bb0a50d8 7254else $as_nop
7dbf154d 7255 enable_ssl=no
7256fi
7257
bb0a50d8
BM
7258if test $enable_ssl != "no"
7259then :
7dbf154d 7260
bb0a50d8
BM
7261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL" >&5
7262printf %s "checking for OpenSSL... " >&6; }
c342b432 7263 for dir in $enable_ssl /usr/local/opt/openssl /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/sfw /usr/local /usr; do
7dbf154d 7264 ssldir="$dir"
7265 if test -f "$dir/include/openssl/ssl.h"; then
bb0a50d8
BM
7266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $ssldir/include/openssl" >&5
7267printf "%s\n" "found in $ssldir/include/openssl" >&6; }
7dbf154d 7268 found_ssl="yes";
7269 if test ! "$ssldir" = "/usr" ; then
7270 CFLAGS="$CFLAGS -I$ssldir/include";
7271 fi
7272 break
7273 fi
7274 if test -f "$dir/include/ssl.h"; then
bb0a50d8
BM
7275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $ssldir/include" >&5
7276printf "%s\n" "found in $ssldir/include" >&6; }
7dbf154d 7277 found_ssl="yes";
7278 if test ! "$ssldir" = "/usr" ; then
7279 CFLAGS="$CFLAGS -I$ssldir/include";
7280 fi
7281 break
7282 fi
7283 done
7284 if test x_$found_ssl != x_yes; then
bb0a50d8
BM
7285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7286printf "%s\n" "not found" >&6; }
7dbf154d 7287 echo ""
7288 echo "Apparently you do not have both the openssl binary and openssl development libraries installed."
81e2099f
BM
7289 echo "The following packages are required:"
7290 echo "1) The library package is often called 'openssl-dev', 'openssl-devel' or 'libssl-dev'"
7291 echo "2) The binary package is usually called 'openssl'."
7292 echo "NOTE: you or your system administrator needs to install the library AND the binary package."
7293 echo "After doing so, simply re-run ./Config"
7dbf154d 7294 exit 1
7295 else
7296 CRYPTOLIB="-lssl -lcrypto";
7297 if test ! "$ssldir" = "/usr" ; then
7d75b38c
BM
7298 if test -d "$ssldir/lib64" ; then
7299 LDFLAGS="$LDFLAGS -L$ssldir/lib64";
7300 else
7301 LDFLAGS="$LDFLAGS -L$ssldir/lib";
7302 fi
876758b7 7303 if test -f "$ssldir/bin/openssl"; then
7304 OPENSSLPATH="$ssldir/bin/openssl";
7305 fi
7dbf154d 7306 fi
bb0a50d8
BM
7307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking OpenSSL linking with -ldl" >&5
7308printf %s "checking OpenSSL linking with -ldl... " >&6; }
57f67180 7309 SAVE_LIBS="$LIBS"
a601f565 7310 LIBS="$LIBS $CRYPTOLIB -ldl"
57f67180 7311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7312/* end confdefs.h. */
7313#include <openssl/err.h>
7314int
bb0a50d8 7315main (void)
57f67180 7316{
7317ERR_clear_error();
7318 ;
7319 return 0;
7320}
7321_ACEOF
bb0a50d8
BM
7322if ac_fn_c_try_link "$LINENO"
7323then :
57f67180 7324
bb0a50d8
BM
7325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7326printf "%s\n" "yes" >&6; }
a601f565 7327 CRYPTOLIB="$CRYPTOLIB -ldl"
57f67180 7328
bb0a50d8 7329else $as_nop
57f67180 7330
bb0a50d8
BM
7331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7332printf "%s\n" "no" >&6; }
57f67180 7333
bb0a50d8
BM
7334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking OpenSSL linking with -ldl and -lpthread" >&5
7335printf %s "checking OpenSSL linking with -ldl and -lpthread... " >&6; }
a601f565 7336 LIBS="$SAVE_LIBS $CRYPTOLIB -ldl -lpthread"
57f67180 7337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7338/* end confdefs.h. */
7339#include <openssl/err.h>
7340int
bb0a50d8 7341main (void)
57f67180 7342{
7343ERR_clear_error();
7344 ;
7345 return 0;
7346}
7347_ACEOF
bb0a50d8
BM
7348if ac_fn_c_try_link "$LINENO"
7349then :
57f67180 7350
bb0a50d8
BM
7351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7352printf "%s\n" "yes" >&6; }
a601f565 7353 CRYPTOLIB="$CRYPTOLIB -ldl -lpthread"
57f67180 7354
bb0a50d8 7355else $as_nop
57f67180 7356
bb0a50d8
BM
7357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7358printf "%s\n" "no" >&6; }
57f67180 7359
7360fi
bb0a50d8 7361rm -f core conftest.err conftest.$ac_objext conftest.beam \
57f67180 7362 conftest$ac_exeext conftest.$ac_ext
7363
7364fi
bb0a50d8 7365rm -f core conftest.err conftest.$ac_objext conftest.beam \
57f67180 7366 conftest$ac_exeext conftest.$ac_ext
a601f565 7367 LIBS="$SAVE_LIBS"
7dbf154d 7368 fi
f69335e6 7369
cadd4230 7370fi
871948d2 7371
fa9bdcd7 7372
bb0a50d8
BM
7373{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_set1_curves_list in SSL library" >&5
7374printf %s "checking for SSL_CTX_set1_curves_list in SSL library... " >&6; }
fa9bdcd7
BM
7375ac_ext=c
7376ac_cpp='$CPP $CPPFLAGS'
7377ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7378ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7379ac_compiler_gnu=$ac_cv_c_compiler_gnu
7380
7381SAVE_LIBS="$LIBS"
7382LIBS="$LIBS $CRYPTOLIB"
7383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7384/* end confdefs.h. */
7385#include <openssl/ssl.h>
7386int
bb0a50d8 7387main (void)
fa9bdcd7
BM
7388{
7389SSL_CTX *ctx = NULL; SSL_CTX_set1_curves_list(ctx, "test");
7390 ;
7391 return 0;
7392}
7393_ACEOF
bb0a50d8
BM
7394if ac_fn_c_try_link "$LINENO"
7395then :
79bd78c0 7396 has_function=1
bb0a50d8 7397else $as_nop
79bd78c0 7398 has_function=0
fa9bdcd7 7399fi
bb0a50d8 7400rm -f core conftest.err conftest.$ac_objext conftest.beam \
fa9bdcd7
BM
7401 conftest$ac_exeext conftest.$ac_ext
7402LIBS="$SAVE_LIBS"
7403ac_ext=c
7404ac_cpp='$CPP $CPPFLAGS'
7405ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7406ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7407ac_compiler_gnu=$ac_cv_c_compiler_gnu
7408
79bd78c0 7409if test $has_function = 1; then
bb0a50d8
BM
7410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7411printf "%s\n" "yes" >&6; }
fa9bdcd7 7412
bb0a50d8 7413printf "%s\n" "#define HAS_SSL_CTX_SET1_CURVES_LIST /**/" >>confdefs.h
fa9bdcd7
BM
7414
7415else
bb0a50d8
BM
7416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7417printf "%s\n" "no" >&6; }
fa9bdcd7
BM
7418fi
7419
79bd78c0 7420
bb0a50d8
BM
7421{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_set_min_proto_version in SSL library" >&5
7422printf %s "checking for SSL_CTX_set_min_proto_version in SSL library... " >&6; }
79bd78c0
BM
7423ac_ext=c
7424ac_cpp='$CPP $CPPFLAGS'
7425ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7426ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7427ac_compiler_gnu=$ac_cv_c_compiler_gnu
7428
7429SAVE_LIBS="$LIBS"
7430LIBS="$LIBS $CRYPTOLIB"
7431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7432/* end confdefs.h. */
7433#include <openssl/ssl.h>
7434int
bb0a50d8 7435main (void)
79bd78c0
BM
7436{
7437SSL_CTX *ctx = NULL; SSL_CTX_set_min_proto_version(ctx, TLS1_VERSION);
7438 ;
7439 return 0;
7440}
7441_ACEOF
bb0a50d8
BM
7442if ac_fn_c_try_link "$LINENO"
7443then :
79bd78c0 7444 has_function=1
bb0a50d8 7445else $as_nop
79bd78c0
BM
7446 has_function=0
7447fi
bb0a50d8 7448rm -f core conftest.err conftest.$ac_objext conftest.beam \
79bd78c0
BM
7449 conftest$ac_exeext conftest.$ac_ext
7450LIBS="$SAVE_LIBS"
7451ac_ext=c
7452ac_cpp='$CPP $CPPFLAGS'
7453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7455ac_compiler_gnu=$ac_cv_c_compiler_gnu
7456
7457if test $has_function = 1; then
bb0a50d8
BM
7458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7459printf "%s\n" "yes" >&6; }
79bd78c0 7460
bb0a50d8 7461printf "%s\n" "#define HAS_SSL_CTX_SET_MIN_PROTO_VERSION /**/" >>confdefs.h
79bd78c0 7462
f419a61f 7463else
bb0a50d8
BM
7464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7465printf "%s\n" "no" >&6; }
f419a61f
BM
7466fi
7467
7468
bb0a50d8
BM
7469{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_set_security_level in SSL library" >&5
7470printf %s "checking for SSL_CTX_set_security_level in SSL library... " >&6; }
f419a61f
BM
7471ac_ext=c
7472ac_cpp='$CPP $CPPFLAGS'
7473ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7474ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7475ac_compiler_gnu=$ac_cv_c_compiler_gnu
7476
7477SAVE_LIBS="$LIBS"
7478LIBS="$LIBS $CRYPTOLIB"
7479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7480/* end confdefs.h. */
7481#include <openssl/ssl.h>
7482int
bb0a50d8 7483main (void)
f419a61f
BM
7484{
7485SSL_CTX *ctx = NULL; SSL_CTX_set_security_level(ctx, 1);
7486 ;
7487 return 0;
7488}
7489_ACEOF
bb0a50d8
BM
7490if ac_fn_c_try_link "$LINENO"
7491then :
f419a61f 7492 has_function=1
bb0a50d8 7493else $as_nop
f419a61f
BM
7494 has_function=0
7495fi
bb0a50d8 7496rm -f core conftest.err conftest.$ac_objext conftest.beam \
f419a61f
BM
7497 conftest$ac_exeext conftest.$ac_ext
7498LIBS="$SAVE_LIBS"
7499ac_ext=c
7500ac_cpp='$CPP $CPPFLAGS'
7501ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7502ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7503ac_compiler_gnu=$ac_cv_c_compiler_gnu
7504
7505if test $has_function = 1; then
bb0a50d8
BM
7506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7507printf "%s\n" "yes" >&6; }
f419a61f 7508
bb0a50d8 7509printf "%s\n" "#define HAS_SSL_CTX_SET_SECURITY_LEVEL /**/" >>confdefs.h
f419a61f 7510
79bd78c0 7511else
bb0a50d8
BM
7512 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7513printf "%s\n" "no" >&6; }
79bd78c0
BM
7514fi
7515
b3510c5d 7516
bb0a50d8
BM
7517{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ASN1_TIME_diff in SSL library" >&5
7518printf %s "checking for ASN1_TIME_diff in SSL library... " >&6; }
b3510c5d
BM
7519ac_ext=c
7520ac_cpp='$CPP $CPPFLAGS'
7521ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7522ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7523ac_compiler_gnu=$ac_cv_c_compiler_gnu
7524
7525SAVE_LIBS="$LIBS"
7526LIBS="$LIBS $CRYPTOLIB"
7527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7528/* end confdefs.h. */
7529#include <openssl/ssl.h>
7530int
bb0a50d8 7531main (void)
b3510c5d
BM
7532{
7533int one, two; ASN1_TIME_diff(&one, &two, NULL, NULL);
7534 ;
7535 return 0;
7536}
7537_ACEOF
bb0a50d8
BM
7538if ac_fn_c_try_link "$LINENO"
7539then :
b3510c5d 7540 has_function=1
bb0a50d8 7541else $as_nop
b3510c5d
BM
7542 has_function=0
7543fi
bb0a50d8 7544rm -f core conftest.err conftest.$ac_objext conftest.beam \
b3510c5d
BM
7545 conftest$ac_exeext conftest.$ac_ext
7546LIBS="$SAVE_LIBS"
7547ac_ext=c
7548ac_cpp='$CPP $CPPFLAGS'
7549ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7550ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7551ac_compiler_gnu=$ac_cv_c_compiler_gnu
7552
7553if test $has_function = 1; then
bb0a50d8
BM
7554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7555printf "%s\n" "yes" >&6; }
b3510c5d 7556
bb0a50d8 7557printf "%s\n" "#define HAS_ASN1_TIME_diff /**/" >>confdefs.h
b3510c5d
BM
7558
7559else
bb0a50d8
BM
7560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7561printf "%s\n" "no" >&6; }
b3510c5d
BM
7562fi
7563
75efe020 7564
bb0a50d8
BM
7565{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X509_get0_notAfter in SSL library" >&5
7566printf %s "checking for X509_get0_notAfter in SSL library... " >&6; }
75efe020
BM
7567ac_ext=c
7568ac_cpp='$CPP $CPPFLAGS'
7569ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7570ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7571ac_compiler_gnu=$ac_cv_c_compiler_gnu
7572
7573SAVE_LIBS="$LIBS"
7574LIBS="$LIBS $CRYPTOLIB"
7575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7576/* end confdefs.h. */
7577#include <openssl/ssl.h>
7578int
bb0a50d8 7579main (void)
75efe020
BM
7580{
7581X509_get0_notAfter(NULL);
7582 ;
7583 return 0;
7584}
7585_ACEOF
bb0a50d8
BM
7586if ac_fn_c_try_link "$LINENO"
7587then :
75efe020 7588 has_function=1
bb0a50d8 7589else $as_nop
75efe020
BM
7590 has_function=0
7591fi
bb0a50d8 7592rm -f core conftest.err conftest.$ac_objext conftest.beam \
75efe020
BM
7593 conftest$ac_exeext conftest.$ac_ext
7594LIBS="$SAVE_LIBS"
7595ac_ext=c
7596ac_cpp='$CPP $CPPFLAGS'
7597ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7598ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7599ac_compiler_gnu=$ac_cv_c_compiler_gnu
7600
7601if test $has_function = 1; then
bb0a50d8
BM
7602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7603printf "%s\n" "yes" >&6; }
75efe020 7604
bb0a50d8 7605printf "%s\n" "#define HAS_X509_get0_notAfter /**/" >>confdefs.h
75efe020
BM
7606
7607else
bb0a50d8
BM
7608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7609printf "%s\n" "no" >&6; }
75efe020
BM
7610fi
7611
83d2498e
BM
7612
7613{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X509_check_host in SSL library" >&5
7614printf %s "checking for X509_check_host in SSL library... " >&6; }
7615ac_ext=c
7616ac_cpp='$CPP $CPPFLAGS'
7617ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7618ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7619ac_compiler_gnu=$ac_cv_c_compiler_gnu
7620
7621SAVE_LIBS="$LIBS"
7622LIBS="$LIBS $CRYPTOLIB"
7623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7624/* end confdefs.h. */
748f381d 7625#include <openssl/x509v3.h>
83d2498e
BM
7626int
7627main (void)
7628{
7629X509_check_host(NULL, NULL, 0, 0, NULL);
7630 ;
7631 return 0;
7632}
7633_ACEOF
7634if ac_fn_c_try_link "$LINENO"
7635then :
7636 has_function=1
7637else $as_nop
7638 has_function=0
7639fi
7640rm -f core conftest.err conftest.$ac_objext conftest.beam \
7641 conftest$ac_exeext conftest.$ac_ext
7642LIBS="$SAVE_LIBS"
7643ac_ext=c
7644ac_cpp='$CPP $CPPFLAGS'
7645ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7646ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7647ac_compiler_gnu=$ac_cv_c_compiler_gnu
7648
7649if test $has_function = 1; then
7650 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7651printf "%s\n" "yes" >&6; }
7652
7653printf "%s\n" "#define HAS_X509_check_host /**/" >>confdefs.h
7654
7655else
7656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7657printf "%s\n" "no" >&6; }
7658fi
7659
cadd4230 7660# Check whether --enable-dynamic-linking was given.
bb0a50d8
BM
7661if test ${enable_dynamic_linking+y}
7662then :
7dbf154d 7663 enableval=$enable_dynamic_linking; enable_dynamic_linking=$enableval
bb0a50d8 7664else $as_nop
7dbf154d 7665 enable_dynamic_linking="yes"
7666fi
7667
bb0a50d8
BM
7668if test $enable_dynamic_linking = "yes"
7669then :
7dbf154d 7670
94c2b583 7671ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
bb0a50d8
BM
7672if test "x$ac_cv_func_dlopen" = xyes
7673then :
7674
7675else $as_nop
7676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7677printf %s "checking for dlopen in -ldl... " >&6; }
7678if test ${ac_cv_lib_dl_dlopen+y}
7679then :
7680 printf %s "(cached) " >&6
7681else $as_nop
f69335e6 7682 ac_check_lib_save_LIBS=$LIBS
f40ec73c 7683LIBS="-ldl $LIBS"
94c2b583 7684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
545d087a 7685/* end confdefs.h. */
f69335e6 7686
cadd4230
BM
7687/* Override any GCC internal prototype to avoid an error.
7688 Use char because int might match the return type of a GCC
7689 builtin and then its argument prototype would still apply. */
f69335e6 7690char dlopen ();
f69335e6 7691int
bb0a50d8 7692main (void)
f69335e6 7693{
cadd4230 7694return dlopen ();
f69335e6 7695 ;
7696 return 0;
7697}
7698_ACEOF
bb0a50d8
BM
7699if ac_fn_c_try_link "$LINENO"
7700then :
f69335e6 7701 ac_cv_lib_dl_dlopen=yes
bb0a50d8 7702else $as_nop
94c2b583 7703 ac_cv_lib_dl_dlopen=no
f69335e6 7704fi
bb0a50d8 7705rm -f core conftest.err conftest.$ac_objext conftest.beam \
94c2b583 7706 conftest$ac_exeext conftest.$ac_ext
f69335e6 7707LIBS=$ac_check_lib_save_LIBS
7708fi
bb0a50d8
BM
7709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7710printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
7711if test "x$ac_cv_lib_dl_dlopen" = xyes
7712then :
0ca9f4c2 7713 IRCDLIBS="$IRCDLIBS -ldl"
bb0a50d8 7714else $as_nop
775f3fe2 7715
bb0a50d8
BM
7716{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Dynamic linking is not enabled because dlopen was not found" >&5
7717printf "%s\n" "$as_me: WARNING: Dynamic linking is not enabled because dlopen was not found" >&2;}
7718printf "%s\n" "#define STATIC_LINKING 1" >>confdefs.h
f40ec73c 7719
775f3fe2 7720
f40ec73c 7721fi
7722
7723fi
7724
775f3fe2 7725
f40ec73c 7726hold_cflags=$CFLAGS
ecf260df 7727DYNAMIC_LDFLAGS=""
ec294b13 7728CFLAGS="$CFLAGS -Wl,-export-dynamic"
bb0a50d8
BM
7729{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need the -export-dynamic flag" >&5
7730printf %s "checking if we need the -export-dynamic flag... " >&6; }
7731if test ${ac_cv_export_dynamic+y}
7732then :
7733 printf %s "(cached) " >&6
7734else $as_nop
f69335e6 7735
94c2b583 7736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
545d087a 7737/* end confdefs.h. */
f40ec73c 7738
f69335e6 7739int
bb0a50d8 7740main (void)
f69335e6 7741{
f40ec73c 7742int i;
f69335e6 7743 ;
7744 return 0;
7745}
7746_ACEOF
bb0a50d8
BM
7747if ac_fn_c_try_link "$LINENO"
7748then :
f40ec73c 7749 ac_cv_export_dynamic=yes
bb0a50d8 7750else $as_nop
94c2b583 7751 ac_cv_export_dynamic=no
f40ec73c 7752fi
bb0a50d8 7753rm -f core conftest.err conftest.$ac_objext conftest.beam \
94c2b583 7754 conftest$ac_exeext conftest.$ac_ext
f40ec73c 7755fi
bb0a50d8
BM
7756{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_export_dynamic" >&5
7757printf "%s\n" "$ac_cv_export_dynamic" >&6; }
f40ec73c 7758CFLAGS=$hold_cflags
ecf260df
BM
7759if test "$ac_cv_export_dynamic" = "yes"; then
7760 DYNAMIC_LDFLAGS="-Wl,-export-dynamic"
f40ec73c 7761fi
7762
bb0a50d8
BM
7763{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option to produce PIC" >&5
7764printf %s "checking for compiler option to produce PIC... " >&6; }
7765if test ${ac_cv_pic+y}
7766then :
7767 printf %s "(cached) " >&6
7768else $as_nop
f69335e6 7769
7770if test "$ac_cv_c_compiler_gnu" = "yes"; then
f40ec73c 7771 ac_cv_pic="-fPIC -DPIC -shared"
878a0f89 7772 case `uname -s` in
7773 Darwin*)
7d2dea92 7774 ac_cv_pic="-std=gnu89 -bundle -flat_namespace -undefined suppress"
878a0f89 7775 ;;
1bb24f05 7776 HP-UX*)
7777 ac_cv_pic="-fPIC"
7778 ;;
878a0f89 7779 esac
f40ec73c 7780else
7781case `uname -s` in
7782 SunOS*)
7783 ac_cv_pic="-KPIC -DPIC -G"
7784 ;;
7785esac
7786fi
7787
7788fi
bb0a50d8
BM
7789{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pic" >&5
7790printf "%s\n" "$ac_cv_pic" >&6; }
7791{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if your system prepends an underscore on symbols" >&5
7792printf %s "checking if your system prepends an underscore on symbols... " >&6; }
7793if test ${ac_cv_underscore+y}
7794then :
7795 printf %s "(cached) " >&6
7796else $as_nop
f69335e6 7797
d29b6498 7798cat >uscore.c << __EOF__
db30b3c7 7799int main(void) {
d29b6498 7800 return 0;
7801}
7802__EOF__
7803$CC -o uscore $CFLAGS uscore.c 1>&5
7804if test -z "`strings -a uscore |grep '^_main$'`"; then
7805ac_cv_underscore=no
7806else
7807ac_cv_underscore=yes
7808fi
4f1345c3 7809rm -f uscore uscore.c
e77382c1 7810
7811fi
bb0a50d8
BM
7812{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_underscore" >&5
7813printf "%s\n" "$ac_cv_underscore" >&6; }
d29b6498 7814if test "$ac_cv_underscore" = "yes"; then
7dbf154d 7815
bb0a50d8 7816printf "%s\n" "#define UNDERSCORE /**/" >>confdefs.h
d29b6498 7817
7818fi
7819
ecf260df 7820MODULEFLAGS="$ac_cv_pic $DYNAMIC_LDFLAGS"
f40ec73c 7821
bb0a50d8 7822else $as_nop
7dbf154d 7823
bb0a50d8 7824printf "%s\n" "#define STATIC_LINKING /**/" >>confdefs.h
545d087a 7825
cadd4230 7826fi
f69335e6 7827
821a0464 7828# Check whether --enable-werror was given.
bb0a50d8
BM
7829if test ${enable_werror+y}
7830then :
821a0464 7831 enableval=$enable_werror; ac_cv_werror="$enableval"
bb0a50d8 7832else $as_nop
821a0464
BM
7833 ac_cv_werror="no"
7834fi
7835
7836
aff3c16c 7837# Check whether --enable-asan was given.
bb0a50d8
BM
7838if test ${enable_asan+y}
7839then :
001c1e78 7840 enableval=$enable_asan; ac_cv_asan="$enableval"
bb0a50d8 7841else $as_nop
001c1e78 7842 ac_cv_asan="no"
aff3c16c
BM
7843fi
7844
7845
bb0a50d8
BM
7846
7847 for ac_func in poll
5e427e9f
WP
7848do :
7849 ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
bb0a50d8
BM
7850if test "x$ac_cv_func_poll" = xyes
7851then :
7852 printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
5e427e9f 7853
bb0a50d8 7854printf "%s\n" "#define HAVE_POLL /**/" >>confdefs.h
5e427e9f
WP
7855
7856fi
bb0a50d8 7857
5e427e9f
WP
7858done
7859
bb0a50d8 7860 for ac_func in epoll_create epoll_ctl epoll_wait
6a210e34 7861do :
bb0a50d8 7862 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
6a210e34 7863ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
bb0a50d8
BM
7864if eval test \"x\$"$as_ac_var"\" = x"yes"
7865then :
6a210e34 7866 cat >>confdefs.h <<_ACEOF
bb0a50d8 7867#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
6a210e34
WP
7868_ACEOF
7869
bb0a50d8 7870printf "%s\n" "#define HAVE_EPOLL /**/" >>confdefs.h
6a210e34
WP
7871
7872fi
bb0a50d8 7873
6a210e34
WP
7874done
7875
bb0a50d8 7876 for ac_func in kqueue kevent
ad25d019 7877do :
bb0a50d8 7878 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
ad25d019 7879ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
bb0a50d8
BM
7880if eval test \"x\$"$as_ac_var"\" = x"yes"
7881then :
ad25d019 7882 cat >>confdefs.h <<_ACEOF
bb0a50d8 7883#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
ad25d019 7884_ACEOF
6a210e34 7885
bb0a50d8 7886printf "%s\n" "#define HAVE_KQUEUE /**/" >>confdefs.h
70ec1b1e 7887
ad25d019 7888fi
9f710925 7889
bb0a50d8 7890done
9f710925 7891
ad25d019 7892export PATH_SEPARATOR
9f710925 7893
05e3ed63 7894has_system_pcre2="no"
9f710925 7895
6a210e34 7896
42d8a95c
WP
7897
7898
7899
7900
7901
70ec1b1e
BM
7902if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7903 if test -n "$ac_tool_prefix"; then
7904 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7905set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
bb0a50d8
BM
7906{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7907printf %s "checking for $ac_word... " >&6; }
7908if test ${ac_cv_path_PKG_CONFIG+y}
7909then :
7910 printf %s "(cached) " >&6
7911else $as_nop
70ec1b1e
BM
7912 case $PKG_CONFIG in
7913 [\\/]* | ?:[\\/]*)
7914 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7915 ;;
7916 *)
7917 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7918for as_dir in $PATH
7919do
7920 IFS=$as_save_IFS
bb0a50d8
BM
7921 case $as_dir in #(((
7922 '') as_dir=./ ;;
7923 */) ;;
7924 *) as_dir=$as_dir/ ;;
7925 esac
94c2b583 7926 for ac_exec_ext in '' $ac_executable_extensions; do
bb0a50d8
BM
7927 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7928 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
7929 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
70ec1b1e
BM
7930 break 2
7931 fi
7932done
94c2b583 7933 done
70ec1b1e
BM
7934IFS=$as_save_IFS
7935
7936 ;;
7937esac
7938fi
7939PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7940if test -n "$PKG_CONFIG"; then
bb0a50d8
BM
7941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7942printf "%s\n" "$PKG_CONFIG" >&6; }
70ec1b1e 7943else
bb0a50d8
BM
7944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7945printf "%s\n" "no" >&6; }
70ec1b1e
BM
7946fi
7947
7948
7949fi
7950if test -z "$ac_cv_path_PKG_CONFIG"; then
7951 ac_pt_PKG_CONFIG=$PKG_CONFIG
7952 # Extract the first word of "pkg-config", so it can be a program name with args.
7953set dummy pkg-config; ac_word=$2
bb0a50d8
BM
7954{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7955printf %s "checking for $ac_word... " >&6; }
7956if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
7957then :
7958 printf %s "(cached) " >&6
7959else $as_nop
70ec1b1e
BM
7960 case $ac_pt_PKG_CONFIG in
7961 [\\/]* | ?:[\\/]*)
7962 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7963 ;;
7964 *)
7965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7966for as_dir in $PATH
7967do
7968 IFS=$as_save_IFS
bb0a50d8
BM
7969 case $as_dir in #(((
7970 '') as_dir=./ ;;
7971 */) ;;
7972 *) as_dir=$as_dir/ ;;
7973 esac
94c2b583 7974 for ac_exec_ext in '' $ac_executable_extensions; do
bb0a50d8
BM
7975 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7976 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
7977 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
70ec1b1e
BM
7978 break 2
7979 fi
7980done
94c2b583 7981 done
70ec1b1e
BM
7982IFS=$as_save_IFS
7983
7984 ;;
7985esac
7986fi
7987ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7988if test -n "$ac_pt_PKG_CONFIG"; then
bb0a50d8
BM
7989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7990printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
70ec1b1e 7991else
bb0a50d8
BM
7992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7993printf "%s\n" "no" >&6; }
70ec1b1e
BM
7994fi
7995
7996 if test "x$ac_pt_PKG_CONFIG" = x; then
7997 PKG_CONFIG=""
7998 else
7999 case $cross_compiling:$ac_tool_warned in
8000yes:)
bb0a50d8
BM
8001{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8002printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
70ec1b1e
BM
8003ac_tool_warned=yes ;;
8004esac
8005 PKG_CONFIG=$ac_pt_PKG_CONFIG
8006 fi
8007else
8008 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8009fi
8010
8011fi
8012if test -n "$PKG_CONFIG"; then
8013 _pkg_min_version=0.9.0
bb0a50d8
BM
8014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
8015printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
70ec1b1e 8016 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
bb0a50d8
BM
8017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8018printf "%s\n" "yes" >&6; }
70ec1b1e 8019 else
bb0a50d8
BM
8020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8021printf "%s\n" "no" >&6; }
70ec1b1e
BM
8022 PKG_CONFIG=""
8023 fi
70ec1b1e 8024fi
bb0a50d8
BM
8025if test "x$with_system_pcre2" = "xyes"
8026then :
547b2d69
BM
8027
8028
8029pkg_failed=no
bb0a50d8
BM
8030{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PCRE2" >&5
8031printf %s "checking for PCRE2... " >&6; }
547b2d69
BM
8032
8033if test -n "$PCRE2_CFLAGS"; then
8034 pkg_cv_PCRE2_CFLAGS="$PCRE2_CFLAGS"
8035 elif test -n "$PKG_CONFIG"; then
8036 if test -n "$PKG_CONFIG" && \
4b456251
BM
8037 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre2-8 >= 10.36\""; } >&5
8038 ($PKG_CONFIG --exists --print-errors "libpcre2-8 >= 10.36") 2>&5
547b2d69 8039 ac_status=$?
bb0a50d8 8040 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
547b2d69 8041 test $ac_status = 0; }; then
4b456251 8042 pkg_cv_PCRE2_CFLAGS=`$PKG_CONFIG --cflags "libpcre2-8 >= 10.36" 2>/dev/null`
547b2d69
BM
8043 test "x$?" != "x0" && pkg_failed=yes
8044else
8045 pkg_failed=yes
8046fi
8047 else
8048 pkg_failed=untried
8049fi
8050if test -n "$PCRE2_LIBS"; then
8051 pkg_cv_PCRE2_LIBS="$PCRE2_LIBS"
8052 elif test -n "$PKG_CONFIG"; then
8053 if test -n "$PKG_CONFIG" && \
4b456251
BM
8054 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre2-8 >= 10.36\""; } >&5
8055 ($PKG_CONFIG --exists --print-errors "libpcre2-8 >= 10.36") 2>&5
547b2d69 8056 ac_status=$?
bb0a50d8 8057 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
547b2d69 8058 test $ac_status = 0; }; then
4b456251 8059 pkg_cv_PCRE2_LIBS=`$PKG_CONFIG --libs "libpcre2-8 >= 10.36" 2>/dev/null`
547b2d69
BM
8060 test "x$?" != "x0" && pkg_failed=yes
8061else
8062 pkg_failed=yes
8063fi
8064 else
8065 pkg_failed=untried
8066fi
8067
8068
8069
8070if test $pkg_failed = yes; then
bb0a50d8
BM
8071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8072printf "%s\n" "no" >&6; }
547b2d69
BM
8073
8074if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8075 _pkg_short_errors_supported=yes
8076else
8077 _pkg_short_errors_supported=no
8078fi
8079 if test $_pkg_short_errors_supported = yes; then
4b456251 8080 PCRE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpcre2-8 >= 10.36" 2>&1`
547b2d69 8081 else
4b456251 8082 PCRE2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpcre2-8 >= 10.36" 2>&1`
547b2d69
BM
8083 fi
8084 # Put the nasty error message in config.log where it belongs
8085 echo "$PCRE2_PKG_ERRORS" >&5
8086
05e3ed63 8087 has_system_pcre2=no
547b2d69 8088elif test $pkg_failed = untried; then
bb0a50d8
BM
8089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8090printf "%s\n" "no" >&6; }
05e3ed63 8091 has_system_pcre2=no
547b2d69
BM
8092else
8093 PCRE2_CFLAGS=$pkg_cv_PCRE2_CFLAGS
8094 PCRE2_LIBS=$pkg_cv_PCRE2_LIBS
bb0a50d8
BM
8095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8096printf "%s\n" "yes" >&6; }
05e3ed63 8097 has_system_pcre2=yes
bb0a50d8
BM
8098if test "x$PRIVATELIBDIR" != "x"
8099then :
05e3ed63
BM
8100 rm -f "$PRIVATELIBDIR/"libpcre2*
8101fi
8102fi
8103fi
8104
bb0a50d8
BM
8105if test "$has_system_pcre2" = "no"
8106then :
05e3ed63 8107
ed2113e9 8108pcre2_version="10.42"
bb0a50d8
BM
8109{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: extracting PCRE2 regex library" >&5
8110printf "%s\n" "extracting PCRE2 regex library" >&6; }
05e3ed63
BM
8111cur_dir=`pwd`
8112cd extras
8113rm -rf pcre2-$pcre2_version pcre2
8114if test "x$ac_cv_path_GUNZIP" = "x" ; then
8115 tar xfz pcre2.tar.gz
8116else
8117 cp pcre2.tar.gz pcre2.tar.gz.bak
8118 gunzip -f pcre2.tar.gz
8119 cp pcre2.tar.gz.bak pcre2.tar.gz
8120 tar xf pcre2.tar
8121fi
bb0a50d8
BM
8122{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: configuring PCRE2 regex library" >&5
8123printf "%s\n" "configuring PCRE2 regex library" >&6; }
05e3ed63 8124cd pcre2-$pcre2_version
ab8fab79 8125./configure --enable-jit --enable-shared --prefix=$cur_dir/extras/pcre2 --libdir=$PRIVATELIBDIR || exit 1
bb0a50d8
BM
8126{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: compiling PCRE2 regex library" >&5
8127printf "%s\n" "compiling PCRE2 regex library" >&6; }
05e3ed63 8128$ac_cv_prog_MAKER || exit 1
bb0a50d8
BM
8129{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: installing PCRE2 regex library" >&5
8130printf "%s\n" "installing PCRE2 regex library" >&6; }
17e2a17e 8131rm -f "$PRIVATELIBDIR/"libpcre2*
05e3ed63
BM
8132$ac_cv_prog_MAKER install || exit 1
8133PCRE2_CFLAGS="-I$cur_dir/extras/pcre2/include"
547b2d69 8134
05e3ed63 8135PCRE2_LIBS=
bb0a50d8
BM
8136if test -n "$ac_cv_path_PKGCONFIG"
8137then :
05e3ed63 8138 PCRE2_LIBS="`$ac_cv_path_PKGCONFIG --libs libpcre2-8.pc`"
547b2d69 8139fi
bb0a50d8
BM
8140if test -z "$PCRE2_LIBS"
8141then :
05e3ed63
BM
8142 PCRE2_LIBS="$PRIVATELIBDIR/libpcre2-8.so"
8143fi
8144
8145cd $cur_dir
547b2d69
BM
8146
8147fi
8148
9fdd93f0 8149has_system_argon2="no"
bb0a50d8
BM
8150if test "x$with_system_argon2" = "xyes"
8151then :
a852b480
BM
8152
8153
8154pkg_failed=no
bb0a50d8
BM
8155{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ARGON2" >&5
8156printf %s "checking for ARGON2... " >&6; }
a852b480
BM
8157
8158if test -n "$ARGON2_CFLAGS"; then
8159 pkg_cv_ARGON2_CFLAGS="$ARGON2_CFLAGS"
8160 elif test -n "$PKG_CONFIG"; then
8161 if test -n "$PKG_CONFIG" && \
bb0a50d8 8162 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libargon2 >= 0~20161029\""; } >&5
4965fc67 8163 ($PKG_CONFIG --exists --print-errors "libargon2 >= 0~20161029") 2>&5
a852b480 8164 ac_status=$?
bb0a50d8 8165 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
a852b480 8166 test $ac_status = 0; }; then
4965fc67 8167 pkg_cv_ARGON2_CFLAGS=`$PKG_CONFIG --cflags "libargon2 >= 0~20161029" 2>/dev/null`
a852b480
BM
8168 test "x$?" != "x0" && pkg_failed=yes
8169else
8170 pkg_failed=yes
8171fi
8172 else
8173 pkg_failed=untried
8174fi
8175if test -n "$ARGON2_LIBS"; then
8176 pkg_cv_ARGON2_LIBS="$ARGON2_LIBS"
8177 elif test -n "$PKG_CONFIG"; then
8178 if test -n "$PKG_CONFIG" && \
bb0a50d8 8179 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libargon2 >= 0~20161029\""; } >&5
4965fc67 8180 ($PKG_CONFIG --exists --print-errors "libargon2 >= 0~20161029") 2>&5
a852b480 8181 ac_status=$?
bb0a50d8 8182 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
a852b480 8183 test $ac_status = 0; }; then
4965fc67 8184 pkg_cv_ARGON2_LIBS=`$PKG_CONFIG --libs "libargon2 >= 0~20161029" 2>/dev/null`
a852b480
BM
8185 test "x$?" != "x0" && pkg_failed=yes
8186else
8187 pkg_failed=yes
8188fi
8189 else
8190 pkg_failed=untried
8191fi
8192
8193
8194
8195if test $pkg_failed = yes; then
bb0a50d8
BM
8196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8197printf "%s\n" "no" >&6; }
a852b480
BM
8198
8199if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8200 _pkg_short_errors_supported=yes
8201else
8202 _pkg_short_errors_supported=no
8203fi
8204 if test $_pkg_short_errors_supported = yes; then
4965fc67 8205 ARGON2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libargon2 >= 0~20161029" 2>&1`
a852b480 8206 else
4965fc67 8207 ARGON2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libargon2 >= 0~20161029" 2>&1`
a852b480
BM
8208 fi
8209 # Put the nasty error message in config.log where it belongs
8210 echo "$ARGON2_PKG_ERRORS" >&5
8211
9fdd93f0 8212 has_system_argon2=no
a852b480 8213elif test $pkg_failed = untried; then
bb0a50d8
BM
8214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8215printf "%s\n" "no" >&6; }
9fdd93f0 8216 has_system_argon2=no
a852b480
BM
8217else
8218 ARGON2_CFLAGS=$pkg_cv_ARGON2_CFLAGS
8219 ARGON2_LIBS=$pkg_cv_ARGON2_LIBS
bb0a50d8
BM
8220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8221printf "%s\n" "yes" >&6; }
9fdd93f0 8222 has_system_argon2=yes
bb0a50d8
BM
8223if test "x$PRIVATELIBDIR" != "x"
8224then :
9fdd93f0
BM
8225 rm -f "$PRIVATELIBDIR/"libargon2*
8226fi
8227fi
8228fi
8229
bb0a50d8
BM
8230if test "$has_system_argon2" = "no"
8231then :
a852b480 8232
8f311bb9 8233argon2_version="20190702"
bb0a50d8
BM
8234{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: extracting Argon2 library" >&5
8235printf "%s\n" "extracting Argon2 library" >&6; }
9fdd93f0
BM
8236cur_dir=`pwd`
8237cd extras
8238rm -rf argon2-$argon2_version argon2
8239if test "x$ac_cv_path_GUNZIP" = "x" ; then
efaba7f9 8240 tar xfz argon2.tar.gz
9fdd93f0 8241else
efaba7f9
BM
8242 cp argon2.tar.gz argon2.tar.gz.bak
8243 gunzip -f argon2.tar.gz
8244 cp argon2.tar.gz.bak argon2.tar.gz
8245 tar xf argon2.tar
a852b480 8246fi
bb0a50d8
BM
8247{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: compiling Argon2 library" >&5
8248printf "%s\n" "compiling Argon2 library" >&6; }
9fdd93f0
BM
8249cd argon2-$argon2_version
8250$ac_cv_prog_MAKER || exit 1
bb0a50d8
BM
8251{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: installing Argon2 library" >&5
8252printf "%s\n" "installing Argon2 library" >&6; }
9fdd93f0
BM
8253$ac_cv_prog_MAKER install PREFIX=$cur_dir/extras/argon2 || exit 1
8254# We need to manually copy the libs to PRIVATELIBDIR because
8255# there is no way to tell make install in libargon2 to do so.
775fa471
BM
8256# BUT FIRST, delete the old library so it becomes an unlink+create
8257# operation rather than overwriting the existing file which would
8258# lead to a crash of the currently running IRCd.
8259rm -f "$PRIVATELIBDIR/"libargon2*
8260# Now copy the new library files:
9fdd93f0
BM
8261cp -av $cur_dir/extras/argon2/lib/* $PRIVATELIBDIR/
8262ARGON2_CFLAGS="-I$cur_dir/extras/argon2/include"
8263
b335f8c2 8264ARGON2_LIBS="-L$PRIVATELIBDIR -largon2"
9fdd93f0
BM
8265
8266cd $cur_dir
a852b480
BM
8267
8268fi
8269
5daf7e7e 8270has_system_sodium="no"
bb0a50d8
BM
8271if test "x$with_system_sodium" = "xyes"
8272then :
5daf7e7e
BM
8273
8274
8275pkg_failed=no
bb0a50d8
BM
8276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SODIUM" >&5
8277printf %s "checking for SODIUM... " >&6; }
5daf7e7e
BM
8278
8279if test -n "$SODIUM_CFLAGS"; then
8280 pkg_cv_SODIUM_CFLAGS="$SODIUM_CFLAGS"
8281 elif test -n "$PKG_CONFIG"; then
8282 if test -n "$PKG_CONFIG" && \
bb0a50d8 8283 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsodium >= 1.0.16\""; } >&5
5daf7e7e
BM
8284 ($PKG_CONFIG --exists --print-errors "libsodium >= 1.0.16") 2>&5
8285 ac_status=$?
bb0a50d8 8286 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5daf7e7e
BM
8287 test $ac_status = 0; }; then
8288 pkg_cv_SODIUM_CFLAGS=`$PKG_CONFIG --cflags "libsodium >= 1.0.16" 2>/dev/null`
8289 test "x$?" != "x0" && pkg_failed=yes
8290else
8291 pkg_failed=yes
8292fi
8293 else
8294 pkg_failed=untried
8295fi
8296if test -n "$SODIUM_LIBS"; then
8297 pkg_cv_SODIUM_LIBS="$SODIUM_LIBS"
8298 elif test -n "$PKG_CONFIG"; then
8299 if test -n "$PKG_CONFIG" && \
bb0a50d8 8300 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsodium >= 1.0.16\""; } >&5
5daf7e7e
BM
8301 ($PKG_CONFIG --exists --print-errors "libsodium >= 1.0.16") 2>&5
8302 ac_status=$?
bb0a50d8 8303 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5daf7e7e
BM
8304 test $ac_status = 0; }; then
8305 pkg_cv_SODIUM_LIBS=`$PKG_CONFIG --libs "libsodium >= 1.0.16" 2>/dev/null`
8306 test "x$?" != "x0" && pkg_failed=yes
8307else
8308 pkg_failed=yes
8309fi
8310 else
8311 pkg_failed=untried
8312fi
8313
8314
8315
8316if test $pkg_failed = yes; then
bb0a50d8
BM
8317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8318printf "%s\n" "no" >&6; }
5daf7e7e
BM
8319
8320if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8321 _pkg_short_errors_supported=yes
8322else
8323 _pkg_short_errors_supported=no
8324fi
8325 if test $_pkg_short_errors_supported = yes; then
8326 SODIUM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsodium >= 1.0.16" 2>&1`
8327 else
8328 SODIUM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsodium >= 1.0.16" 2>&1`
8329 fi
8330 # Put the nasty error message in config.log where it belongs
8331 echo "$SODIUM_PKG_ERRORS" >&5
8332
8333 has_system_sodium=no
8334elif test $pkg_failed = untried; then
bb0a50d8
BM
8335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8336printf "%s\n" "no" >&6; }
5daf7e7e
BM
8337 has_system_sodium=no
8338else
8339 SODIUM_CFLAGS=$pkg_cv_SODIUM_CFLAGS
8340 SODIUM_LIBS=$pkg_cv_SODIUM_LIBS
bb0a50d8
BM
8341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8342printf "%s\n" "yes" >&6; }
5daf7e7e 8343 has_system_sodium=yes
bb0a50d8
BM
8344if test "x$PRIVATELIBDIR" != "x"
8345then :
5daf7e7e
BM
8346 rm -f "$PRIVATELIBDIR/"libsodium*
8347fi
8348fi
8349fi
8350
bb0a50d8
BM
8351if test "$has_system_sodium" = "no"
8352then :
5daf7e7e
BM
8353
8354sodium_version="1.0.18"
bb0a50d8
BM
8355{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: extracting sodium library" >&5
8356printf "%s\n" "extracting sodium library" >&6; }
5daf7e7e
BM
8357cur_dir=`pwd`
8358cd extras
8359rm -rf sodium-$sodium_version sodium
8360if test "x$ac_cv_path_GUNZIP" = "x" ; then
8361 tar xfz libsodium.tar.gz
8362else
8363 cp libsodium.tar.gz libsodium.tar.gz.bak
8364 gunzip -f libsodium.tar.gz
8365 cp libsodium.tar.gz.bak libsodium.tar.gz
8366 tar xf libsodium.tar
8367fi
bb0a50d8
BM
8368{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: compiling sodium library" >&5
8369printf "%s\n" "compiling sodium library" >&6; }
5daf7e7e
BM
8370cd libsodium-$sodium_version
8371save_cflags="$CFLAGS"
8372CFLAGS="$orig_cflags"
8373export CFLAGS
6d81d040 8374./configure --prefix=$cur_dir/extras/sodium --libdir=$PRIVATELIBDIR --enable-shared --disable-static --enable-opt || exit 1
5daf7e7e 8375CFLAGS="$save_cflags"
bb0a50d8
BM
8376{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: compiling sodium resolver library" >&5
8377printf "%s\n" "compiling sodium resolver library" >&6; }
5daf7e7e 8378$ac_cv_prog_MAKER || exit 1
bb0a50d8
BM
8379{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: installing sodium resolver library" >&5
8380printf "%s\n" "installing sodium resolver library" >&6; }
17e2a17e 8381rm -f "$PRIVATELIBDIR/"libsodium*
5daf7e7e
BM
8382$ac_cv_prog_MAKER install || exit 1
8383SODIUM_CFLAGS="-I$cur_dir/extras/sodium/include"
8384
8385SODIUM_LIBS=
bb0a50d8
BM
8386if test -n "$ac_cv_path_PKGCONFIG"
8387then :
5daf7e7e
BM
8388 SODIUM_LIBS="`$ac_cv_path_PKGCONFIG --libs libsodium.pc`"
8389fi
bb0a50d8
BM
8390if test -z "$SODIUM_LIBS"
8391then :
5daf7e7e
BM
8392 SODIUM_LIBS="-L$PRIVATELIBDIR -lsodium"
8393fi
8394
8395cd $cur_dir
8396
8397fi
8398
c133dfd3 8399has_system_cares="no"
bb0a50d8
BM
8400if test "x$with_system_cares" = "xyes"
8401then :
5f727eec 8402
5f727eec
BM
8403
8404pkg_failed=no
bb0a50d8
BM
8405{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CARES" >&5
8406printf %s "checking for CARES... " >&6; }
94c2b583 8407
42d8a95c
WP
8408if test -n "$CARES_CFLAGS"; then
8409 pkg_cv_CARES_CFLAGS="$CARES_CFLAGS"
8410 elif test -n "$PKG_CONFIG"; then
8411 if test -n "$PKG_CONFIG" && \
bb0a50d8 8412 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcares >= 1.6.0\""; } >&5
5f727eec
BM
8413 ($PKG_CONFIG --exists --print-errors "libcares >= 1.6.0") 2>&5
8414 ac_status=$?
bb0a50d8 8415 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
94c2b583 8416 test $ac_status = 0; }; then
5f727eec 8417 pkg_cv_CARES_CFLAGS=`$PKG_CONFIG --cflags "libcares >= 1.6.0" 2>/dev/null`
42d8a95c 8418 test "x$?" != "x0" && pkg_failed=yes
5f727eec
BM
8419else
8420 pkg_failed=yes
8421fi
42d8a95c
WP
8422 else
8423 pkg_failed=untried
5f727eec 8424fi
42d8a95c
WP
8425if test -n "$CARES_LIBS"; then
8426 pkg_cv_CARES_LIBS="$CARES_LIBS"
8427 elif test -n "$PKG_CONFIG"; then
8428 if test -n "$PKG_CONFIG" && \
bb0a50d8 8429 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcares >= 1.6.0\""; } >&5
5f727eec
BM
8430 ($PKG_CONFIG --exists --print-errors "libcares >= 1.6.0") 2>&5
8431 ac_status=$?
bb0a50d8 8432 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
94c2b583 8433 test $ac_status = 0; }; then
5f727eec 8434 pkg_cv_CARES_LIBS=`$PKG_CONFIG --libs "libcares >= 1.6.0" 2>/dev/null`
42d8a95c 8435 test "x$?" != "x0" && pkg_failed=yes
5f727eec
BM
8436else
8437 pkg_failed=yes
8438fi
42d8a95c
WP
8439 else
8440 pkg_failed=untried
5f727eec
BM
8441fi
8442
8443
8444
8445if test $pkg_failed = yes; then
bb0a50d8
BM
8446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8447printf "%s\n" "no" >&6; }
5f727eec
BM
8448
8449if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8450 _pkg_short_errors_supported=yes
8451else
8452 _pkg_short_errors_supported=no
8453fi
8454 if test $_pkg_short_errors_supported = yes; then
42d8a95c 8455 CARES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcares >= 1.6.0" 2>&1`
5f727eec 8456 else
42d8a95c 8457 CARES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcares >= 1.6.0" 2>&1`
5f727eec
BM
8458 fi
8459 # Put the nasty error message in config.log where it belongs
8460 echo "$CARES_PKG_ERRORS" >&5
8461
60d14e7d 8462 has_system_cares=no
c0790e90 8463elif test $pkg_failed = untried; then
bb0a50d8
BM
8464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8465printf "%s\n" "no" >&6; }
60d14e7d 8466 has_system_cares=no
5f727eec
BM
8467else
8468 CARES_CFLAGS=$pkg_cv_CARES_CFLAGS
8469 CARES_LIBS=$pkg_cv_CARES_LIBS
bb0a50d8
BM
8470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8471printf "%s\n" "yes" >&6; }
60d14e7d 8472 has_system_cares=yes
bb0a50d8
BM
8473if test "x$PRIVATELIBDIR" != "x"
8474then :
590e345b
BM
8475 rm -f "$PRIVATELIBDIR/"libcares*
8476fi
5f727eec 8477fi
c133dfd3
BM
8478fi
8479
bb0a50d8
BM
8480if test "$has_system_cares" = "no"
8481then :
c133dfd3 8482
8e252774 8483cares_version="1.19.1"
bb0a50d8
BM
8484{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: extracting c-ares resolver library" >&5
8485printf "%s\n" "extracting c-ares resolver library" >&6; }
c133dfd3
BM
8486cur_dir=`pwd`
8487cd extras
8488rm -rf c-ares-$cares_version c-ares
8489if test "x$ac_cv_path_GUNZIP" = "x" ; then
8490 tar xfz c-ares.tar.gz
8491else
8492 cp c-ares.tar.gz c-ares.tar.gz.bak
8493 gunzip -f c-ares.tar.gz
8494 cp c-ares.tar.gz.bak c-ares.tar.gz
8495 tar xf c-ares.tar
8496fi
bb0a50d8
BM
8497{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: configuring c-ares library" >&5
8498printf "%s\n" "configuring c-ares library" >&6; }
c133dfd3
BM
8499cd c-ares-$cares_version
8500save_cflags="$CFLAGS"
8501CFLAGS="$orig_cflags"
8502export CFLAGS
ed50c8fb 8503./configure --prefix=$cur_dir/extras/c-ares --libdir=$PRIVATELIBDIR --enable-shared --disable-tests || exit 1
c133dfd3 8504CFLAGS="$save_cflags"
bb0a50d8
BM
8505{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: compiling c-ares resolver library" >&5
8506printf "%s\n" "compiling c-ares resolver library" >&6; }
c133dfd3 8507$ac_cv_prog_MAKER || exit 1
bb0a50d8
BM
8508{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: installing c-ares resolver library" >&5
8509printf "%s\n" "installing c-ares resolver library" >&6; }
17e2a17e 8510rm -f "$PRIVATELIBDIR/"libcares*
c133dfd3
BM
8511$ac_cv_prog_MAKER install || exit 1
8512CARES_CFLAGS="-I$cur_dir/extras/c-ares/include"
8513
63add509 8514CARES_LIBS="-L$PRIVATELIBDIR"
c133dfd3
BM
8515
8516cd ../..
8517CARESLIBSALT="$PRIVATELIBDIR/libcares.so"
8518cd -
8519case `uname -s` in
8520 *FreeBSD*)
8521 CARESLIBSALT="$CARESLIBSALT"
8522 ;;
8523 *Linux*)
8524 CARESLIBSALT="$CARESLIBSALT -lrt"
8525 ;;
8526 *SunOS*)
8527 CARESLIBSALT="$CARESLIBSALT -lrt"
8528 ;;
8529esac
8530
8531if test "x$ac_cv_path_PKGCONFIG" = "x" ; then
8532 CARES_LIBS="$CARES_LIBS $CARESLIBSALT"
8533else
8534 CARES_LIBSPRE="$CARES_LIBS"
8535 CARES_LIBS="$CARES_LIBS `$ac_cv_path_PKGCONFIG --libs libcares.pc | sed -e 's,-L\([^ ]\+lib\) -lcares,\1/libcares.so,'`"
8536 if test "$CARES_LIBS" = "$CARES_LIBSPRE " ; then
8537 CARES_LIBS="$CARES_LIBS $CARESLIBSALT"
8538 fi
8539fi
8540
8541cd $cur_dir
5f727eec 8542
94c2b583 8543fi
5f727eec 8544
f89348d2 8545has_system_jansson="no"
bb0a50d8
BM
8546if test "x$with_system_jansson" = "xyes"
8547then :
f89348d2
BM
8548
8549
8550pkg_failed=no
bb0a50d8
BM
8551{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for JANSSON" >&5
8552printf %s "checking for JANSSON... " >&6; }
f89348d2
BM
8553
8554if test -n "$JANSSON_CFLAGS"; then
8555 pkg_cv_JANSSON_CFLAGS="$JANSSON_CFLAGS"
8556 elif test -n "$PKG_CONFIG"; then
8557 if test -n "$PKG_CONFIG" && \
bb0a50d8 8558 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jansson >= 2.0.0\""; } >&5
f89348d2
BM
8559 ($PKG_CONFIG --exists --print-errors "jansson >= 2.0.0") 2>&5
8560 ac_status=$?
bb0a50d8 8561 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
f89348d2
BM
8562 test $ac_status = 0; }; then
8563 pkg_cv_JANSSON_CFLAGS=`$PKG_CONFIG --cflags "jansson >= 2.0.0" 2>/dev/null`
8564 test "x$?" != "x0" && pkg_failed=yes
8565else
8566 pkg_failed=yes
8567fi
8568 else
8569 pkg_failed=untried
8570fi
8571if test -n "$JANSSON_LIBS"; then
8572 pkg_cv_JANSSON_LIBS="$JANSSON_LIBS"
8573 elif test -n "$PKG_CONFIG"; then
8574 if test -n "$PKG_CONFIG" && \
bb0a50d8 8575 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jansson >= 2.0.0\""; } >&5
f89348d2
BM
8576 ($PKG_CONFIG --exists --print-errors "jansson >= 2.0.0") 2>&5
8577 ac_status=$?
bb0a50d8 8578 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
f89348d2
BM
8579 test $ac_status = 0; }; then
8580 pkg_cv_JANSSON_LIBS=`$PKG_CONFIG --libs "jansson >= 2.0.0" 2>/dev/null`
8581 test "x$?" != "x0" && pkg_failed=yes
8582else
8583 pkg_failed=yes
8584fi
8585 else
8586 pkg_failed=untried
8587fi
8588
8589
8590
8591if test $pkg_failed = yes; then
bb0a50d8
BM
8592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8593printf "%s\n" "no" >&6; }
f89348d2
BM
8594
8595if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8596 _pkg_short_errors_supported=yes
8597else
8598 _pkg_short_errors_supported=no
8599fi
8600 if test $_pkg_short_errors_supported = yes; then
8601 JANSSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "jansson >= 2.0.0" 2>&1`
8602 else
8603 JANSSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "jansson >= 2.0.0" 2>&1`
8604 fi
8605 # Put the nasty error message in config.log where it belongs
8606 echo "$JANSSON_PKG_ERRORS" >&5
8607
8608 has_system_jansson=no
8609elif test $pkg_failed = untried; then
bb0a50d8
BM
8610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8611printf "%s\n" "no" >&6; }
f89348d2
BM
8612 has_system_jansson=no
8613else
8614 JANSSON_CFLAGS=$pkg_cv_JANSSON_CFLAGS
8615 JANSSON_LIBS=$pkg_cv_JANSSON_LIBS
bb0a50d8
BM
8616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8617printf "%s\n" "yes" >&6; }
f89348d2 8618 has_system_jansson=yes
bb0a50d8
BM
8619if test "x$PRIVATELIBDIR" != "x"
8620then :
f89348d2
BM
8621 rm -f "$PRIVATELIBDIR/"libjansson*
8622fi
8623fi
8624fi
8625
bb0a50d8
BM
8626if test "$has_system_jansson" = "no"
8627then :
f89348d2 8628
6b9cb967 8629jansson_version="2.14"
bb0a50d8
BM
8630{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: extracting jansson library" >&5
8631printf "%s\n" "extracting jansson library" >&6; }
f89348d2
BM
8632cur_dir=`pwd`
8633cd extras
8634rm -rf jansson-$jansson_version jansson
8635if test "x$ac_cv_path_GUNZIP" = "x" ; then
8636 tar xfz jansson.tar.gz
8637else
8638 cp jansson.tar.gz jansson.tar.gz.bak
8639 gunzip -f jansson.tar.gz
8640 cp jansson.tar.gz.bak jansson.tar.gz
8641 tar xf jansson.tar
8642fi
bb0a50d8
BM
8643{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: compiling jansson library" >&5
8644printf "%s\n" "compiling jansson library" >&6; }
f89348d2
BM
8645cd jansson-$jansson_version
8646save_cflags="$CFLAGS"
8647CFLAGS="$orig_cflags"
8648export CFLAGS
6d81d040 8649./configure --prefix=$cur_dir/extras/jansson --libdir=$PRIVATELIBDIR --enable-shared --disable-static || exit 1
f89348d2 8650CFLAGS="$save_cflags"
bb0a50d8
BM
8651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: compiling jansson resolver library" >&5
8652printf "%s\n" "compiling jansson resolver library" >&6; }
f89348d2 8653$ac_cv_prog_MAKER || exit 1
bb0a50d8
BM
8654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: installing jansson resolver library" >&5
8655printf "%s\n" "installing jansson resolver library" >&6; }
17e2a17e 8656rm -f "$PRIVATELIBDIR/"libjansson*
f89348d2
BM
8657$ac_cv_prog_MAKER install || exit 1
8658JANSSON_CFLAGS="-I$cur_dir/extras/jansson/include"
8659
8660JANSSON_LIBS=
bb0a50d8
BM
8661if test -n "$ac_cv_path_PKGCONFIG"
8662then :
f89348d2
BM
8663 JANSSON_LIBS="`$ac_cv_path_PKGCONFIG --libs jansson.pc`"
8664fi
bb0a50d8
BM
8665if test -z "$JANSSON_LIBS"
8666then :
f89348d2
BM
8667 JANSSON_LIBS="-L$PRIVATELIBDIR -ljansson"
8668fi
8669
8670cd $cur_dir
8671
8672fi
8673
8674
0136ac3c 8675
bb0a50d8
BM
8676
8677
8678 # Make sure we can run config.sub.
8679$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
8680 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
8681
8682{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
8683printf %s "checking build system type... " >&6; }
8684if test ${ac_cv_build+y}
8685then :
8686 printf %s "(cached) " >&6
8687else $as_nop
0136ac3c
TM
8688 ac_build_alias=$build_alias
8689test "x$ac_build_alias" = x &&
bb0a50d8 8690 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
0136ac3c
TM
8691test "x$ac_build_alias" = x &&
8692 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
bb0a50d8
BM
8693ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
8694 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
0136ac3c
TM
8695
8696fi
bb0a50d8
BM
8697{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
8698printf "%s\n" "$ac_cv_build" >&6; }
0136ac3c
TM
8699case $ac_cv_build in
8700*-*-*) ;;
8701*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
8702esac
8703build=$ac_cv_build
8704ac_save_IFS=$IFS; IFS='-'
8705set x $ac_cv_build
8706shift
8707build_cpu=$1
8708build_vendor=$2
8709shift; shift
8710# Remember, the first character of IFS is used to create $*,
8711# except with old shells:
8712build_os=$*
8713IFS=$ac_save_IFS
8714case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
8715
8716
bb0a50d8
BM
8717{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
8718printf %s "checking host system type... " >&6; }
8719if test ${ac_cv_host+y}
8720then :
8721 printf %s "(cached) " >&6
8722else $as_nop
0136ac3c
TM
8723 if test "x$host_alias" = x; then
8724 ac_cv_host=$ac_cv_build
8725else
bb0a50d8
BM
8726 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
8727 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
0136ac3c
TM
8728fi
8729
8730fi
bb0a50d8
BM
8731{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
8732printf "%s\n" "$ac_cv_host" >&6; }
0136ac3c
TM
8733case $ac_cv_host in
8734*-*-*) ;;
8735*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
8736esac
8737host=$ac_cv_host
8738ac_save_IFS=$IFS; IFS='-'
8739set x $ac_cv_host
8740shift
8741host_cpu=$1
8742host_vendor=$2
8743shift; shift
8744# Remember, the first character of IFS is used to create $*,
8745# except with old shells:
8746host_os=$*
8747IFS=$ac_save_IFS
8748case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
8749
8750
f81d2207
BM
8751
8752
8753ac_ext=c
8754ac_cpp='$CPP $CPPFLAGS'
8755ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8756ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8757ac_compiler_gnu=$ac_cv_c_compiler_gnu
8758
8759ax_pthread_ok=no
8760
8761# We used to check for pthread.h first, but this fails if pthread.h
8762# requires special compiler flags (e.g. on True64 or Sequent).
8763# It gets checked for in the link test anyway.
8764
8765# First of all, check if the user has set any of the PTHREAD_LIBS,
8766# etcetera environment variables, and if threads linking works using
8767# them:
8768if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
8769 save_CFLAGS="$CFLAGS"
8770 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8771 save_LIBS="$LIBS"
8772 LIBS="$PTHREAD_LIBS $LIBS"
bb0a50d8
BM
8773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
8774printf %s "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
f81d2207
BM
8775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8776/* end confdefs.h. */
8777
8778/* Override any GCC internal prototype to avoid an error.
8779 Use char because int might match the return type of a GCC
8780 builtin and then its argument prototype would still apply. */
f81d2207
BM
8781char pthread_join ();
8782int
bb0a50d8 8783main (void)
f81d2207
BM
8784{
8785return pthread_join ();
8786 ;
8787 return 0;
8788}
8789_ACEOF
bb0a50d8
BM
8790if ac_fn_c_try_link "$LINENO"
8791then :
f81d2207
BM
8792 ax_pthread_ok=yes
8793fi
bb0a50d8 8794rm -f core conftest.err conftest.$ac_objext conftest.beam \
f81d2207 8795 conftest$ac_exeext conftest.$ac_ext
bb0a50d8
BM
8796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8797printf "%s\n" "$ax_pthread_ok" >&6; }
f81d2207
BM
8798 if test x"$ax_pthread_ok" = xno; then
8799 PTHREAD_LIBS=""
8800 PTHREAD_CFLAGS=""
8801 fi
8802 LIBS="$save_LIBS"
8803 CFLAGS="$save_CFLAGS"
8804fi
8805
8806# We must check for the threads library under a number of different
8807# names; the ordering is very important because some systems
8808# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
8809# libraries is broken (non-POSIX).
8810
8811# Create a list of thread flags to try. Items starting with a "-" are
8812# C compiler flags, and other items are library names, except for "none"
8813# which indicates that we try without any flags at all, and "pthread-config"
8814# which is a program returning the flags for the Pth emulation library.
8815
8816ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
8817
8818# The ordering *is* (sometimes) important. Some notes on the
8819# individual items follow:
8820
8821# pthreads: AIX (must check this before -lpthread)
8822# none: in case threads are in libc; should be tried before -Kthread and
8823# other compiler flags to prevent continual compiler warnings
8824# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
8825# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
8826# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
8827# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
8828# -pthreads: Solaris/gcc
8829# -mthreads: Mingw32/gcc, Lynx/gcc
8830# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
8831# doesn't hurt to check since this sometimes defines pthreads too;
8832# also defines -D_REENTRANT)
8833# ... -mt is also the pthreads flag for HP/aCC
8834# pthread: Linux, etcetera
8835# --thread-safe: KAI C++
8836# pthread-config: use pthread-config program (for GNU Pth library)
8837
8838case ${host_os} in
8839 solaris*)
8840
8841 # On Solaris (at least, for some versions), libc contains stubbed
8842 # (non-functional) versions of the pthreads routines, so link-based
8843 # tests will erroneously succeed. (We need to link with -pthreads/-mt/
8844 # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
8845 # a function called by this macro, so we could check for that, but
8846 # who knows whether they'll stub that too in a future libc.) So,
8847 # we'll just look for -pthreads and -lpthread first:
8848
8849 ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
8850 ;;
8851
8852 darwin*)
8853 ax_pthread_flags="-pthread $ax_pthread_flags"
8854 ;;
8855esac
8856
8857# Clang doesn't consider unrecognized options an error unless we specify
8858# -Werror. We throw in some extra Clang-specific options to ensure that
8859# this doesn't happen for GCC, which also accepts -Werror.
8860
bb0a50d8
BM
8861{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
8862printf %s "checking if compiler needs -Werror to reject unknown flags... " >&6; }
f81d2207
BM
8863save_CFLAGS="$CFLAGS"
8864ax_pthread_extra_flags="-Werror"
8865CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
8866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8867/* end confdefs.h. */
8868int foo(void);
8869int
bb0a50d8 8870main (void)
f81d2207
BM
8871{
8872foo()
8873 ;
8874 return 0;
8875}
8876_ACEOF
bb0a50d8
BM
8877if ac_fn_c_try_compile "$LINENO"
8878then :
8879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8880printf "%s\n" "yes" >&6; }
8881else $as_nop
f81d2207 8882 ax_pthread_extra_flags=
bb0a50d8
BM
8883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8884printf "%s\n" "no" >&6; }
f81d2207 8885fi
bb0a50d8 8886rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
f81d2207
BM
8887CFLAGS="$save_CFLAGS"
8888
8889if test x"$ax_pthread_ok" = xno; then
8890for flag in $ax_pthread_flags; do
8891
8892 case $flag in
8893 none)
bb0a50d8
BM
8894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
8895printf %s "checking whether pthreads work without any flags... " >&6; }
f81d2207
BM
8896 ;;
8897
8898 -*)
bb0a50d8
BM
8899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
8900printf %s "checking whether pthreads work with $flag... " >&6; }
f81d2207
BM
8901 PTHREAD_CFLAGS="$flag"
8902 ;;
8903
8904 pthread-config)
8905 # Extract the first word of "pthread-config", so it can be a program name with args.
8906set dummy pthread-config; ac_word=$2
bb0a50d8
BM
8907{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8908printf %s "checking for $ac_word... " >&6; }
8909if test ${ac_cv_prog_ax_pthread_config+y}
8910then :
8911 printf %s "(cached) " >&6
8912else $as_nop
f81d2207
BM
8913 if test -n "$ax_pthread_config"; then
8914 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
8915else
8916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8917for as_dir in $PATH
8918do
8919 IFS=$as_save_IFS
bb0a50d8
BM
8920 case $as_dir in #(((
8921 '') as_dir=./ ;;
8922 */) ;;
8923 *) as_dir=$as_dir/ ;;
8924 esac
f81d2207 8925 for ac_exec_ext in '' $ac_executable_extensions; do
bb0a50d8 8926 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
f81d2207 8927 ac_cv_prog_ax_pthread_config="yes"
bb0a50d8 8928 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
f81d2207
BM
8929 break 2
8930 fi
8931done
8932 done
8933IFS=$as_save_IFS
8934
8935 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
8936fi
8937fi
8938ax_pthread_config=$ac_cv_prog_ax_pthread_config
8939if test -n "$ax_pthread_config"; then
bb0a50d8
BM
8940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
8941printf "%s\n" "$ax_pthread_config" >&6; }
f81d2207 8942else
bb0a50d8
BM
8943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8944printf "%s\n" "no" >&6; }
f81d2207
BM
8945fi
8946
8947
8948 if test x"$ax_pthread_config" = xno; then continue; fi
8949 PTHREAD_CFLAGS="`pthread-config --cflags`"
8950 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
8951 ;;
8952
8953 *)
bb0a50d8
BM
8954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
8955printf %s "checking for the pthreads library -l$flag... " >&6; }
f81d2207
BM
8956 PTHREAD_LIBS="-l$flag"
8957 ;;
8958 esac
8959
8960 save_LIBS="$LIBS"
8961 save_CFLAGS="$CFLAGS"
8962 LIBS="$PTHREAD_LIBS $LIBS"
8963 CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
8964
8965 # Check for various functions. We must include pthread.h,
8966 # since some functions may be macros. (On the Sequent, we
8967 # need a special flag -Kthread to make this header compile.)
8968 # We check for pthread_join because it is in -lpthread on IRIX
8969 # while pthread_create is in libc. We check for pthread_attr_init
8970 # due to DEC craziness with -lpthreads. We check for
8971 # pthread_cleanup_push because it is one of the few pthread
8972 # functions on Solaris that doesn't have a non-functional libc stub.
8973 # We try pthread_create on general principles.
8974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8975/* end confdefs.h. */
8976#include <pthread.h>
8977 static void routine(void *a) { a = 0; }
8978 static void *start_routine(void *a) { return a; }
8979int
bb0a50d8 8980main (void)
f81d2207
BM
8981{
8982pthread_t th; pthread_attr_t attr;
8983 pthread_create(&th, 0, start_routine, 0);
8984 pthread_join(th, 0);
8985 pthread_attr_init(&attr);
8986 pthread_cleanup_push(routine, 0);
8987 pthread_cleanup_pop(0) /* ; */
8988 ;
8989 return 0;
8990}
8991_ACEOF
bb0a50d8
BM
8992if ac_fn_c_try_link "$LINENO"
8993then :
f81d2207
BM
8994 ax_pthread_ok=yes
8995fi
bb0a50d8 8996rm -f core conftest.err conftest.$ac_objext conftest.beam \
f81d2207
BM
8997 conftest$ac_exeext conftest.$ac_ext
8998
8999 LIBS="$save_LIBS"
9000 CFLAGS="$save_CFLAGS"
9001
bb0a50d8
BM
9002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
9003printf "%s\n" "$ax_pthread_ok" >&6; }
f81d2207
BM
9004 if test "x$ax_pthread_ok" = xyes; then
9005 break;
9006 fi
9007
9008 PTHREAD_LIBS=""
9009 PTHREAD_CFLAGS=""
9010done
9011fi
9012
9013# Various other checks:
9014if test "x$ax_pthread_ok" = xyes; then
9015 save_LIBS="$LIBS"
9016 LIBS="$PTHREAD_LIBS $LIBS"
9017 save_CFLAGS="$CFLAGS"
9018 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9019
9020 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
bb0a50d8
BM
9021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
9022printf %s "checking for joinable pthread attribute... " >&6; }
f81d2207
BM
9023 attr_name=unknown
9024 for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
9025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9026/* end confdefs.h. */
9027#include <pthread.h>
9028int
bb0a50d8 9029main (void)
f81d2207
BM
9030{
9031int attr = $attr; return attr /* ; */
9032 ;
9033 return 0;
9034}
9035_ACEOF
bb0a50d8
BM
9036if ac_fn_c_try_link "$LINENO"
9037then :
f81d2207
BM
9038 attr_name=$attr; break
9039fi
bb0a50d8 9040rm -f core conftest.err conftest.$ac_objext conftest.beam \
f81d2207
BM
9041 conftest$ac_exeext conftest.$ac_ext
9042 done
bb0a50d8
BM
9043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
9044printf "%s\n" "$attr_name" >&6; }
f81d2207
BM
9045 if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
9046
bb0a50d8 9047printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $attr_name" >>confdefs.h
f81d2207
BM
9048
9049 fi
9050
bb0a50d8
BM
9051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
9052printf %s "checking if more special flags are required for pthreads... " >&6; }
f81d2207
BM
9053 flag=no
9054 case ${host_os} in
9055 aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
9056 osf* | hpux*) flag="-D_REENTRANT";;
9057 solaris*)
9058 if test "$GCC" = "yes"; then
9059 flag="-D_REENTRANT"
9060 else
9061 # TODO: What about Clang on Solaris?
9062 flag="-mt -D_REENTRANT"
9063 fi
9064 ;;
9065 esac
bb0a50d8
BM
9066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
9067printf "%s\n" "$flag" >&6; }
f81d2207
BM
9068 if test "x$flag" != xno; then
9069 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
9070 fi
9071
bb0a50d8
BM
9072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
9073printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; }
9074if test ${ax_cv_PTHREAD_PRIO_INHERIT+y}
9075then :
9076 printf %s "(cached) " >&6
9077else $as_nop
f81d2207
BM
9078
9079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9080/* end confdefs.h. */
9081#include <pthread.h>
9082int
bb0a50d8 9083main (void)
f81d2207
BM
9084{
9085int i = PTHREAD_PRIO_INHERIT;
9086 ;
9087 return 0;
9088}
9089_ACEOF
bb0a50d8
BM
9090if ac_fn_c_try_link "$LINENO"
9091then :
f81d2207 9092 ax_cv_PTHREAD_PRIO_INHERIT=yes
bb0a50d8 9093else $as_nop
f81d2207
BM
9094 ax_cv_PTHREAD_PRIO_INHERIT=no
9095fi
bb0a50d8 9096rm -f core conftest.err conftest.$ac_objext conftest.beam \
f81d2207
BM
9097 conftest$ac_exeext conftest.$ac_ext
9098
9099fi
bb0a50d8
BM
9100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
9101printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
9102 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"
9103then :
f81d2207 9104
bb0a50d8 9105printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
f81d2207
BM
9106
9107fi
9108
9109 LIBS="$save_LIBS"
9110 CFLAGS="$save_CFLAGS"
9111
9112 # More AIX lossage: compile with *_r variant
9113 if test "x$GCC" != xyes; then
9114 case $host_os in
9115 aix*)
9116 case "x/$CC" in #(
9117 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
9118 #handle absolute path differently from PATH based program lookup
9119 case "x$CC" in #(
9120 x/*) :
bb0a50d8
BM
9121 if as_fn_executable_p ${CC}_r
9122then :
f81d2207
BM
9123 PTHREAD_CC="${CC}_r"
9124fi ;; #(
9125 *) :
9126 for ac_prog in ${CC}_r
9127do
9128 # Extract the first word of "$ac_prog", so it can be a program name with args.
9129set dummy $ac_prog; ac_word=$2
bb0a50d8
BM
9130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9131printf %s "checking for $ac_word... " >&6; }
9132if test ${ac_cv_prog_PTHREAD_CC+y}
9133then :
9134 printf %s "(cached) " >&6
9135else $as_nop
f81d2207
BM
9136 if test -n "$PTHREAD_CC"; then
9137 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
9138else
9139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9140for as_dir in $PATH
9141do
9142 IFS=$as_save_IFS
bb0a50d8
BM
9143 case $as_dir in #(((
9144 '') as_dir=./ ;;
9145 */) ;;
9146 *) as_dir=$as_dir/ ;;
9147 esac
f81d2207 9148 for ac_exec_ext in '' $ac_executable_extensions; do
bb0a50d8 9149 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
f81d2207 9150 ac_cv_prog_PTHREAD_CC="$ac_prog"
bb0a50d8 9151 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
f81d2207
BM
9152 break 2
9153 fi
9154done
9155 done
9156IFS=$as_save_IFS
9157
9158fi
9159fi
9160PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
9161if test -n "$PTHREAD_CC"; then
bb0a50d8
BM
9162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
9163printf "%s\n" "$PTHREAD_CC" >&6; }
f81d2207 9164else
bb0a50d8
BM
9165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9166printf "%s\n" "no" >&6; }
f81d2207
BM
9167fi
9168
9169
9170 test -n "$PTHREAD_CC" && break
9171done
9172test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
9173 ;;
9174esac ;; #(
9175 *) :
9176 ;;
9177esac
9178 ;;
9179 esac
9180 fi
9181fi
9182
9183test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
9184
9185
9186
9187
9188
9189# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
9190if test x"$ax_pthread_ok" = xyes; then
9191
bb0a50d8 9192printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h
f81d2207
BM
9193
9194 :
9195else
9196 ax_pthread_ok=no
9197
9198fi
9199ac_ext=c
9200ac_cpp='$CPP $CPPFLAGS'
9201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9203ac_compiler_gnu=$ac_cv_c_compiler_gnu
9204
9205
9206
85904c22 9207
b2e4cf82 9208 # Check whether --enable-libcurl was given.
bb0a50d8
BM
9209if test ${enable_libcurl+y}
9210then :
b2e4cf82 9211 enableval=$enable_libcurl; enable_curl=$enableval
bb0a50d8 9212else $as_nop
b2e4cf82 9213 enable_curl=no
9214fi
9215
9216
bb0a50d8
BM
9217 if test "x$enable_curl" != "xno"
9218then :
b2e4cf82 9219
9220 CURLCONFIG="curl-config"
bb0a50d8
BM
9221 if test "x$enable_curl" != "xyes"
9222then :
b2e4cf82 9223 CURLCONFIG="$enable_curl/bin/curl-config"
9224fi
9225
bb0a50d8
BM
9226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $CURLCONFIG" >&5
9227printf %s "checking $CURLCONFIG... " >&6; }
9228 if $CURLCONFIG --version 2>/dev/null >/dev/null
9229then :
9230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9231printf "%s\n" "yes" >&6; }
9232else $as_nop
9233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9234printf "%s\n" "no" >&6; }
9235 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9236printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
0ff0b04a
NPB
9237as_fn_error $? "Could not find curl-config, try editing --enable-libcurl
9238See \`config.log' for more details" "$LINENO" 5; }
b2e4cf82 9239fi
9240
9241 CURLCFLAG="`$CURLCONFIG --cflags`"
9242 CURLLIBS="`$CURLCONFIG --libs`"
9243
bb0a50d8
BM
9244 if $CURLCONFIG --libs | grep -q -e ares
9245then :
df37d83f 9246 CURLUSESCARES="1"
bb0a50d8 9247else $as_nop
df37d83f 9248 CURLUSESCARES="0"
b2e4cf82 9249fi
9250
bb0a50d8
BM
9251 if test -z "${CURLLIBS}"
9252then :
9253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: CURLLIBS is empty, that probably means that I could not find $enable_curl/bin/curl-config" >&5
9254printf "%s\n" "$as_me: WARNING: CURLLIBS is empty, that probably means that I could not find $enable_curl/bin/curl-config" >&2;}
b2e4cf82 9255fi
9256
9257
bb0a50d8
BM
9258 if test "x$has_system_cares" = "xno" && test "x$BUILDDIR/extras/curl" != "x$enable_curl" && test "$CURLUSESCARES" != "0"
9259then :
b2e4cf82 9260
0ff0b04a 9261 as_fn_error $? "
85904c22
BM
9262
9263 You have decided to build unrealIRCd with libcURL (remote includes) support.
69e651aa
BM
9264 However, you have system-installed c-ares support has either been disabled
9265 (--without-system-cares) or is unavailable.
85904c22
BM
9266 Because UnrealIRCd will use a bundled copy of c-ares which may be incompatible
9267 with the system-installed libcURL, this is a bad idea which may result in error
9268 messages looking like:
9269
bb0a50d8 9270 error downloading ... Could not resolve host: example.net (Successful completion)
85904c22
BM
9271
9272 Or UnrealIRCd might even crash.
9273
9274 Please build UnrealIRCd with --with-system-cares when enabling --enable-libcurl
94c2b583 9275" "$LINENO" 5
b2e4cf82 9276
b2e4cf82 9277fi
9278
9279 IRCDLIBS="$IRCDLIBS $CURLLIBS"
7a3bf155 9280 CFLAGS="$CFLAGS $CURLCFLAG"
9281
bb0a50d8 9282printf "%s\n" "#define USE_LIBCURL /**/" >>confdefs.h
7a3bf155 9283
b2e4cf82 9284
bb0a50d8
BM
9285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking curl_easy_init() in $CURLLIBS" >&5
9286printf %s "checking curl_easy_init() in $CURLLIBS... " >&6; }
b2e4cf82 9287 LIBS_SAVEDA="$LIBS"
9288 CFLAGS_SAVEDA="$CFLAGS"
9289
9290 LIBS="$IRCDLIBS $IRCDLIBS_CURL_CARES"
9291 CFLAGS="$CFLAGS $CFLAGS_CURL_CARES"
94c2b583 9292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85904c22 9293/* end confdefs.h. */
94c2b583 9294
9295 #include <curl/curl.h>
b2e4cf82 9296int
bb0a50d8 9297main (void)
b2e4cf82 9298{
9299CURL *curl = curl_easy_init();
9300 ;
9301 return 0;
94c2b583 9302}
85904c22 9303
94c2b583 9304_ACEOF
bb0a50d8
BM
9305if ac_fn_c_try_link "$LINENO"
9306then :
9307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9308printf "%s\n" "yes" >&6; }
9309else $as_nop
9310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9311printf "%s\n" "no" >&6; }
9312 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9313printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
0ff0b04a
NPB
9314as_fn_error $? "You asked for libcURL (remote includes) support, but it can't be found at $enable_curl
9315See \`config.log' for more details" "$LINENO" 5; }
b2e4cf82 9316
9317fi
bb0a50d8 9318rm -f core conftest.err conftest.$ac_objext conftest.beam \
94c2b583 9319 conftest$ac_exeext conftest.$ac_ext
b2e4cf82 9320 LIBS="$LIBS_SAVEDA"
9321 CFLAGS="$CFLAGS_SAVEDA"
9322
2c7d2c8f
BM
9323 URL="url_curl.o"
9324
bb0a50d8 9325else $as_nop
2c7d2c8f
BM
9326
9327 URL="url_unreal.o"
9328
b2e4cf82 9329fi
9330
ed7bf1da 9331
2c7d2c8f 9332
ed7bf1da 9333 # Check whether --enable-geoip_classic was given.
bb0a50d8
BM
9334if test ${enable_geoip_classic+y}
9335then :
ed7bf1da 9336 enableval=$enable_geoip_classic; enable_geoip_classic=$enableval
bb0a50d8 9337else $as_nop
ed7bf1da
BM
9338 enable_geoip_classic=no
9339fi
9340
9341
bb0a50d8
BM
9342 if test "x$enable_geoip_classic" = "xyes"
9343then :
ed7bf1da
BM
9344
9345 has_system_geoip_classic="no"
9346
9347pkg_failed=no
bb0a50d8
BM
9348{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GEOIP_CLASSIC" >&5
9349printf %s "checking for GEOIP_CLASSIC... " >&6; }
ed7bf1da
BM
9350
9351if test -n "$GEOIP_CLASSIC_CFLAGS"; then
9352 pkg_cv_GEOIP_CLASSIC_CFLAGS="$GEOIP_CLASSIC_CFLAGS"
9353 elif test -n "$PKG_CONFIG"; then
9354 if test -n "$PKG_CONFIG" && \
bb0a50d8 9355 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"geoip >= 1.6.0\""; } >&5
ed7bf1da
BM
9356 ($PKG_CONFIG --exists --print-errors "geoip >= 1.6.0") 2>&5
9357 ac_status=$?
bb0a50d8 9358 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
ed7bf1da
BM
9359 test $ac_status = 0; }; then
9360 pkg_cv_GEOIP_CLASSIC_CFLAGS=`$PKG_CONFIG --cflags "geoip >= 1.6.0" 2>/dev/null`
9361 test "x$?" != "x0" && pkg_failed=yes
9362else
9363 pkg_failed=yes
9364fi
9365 else
9366 pkg_failed=untried
9367fi
9368if test -n "$GEOIP_CLASSIC_LIBS"; then
9369 pkg_cv_GEOIP_CLASSIC_LIBS="$GEOIP_CLASSIC_LIBS"
9370 elif test -n "$PKG_CONFIG"; then
9371 if test -n "$PKG_CONFIG" && \
bb0a50d8 9372 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"geoip >= 1.6.0\""; } >&5
ed7bf1da
BM
9373 ($PKG_CONFIG --exists --print-errors "geoip >= 1.6.0") 2>&5
9374 ac_status=$?
bb0a50d8 9375 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
ed7bf1da
BM
9376 test $ac_status = 0; }; then
9377 pkg_cv_GEOIP_CLASSIC_LIBS=`$PKG_CONFIG --libs "geoip >= 1.6.0" 2>/dev/null`
9378 test "x$?" != "x0" && pkg_failed=yes
9379else
9380 pkg_failed=yes
9381fi
9382 else
9383 pkg_failed=untried
9384fi
9385
9386
9387
9388if test $pkg_failed = yes; then
bb0a50d8
BM
9389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9390printf "%s\n" "no" >&6; }
ed7bf1da
BM
9391
9392if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9393 _pkg_short_errors_supported=yes
9394else
9395 _pkg_short_errors_supported=no
9396fi
9397 if test $_pkg_short_errors_supported = yes; then
9398 GEOIP_CLASSIC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "geoip >= 1.6.0" 2>&1`
9399 else
9400 GEOIP_CLASSIC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "geoip >= 1.6.0" 2>&1`
9401 fi
9402 # Put the nasty error message in config.log where it belongs
9403 echo "$GEOIP_CLASSIC_PKG_ERRORS" >&5
9404
9405 has_system_geoip_classic=no
9406elif test $pkg_failed = untried; then
bb0a50d8
BM
9407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9408printf "%s\n" "no" >&6; }
ed7bf1da
BM
9409 has_system_geoip_classic=no
9410else
9411 GEOIP_CLASSIC_CFLAGS=$pkg_cv_GEOIP_CLASSIC_CFLAGS
9412 GEOIP_CLASSIC_LIBS=$pkg_cv_GEOIP_CLASSIC_LIBS
bb0a50d8
BM
9413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9414printf "%s\n" "yes" >&6; }
ed7bf1da 9415 has_system_geoip_classic=yes
bb0a50d8
BM
9416 if test "x$PRIVATELIBDIR" != "x"
9417then :
ed7bf1da
BM
9418 rm -f "$PRIVATELIBDIR/"libGeoIP.*
9419fi
ed7bf1da
BM
9420fi
9421
bb0a50d8
BM
9422 if test "$has_system_geoip_classic" = "no"
9423then :
ed7bf1da
BM
9424
9425 geoip_classic_version="1.6.12"
bb0a50d8
BM
9426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: extracting GeoIP Classic library" >&5
9427printf "%s\n" "extracting GeoIP Classic library" >&6; }
ed7bf1da
BM
9428 cur_dir=`pwd`
9429 cd extras
9430 rm -rf GeoIP-$geoip_classic_version geoip-classic
9431 if test "x$ac_cv_path_GUNZIP" = "x" ; then
9432 tar xfz geoip-classic.tar.gz
9433 else
9434 cp geoip-classic.tar.gz geoip-classic.tar.gz.bak
9435 gunzip -f geoip-classic.tar.gz
9436 cp geoip-classic.tar.gz.bak geoip-classic.tar.gz
9437 tar xf geoip-classic.tar
9438 fi
bb0a50d8
BM
9439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: configuring GeoIP Classic library" >&5
9440printf "%s\n" "configuring GeoIP Classic library" >&6; }
ed7bf1da
BM
9441 cd GeoIP-$geoip_classic_version
9442 save_cflags="$CFLAGS"
9443 CFLAGS="$orig_cflags"
9444 export CFLAGS
9445 ./configure --prefix=$cur_dir/extras/geoip-classic --libdir=$PRIVATELIBDIR --enable-shared --disable-static || exit 1
9446 CFLAGS="$save_cflags"
bb0a50d8
BM
9447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: compiling GeoIP Classic library" >&5
9448printf "%s\n" "compiling GeoIP Classic library" >&6; }
ed7bf1da 9449 $ac_cv_prog_MAKER || exit 1
bb0a50d8
BM
9450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: installing GeoIP Classic library" >&5
9451printf "%s\n" "installing GeoIP Classic library" >&6; }
17e2a17e 9452 rm -f "$PRIVATELIBDIR/"libGeoIP.so*
ed7bf1da 9453 $ac_cv_prog_MAKER install || exit 1
bb0a50d8
BM
9454 if test -n "$ac_cv_path_PKGCONFIG"
9455then :
ed7bf1da 9456 GEOIP_CLASSIC_LIBS="`$ac_cv_path_PKGCONFIG --libs geoip.pc`"
b15ddd76 9457 GEOIP_CLASSIC_CFLAGS="`$ac_cv_path_PKGCONFIG --cflags geoip.pc`"
ed7bf1da 9458fi
bb0a50d8
BM
9459 if test -z "$GEOIP_CLASSIC_LIBS"
9460then :
ed7bf1da 9461 GEOIP_CLASSIC_LIBS="-L$PRIVATELIBDIR -lGeoIP"
8cdbc3ae 9462 GEOIP_CLASSIC_CFLAGS="-I$cur_dir/extras/geoip-classic/include"
ed7bf1da
BM
9463fi
9464 cd $cur_dir
9465
9466fi
9467
9468
9469
9470
9471 GEOIP_CLASSIC_OBJECTS="geoip_classic.so"
9472
9473
8cdbc3ae 9474fi
ed7bf1da 9475
9c3d5dff 9476
9477 # Check whether --enable-libmaxminddb was given.
bb0a50d8
BM
9478if test ${enable_libmaxminddb+y}
9479then :
9c3d5dff 9480 enableval=$enable_libmaxminddb; enable_libmaxminddb=$enableval
bb0a50d8 9481else $as_nop
f665206c 9482 enable_libmaxminddb=no
9c3d5dff 9483fi
9484
9485
bb0a50d8
BM
9486 if test "x$enable_libmaxminddb" = "xyes"
9487then :
9c3d5dff 9488
9489 has_system_libmaxminddb="no"
9490
9491pkg_failed=no
bb0a50d8
BM
9492{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBMAXMINDDB" >&5
9493printf %s "checking for LIBMAXMINDDB... " >&6; }
9c3d5dff 9494
9495if test -n "$LIBMAXMINDDB_CFLAGS"; then
9496 pkg_cv_LIBMAXMINDDB_CFLAGS="$LIBMAXMINDDB_CFLAGS"
9497 elif test -n "$PKG_CONFIG"; then
9498 if test -n "$PKG_CONFIG" && \
bb0a50d8 9499 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmaxminddb >= 1.4.3\""; } >&5
a71e2051 9500 ($PKG_CONFIG --exists --print-errors "libmaxminddb >= 1.4.3") 2>&5
9c3d5dff 9501 ac_status=$?
bb0a50d8 9502 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9c3d5dff 9503 test $ac_status = 0; }; then
a71e2051 9504 pkg_cv_LIBMAXMINDDB_CFLAGS=`$PKG_CONFIG --cflags "libmaxminddb >= 1.4.3" 2>/dev/null`
9c3d5dff 9505 test "x$?" != "x0" && pkg_failed=yes
9506else
9507 pkg_failed=yes
9508fi
9509 else
9510 pkg_failed=untried
9511fi
9512if test -n "$LIBMAXMINDDB_LIBS"; then
9513 pkg_cv_LIBMAXMINDDB_LIBS="$LIBMAXMINDDB_LIBS"
9514 elif test -n "$PKG_CONFIG"; then
9515 if test -n "$PKG_CONFIG" && \
bb0a50d8 9516 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmaxminddb >= 1.4.3\""; } >&5
a71e2051 9517 ($PKG_CONFIG --exists --print-errors "libmaxminddb >= 1.4.3") 2>&5
9c3d5dff 9518 ac_status=$?
bb0a50d8 9519 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9c3d5dff 9520 test $ac_status = 0; }; then
a71e2051 9521 pkg_cv_LIBMAXMINDDB_LIBS=`$PKG_CONFIG --libs "libmaxminddb >= 1.4.3" 2>/dev/null`
9c3d5dff 9522 test "x$?" != "x0" && pkg_failed=yes
9523else
9524 pkg_failed=yes
9525fi
9526 else
9527 pkg_failed=untried
9528fi
9529
9530
9531
9532if test $pkg_failed = yes; then
bb0a50d8
BM
9533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9534printf "%s\n" "no" >&6; }
9c3d5dff 9535
9536if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9537 _pkg_short_errors_supported=yes
9538else
9539 _pkg_short_errors_supported=no
9540fi
9541 if test $_pkg_short_errors_supported = yes; then
a71e2051 9542 LIBMAXMINDDB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libmaxminddb >= 1.4.3" 2>&1`
9c3d5dff 9543 else
a71e2051 9544 LIBMAXMINDDB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libmaxminddb >= 1.4.3" 2>&1`
9c3d5dff 9545 fi
9546 # Put the nasty error message in config.log where it belongs
9547 echo "$LIBMAXMINDDB_PKG_ERRORS" >&5
9548
a71e2051 9549 as_fn_error $? "Package requirements (libmaxminddb >= 1.4.3) were not met:
84527768 9550
f665206c 9551$LIBMAXMINDDB_PKG_ERRORS
9552
9553Consider adjusting the PKG_CONFIG_PATH environment variable if you
9554installed software in a non-standard prefix.
9555
9556Alternatively, you may set the environment variables LIBMAXMINDDB_CFLAGS
9557and LIBMAXMINDDB_LIBS to avoid the need to call pkg-config.
9558See the pkg-config man page for more details." "$LINENO" 5
9c3d5dff 9559elif test $pkg_failed = untried; then
bb0a50d8
BM
9560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9561printf "%s\n" "no" >&6; }
9562 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9563printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
f665206c 9564as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9565is in your PATH or set the PKG_CONFIG environment variable to the full
9566path to pkg-config.
9567
9568Alternatively, you may set the environment variables LIBMAXMINDDB_CFLAGS
9569and LIBMAXMINDDB_LIBS to avoid the need to call pkg-config.
9570See the pkg-config man page for more details.
84527768 9571
f665206c 9572To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9573See \`config.log' for more details" "$LINENO" 5; }
9c3d5dff 9574else
9575 LIBMAXMINDDB_CFLAGS=$pkg_cv_LIBMAXMINDDB_CFLAGS
9576 LIBMAXMINDDB_LIBS=$pkg_cv_LIBMAXMINDDB_LIBS
bb0a50d8
BM
9577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9578printf "%s\n" "yes" >&6; }
9c3d5dff 9579 has_system_libmaxminddb=yes
9580fi
bb0a50d8
BM
9581 if test "x$has_system_libmaxminddb" = "xyes"
9582then :
9c3d5dff 9583
9584
9585
9586
9587
9588 GEOIP_MAXMIND_OBJECTS="geoip_maxmind.so"
9589
9590
9591fi
9592
9593fi
9594
9595
101d2dd6
BM
9596UNRLINCDIR="`pwd`/include"
9597
821a0464
BM
9598if test "$ac_cv_werror" = "yes" ; then
9599 CFLAGS="$CFLAGS -Werror"
9600fi
9601
aff3c16c 9602if test "$ac_cv_asan" = "yes" ; then
a24e53c0 9603 CFLAGS="$CFLAGS -O2 -fno-inline -fsanitize=address -fno-omit-frame-pointer -DNOCLOSEFD"
aff3c16c
BM
9604 IRCDLIBS="-fsanitize=address $IRCDLIBS"
9605fi
9606
9607
9608
821a0464 9609
101d2dd6 9610
cbfcfa14 9611ac_config_files="$ac_config_files Makefile src/Makefile src/modules/Makefile src/modules/chanmodes/Makefile src/modules/usermodes/Makefile src/modules/extbans/Makefile src/modules/rpc/Makefile src/modules/third/Makefile extras/unrealircd-upgrade-script unrealircd"
cadd4230 9612
f69335e6 9613cat >confcache <<\_ACEOF
f40ec73c 9614# This file is a shell script that caches the results of configure
9615# tests run on this system so they can be shared between configure
f69335e6 9616# scripts and configure runs, see configure's option --config-cache.
9617# It is not useful on other systems. If it contains results you don't
9618# want to keep, you may remove or edit it.
f40ec73c 9619#
f69335e6 9620# config.status only pays attention to the cache file if you give it
9621# the --recheck option to rerun configure.
f40ec73c 9622#
545d087a 9623# `ac_cv_env_foo' variables (set or unset) will be overridden when
f69335e6 9624# loading this file, other *unset* `ac_cv_foo' will be assigned the
9625# following values.
9626
9627_ACEOF
9628
f40ec73c 9629# The following way of writing the cache mishandles newlines in values,
9630# but we know of no workaround that is simple, portable, and efficient.
cadd4230 9631# So, we kill variables containing newlines.
f40ec73c 9632# Ultrix sh set writes to stderr and can't be redirected directly,
9633# and sets the high bit in the cache file unless we assign to the vars.
cadd4230
BM
9634(
9635 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
9636 eval ac_val=\$$ac_var
9637 case $ac_val in #(
9638 *${as_nl}*)
9639 case $ac_var in #(
bb0a50d8
BM
9640 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
9641printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
cadd4230
BM
9642 esac
9643 case $ac_var in #(
9644 _ | IFS | as_nl) ;; #(
94c2b583 9645 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
9646 *) { eval $ac_var=; unset $ac_var;} ;;
cadd4230
BM
9647 esac ;;
9648 esac
9649 done
9650
f69335e6 9651 (set) 2>&1 |
cadd4230
BM
9652 case $as_nl`(ac_space=' '; set) 2>&1` in #(
9653 *${as_nl}ac_space=\ *)
94c2b583 9654 # `set' does not quote correctly, so add quotes: double-quote
9655 # substitution turns \\\\ into \\, and sed turns \\ into \.
f69335e6 9656 sed -n \
545d087a
BM
9657 "s/'/'\\\\''/g;
9658 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
cadd4230 9659 ;; #(
f69335e6 9660 *)
9661 # `set' quotes correctly as required by POSIX, so do not add quotes.
cadd4230 9662 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
f69335e6 9663 ;;
cadd4230
BM
9664 esac |
9665 sort
9666) |
f69335e6 9667 sed '
cadd4230 9668 /^ac_cv_env_/b end
f69335e6 9669 t clear
cadd4230 9670 :clear
bb0a50d8 9671 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
f69335e6 9672 t end
cadd4230
BM
9673 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
9674 :end' >>confcache
9675if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
9676 if test -w "$cache_file"; then
0ff0b04a 9677 if test "x$cache_file" != "x/dev/null"; then
bb0a50d8
BM
9678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
9679printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
0ff0b04a
NPB
9680 if test ! -f "$cache_file" || test -h "$cache_file"; then
9681 cat confcache >"$cache_file"
9682 else
9683 case $cache_file in #(
9684 */* | ?:*)
9685 mv -f confcache "$cache_file"$$ &&
9686 mv -f "$cache_file"$$ "$cache_file" ;; #(
9687 *)
9688 mv -f confcache "$cache_file" ;;
9689 esac
9690 fi
9691 fi
f40ec73c 9692 else
bb0a50d8
BM
9693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
9694printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
f40ec73c 9695 fi
9696fi
9697rm -f confcache
9698
f40ec73c 9699test "x$prefix" = xNONE && prefix=$ac_default_prefix
9700# Let make expand exec_prefix.
9701test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9702
f40ec73c 9703DEFS=-DHAVE_CONFIG_H
9704
545d087a
BM
9705ac_libobjs=
9706ac_ltlibobjs=
0ff0b04a 9707U=
545d087a
BM
9708for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
9709 # 1. Remove the extension, and $U if already installed.
cadd4230 9710 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
bb0a50d8 9711 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
cadd4230
BM
9712 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
9713 # will be set to the directory where LIBOBJS objects are built.
94c2b583 9714 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
9715 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
545d087a
BM
9716done
9717LIBOBJS=$ac_libobjs
9718
9719LTLIBOBJS=$ac_ltlibobjs
9720
9721
f40ec73c 9722
0ff0b04a 9723: "${CONFIG_STATUS=./config.status}"
94c2b583 9724ac_write_fail=0
f69335e6 9725ac_clean_files_save=$ac_clean_files
9726ac_clean_files="$ac_clean_files $CONFIG_STATUS"
bb0a50d8
BM
9727{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
9728printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
94c2b583 9729as_write_fail=0
9730cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
f69335e6 9731#! $SHELL
9732# Generated by $as_me.
f40ec73c 9733# Run this file to recreate the current configuration.
f40ec73c 9734# Compiler output produced by configure, useful for debugging
f69335e6 9735# configure, is in config.log if it exists.
f40ec73c 9736
f69335e6 9737debug=false
545d087a
BM
9738ac_cs_recheck=false
9739ac_cs_silent=false
85904c22 9740
94c2b583 9741SHELL=\${CONFIG_SHELL-$SHELL}
9742export SHELL
9743_ASEOF
9744cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
9745## -------------------- ##
9746## M4sh Initialization. ##
9747## -------------------- ##
f69335e6 9748
cadd4230
BM
9749# Be more Bourne compatible
9750DUALCASE=1; export DUALCASE # for MKS sh
bb0a50d8
BM
9751as_nop=:
9752if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
9753then :
f69335e6 9754 emulate sh
9755 NULLCMD=:
94c2b583 9756 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
545d087a
BM
9757 # is contrary to our usage. Disable this feature.
9758 alias -g '${1+"$@"}'='"$@"'
cadd4230 9759 setopt NO_GLOB_SUBST
bb0a50d8 9760else $as_nop
94c2b583 9761 case `(set -o) 2>/dev/null` in #(
9762 *posix*) :
9763 set -o posix ;; #(
9764 *) :
9765 ;;
cadd4230 9766esac
cadd4230
BM
9767fi
9768
9769
bb0a50d8
BM
9770
9771# Reset variables that may have inherited troublesome values from
9772# the environment.
9773
9774# IFS needs to be set, to space, tab, and newline, in precisely that order.
9775# (If _AS_PATH_WALK were called with IFS unset, it would have the
9776# side effect of setting IFS to empty, thus disabling word splitting.)
9777# Quoting is to prevent editors from complaining about space-tab.
94c2b583 9778as_nl='
9779'
9780export as_nl
bb0a50d8
BM
9781IFS=" "" $as_nl"
9782
9783PS1='$ '
9784PS2='> '
9785PS4='+ '
9786
9787# Ensure predictable behavior from utilities with locale-dependent output.
9788LC_ALL=C
9789export LC_ALL
9790LANGUAGE=C
9791export LANGUAGE
9792
9793# We cannot yet rely on "unset" to work, but we need these variables
9794# to be unset--not just set to an empty or harmless value--now, to
9795# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
9796# also avoids known problems related to "unset" and subshell syntax
9797# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
9798for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
9799do eval test \${$as_var+y} \
9800 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
9801done
9802
9803# Ensure that fds 0, 1, and 2 are open.
9804if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
9805if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
9806if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
f69335e6 9807
94c2b583 9808# The user is always right.
bb0a50d8 9809if ${PATH_SEPARATOR+false} :; then
94c2b583 9810 PATH_SEPARATOR=:
9811 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
9812 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
9813 PATH_SEPARATOR=';'
9814 }
f69335e6 9815fi
9816
545d087a 9817
cadd4230 9818# Find who we are. Look in the path if we contain no directory separator.
0ff0b04a 9819as_myself=
94c2b583 9820case $0 in #((
cadd4230
BM
9821 *[\\/]* ) as_myself=$0 ;;
9822 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9823for as_dir in $PATH
9824do
9825 IFS=$as_save_IFS
bb0a50d8
BM
9826 case $as_dir in #(((
9827 '') as_dir=./ ;;
9828 */) ;;
9829 *) as_dir=$as_dir/ ;;
9830 esac
9831 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
94c2b583 9832 done
cadd4230
BM
9833IFS=$as_save_IFS
9834
9835 ;;
9836esac
9837# We did not find ourselves, most probably we were run as `sh COMMAND'
9838# in which case we are not to be found in the path.
9839if test "x$as_myself" = x; then
9840 as_myself=$0
9841fi
9842if test ! -f "$as_myself"; then
bb0a50d8 9843 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
94c2b583 9844 exit 1
cadd4230
BM
9845fi
9846
94c2b583 9847
9848
0ff0b04a
NPB
9849# as_fn_error STATUS ERROR [LINENO LOG_FD]
9850# ----------------------------------------
94c2b583 9851# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
9852# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
0ff0b04a 9853# script with STATUS, using 1 if that was 0.
94c2b583 9854as_fn_error ()
9855{
0ff0b04a
NPB
9856 as_status=$1; test $as_status -eq 0 && as_status=1
9857 if test "$4"; then
9858 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
bb0a50d8 9859 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
4eff1e84 9860 fi
bb0a50d8 9861 printf "%s\n" "$as_me: error: $2" >&2
94c2b583 9862 as_fn_exit $as_status
9863} # as_fn_error
9864
9865
bb0a50d8 9866
94c2b583 9867# as_fn_set_status STATUS
9868# -----------------------
9869# Set $? to STATUS, without forking.
9870as_fn_set_status ()
9871{
9872 return $1
9873} # as_fn_set_status
9874
9875# as_fn_exit STATUS
9876# -----------------
9877# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
9878as_fn_exit ()
9879{
9880 set +e
9881 as_fn_set_status $1
9882 exit $1
9883} # as_fn_exit
9884
9885# as_fn_unset VAR
9886# ---------------
9887# Portably unset VAR.
9888as_fn_unset ()
9889{
9890 { eval $1=; unset $1;}
9891}
9892as_unset=as_fn_unset
bb0a50d8 9893
94c2b583 9894# as_fn_append VAR VALUE
9895# ----------------------
9896# Append the text in VALUE to the end of the definition contained in VAR. Take
9897# advantage of any shell optimizations that allow amortized linear growth over
9898# repeated appends, instead of the typical quadratic growth present in naive
9899# implementations.
bb0a50d8
BM
9900if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
9901then :
94c2b583 9902 eval 'as_fn_append ()
9903 {
9904 eval $1+=\$2
9905 }'
bb0a50d8 9906else $as_nop
94c2b583 9907 as_fn_append ()
9908 {
9909 eval $1=\$$1\$2
9910 }
9911fi # as_fn_append
9912
9913# as_fn_arith ARG...
9914# ------------------
9915# Perform arithmetic evaluation on the ARGs, and store the result in the
9916# global $as_val. Take advantage of shells that can avoid forks. The arguments
9917# must be portable across $(()) and expr.
bb0a50d8
BM
9918if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
9919then :
94c2b583 9920 eval 'as_fn_arith ()
9921 {
9922 as_val=$(( $* ))
9923 }'
bb0a50d8 9924else $as_nop
94c2b583 9925 as_fn_arith ()
9926 {
9927 as_val=`expr "$@" || test $? -eq 1`
9928 }
9929fi # as_fn_arith
9930
4eff1e84 9931
cadd4230
BM
9932if expr a : '\(a\)' >/dev/null 2>&1 &&
9933 test "X`expr 00001 : '.*\(...\)'`" = X001; then
545d087a
BM
9934 as_expr=expr
9935else
9936 as_expr=false
9937fi
9938
cadd4230 9939if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
545d087a
BM
9940 as_basename=basename
9941else
9942 as_basename=false
9943fi
f69335e6 9944
94c2b583 9945if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
9946 as_dirname=dirname
9947else
9948 as_dirname=false
9949fi
f69335e6 9950
cadd4230 9951as_me=`$as_basename -- "$0" ||
f69335e6 9952$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
9953 X"$0" : 'X\(//\)$' \| \
cadd4230 9954 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
bb0a50d8 9955printf "%s\n" X/"$0" |
cadd4230
BM
9956 sed '/^.*\/\([^/][^/]*\)\/*$/{
9957 s//\1/
9958 q
9959 }
9960 /^X\/\(\/\/\)$/{
9961 s//\1/
9962 q
9963 }
9964 /^X\/\(\/\).*/{
9965 s//\1/
9966 q
9967 }
9968 s/.*/./; q'`
545d087a 9969
94c2b583 9970# Avoid depending upon Character Ranges.
9971as_cr_letters='abcdefghijklmnopqrstuvwxyz'
9972as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
9973as_cr_Letters=$as_cr_letters$as_cr_LETTERS
9974as_cr_digits='0123456789'
9975as_cr_alnum=$as_cr_Letters$as_cr_digits
cadd4230 9976
bb0a50d8
BM
9977
9978# Determine whether it's possible to make 'echo' print without a newline.
9979# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
9980# for compatibility with existing Makefiles.
cadd4230 9981ECHO_C= ECHO_N= ECHO_T=
94c2b583 9982case `echo -n x` in #(((((
cadd4230 9983-n*)
94c2b583 9984 case `echo 'xy\c'` in
cadd4230 9985 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
94c2b583 9986 xy) ECHO_C='\c';;
9987 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
9988 ECHO_T=' ';;
cadd4230
BM
9989 esac;;
9990*)
9991 ECHO_N='-n';;
f69335e6 9992esac
f40ec73c 9993
bb0a50d8
BM
9994# For backward compatibility with old third-party macros, we provide
9995# the shell variables $as_echo and $as_echo_n. New code should use
9996# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
9997as_echo='printf %s\n'
9998as_echo_n='printf %s'
9999
f69335e6 10000rm -f conf$$ conf$$.exe conf$$.file
cadd4230
BM
10001if test -d conf$$.dir; then
10002 rm -f conf$$.dir/conf$$.file
10003else
10004 rm -f conf$$.dir
94c2b583 10005 mkdir conf$$.dir 2>/dev/null
10006fi
10007if (echo >conf$$.file) 2>/dev/null; then
10008 if ln -s conf$$.file conf$$ 2>/dev/null; then
10009 as_ln_s='ln -s'
10010 # ... but there are two gotchas:
10011 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
10012 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
f1c5f885 10013 # In both cases, we have to default to `cp -pR'.
94c2b583 10014 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
f1c5f885 10015 as_ln_s='cp -pR'
94c2b583 10016 elif ln conf$$.file conf$$ 2>/dev/null; then
10017 as_ln_s=ln
10018 else
f1c5f885 10019 as_ln_s='cp -pR'
94c2b583 10020 fi
f69335e6 10021else
f1c5f885 10022 as_ln_s='cp -pR'
f69335e6 10023fi
cadd4230
BM
10024rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
10025rmdir conf$$.dir 2>/dev/null
f69335e6 10026
94c2b583 10027
10028# as_fn_mkdir_p
10029# -------------
10030# Create "$as_dir" as a directory, including parents if necessary.
10031as_fn_mkdir_p ()
10032{
10033
10034 case $as_dir in #(
10035 -*) as_dir=./$as_dir;;
10036 esac
10037 test -d "$as_dir" || eval $as_mkdir_p || {
10038 as_dirs=
10039 while :; do
10040 case $as_dir in #(
bb0a50d8 10041 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
94c2b583 10042 *) as_qdir=$as_dir;;
10043 esac
10044 as_dirs="'$as_qdir' $as_dirs"
10045 as_dir=`$as_dirname -- "$as_dir" ||
10046$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10047 X"$as_dir" : 'X\(//\)[^/]' \| \
10048 X"$as_dir" : 'X\(//\)$' \| \
10049 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
bb0a50d8 10050printf "%s\n" X"$as_dir" |
94c2b583 10051 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
10052 s//\1/
10053 q
10054 }
10055 /^X\(\/\/\)[^/].*/{
10056 s//\1/
10057 q
10058 }
10059 /^X\(\/\/\)$/{
10060 s//\1/
10061 q
10062 }
10063 /^X\(\/\).*/{
10064 s//\1/
10065 q
10066 }
10067 s/.*/./; q'`
10068 test -d "$as_dir" && break
10069 done
10070 test -z "$as_dirs" || eval "mkdir $as_dirs"
0ff0b04a 10071 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
94c2b583 10072
10073
10074} # as_fn_mkdir_p
545d087a 10075if mkdir -p . 2>/dev/null; then
94c2b583 10076 as_mkdir_p='mkdir -p "$as_dir"'
545d087a
BM
10077else
10078 test -d ./-p && rmdir ./-p
10079 as_mkdir_p=false
10080fi
10081
f1c5f885
BM
10082
10083# as_fn_executable_p FILE
10084# -----------------------
10085# Test if FILE is an executable regular file.
10086as_fn_executable_p ()
10087{
10088 test -f "$1" && test -x "$1"
10089} # as_fn_executable_p
10090as_test_x='test -x'
10091as_executable_p=as_fn_executable_p
f69335e6 10092
10093# Sed expression to map a string onto a valid CPP name.
545d087a 10094as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
f69335e6 10095
10096# Sed expression to map a string onto a valid variable name.
545d087a 10097as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
f69335e6 10098
10099
f69335e6 10100exec 6>&1
94c2b583 10101## ----------------------------------- ##
10102## Main body of $CONFIG_STATUS script. ##
10103## ----------------------------------- ##
10104_ASEOF
10105test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
f69335e6 10106
94c2b583 10107cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10108# Save the log message, to keep $0 and so on meaningful, and to
f69335e6 10109# report actual input values of CONFIG_FILES etc. instead of their
cadd4230
BM
10110# values after options handling.
10111ac_log="
5a17e551 10112This file was extended by unrealircd $as_me 6.1.6-git, which was
bb0a50d8 10113generated by GNU Autoconf 2.71. Invocation command line was
f69335e6 10114
10115 CONFIG_FILES = $CONFIG_FILES
10116 CONFIG_HEADERS = $CONFIG_HEADERS
10117 CONFIG_LINKS = $CONFIG_LINKS
10118 CONFIG_COMMANDS = $CONFIG_COMMANDS
10119 $ $0 $@
10120
cadd4230
BM
10121on `(hostname || uname -n) 2>/dev/null | sed 1q`
10122"
10123
f69335e6 10124_ACEOF
10125
94c2b583 10126case $ac_config_files in *"
10127"*) set x $ac_config_files; shift; ac_config_files=$*;;
10128esac
10129
10130case $ac_config_headers in *"
10131"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
10132esac
10133
10134
10135cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
f69335e6 10136# Files that config.status was made for.
cadd4230
BM
10137config_files="$ac_config_files"
10138config_headers="$ac_config_headers"
f69335e6 10139
cadd4230 10140_ACEOF
f69335e6 10141
94c2b583 10142cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
f69335e6 10143ac_cs_usage="\
94c2b583 10144\`$as_me' instantiates files and other configuration actions
10145from templates according to the current configuration. Unless the files
10146and actions are specified as TAGs, all are instantiated by default.
f69335e6 10147
94c2b583 10148Usage: $0 [OPTION]... [TAG]...
f69335e6 10149
10150 -h, --help print this help, then exit
cadd4230 10151 -V, --version print version number and configuration settings, then exit
94c2b583 10152 --config print configuration, then exit
10153 -q, --quiet, --silent
10154 do not print progress messages
f69335e6 10155 -d, --debug don't remove temporary files
10156 --recheck update $as_me by reconfiguring in the same conditions
94c2b583 10157 --file=FILE[:TEMPLATE]
10158 instantiate the configuration file FILE
10159 --header=FILE[:TEMPLATE]
10160 instantiate the configuration header FILE
f69335e6 10161
10162Configuration files:
10163$config_files
10164
10165Configuration headers:
10166$config_headers
10167
ed1f47f8
BM
10168Report bugs to <https://bugs.unrealircd.org/>.
10169unrealircd home page: <https://unrealircd.org/>."
f69335e6 10170
cadd4230 10171_ACEOF
bb0a50d8
BM
10172ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
10173ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
94c2b583 10174cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bb0a50d8 10175ac_cs_config='$ac_cs_config_escaped'
f69335e6 10176ac_cs_version="\\
5a17e551 10177unrealircd config.status 6.1.6-git
bb0a50d8 10178configured by $0, generated by GNU Autoconf 2.71,
94c2b583 10179 with options \\"\$ac_cs_config\\"
f69335e6 10180
bb0a50d8 10181Copyright (C) 2021 Free Software Foundation, Inc.
f69335e6 10182This config.status script is free software; the Free Software Foundation
10183gives unlimited permission to copy, distribute and modify it."
cadd4230
BM
10184
10185ac_pwd='$ac_pwd'
10186srcdir='$srcdir'
94c2b583 10187test -n "\$AWK" || AWK=awk
f69335e6 10188_ACEOF
10189
94c2b583 10190cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10191# The default lists apply if the user does not specify any file.
f69335e6 10192ac_need_defaults=:
10193while test $# != 0
10194do
10195 case $1 in
0ff0b04a 10196 --*=?*)
cadd4230
BM
10197 ac_option=`expr "X$1" : 'X\([^=]*\)='`
10198 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
545d087a
BM
10199 ac_shift=:
10200 ;;
0ff0b04a
NPB
10201 --*=)
10202 ac_option=`expr "X$1" : 'X\([^=]*\)='`
10203 ac_optarg=
10204 ac_shift=:
10205 ;;
cadd4230 10206 *)
545d087a
BM
10207 ac_option=$1
10208 ac_optarg=$2
10209 ac_shift=shift
f69335e6 10210 ;;
f69335e6 10211 esac
10212
545d087a 10213 case $ac_option in
f69335e6 10214 # Handling of the options.
545d087a
BM
10215 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10216 ac_cs_recheck=: ;;
cadd4230 10217 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
bb0a50d8 10218 printf "%s\n" "$ac_cs_version"; exit ;;
94c2b583 10219 --config | --confi | --conf | --con | --co | --c )
bb0a50d8 10220 printf "%s\n" "$ac_cs_config"; exit ;;
cadd4230 10221 --debug | --debu | --deb | --de | --d | -d )
f69335e6 10222 debug=: ;;
10223 --file | --fil | --fi | --f )
545d087a 10224 $ac_shift
94c2b583 10225 case $ac_optarg in
bb0a50d8 10226 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
0ff0b04a 10227 '') as_fn_error $? "missing file argument" ;;
94c2b583 10228 esac
10229 as_fn_append CONFIG_FILES " '$ac_optarg'"
f69335e6 10230 ac_need_defaults=false;;
10231 --header | --heade | --head | --hea )
545d087a 10232 $ac_shift
94c2b583 10233 case $ac_optarg in
bb0a50d8 10234 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
94c2b583 10235 esac
10236 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
f69335e6 10237 ac_need_defaults=false;;
cadd4230
BM
10238 --he | --h)
10239 # Conflict between --help and --header
0ff0b04a 10240 as_fn_error $? "ambiguous option: \`$1'
94c2b583 10241Try \`$0 --help' for more information.";;
cadd4230 10242 --help | --hel | -h )
bb0a50d8 10243 printf "%s\n" "$ac_cs_usage"; exit ;;
545d087a
BM
10244 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
10245 | -silent | --silent | --silen | --sile | --sil | --si | --s)
10246 ac_cs_silent=: ;;
f69335e6 10247
10248 # This is an error.
0ff0b04a 10249 -*) as_fn_error $? "unrecognized option: \`$1'
94c2b583 10250Try \`$0 --help' for more information." ;;
f69335e6 10251
94c2b583 10252 *) as_fn_append ac_config_targets " $1"
cadd4230 10253 ac_need_defaults=false ;;
f69335e6 10254
10255 esac
10256 shift
10257done
10258
545d087a
BM
10259ac_configure_extra_args=
10260
10261if $ac_cs_silent; then
10262 exec 6>/dev/null
10263 ac_configure_extra_args="$ac_configure_extra_args --silent"
10264fi
10265
10266_ACEOF
94c2b583 10267cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
545d087a 10268if \$ac_cs_recheck; then
f1c5f885 10269 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
94c2b583 10270 shift
bb0a50d8 10271 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
94c2b583 10272 CONFIG_SHELL='$SHELL'
cadd4230 10273 export CONFIG_SHELL
94c2b583 10274 exec "\$@"
545d087a
BM
10275fi
10276
f69335e6 10277_ACEOF
94c2b583 10278cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
cadd4230
BM
10279exec 5>>config.log
10280{
10281 echo
10282 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
10283## Running $as_me. ##
10284_ASBOX
bb0a50d8 10285 printf "%s\n" "$ac_log"
cadd4230 10286} >&5
f69335e6 10287
cadd4230 10288_ACEOF
94c2b583 10289cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
cadd4230 10290_ACEOF
f69335e6 10291
94c2b583 10292cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
cadd4230
BM
10293
10294# Handling of arguments.
f69335e6 10295for ac_config_target in $ac_config_targets
10296do
cadd4230
BM
10297 case $ac_config_target in
10298 "include/setup.h") CONFIG_HEADERS="$CONFIG_HEADERS include/setup.h" ;;
10299 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
4fd616f9 10300 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
cadd4230 10301 "src/modules/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/Makefile" ;;
101d2dd6
BM
10302 "src/modules/chanmodes/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/chanmodes/Makefile" ;;
10303 "src/modules/usermodes/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/usermodes/Makefile" ;;
de59bf47 10304 "src/modules/extbans/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/extbans/Makefile" ;;
cbfcfa14 10305 "src/modules/rpc/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/rpc/Makefile" ;;
bd21ea90 10306 "src/modules/third/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/third/Makefile" ;;
0e125abc 10307 "extras/unrealircd-upgrade-script") CONFIG_FILES="$CONFIG_FILES extras/unrealircd-upgrade-script" ;;
5e94fc9c 10308 "unrealircd") CONFIG_FILES="$CONFIG_FILES unrealircd" ;;
cadd4230 10309
0ff0b04a 10310 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
f69335e6 10311 esac
f40ec73c 10312done
f69335e6 10313
cadd4230 10314
f69335e6 10315# If the user did not use the arguments to specify the items to instantiate,
10316# then the envvar interface is used. Set only those that are not.
10317# We use the long form for the default assignment because of an extremely
10318# bizarre bug on SunOS 4.1.3.
10319if $ac_need_defaults; then
bb0a50d8
BM
10320 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
10321 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
f40ec73c 10322fi
f40ec73c 10323
545d087a 10324# Have a temporary directory for convenience. Make it in the build tree
cadd4230 10325# simply because there is no reason against having it here, and in addition,
545d087a 10326# creating and moving files from /tmp can sometimes cause problems.
cadd4230
BM
10327# Hook for its removal unless debugging.
10328# Note that there is a small window in which the directory will not be cleaned:
10329# after its creation but before its name has been assigned to `$tmp'.
f69335e6 10330$debug ||
10331{
0ff0b04a 10332 tmp= ac_tmp=
cadd4230 10333 trap 'exit_status=$?
0ff0b04a
NPB
10334 : "${ac_tmp:=$tmp}"
10335 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
cadd4230 10336' 0
94c2b583 10337 trap 'as_fn_exit 1' 1 2 13 15
f69335e6 10338}
f69335e6 10339# Create a (secure) tmp directory for tmp files.
545d087a 10340
f69335e6 10341{
cadd4230 10342 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
0ff0b04a 10343 test -d "$tmp"
f69335e6 10344} ||
10345{
cadd4230
BM
10346 tmp=./conf$$-$RANDOM
10347 (umask 077 && mkdir "$tmp")
0ff0b04a
NPB
10348} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
10349ac_tmp=$tmp
cadd4230 10350
94c2b583 10351# Set up the scripts for CONFIG_FILES section.
10352# No need to generate them if there are no CONFIG_FILES.
10353# This happens for instance with `./config.status config.h'.
85904c22 10354if test -n "$CONFIG_FILES"; then
c0790e90 10355
cadd4230 10356
94c2b583 10357ac_cr=`echo X | tr X '\015'`
10358# On cygwin, bash can eat \r inside `` if the user requested igncr.
10359# But we know of no other shell where ac_cr would be empty at this
10360# point, so we can use a bashism as a fallback.
10361if test "x$ac_cr" = x; then
10362 eval ac_cr=\$\'\\r\'
10363fi
10364ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
10365if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
0ff0b04a 10366 ac_cs_awk_cr='\\r'
94c2b583 10367else
10368 ac_cs_awk_cr=$ac_cr
10369fi
10370
0ff0b04a 10371echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
94c2b583 10372_ACEOF
cadd4230 10373
85904c22 10374
94c2b583 10375{
10376 echo "cat >conf$$subs.awk <<_ACEOF" &&
10377 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
10378 echo "_ACEOF"
10379} >conf$$subs.sh ||
0ff0b04a
NPB
10380 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
10381ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
cadd4230
BM
10382ac_delim='%!_!# '
10383for ac_last_try in false false false false false :; do
94c2b583 10384 . ./conf$$subs.sh ||
0ff0b04a 10385 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
94c2b583 10386
10387 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
10388 if test $ac_delim_n = $ac_delim_num; then
cadd4230
BM
10389 break
10390 elif $ac_last_try; then
0ff0b04a 10391 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
cadd4230
BM
10392 else
10393 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
f69335e6 10394 fi
cadd4230 10395done
94c2b583 10396rm -f conf$$subs.sh
10397
10398cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
0ff0b04a 10399cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
94c2b583 10400_ACEOF
10401sed -n '
10402h
10403s/^/S["/; s/!.*/"]=/
10404p
10405g
10406s/^[^!]*!//
10407:repl
10408t repl
10409s/'"$ac_delim"'$//
10410t delim
10411:nl
10412h
10413s/\(.\{148\}\)..*/\1/
10414t more1
10415s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
10416p
10417n
10418b repl
10419:more1
10420s/["\\]/\\&/g; s/^/"/; s/$/"\\/
10421p
10422g
10423s/.\{148\}//
10424t nl
10425:delim
10426h
10427s/\(.\{148\}\)..*/\1/
10428t more2
10429s/["\\]/\\&/g; s/^/"/; s/$/"/
10430p
10431b
10432:more2
10433s/["\\]/\\&/g; s/^/"/; s/$/"\\/
10434p
10435g
10436s/.\{148\}//
10437t delim
10438' <conf$$subs.awk | sed '
10439/^[^""]/{
10440 N
10441 s/\n//
10442}
10443' >>$CONFIG_STATUS || ac_write_fail=1
10444rm -f conf$$subs.awk
10445cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10446_ACAWK
0ff0b04a 10447cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
94c2b583 10448 for (key in S) S_is_set[key] = 1
10449 FS = "\a"
f40ec73c 10450
94c2b583 10451}
10452{
10453 line = $ 0
10454 nfields = split(line, field, "@")
10455 substed = 0
10456 len = length(field[1])
10457 for (i = 2; i < nfields; i++) {
10458 key = field[i]
10459 keylen = length(key)
10460 if (S_is_set[key]) {
10461 value = S[key]
10462 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
10463 len += length(value) + length(field[++i])
10464 substed = 1
10465 } else
10466 len += 1 + keylen
10467 }
c0790e90 10468
94c2b583 10469 print line
10470}
10471
10472_ACAWK
cadd4230 10473_ACEOF
94c2b583 10474cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10475if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
10476 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
10477else
10478 cat
0ff0b04a
NPB
10479fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
10480 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
f69335e6 10481_ACEOF
cadd4230 10482
0ff0b04a
NPB
10483# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
10484# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
cadd4230
BM
10485# trailing colons and then remove the whole line if VPATH becomes empty
10486# (actually we leave an empty line to preserve line numbers).
10487if test "x$srcdir" = x.; then
0ff0b04a
NPB
10488 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
10489h
10490s///
10491s/^/:/
10492s/[ ]*$/:/
10493s/:\$(srcdir):/:/g
10494s/:\${srcdir}:/:/g
10495s/:@srcdir@:/:/g
10496s/^:*//
cadd4230 10497s/:*$//
0ff0b04a
NPB
10498x
10499s/\(=[ ]*\).*/\1/
10500G
10501s/\n//
cadd4230
BM
10502s/^[^=]*=[ ]*$//
10503}'
10504fi
10505
94c2b583 10506cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
cadd4230
BM
10507fi # test -n "$CONFIG_FILES"
10508
94c2b583 10509# Set up the scripts for CONFIG_HEADERS section.
10510# No need to generate them if there are no CONFIG_HEADERS.
10511# This happens for instance with `./config.status Makefile'.
10512if test -n "$CONFIG_HEADERS"; then
0ff0b04a 10513cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
94c2b583 10514BEGIN {
10515_ACEOF
10516
10517# Transform confdefs.h into an awk script `defines.awk', embedded as
10518# here-document in config.status, that substitutes the proper values into
10519# config.h.in to produce config.h.
10520
10521# Create a delimiter string that does not exist in confdefs.h, to ease
10522# handling of long lines.
10523ac_delim='%!_!# '
10524for ac_last_try in false false :; do
0ff0b04a
NPB
10525 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
10526 if test -z "$ac_tt"; then
94c2b583 10527 break
10528 elif $ac_last_try; then
0ff0b04a 10529 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
94c2b583 10530 else
10531 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
10532 fi
10533done
10534
10535# For the awk script, D is an array of macro values keyed by name,
10536# likewise P contains macro parameters if any. Preserve backslash
10537# newline sequences.
10538
10539ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
10540sed -n '
10541s/.\{148\}/&'"$ac_delim"'/g
10542t rset
10543:rset
10544s/^[ ]*#[ ]*define[ ][ ]*/ /
10545t def
10546d
10547:def
10548s/\\$//
10549t bsnl
10550s/["\\]/\\&/g
10551s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
10552D["\1"]=" \3"/p
10553s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
10554d
10555:bsnl
10556s/["\\]/\\&/g
10557s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
10558D["\1"]=" \3\\\\\\n"\\/p
10559t cont
10560s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
10561t cont
10562d
10563:cont
10564n
10565s/.\{148\}/&'"$ac_delim"'/g
10566t clear
10567:clear
10568s/\\$//
10569t bsnlc
10570s/["\\]/\\&/g; s/^/"/; s/$/"/p
10571d
10572:bsnlc
10573s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
10574b cont
10575' <confdefs.h | sed '
10576s/'"$ac_delim"'/"\\\
10577"/g' >>$CONFIG_STATUS || ac_write_fail=1
10578
10579cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10580 for (key in D) D_is_set[key] = 1
10581 FS = "\a"
10582}
10583/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
10584 line = \$ 0
10585 split(line, arg, " ")
10586 if (arg[1] == "#") {
10587 defundef = arg[2]
10588 mac1 = arg[3]
10589 } else {
10590 defundef = substr(arg[1], 2)
10591 mac1 = arg[2]
10592 }
10593 split(mac1, mac2, "(") #)
10594 macro = mac2[1]
10595 prefix = substr(line, 1, index(line, defundef) - 1)
10596 if (D_is_set[macro]) {
10597 # Preserve the white space surrounding the "#".
10598 print prefix "define", macro P[macro] D[macro]
10599 next
10600 } else {
10601 # Replace #undef with comments. This is necessary, for example,
10602 # in the case of _POSIX_SOURCE, which is predefined and required
10603 # on some systems where configure will not decide to define it.
10604 if (defundef == "undef") {
10605 print "/*", prefix defundef, macro, "*/"
10606 next
10607 }
10608 }
10609}
10610{ print }
10611_ACAWK
10612_ACEOF
10613cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
0ff0b04a 10614 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
94c2b583 10615fi # test -n "$CONFIG_HEADERS"
10616
cadd4230 10617
94c2b583 10618eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
10619shift
10620for ac_tag
cadd4230
BM
10621do
10622 case $ac_tag in
10623 :[FHLC]) ac_mode=$ac_tag; continue;;
10624 esac
10625 case $ac_mode$ac_tag in
10626 :[FHL]*:*);;
0ff0b04a 10627 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
cadd4230
BM
10628 :[FH]-) ac_tag=-:-;;
10629 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
f69335e6 10630 esac
cadd4230
BM
10631 ac_save_IFS=$IFS
10632 IFS=:
10633 set x $ac_tag
10634 IFS=$ac_save_IFS
10635 shift
10636 ac_file=$1
10637 shift
f69335e6 10638
cadd4230
BM
10639 case $ac_mode in
10640 :L) ac_source=$1;;
10641 :[FH])
10642 ac_file_inputs=
10643 for ac_f
10644 do
10645 case $ac_f in
0ff0b04a 10646 -) ac_f="$ac_tmp/stdin";;
cadd4230
BM
10647 *) # Look for the file first in the build tree, then in the source tree
10648 # (if the path is not absolute). The absolute path cannot be DOS-style,
10649 # because $ac_f cannot contain `:'.
10650 test -f "$ac_f" ||
10651 case $ac_f in
10652 [\\/$]*) false;;
10653 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
10654 esac ||
0ff0b04a 10655 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
cadd4230 10656 esac
bb0a50d8 10657 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
94c2b583 10658 as_fn_append ac_file_inputs " '$ac_f'"
cadd4230
BM
10659 done
10660
10661 # Let's still pretend it is `configure' which instantiates (i.e., don't
10662 # use $as_me), people would be surprised to read:
10663 # /* config.h. Generated by config.status. */
94c2b583 10664 configure_input='Generated from '`
bb0a50d8 10665 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
94c2b583 10666 `' by configure.'
cadd4230
BM
10667 if test x"$ac_file" != x-; then
10668 configure_input="$ac_file. $configure_input"
bb0a50d8
BM
10669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
10670printf "%s\n" "$as_me: creating $ac_file" >&6;}
cadd4230 10671 fi
94c2b583 10672 # Neutralize special characters interpreted by sed in replacement strings.
10673 case $configure_input in #(
10674 *\&* | *\|* | *\\* )
bb0a50d8 10675 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
94c2b583 10676 sed 's/[\\\\&|]/\\\\&/g'`;; #(
10677 *) ac_sed_conf_input=$configure_input;;
10678 esac
cadd4230
BM
10679
10680 case $ac_tag in
0ff0b04a
NPB
10681 *:-:* | *:-) cat >"$ac_tmp/stdin" \
10682 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
cadd4230
BM
10683 esac
10684 ;;
10685 esac
10686
10687 ac_dir=`$as_dirname -- "$ac_file" ||
f69335e6 10688$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
545d087a
BM
10689 X"$ac_file" : 'X\(//\)[^/]' \| \
10690 X"$ac_file" : 'X\(//\)$' \| \
cadd4230 10691 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
bb0a50d8 10692printf "%s\n" X"$ac_file" |
cadd4230
BM
10693 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
10694 s//\1/
10695 q
10696 }
10697 /^X\(\/\/\)[^/].*/{
10698 s//\1/
10699 q
10700 }
10701 /^X\(\/\/\)$/{
10702 s//\1/
10703 q
10704 }
10705 /^X\(\/\).*/{
10706 s//\1/
10707 q
10708 }
10709 s/.*/./; q'`
94c2b583 10710 as_dir="$ac_dir"; as_fn_mkdir_p
f69335e6 10711 ac_builddir=.
f40ec73c 10712
cadd4230
BM
10713case "$ac_dir" in
10714.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
10715*)
bb0a50d8 10716 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
cadd4230 10717 # A ".." for each directory in $ac_dir_suffix.
bb0a50d8 10718 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
cadd4230
BM
10719 case $ac_top_builddir_sub in
10720 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
10721 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
10722 esac ;;
10723esac
10724ac_abs_top_builddir=$ac_pwd
10725ac_abs_builddir=$ac_pwd$ac_dir_suffix
10726# for backward compatibility:
10727ac_top_builddir=$ac_top_build_prefix
f40ec73c 10728
f69335e6 10729case $srcdir in
cadd4230 10730 .) # We are building in place.
f69335e6 10731 ac_srcdir=.
cadd4230
BM
10732 ac_top_srcdir=$ac_top_builddir_sub
10733 ac_abs_top_srcdir=$ac_pwd ;;
10734 [\\/]* | ?:[\\/]* ) # Absolute name.
f69335e6 10735 ac_srcdir=$srcdir$ac_dir_suffix;
cadd4230
BM
10736 ac_top_srcdir=$srcdir
10737 ac_abs_top_srcdir=$srcdir ;;
10738 *) # Relative name.
10739 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
10740 ac_top_srcdir=$ac_top_build_prefix$srcdir
10741 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
545d087a 10742esac
cadd4230 10743ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
f40ec73c 10744
10745
cadd4230
BM
10746 case $ac_mode in
10747 :F)
10748 #
10749 # CONFIG_FILE
10750 #
f40ec73c 10751
cadd4230 10752_ACEOF
545d087a 10753
94c2b583 10754cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
cadd4230
BM
10755# If the template does not know about datarootdir, expand it.
10756# FIXME: This hack should be removed a few years after 2.60.
10757ac_datarootdir_hack=; ac_datarootdir_seen=
94c2b583 10758ac_sed_dataroot='
10759/datarootdir/ {
cadd4230
BM
10760 p
10761 q
10762}
10763/@datadir@/p
10764/@docdir@/p
10765/@infodir@/p
10766/@localedir@/p
94c2b583 10767/@mandir@/p'
10768case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
cadd4230
BM
10769*datarootdir*) ac_datarootdir_seen=yes;;
10770*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
bb0a50d8
BM
10771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
10772printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
f69335e6 10773_ACEOF
94c2b583 10774cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
cadd4230
BM
10775 ac_datarootdir_hack='
10776 s&@datadir@&$datadir&g
10777 s&@docdir@&$docdir&g
10778 s&@infodir@&$infodir&g
10779 s&@localedir@&$localedir&g
10780 s&@mandir@&$mandir&g
94c2b583 10781 s&\\\${datarootdir}&$datarootdir&g' ;;
cadd4230
BM
10782esac
10783_ACEOF
10784
10785# Neutralize VPATH when `$srcdir' = `.'.
10786# Shell code in configure.ac might set extrasub.
10787# FIXME: do we really want to maintain this feature?
94c2b583 10788cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10789ac_sed_extra="$ac_vpsub
f69335e6 10790$extrasub
10791_ACEOF
94c2b583 10792cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
f69335e6 10793:t
10794/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
94c2b583 10795s|@configure_input@|$ac_sed_conf_input|;t t
cadd4230 10796s&@top_builddir@&$ac_top_builddir_sub&;t t
94c2b583 10797s&@top_build_prefix@&$ac_top_build_prefix&;t t
cadd4230
BM
10798s&@srcdir@&$ac_srcdir&;t t
10799s&@abs_srcdir@&$ac_abs_srcdir&;t t
10800s&@top_srcdir@&$ac_top_srcdir&;t t
10801s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
10802s&@builddir@&$ac_builddir&;t t
10803s&@abs_builddir@&$ac_abs_builddir&;t t
10804s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
10805$ac_datarootdir_hack
94c2b583 10806"
0ff0b04a
NPB
10807eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
10808 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
cadd4230
BM
10809
10810test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
0ff0b04a
NPB
10811 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
10812 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
10813 "$ac_tmp/out"`; test -z "$ac_out"; } &&
bb0a50d8 10814 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
0ff0b04a 10815which seems to be undefined. Please make sure it is defined" >&5
bb0a50d8 10816printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
0ff0b04a 10817which seems to be undefined. Please make sure it is defined" >&2;}
cadd4230 10818
0ff0b04a 10819 rm -f "$ac_tmp/stdin"
f69335e6 10820 case $ac_file in
0ff0b04a
NPB
10821 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
10822 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
94c2b583 10823 esac \
0ff0b04a 10824 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
cadd4230
BM
10825 ;;
10826 :H)
10827 #
10828 # CONFIG_HEADER
10829 #
f69335e6 10830 if test x"$ac_file" != x-; then
94c2b583 10831 {
bb0a50d8 10832 printf "%s\n" "/* $configure_input */" >&1 \
0ff0b04a
NPB
10833 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
10834 } >"$ac_tmp/config.h" \
10835 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10836 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
bb0a50d8
BM
10837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
10838printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
f69335e6 10839 else
94c2b583 10840 rm -f "$ac_file"
0ff0b04a
NPB
10841 mv "$ac_tmp/config.h" "$ac_file" \
10842 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
f69335e6 10843 fi
10844 else
bb0a50d8 10845 printf "%s\n" "/* $configure_input */" >&1 \
0ff0b04a
NPB
10846 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
10847 || as_fn_error $? "could not create -" "$LINENO" 5
f69335e6 10848 fi
cadd4230
BM
10849 ;;
10850
10851
10852 esac
10853
10854done # for ac_tag
f40ec73c 10855
f40ec73c 10856
94c2b583 10857as_fn_exit 0
f69335e6 10858_ACEOF
f69335e6 10859ac_clean_files=$ac_clean_files_save
10860
94c2b583 10861test $ac_write_fail = 0 ||
0ff0b04a 10862 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
94c2b583 10863
f69335e6 10864
10865# configure is writing to config.log, and then calls config.status.
10866# config.status does its own redirection, appending to config.log.
10867# Unfortunately, on DOS this fails, as config.log is still kept open
10868# by configure, so config.status won't be able to write to it; its
10869# output is simply discarded. So we exec the FD to /dev/null,
10870# effectively closing config.log, so it can be properly (re)opened and
10871# appended to by config.status. When coming back to configure, we
10872# need to make the FD available again.
10873if test "$no_create" != yes; then
10874 ac_cs_success=:
545d087a
BM
10875 ac_config_status_args=
10876 test "$silent" = yes &&
10877 ac_config_status_args="$ac_config_status_args --quiet"
f69335e6 10878 exec 5>/dev/null
545d087a 10879 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
f69335e6 10880 exec 5>>config.log
10881 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
10882 # would make configure fail if this is the last instruction.
0ff0b04a 10883 $ac_cs_success || as_fn_exit 1
94c2b583 10884fi
10885if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
bb0a50d8
BM
10886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
10887printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
f69335e6 10888fi
f40ec73c 10889
5e94fc9c 10890chmod 0700 unrealircd
bb0a50d8 10891