]> jfr.im git - irc/atheme/atheme.git/blame - configure
refactor out hostmask formatting
[irc/atheme/atheme.git] / configure
CommitLineData
85f61964
WP
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
7d09d888 3# Generated by GNU Autoconf 2.69 for Atheme IRC Services 7.3.0-rc2.
85f61964 4#
2e1b6c9b 5# Report bugs to <https://github.com/atheme/atheme/issues/>.
85f61964 6#
fe2e2f74 7#
d24e2420 8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
fe2e2f74 9#
648c9700 10#
85f61964
WP
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
648c9700
WP
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
85f61964
WP
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
648c9700 19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
85f61964
WP
20 emulate sh
21 NULLCMD=:
07c7b319 22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
85f61964
WP
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
25 setopt NO_GLOB_SUBST
26else
648c9700
WP
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
85f61964 32esac
85f61964
WP
33fi
34
35
07c7b319
JT
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
648c9700
WP
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
07c7b319
JT
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
85f61964 56 else
07c7b319
JT
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
648c9700 60 case $arg in #(
07c7b319
JT
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
85f61964 69 fi
07c7b319
JT
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
85f61964
WP
81fi
82
85f61964
WP
83
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
85f61964
WP
89IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
0ab5d73e 92as_myself=
648c9700 93case $0 in #((
85f61964
WP
94 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
648c9700
WP
100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
85f61964
WP
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
07c7b319 112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
648c9700 113 exit 1
85f61964
WP
114fi
115
648c9700
WP
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
85f61964
WP
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
07c7b319
JT
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
85f61964 133
648c9700
WP
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
d24e2420
WP
137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
648c9700
WP
162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
d24e2420
WP
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
648c9700
WP
197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
d24e2420
WP
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'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
648c9700
WP
260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
257eca51
JK
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: https://github.com/atheme/atheme/issues/ about your
271$0: system, including any error possibly output before this
272$0: message. Then install a modern shell, or manually run
273$0: the script under such a shell if you do have one."
648c9700
WP
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
0ab5d73e 358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
648c9700
WP
359
360
361} # as_fn_mkdir_p
d24e2420
WP
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
648c9700
WP
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
0ab5d73e
JH
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
648c9700
WP
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
0ab5d73e 410# script with STATUS, using 1 if that was 0.
648c9700
WP
411as_fn_error ()
412{
0ab5d73e
JH
413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
648c9700 417 fi
0ab5d73e 418 $as_echo "$as_me: error: $2" >&2
648c9700
WP
419 as_fn_exit $as_status
420} # as_fn_error
421
85f61964
WP
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
648c9700
WP
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
85f61964 440
85f61964
WP
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
07c7b319 445$as_echo X/"$0" |
85f61964
WP
446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
648c9700
WP
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
85f61964
WP
466
467
648c9700
WP
468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
477 sed '
478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
482 N
483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485 t loop
486 s/-\n.*//
487 ' >$as_me.lineno &&
488 chmod +x "$as_me.lineno" ||
489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
85f61964 490
d24e2420
WP
491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
648c9700
WP
495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
499 # Exit status is that of the last command.
500 exit
85f61964
WP
501}
502
648c9700
WP
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506 case `echo 'xy\c'` in
507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
511 esac;;
512*)
513 ECHO_N='-n';;
514esac
85f61964 515
648c9700
WP
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
85f61964 519else
648c9700
WP
520 rm -f conf$$.dir
521 mkdir conf$$.dir 2>/dev/null
85f61964 522fi
648c9700
WP
523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d24e2420 529 # In both cases, we have to default to `cp -pR'.
648c9700 530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d24e2420 531 as_ln_s='cp -pR'
648c9700
WP
532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
d24e2420 535 as_ln_s='cp -pR'
648c9700
WP
536 fi
537else
d24e2420 538 as_ln_s='cp -pR'
85f61964 539fi
648c9700
WP
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
85f61964 542
648c9700
WP
543if mkdir -p . 2>/dev/null; then
544 as_mkdir_p='mkdir -p "$as_dir"'
85f61964 545else
648c9700
WP
546 test -d ./-p && rmdir ./-p
547 as_mkdir_p=false
85f61964
WP
548fi
549
d24e2420
WP
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
85f61964 552
648c9700
WP
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
85f61964 555
648c9700
WP
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
85f61964 558
85f61964 559
fe2e2f74
WP
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
85f61964
WP
562
563# Name of the host.
0ab5d73e 564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
85f61964
WP
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
85f61964
WP
579
580# Identity of this package.
109cf8f3 581PACKAGE_NAME='Atheme IRC Services'
85f61964 582PACKAGE_TARNAME='atheme'
7d09d888
AJ
583PACKAGE_VERSION='7.3.0-rc2'
584PACKAGE_STRING='Atheme IRC Services 7.3.0-rc2'
2e1b6c9b 585PACKAGE_BUGREPORT='https://github.com/atheme/atheme/issues/'
109cf8f3 586PACKAGE_URL='https://atheme.github.io/'
85f61964 587
c7493385 588ac_unique_file="src/services/main.c"
85f61964 589ac_default_prefix=~/atheme
07c7b319
JT
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
593#ifdef HAVE_SYS_TYPES_H
594# include <sys/types.h>
595#endif
596#ifdef HAVE_SYS_STAT_H
597# include <sys/stat.h>
598#endif
599#ifdef STDC_HEADERS
600# include <stdlib.h>
601# include <stddef.h>
602#else
603# ifdef HAVE_STDLIB_H
604# include <stdlib.h>
605# endif
606#endif
607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
609# include <memory.h>
610# endif
611# include <string.h>
612#endif
613#ifdef HAVE_STRINGS_H
614# include <strings.h>
615#endif
616#ifdef HAVE_INTTYPES_H
617# include <inttypes.h>
618#endif
619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
623# include <unistd.h>
624#endif"
625
c2d29773 626gt_needs=
07c7b319 627enable_option_checking=no
2cbf22d6
AJ
628ac_subst_vars='subdirs_extra
629LTLIBOBJS
1639518a 630LIBOBJS
c6167e86
AJ
631SUBMODULE_CONTRIB
632SUBMODULE_LIBMOWGLI
3828bfac
AJ
633USE_NLS
634PODIR_COND_D
635POSUB
636LTLIBINTL
637LIBINTL
638INTLLIBS
639LTLIBICONV
640LIBICONV
641INTL_MACOSX_LIBS
642XGETTEXT_EXTRA_OPTIONS
643MSGMERGE
644XGETTEXT_015
645XGETTEXT
646GMSGFMT_015
647MSGFMT_015
648GMSGFMT
649MSGFMT
650GETTEXT_MACRO_VERSION
a910d094 651LEGACY_PWCRYPTO_COND_D
105203ad 652SHAREDIR
a19ae377 653RUNDIR
105203ad 654MODDIR
a19ae377
AJ
655LOGDIR
656LOCALEDIR
105203ad 657DOCDIR
a19ae377 658DATADIR
a57c74d8
AJ
659ECDSA_NIST256P_TOOLS_COND_D
660ECDH_X25519_TOOL_COND_D
21f35da3
AJ
661CLOCK_GETTIME_LIBS
662CRYPTO_BENCHMARK_COND_D
ab799702
AJ
663LIBPERL_LIBS
664LIBPERL_CFLAGS
992e3c4d 665PERL_COND_D
8649c8cd 666perlpath
c9f0e170 667LIBSODIUM_LIBS
073ad2a0 668LIBSODIUM_CFLAGS
992e3c4d 669QRCODE_COND_C
aed66765
AJ
670LIBQRENCODE_LIBS
671LIBQRENCODE_CFLAGS
8c8b81e1
AJ
672LIBPCRE_LIBS
673LIBPCRE_CFLAGS
583552e5 674LIBPASSWDQC_LIBS
8f1afa5d 675LIBPASSWDQC_CFLAGS
752694a2 676LIBNETTLE_LIBS
8a2ebdd4 677LIBNETTLE_CFLAGS
c6167e86
AJ
678LIBMOWGLI_LIBS
679LIBMOWGLI_CFLAGS
752694a2 680LIBMBEDCRYPTO_LIBS
8f1afa5d 681LIBMBEDCRYPTO_CFLAGS
544572f1
AJ
682LIBLDAP_LIBS
683LIBLDAP_CFLAGS
62f7ded0 684LIBIDN_LIBS
e63c6763 685LIBIDN_CFLAGS
fbced731
AJ
686LIBGCRYPT_LIBS
687LIBGCRYPT_CFLAGS
ad5cc67e
AJ
688LIBCRYPTO_LIBS
689LIBCRYPTO_CFLAGS
3ef71120 690LIBCRYPT_LIBS
8f1afa5d 691LIBCRYPT_CFLAGS
ad5cc67e 692LIBCRACK_LIBS
8f1afa5d 693LIBCRACK_CFLAGS
5fa0bd86
AJ
694LIBARGON2_LIBS
695LIBARGON2_CFLAGS
c2d29773
AJ
696LIBSOCKET_LIBS
697LIBMATH_LIBS
698LIBDL_LIBS
ddf1c059
AJ
699PACKAGE_BUGREPORT_I18N
700VENDOR_STRING
701VERSION
702PACKAGE
472c7f87
WP
703PROG_IMPLIB_LDFLAGS
704PROG_IMPLIB_NEEDED
705CLEAN_LIB
706UNINSTALL_LIB
707INSTALL_LIB
708PLUGIN_SUFFIX
709PLUGIN_LDFLAGS
710PLUGIN_CFLAGS
711LDFLAGS_RPATH
712LIB_SUFFIX
713LIB_PREFIX
714LIB_LDFLAGS
715LIB_CFLAGS
7680beb8
WP
716host_os
717host_vendor
718host_cpu
719host
720build_os
721build_vendor
722build_cpu
723build
472c7f87
WP
724TERM_SETAF6
725TERM_SETAF4
726TERM_SETAF3
727TERM_SETAF2
728TERM_SETAF1
729TERM_BOLD
730TERM_SGR0
731TERM_EL
732TPUT
6440ab19
AJ
733EGREP
734GREP
735CPP
c2d29773
AJ
736PKG_CONFIG_LIBDIR
737PKG_CONFIG_PATH
738PKG_CONFIG
739TAR
740SED
741RM
742RANLIB
743MV
744MKDIR_P
745SET_MAKE
746LN_S
747LN
748INSTALL_DATA
749INSTALL_SCRIPT
750INSTALL_PROGRAM
c2d29773 751CP
c2d29773
AJ
752AR
753OBJEXT
754EXEEXT
755ac_ct_CC
756CPPFLAGS
757LDFLAGS
758CFLAGS
759CC
105203ad
WP
760target_alias
761host_alias
762build_alias
763LIBS
764ECHO_T
765ECHO_N
766ECHO_C
767DEFS
768mandir
769localedir
770libdir
771psdir
772pdfdir
773dvidir
774htmldir
775infodir
776docdir
777oldincludedir
778includedir
5bffd88d 779runstatedir
105203ad
WP
780localstatedir
781sharedstatedir
782sysconfdir
783datadir
784datarootdir
785libexecdir
786sbindir
787bindir
788program_transform_name
789prefix
790exec_prefix
648c9700 791PACKAGE_URL
105203ad
WP
792PACKAGE_BUGREPORT
793PACKAGE_STRING
794PACKAGE_VERSION
795PACKAGE_TARNAME
796PACKAGE_NAME
797PATH_SEPARATOR
798SHELL'
85f61964 799ac_subst_files=''
07c7b319
JT
800ac_user_opts='
801enable_option_checking
2b4c160e 802with_argon2
ca15c587 803with_cracklib
3ef71120 804with_crypt
ad5cc67e 805with_openssl
fbced731 806with_gcrypt
2b4c160e 807with_idn
f8608dac 808with_ldap
752694a2 809with_mbedtls
c6167e86 810with_libmowgli
752694a2 811with_nettle
583552e5 812with_passwdqc
752694a2 813with_pcre
752694a2 814with_qrencode
c9f0e170 815with_sodium
aed66765 816with_perl
f3ddda9b
AJ
817with_digest_api_frontend
818with_rng_api_frontend
a19ae377 819enable_contrib
21f35da3 820enable_crypto_benchmarking
a57c74d8
AJ
821enable_ecdh_x25519_tool
822enable_ecdsa_nist256p_tools
07c7b319 823enable_fhs_paths
fe1e7dec 824enable_heap_allocator
07c7b319 825enable_large_net
554602d0 826enable_legacy_pwcrypto
a19ae377 827enable_reproducible_builds
3f9992da 828enable_compiler_sanitizers
5d77e6b8 829enable_fortify_source
5d77e6b8 830enable_async_unwind_tables
90121a3e 831enable_debugging_symbols
5c498012 832enable_stack_clash_protection
19617271 833enable_stack_protector
0133cdd9
AJ
834enable_profile
835enable_relro
836enable_nonlazy_bind
837enable_linker_defs
6440ab19 838enable_noexecstack
0133cdd9 839enable_as_needed
3828bfac
AJ
840enable_rpath
841enable_nls
842with_gnu_ld
843with_libiconv_prefix
844with_libintl_prefix
5d77e6b8 845enable_warnings
07c7b319 846'
85f61964
WP
847 ac_precious_vars='build_alias
848host_alias
849target_alias
850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
083f09b4 855PKG_CONFIG
48d2e9d0
AJ
856PKG_CONFIG_PATH
857PKG_CONFIG_LIBDIR
6440ab19 858CPP
5fa0bd86
AJ
859LIBARGON2_CFLAGS
860LIBARGON2_LIBS
ad5cc67e
AJ
861LIBCRYPTO_CFLAGS
862LIBCRYPTO_LIBS
e63c6763
AJ
863LIBIDN_CFLAGS
864LIBIDN_LIBS
c6167e86
AJ
865LIBMOWGLI_CFLAGS
866LIBMOWGLI_LIBS
8a2ebdd4
AJ
867LIBNETTLE_CFLAGS
868LIBNETTLE_LIBS
8c8b81e1
AJ
869LIBPCRE_CFLAGS
870LIBPCRE_LIBS
f7c1979e 871LIBQRENCODE_CFLAGS
752694a2 872LIBQRENCODE_LIBS
073ad2a0 873LIBSODIUM_CFLAGS
c6167e86 874LIBSODIUM_LIBS'
2cbf22d6 875
85f61964
WP
876
877# Initialize some variables set by options.
878ac_init_help=
879ac_init_version=false
07c7b319
JT
880ac_unrecognized_opts=
881ac_unrecognized_sep=
85f61964
WP
882# The variables have the same names as the options, with
883# dashes changed to underlines.
884cache_file=/dev/null
885exec_prefix=NONE
886no_create=
887no_recursion=
888prefix=NONE
889program_prefix=NONE
890program_suffix=NONE
891program_transform_name=s,x,x,
892silent=
893site=
894srcdir=
895verbose=
896x_includes=NONE
897x_libraries=NONE
898
899# Installation directory options.
900# These are left unexpanded so users can "make install exec_prefix=/foo"
901# and all the variables that are supposed to be based on exec_prefix
902# by default will actually change.
903# Use braces instead of parens because sh, perl, etc. also accept them.
904# (The list follows the same order as the GNU Coding Standards.)
905bindir='${exec_prefix}/bin'
906sbindir='${exec_prefix}/sbin'
907libexecdir='${exec_prefix}/libexec'
908datarootdir='${prefix}/share'
909datadir='${datarootdir}'
910sysconfdir='${prefix}/etc'
911sharedstatedir='${prefix}/com'
912localstatedir='${prefix}/var'
5bffd88d 913runstatedir='${localstatedir}/run'
85f61964
WP
914includedir='${prefix}/include'
915oldincludedir='/usr/include'
916docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
917infodir='${datarootdir}/info'
918htmldir='${docdir}'
919dvidir='${docdir}'
920pdfdir='${docdir}'
921psdir='${docdir}'
922libdir='${exec_prefix}/lib'
923localedir='${datarootdir}/locale'
924mandir='${datarootdir}/man'
925
926ac_prev=
927ac_dashdash=
928for ac_option
929do
930 # If the previous option needs an argument, assign it.
931 if test -n "$ac_prev"; then
932 eval $ac_prev=\$ac_option
933 ac_prev=
934 continue
935 fi
936
937 case $ac_option in
0ab5d73e
JH
938 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
939 *=) ac_optarg= ;;
940 *) ac_optarg=yes ;;
85f61964
WP
941 esac
942
943 # Accept the important Cygnus configure options, so we can diagnose typos.
944
945 case $ac_dashdash$ac_option in
946 --)
947 ac_dashdash=yes ;;
948
949 -bindir | --bindir | --bindi | --bind | --bin | --bi)
950 ac_prev=bindir ;;
951 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
952 bindir=$ac_optarg ;;
953
954 -build | --build | --buil | --bui | --bu)
955 ac_prev=build_alias ;;
956 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
957 build_alias=$ac_optarg ;;
958
959 -cache-file | --cache-file | --cache-fil | --cache-fi \
960 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
961 ac_prev=cache_file ;;
962 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
963 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
964 cache_file=$ac_optarg ;;
965
966 --config-cache | -C)
967 cache_file=config.cache ;;
968
969 -datadir | --datadir | --datadi | --datad)
970 ac_prev=datadir ;;
971 -datadir=* | --datadir=* | --datadi=* | --datad=*)
972 datadir=$ac_optarg ;;
973
974 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
975 | --dataroo | --dataro | --datar)
976 ac_prev=datarootdir ;;
977 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
978 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
979 datarootdir=$ac_optarg ;;
980
981 -disable-* | --disable-*)
07c7b319 982 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
85f61964 983 # Reject names that are not valid shell variable names.
07c7b319 984 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
0ab5d73e 985 as_fn_error $? "invalid feature name: $ac_useropt"
07c7b319
JT
986 ac_useropt_orig=$ac_useropt
987 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
988 case $ac_user_opts in
989 *"
990"enable_$ac_useropt"
991"*) ;;
992 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
993 ac_unrecognized_sep=', ';;
994 esac
995 eval enable_$ac_useropt=no ;;
85f61964
WP
996
997 -docdir | --docdir | --docdi | --doc | --do)
998 ac_prev=docdir ;;
999 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1000 docdir=$ac_optarg ;;
1001
1002 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1003 ac_prev=dvidir ;;
1004 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1005 dvidir=$ac_optarg ;;
1006
1007 -enable-* | --enable-*)
07c7b319 1008 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
85f61964 1009 # Reject names that are not valid shell variable names.
07c7b319 1010 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
0ab5d73e 1011 as_fn_error $? "invalid feature name: $ac_useropt"
07c7b319
JT
1012 ac_useropt_orig=$ac_useropt
1013 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1014 case $ac_user_opts in
1015 *"
1016"enable_$ac_useropt"
1017"*) ;;
1018 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1019 ac_unrecognized_sep=', ';;
1020 esac
1021 eval enable_$ac_useropt=\$ac_optarg ;;
85f61964
WP
1022
1023 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1024 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1025 | --exec | --exe | --ex)
1026 ac_prev=exec_prefix ;;
1027 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1028 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1029 | --exec=* | --exe=* | --ex=*)
1030 exec_prefix=$ac_optarg ;;
1031
1032 -gas | --gas | --ga | --g)
1033 # Obsolete; use --with-gas.
1034 with_gas=yes ;;
1035
1036 -help | --help | --hel | --he | -h)
1037 ac_init_help=long ;;
1038 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1039 ac_init_help=recursive ;;
1040 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1041 ac_init_help=short ;;
1042
1043 -host | --host | --hos | --ho)
1044 ac_prev=host_alias ;;
1045 -host=* | --host=* | --hos=* | --ho=*)
1046 host_alias=$ac_optarg ;;
1047
1048 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1049 ac_prev=htmldir ;;
1050 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1051 | --ht=*)
1052 htmldir=$ac_optarg ;;
1053
1054 -includedir | --includedir | --includedi | --included | --include \
1055 | --includ | --inclu | --incl | --inc)
1056 ac_prev=includedir ;;
1057 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1058 | --includ=* | --inclu=* | --incl=* | --inc=*)
1059 includedir=$ac_optarg ;;
1060
1061 -infodir | --infodir | --infodi | --infod | --info | --inf)
1062 ac_prev=infodir ;;
1063 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1064 infodir=$ac_optarg ;;
1065
1066 -libdir | --libdir | --libdi | --libd)
1067 ac_prev=libdir ;;
1068 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1069 libdir=$ac_optarg ;;
1070
1071 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1072 | --libexe | --libex | --libe)
1073 ac_prev=libexecdir ;;
1074 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1075 | --libexe=* | --libex=* | --libe=*)
1076 libexecdir=$ac_optarg ;;
1077
1078 -localedir | --localedir | --localedi | --localed | --locale)
1079 ac_prev=localedir ;;
1080 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1081 localedir=$ac_optarg ;;
1082
1083 -localstatedir | --localstatedir | --localstatedi | --localstated \
1084 | --localstate | --localstat | --localsta | --localst | --locals)
1085 ac_prev=localstatedir ;;
1086 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1087 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1088 localstatedir=$ac_optarg ;;
1089
1090 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1091 ac_prev=mandir ;;
1092 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1093 mandir=$ac_optarg ;;
1094
1095 -nfp | --nfp | --nf)
1096 # Obsolete; use --without-fp.
1097 with_fp=no ;;
1098
1099 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1100 | --no-cr | --no-c | -n)
1101 no_create=yes ;;
1102
1103 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1104 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1105 no_recursion=yes ;;
1106
1107 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1108 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1109 | --oldin | --oldi | --old | --ol | --o)
1110 ac_prev=oldincludedir ;;
1111 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1112 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1113 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1114 oldincludedir=$ac_optarg ;;
1115
1116 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1117 ac_prev=prefix ;;
1118 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1119 prefix=$ac_optarg ;;
1120
1121 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1122 | --program-pre | --program-pr | --program-p)
1123 ac_prev=program_prefix ;;
1124 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1125 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1126 program_prefix=$ac_optarg ;;
1127
1128 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1129 | --program-suf | --program-su | --program-s)
1130 ac_prev=program_suffix ;;
1131 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1132 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1133 program_suffix=$ac_optarg ;;
1134
1135 -program-transform-name | --program-transform-name \
1136 | --program-transform-nam | --program-transform-na \
1137 | --program-transform-n | --program-transform- \
1138 | --program-transform | --program-transfor \
1139 | --program-transfo | --program-transf \
1140 | --program-trans | --program-tran \
1141 | --progr-tra | --program-tr | --program-t)
1142 ac_prev=program_transform_name ;;
1143 -program-transform-name=* | --program-transform-name=* \
1144 | --program-transform-nam=* | --program-transform-na=* \
1145 | --program-transform-n=* | --program-transform-=* \
1146 | --program-transform=* | --program-transfor=* \
1147 | --program-transfo=* | --program-transf=* \
1148 | --program-trans=* | --program-tran=* \
1149 | --progr-tra=* | --program-tr=* | --program-t=*)
1150 program_transform_name=$ac_optarg ;;
1151
1152 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1153 ac_prev=pdfdir ;;
1154 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1155 pdfdir=$ac_optarg ;;
1156
1157 -psdir | --psdir | --psdi | --psd | --ps)
1158 ac_prev=psdir ;;
1159 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1160 psdir=$ac_optarg ;;
1161
1162 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1163 | -silent | --silent | --silen | --sile | --sil)
1164 silent=yes ;;
1165
5bffd88d
AJ
1166 -runstatedir | --runstatedir | --runstatedi | --runstated \
1167 | --runstate | --runstat | --runsta | --runst | --runs \
1168 | --run | --ru | --r)
1169 ac_prev=runstatedir ;;
1170 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1171 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1172 | --run=* | --ru=* | --r=*)
1173 runstatedir=$ac_optarg ;;
1174
85f61964
WP
1175 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1176 ac_prev=sbindir ;;
1177 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1178 | --sbi=* | --sb=*)
1179 sbindir=$ac_optarg ;;
1180
1181 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1182 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1183 | --sharedst | --shareds | --shared | --share | --shar \
1184 | --sha | --sh)
1185 ac_prev=sharedstatedir ;;
1186 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1187 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1188 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1189 | --sha=* | --sh=*)
1190 sharedstatedir=$ac_optarg ;;
1191
1192 -site | --site | --sit)
1193 ac_prev=site ;;
1194 -site=* | --site=* | --sit=*)
1195 site=$ac_optarg ;;
1196
1197 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1198 ac_prev=srcdir ;;
1199 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1200 srcdir=$ac_optarg ;;
1201
1202 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1203 | --syscon | --sysco | --sysc | --sys | --sy)
1204 ac_prev=sysconfdir ;;
1205 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1206 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1207 sysconfdir=$ac_optarg ;;
1208
1209 -target | --target | --targe | --targ | --tar | --ta | --t)
1210 ac_prev=target_alias ;;
1211 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1212 target_alias=$ac_optarg ;;
1213
1214 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1215 verbose=yes ;;
1216
1217 -version | --version | --versio | --versi | --vers | -V)
1218 ac_init_version=: ;;
1219
1220 -with-* | --with-*)
07c7b319 1221 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
85f61964 1222 # Reject names that are not valid shell variable names.
07c7b319 1223 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
0ab5d73e 1224 as_fn_error $? "invalid package name: $ac_useropt"
07c7b319
JT
1225 ac_useropt_orig=$ac_useropt
1226 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1227 case $ac_user_opts in
1228 *"
1229"with_$ac_useropt"
1230"*) ;;
1231 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1232 ac_unrecognized_sep=', ';;
1233 esac
1234 eval with_$ac_useropt=\$ac_optarg ;;
85f61964
WP
1235
1236 -without-* | --without-*)
07c7b319 1237 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
85f61964 1238 # Reject names that are not valid shell variable names.
07c7b319 1239 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
0ab5d73e 1240 as_fn_error $? "invalid package name: $ac_useropt"
07c7b319
JT
1241 ac_useropt_orig=$ac_useropt
1242 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1243 case $ac_user_opts in
1244 *"
1245"with_$ac_useropt"
1246"*) ;;
1247 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1248 ac_unrecognized_sep=', ';;
1249 esac
1250 eval with_$ac_useropt=no ;;
85f61964
WP
1251
1252 --x)
1253 # Obsolete; use --with-x.
1254 with_x=yes ;;
1255
1256 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1257 | --x-incl | --x-inc | --x-in | --x-i)
1258 ac_prev=x_includes ;;
1259 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1260 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1261 x_includes=$ac_optarg ;;
1262
1263 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1264 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1265 ac_prev=x_libraries ;;
1266 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1267 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1268 x_libraries=$ac_optarg ;;
1269
0ab5d73e
JH
1270 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1271Try \`$0 --help' for more information"
85f61964
WP
1272 ;;
1273
1274 *=*)
1275 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1276 # Reject names that are not valid shell variable names.
648c9700
WP
1277 case $ac_envvar in #(
1278 '' | [0-9]* | *[!_$as_cr_alnum]* )
0ab5d73e 1279 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
648c9700 1280 esac
85f61964
WP
1281 eval $ac_envvar=\$ac_optarg
1282 export $ac_envvar ;;
1283
1284 *)
1285 # FIXME: should be removed in autoconf 3.0.
07c7b319 1286 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
85f61964 1287 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
07c7b319 1288 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
0ab5d73e 1289 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
85f61964
WP
1290 ;;
1291
1292 esac
1293done
1294
1295if test -n "$ac_prev"; then
1296 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
0ab5d73e 1297 as_fn_error $? "missing argument to $ac_option"
85f61964
WP
1298fi
1299
07c7b319
JT
1300if test -n "$ac_unrecognized_opts"; then
1301 case $enable_option_checking in
1302 no) ;;
0ab5d73e 1303 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
105203ad 1304 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
07c7b319
JT
1305 esac
1306fi
1307
1308# Check all directory arguments for consistency.
85f61964
WP
1309for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1310 datadir sysconfdir sharedstatedir localstatedir includedir \
1311 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
5bffd88d 1312 libdir localedir mandir runstatedir
85f61964
WP
1313do
1314 eval ac_val=\$$ac_var
07c7b319
JT
1315 # Remove trailing slashes.
1316 case $ac_val in
1317 */ )
1318 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1319 eval $ac_var=\$ac_val;;
1320 esac
1321 # Be sure to have absolute directory names.
85f61964
WP
1322 case $ac_val in
1323 [\\/$]* | ?:[\\/]* ) continue;;
1324 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1325 esac
0ab5d73e 1326 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
85f61964
WP
1327done
1328
1329# There might be people who depend on the old broken behavior: `$host'
1330# used to hold the argument of --host etc.
1331# FIXME: To remove some day.
1332build=$build_alias
1333host=$host_alias
1334target=$target_alias
1335
1336# FIXME: To remove some day.
1337if test "x$host_alias" != x; then
1338 if test "x$build_alias" = x; then
1339 cross_compiling=maybe
85f61964
WP
1340 elif test "x$build_alias" != "x$host_alias"; then
1341 cross_compiling=yes
1342 fi
1343fi
1344
1345ac_tool_prefix=
1346test -n "$host_alias" && ac_tool_prefix=$host_alias-
1347
1348test "$silent" = yes && exec 6>/dev/null
1349
1350
1351ac_pwd=`pwd` && test -n "$ac_pwd" &&
1352ac_ls_di=`ls -di .` &&
1353ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
0ab5d73e 1354 as_fn_error $? "working directory cannot be determined"
85f61964 1355test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
0ab5d73e 1356 as_fn_error $? "pwd does not report name of working directory"
85f61964
WP
1357
1358
1359# Find the source files, if location was not specified.
1360if test -z "$srcdir"; then
1361 ac_srcdir_defaulted=yes
1362 # Try the directory containing this script, then the parent directory.
07c7b319
JT
1363 ac_confdir=`$as_dirname -- "$as_myself" ||
1364$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1365 X"$as_myself" : 'X\(//\)[^/]' \| \
1366 X"$as_myself" : 'X\(//\)$' \| \
1367 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1368$as_echo X"$as_myself" |
85f61964
WP
1369 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1370 s//\1/
1371 q
1372 }
1373 /^X\(\/\/\)[^/].*/{
1374 s//\1/
1375 q
1376 }
1377 /^X\(\/\/\)$/{
1378 s//\1/
1379 q
1380 }
1381 /^X\(\/\).*/{
1382 s//\1/
1383 q
1384 }
1385 s/.*/./; q'`
1386 srcdir=$ac_confdir
1387 if test ! -r "$srcdir/$ac_unique_file"; then
1388 srcdir=..
1389 fi
1390else
1391 ac_srcdir_defaulted=no
1392fi
1393if test ! -r "$srcdir/$ac_unique_file"; then
1394 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
0ab5d73e 1395 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
85f61964
WP
1396fi
1397ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1398ac_abs_confdir=`(
0ab5d73e 1399 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
85f61964
WP
1400 pwd)`
1401# When building in place, set srcdir=.
1402if test "$ac_abs_confdir" = "$ac_pwd"; then
1403 srcdir=.
1404fi
1405# Remove unnecessary trailing slashes from srcdir.
1406# Double slashes in file names in object file debugging info
1407# mess up M-x gdb in Emacs.
1408case $srcdir in
1409*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1410esac
1411for ac_var in $ac_precious_vars; do
1412 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1413 eval ac_env_${ac_var}_value=\$${ac_var}
1414 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1415 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1416done
1417
1418#
1419# Report the --help message.
1420#
1421if test "$ac_init_help" = "long"; then
1422 # Omit some internal or obsolete options to make the list less imposing.
1423 # This message is too long to be a string in the A/UX 3.1 sh.
1424 cat <<_ACEOF
7d09d888 1425\`configure' configures Atheme IRC Services 7.3.0-rc2 to adapt to many kinds of systems.
85f61964
WP
1426
1427Usage: $0 [OPTION]... [VAR=VALUE]...
1428
1429To assign environment variables (e.g., CC, CFLAGS...), specify them as
1430VAR=VALUE. See below for descriptions of some of the useful variables.
1431
1432Defaults for the options are specified in brackets.
1433
1434Configuration:
1435 -h, --help display this help and exit
1436 --help=short display options specific to this package
1437 --help=recursive display the short help of all the included packages
1438 -V, --version display version information and exit
0ab5d73e 1439 -q, --quiet, --silent do not print \`checking ...' messages
85f61964
WP
1440 --cache-file=FILE cache test results in FILE [disabled]
1441 -C, --config-cache alias for \`--cache-file=config.cache'
1442 -n, --no-create do not create output files
1443 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1444
1445Installation directories:
1446 --prefix=PREFIX install architecture-independent files in PREFIX
07c7b319 1447 [$ac_default_prefix]
85f61964 1448 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
07c7b319 1449 [PREFIX]
85f61964
WP
1450
1451By default, \`make install' will install all the files in
1452\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1453an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1454for instance \`--prefix=\$HOME'.
1455
1456For better control, use the options below.
1457
1458Fine tuning of the installation directories:
07c7b319
JT
1459 --bindir=DIR user executables [EPREFIX/bin]
1460 --sbindir=DIR system admin executables [EPREFIX/sbin]
1461 --libexecdir=DIR program executables [EPREFIX/libexec]
1462 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1463 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1464 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
5bffd88d 1465 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
07c7b319
JT
1466 --libdir=DIR object code libraries [EPREFIX/lib]
1467 --includedir=DIR C header files [PREFIX/include]
1468 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1469 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1470 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1471 --infodir=DIR info documentation [DATAROOTDIR/info]
1472 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1473 --mandir=DIR man documentation [DATAROOTDIR/man]
1474 --docdir=DIR documentation root [DATAROOTDIR/doc/atheme]
1475 --htmldir=DIR html documentation [DOCDIR]
1476 --dvidir=DIR dvi documentation [DOCDIR]
1477 --pdfdir=DIR pdf documentation [DOCDIR]
1478 --psdir=DIR ps documentation [DOCDIR]
85f61964
WP
1479_ACEOF
1480
1481 cat <<\_ACEOF
083f09b4
WP
1482
1483System types:
1484 --build=BUILD configure for building on BUILD [guessed]
1485 --host=HOST cross-compile to build programs to run on HOST [BUILD]
85f61964
WP
1486_ACEOF
1487fi
1488
1489if test -n "$ac_init_help"; then
1490 case $ac_init_help in
7d09d888 1491 short | recursive ) echo "Configuration of Atheme IRC Services 7.3.0-rc2:";;
85f61964
WP
1492 esac
1493 cat <<\_ACEOF
1494
1495Optional Features:
07c7b319 1496 --disable-option-checking ignore unrecognized --enable/--with options
85f61964
WP
1497 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1498 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
0df7ff62 1499 --enable-contrib Enable contrib modules
21f35da3
AJ
1500 --disable-crypto-benchmarking
1501 Don't build the crypto benchmarking utility
a57c74d8
AJ
1502 --disable-ecdh-x25519-tool
1503 Don't build the SASL ECDH-X25519-CHALLENGE utility
1504 --disable-ecdsa-nist256p-tools
1505 Don't build the SASL ECDSA-NIST256P-CHALLENGE
1506 utilities
f7291891 1507 --enable-fhs-paths Use more FHS-like pathnames (for packagers)
fe1e7dec 1508 --disable-heap-allocator
460b89c1 1509 Disable the heap allocator
a19ae377 1510 --enable-large-net Enable large network support
554602d0
AJ
1511 --enable-legacy-pwcrypto
1512 Enable legacy password crypto modules
f4cd16d4 1513 --enable-reproducible-builds
a19ae377 1514 Enable reproducible builds
3f9992da
AJ
1515 --enable-compiler-sanitizers
1516 Enable various compiler run-time-instrumented
1517 sanitizers
5d77e6b8
AJ
1518 --disable-fortify-source
1519 Disable -D_FORTIFY_SOURCE=2 (hardening for many C
1520 library function invocations)
5d77e6b8
AJ
1521 --disable-async-unwind-tables
1522 Disable -fasynchronous-unwind-tables (Generate
1523 precise unwind tables for more reliable backtraces)
90121a3e
AJ
1524 --disable-debugging-symbols
1525 Don't build with debugging symbols (-g) enabled
5c498012
AJ
1526 --disable-stack-clash-protection
1527 Disable -fstack-clash-protection (Prevents skipping
1528 over VMM guard pages)
19617271
AJ
1529 --disable-stack-protector
1530 Disable -fstack-protector{-all,-strong,} (Stack
1531 smashing protection)
0133cdd9
AJ
1532 --enable-profile Enable profiling extensions
1533 --disable-relro Disable -Wl,-z,relro (marks the relocation table
1534 read-only)
1535 --disable-nonlazy-bind Disable -Wl,-z,now (resolves all symbols at program
1536 startup time)
1537 --disable-linker-defs Disable -Wl,-z,defs (detects and rejects
1538 underlinking)
6440ab19
AJ
1539 --disable-noexecstack Disable -Wl,-z,noexecstack (Marks the stack
1540 non-executable)
0133cdd9
AJ
1541 --disable-as-needed Disable -Wl,--as-needed (strips unnecessary
1542 libraries at link time)
1543 --disable-rpath Disable -Wl,-rpath= (builds installation path into
1544 binaries)
ffe17165 1545 --enable-nls Enable localization/translation support
3828bfac 1546 --disable-rpath do not hardcode runtime library paths
5d77e6b8 1547 --enable-warnings Enable compiler warnings
85f61964
WP
1548
1549Optional Packages:
1550 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1551 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2b4c160e 1552 --without-argon2 Do not attempt to detect libargon2 (for
5fa0bd86 1553 modules/crypto/argon2)
1e6c7f18 1554 --without-cracklib Do not attempt to detect cracklib (for
583552e5 1555 modules/nickserv/pwquality -- checking password
aed66765 1556 strength)
01bc990a
AJ
1557 --without-crypt Do not attempt to detect crypt(3) (for
1558 modules/crypto/crypt3-*)
66b7b16b
AJ
1559 --without-openssl Do not attempt to detect OpenSSL (cryptographic
1560 library)
fbced731
AJ
1561 --without-gcrypt Do not attempt to detect GNU libgcrypt
1562 (cryptographic library)
2b4c160e
AJ
1563 --without-idn Do not attempt to detect GNU libidn (for
1564 modules/saslserv/scram-sha)
f5cee21f
AJ
1565 --without-ldap Do not attempt to detect libldap (for
1566 modules/auth/ldap)
66b7b16b
AJ
1567 --without-mbedtls Do not attempt to detect ARM mbedTLS (cryptographic
1568 library)
c6167e86
AJ
1569 --with-libmowgli[=prefix]
1570 Specify location of system libmowgli install, "yes"
1571 to ask pkg-config, or "no" to force use of internal
1572 libmowgli submodule (default)
66b7b16b
AJ
1573 --without-nettle Do not attempt to detect nettle (cryptographic
1574 library)
583552e5
AJ
1575 --without-passwdqc Do not attempt to detect libpasswdqc (for
1576 modules/nickserv/pwquality -- checking password
1577 strength)
66b7b16b
AJ
1578 --without-pcre Do not attempt to detect libpcre (Perl-Compatible
1579 Regular Expressions)
1580 --without-qrencode Do not attempt to detect libqrencode (for generating
1581 QR codes)
8d8913e0
AJ
1582 --without-sodium Do not attempt to detect libsodium (cryptographic
1583 library)
be2cd255 1584 --with-perl Enable Perl (for modules/scripting/perl)
44d10669 1585 --with-digest-api-frontend=[frontend]
ed8a3fce 1586 Digest API frontend to use (auto, openssl, libressl,
fbced731 1587 gcrypt, mbedtls, internal). Default: auto
44d10669 1588 --with-rng-api-frontend=[frontend]
8ff53e4d 1589 RNG API frontend to use (auto, arc4random, sodium,
227f32a8 1590 openssl, libressl, mbedtls, internal). Default: auto
3828bfac
AJ
1591 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1592 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1593 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1594 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
1595 --without-libintl-prefix don't search for libintl in includedir and libdir
85f61964
WP
1596
1597Some influential environment variables:
1598 CC C compiler command
1599 CFLAGS C compiler flags
1600 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1601 nonstandard directory <lib dir>
1602 LIBS libraries to pass to the linker, e.g. -l<library>
fe2e2f74 1603 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
85f61964 1604 you have headers in a nonstandard directory <include dir>
083f09b4 1605 PKG_CONFIG path to pkg-config utility
48d2e9d0
AJ
1606 PKG_CONFIG_PATH
1607 directories to add to pkg-config's search path
1608 PKG_CONFIG_LIBDIR
1609 path overriding pkg-config's built-in search path
6440ab19 1610 CPP C preprocessor
5fa0bd86
AJ
1611 LIBARGON2_CFLAGS
1612 C compiler flags for LIBARGON2, overriding pkg-config
1613 LIBARGON2_LIBS
1614 linker flags for LIBARGON2, overriding pkg-config
ad5cc67e
AJ
1615 LIBCRYPTO_CFLAGS
1616 C compiler flags for LIBCRYPTO, overriding pkg-config
1617 LIBCRYPTO_LIBS
1618 linker flags for LIBCRYPTO, overriding pkg-config
e63c6763
AJ
1619 LIBIDN_CFLAGS
1620 C compiler flags for LIBIDN, overriding pkg-config
1621 LIBIDN_LIBS linker flags for LIBIDN, overriding pkg-config
c6167e86
AJ
1622 LIBMOWGLI_CFLAGS
1623 C compiler flags for LIBMOWGLI, overriding pkg-config
1624 LIBMOWGLI_LIBS
1625 linker flags for LIBMOWGLI, overriding pkg-config
8a2ebdd4
AJ
1626 LIBNETTLE_CFLAGS
1627 C compiler flags for LIBNETTLE, overriding pkg-config
1628 LIBNETTLE_LIBS
1629 linker flags for LIBNETTLE, overriding pkg-config
8c8b81e1
AJ
1630 LIBPCRE_CFLAGS
1631 C compiler flags for LIBPCRE, overriding pkg-config
1632 LIBPCRE_LIBS
1633 linker flags for LIBPCRE, overriding pkg-config
f7c1979e
AJ
1634 LIBQRENCODE_CFLAGS
1635 C compiler flags for LIBQRENCODE, overriding pkg-config
1636 LIBQRENCODE_LIBS
1637 linker flags for LIBQRENCODE, overriding pkg-config
073ad2a0
AJ
1638 LIBSODIUM_CFLAGS
1639 C compiler flags for LIBSODIUM, overriding pkg-config
1640 LIBSODIUM_LIBS
1641 linker flags for LIBSODIUM, overriding pkg-config
85f61964
WP
1642
1643Use these variables to override the choices made by `configure' or to help
1644it to find libraries and programs with nonstandard names/locations.
1645
2e1b6c9b 1646Report bugs to <https://github.com/atheme/atheme/issues/>.
109cf8f3 1647Atheme IRC Services home page: <https://atheme.github.io/>.
85f61964
WP
1648_ACEOF
1649ac_status=$?
1650fi
1651
1652if test "$ac_init_help" = "recursive"; then
1653 # If there are subdirs, report their specific --help.
1654 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
07c7b319
JT
1655 test -d "$ac_dir" ||
1656 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1657 continue
85f61964
WP
1658 ac_builddir=.
1659
1660case "$ac_dir" in
1661.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1662*)
07c7b319 1663 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
85f61964 1664 # A ".." for each directory in $ac_dir_suffix.
07c7b319 1665 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
85f61964
WP
1666 case $ac_top_builddir_sub in
1667 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1668 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1669 esac ;;
1670esac
1671ac_abs_top_builddir=$ac_pwd
1672ac_abs_builddir=$ac_pwd$ac_dir_suffix
1673# for backward compatibility:
1674ac_top_builddir=$ac_top_build_prefix
1675
1676case $srcdir in
1677 .) # We are building in place.
1678 ac_srcdir=.
1679 ac_top_srcdir=$ac_top_builddir_sub
1680 ac_abs_top_srcdir=$ac_pwd ;;
1681 [\\/]* | ?:[\\/]* ) # Absolute name.
1682 ac_srcdir=$srcdir$ac_dir_suffix;
1683 ac_top_srcdir=$srcdir
1684 ac_abs_top_srcdir=$srcdir ;;
1685 *) # Relative name.
1686 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1687 ac_top_srcdir=$ac_top_build_prefix$srcdir
1688 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1689esac
1690ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1691
1692 cd "$ac_dir" || { ac_status=$?; continue; }
1693 # Check for guested configure.
1694 if test -f "$ac_srcdir/configure.gnu"; then
1695 echo &&
1696 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1697 elif test -f "$ac_srcdir/configure"; then
1698 echo &&
1699 $SHELL "$ac_srcdir/configure" --help=recursive
1700 else
07c7b319 1701 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
85f61964
WP
1702 fi || ac_status=$?
1703 cd "$ac_pwd" || { ac_status=$?; break; }
1704 done
1705fi
1706
1707test -n "$ac_init_help" && exit $ac_status
1708if $ac_init_version; then
1709 cat <<\_ACEOF
7d09d888 1710Atheme IRC Services configure 7.3.0-rc2
d24e2420 1711generated by GNU Autoconf 2.69
85f61964 1712
d24e2420 1713Copyright (C) 2012 Free Software Foundation, Inc.
85f61964
WP
1714This configure script is free software; the Free Software Foundation
1715gives unlimited permission to copy, distribute and modify it.
85f61964
WP
1716_ACEOF
1717 exit
1718fi
85f61964 1719
648c9700
WP
1720## ------------------------ ##
1721## Autoconf initialization. ##
1722## ------------------------ ##
85f61964 1723
648c9700
WP
1724# ac_fn_c_try_compile LINENO
1725# --------------------------
1726# Try to compile conftest.$ac_ext, and return whether this succeeded.
1727ac_fn_c_try_compile ()
85f61964 1728{
648c9700
WP
1729 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1730 rm -f conftest.$ac_objext
1731 if { { ac_try="$ac_compile"
1732case "(($ac_try" in
1733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1734 *) ac_try_echo=$ac_try;;
1735esac
1736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1737$as_echo "$ac_try_echo"; } >&5
1738 (eval "$ac_compile") 2>conftest.err
1739 ac_status=$?
1740 if test -s conftest.err; then
1741 grep -v '^ *+' conftest.err >conftest.er1
1742 cat conftest.er1 >&5
1743 mv -f conftest.er1 conftest.err
1744 fi
1745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1746 test $ac_status = 0; } && {
1747 test -z "$ac_c_werror_flag" ||
1748 test ! -s conftest.err
1749 } && test -s conftest.$ac_objext; then :
1750 ac_retval=0
1751else
1752 $as_echo "$as_me: failed program was:" >&5
1753sed 's/^/| /' conftest.$ac_ext >&5
85f61964 1754
648c9700
WP
1755 ac_retval=1
1756fi
0ab5d73e 1757 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
fe2e2f74 1758 as_fn_set_status $ac_retval
85f61964 1759
648c9700 1760} # ac_fn_c_try_compile
85f61964 1761
6adcb496
WP
1762# ac_fn_c_try_cpp LINENO
1763# ----------------------
1764# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1765ac_fn_c_try_cpp ()
1766{
1767 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1768 if { { ac_try="$ac_cpp conftest.$ac_ext"
1769case "(($ac_try" in
1770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1771 *) ac_try_echo=$ac_try;;
1772esac
1773eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1774$as_echo "$ac_try_echo"; } >&5
1775 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1776 ac_status=$?
1777 if test -s conftest.err; then
1778 grep -v '^ *+' conftest.err >conftest.er1
1779 cat conftest.er1 >&5
1780 mv -f conftest.er1 conftest.err
1781 fi
1782 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1783 test $ac_status = 0; } > conftest.i && {
1784 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1785 test ! -s conftest.err
1786 }; then :
1787 ac_retval=0
1788else
1789 $as_echo "$as_me: failed program was:" >&5
1790sed 's/^/| /' conftest.$ac_ext >&5
1791
1792 ac_retval=1
1793fi
1794 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1795 as_fn_set_status $ac_retval
1796
1797} # ac_fn_c_try_cpp
1798
1799# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1800# -------------------------------------------------------
1801# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1802# the include files in INCLUDES and setting the cache variable VAR
1803# accordingly.
1804ac_fn_c_check_header_mongrel ()
1805{
1806 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1807 if eval \${$3+:} false; then :
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1809$as_echo_n "checking for $2... " >&6; }
1810if eval \${$3+:} false; then :
1811 $as_echo_n "(cached) " >&6
1812fi
1813eval ac_res=\$$3
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1815$as_echo "$ac_res" >&6; }
1816else
1817 # Is the header compilable?
1818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1819$as_echo_n "checking $2 usability... " >&6; }
1820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1821/* end confdefs.h. */
1822$4
1823#include <$2>
1824_ACEOF
1825if ac_fn_c_try_compile "$LINENO"; then :
1826 ac_header_compiler=yes
1827else
1828 ac_header_compiler=no
1829fi
1830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1832$as_echo "$ac_header_compiler" >&6; }
1833
1834# Is the header present?
1835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1836$as_echo_n "checking $2 presence... " >&6; }
1837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1838/* end confdefs.h. */
1839#include <$2>
1840_ACEOF
1841if ac_fn_c_try_cpp "$LINENO"; then :
1842 ac_header_preproc=yes
1843else
1844 ac_header_preproc=no
1845fi
1846rm -f conftest.err conftest.i conftest.$ac_ext
1847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1848$as_echo "$ac_header_preproc" >&6; }
1849
1850# So? What about this header?
1851case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1852 yes:no: )
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1854$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1856$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1857 ;;
1858 no:yes:* )
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1860$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1862$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1864$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1866$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1868$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
257eca51 1869( $as_echo "## ------------------------------------------------------- ##
2e1b6c9b 1870## Report this to https://github.com/atheme/atheme/issues/ ##
257eca51 1871## ------------------------------------------------------- ##"
6adcb496
WP
1872 ) | sed "s/^/$as_me: WARNING: /" >&2
1873 ;;
1874esac
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1876$as_echo_n "checking for $2... " >&6; }
1877if eval \${$3+:} false; then :
1878 $as_echo_n "(cached) " >&6
1879else
1880 eval "$3=\$ac_header_compiler"
1881fi
1882eval ac_res=\$$3
1883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1884$as_echo "$ac_res" >&6; }
1885fi
1886 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1887
1888} # ac_fn_c_check_header_mongrel
1889
648c9700
WP
1890# ac_fn_c_try_run LINENO
1891# ----------------------
1892# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1893# that executables *can* be run.
1894ac_fn_c_try_run ()
1895{
1896 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1897 if { { ac_try="$ac_link"
1898case "(($ac_try" in
1899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1900 *) ac_try_echo=$ac_try;;
1901esac
1902eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1903$as_echo "$ac_try_echo"; } >&5
1904 (eval "$ac_link") 2>&5
1905 ac_status=$?
1906 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1907 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1908 { { case "(($ac_try" in
1909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1910 *) ac_try_echo=$ac_try;;
1911esac
1912eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1913$as_echo "$ac_try_echo"; } >&5
1914 (eval "$ac_try") 2>&5
1915 ac_status=$?
1916 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1917 test $ac_status = 0; }; }; then :
1918 ac_retval=0
1919else
1920 $as_echo "$as_me: program exited with status $ac_status" >&5
1921 $as_echo "$as_me: failed program was:" >&5
1922sed 's/^/| /' conftest.$ac_ext >&5
1923
1924 ac_retval=$ac_status
1925fi
1926 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
0ab5d73e 1927 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
fe2e2f74 1928 as_fn_set_status $ac_retval
648c9700
WP
1929
1930} # ac_fn_c_try_run
1931
1932# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1933# -------------------------------------------------------
1934# Tests whether HEADER exists and can be compiled using the include files in
1935# INCLUDES, setting the cache variable VAR accordingly.
1936ac_fn_c_check_header_compile ()
1937{
1938 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1940$as_echo_n "checking for $2... " >&6; }
0ab5d73e 1941if eval \${$3+:} false; then :
648c9700
WP
1942 $as_echo_n "(cached) " >&6
1943else
1944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h. */
1946$4
1947#include <$2>
1948_ACEOF
1949if ac_fn_c_try_compile "$LINENO"; then :
1950 eval "$3=yes"
1951else
1952 eval "$3=no"
1953fi
1954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1955fi
1956eval ac_res=\$$3
1957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1958$as_echo "$ac_res" >&6; }
0ab5d73e 1959 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
648c9700
WP
1960
1961} # ac_fn_c_check_header_compile
1962
1963# ac_fn_c_try_link LINENO
1964# -----------------------
1965# Try to link conftest.$ac_ext, and return whether this succeeded.
1966ac_fn_c_try_link ()
1967{
1968 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1969 rm -f conftest.$ac_objext conftest$ac_exeext
1970 if { { ac_try="$ac_link"
1971case "(($ac_try" in
1972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1973 *) ac_try_echo=$ac_try;;
1974esac
1975eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1976$as_echo "$ac_try_echo"; } >&5
1977 (eval "$ac_link") 2>conftest.err
1978 ac_status=$?
1979 if test -s conftest.err; then
1980 grep -v '^ *+' conftest.err >conftest.er1
1981 cat conftest.er1 >&5
1982 mv -f conftest.er1 conftest.err
1983 fi
1984 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1985 test $ac_status = 0; } && {
1986 test -z "$ac_c_werror_flag" ||
1987 test ! -s conftest.err
1988 } && test -s conftest$ac_exeext && {
1989 test "$cross_compiling" = yes ||
d24e2420 1990 test -x conftest$ac_exeext
648c9700
WP
1991 }; then :
1992 ac_retval=0
1993else
1994 $as_echo "$as_me: failed program was:" >&5
1995sed 's/^/| /' conftest.$ac_ext >&5
1996
1997 ac_retval=1
1998fi
1999 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2000 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2001 # interfere with the next link command; also delete a directory that is
2002 # left behind by Apple's compiler. We do this before executing the actions.
2003 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
0ab5d73e 2004 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
fe2e2f74 2005 as_fn_set_status $ac_retval
648c9700
WP
2006
2007} # ac_fn_c_try_link
2008
648c9700
WP
2009# ac_fn_c_check_func LINENO FUNC VAR
2010# ----------------------------------
2011# Tests whether FUNC exists, setting the cache variable VAR accordingly
2012ac_fn_c_check_func ()
2013{
2014 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2016$as_echo_n "checking for $2... " >&6; }
0ab5d73e 2017if eval \${$3+:} false; then :
648c9700
WP
2018 $as_echo_n "(cached) " >&6
2019else
2020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2021/* end confdefs.h. */
2022/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2023 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2024#define $2 innocuous_$2
2025
2026/* System header to define __stub macros and hopefully few prototypes,
2027 which can conflict with char $2 (); below.
2028 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2029 <limits.h> exists even on freestanding compilers. */
2030
2031#ifdef __STDC__
2032# include <limits.h>
2033#else
2034# include <assert.h>
2035#endif
2036
2037#undef $2
2038
2039/* Override any GCC internal prototype to avoid an error.
2040 Use char because int might match the return type of a GCC
2041 builtin and then its argument prototype would still apply. */
2042#ifdef __cplusplus
2043extern "C"
2044#endif
2045char $2 ();
2046/* The GNU C library defines this for functions which it implements
2047 to always fail with ENOSYS. Some functions are actually named
2048 something starting with __ and the normal name is an alias. */
2049#if defined __stub_$2 || defined __stub___$2
2050choke me
2051#endif
2052
2053int
2054main ()
2055{
2056return $2 ();
2057 ;
2058 return 0;
2059}
2060_ACEOF
2061if ac_fn_c_try_link "$LINENO"; then :
2062 eval "$3=yes"
2063else
2064 eval "$3=no"
2065fi
2066rm -f core conftest.err conftest.$ac_objext \
2067 conftest$ac_exeext conftest.$ac_ext
2068fi
2069eval ac_res=\$$3
2070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2071$as_echo "$ac_res" >&6; }
0ab5d73e 2072 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
648c9700
WP
2073
2074} # ac_fn_c_check_func
77b1981e 2075
1639518a
AJ
2076# ac_fn_c_find_intX_t LINENO BITS VAR
2077# -----------------------------------
2078# Finds a signed integer type with width BITS, setting cache variable VAR
2079# accordingly.
2080ac_fn_c_find_intX_t ()
472c7f87
WP
2081{
2082 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1639518a
AJ
2083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2084$as_echo_n "checking for int$2_t... " >&6; }
2085if eval \${$3+:} false; then :
472c7f87
WP
2086 $as_echo_n "(cached) " >&6
2087else
1639518a
AJ
2088 eval "$3=no"
2089 # Order is important - never check a type that is potentially smaller
2090 # than half of the expected target width.
2091 for ac_type in int$2_t 'int' 'long int' \
2092 'long long int' 'short int' 'signed char'; do
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
472c7f87 2094/* end confdefs.h. */
1639518a
AJ
2095$ac_includes_default
2096 enum { N = $2 / 2 - 1 };
472c7f87 2097int
77b1981e
WP
2098main ()
2099{
1639518a
AJ
2100static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
2101test_array [0] = 0;
2102return test_array [0];
2103
77b1981e
WP
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
77b1981e
WP
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
1639518a
AJ
2111$ac_includes_default
2112 enum { N = $2 / 2 - 1 };
77b1981e
WP
2113int
2114main ()
2115{
1639518a
AJ
2116static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
2117 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
2118test_array [0] = 0;
2119return test_array [0];
2120
77b1981e
WP
2121 ;
2122 return 0;
2123}
2124_ACEOF
2125if ac_fn_c_try_compile "$LINENO"; then :
1639518a 2126
77b1981e 2127else
1639518a
AJ
2128 case $ac_type in #(
2129 int$2_t) :
2130 eval "$3=yes" ;; #(
2131 *) :
2132 eval "$3=\$ac_type" ;;
2133esac
77b1981e
WP
2134fi
2135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2136fi
2137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1639518a
AJ
2138 if eval test \"x\$"$3"\" = x"no"; then :
2139
2140else
2141 break
2142fi
2143 done
77b1981e 2144fi
1639518a 2145eval ac_res=\$$3
77b1981e
WP
2146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2147$as_echo "$ac_res" >&6; }
2148 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2149
1639518a 2150} # ac_fn_c_find_intX_t
77b1981e
WP
2151
2152# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2153# -------------------------------------------
2154# Tests whether TYPE exists after having included INCLUDES, setting cache
2155# variable VAR accordingly.
2156ac_fn_c_check_type ()
2157{
2158 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2160$as_echo_n "checking for $2... " >&6; }
2161if eval \${$3+:} false; then :
2162 $as_echo_n "(cached) " >&6
2163else
2164 eval "$3=no"
2165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2166/* end confdefs.h. */
2167$4
2168int
2169main ()
2170{
2171if (sizeof ($2))
2172 return 0;
2173 ;
2174 return 0;
2175}
2176_ACEOF
2177if ac_fn_c_try_compile "$LINENO"; then :
2178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2179/* end confdefs.h. */
2180$4
2181int
2182main ()
2183{
2184if (sizeof (($2)))
2185 return 0;
2186 ;
2187 return 0;
2188}
2189_ACEOF
2190if ac_fn_c_try_compile "$LINENO"; then :
2191
2192else
2193 eval "$3=yes"
2194fi
2195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2196fi
2197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2198fi
2199eval ac_res=\$$3
2200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2201$as_echo "$ac_res" >&6; }
2202 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2203
2204} # ac_fn_c_check_type
c2d29773 2205
c2d29773
AJ
2206# ac_fn_c_find_uintX_t LINENO BITS VAR
2207# ------------------------------------
2208# Finds an unsigned integer type with width BITS, setting cache variable VAR
2209# accordingly.
2210ac_fn_c_find_uintX_t ()
2211{
2212 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
2214$as_echo_n "checking for uint$2_t... " >&6; }
2215if eval \${$3+:} false; then :
2216 $as_echo_n "(cached) " >&6
2217else
2218 eval "$3=no"
2219 # Order is important - never check a type that is potentially smaller
2220 # than half of the expected target width.
2221 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2222 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2224/* end confdefs.h. */
2225$ac_includes_default
2226int
2227main ()
2228{
2229static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
2230test_array [0] = 0;
2231return test_array [0];
2232
2233 ;
2234 return 0;
2235}
2236_ACEOF
2237if ac_fn_c_try_compile "$LINENO"; then :
2238 case $ac_type in #(
2239 uint$2_t) :
2240 eval "$3=yes" ;; #(
2241 *) :
2242 eval "$3=\$ac_type" ;;
2243esac
2244fi
2245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2246 if eval test \"x\$"$3"\" = x"no"; then :
2247
2248else
2249 break
2250fi
2251 done
2252fi
2253eval ac_res=\$$3
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2255$as_echo "$ac_res" >&6; }
2256 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2257
2258} # ac_fn_c_find_uintX_t
648c9700
WP
2259cat >config.log <<_ACEOF
2260This file contains any messages produced by compilers while
2261running configure, to aid debugging if configure makes a mistake.
2262
7d09d888 2263It was created by Atheme IRC Services $as_me 7.3.0-rc2, which was
d24e2420 2264generated by GNU Autoconf 2.69. Invocation command line was
648c9700
WP
2265
2266 $ $0 $@
2267
2268_ACEOF
2269exec 5>>config.log
2270{
2271cat <<_ASUNAME
2272## --------- ##
2273## Platform. ##
2274## --------- ##
2275
2276hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2277uname -m = `(uname -m) 2>/dev/null || echo unknown`
2278uname -r = `(uname -r) 2>/dev/null || echo unknown`
2279uname -s = `(uname -s) 2>/dev/null || echo unknown`
2280uname -v = `(uname -v) 2>/dev/null || echo unknown`
2281
2282/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2283/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2284
2285/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2286/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2287/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2288/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2289/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2290/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2291/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2292
2293_ASUNAME
2294
2295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2296for as_dir in $PATH
2297do
85f61964
WP
2298 IFS=$as_save_IFS
2299 test -z "$as_dir" && as_dir=.
648c9700
WP
2300 $as_echo "PATH: $as_dir"
2301 done
85f61964
WP
2302IFS=$as_save_IFS
2303
2304} >&5
2305
2306cat >&5 <<_ACEOF
2307
2308
2309## ----------- ##
2310## Core tests. ##
2311## ----------- ##
2312
2313_ACEOF
2314
2315
2316# Keep a trace of the command line.
2317# Strip out --no-create and --no-recursion so they do not pile up.
2318# Strip out --silent because we don't want to record it for future runs.
2319# Also quote any args containing shell meta-characters.
2320# Make two passes to allow for proper duplicate-argument suppression.
2321ac_configure_args=
2322ac_configure_args0=
2323ac_configure_args1=
2324ac_must_keep_next=false
2325for ac_pass in 1 2
2326do
2327 for ac_arg
2328 do
2329 case $ac_arg in
2330 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2331 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2332 | -silent | --silent | --silen | --sile | --sil)
2333 continue ;;
2334 *\'*)
07c7b319 2335 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
85f61964
WP
2336 esac
2337 case $ac_pass in
648c9700 2338 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
85f61964 2339 2)
648c9700 2340 as_fn_append ac_configure_args1 " '$ac_arg'"
85f61964
WP
2341 if test $ac_must_keep_next = true; then
2342 ac_must_keep_next=false # Got value, back to normal.
2343 else
2344 case $ac_arg in
2345 *=* | --config-cache | -C | -disable-* | --disable-* \
2346 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2347 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2348 | -with-* | --with-* | -without-* | --without-* | --x)
2349 case "$ac_configure_args0 " in
2350 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2351 esac
2352 ;;
2353 -* ) ac_must_keep_next=true ;;
2354 esac
2355 fi
648c9700 2356 as_fn_append ac_configure_args " '$ac_arg'"
85f61964
WP
2357 ;;
2358 esac
2359 done
2360done
648c9700
WP
2361{ ac_configure_args0=; unset ac_configure_args0;}
2362{ ac_configure_args1=; unset ac_configure_args1;}
85f61964
WP
2363
2364# When interrupted or exit'd, cleanup temporary files, and complete
2365# config.log. We remove comments because anyway the quotes in there
2366# would cause problems or look ugly.
2367# WARNING: Use '\'' to represent an apostrophe within the trap.
2368# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2369trap 'exit_status=$?
2370 # Save into config.log some information that might help in debugging.
2371 {
2372 echo
2373
0ab5d73e 2374 $as_echo "## ---------------- ##
85f61964 2375## Cache variables. ##
0ab5d73e 2376## ---------------- ##"
85f61964
WP
2377 echo
2378 # The following way of writing the cache mishandles newlines in values,
2379(
2380 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2381 eval ac_val=\$$ac_var
2382 case $ac_val in #(
2383 *${as_nl}*)
2384 case $ac_var in #(
648c9700 2385 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
105203ad 2386$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
85f61964
WP
2387 esac
2388 case $ac_var in #(
2389 _ | IFS | as_nl) ;; #(
07c7b319 2390 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
648c9700 2391 *) { eval $ac_var=; unset $ac_var;} ;;
85f61964
WP
2392 esac ;;
2393 esac
2394 done
2395 (set) 2>&1 |
2396 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2397 *${as_nl}ac_space=\ *)
2398 sed -n \
2399 "s/'\''/'\''\\\\'\'''\''/g;
2400 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2401 ;; #(
2402 *)
2403 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2404 ;;
2405 esac |
2406 sort
2407)
2408 echo
2409
0ab5d73e 2410 $as_echo "## ----------------- ##
85f61964 2411## Output variables. ##
0ab5d73e 2412## ----------------- ##"
85f61964
WP
2413 echo
2414 for ac_var in $ac_subst_vars
2415 do
2416 eval ac_val=\$$ac_var
2417 case $ac_val in
07c7b319 2418 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
85f61964 2419 esac
07c7b319 2420 $as_echo "$ac_var='\''$ac_val'\''"
85f61964
WP
2421 done | sort
2422 echo
2423
2424 if test -n "$ac_subst_files"; then
0ab5d73e 2425 $as_echo "## ------------------- ##
85f61964 2426## File substitutions. ##
0ab5d73e 2427## ------------------- ##"
85f61964
WP
2428 echo
2429 for ac_var in $ac_subst_files
2430 do
2431 eval ac_val=\$$ac_var
2432 case $ac_val in
07c7b319 2433 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
85f61964 2434 esac
07c7b319 2435 $as_echo "$ac_var='\''$ac_val'\''"
85f61964
WP
2436 done | sort
2437 echo
2438 fi
2439
2440 if test -s confdefs.h; then
0ab5d73e 2441 $as_echo "## ----------- ##
85f61964 2442## confdefs.h. ##
0ab5d73e 2443## ----------- ##"
85f61964
WP
2444 echo
2445 cat confdefs.h
2446 echo
2447 fi
2448 test "$ac_signal" != 0 &&
07c7b319
JT
2449 $as_echo "$as_me: caught signal $ac_signal"
2450 $as_echo "$as_me: exit $exit_status"
85f61964
WP
2451 } >&5
2452 rm -f core *.core core.conftest.* &&
2453 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2454 exit $exit_status
2455' 0
2456for ac_signal in 1 2 13 15; do
648c9700 2457 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
85f61964
WP
2458done
2459ac_signal=0
2460
2461# confdefs.h avoids OS command line length limits that DEFS can exceed.
2462rm -f -r conftest* confdefs.h
2463
648c9700
WP
2464$as_echo "/* confdefs.h */" > confdefs.h
2465
85f61964
WP
2466# Predefined preprocessor variables.
2467
2468cat >>confdefs.h <<_ACEOF
2469#define PACKAGE_NAME "$PACKAGE_NAME"
2470_ACEOF
2471
85f61964
WP
2472cat >>confdefs.h <<_ACEOF
2473#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2474_ACEOF
2475
85f61964
WP
2476cat >>confdefs.h <<_ACEOF
2477#define PACKAGE_VERSION "$PACKAGE_VERSION"
2478_ACEOF
2479
85f61964
WP
2480cat >>confdefs.h <<_ACEOF
2481#define PACKAGE_STRING "$PACKAGE_STRING"
2482_ACEOF
2483
85f61964
WP
2484cat >>confdefs.h <<_ACEOF
2485#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2486_ACEOF
2487
648c9700
WP
2488cat >>confdefs.h <<_ACEOF
2489#define PACKAGE_URL "$PACKAGE_URL"
2490_ACEOF
2491
85f61964
WP
2492
2493# Let the site file select an alternate cache file if it wants to.
07c7b319
JT
2494# Prefer an explicitly selected file to automatically selected ones.
2495ac_site_file1=NONE
2496ac_site_file2=NONE
85f61964 2497if test -n "$CONFIG_SITE"; then
0ab5d73e
JH
2498 # We do not want a PATH search for config.site.
2499 case $CONFIG_SITE in #((
2500 -*) ac_site_file1=./$CONFIG_SITE;;
2501 */*) ac_site_file1=$CONFIG_SITE;;
2502 *) ac_site_file1=./$CONFIG_SITE;;
2503 esac
85f61964 2504elif test "x$prefix" != xNONE; then
07c7b319
JT
2505 ac_site_file1=$prefix/share/config.site
2506 ac_site_file2=$prefix/etc/config.site
85f61964 2507else
07c7b319
JT
2508 ac_site_file1=$ac_default_prefix/share/config.site
2509 ac_site_file2=$ac_default_prefix/etc/config.site
85f61964 2510fi
07c7b319 2511for ac_site_file in "$ac_site_file1" "$ac_site_file2"
85f61964 2512do
07c7b319 2513 test "x$ac_site_file" = xNONE && continue
fe2e2f74 2514 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
648c9700 2515 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
07c7b319 2516$as_echo "$as_me: loading site script $ac_site_file" >&6;}
85f61964 2517 sed 's/^/| /' "$ac_site_file" >&5
0ab5d73e
JH
2518 . "$ac_site_file" \
2519 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2520$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2521as_fn_error $? "failed to load site script $ac_site_file
2522See \`config.log' for more details" "$LINENO" 5; }
85f61964
WP
2523 fi
2524done
2525
2526if test -r "$cache_file"; then
fe2e2f74
WP
2527 # Some versions of bash will fail to source /dev/null (special files
2528 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2529 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
648c9700 2530 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
07c7b319 2531$as_echo "$as_me: loading cache $cache_file" >&6;}
85f61964
WP
2532 case $cache_file in
2533 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2534 *) . "./$cache_file";;
2535 esac
2536 fi
2537else
648c9700 2538 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
07c7b319 2539$as_echo "$as_me: creating cache $cache_file" >&6;}
85f61964
WP
2540 >$cache_file
2541fi
2542
a65bc8da 2543gt_needs="$gt_needs need-formatstring-macros"
85f61964
WP
2544# Check that the precious variables saved in the cache have kept the same
2545# value.
2546ac_cache_corrupted=false
2547for ac_var in $ac_precious_vars; do
2548 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2549 eval ac_new_set=\$ac_env_${ac_var}_set
2550 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2551 eval ac_new_val=\$ac_env_${ac_var}_value
2552 case $ac_old_set,$ac_new_set in
2553 set,)
648c9700 2554 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
07c7b319 2555$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
85f61964
WP
2556 ac_cache_corrupted=: ;;
2557 ,set)
648c9700 2558 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
07c7b319 2559$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
85f61964
WP
2560 ac_cache_corrupted=: ;;
2561 ,);;
2562 *)
2563 if test "x$ac_old_val" != "x$ac_new_val"; then
07c7b319
JT
2564 # differences in whitespace do not lead to failure.
2565 ac_old_val_w=`echo x $ac_old_val`
2566 ac_new_val_w=`echo x $ac_new_val`
2567 if test "$ac_old_val_w" != "$ac_new_val_w"; then
648c9700 2568 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
07c7b319
JT
2569$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2570 ac_cache_corrupted=:
2571 else
648c9700 2572 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
07c7b319
JT
2573$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2574 eval $ac_var=\$ac_old_val
2575 fi
648c9700 2576 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
07c7b319 2577$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
648c9700 2578 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
07c7b319 2579$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
85f61964
WP
2580 fi;;
2581 esac
2582 # Pass precious variables to config.status.
2583 if test "$ac_new_set" = set; then
2584 case $ac_new_val in
07c7b319 2585 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
85f61964
WP
2586 *) ac_arg=$ac_var=$ac_new_val ;;
2587 esac
2588 case " $ac_configure_args " in
2589 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
648c9700 2590 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
85f61964
WP
2591 esac
2592 fi
2593done
2594if $ac_cache_corrupted; then
648c9700 2595 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
105203ad 2596$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
648c9700 2597 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
07c7b319 2598$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
0ab5d73e 2599 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
85f61964 2600fi
648c9700
WP
2601## -------------------- ##
2602## Main body of script. ##
2603## -------------------- ##
85f61964
WP
2604
2605ac_ext=c
2606ac_cpp='$CPP $CPPFLAGS'
2607ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2608ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2609ac_compiler_gnu=$ac_cv_c_compiler_gnu
2610
2611
2612
85f61964 2613ac_aux_dir=
8c3926d7 2614for ac_dir in build-aux "$srcdir"/build-aux; do
0ab5d73e
JH
2615 if test -f "$ac_dir/install-sh"; then
2616 ac_aux_dir=$ac_dir
2617 ac_install_sh="$ac_aux_dir/install-sh -c"
2618 break
2619 elif test -f "$ac_dir/install.sh"; then
2620 ac_aux_dir=$ac_dir
2621 ac_install_sh="$ac_aux_dir/install.sh -c"
2622 break
2623 elif test -f "$ac_dir/shtool"; then
2624 ac_aux_dir=$ac_dir
2625 ac_install_sh="$ac_aux_dir/shtool install -c"
2626 break
2627 fi
85f61964
WP
2628done
2629if test -z "$ac_aux_dir"; then
8c3926d7 2630 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
85f61964
WP
2631fi
2632
2633# These three variables are undocumented and unsupported,
2634# and are intended to be withdrawn in a future Autoconf release.
2635# They can cause serious problems if a builder's source tree is in a directory
2636# whose full name contains unusual characters.
2637ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2638ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2639ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2640
2641
8f395567 2642ac_config_files="$ac_config_files buildsys.mk extra.mk"
85f61964 2643
81323dfc 2644ac_config_headers="$ac_config_headers include/atheme/sysconf.h"
85f61964
WP
2645
2646
2647
8f395567 2648
c2d29773
AJ
2649if test "x${prefix}" = "xNONE"; then :
2650 prefix="${ac_default_prefix}"
2651fi
c7493385 2652
f16c9b18
AJ
2653if test -d ".git"; then :
2654
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if you read GIT-Access.txt" >&5
56798e3c 2656$as_echo_n "checking if you read GIT-Access.txt... " >&6; }
f16c9b18
AJ
2657 if test -f "libmowgli-2/Makefile" -a -f "modules/contrib/Makefile"; then :
2658
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2660$as_echo "yes" >&6; }
2661
2662else
2663
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2665$as_echo "no" >&6; }
2666 as_fn_error $? "please read GIT-Access.txt before trying to build from git" "$LINENO" 5
7bb76013 2667
f16c9b18
AJ
2668fi
2669
2670else
2671
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if you downloaded the correct source code tarball" >&5
2673$as_echo_n "checking if you downloaded the correct source code tarball... " >&6; }
2674 if test -f "include/atheme/serno.h"; then :
2675
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7bb76013
AJ
2677$as_echo "yes" >&6; }
2678
2679else
2680
f16c9b18 2681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1df7fa63 2682$as_echo "no" >&6; }
f16c9b18
AJ
2683 as_fn_error $? "please read the Obtaining Atheme section of README.md" "$LINENO" 5
2684
2685fi
7bb76013 2686
1df7fa63 2687fi
1df7fa63 2688
ddf1c059
AJ
2689
2690
2691
2692
90121a3e
AJ
2693# If CFLAGS is empty or unset, explicitly set it to the empty string, so that
2694# AC_PROG_CC (below) does not add "-O2 -g", as this will conflict with the
2695# optimisation flags that the compiler sanitizers feature uses, and the
2696# more advanced debugging flags detection that the CFLAGS feature test uses
2697if test "x${CFLAGS:-}" = "x"; then :
2698 CFLAGS=""
2699fi
2700
016d2768 2701# Programs required by the build system
c2d29773
AJ
2702ac_ext=c
2703ac_cpp='$CPP $CPPFLAGS'
2704ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2705ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2706ac_compiler_gnu=$ac_cv_c_compiler_gnu
2707if test -n "$ac_tool_prefix"; then
2708 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2709set dummy ${ac_tool_prefix}gcc; ac_word=$2
472c7f87
WP
2710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2711$as_echo_n "checking for $ac_word... " >&6; }
c2d29773 2712if ${ac_cv_prog_CC+:} false; then :
472c7f87
WP
2713 $as_echo_n "(cached) " >&6
2714else
c2d29773
AJ
2715 if test -n "$CC"; then
2716 ac_cv_prog_CC="$CC" # Let the user override the test.
2717else
2718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
472c7f87
WP
2719for as_dir in $PATH
2720do
2721 IFS=$as_save_IFS
2722 test -z "$as_dir" && as_dir=.
2723 for ac_exec_ext in '' $ac_executable_extensions; do
2724 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c2d29773 2725 ac_cv_prog_CC="${ac_tool_prefix}gcc"
472c7f87
WP
2726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2727 break 2
2728 fi
2729done
2730 done
2731IFS=$as_save_IFS
2732
472c7f87 2733fi
c2d29773
AJ
2734fi
2735CC=$ac_cv_prog_CC
2736if test -n "$CC"; then
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2738$as_echo "$CC" >&6; }
472c7f87
WP
2739else
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2741$as_echo "no" >&6; }
2742fi
2743
2744
c2d29773
AJ
2745fi
2746if test -z "$ac_cv_prog_CC"; then
2747 ac_ct_CC=$CC
2748 # Extract the first word of "gcc", so it can be a program name with args.
2749set dummy gcc; ac_word=$2
2750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2751$as_echo_n "checking for $ac_word... " >&6; }
2752if ${ac_cv_prog_ac_ct_CC+:} false; then :
2753 $as_echo_n "(cached) " >&6
2754else
2755 if test -n "$ac_ct_CC"; then
2756 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2757else
2758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2759for as_dir in $PATH
2760do
2761 IFS=$as_save_IFS
2762 test -z "$as_dir" && as_dir=.
2763 for ac_exec_ext in '' $ac_executable_extensions; do
2764 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2765 ac_cv_prog_ac_ct_CC="gcc"
2766 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2767 break 2
2768 fi
2769done
2770 done
2771IFS=$as_save_IFS
472c7f87 2772
c2d29773
AJ
2773fi
2774fi
2775ac_ct_CC=$ac_cv_prog_ac_ct_CC
2776if test -n "$ac_ct_CC"; then
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2778$as_echo "$ac_ct_CC" >&6; }
2779else
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2781$as_echo "no" >&6; }
2782fi
472c7f87 2783
c2d29773
AJ
2784 if test "x$ac_ct_CC" = x; then
2785 CC=""
2786 else
2787 case $cross_compiling:$ac_tool_warned in
2788yes:)
2789{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2790$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2791ac_tool_warned=yes ;;
2792esac
2793 CC=$ac_ct_CC
2794 fi
2795else
2796 CC="$ac_cv_prog_CC"
2797fi
472c7f87 2798
c2d29773
AJ
2799if test -z "$CC"; then
2800 if test -n "$ac_tool_prefix"; then
2801 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2802set dummy ${ac_tool_prefix}cc; ac_word=$2
2803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2804$as_echo_n "checking for $ac_word... " >&6; }
2805if ${ac_cv_prog_CC+:} false; then :
2806 $as_echo_n "(cached) " >&6
2807else
2808 if test -n "$CC"; then
2809 ac_cv_prog_CC="$CC" # Let the user override the test.
2810else
2811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2812for as_dir in $PATH
2813do
2814 IFS=$as_save_IFS
2815 test -z "$as_dir" && as_dir=.
2816 for ac_exec_ext in '' $ac_executable_extensions; do
2817 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2818 ac_cv_prog_CC="${ac_tool_prefix}cc"
2819 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2820 break 2
2821 fi
2822done
2823 done
2824IFS=$as_save_IFS
472c7f87 2825
c2d29773
AJ
2826fi
2827fi
2828CC=$ac_cv_prog_CC
2829if test -n "$CC"; then
2830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2831$as_echo "$CC" >&6; }
2832else
2833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2834$as_echo "no" >&6; }
2835fi
472c7f87 2836
472c7f87 2837
c2d29773
AJ
2838 fi
2839fi
2840if test -z "$CC"; then
2841 # Extract the first word of "cc", so it can be a program name with args.
2842set dummy cc; ac_word=$2
2843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2844$as_echo_n "checking for $ac_word... " >&6; }
2845if ${ac_cv_prog_CC+:} false; then :
2846 $as_echo_n "(cached) " >&6
2847else
2848 if test -n "$CC"; then
2849 ac_cv_prog_CC="$CC" # Let the user override the test.
2850else
2851 ac_prog_rejected=no
2852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2853for as_dir in $PATH
2854do
2855 IFS=$as_save_IFS
2856 test -z "$as_dir" && as_dir=.
2857 for ac_exec_ext in '' $ac_executable_extensions; do
2858 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2859 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2860 ac_prog_rejected=yes
2861 continue
2862 fi
2863 ac_cv_prog_CC="cc"
2864 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2865 break 2
2866 fi
2867done
2868 done
2869IFS=$as_save_IFS
472c7f87 2870
c2d29773
AJ
2871if test $ac_prog_rejected = yes; then
2872 # We found a bogon in the path, so make sure we never use it.
2873 set dummy $ac_cv_prog_CC
2874 shift
2875 if test $# != 0; then
2876 # We chose a different compiler from the bogus one.
2877 # However, it has the same basename, so the bogon will be chosen
2878 # first if we set CC to just the basename; use the full file name.
2879 shift
2880 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2881 fi
2882fi
2883fi
2884fi
2885CC=$ac_cv_prog_CC
2886if test -n "$CC"; then
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2888$as_echo "$CC" >&6; }
2889else
2890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2891$as_echo "no" >&6; }
2892fi
472c7f87 2893
472c7f87 2894
c2d29773
AJ
2895fi
2896if test -z "$CC"; then
2897 if test -n "$ac_tool_prefix"; then
2898 for ac_prog in cl.exe
2899 do
2900 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2901set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2903$as_echo_n "checking for $ac_word... " >&6; }
2904if ${ac_cv_prog_CC+:} false; then :
2905 $as_echo_n "(cached) " >&6
2906else
2907 if test -n "$CC"; then
2908 ac_cv_prog_CC="$CC" # Let the user override the test.
2909else
2910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2911for as_dir in $PATH
2912do
2913 IFS=$as_save_IFS
2914 test -z "$as_dir" && as_dir=.
2915 for ac_exec_ext in '' $ac_executable_extensions; do
2916 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2917 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2918 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2919 break 2
2920 fi
2921done
2922 done
2923IFS=$as_save_IFS
472c7f87 2924
c2d29773
AJ
2925fi
2926fi
2927CC=$ac_cv_prog_CC
2928if test -n "$CC"; then
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2930$as_echo "$CC" >&6; }
2931else
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2933$as_echo "no" >&6; }
2934fi
472c7f87 2935
472c7f87 2936
c2d29773
AJ
2937 test -n "$CC" && break
2938 done
2939fi
2940if test -z "$CC"; then
2941 ac_ct_CC=$CC
2942 for ac_prog in cl.exe
2943do
2944 # Extract the first word of "$ac_prog", so it can be a program name with args.
2945set dummy $ac_prog; ac_word=$2
2946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2947$as_echo_n "checking for $ac_word... " >&6; }
2948if ${ac_cv_prog_ac_ct_CC+:} false; then :
2949 $as_echo_n "(cached) " >&6
2950else
2951 if test -n "$ac_ct_CC"; then
2952 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
472c7f87 2953else
c2d29773
AJ
2954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2955for as_dir in $PATH
2956do
2957 IFS=$as_save_IFS
2958 test -z "$as_dir" && as_dir=.
2959 for ac_exec_ext in '' $ac_executable_extensions; do
2960 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2961 ac_cv_prog_ac_ct_CC="$ac_prog"
2962 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2963 break 2
2964 fi
2965done
2966 done
2967IFS=$as_save_IFS
472c7f87 2968
c2d29773
AJ
2969fi
2970fi
2971ac_ct_CC=$ac_cv_prog_ac_ct_CC
2972if test -n "$ac_ct_CC"; then
2973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2974$as_echo "$ac_ct_CC" >&6; }
2975else
2976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2977$as_echo "no" >&6; }
2978fi
472c7f87 2979
472c7f87 2980
c2d29773
AJ
2981 test -n "$ac_ct_CC" && break
2982done
472c7f87 2983
c2d29773
AJ
2984 if test "x$ac_ct_CC" = x; then
2985 CC=""
2986 else
2987 case $cross_compiling:$ac_tool_warned in
2988yes:)
2989{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2990$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2991ac_tool_warned=yes ;;
2992esac
2993 CC=$ac_ct_CC
2994 fi
2995fi
472c7f87 2996
c2d29773 2997fi
472c7f87 2998
472c7f87 2999
c2d29773
AJ
3000test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3001$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3002as_fn_error $? "no acceptable C compiler found in \$PATH
3003See \`config.log' for more details" "$LINENO" 5; }
472c7f87 3004
c2d29773
AJ
3005# Provide some information about the compiler.
3006$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3007set X $ac_compile
3008ac_compiler=$2
3009for ac_option in --version -v -V -qversion; do
3010 { { ac_try="$ac_compiler $ac_option >&5"
3011case "(($ac_try" in
3012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3013 *) ac_try_echo=$ac_try;;
3014esac
3015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3016$as_echo "$ac_try_echo"; } >&5
3017 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3018 ac_status=$?
3019 if test -s conftest.err; then
3020 sed '10a\
3021... rest of stderr output deleted ...
3022 10q' conftest.err >conftest.er1
3023 cat conftest.er1 >&5
3024 fi
3025 rm -f conftest.er1 conftest.err
3026 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3027 test $ac_status = 0; }
3028done
472c7f87 3029
c2d29773
AJ
3030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3031/* end confdefs.h. */
472c7f87 3032
c2d29773
AJ
3033int
3034main ()
3035{
472c7f87 3036
c2d29773
AJ
3037 ;
3038 return 0;
3039}
3040_ACEOF
3041ac_clean_files_save=$ac_clean_files
3042ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3043# Try to create an executable without -o first, disregard a.out.
3044# It will help us diagnose broken compilers, and finding out an intuition
3045# of exeext.
3046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3047$as_echo_n "checking whether the C compiler works... " >&6; }
3048ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
7680beb8 3049
c2d29773
AJ
3050# The possible output files:
3051ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
7680beb8 3052
c2d29773
AJ
3053ac_rmfiles=
3054for ac_file in $ac_files
3055do
3056 case $ac_file in
3057 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3058 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3059 esac
3060done
3061rm -f $ac_rmfiles
7680beb8 3062
c2d29773
AJ
3063if { { ac_try="$ac_link_default"
3064case "(($ac_try" in
3065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3066 *) ac_try_echo=$ac_try;;
3067esac
3068eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3069$as_echo "$ac_try_echo"; } >&5
3070 (eval "$ac_link_default") 2>&5
3071 ac_status=$?
3072 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3073 test $ac_status = 0; }; then :
3074 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3075# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3076# in a Makefile. We should not override ac_cv_exeext if it was cached,
3077# so that the user can short-circuit this test for compilers unknown to
3078# Autoconf.
3079for ac_file in $ac_files ''
3080do
3081 test -f "$ac_file" || continue
3082 case $ac_file in
3083 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3084 ;;
3085 [ab].out )
3086 # We found the default executable, but exeext='' is most
3087 # certainly right.
3088 break;;
3089 *.* )
3090 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3091 then :; else
3092 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3093 fi
3094 # We set ac_cv_exeext here because the later test for it is not
3095 # safe: cross compilers may not add the suffix if given an `-o'
3096 # argument, so we may need to know it at that point already.
3097 # Even if this section looks crufty: it has the advantage of
3098 # actually working.
3099 break;;
3100 * )
3101 break;;
3102 esac
3103done
3104test "$ac_cv_exeext" = no && ac_cv_exeext=
7680beb8 3105
7680beb8 3106else
c2d29773 3107 ac_file=''
7680beb8 3108fi
c2d29773
AJ
3109if test -z "$ac_file"; then :
3110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3111$as_echo "no" >&6; }
3112$as_echo "$as_me: failed program was:" >&5
3113sed 's/^/| /' conftest.$ac_ext >&5
7680beb8 3114
c2d29773
AJ
3115{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3116$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3117as_fn_error 77 "C compiler cannot create executables
3118See \`config.log' for more details" "$LINENO" 5; }
3119else
3120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3121$as_echo "yes" >&6; }
7680beb8 3122fi
c2d29773
AJ
3123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3124$as_echo_n "checking for C compiler default output file name... " >&6; }
3125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3126$as_echo "$ac_file" >&6; }
3127ac_exeext=$ac_cv_exeext
3128
3129rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3130ac_clean_files=$ac_clean_files_save
3131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3132$as_echo_n "checking for suffix of executables... " >&6; }
3133if { { ac_try="$ac_link"
3134case "(($ac_try" in
3135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3136 *) ac_try_echo=$ac_try;;
7680beb8 3137esac
c2d29773
AJ
3138eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3139$as_echo "$ac_try_echo"; } >&5
3140 (eval "$ac_link") 2>&5
3141 ac_status=$?
3142 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3143 test $ac_status = 0; }; then :
3144 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3145# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3146# work properly (i.e., refer to `conftest.exe'), while it won't with
3147# `rm'.
3148for ac_file in conftest.exe conftest conftest.*; do
3149 test -f "$ac_file" || continue
3150 case $ac_file in
3151 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3152 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3153 break;;
3154 * ) break;;
3155 esac
3156done
3157else
3158 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3159$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3160as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3161See \`config.log' for more details" "$LINENO" 5; }
3162fi
3163rm -f conftest conftest$ac_cv_exeext
3164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3165$as_echo "$ac_cv_exeext" >&6; }
7680beb8 3166
c2d29773
AJ
3167rm -f conftest.$ac_ext
3168EXEEXT=$ac_cv_exeext
3169ac_exeext=$EXEEXT
3170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3171/* end confdefs.h. */
3172#include <stdio.h>
3173int
3174main ()
3175{
3176FILE *f = fopen ("conftest.out", "w");
3177 return ferror (f) || fclose (f) != 0;
7680beb8 3178
c2d29773
AJ
3179 ;
3180 return 0;
3181}
3182_ACEOF
3183ac_clean_files="$ac_clean_files conftest.out"
3184# Check that the compiler produces executables we can run. If not, either
3185# the compiler is broken, or we cross compile.
3186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3187$as_echo_n "checking whether we are cross compiling... " >&6; }
3188if test "$cross_compiling" != yes; then
3189 { { ac_try="$ac_link"
3190case "(($ac_try" in
3191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3192 *) ac_try_echo=$ac_try;;
3193esac
3194eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3195$as_echo "$ac_try_echo"; } >&5
3196 (eval "$ac_link") 2>&5
3197 ac_status=$?
3198 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3199 test $ac_status = 0; }
3200 if { ac_try='./conftest$ac_cv_exeext'
3201 { { case "(($ac_try" in
3202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3203 *) ac_try_echo=$ac_try;;
3204esac
3205eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3206$as_echo "$ac_try_echo"; } >&5
3207 (eval "$ac_try") 2>&5
3208 ac_status=$?
3209 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3210 test $ac_status = 0; }; }; then
3211 cross_compiling=no
3212 else
3213 if test "$cross_compiling" = maybe; then
3214 cross_compiling=yes
3215 else
3216 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3217$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3218as_fn_error $? "cannot run C compiled programs.
3219If you meant to cross compile, use \`--host'.
3220See \`config.log' for more details" "$LINENO" 5; }
3221 fi
3222 fi
3223fi
3224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3225$as_echo "$cross_compiling" >&6; }
85f61964 3226
c2d29773
AJ
3227rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3228ac_clean_files=$ac_clean_files_save
3229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3230$as_echo_n "checking for suffix of object files... " >&6; }
3231if ${ac_cv_objext+:} false; then :
3232 $as_echo_n "(cached) " >&6
3233else
3234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3235/* end confdefs.h. */
85f61964 3236
c2d29773
AJ
3237int
3238main ()
3239{
472c7f87 3240
c2d29773
AJ
3241 ;
3242 return 0;
3243}
3244_ACEOF
3245rm -f conftest.o conftest.obj
3246if { { ac_try="$ac_compile"
3247case "(($ac_try" in
3248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3249 *) ac_try_echo=$ac_try;;
3250esac
3251eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3252$as_echo "$ac_try_echo"; } >&5
3253 (eval "$ac_compile") 2>&5
3254 ac_status=$?
3255 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3256 test $ac_status = 0; }; then :
3257 for ac_file in conftest.o conftest.obj conftest.*; do
3258 test -f "$ac_file" || continue;
3259 case $ac_file in
3260 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3261 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3262 break;;
3263 esac
07c7b319 3264done
c2d29773
AJ
3265else
3266 $as_echo "$as_me: failed program was:" >&5
3267sed 's/^/| /' conftest.$ac_ext >&5
85f61964 3268
c2d29773
AJ
3269{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3270$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3271as_fn_error $? "cannot compute suffix of object files: cannot compile
3272See \`config.log' for more details" "$LINENO" 5; }
07c7b319 3273fi
c2d29773 3274rm -f conftest.$ac_cv_objext conftest.$ac_ext
85f61964 3275fi
c2d29773
AJ
3276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3277$as_echo "$ac_cv_objext" >&6; }
3278OBJEXT=$ac_cv_objext
3279ac_objext=$OBJEXT
3280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3281$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3282if ${ac_cv_c_compiler_gnu+:} false; then :
3283 $as_echo_n "(cached) " >&6
3284else
3285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3286/* end confdefs.h. */
07c7b319 3287
c2d29773
AJ
3288int
3289main ()
3290{
3291#ifndef __GNUC__
3292 choke me
3293#endif
85f61964 3294
c2d29773
AJ
3295 ;
3296 return 0;
3297}
3298_ACEOF
3299if ac_fn_c_try_compile "$LINENO"; then :
3300 ac_compiler_gnu=yes
85f61964 3301else
c2d29773
AJ
3302 ac_compiler_gnu=no
3303fi
3304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3305ac_cv_c_compiler_gnu=$ac_compiler_gnu
85f61964 3306
85f61964 3307fi
c2d29773
AJ
3308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3309$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3310if test $ac_compiler_gnu = yes; then
3311 GCC=yes
07c7b319 3312else
c2d29773 3313 GCC=
07c7b319 3314fi
c2d29773
AJ
3315ac_test_CFLAGS=${CFLAGS+set}
3316ac_save_CFLAGS=$CFLAGS
3317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3318$as_echo_n "checking whether $CC accepts -g... " >&6; }
3319if ${ac_cv_prog_cc_g+:} false; then :
07c7b319
JT
3320 $as_echo_n "(cached) " >&6
3321else
c2d29773
AJ
3322 ac_save_c_werror_flag=$ac_c_werror_flag
3323 ac_c_werror_flag=yes
3324 ac_cv_prog_cc_g=no
3325 CFLAGS="-g"
3326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3327/* end confdefs.h. */
85f61964 3328
c2d29773
AJ
3329int
3330main ()
3331{
3332
3333 ;
3334 return 0;
3335}
3336_ACEOF
3337if ac_fn_c_try_compile "$LINENO"; then :
3338 ac_cv_prog_cc_g=yes
85f61964 3339else
c2d29773
AJ
3340 CFLAGS=""
3341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3342/* end confdefs.h. */
85f61964 3343
c2d29773
AJ
3344int
3345main ()
3346{
85f61964 3347
c2d29773
AJ
3348 ;
3349 return 0;
3350}
3351_ACEOF
3352if ac_fn_c_try_compile "$LINENO"; then :
472c7f87 3353
472c7f87 3354else
c2d29773
AJ
3355 ac_c_werror_flag=$ac_save_c_werror_flag
3356 CFLAGS="-g"
3357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3358/* end confdefs.h. */
472c7f87 3359
c2d29773
AJ
3360int
3361main ()
3362{
472c7f87 3363
c2d29773
AJ
3364 ;
3365 return 0;
3366}
3367_ACEOF
3368if ac_fn_c_try_compile "$LINENO"; then :
3369 ac_cv_prog_cc_g=yes
3370fi
3371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3372fi
3373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3374fi
3375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3376 ac_c_werror_flag=$ac_save_c_werror_flag
3377fi
3378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3379$as_echo "$ac_cv_prog_cc_g" >&6; }
3380if test "$ac_test_CFLAGS" = set; then
3381 CFLAGS=$ac_save_CFLAGS
3382elif test $ac_cv_prog_cc_g = yes; then
3383 if test "$GCC" = yes; then
3384 CFLAGS="-g -O2"
3385 else
3386 CFLAGS="-g"
3387 fi
f5b33c99 3388else
c2d29773
AJ
3389 if test "$GCC" = yes; then
3390 CFLAGS="-O2"
3391 else
3392 CFLAGS=
3393 fi
f5b33c99 3394fi
c2d29773
AJ
3395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3396$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3397if ${ac_cv_prog_cc_c89+:} false; then :
472c7f87
WP
3398 $as_echo_n "(cached) " >&6
3399else
c2d29773
AJ
3400 ac_cv_prog_cc_c89=no
3401ac_save_CC=$CC
3402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3403/* end confdefs.h. */
3404#include <stdarg.h>
3405#include <stdio.h>
3406struct stat;
3407/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3408struct buf { int x; };
3409FILE * (*rcsopen) (struct buf *, struct stat *, int);
3410static char *e (p, i)
3411 char **p;
3412 int i;
3413{
3414 return p[i];
3415}
3416static char *f (char * (*g) (char **, int), char **p, ...)
3417{
3418 char *s;
3419 va_list v;
3420 va_start (v,p);
3421 s = g (p, va_arg (v,int));
3422 va_end (v);
3423 return s;
3424}
3425
3426/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3427 function prototypes and stuff, but not '\xHH' hex character constants.
3428 These don't provoke an error unfortunately, instead are silently treated
3429 as 'x'. The following induces an error, until -std is added to get
3430 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3431 array size at least. It's necessary to write '\x00'==0 to get something
3432 that's true only with -std. */
3433int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3434
3435/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3436 inside strings and character constants. */
3437#define FOO(x) 'x'
3438int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3439
3440int test (int i, double x);
3441struct s1 {int (*f) (int a);};
3442struct s2 {int (*f) (double a);};
3443int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3444int argc;
3445char **argv;
3446int
3447main ()
3448{
3449return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3450 ;
3451 return 0;
3452}
3453_ACEOF
3454for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3455 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
472c7f87 3456do
c2d29773
AJ
3457 CC="$ac_save_CC $ac_arg"
3458 if ac_fn_c_try_compile "$LINENO"; then :
3459 ac_cv_prog_cc_c89=$ac_arg
3460fi
3461rm -f core conftest.err conftest.$ac_objext
3462 test "x$ac_cv_prog_cc_c89" != "xno" && break
472c7f87 3463done
c2d29773
AJ
3464rm -f conftest.$ac_ext
3465CC=$ac_save_CC
472c7f87 3466
472c7f87 3467fi
c2d29773
AJ
3468# AC_CACHE_VAL
3469case "x$ac_cv_prog_cc_c89" in
3470 x)
3471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3472$as_echo "none needed" >&6; } ;;
3473 xno)
3474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3475$as_echo "unsupported" >&6; } ;;
3476 *)
3477 CC="$CC $ac_cv_prog_cc_c89"
3478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3479$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3480esac
3481if test "x$ac_cv_prog_cc_c89" != xno; then :
3482
472c7f87
WP
3483fi
3484
c2d29773
AJ
3485ac_ext=c
3486ac_cpp='$CPP $CPPFLAGS'
3487ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3488ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3489ac_compiler_gnu=$ac_cv_c_compiler_gnu
472c7f87 3490
c2d29773
AJ
3491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
3492$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
3493if ${ac_cv_prog_cc_c99+:} false; then :
3494 $as_echo_n "(cached) " >&6
3495else
3496 ac_cv_prog_cc_c99=no
3497ac_save_CC=$CC
3498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3499/* end confdefs.h. */
3500#include <stdarg.h>
3501#include <stdbool.h>
3502#include <stdlib.h>
3503#include <wchar.h>
3504#include <stdio.h>
3505
3506// Check varargs macros. These examples are taken from C99 6.10.3.5.
3507#define debug(...) fprintf (stderr, __VA_ARGS__)
3508#define showlist(...) puts (#__VA_ARGS__)
3509#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3510static void
3511test_varargs_macros (void)
3512{
3513 int x = 1234;
3514 int y = 5678;
3515 debug ("Flag");
3516 debug ("X = %d\n", x);
3517 showlist (The first, second, and third items.);
3518 report (x>y, "x is %d but y is %d", x, y);
3519}
3520
3521// Check long long types.
3522#define BIG64 18446744073709551615ull
3523#define BIG32 4294967295ul
3524#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3525#if !BIG_OK
3526 your preprocessor is broken;
3527#endif
3528#if BIG_OK
3529#else
3530 your preprocessor is broken;
3531#endif
3532static long long int bignum = -9223372036854775807LL;
3533static unsigned long long int ubignum = BIG64;
3534
3535struct incomplete_array
3536{
3537 int datasize;
3538 double data[];
3539};
3540
3541struct named_init {
3542 int number;
3543 const wchar_t *name;
3544 double average;
3545};
3546
3547typedef const char *ccp;
3548
3549static inline int
3550test_restrict (ccp restrict text)
3551{
3552 // See if C++-style comments work.
3553 // Iterate through items via the restricted pointer.
3554 // Also check for declarations in for loops.
3555 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
3556 continue;
3557 return 0;
3558}
3559
3560// Check varargs and va_copy.
3561static void
3562test_varargs (const char *format, ...)
3563{
3564 va_list args;
3565 va_start (args, format);
3566 va_list args_copy;
3567 va_copy (args_copy, args);
3568
3569 const char *str;
3570 int number;
3571 float fnumber;
3572
3573 while (*format)
3574 {
3575 switch (*format++)
3576 {
3577 case 's': // string
3578 str = va_arg (args_copy, const char *);
3579 break;
3580 case 'd': // int
3581 number = va_arg (args_copy, int);
3582 break;
3583 case 'f': // float
3584 fnumber = va_arg (args_copy, double);
3585 break;
3586 default:
3587 break;
3588 }
3589 }
3590 va_end (args_copy);
3591 va_end (args);
3592}
3593
3594int
3595main ()
3596{
3597
3598 // Check bool.
3599 _Bool success = false;
3600
3601 // Check restrict.
3602 if (test_restrict ("String literal") == 0)
3603 success = true;
3604 char *restrict newvar = "Another string";
3605
3606 // Check varargs.
3607 test_varargs ("s, d' f .", "string", 65, 34.234);
3608 test_varargs_macros ();
3609
3610 // Check flexible array members.
3611 struct incomplete_array *ia =
3612 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
3613 ia->datasize = 10;
3614 for (int i = 0; i < ia->datasize; ++i)
3615 ia->data[i] = i * 1.234;
3616
3617 // Check named initializers.
3618 struct named_init ni = {
3619 .number = 34,
3620 .name = L"Test wide string",
3621 .average = 543.34343,
3622 };
3623
3624 ni.number = 58;
3625
3626 int dynamic_array[ni.number];
3627 dynamic_array[ni.number - 1] = 543;
3628
3629 // work around unused variable warnings
3630 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
3631 || dynamic_array[ni.number - 1] != 543);
3632
3633 ;
3634 return 0;
3635}
3636_ACEOF
3637for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
3638do
3639 CC="$ac_save_CC $ac_arg"
3640 if ac_fn_c_try_compile "$LINENO"; then :
3641 ac_cv_prog_cc_c99=$ac_arg
3642fi
3643rm -f core conftest.err conftest.$ac_objext
3644 test "x$ac_cv_prog_cc_c99" != "xno" && break
3645done
3646rm -f conftest.$ac_ext
3647CC=$ac_save_CC
3648
3649fi
3650# AC_CACHE_VAL
3651case "x$ac_cv_prog_cc_c99" in
3652 x)
3653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3654$as_echo "none needed" >&6; } ;;
3655 xno)
3656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3657$as_echo "unsupported" >&6; } ;;
3658 *)
3659 CC="$CC $ac_cv_prog_cc_c99"
3660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3661$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
3662esac
3663if test "x$ac_cv_prog_cc_c99" != xno; then :
3664
3665fi
3666
3667
cd4715f2
AJ
3668if test "x${ac_cv_prog_cc_c99}" = "xno"; then :
3669
3670 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3672as_fn_error $? "This program requires a C99 compiler
3673See \`config.log' for more details" "$LINENO" 5; }
3674
3675fi
f4af9bd1
WC
3676if test -n "$ac_tool_prefix"; then
3677 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3678set dummy ${ac_tool_prefix}ar; ac_word=$2
c2d29773 3679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
472c7f87 3680$as_echo_n "checking for $ac_word... " >&6; }
f4af9bd1 3681if ${ac_cv_prog_AR+:} false; then :
472c7f87
WP
3682 $as_echo_n "(cached) " >&6
3683else
f4af9bd1
WC
3684 if test -n "$AR"; then
3685 ac_cv_prog_AR="$AR" # Let the user override the test.
3686else
3687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
472c7f87
WP
3688for as_dir in $PATH
3689do
3690 IFS=$as_save_IFS
3691 test -z "$as_dir" && as_dir=.
3692 for ac_exec_ext in '' $ac_executable_extensions; do
3693 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
f4af9bd1 3694 ac_cv_prog_AR="${ac_tool_prefix}ar"
472c7f87
WP
3695 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3696 break 2
3697 fi
3698done
3699 done
3700IFS=$as_save_IFS
3701
472c7f87 3702fi
f4af9bd1
WC
3703fi
3704AR=$ac_cv_prog_AR
472c7f87
WP
3705if test -n "$AR"; then
3706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
3707$as_echo "$AR" >&6; }
3708else
3709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3710$as_echo "no" >&6; }
3711fi
3712
3713
f4af9bd1
WC
3714fi
3715if test -z "$ac_cv_prog_AR"; then
3716 ac_ct_AR=$AR
3717 # Extract the first word of "ar", so it can be a program name with args.
3718set dummy ar; ac_word=$2
3719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3720$as_echo_n "checking for $ac_word... " >&6; }
3721if ${ac_cv_prog_ac_ct_AR+:} false; then :
3722 $as_echo_n "(cached) " >&6
3723else
3724 if test -n "$ac_ct_AR"; then
3725 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3726else
3727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3728for as_dir in $PATH
3729do
3730 IFS=$as_save_IFS
3731 test -z "$as_dir" && as_dir=.
3732 for ac_exec_ext in '' $ac_executable_extensions; do
3733 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3734 ac_cv_prog_ac_ct_AR="ar"
3735 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3736 break 2
3737 fi
3738done
3739 done
3740IFS=$as_save_IFS
3741
3742fi
3743fi
3744ac_ct_AR=$ac_cv_prog_ac_ct_AR
3745if test -n "$ac_ct_AR"; then
3746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
3747$as_echo "$ac_ct_AR" >&6; }
3748else
3749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3750$as_echo "no" >&6; }
3751fi
3752
3753 if test "x$ac_ct_AR" = x; then
3754 AR=""
3755 else
3756 case $cross_compiling:$ac_tool_warned in
3757yes:)
3758{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3759$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3760ac_tool_warned=yes ;;
3761esac
3762 AR=$ac_ct_AR
3763 fi
3764else
3765 AR="$ac_cv_prog_AR"
3766fi
3767
c2d29773
AJ
3768# Extract the first word of "cp", so it can be a program name with args.
3769set dummy cp; ac_word=$2
472c7f87
WP
3770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3771$as_echo_n "checking for $ac_word... " >&6; }
c2d29773 3772if ${ac_cv_path_CP+:} false; then :
472c7f87
WP
3773 $as_echo_n "(cached) " >&6
3774else
c2d29773
AJ
3775 case $CP in
3776 [\\/]* | ?:[\\/]*)
3777 ac_cv_path_CP="$CP" # Let the user override the test with a path.
3778 ;;
3779 *)
3780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
472c7f87
WP
3781for as_dir in $PATH
3782do
3783 IFS=$as_save_IFS
3784 test -z "$as_dir" && as_dir=.
3785 for ac_exec_ext in '' $ac_executable_extensions; do
3786 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c2d29773 3787 ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
648c9700 3788 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
07c7b319
JT
3789 break 2
3790 fi
3791done
648c9700 3792 done
07c7b319
JT
3793IFS=$as_save_IFS
3794
c2d29773
AJ
3795 ;;
3796esac
85f61964 3797fi
c2d29773
AJ
3798CP=$ac_cv_path_CP
3799if test -n "$CP"; then
3800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
3801$as_echo "$CP" >&6; }
85f61964 3802else
648c9700 3803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
07c7b319 3804$as_echo "no" >&6; }
85f61964
WP
3805fi
3806
07c7b319 3807
6440ab19
AJ
3808# Find a good install program. We prefer a C program (faster),
3809# so one script is as good as another. But avoid the broken or
3810# incompatible versions:
3811# SysV /etc/install, /usr/sbin/install
3812# SunOS /usr/etc/install
3813# IRIX /sbin/install
3814# AIX /bin/install
3815# AmigaOS /C/install, which installs bootblocks on floppy discs
3816# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3817# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3818# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3819# OS/2's system install, which has a completely different semantic
3820# ./install, which can be erroneously created by make from ./install.sh.
3821# Reject install programs that cannot install multiple files.
3822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3823$as_echo_n "checking for a BSD-compatible install... " >&6; }
3824if test -z "$INSTALL"; then
3825if ${ac_cv_path_install+:} false; then :
07c7b319 3826 $as_echo_n "(cached) " >&6
85f61964 3827else
c2d29773 3828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6440ab19 3829for as_dir in $PATH
c2d29773
AJ
3830do
3831 IFS=$as_save_IFS
3832 test -z "$as_dir" && as_dir=.
3833 # Account for people who put trailing slashes in PATH elements.
3834case $as_dir/ in #((
3835 ./ | .// | /[cC]/* | \
3836 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3837 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3838 /usr/ucb/* ) ;;
3839 *)
3840 # OSF1 and SCO ODT 3.0 have their own names for install.
3841 # Don't use installbsd from OSF since it installs stuff as root
3842 # by default.
3843 for ac_prog in ginstall scoinst install; do
3844 for ac_exec_ext in '' $ac_executable_extensions; do
3845 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3846 if test $ac_prog = install &&
3847 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3848 # AIX install. It has an incompatible calling convention.
3849 :
3850 elif test $ac_prog = install &&
3851 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3852 # program-specific install script used by HP pwplus--don't use.
3853 :
3854 else
3855 rm -rf conftest.one conftest.two conftest.dir
3856 echo one > conftest.one
3857 echo two > conftest.two
3858 mkdir conftest.dir
3859 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3860 test -s conftest.one && test -s conftest.two &&
3861 test -s conftest.dir/conftest.one &&
3862 test -s conftest.dir/conftest.two
3863 then
3864 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3865 break 3
3866 fi
3867 fi
3868 fi
3869 done
3870 done
3871 ;;
07c7b319 3872esac
c2d29773
AJ
3873
3874 done
3875IFS=$as_save_IFS
3876
3877rm -rf conftest.one conftest.two conftest.dir
3878
3879fi
3880 if test "${ac_cv_path_install+set}" = set; then
3881 INSTALL=$ac_cv_path_install
3882 else
3883 # As a last resort, use the slow shell script. Don't cache a
3884 # value for INSTALL within a source directory, because that will
3885 # break other packages using the cache if that directory is
3886 # removed, or if the value is a relative name.
3887 INSTALL=$ac_install_sh
85f61964 3888 fi
85f61964 3889fi
c2d29773
AJ
3890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3891$as_echo "$INSTALL" >&6; }
85f61964 3892
c2d29773
AJ
3893# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3894# It thinks the first close brace ends the variable substitution.
3895test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3896
3897test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3898
3899test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3900
3901# Extract the first word of "ln", so it can be a program name with args.
3902set dummy ln; ac_word=$2
472c7f87
WP
3903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3904$as_echo_n "checking for $ac_word... " >&6; }
c2d29773 3905if ${ac_cv_path_LN+:} false; then :
472c7f87
WP
3906 $as_echo_n "(cached) " >&6
3907else
c2d29773
AJ
3908 case $LN in
3909 [\\/]* | ?:[\\/]*)
3910 ac_cv_path_LN="$LN" # Let the user override the test with a path.
3911 ;;
3912 *)
3913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
472c7f87
WP
3914for as_dir in $PATH
3915do
3916 IFS=$as_save_IFS
3917 test -z "$as_dir" && as_dir=.
3918 for ac_exec_ext in '' $ac_executable_extensions; do
3919 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c2d29773 3920 ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
472c7f87
WP
3921 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3922 break 2
3923 fi
3924done
3925 done
3926IFS=$as_save_IFS
85f61964 3927
c2d29773
AJ
3928 ;;
3929esac
472c7f87 3930fi
c2d29773
AJ
3931LN=$ac_cv_path_LN
3932if test -n "$LN"; then
3933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
3934$as_echo "$LN" >&6; }
472c7f87
WP
3935else
3936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3937$as_echo "no" >&6; }
3938fi
85f61964
WP
3939
3940
c2d29773
AJ
3941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
3942$as_echo_n "checking whether ln -s works... " >&6; }
3943LN_S=$as_ln_s
3944if test "$LN_S" = "ln -s"; then
3945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3946$as_echo "yes" >&6; }
3947else
3948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
3949$as_echo "no, using $LN_S" >&6; }
3950fi
3951
3952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3953$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3954set x ${MAKE-make}
3955ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3956if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
472c7f87
WP
3957 $as_echo_n "(cached) " >&6
3958else
c2d29773
AJ
3959 cat >conftest.make <<\_ACEOF
3960SHELL = /bin/sh
3961all:
3962 @echo '@@@%%%=$(MAKE)=@@@%%%'
3963_ACEOF
3964# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3965case `${MAKE-make} -f conftest.make 2>/dev/null` in
3966 *@@@%%%=?*=@@@%%%*)
3967 eval ac_cv_prog_make_${ac_make}_set=yes;;
3968 *)
3969 eval ac_cv_prog_make_${ac_make}_set=no;;
3970esac
3971rm -f conftest.make
3972fi
3973if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3975$as_echo "yes" >&6; }
3976 SET_MAKE=
472c7f87 3977else
c2d29773
AJ
3978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3979$as_echo "no" >&6; }
3980 SET_MAKE="MAKE=${MAKE-make}"
3981fi
3982
3983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3984$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3985if test -z "$MKDIR_P"; then
3986 if ${ac_cv_path_mkdir+:} false; then :
3987 $as_echo_n "(cached) " >&6
3988else
3989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3990for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3991do
3992 IFS=$as_save_IFS
3993 test -z "$as_dir" && as_dir=.
3994 for ac_prog in mkdir gmkdir; do
3995 for ac_exec_ext in '' $ac_executable_extensions; do
3996 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3997 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3998 'mkdir (GNU coreutils) '* | \
3999 'mkdir (coreutils) '* | \
4000 'mkdir (fileutils) '4.1*)
4001 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
4002 break 3;;
4003 esac
4004 done
4005 done
4006 done
4007IFS=$as_save_IFS
4008
4009fi
4010
4011 test -d ./--version && rmdir ./--version
4012 if test "${ac_cv_path_mkdir+set}" = set; then
4013 MKDIR_P="$ac_cv_path_mkdir -p"
4014 else
4015 # As a last resort, use the slow shell script. Don't cache a
4016 # value for MKDIR_P within a source directory, because that will
4017 # break other packages using the cache if that directory is
4018 # removed, or if the value is a relative name.
4019 MKDIR_P="$ac_install_sh -d"
4020 fi
4021fi
4022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4023$as_echo "$MKDIR_P" >&6; }
4024
4025# Extract the first word of "mv", so it can be a program name with args.
4026set dummy mv; ac_word=$2
4027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4028$as_echo_n "checking for $ac_word... " >&6; }
4029if ${ac_cv_path_MV+:} false; then :
4030 $as_echo_n "(cached) " >&6
4031else
4032 case $MV in
4033 [\\/]* | ?:[\\/]*)
4034 ac_cv_path_MV="$MV" # Let the user override the test with a path.
4035 ;;
4036 *)
4037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
472c7f87
WP
4038for as_dir in $PATH
4039do
4040 IFS=$as_save_IFS
4041 test -z "$as_dir" && as_dir=.
4042 for ac_exec_ext in '' $ac_executable_extensions; do
4043 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c2d29773 4044 ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
472c7f87
WP
4045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4046 break 2
4047 fi
4048done
4049 done
4050IFS=$as_save_IFS
4051
c2d29773
AJ
4052 ;;
4053esac
472c7f87 4054fi
c2d29773
AJ
4055MV=$ac_cv_path_MV
4056if test -n "$MV"; then
4057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
4058$as_echo "$MV" >&6; }
472c7f87
WP
4059else
4060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4061$as_echo "no" >&6; }
4062fi
4063
4064
c2d29773
AJ
4065if test -n "$ac_tool_prefix"; then
4066 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4067set dummy ${ac_tool_prefix}ranlib; ac_word=$2
472c7f87
WP
4068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4069$as_echo_n "checking for $ac_word... " >&6; }
c2d29773 4070if ${ac_cv_prog_RANLIB+:} false; then :
472c7f87
WP
4071 $as_echo_n "(cached) " >&6
4072else
c2d29773
AJ
4073 if test -n "$RANLIB"; then
4074 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
472c7f87
WP
4075else
4076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4077for as_dir in $PATH
4078do
4079 IFS=$as_save_IFS
4080 test -z "$as_dir" && as_dir=.
4081 for ac_exec_ext in '' $ac_executable_extensions; do
4082 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c2d29773 4083 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
472c7f87
WP
4084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4085 break 2
4086 fi
4087done
4088 done
4089IFS=$as_save_IFS
4090
4091fi
4092fi
c2d29773
AJ
4093RANLIB=$ac_cv_prog_RANLIB
4094if test -n "$RANLIB"; then
4095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4096$as_echo "$RANLIB" >&6; }
472c7f87
WP
4097else
4098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4099$as_echo "no" >&6; }
4100fi
4101
4102
472c7f87 4103fi
c2d29773
AJ
4104if test -z "$ac_cv_prog_RANLIB"; then
4105 ac_ct_RANLIB=$RANLIB
4106 # Extract the first word of "ranlib", so it can be a program name with args.
4107set dummy ranlib; ac_word=$2
472c7f87
WP
4108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4109$as_echo_n "checking for $ac_word... " >&6; }
c2d29773 4110if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
472c7f87
WP
4111 $as_echo_n "(cached) " >&6
4112else
c2d29773
AJ
4113 if test -n "$ac_ct_RANLIB"; then
4114 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
472c7f87
WP
4115else
4116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4117for as_dir in $PATH
4118do
4119 IFS=$as_save_IFS
4120 test -z "$as_dir" && as_dir=.
4121 for ac_exec_ext in '' $ac_executable_extensions; do
4122 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c2d29773 4123 ac_cv_prog_ac_ct_RANLIB="ranlib"
472c7f87
WP
4124 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4125 break 2
4126 fi
4127done
4128 done
4129IFS=$as_save_IFS
4130
4131fi
4132fi
c2d29773
AJ
4133ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4134if test -n "$ac_ct_RANLIB"; then
4135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4136$as_echo "$ac_ct_RANLIB" >&6; }
472c7f87
WP
4137else
4138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4139$as_echo "no" >&6; }
4140fi
4141
c2d29773
AJ
4142 if test "x$ac_ct_RANLIB" = x; then
4143 RANLIB=":"
472c7f87
WP
4144 else
4145 case $cross_compiling:$ac_tool_warned in
4146yes:)
4147{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4148$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4149ac_tool_warned=yes ;;
4150esac
c2d29773 4151 RANLIB=$ac_ct_RANLIB
472c7f87 4152 fi
c2d29773
AJ
4153else
4154 RANLIB="$ac_cv_prog_RANLIB"
472c7f87
WP
4155fi
4156
c2d29773
AJ
4157# Extract the first word of "rm", so it can be a program name with args.
4158set dummy rm; ac_word=$2
4159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4160$as_echo_n "checking for $ac_word... " >&6; }
4161if ${ac_cv_path_RM+:} false; then :
4162 $as_echo_n "(cached) " >&6
4163else
4164 case $RM in
4165 [\\/]* | ?:[\\/]*)
4166 ac_cv_path_RM="$RM" # Let the user override the test with a path.
4167 ;;
4168 *)
4169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4170for as_dir in $PATH
4171do
4172 IFS=$as_save_IFS
4173 test -z "$as_dir" && as_dir=.
4174 for ac_exec_ext in '' $ac_executable_extensions; do
4175 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4176 ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
4177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4178 break 2
472c7f87 4179 fi
472c7f87 4180done
c2d29773
AJ
4181 done
4182IFS=$as_save_IFS
472c7f87 4183
c2d29773
AJ
4184 ;;
4185esac
4186fi
4187RM=$ac_cv_path_RM
4188if test -n "$RM"; then
4189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
4190$as_echo "$RM" >&6; }
4191else
4192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4193$as_echo "no" >&6; }
4194fi
07c7b319 4195
07c7b319 4196
c2d29773
AJ
4197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4198$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4199if ${ac_cv_path_SED+:} false; then :
4200 $as_echo_n "(cached) " >&6
4201else
4202 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4203 for ac_i in 1 2 3 4 5 6 7; do
4204 ac_script="$ac_script$as_nl$ac_script"
4205 done
4206 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4207 { ac_script=; unset ac_script;}
4208 if test -z "$SED"; then
4209 ac_path_SED_found=false
4210 # Loop through the user's path and test for each of PROGNAME-LIST
4211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4212for as_dir in $PATH
07c7b319 4213do
c2d29773
AJ
4214 IFS=$as_save_IFS
4215 test -z "$as_dir" && as_dir=.
4216 for ac_prog in sed gsed; do
4217 for ac_exec_ext in '' $ac_executable_extensions; do
4218 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4219 as_fn_executable_p "$ac_path_SED" || continue
4220# Check for GNU ac_path_SED and select it if it is found.
4221 # Check for GNU $ac_path_SED
4222case `"$ac_path_SED" --version 2>&1` in
4223*GNU*)
4224 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4225*)
4226 ac_count=0
4227 $as_echo_n 0123456789 >"conftest.in"
4228 while :
4229 do
4230 cat "conftest.in" "conftest.in" >"conftest.tmp"
4231 mv "conftest.tmp" "conftest.in"
4232 cp "conftest.in" "conftest.nl"
4233 $as_echo '' >> "conftest.nl"
4234 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4235 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4236 as_fn_arith $ac_count + 1 && ac_count=$as_val
4237 if test $ac_count -gt ${ac_path_SED_max-0}; then
4238 # Best one so far, save it but keep looking for a better one
4239 ac_cv_path_SED="$ac_path_SED"
4240 ac_path_SED_max=$ac_count
4241 fi
4242 # 10*(2^10) chars as input seems more than enough
4243 test $ac_count -gt 10 && break
4244 done
4245 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
85f61964 4246esac
c2d29773
AJ
4247
4248 $ac_path_SED_found && break 3
4249 done
4250 done
4251 done
4252IFS=$as_save_IFS
4253 if test -z "$ac_cv_path_SED"; then
4254 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4255 fi
4256else
4257 ac_cv_path_SED=$SED
4258fi
4259
4260fi
4261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4262$as_echo "$ac_cv_path_SED" >&6; }
4263 SED="$ac_cv_path_SED"
4264 rm -f conftest.sed
4265
4266# Extract the first word of "tar", so it can be a program name with args.
4267set dummy tar; ac_word=$2
4268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4269$as_echo_n "checking for $ac_word... " >&6; }
4270if ${ac_cv_path_TAR+:} false; then :
4271 $as_echo_n "(cached) " >&6
4272else
4273 case $TAR in
4274 [\\/]* | ?:[\\/]*)
4275 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4276 ;;
4277 *)
4278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4279for as_dir in $PATH
07c7b319 4280do
c2d29773
AJ
4281 IFS=$as_save_IFS
4282 test -z "$as_dir" && as_dir=.
4283 for ac_exec_ext in '' $ac_executable_extensions; do
4284 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4285 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4286 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4287 break 2
4288 fi
07c7b319 4289done
c2d29773
AJ
4290 done
4291IFS=$as_save_IFS
07c7b319 4292
c2d29773
AJ
4293 ;;
4294esac
85f61964 4295fi
c2d29773
AJ
4296TAR=$ac_cv_path_TAR
4297if test -n "$TAR"; then
4298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
4299$as_echo "$TAR" >&6; }
4300else
fe2e2f74
WP
4301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4302$as_echo "no" >&6; }
c2d29773 4303fi
85f61964 4304
c2d29773
AJ
4305
4306
4307
4308
4309
4310
4311
4312
4313if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
4314 if test -n "$ac_tool_prefix"; then
4315 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4316set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4318$as_echo_n "checking for $ac_word... " >&6; }
4319if ${ac_cv_path_PKG_CONFIG+:} false; then :
4320 $as_echo_n "(cached) " >&6
fe2e2f74 4321else
c2d29773
AJ
4322 case $PKG_CONFIG in
4323 [\\/]* | ?:[\\/]*)
4324 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4325 ;;
4326 *)
4327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4328for as_dir in $PATH
4329do
4330 IFS=$as_save_IFS
4331 test -z "$as_dir" && as_dir=.
4332 for ac_exec_ext in '' $ac_executable_extensions; do
4333 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4334 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
4335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4336 break 2
4337 fi
4338done
4339 done
4340IFS=$as_save_IFS
07c7b319 4341
c2d29773 4342 ;;
07c7b319 4343esac
c2d29773
AJ
4344fi
4345PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4346if test -n "$PKG_CONFIG"; then
4347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
4348$as_echo "$PKG_CONFIG" >&6; }
07c7b319 4349else
6440ab19
AJ
4350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4351$as_echo "no" >&6; }
4352fi
4353
4354
4355fi
4356if test -z "$ac_cv_path_PKG_CONFIG"; then
4357 ac_pt_PKG_CONFIG=$PKG_CONFIG
4358 # Extract the first word of "pkg-config", so it can be a program name with args.
4359set dummy pkg-config; ac_word=$2
4360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4361$as_echo_n "checking for $ac_word... " >&6; }
4362if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
4363 $as_echo_n "(cached) " >&6
4364else
4365 case $ac_pt_PKG_CONFIG in
4366 [\\/]* | ?:[\\/]*)
4367 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4368 ;;
4369 *)
4370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4371for as_dir in $PATH
4372do
4373 IFS=$as_save_IFS
4374 test -z "$as_dir" && as_dir=.
4375 for ac_exec_ext in '' $ac_executable_extensions; do
4376 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4377 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
4378 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4379 break 2
4380 fi
4381done
4382 done
4383IFS=$as_save_IFS
4384
4385 ;;
4386esac
4387fi
4388ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4389if test -n "$ac_pt_PKG_CONFIG"; then
4390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
4391$as_echo "$ac_pt_PKG_CONFIG" >&6; }
4392else
4393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4394$as_echo "no" >&6; }
4395fi
4396
4397 if test "x$ac_pt_PKG_CONFIG" = x; then
4398 PKG_CONFIG=""
4399 else
4400 case $cross_compiling:$ac_tool_warned in
4401yes:)
4402{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4403$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4404ac_tool_warned=yes ;;
4405esac
4406 PKG_CONFIG=$ac_pt_PKG_CONFIG
4407 fi
4408else
4409 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4410fi
4411
4412fi
4413if test -n "$PKG_CONFIG"; then
4414 _pkg_min_version=0.9.0
4415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
4416$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
4417 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
4418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4419$as_echo "yes" >&6; }
4420 else
4421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4422$as_echo "no" >&6; }
4423 PKG_CONFIG=""
4424 fi
4425fi
4c8a7c19
AJ
4426if test -z "${PKG_CONFIG}"; then :
4427
4428 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: please consider installing pkg-config" >&5
4429$as_echo "$as_me: WARNING: please consider installing pkg-config" >&2;}
4430 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: many of this script's library and feature detection tests rely upon it being available" >&5
4431$as_echo "$as_me: WARNING: many of this script's library and feature detection tests rely upon it being available" >&2;}
4432 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: if you choose to do so, please re-run this script again" >&5
4433$as_echo "$as_me: WARNING: if you choose to do so, please re-run this script again" >&2;}
4434
4435fi
6440ab19
AJ
4436
4437# Does what its name implies. The above block can't be put into this function
4438# because of autotools black magic voodoo crap that no-one understands ...
4439
4440ac_ext=c
4441ac_cpp='$CPP $CPPFLAGS'
4442ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4443ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4444ac_compiler_gnu=$ac_cv_c_compiler_gnu
4445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4446$as_echo_n "checking how to run the C preprocessor... " >&6; }
4447# On Suns, sometimes $CPP names a directory.
4448if test -n "$CPP" && test -d "$CPP"; then
4449 CPP=
4450fi
4451if test -z "$CPP"; then
4452 if ${ac_cv_prog_CPP+:} false; then :
4453 $as_echo_n "(cached) " >&6
4454else
4455 # Double quotes because CPP needs to be expanded
4456 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4457 do
4458 ac_preproc_ok=false
4459for ac_c_preproc_warn_flag in '' yes
4460do
4461 # Use a header file that comes with gcc, so configuring glibc
4462 # with a fresh cross-compiler works.
4463 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4464 # <limits.h> exists even on freestanding compilers.
4465 # On the NeXT, cc -E runs the code through the compiler's parser,
4466 # not just through cpp. "Syntax error" is here to catch this case.
4467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4468/* end confdefs.h. */
4469#ifdef __STDC__
4470# include <limits.h>
4471#else
4472# include <assert.h>
4473#endif
4474 Syntax error
4475_ACEOF
4476if ac_fn_c_try_cpp "$LINENO"; then :
4477
4478else
4479 # Broken: fails on valid input.
4480continue
4481fi
4482rm -f conftest.err conftest.i conftest.$ac_ext
4483
4484 # OK, works on sane cases. Now check whether nonexistent headers
4485 # can be detected and how.
4486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4487/* end confdefs.h. */
4488#include <ac_nonexistent.h>
4489_ACEOF
4490if ac_fn_c_try_cpp "$LINENO"; then :
4491 # Broken: success on invalid input.
4492continue
4493else
4494 # Passes both tests.
4495ac_preproc_ok=:
4496break
4497fi
4498rm -f conftest.err conftest.i conftest.$ac_ext
4499
4500done
4501# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4502rm -f conftest.i conftest.err conftest.$ac_ext
4503if $ac_preproc_ok; then :
4504 break
4505fi
4506
4507 done
4508 ac_cv_prog_CPP=$CPP
4509
4510fi
4511 CPP=$ac_cv_prog_CPP
4512else
4513 ac_cv_prog_CPP=$CPP
4514fi
4515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4516$as_echo "$CPP" >&6; }
4517ac_preproc_ok=false
4518for ac_c_preproc_warn_flag in '' yes
4519do
4520 # Use a header file that comes with gcc, so configuring glibc
4521 # with a fresh cross-compiler works.
4522 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4523 # <limits.h> exists even on freestanding compilers.
4524 # On the NeXT, cc -E runs the code through the compiler's parser,
4525 # not just through cpp. "Syntax error" is here to catch this case.
4526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4527/* end confdefs.h. */
4528#ifdef __STDC__
4529# include <limits.h>
4530#else
4531# include <assert.h>
4532#endif
4533 Syntax error
4534_ACEOF
4535if ac_fn_c_try_cpp "$LINENO"; then :
4536
4537else
4538 # Broken: fails on valid input.
4539continue
4540fi
4541rm -f conftest.err conftest.i conftest.$ac_ext
4542
4543 # OK, works on sane cases. Now check whether nonexistent headers
4544 # can be detected and how.
4545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4546/* end confdefs.h. */
4547#include <ac_nonexistent.h>
4548_ACEOF
4549if ac_fn_c_try_cpp "$LINENO"; then :
4550 # Broken: success on invalid input.
4551continue
4552else
4553 # Passes both tests.
4554ac_preproc_ok=:
4555break
4556fi
4557rm -f conftest.err conftest.i conftest.$ac_ext
4558
4559done
4560# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4561rm -f conftest.i conftest.err conftest.$ac_ext
4562if $ac_preproc_ok; then :
4563
4564else
4565 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4566$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4567as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4568See \`config.log' for more details" "$LINENO" 5; }
4569fi
4570
4571ac_ext=c
4572ac_cpp='$CPP $CPPFLAGS'
4573ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4574ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4575ac_compiler_gnu=$ac_cv_c_compiler_gnu
4576
4577
4578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4579$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4580if ${ac_cv_path_GREP+:} false; then :
4581 $as_echo_n "(cached) " >&6
4582else
4583 if test -z "$GREP"; then
4584 ac_path_GREP_found=false
4585 # Loop through the user's path and test for each of PROGNAME-LIST
4586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4587for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4588do
4589 IFS=$as_save_IFS
4590 test -z "$as_dir" && as_dir=.
4591 for ac_prog in grep ggrep; do
4592 for ac_exec_ext in '' $ac_executable_extensions; do
4593 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4594 as_fn_executable_p "$ac_path_GREP" || continue
4595# Check for GNU ac_path_GREP and select it if it is found.
4596 # Check for GNU $ac_path_GREP
4597case `"$ac_path_GREP" --version 2>&1` in
4598*GNU*)
4599 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4600*)
4601 ac_count=0
4602 $as_echo_n 0123456789 >"conftest.in"
4603 while :
4604 do
4605 cat "conftest.in" "conftest.in" >"conftest.tmp"
4606 mv "conftest.tmp" "conftest.in"
4607 cp "conftest.in" "conftest.nl"
4608 $as_echo 'GREP' >> "conftest.nl"
4609 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4610 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4611 as_fn_arith $ac_count + 1 && ac_count=$as_val
4612 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4613 # Best one so far, save it but keep looking for a better one
4614 ac_cv_path_GREP="$ac_path_GREP"
4615 ac_path_GREP_max=$ac_count
4616 fi
4617 # 10*(2^10) chars as input seems more than enough
4618 test $ac_count -gt 10 && break
4619 done
4620 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4621esac
4622
4623 $ac_path_GREP_found && break 3
4624 done
4625 done
4626 done
4627IFS=$as_save_IFS
4628 if test -z "$ac_cv_path_GREP"; then
4629 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4630 fi
4631else
4632 ac_cv_path_GREP=$GREP
07c7b319 4633fi
85f61964 4634
fe2e2f74 4635fi
6440ab19
AJ
4636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4637$as_echo "$ac_cv_path_GREP" >&6; }
4638 GREP="$ac_cv_path_GREP"
4639
4640
4641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4642$as_echo_n "checking for egrep... " >&6; }
4643if ${ac_cv_path_EGREP+:} false; then :
07c7b319 4644 $as_echo_n "(cached) " >&6
85f61964 4645else
6440ab19
AJ
4646 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4647 then ac_cv_path_EGREP="$GREP -E"
4648 else
4649 if test -z "$EGREP"; then
4650 ac_path_EGREP_found=false
4651 # Loop through the user's path and test for each of PROGNAME-LIST
c2d29773 4652 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6440ab19 4653for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
c2d29773
AJ
4654do
4655 IFS=$as_save_IFS
4656 test -z "$as_dir" && as_dir=.
6440ab19 4657 for ac_prog in egrep; do
c2d29773 4658 for ac_exec_ext in '' $ac_executable_extensions; do
6440ab19
AJ
4659 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4660 as_fn_executable_p "$ac_path_EGREP" || continue
4661# Check for GNU ac_path_EGREP and select it if it is found.
4662 # Check for GNU $ac_path_EGREP
4663case `"$ac_path_EGREP" --version 2>&1` in
4664*GNU*)
4665 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4666*)
4667 ac_count=0
4668 $as_echo_n 0123456789 >"conftest.in"
4669 while :
4670 do
4671 cat "conftest.in" "conftest.in" >"conftest.tmp"
4672 mv "conftest.tmp" "conftest.in"
4673 cp "conftest.in" "conftest.nl"
4674 $as_echo 'EGREP' >> "conftest.nl"
4675 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4676 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4677 as_fn_arith $ac_count + 1 && ac_count=$as_val
4678 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4679 # Best one so far, save it but keep looking for a better one
4680 ac_cv_path_EGREP="$ac_path_EGREP"
4681 ac_path_EGREP_max=$ac_count
4682 fi
4683 # 10*(2^10) chars as input seems more than enough
4684 test $ac_count -gt 10 && break
c2d29773 4685 done
6440ab19 4686 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
c2d29773 4687esac
07c7b319 4688
6440ab19
AJ
4689 $ac_path_EGREP_found && break 3
4690 done
4691 done
4692 done
4693IFS=$as_save_IFS
4694 if test -z "$ac_cv_path_EGREP"; then
4695 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
c2d29773 4696 fi
07c7b319 4697else
6440ab19 4698 ac_cv_path_EGREP=$EGREP
c2d29773 4699fi
85f61964 4700
6440ab19 4701 fi
85f61964 4702fi
6440ab19
AJ
4703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4704$as_echo "$ac_cv_path_EGREP" >&6; }
4705 EGREP="$ac_cv_path_EGREP"
85f61964 4706
ddf1c059
AJ
4707
4708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4709$as_echo_n "checking for ANSI C header files... " >&6; }
4710if ${ac_cv_header_stdc+:} false; then :
c2d29773 4711 $as_echo_n "(cached) " >&6
85f61964 4712else
ddf1c059
AJ
4713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4714/* end confdefs.h. */
4715#include <stdlib.h>
4716#include <stdarg.h>
4717#include <string.h>
4718#include <float.h>
07c7b319 4719
ddf1c059
AJ
4720int
4721main ()
4722{
4723
4724 ;
4725 return 0;
4726}
4727_ACEOF
4728if ac_fn_c_try_compile "$LINENO"; then :
4729 ac_cv_header_stdc=yes
4730else
4731 ac_cv_header_stdc=no
85f61964 4732fi
ddf1c059
AJ
4733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4734
4735if test $ac_cv_header_stdc = yes; then
4736 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4738/* end confdefs.h. */
4739#include <string.h>
4740
4741_ACEOF
4742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4743 $EGREP "memchr" >/dev/null 2>&1; then :
4744
85f61964 4745else
ddf1c059 4746 ac_cv_header_stdc=no
85f61964 4747fi
ddf1c059 4748rm -f conftest*
85f61964 4749
ddf1c059 4750fi
07c7b319 4751
ddf1c059
AJ
4752if test $ac_cv_header_stdc = yes; then
4753 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4755/* end confdefs.h. */
4756#include <stdlib.h>
07c7b319 4757
ddf1c059
AJ
4758_ACEOF
4759if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4760 $EGREP "free" >/dev/null 2>&1; then :
07c7b319 4761
ddf1c059
AJ
4762else
4763 ac_cv_header_stdc=no
4764fi
4765rm -f conftest*
85f61964 4766
ddf1c059 4767fi
07c7b319 4768
ddf1c059
AJ
4769if test $ac_cv_header_stdc = yes; then
4770 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4771 if test "$cross_compiling" = yes; then :
4772 :
4773else
4774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4775/* end confdefs.h. */
4776#include <ctype.h>
4777#include <stdlib.h>
4778#if ((' ' & 0x0FF) == 0x020)
4779# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4780# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4781#else
4782# define ISLOWER(c) \
4783 (('a' <= (c) && (c) <= 'i') \
4784 || ('j' <= (c) && (c) <= 'r') \
4785 || ('s' <= (c) && (c) <= 'z'))
4786# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4787#endif
07c7b319 4788
ddf1c059
AJ
4789#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4790int
4791main ()
4792{
4793 int i;
4794 for (i = 0; i < 256; i++)
4795 if (XOR (islower (i), ISLOWER (i))
4796 || toupper (i) != TOUPPER (i))
4797 return 2;
4798 return 0;
4799}
4800_ACEOF
4801if ac_fn_c_try_run "$LINENO"; then :
07c7b319 4802
ddf1c059
AJ
4803else
4804 ac_cv_header_stdc=no
4805fi
4806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4807 conftest.$ac_objext conftest.beam conftest.$ac_ext
4808fi
85f61964 4809
ddf1c059
AJ
4810fi
4811fi
4812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4813$as_echo "$ac_cv_header_stdc" >&6; }
4814if test $ac_cv_header_stdc = yes; then
85f61964 4815
ddf1c059 4816$as_echo "#define STDC_HEADERS 1" >>confdefs.h
85f61964 4817
ddf1c059 4818fi
85f61964 4819
ddf1c059
AJ
4820# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4821for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4822 inttypes.h stdint.h unistd.h
4823do :
4824 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4825ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4826"
4827if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4828 cat >>confdefs.h <<_ACEOF
4829#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4830_ACEOF
85f61964 4831
ddf1c059 4832fi
85f61964 4833
ddf1c059 4834done
472c7f87 4835
472c7f87 4836
07c7b319 4837
ddf1c059
AJ
4838 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4839if test "x$ac_cv_header_minix_config_h" = xyes; then :
4840 MINIX=yes
4841else
4842 MINIX=
4843fi
07c7b319 4844
07c7b319 4845
ddf1c059 4846 if test "$MINIX" = yes; then
472c7f87 4847
ddf1c059 4848$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
472c7f87 4849
472c7f87 4850
ddf1c059 4851$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
472c7f87 4852
472c7f87 4853
ddf1c059
AJ
4854$as_echo "#define _MINIX 1" >>confdefs.h
4855
4856 fi
4857
4858
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4860$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4861if ${ac_cv_safe_to_define___extensions__+:} false; then :
4862 $as_echo_n "(cached) " >&6
c2d29773 4863else
ddf1c059
AJ
4864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4865/* end confdefs.h. */
472c7f87 4866
ddf1c059
AJ
4867# define __EXTENSIONS__ 1
4868 $ac_includes_default
4869int
4870main ()
4871{
472c7f87 4872
ddf1c059
AJ
4873 ;
4874 return 0;
4875}
4876_ACEOF
4877if ac_fn_c_try_compile "$LINENO"; then :
4878 ac_cv_safe_to_define___extensions__=yes
4879else
4880 ac_cv_safe_to_define___extensions__=no
4881fi
4882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4883fi
4884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4885$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4886 test $ac_cv_safe_to_define___extensions__ = yes &&
4887 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
472c7f87 4888
ddf1c059 4889 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
472c7f87 4890
ddf1c059 4891 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
472c7f87 4892
ddf1c059
AJ
4893 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4894
4895 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
472c7f87 4896
472c7f87 4897
c2d29773 4898
ddf1c059
AJ
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
4900$as_echo_n "checking for unsigned long long int... " >&6; }
4901if ${ac_cv_type_unsigned_long_long_int+:} false; then :
07c7b319 4902 $as_echo_n "(cached) " >&6
85f61964 4903else
ddf1c059
AJ
4904 ac_cv_type_unsigned_long_long_int=yes
4905 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
4906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85f61964
WP
4907/* end confdefs.h. */
4908
ddf1c059
AJ
4909 /* For now, do not test the preprocessor; as of 2007 there are too many
4910 implementations with broken preprocessors. Perhaps this can
4911 be revisited in 2012. In the meantime, code should not expect
4912 #if to work with literals wider than 32 bits. */
4913 /* Test literals. */
4914 long long int ll = 9223372036854775807ll;
4915 long long int nll = -9223372036854775807LL;
4916 unsigned long long int ull = 18446744073709551615ULL;
4917 /* Test constant expressions. */
4918 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4919 ? 1 : -1)];
4920 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4921 ? 1 : -1)];
4922 int i = 63;
85f61964
WP
4923int
4924main ()
4925{
ddf1c059
AJ
4926/* Test availability of runtime routines for shift and division. */
4927 long long int llmax = 9223372036854775807ll;
4928 unsigned long long int ullmax = 18446744073709551615ull;
4929 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4930 | (llmax / ll) | (llmax % ll)
4931 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4932 | (ullmax / ull) | (ullmax % ull));
85f61964
WP
4933 ;
4934 return 0;
4935}
07c7b319
JT
4936
4937_ACEOF
ddf1c059 4938if ac_fn_c_try_link "$LINENO"; then :
648c9700 4939
07c7b319 4940else
ddf1c059 4941 ac_cv_type_unsigned_long_long_int=no
85f61964 4942fi
ddf1c059
AJ
4943rm -f core conftest.err conftest.$ac_objext \
4944 conftest$ac_exeext conftest.$ac_ext
4945 fi
07c7b319 4946fi
ddf1c059
AJ
4947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
4948$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
4949 if test $ac_cv_type_unsigned_long_long_int = yes; then
07c7b319 4950
ddf1c059 4951$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
07c7b319 4952
ddf1c059 4953 fi
648c9700 4954
1639518a
AJ
4955# Make sure we can run config.sub.
4956$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4957 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
07c7b319 4958
1639518a
AJ
4959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4960$as_echo_n "checking build system type... " >&6; }
4961if ${ac_cv_build+:} false; then :
4962 $as_echo_n "(cached) " >&6
ddf1c059 4963else
1639518a
AJ
4964 ac_build_alias=$build_alias
4965test "x$ac_build_alias" = x &&
4966 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4967test "x$ac_build_alias" = x &&
4968 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4969ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4970 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4971
07c7b319 4972fi
1639518a
AJ
4973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4974$as_echo "$ac_cv_build" >&6; }
4975case $ac_cv_build in
4976*-*-*) ;;
4977*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4978esac
4979build=$ac_cv_build
4980ac_save_IFS=$IFS; IFS='-'
4981set x $ac_cv_build
4982shift
4983build_cpu=$1
4984build_vendor=$2
4985shift; shift
4986# Remember, the first character of IFS is used to create $*,
4987# except with old shells:
4988build_os=$*
4989IFS=$ac_save_IFS
4990case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4991
07c7b319 4992
1639518a
AJ
4993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4994$as_echo_n "checking host system type... " >&6; }
4995if ${ac_cv_host+:} false; then :
ddf1c059
AJ
4996 $as_echo_n "(cached) " >&6
4997else
1639518a
AJ
4998 if test "x$host_alias" = x; then
4999 ac_cv_host=$ac_cv_build
648c9700 5000else
1639518a
AJ
5001 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5002 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
07c7b319
JT
5003fi
5004
07c7b319 5005fi
1639518a
AJ
5006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5007$as_echo "$ac_cv_host" >&6; }
5008case $ac_cv_host in
5009*-*-*) ;;
5010*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5011esac
5012host=$ac_cv_host
5013ac_save_IFS=$IFS; IFS='-'
5014set x $ac_cv_host
5015shift
5016host_cpu=$1
5017host_vendor=$2
5018shift; shift
5019# Remember, the first character of IFS is used to create $*,
5020# except with old shells:
5021host_os=$*
5022IFS=$ac_save_IFS
5023case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
07c7b319 5024
07c7b319 5025
07c7b319 5026
ddf1c059 5027
1639518a
AJ
5028
5029$as_echo "#define __STDC_WANT_LIB_EXT1__ 1" >>confdefs.h
5030
5031
5032
8c13ffd3
AJ
5033 for ac_header in Availability.h
5034do :
5035 ac_fn_c_check_header_mongrel "$LINENO" "Availability.h" "ac_cv_header_Availability_h" "$ac_includes_default"
5036if test "x$ac_cv_header_Availability_h" = xyes; then :
5037 cat >>confdefs.h <<_ACEOF
5038#define HAVE_AVAILABILITY_H 1
5039_ACEOF
5040
5041fi
5042
5043done
5044
1639518a 5045 for ac_header in ctype.h
648c9700 5046do :
1639518a
AJ
5047 ac_fn_c_check_header_mongrel "$LINENO" "ctype.h" "ac_cv_header_ctype_h" "$ac_includes_default"
5048if test "x$ac_cv_header_ctype_h" = xyes; then :
648c9700 5049 cat >>confdefs.h <<_ACEOF
1639518a 5050#define HAVE_CTYPE_H 1
648c9700
WP
5051_ACEOF
5052
5053fi
5054
5055done
5056
1639518a
AJ
5057 for ac_header in dirent.h
5058do :
5059 ac_fn_c_check_header_mongrel "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default"
5060if test "x$ac_cv_header_dirent_h" = xyes; then :
5061 cat >>confdefs.h <<_ACEOF
5062#define HAVE_DIRENT_H 1
ddf1c059 5063_ACEOF
6adcb496 5064
ddf1c059 5065fi
6adcb496 5066
1639518a 5067done
6adcb496 5068
1639518a
AJ
5069 for ac_header in errno.h
5070do :
5071 ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
5072if test "x$ac_cv_header_errno_h" = xyes; then :
5073 cat >>confdefs.h <<_ACEOF
5074#define HAVE_ERRNO_H 1
5075_ACEOF
6adcb496 5076
ddf1c059 5077fi
6adcb496 5078
1639518a 5079done
ddf1c059 5080
3828bfac
AJ
5081 for ac_header in inttypes.h
5082do :
5083 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
5084if test "x$ac_cv_header_inttypes_h" = xyes; then :
5085 cat >>confdefs.h <<_ACEOF
5086#define HAVE_INTTYPES_H 1
5087_ACEOF
5088
c2d29773 5089fi
3828bfac
AJ
5090
5091done
5092
5093 for ac_header in libintl.h
5094do :
5095 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
5096if test "x$ac_cv_header_libintl_h" = xyes; then :
5097 cat >>confdefs.h <<_ACEOF
5098#define HAVE_LIBINTL_H 1
5099_ACEOF
5100
c2d29773 5101fi
06f534f5 5102
3828bfac 5103done
083f09b4 5104
3828bfac
AJ
5105 for ac_header in limits.h
5106do :
5107 ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default"
5108if test "x$ac_cv_header_limits_h" = xyes; then :
5109 cat >>confdefs.h <<_ACEOF
5110#define HAVE_LIMITS_H 1
5111_ACEOF
083f09b4 5112
3828bfac 5113fi
083f09b4 5114
3828bfac 5115done
85f61964 5116
3828bfac
AJ
5117 for ac_header in locale.h
5118do :
5119 ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
5120if test "x$ac_cv_header_locale_h" = xyes; then :
5121 cat >>confdefs.h <<_ACEOF
5122#define HAVE_LOCALE_H 1
5123_ACEOF
083f09b4 5124
3828bfac
AJ
5125fi
5126
5127done
5128
5129 for ac_header in netdb.h
5130do :
5131 ac_fn_c_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
5132if test "x$ac_cv_header_netdb_h" = xyes; then :
5133 cat >>confdefs.h <<_ACEOF
5134#define HAVE_NETDB_H 1
5135_ACEOF
083f09b4 5136
ddf1c059 5137fi
083f09b4 5138
3828bfac
AJ
5139done
5140
5141 for ac_header in netinet/in.h
5142do :
5143 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
5144if test "x$ac_cv_header_netinet_in_h" = xyes; then :
5145 cat >>confdefs.h <<_ACEOF
5146#define HAVE_NETINET_IN_H 1
5147_ACEOF
083f09b4 5148
c2d29773
AJ
5149fi
5150
3828bfac 5151done
c2d29773 5152
3828bfac
AJ
5153 for ac_header in regex.h
5154do :
5155 ac_fn_c_check_header_mongrel "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default"
5156if test "x$ac_cv_header_regex_h" = xyes; then :
5157 cat >>confdefs.h <<_ACEOF
5158#define HAVE_REGEX_H 1
5159_ACEOF
c2d29773 5160
3828bfac 5161fi
c2d29773 5162
3828bfac
AJ
5163done
5164
5165 for ac_header in signal.h
5166do :
5167 ac_fn_c_check_header_mongrel "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default"
5168if test "x$ac_cv_header_signal_h" = xyes; then :
5169 cat >>confdefs.h <<_ACEOF
5170#define HAVE_SIGNAL_H 1
5171_ACEOF
083f09b4 5172
85f61964
WP
5173fi
5174
3828bfac
AJ
5175done
5176
5177 for ac_header in stdarg.h
5178do :
5179 ac_fn_c_check_header_mongrel "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default"
5180if test "x$ac_cv_header_stdarg_h" = xyes; then :
5181 cat >>confdefs.h <<_ACEOF
5182#define HAVE_STDARG_H 1
5183_ACEOF
5184
c2d29773
AJ
5185fi
5186
3828bfac
AJ
5187done
5188
5189 for ac_header in stdbool.h
5190do :
5191 ac_fn_c_check_header_mongrel "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
5192if test "x$ac_cv_header_stdbool_h" = xyes; then :
5193 cat >>confdefs.h <<_ACEOF
5194#define HAVE_STDBOOL_H 1
5195_ACEOF
5196
ddf1c059 5197fi
3828bfac
AJ
5198
5199done
5200
5201 for ac_header in stddef.h
5202do :
5203 ac_fn_c_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default"
5204if test "x$ac_cv_header_stddef_h" = xyes; then :
5205 cat >>confdefs.h <<_ACEOF
5206#define HAVE_STDDEF_H 1
5207_ACEOF
5208
ddf1c059 5209fi
c2d29773 5210
3828bfac 5211done
c2d29773 5212
3828bfac
AJ
5213 for ac_header in stdint.h
5214do :
5215 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
5216if test "x$ac_cv_header_stdint_h" = xyes; then :
5217 cat >>confdefs.h <<_ACEOF
5218#define HAVE_STDINT_H 1
5219_ACEOF
c2d29773 5220
3828bfac 5221fi
c2d29773 5222
3828bfac 5223done
c2d29773 5224
3828bfac
AJ
5225 for ac_header in stdio.h
5226do :
5227 ac_fn_c_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
5228if test "x$ac_cv_header_stdio_h" = xyes; then :
5229 cat >>confdefs.h <<_ACEOF
5230#define HAVE_STDIO_H 1
5231_ACEOF
c2d29773 5232
3828bfac 5233fi
c2d29773 5234
3828bfac 5235done
c2d29773 5236
3828bfac
AJ
5237 for ac_header in stdlib.h
5238do :
5239 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
5240if test "x$ac_cv_header_stdlib_h" = xyes; then :
5241 cat >>confdefs.h <<_ACEOF
5242#define HAVE_STDLIB_H 1
5243_ACEOF
c2d29773 5244
3828bfac 5245fi
c2d29773 5246
3828bfac 5247done
ddf1c059 5248
3828bfac
AJ
5249 for ac_header in string.h
5250do :
5251 ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
5252if test "x$ac_cv_header_string_h" = xyes; then :
5253 cat >>confdefs.h <<_ACEOF
5254#define HAVE_STRING_H 1
5255_ACEOF
ddf1c059 5256
c2d29773 5257fi
ddf1c059 5258
3828bfac
AJ
5259done
5260
5261 for ac_header in strings.h
5262do :
5263 ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
5264if test "x$ac_cv_header_strings_h" = xyes; then :
5265 cat >>confdefs.h <<_ACEOF
5266#define HAVE_STRINGS_H 1
5267_ACEOF
5268
c2d29773 5269fi
c2d29773 5270
3828bfac
AJ
5271done
5272
5273 for ac_header in sys/file.h
5274do :
5275 ac_fn_c_check_header_mongrel "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default"
5276if test "x$ac_cv_header_sys_file_h" = xyes; then :
5277 cat >>confdefs.h <<_ACEOF
5278#define HAVE_SYS_FILE_H 1
5279_ACEOF
c2d29773 5280
ddf1c059 5281fi
c2d29773 5282
8c13ffd3
AJ
5283done
5284
5285 for ac_header in sys/param.h
5286do :
5287 ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
5288if test "x$ac_cv_header_sys_param_h" = xyes; then :
5289 cat >>confdefs.h <<_ACEOF
5290#define HAVE_SYS_PARAM_H 1
5291_ACEOF
5292
5293fi
5294
8ff53e4d
AJ
5295done
5296
5297 for ac_header in sys/random.h
5298do :
5299 ac_fn_c_check_header_mongrel "$LINENO" "sys/random.h" "ac_cv_header_sys_random_h" "$ac_includes_default"
5300if test "x$ac_cv_header_sys_random_h" = xyes; then :
5301 cat >>confdefs.h <<_ACEOF
5302#define HAVE_SYS_RANDOM_H 1
5303_ACEOF
5304
5305fi
5306
3828bfac 5307done
c2d29773 5308
3828bfac
AJ
5309 for ac_header in sys/resource.h
5310do :
5311 ac_fn_c_check_header_mongrel "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
5312if test "x$ac_cv_header_sys_resource_h" = xyes; then :
5313 cat >>confdefs.h <<_ACEOF
5314#define HAVE_SYS_RESOURCE_H 1
5315_ACEOF
c2d29773 5316
3828bfac 5317fi
ddf1c059 5318
3828bfac 5319done
c2d29773 5320
3828bfac
AJ
5321 for ac_header in sys/stat.h
5322do :
5323 ac_fn_c_check_header_mongrel "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default"
5324if test "x$ac_cv_header_sys_stat_h" = xyes; then :
5325 cat >>confdefs.h <<_ACEOF
5326#define HAVE_SYS_STAT_H 1
5327_ACEOF
c2d29773 5328
c2d29773 5329fi
c2d29773 5330
3828bfac 5331done
c2d29773 5332
3828bfac
AJ
5333 for ac_header in sys/time.h
5334do :
5335 ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
5336if test "x$ac_cv_header_sys_time_h" = xyes; then :
5337 cat >>confdefs.h <<_ACEOF
5338#define HAVE_SYS_TIME_H 1
5339_ACEOF
ddf1c059 5340
3828bfac 5341fi
ddf1c059 5342
3828bfac 5343done
c2d29773 5344
3828bfac
AJ
5345 for ac_header in sys/types.h
5346do :
5347 ac_fn_c_check_header_mongrel "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
5348if test "x$ac_cv_header_sys_types_h" = xyes; then :
5349 cat >>confdefs.h <<_ACEOF
5350#define HAVE_SYS_TYPES_H 1
c2d29773 5351_ACEOF
c2d29773 5352
c2d29773 5353fi
c2d29773 5354
3828bfac 5355done
c2d29773 5356
3828bfac
AJ
5357 for ac_header in sys/wait.h
5358do :
5359 ac_fn_c_check_header_mongrel "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
5360if test "x$ac_cv_header_sys_wait_h" = xyes; then :
5361 cat >>confdefs.h <<_ACEOF
5362#define HAVE_SYS_WAIT_H 1
5363_ACEOF
c2d29773 5364
3828bfac 5365fi
c2d29773 5366
3828bfac 5367done
c2d29773 5368
3828bfac
AJ
5369 for ac_header in time.h
5370do :
5371 ac_fn_c_check_header_mongrel "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default"
5372if test "x$ac_cv_header_time_h" = xyes; then :
5373 cat >>confdefs.h <<_ACEOF
5374#define HAVE_TIME_H 1
5375_ACEOF
c2d29773 5376
3828bfac 5377fi
c2d29773 5378
3828bfac 5379done
c2d29773 5380
3828bfac
AJ
5381 for ac_header in unistd.h
5382do :
5383 ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
5384if test "x$ac_cv_header_unistd_h" = xyes; then :
5385 cat >>confdefs.h <<_ACEOF
5386#define HAVE_UNISTD_H 1
5387_ACEOF
c2d29773 5388
3828bfac 5389fi
c2d29773 5390
3828bfac 5391done
c2d29773
AJ
5392
5393
3828bfac
AJ
5394 for ac_func in consttime_memequal
5395do :
5396 ac_fn_c_check_func "$LINENO" "consttime_memequal" "ac_cv_func_consttime_memequal"
5397if test "x$ac_cv_func_consttime_memequal" = xyes; then :
5398 cat >>confdefs.h <<_ACEOF
5399#define HAVE_CONSTTIME_MEMEQUAL 1
5400_ACEOF
c2d29773 5401
3828bfac
AJ
5402fi
5403done
c2d29773 5404
3828bfac
AJ
5405 for ac_func in dup2
5406do :
5407 ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
5408if test "x$ac_cv_func_dup2" = xyes; then :
5409 cat >>confdefs.h <<_ACEOF
5410#define HAVE_DUP2 1
5411_ACEOF
c2d29773 5412
3828bfac 5413else
c2d29773
AJ
5414
5415
3828bfac 5416 as_fn_error $? "required function not available" "$LINENO" 5
c2d29773
AJ
5417
5418fi
3828bfac 5419done
c2d29773 5420
3828bfac
AJ
5421 for ac_func in execve
5422do :
5423 ac_fn_c_check_func "$LINENO" "execve" "ac_cv_func_execve"
5424if test "x$ac_cv_func_execve" = xyes; then :
5425 cat >>confdefs.h <<_ACEOF
5426#define HAVE_EXECVE 1
5427_ACEOF
c2d29773 5428
3828bfac 5429else
c2d29773 5430
85f61964 5431
3828bfac 5432 as_fn_error $? "required function not available" "$LINENO" 5
85f61964 5433
3828bfac
AJ
5434fi
5435done
083f09b4 5436
3828bfac 5437 for ac_func in explicit_bzero
ddf1c059 5438do :
3828bfac
AJ
5439 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
5440if test "x$ac_cv_func_explicit_bzero" = xyes; then :
ddf1c059 5441 cat >>confdefs.h <<_ACEOF
3828bfac 5442#define HAVE_EXPLICIT_BZERO 1
ddf1c059 5443_ACEOF
14967f86 5444
c2d29773 5445fi
ddf1c059 5446done
083f09b4 5447
3828bfac 5448 for ac_func in explicit_memset
ddf1c059 5449do :
3828bfac
AJ
5450 ac_fn_c_check_func "$LINENO" "explicit_memset" "ac_cv_func_explicit_memset"
5451if test "x$ac_cv_func_explicit_memset" = xyes; then :
ddf1c059 5452 cat >>confdefs.h <<_ACEOF
3828bfac 5453#define HAVE_EXPLICIT_MEMSET 1
ddf1c059 5454_ACEOF
083f09b4 5455
ddf1c059 5456fi
ddf1c059 5457done
85f61964 5458
3828bfac 5459 for ac_func in fileno
ddf1c059 5460do :
3828bfac
AJ
5461 ac_fn_c_check_func "$LINENO" "fileno" "ac_cv_func_fileno"
5462if test "x$ac_cv_func_fileno" = xyes; then :
ddf1c059 5463 cat >>confdefs.h <<_ACEOF
3828bfac 5464#define HAVE_FILENO 1
ddf1c059 5465_ACEOF
85f61964 5466
3828bfac
AJ
5467else
5468
472c7f87 5469
3828bfac
AJ
5470 as_fn_error $? "required function not available" "$LINENO" 5
5471
5472fi
ddf1c059 5473done
472c7f87 5474
3828bfac 5475 for ac_func in flock
ddf1c059 5476do :
3828bfac
AJ
5477 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
5478if test "x$ac_cv_func_flock" = xyes; then :
ddf1c059 5479 cat >>confdefs.h <<_ACEOF
3828bfac 5480#define HAVE_FLOCK 1
ddf1c059 5481_ACEOF
dfaaa8ce 5482
3828bfac 5483else
dfaaa8ce 5484
ddf1c059 5485
3828bfac 5486 as_fn_error $? "required function not available" "$LINENO" 5
4ff6a09b 5487
c2d29773 5488fi
c2d29773 5489done
4ff6a09b 5490
3828bfac 5491 for ac_func in fork
ddf1c059 5492do :
3828bfac
AJ
5493 ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork"
5494if test "x$ac_cv_func_fork" = xyes; then :
ddf1c059 5495 cat >>confdefs.h <<_ACEOF
3828bfac 5496#define HAVE_FORK 1
ddf1c059
AJ
5497_ACEOF
5498
c2d29773 5499fi
ddf1c059 5500done
4ff6a09b 5501
3828bfac 5502 for ac_func in fsync
ddf1c059 5503do :
3828bfac
AJ
5504 ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
5505if test "x$ac_cv_func_fsync" = xyes; then :
ddf1c059 5506 cat >>confdefs.h <<_ACEOF
3828bfac 5507#define HAVE_FSYNC 1
ddf1c059 5508_ACEOF
dfaaa8ce 5509
3828bfac 5510else
dfaaa8ce
AJ
5511
5512
3828bfac 5513 as_fn_error $? "required function not available" "$LINENO" 5
dfaaa8ce 5514
ddf1c059 5515fi
ddf1c059
AJ
5516done
5517
3828bfac 5518 for ac_func in gethostbyname
ddf1c059 5519do :
3828bfac
AJ
5520 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
5521if test "x$ac_cv_func_gethostbyname" = xyes; then :
ddf1c059 5522 cat >>confdefs.h <<_ACEOF
3828bfac 5523#define HAVE_GETHOSTBYNAME 1
ddf1c059 5524_ACEOF
dfaaa8ce 5525
3828bfac 5526else
dfaaa8ce 5527
ddf1c059 5528
3828bfac 5529 as_fn_error $? "required function not available" "$LINENO" 5
ddf1c059 5530
dfaaa8ce 5531fi
ddf1c059
AJ
5532done
5533
3828bfac 5534 for ac_func in getpid
ddf1c059 5535do :
3828bfac
AJ
5536 ac_fn_c_check_func "$LINENO" "getpid" "ac_cv_func_getpid"
5537if test "x$ac_cv_func_getpid" = xyes; then :
ddf1c059 5538 cat >>confdefs.h <<_ACEOF
3828bfac 5539#define HAVE_GETPID 1
ddf1c059
AJ
5540_ACEOF
5541
3828bfac 5542else
ddf1c059 5543
ddf1c059 5544
3828bfac 5545 as_fn_error $? "required function not available" "$LINENO" 5
ddf1c059 5546
dfaaa8ce 5547fi
ddf1c059 5548done
083f09b4 5549
3828bfac 5550 for ac_func in getrlimit
ddf1c059 5551do :
3828bfac
AJ
5552 ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
5553if test "x$ac_cv_func_getrlimit" = xyes; then :
ddf1c059 5554 cat >>confdefs.h <<_ACEOF
3828bfac 5555#define HAVE_GETRLIMIT 1
ddf1c059 5556_ACEOF
dfaaa8ce 5557
ddf1c059 5558fi
ddf1c059
AJ
5559done
5560
3828bfac 5561 for ac_func in gettimeofday
ddf1c059 5562do :
3828bfac
AJ
5563 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
5564if test "x$ac_cv_func_gettimeofday" = xyes; then :
ddf1c059 5565 cat >>confdefs.h <<_ACEOF
3828bfac 5566#define HAVE_GETTIMEOFDAY 1
ddf1c059 5567_ACEOF
083f09b4 5568
3828bfac 5569else
083f09b4 5570
ddf1c059 5571
3828bfac 5572 as_fn_error $? "required function not available" "$LINENO" 5
ddf1c059 5573
c2d29773 5574fi
ddf1c059
AJ
5575done
5576
3828bfac 5577 for ac_func in localeconv
ddf1c059 5578do :
3828bfac
AJ
5579 ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
5580if test "x$ac_cv_func_localeconv" = xyes; then :
ddf1c059 5581 cat >>confdefs.h <<_ACEOF
3828bfac 5582#define HAVE_LOCALECONV 1
ddf1c059
AJ
5583_ACEOF
5584
3828bfac 5585else
ddf1c059 5586
ddf1c059 5587
3828bfac 5588 as_fn_error $? "required function not available" "$LINENO" 5
ddf1c059 5589
083f09b4 5590fi
ddf1c059 5591done
c2d29773 5592
3828bfac 5593 for ac_func in memchr
ddf1c059 5594do :
3828bfac
AJ
5595 ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr"
5596if test "x$ac_cv_func_memchr" = xyes; then :
ddf1c059 5597 cat >>confdefs.h <<_ACEOF
3828bfac 5598#define HAVE_MEMCHR 1
ddf1c059 5599_ACEOF
083f09b4 5600
3828bfac 5601else
083f09b4 5602
d0427203 5603
3828bfac 5604 as_fn_error $? "required function not available" "$LINENO" 5
083f09b4 5605
ddf1c059 5606fi
ddf1c059 5607done
083f09b4 5608
3828bfac 5609 for ac_func in memmove
ddf1c059 5610do :
3828bfac
AJ
5611 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
5612if test "x$ac_cv_func_memmove" = xyes; then :
ddf1c059 5613 cat >>confdefs.h <<_ACEOF
3828bfac 5614#define HAVE_MEMMOVE 1
ddf1c059 5615_ACEOF
083f09b4 5616
3828bfac 5617else
083f09b4 5618
c2d29773 5619
3828bfac 5620 as_fn_error $? "required function not available" "$LINENO" 5
c2d29773 5621
c2d29773 5622fi
ddf1c059
AJ
5623done
5624
3828bfac 5625 for ac_func in memset
ddf1c059 5626do :
3828bfac
AJ
5627 ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
5628if test "x$ac_cv_func_memset" = xyes; then :
ddf1c059 5629 cat >>confdefs.h <<_ACEOF
3828bfac 5630#define HAVE_MEMSET 1
ddf1c059
AJ
5631_ACEOF
5632
3828bfac 5633else
c2d29773 5634
ddf1c059 5635
3828bfac 5636 as_fn_error $? "required function not available" "$LINENO" 5
083f09b4 5637
c2d29773 5638fi
ddf1c059 5639done
fa572d92 5640
3828bfac 5641 for ac_func in memset_s
ddf1c059 5642do :
3828bfac
AJ
5643 ac_fn_c_check_func "$LINENO" "memset_s" "ac_cv_func_memset_s"
5644if test "x$ac_cv_func_memset_s" = xyes; then :
ddf1c059 5645 cat >>confdefs.h <<_ACEOF
3828bfac 5646#define HAVE_MEMSET_S 1
ddf1c059 5647_ACEOF
fa572d92 5648
ddf1c059 5649fi
ddf1c059 5650done
fa572d92 5651
3828bfac 5652 for ac_func in regcomp
ddf1c059 5653do :
3828bfac
AJ
5654 ac_fn_c_check_func "$LINENO" "regcomp" "ac_cv_func_regcomp"
5655if test "x$ac_cv_func_regcomp" = xyes; then :
ddf1c059 5656 cat >>confdefs.h <<_ACEOF
3828bfac 5657#define HAVE_REGCOMP 1
ddf1c059 5658_ACEOF
472c7f87 5659
3828bfac 5660else
ddf1c059 5661
ddf1c059 5662
3828bfac 5663 as_fn_error $? "required function not available" "$LINENO" 5
ddf1c059 5664
c2d29773 5665fi
ddf1c059 5666done
c2d29773 5667
3828bfac 5668 for ac_func in regerror
ddf1c059 5669do :
3828bfac
AJ
5670 ac_fn_c_check_func "$LINENO" "regerror" "ac_cv_func_regerror"
5671if test "x$ac_cv_func_regerror" = xyes; then :
ddf1c059 5672 cat >>confdefs.h <<_ACEOF
3828bfac 5673#define HAVE_REGERROR 1
ddf1c059 5674_ACEOF
c2d29773 5675
3828bfac 5676else
c2d29773 5677
fa572d92 5678
3828bfac 5679 as_fn_error $? "required function not available" "$LINENO" 5
ef8c18e2 5680
3828bfac
AJ
5681fi
5682done
5683
5684 for ac_func in regexec
ddf1c059 5685do :
3828bfac
AJ
5686 ac_fn_c_check_func "$LINENO" "regexec" "ac_cv_func_regexec"
5687if test "x$ac_cv_func_regexec" = xyes; then :
ddf1c059 5688 cat >>confdefs.h <<_ACEOF
3828bfac 5689#define HAVE_REGEXEC 1
fa572d92 5690_ACEOF
ddf1c059 5691
3828bfac
AJ
5692else
5693
5694
5695 as_fn_error $? "required function not available" "$LINENO" 5
5696
fa572d92 5697fi
ddf1c059 5698done
fa572d92 5699
3828bfac 5700 for ac_func in regfree
ddf1c059 5701do :
3828bfac
AJ
5702 ac_fn_c_check_func "$LINENO" "regfree" "ac_cv_func_regfree"
5703if test "x$ac_cv_func_regfree" = xyes; then :
ddf1c059 5704 cat >>confdefs.h <<_ACEOF
3828bfac 5705#define HAVE_REGFREE 1
ddf1c059 5706_ACEOF
fa572d92 5707
3828bfac 5708else
fa795301 5709
3828bfac
AJ
5710
5711 as_fn_error $? "required function not available" "$LINENO" 5
fa795301 5712
fa572d92 5713fi
ddf1c059 5714done
083f09b4 5715
3828bfac 5716 for ac_func in setenv
ddf1c059 5717do :
3828bfac
AJ
5718 ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
5719if test "x$ac_cv_func_setenv" = xyes; then :
ddf1c059 5720 cat >>confdefs.h <<_ACEOF
3828bfac 5721#define HAVE_SETENV 1
ddf1c059 5722_ACEOF
083f09b4 5723
ddf1c059 5724else
083f09b4
WP
5725
5726
ddf1c059 5727 as_fn_error $? "required function not available" "$LINENO" 5
083f09b4 5728
ddf1c059
AJ
5729fi
5730done
083f09b4 5731
3828bfac 5732 for ac_func in setlocale
ddf1c059 5733do :
3828bfac
AJ
5734 ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
5735if test "x$ac_cv_func_setlocale" = xyes; then :
ddf1c059 5736 cat >>confdefs.h <<_ACEOF
3828bfac 5737#define HAVE_SETLOCALE 1
ddf1c059 5738_ACEOF
083f09b4 5739
1639518a
AJ
5740else
5741
5742
5743 as_fn_error $? "required function not available" "$LINENO" 5
5744
5745fi
5746done
5747
5748 for ac_func in snprintf
5749do :
5750 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
5751if test "x$ac_cv_func_snprintf" = xyes; then :
5752 cat >>confdefs.h <<_ACEOF
5753#define HAVE_SNPRINTF 1
5754_ACEOF
5755
ddf1c059 5756else
4ff6a09b
AJ
5757
5758
ddf1c059 5759 as_fn_error $? "required function not available" "$LINENO" 5
4ff6a09b 5760
ddf1c059
AJ
5761fi
5762done
4ff6a09b 5763
3828bfac 5764 for ac_func in strcasecmp
ddf1c059 5765do :
3828bfac
AJ
5766 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
5767if test "x$ac_cv_func_strcasecmp" = xyes; then :
ddf1c059 5768 cat >>confdefs.h <<_ACEOF
3828bfac 5769#define HAVE_STRCASECMP 1
ddf1c059 5770_ACEOF
4ff6a09b 5771
3828bfac 5772else
fa795301 5773
3828bfac
AJ
5774
5775 as_fn_error $? "required function not available" "$LINENO" 5
fa795301 5776
ddf1c059
AJ
5777fi
5778done
083f09b4 5779
3828bfac 5780 for ac_func in strcasestr
ddf1c059 5781do :
3828bfac
AJ
5782 ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
5783if test "x$ac_cv_func_strcasestr" = xyes; then :
ddf1c059 5784 cat >>confdefs.h <<_ACEOF
3828bfac 5785#define HAVE_STRCASESTR 1
ddf1c059 5786_ACEOF
083f09b4 5787
ddf1c059 5788else
083f09b4 5789
083f09b4 5790
ddf1c059 5791 as_fn_error $? "required function not available" "$LINENO" 5
083f09b4 5792
ddf1c059
AJ
5793fi
5794done
083f09b4 5795
3828bfac 5796 for ac_func in strchr
ddf1c059 5797do :
3828bfac
AJ
5798 ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr"
5799if test "x$ac_cv_func_strchr" = xyes; then :
ddf1c059 5800 cat >>confdefs.h <<_ACEOF
3828bfac 5801#define HAVE_STRCHR 1
ddf1c059 5802_ACEOF
083f09b4 5803
ddf1c059 5804else
56299b8d 5805
472c7f87 5806
ddf1c059 5807 as_fn_error $? "required function not available" "$LINENO" 5
472c7f87
WP
5808
5809fi
ddf1c059
AJ
5810done
5811
3828bfac 5812 for ac_func in strerror
ddf1c059 5813do :
3828bfac
AJ
5814 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
5815if test "x$ac_cv_func_strerror" = xyes; then :
ddf1c059 5816 cat >>confdefs.h <<_ACEOF
3828bfac 5817#define HAVE_STRERROR 1
ddf1c059
AJ
5818_ACEOF
5819
5820else
5821
5822
5823 as_fn_error $? "required function not available" "$LINENO" 5
5824
5825fi
5826done
5827
3828bfac 5828 for ac_func in strlen
ddf1c059 5829do :
3828bfac
AJ
5830 ac_fn_c_check_func "$LINENO" "strlen" "ac_cv_func_strlen"
5831if test "x$ac_cv_func_strlen" = xyes; then :
ddf1c059 5832 cat >>confdefs.h <<_ACEOF
3828bfac 5833#define HAVE_STRLEN 1
ddf1c059
AJ
5834_ACEOF
5835
5836else
5837
5838
5839 as_fn_error $? "required function not available" "$LINENO" 5
5840
5841fi
5842done
5843
3828bfac 5844 for ac_func in strncasecmp
ddf1c059 5845do :
3828bfac
AJ
5846 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
5847if test "x$ac_cv_func_strncasecmp" = xyes; then :
ddf1c059 5848 cat >>confdefs.h <<_ACEOF
3828bfac 5849#define HAVE_STRNCASECMP 1
ddf1c059
AJ
5850_ACEOF
5851
5852else
5853
5854
5855 as_fn_error $? "required function not available" "$LINENO" 5
5856
5857fi
5858done
5859
3828bfac 5860 for ac_func in strnlen
ddf1c059 5861do :
3828bfac
AJ
5862 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
5863if test "x$ac_cv_func_strnlen" = xyes; then :
ddf1c059 5864 cat >>confdefs.h <<_ACEOF
3828bfac 5865#define HAVE_STRNLEN 1
ddf1c059
AJ
5866_ACEOF
5867
5868else
5869
5870
5871 as_fn_error $? "required function not available" "$LINENO" 5
5872
5873fi
5874done
5875
3828bfac 5876 for ac_func in strpbrk
ddf1c059 5877do :
3828bfac
AJ
5878 ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
5879if test "x$ac_cv_func_strpbrk" = xyes; then :
ddf1c059 5880 cat >>confdefs.h <<_ACEOF
3828bfac 5881#define HAVE_STRPBRK 1
ddf1c059
AJ
5882_ACEOF
5883
5884else
5885
5886
5887 as_fn_error $? "required function not available" "$LINENO" 5
5888
5889fi
5890done
5891
3828bfac 5892 for ac_func in strrchr
ddf1c059 5893do :
3828bfac
AJ
5894 ac_fn_c_check_func "$LINENO" "strrchr" "ac_cv_func_strrchr"
5895if test "x$ac_cv_func_strrchr" = xyes; then :
ddf1c059 5896 cat >>confdefs.h <<_ACEOF
3828bfac 5897#define HAVE_STRRCHR 1
ddf1c059
AJ
5898_ACEOF
5899
5900else
5901
5902
5903 as_fn_error $? "required function not available" "$LINENO" 5
5904
5905fi
5906done
5907
3828bfac 5908 for ac_func in strstr
ddf1c059 5909do :
3828bfac
AJ
5910 ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
5911if test "x$ac_cv_func_strstr" = xyes; then :
ddf1c059 5912 cat >>confdefs.h <<_ACEOF
3828bfac 5913#define HAVE_STRSTR 1
ddf1c059
AJ
5914_ACEOF
5915
5916else
5917
5918
5919 as_fn_error $? "required function not available" "$LINENO" 5
5920
5921fi
5922done
5923
3828bfac 5924 for ac_func in strtod
ddf1c059 5925do :
3828bfac
AJ
5926 ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod"
5927if test "x$ac_cv_func_strtod" = xyes; then :
ddf1c059 5928 cat >>confdefs.h <<_ACEOF
3828bfac 5929#define HAVE_STRTOD 1
ddf1c059
AJ
5930_ACEOF
5931
5932else
5933
5934
5935 as_fn_error $? "required function not available" "$LINENO" 5
5936
5937fi
5938done
5939
3828bfac 5940 for ac_func in strtok
ddf1c059 5941do :
3828bfac
AJ
5942 ac_fn_c_check_func "$LINENO" "strtok" "ac_cv_func_strtok"
5943if test "x$ac_cv_func_strtok" = xyes; then :
ddf1c059 5944 cat >>confdefs.h <<_ACEOF
3828bfac 5945#define HAVE_STRTOK 1
ddf1c059
AJ
5946_ACEOF
5947
5948else
5949
5950
5951 as_fn_error $? "required function not available" "$LINENO" 5
5952
5953fi
5954done
5955
3828bfac 5956 for ac_func in strtok_r
ddf1c059 5957do :
3828bfac
AJ
5958 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
5959if test "x$ac_cv_func_strtok_r" = xyes; then :
ddf1c059 5960 cat >>confdefs.h <<_ACEOF
3828bfac 5961#define HAVE_STRTOK_R 1
ddf1c059
AJ
5962_ACEOF
5963
5964else
5965
5966
5967 as_fn_error $? "required function not available" "$LINENO" 5
5968
5969fi
5970done
5971
3828bfac 5972 for ac_func in strtol
ddf1c059 5973do :
3828bfac
AJ
5974 ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
5975if test "x$ac_cv_func_strtol" = xyes; then :
ddf1c059 5976 cat >>confdefs.h <<_ACEOF
3828bfac 5977#define HAVE_STRTOL 1
ddf1c059
AJ
5978_ACEOF
5979
5980else
5981
5982
5983 as_fn_error $? "required function not available" "$LINENO" 5
5984
5985fi
5986done
5987
3828bfac 5988 for ac_func in strtold
ddf1c059 5989do :
3828bfac
AJ
5990 ac_fn_c_check_func "$LINENO" "strtold" "ac_cv_func_strtold"
5991if test "x$ac_cv_func_strtold" = xyes; then :
ddf1c059 5992 cat >>confdefs.h <<_ACEOF
3828bfac 5993#define HAVE_STRTOLD 1
ddf1c059
AJ
5994_ACEOF
5995
5996else
5997
5998
5999 as_fn_error $? "required function not available" "$LINENO" 5
6000
6001fi
6002done
6003
3828bfac 6004 for ac_func in strtoul
ddf1c059 6005do :
3828bfac
AJ
6006 ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
6007if test "x$ac_cv_func_strtoul" = xyes; then :
ddf1c059 6008 cat >>confdefs.h <<_ACEOF
3828bfac 6009#define HAVE_STRTOUL 1
ddf1c059
AJ
6010_ACEOF
6011
6012else
6013
6014
6015 as_fn_error $? "required function not available" "$LINENO" 5
6016
6017fi
6018done
6019
3828bfac 6020 for ac_func in strtoull
ddf1c059 6021do :
3828bfac
AJ
6022 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
6023if test "x$ac_cv_func_strtoull" = xyes; then :
ddf1c059 6024 cat >>confdefs.h <<_ACEOF
3828bfac 6025#define HAVE_STRTOULL 1
ddf1c059
AJ
6026_ACEOF
6027
6028else
6029
6030
6031 as_fn_error $? "required function not available" "$LINENO" 5
6032
6033fi
6034done
6035
3828bfac 6036 for ac_func in timingsafe_bcmp
ddf1c059 6037do :
3828bfac
AJ
6038 ac_fn_c_check_func "$LINENO" "timingsafe_bcmp" "ac_cv_func_timingsafe_bcmp"
6039if test "x$ac_cv_func_timingsafe_bcmp" = xyes; then :
ddf1c059 6040 cat >>confdefs.h <<_ACEOF
3828bfac 6041#define HAVE_TIMINGSAFE_BCMP 1
ddf1c059
AJ
6042_ACEOF
6043
ddf1c059
AJ
6044fi
6045done
6046
3828bfac 6047 for ac_func in timingsafe_memcmp
ddf1c059 6048do :
3828bfac
AJ
6049 ac_fn_c_check_func "$LINENO" "timingsafe_memcmp" "ac_cv_func_timingsafe_memcmp"
6050if test "x$ac_cv_func_timingsafe_memcmp" = xyes; then :
ddf1c059 6051 cat >>confdefs.h <<_ACEOF
3828bfac 6052#define HAVE_TIMINGSAFE_MEMCMP 1
ddf1c059
AJ
6053_ACEOF
6054
ddf1c059
AJ
6055fi
6056done
6057
1639518a 6058 for ac_func in vsnprintf
ddf1c059 6059do :
1639518a
AJ
6060 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
6061if test "x$ac_cv_func_vsnprintf" = xyes; then :
ddf1c059 6062 cat >>confdefs.h <<_ACEOF
1639518a 6063#define HAVE_VSNPRINTF 1
ddf1c059 6064_ACEOF
ddf1c059 6065
ddf1c059 6066else
ddf1c059 6067
ddf1c059 6068
1639518a 6069 as_fn_error $? "required function not available" "$LINENO" 5
ddf1c059
AJ
6070
6071fi
1639518a 6072done
ddf1c059
AJ
6073
6074
3828bfac
AJ
6075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
6076$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
6077if ${ac_cv_c_bigendian+:} false; then :
6078 $as_echo_n "(cached) " >&6
ddf1c059 6079else
3828bfac
AJ
6080 ac_cv_c_bigendian=unknown
6081 # See if we're dealing with a universal compiler.
6082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6083/* end confdefs.h. */
6084#ifndef __APPLE_CC__
6085 not a universal capable compiler
6086 #endif
6087 typedef int dummy;
6088
6089_ACEOF
6090if ac_fn_c_try_compile "$LINENO"; then :
6091
6092 # Check for potential -arch flags. It is not universal unless
6093 # there are at least two -arch flags with different values.
6094 ac_arch=
6095 ac_prev=
6096 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
6097 if test -n "$ac_prev"; then
6098 case $ac_word in
6099 i?86 | x86_64 | ppc | ppc64)
6100 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
6101 ac_arch=$ac_word
6102 else
6103 ac_cv_c_bigendian=universal
6104 break
6105 fi
6106 ;;
6107 esac
6108 ac_prev=
6109 elif test "x$ac_word" = "x-arch"; then
6110 ac_prev=arch
6111 fi
6112 done
ddf1c059 6113fi
3828bfac
AJ
6114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6115 if test $ac_cv_c_bigendian = unknown; then
6116 # See if sys/param.h defines the BYTE_ORDER macro.
6117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6118/* end confdefs.h. */
6119#include <sys/types.h>
6120 #include <sys/param.h>
ddf1c059 6121
3828bfac
AJ
6122int
6123main ()
6124{
6125#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
6126 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
6127 && LITTLE_ENDIAN)
6128 bogus endian macros
6129 #endif
6130
6131 ;
6132 return 0;
6133}
6134_ACEOF
6135if ac_fn_c_try_compile "$LINENO"; then :
6136 # It does; now see whether it defined to BIG_ENDIAN or not.
6137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ddf1c059 6138/* end confdefs.h. */
3828bfac
AJ
6139#include <sys/types.h>
6140 #include <sys/param.h>
6141
ddf1c059
AJ
6142int
6143main ()
6144{
3828bfac
AJ
6145#if BYTE_ORDER != BIG_ENDIAN
6146 not big endian
6147 #endif
6148
ddf1c059
AJ
6149 ;
6150 return 0;
6151}
6152_ACEOF
3828bfac
AJ
6153if ac_fn_c_try_compile "$LINENO"; then :
6154 ac_cv_c_bigendian=yes
ddf1c059 6155else
3828bfac 6156 ac_cv_c_bigendian=no
ddf1c059 6157fi
3828bfac 6158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ddf1c059 6159fi
3828bfac
AJ
6160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6161 fi
6162 if test $ac_cv_c_bigendian = unknown; then
6163 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
6164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6165/* end confdefs.h. */
6166#include <limits.h>
ddf1c059 6167
3828bfac
AJ
6168int
6169main ()
6170{
6171#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
6172 bogus endian macros
6173 #endif
ddf1c059 6174
3828bfac
AJ
6175 ;
6176 return 0;
6177}
6178_ACEOF
6179if ac_fn_c_try_compile "$LINENO"; then :
6180 # It does; now see whether it defined to _BIG_ENDIAN or not.
6181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ddf1c059 6182/* end confdefs.h. */
3828bfac 6183#include <limits.h>
ddf1c059
AJ
6184
6185int
6186main ()
6187{
3828bfac
AJ
6188#ifndef _BIG_ENDIAN
6189 not big endian
6190 #endif
ddf1c059
AJ
6191
6192 ;
6193 return 0;
6194}
6195_ACEOF
6196if ac_fn_c_try_compile "$LINENO"; then :
6197 ac_cv_c_bigendian=yes
6198else
6199 ac_cv_c_bigendian=no
6200fi
6201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6202fi
6203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6204 fi
6205 if test $ac_cv_c_bigendian = unknown; then
6206 # Compile a test program.
6207 if test "$cross_compiling" = yes; then :
6208 # Try to guess by grepping values from an object file.
6209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6210/* end confdefs.h. */
6211short int ascii_mm[] =
6212 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
6213 short int ascii_ii[] =
6214 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
6215 int use_ascii (int i) {
6216 return ascii_mm[i] + ascii_ii[i];
6217 }
6218 short int ebcdic_ii[] =
6219 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
6220 short int ebcdic_mm[] =
6221 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
6222 int use_ebcdic (int i) {
6223 return ebcdic_mm[i] + ebcdic_ii[i];
6224 }
6225 extern int foo;
6226
6227int
6228main ()
6229{
6230return use_ascii (foo) == use_ebcdic (foo);
6231 ;
6232 return 0;
6233}
6234_ACEOF
6235if ac_fn_c_try_compile "$LINENO"; then :
6236 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
6237 ac_cv_c_bigendian=yes
6238 fi
6239 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
6240 if test "$ac_cv_c_bigendian" = unknown; then
6241 ac_cv_c_bigendian=no
6242 else
6243 # finding both strings is unlikely to happen, but who knows?
6244 ac_cv_c_bigendian=unknown
6245 fi
6246 fi
6247fi
6248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6249else
6250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6251/* end confdefs.h. */
6252$ac_includes_default
6253int
6254main ()
6255{
6256
6257 /* Are we little or big endian? From Harbison&Steele. */
6258 union
6259 {
6260 long int l;
6261 char c[sizeof (long int)];
6262 } u;
6263 u.l = 1;
6264 return u.c[sizeof (long int) - 1] == 1;
6265
6266 ;
6267 return 0;
6268}
6269_ACEOF
6270if ac_fn_c_try_run "$LINENO"; then :
6271 ac_cv_c_bigendian=no
6272else
6273 ac_cv_c_bigendian=yes
6274fi
6275rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6276 conftest.$ac_objext conftest.beam conftest.$ac_ext
6277fi
6278
6279 fi
6280fi
6281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
6282$as_echo "$ac_cv_c_bigendian" >&6; }
6283 case $ac_cv_c_bigendian in #(
6284 yes)
6285 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
6286;; #(
6287 no)
6288 ;; #(
6289 universal)
6290
6291$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
6292
6293 ;; #(
6294 *)
6295 as_fn_error $? "unknown endianness
6296 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
6297 esac
6298
6299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
6300$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
6301if ${ac_cv_c_const+:} false; then :
6302 $as_echo_n "(cached) " >&6
6303else
6304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6305/* end confdefs.h. */
6306
6307int
6308main ()
6309{
6310
6311#ifndef __cplusplus
6312 /* Ultrix mips cc rejects this sort of thing. */
6313 typedef int charset[2];
6314 const charset cs = { 0, 0 };
6315 /* SunOS 4.1.1 cc rejects this. */
6316 char const *const *pcpcc;
6317 char **ppc;
6318 /* NEC SVR4.0.2 mips cc rejects this. */
6319 struct point {int x, y;};
6320 static struct point const zero = {0,0};
6321 /* AIX XL C 1.02.0.0 rejects this.
6322 It does not let you subtract one const X* pointer from another in
6323 an arm of an if-expression whose if-part is not a constant
6324 expression */
6325 const char *g = "string";
6326 pcpcc = &g + (g ? g-g : 0);
6327 /* HPUX 7.0 cc rejects these. */
6328 ++pcpcc;
6329 ppc = (char**) pcpcc;
6330 pcpcc = (char const *const *) ppc;
6331 { /* SCO 3.2v4 cc rejects this sort of thing. */
6332 char tx;
6333 char *t = &tx;
6334 char const *s = 0 ? (char *) 0 : (char const *) 0;
6335
6336 *t++ = 0;
6337 if (s) return 0;
6338 }
6339 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6340 int x[] = {25, 17};
6341 const int *foo = &x[0];
6342 ++foo;
6343 }
6344 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6345 typedef const int *iptr;
6346 iptr p = 0;
6347 ++p;
6348 }
6349 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
6350 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6351 struct s { int j; const int *ap[3]; } bx;
6352 struct s *b = &bx; b->j = 5;
6353 }
6354 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6355 const int foo = 10;
6356 if (!foo) return 0;
6357 }
6358 return !cs[0] && !zero.x;
6359#endif
6360
6361 ;
6362 return 0;
6363}
6364_ACEOF
6365if ac_fn_c_try_compile "$LINENO"; then :
6366 ac_cv_c_const=yes
6367else
6368 ac_cv_c_const=no
6369fi
6370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6371fi
6372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
6373$as_echo "$ac_cv_c_const" >&6; }
6374if test $ac_cv_c_const = no; then
6375
6376$as_echo "#define const /**/" >>confdefs.h
6377
6378fi
6379
6380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6381$as_echo_n "checking for inline... " >&6; }
6382if ${ac_cv_c_inline+:} false; then :
6383 $as_echo_n "(cached) " >&6
6384else
6385 ac_cv_c_inline=no
6386for ac_kw in inline __inline__ __inline; do
6387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6388/* end confdefs.h. */
6389#ifndef __cplusplus
6390typedef int foo_t;
6391static $ac_kw foo_t static_foo () {return 0; }
6392$ac_kw foo_t foo () {return 0; }
6393#endif
6394
6395_ACEOF
6396if ac_fn_c_try_compile "$LINENO"; then :
6397 ac_cv_c_inline=$ac_kw
6398fi
6399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6400 test "$ac_cv_c_inline" != no && break
6401done
6402
6403fi
6404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6405$as_echo "$ac_cv_c_inline" >&6; }
6406
6407case $ac_cv_c_inline in
6408 inline | yes) ;;
6409 *)
6410 case $ac_cv_c_inline in
6411 no) ac_val=;;
6412 *) ac_val=$ac_cv_c_inline;;
6413 esac
6414 cat >>confdefs.h <<_ACEOF
6415#ifndef __cplusplus
6416#define inline $ac_val
6417#endif
6418_ACEOF
6419 ;;
6420esac
6421
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
6423$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
6424if ${ac_cv_c_restrict+:} false; then :
6425 $as_echo_n "(cached) " >&6
6426else
6427 ac_cv_c_restrict=no
6428 # The order here caters to the fact that C++ does not require restrict.
6429 for ac_kw in __restrict __restrict__ _Restrict restrict; do
6430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6431/* end confdefs.h. */
6432typedef int * int_ptr;
6433 int foo (int_ptr $ac_kw ip) {
6434 return ip[0];
6435 }
6436int
6437main ()
6438{
6439int s[1];
6440 int * $ac_kw t = s;
6441 t[0] = 0;
6442 return foo(t)
6443 ;
6444 return 0;
6445}
6446_ACEOF
6447if ac_fn_c_try_compile "$LINENO"; then :
6448 ac_cv_c_restrict=$ac_kw
6449fi
6450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6451 test "$ac_cv_c_restrict" != no && break
6452 done
6453
6454fi
6455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
6456$as_echo "$ac_cv_c_restrict" >&6; }
6457
6458 case $ac_cv_c_restrict in
6459 restrict) ;;
6460 no) $as_echo "#define restrict /**/" >>confdefs.h
6461 ;;
6462 *) cat >>confdefs.h <<_ACEOF
6463#define restrict $ac_cv_c_restrict
6464_ACEOF
6465 ;;
6466 esac
6467
6468 ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t"
6469case $ac_cv_c_int8_t in #(
6470 no|yes) ;; #(
6471 *)
6472
6473cat >>confdefs.h <<_ACEOF
6474#define int8_t $ac_cv_c_int8_t
6475_ACEOF
6476;;
6477esac
6478
6479 ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t"
6480case $ac_cv_c_int16_t in #(
6481 no|yes) ;; #(
6482 *)
6483
6484cat >>confdefs.h <<_ACEOF
6485#define int16_t $ac_cv_c_int16_t
6486_ACEOF
6487;;
6488esac
6489
6490 ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6491case $ac_cv_c_int32_t in #(
6492 no|yes) ;; #(
6493 *)
6494
6495cat >>confdefs.h <<_ACEOF
6496#define int32_t $ac_cv_c_int32_t
6497_ACEOF
6498;;
6499esac
6500
6501 ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6502case $ac_cv_c_int64_t in #(
6503 no|yes) ;; #(
6504 *)
6505
6506cat >>confdefs.h <<_ACEOF
6507#define int64_t $ac_cv_c_int64_t
6508_ACEOF
6509;;
6510esac
6511
6512
6513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
6514$as_echo_n "checking for long double... " >&6; }
6515if ${ac_cv_type_long_double+:} false; then :
6516 $as_echo_n "(cached) " >&6
6517else
6518 if test "$GCC" = yes; then
6519 ac_cv_type_long_double=yes
6520 else
6521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6522/* end confdefs.h. */
6523/* The Stardent Vistra knows sizeof (long double), but does
6524 not support it. */
6525 long double foo = 0.0L;
6526int
6527main ()
6528{
6529static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
6530 sizeof (double) <= sizeof (long double))];
6531test_array [0] = 0;
6532return test_array [0];
6533
6534 ;
6535 return 0;
6536}
6537_ACEOF
6538if ac_fn_c_try_compile "$LINENO"; then :
6539 ac_cv_type_long_double=yes
6540else
6541 ac_cv_type_long_double=no
6542fi
6543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6544 fi
6545fi
6546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
6547$as_echo "$ac_cv_type_long_double" >&6; }
6548 if test $ac_cv_type_long_double = yes; then
6549
6550$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
6551
6552 fi
6553
6554
6555
6556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
6557$as_echo_n "checking for long long int... " >&6; }
6558if ${ac_cv_type_long_long_int+:} false; then :
6559 $as_echo_n "(cached) " >&6
6560else
6561 ac_cv_type_long_long_int=yes
6562 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
6563 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
6564 if test $ac_cv_type_long_long_int = yes; then
6565 if test "$cross_compiling" = yes; then :
6566 :
6567else
6568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6569/* end confdefs.h. */
6570#include <limits.h>
6571 #ifndef LLONG_MAX
6572 # define HALF \
6573 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
6574 # define LLONG_MAX (HALF - 1 + HALF)
6575 #endif
6576int
6577main ()
6578{
6579long long int n = 1;
6580 int i;
6581 for (i = 0; ; i++)
6582 {
6583 long long int m = n << i;
6584 if (m >> i != n)
6585 return 1;
6586 if (LLONG_MAX / 2 < m)
6587 break;
6588 }
6589 return 0;
6590 ;
6591 return 0;
6592}
6593_ACEOF
6594if ac_fn_c_try_run "$LINENO"; then :
6595
6596else
6597 ac_cv_type_long_long_int=no
6598fi
6599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6600 conftest.$ac_objext conftest.beam conftest.$ac_ext
6601fi
6602
6603 fi
6604 fi
6605fi
6606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
6607$as_echo "$ac_cv_type_long_long_int" >&6; }
6608 if test $ac_cv_type_long_long_int = yes; then
6609
6610$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
6611
6612 fi
6613
6614 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6615if test "x$ac_cv_type_off_t" = xyes; then :
6616
6617else
6618
6619cat >>confdefs.h <<_ACEOF
6620#define off_t long int
6621_ACEOF
6622
6623fi
6624
6625 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6626if test "x$ac_cv_type_pid_t" = xyes; then :
6627
6628else
6629
6630cat >>confdefs.h <<_ACEOF
6631#define pid_t int
6632_ACEOF
6633
6634fi
6635
6636 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
6637if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
6638
6639cat >>confdefs.h <<_ACEOF
6640#define HAVE_PTRDIFF_T 1
6641_ACEOF
6642
6643
6644fi
6645
6646 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6647if test "x$ac_cv_type_size_t" = xyes; then :
6648
6649else
6650
6651cat >>confdefs.h <<_ACEOF
6652#define size_t unsigned int
6653_ACEOF
6654
6655fi
6656
6657 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6658if test "x$ac_cv_type_ssize_t" = xyes; then :
6659
6660else
6661
6662cat >>confdefs.h <<_ACEOF
6663#define ssize_t int
6664_ACEOF
6665
6666fi
6667
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6669$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6670if ${ac_cv_type_uid_t+:} false; then :
6671 $as_echo_n "(cached) " >&6
6672else
6673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6674/* end confdefs.h. */
6675#include <sys/types.h>
6676
6677_ACEOF
6678if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6679 $EGREP "uid_t" >/dev/null 2>&1; then :
6680 ac_cv_type_uid_t=yes
6681else
6682 ac_cv_type_uid_t=no
6683fi
6684rm -f conftest*
6685
6686fi
6687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6688$as_echo "$ac_cv_type_uid_t" >&6; }
6689if test $ac_cv_type_uid_t = no; then
6690
6691$as_echo "#define uid_t int" >>confdefs.h
6692
6693
6694$as_echo "#define gid_t int" >>confdefs.h
6695
6696fi
6697
6698 ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
6699case $ac_cv_c_uint8_t in #(
6700 no|yes) ;; #(
6701 *)
6702
6703$as_echo "#define _UINT8_T 1" >>confdefs.h
6704
6705
6706cat >>confdefs.h <<_ACEOF
6707#define uint8_t $ac_cv_c_uint8_t
6708_ACEOF
6709;;
6710 esac
6711
6712 ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t"
6713case $ac_cv_c_uint16_t in #(
6714 no|yes) ;; #(
6715 *)
6716
6717
6718cat >>confdefs.h <<_ACEOF
6719#define uint16_t $ac_cv_c_uint16_t
6720_ACEOF
6721;;
6722 esac
6723
6724 ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6725case $ac_cv_c_uint32_t in #(
6726 no|yes) ;; #(
6727 *)
6728
6729$as_echo "#define _UINT32_T 1" >>confdefs.h
6730
6731
6732cat >>confdefs.h <<_ACEOF
6733#define uint32_t $ac_cv_c_uint32_t
6734_ACEOF
6735;;
6736 esac
6737
6738 ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6739case $ac_cv_c_uint64_t in #(
6740 no|yes) ;; #(
6741 *)
6742
6743$as_echo "#define _UINT64_T 1" >>confdefs.h
6744
6745
6746cat >>confdefs.h <<_ACEOF
6747#define uint64_t $ac_cv_c_uint64_t
6748_ACEOF
6749;;
6750 esac
6751
6752
6753 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
6754if test "x$ac_cv_type_uintptr_t" = xyes; then :
6755
6756$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
6757
6758else
6759 for ac_type in 'unsigned int' 'unsigned long int' \
6760 'unsigned long long int'; do
6761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6762/* end confdefs.h. */
6763$ac_includes_default
6764int
6765main ()
6766{
6767static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
6768test_array [0] = 0;
6769return test_array [0];
6770
6771 ;
6772 return 0;
6773}
6774_ACEOF
6775if ac_fn_c_try_compile "$LINENO"; then :
6776
6777cat >>confdefs.h <<_ACEOF
6778#define uintptr_t $ac_type
6779_ACEOF
6780
6781 ac_type=
6782fi
6783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6784 test -z "$ac_type" && break
6785 done
6786fi
6787
6788
6789
6790 # Initialise our build system
6791
6792 # Extract the first word of "tput", so it can be a program name with args.
6793set dummy tput; ac_word=$2
6794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6795$as_echo_n "checking for $ac_word... " >&6; }
6796if ${ac_cv_path_TPUT+:} false; then :
6797 $as_echo_n "(cached) " >&6
6798else
6799 case $TPUT in
6800 [\\/]* | ?:[\\/]*)
6801 ac_cv_path_TPUT="$TPUT" # Let the user override the test with a path.
6802 ;;
6803 *)
6804 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6805for as_dir in $PATH
6806do
6807 IFS=$as_save_IFS
6808 test -z "$as_dir" && as_dir=.
6809 for ac_exec_ext in '' $ac_executable_extensions; do
6810 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6811 ac_cv_path_TPUT="$as_dir/$ac_word$ac_exec_ext"
6812 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6813 break 2
6814 fi
6815done
6816 done
6817IFS=$as_save_IFS
6818
6819 ;;
6820esac
6821fi
6822TPUT=$ac_cv_path_TPUT
6823if test -n "$TPUT"; then
6824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TPUT" >&5
6825$as_echo "$TPUT" >&6; }
6826else
6827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6828$as_echo "no" >&6; }
6829fi
6830
6831
6832
6833 if test x"$TPUT" != x""; then :
6834
6835 if x=$($TPUT el 2>/dev/null); then
6836 TERM_EL="$x"
6837
6838 else
6839 TERM_EL="$($TPUT ce 2>/dev/null)"
6840
6841 fi
6842
6843 if x=$($TPUT sgr0 2>/dev/null); then
6844 TERM_SGR0="$x"
6845
6846 else
6847 TERM_SGR0="$($TPUT me 2>/dev/null)"
6848
6849 fi
6850
6851 if x=$($TPUT bold 2>/dev/null); then
6852 TERM_BOLD="$x"
6853
6854 else
6855 TERM_BOLD="$($TPUT md 2>/dev/null)"
6856
6857 fi
6858
6859 if x=$($TPUT setaf 1 2>/dev/null); then
6860 TERM_SETAF1="$x"
6861
6862 TERM_SETAF2="$($TPUT setaf 2 2>/dev/null)"
6863
6864 TERM_SETAF3="$($TPUT setaf 3 2>/dev/null)"
6865
6866 TERM_SETAF4="$($TPUT setaf 4 2>/dev/null)"
6867
6868 TERM_SETAF6="$($TPUT setaf 6 2>/dev/null)"
6869
6870 else
6871 TERM_SETAF1="$($TPUT AF 1 2>/dev/null)"
6872
6873 TERM_SETAF2="$($TPUT AF 2 2>/dev/null)"
6874
6875 TERM_SETAF3="$($TPUT AF 3 2>/dev/null)"
6876
6877 TERM_SETAF4="$($TPUT AF 4 2>/dev/null)"
6878
6879 TERM_SETAF6="$($TPUT AF 6 2>/dev/null)"
6880
6881 fi
6882
6883else
6884
6885 TERM_EL='\033\133K'
6886
6887 TERM_SGR0='\033\133m'
6888
6889 TERM_BOLD='\033\1331m'
6890
6891 TERM_SETAF1='\033\13331m'
6892
6893 TERM_SETAF2='\033\13332m'
6894
6895 TERM_SETAF3='\033\13333m'
6896
6897 TERM_SETAF4='\033\13334m'
6898
6899 TERM_SETAF6='\033\13336m'
6900
6901
6902fi
6903
6904
6905
6906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library system" >&5
6907$as_echo_n "checking for shared library system... " >&6; }
6908 case "$host_os" in
6909 darwin*)
6910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5
6911$as_echo "Darwin" >&6; }
6912 LIB_CFLAGS='-fPIC -DPIC'
6913 LIB_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR} -install_name @rpath/${SHARED_LIB}'
6914 LIB_PREFIX='lib'
6915 LIB_SUFFIX='.dylib'
6916 LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
6917 PLUGIN_CFLAGS='-fPIC -DPIC'
6918 PLUGIN_LDFLAGS='-shared -undefined dynamic_lookup'
6919 PLUGIN_SUFFIX='.so'
6920 INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i'
6921 UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib'
6922 CLEAN_LIB=''
6923 ;;
6924 solaris*)
6925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris" >&5
6926$as_echo "Solaris" >&6; }
6927 LIB_CFLAGS='-fPIC -DPIC'
6928 LIB_LDFLAGS='-shared -Wl,-soname=${SHARED_LIB}.${LIB_MAJOR}.${LIB_MINOR}'
6929 LIB_PREFIX='lib'
6930 LIB_SUFFIX='.so'
6931 LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
6932 PLUGIN_CFLAGS='-fPIC -DPIC'
6933 PLUGIN_LDFLAGS='-shared'
6934 PLUGIN_SUFFIX='.so'
6935 INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR} && rm -f ${DESTDIR}${libdir}/$$i && ${LN_S} $$i.${LIB_MAJOR}.${LIB_MINOR} ${DESTDIR}${libdir}/$$i'
6936 UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}'
6937 CLEAN_LIB=''
6938 ;;
6939 openbsd* | mirbsd*)
6940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenBSD" >&5
6941$as_echo "OpenBSD" >&6; }
6942 LIB_CFLAGS='-fPIC -DPIC'
6943 LIB_LDFLAGS='-shared'
6944 LIB_PREFIX='lib'
6945 LIB_SUFFIX='.so.${LIB_MAJOR}.${LIB_MINOR}'
6946 LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
6947 PLUGIN_CFLAGS='-fPIC -DPIC'
6948 PLUGIN_LDFLAGS='-shared'
6949 PLUGIN_SUFFIX='.so'
6950 INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i'
6951 UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i'
6952 CLEAN_LIB=''
6953 ;;
6954 cygwin* | mingw*)
6955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Win32" >&5
6956$as_echo "Win32" >&6; }
6957 LIB_CFLAGS=''
6958 LIB_LDFLAGS='-shared -Wl,--out-implib,${SHARED_LIB}.a'
6959 LIB_PREFIX='lib'
6960 LIB_SUFFIX='.dll'
6961 LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
6962 PLUGIN_CFLAGS=''
6963 PLUGIN_LDFLAGS='-shared'
6964 PLUGIN_SUFFIX='.dll'
6965 INSTALL_LIB='&& ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i && ${INSTALL} -m 755 $$i.a ${DESTDIR}${libdir}/$$i.a'
6966 UNINSTALL_LIB='&& rm -f ${DESTDIR}${bindir}/$$i ${DESTDIR}${libdir}/$$i.a'
6967 CLEAN_LIB='${SHARED_LIB}.a'
6968 ;;
6969 *)
6970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: GNU" >&5
6971$as_echo "GNU" >&6; }
6972 LIB_CFLAGS='-fPIC -DPIC'
6973 LIB_LDFLAGS='-shared -Wl,-soname=${SHARED_LIB}.${LIB_MAJOR}'
6974 LIB_PREFIX='lib'
6975 LIB_SUFFIX='.so'
6976 LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
6977 PLUGIN_CFLAGS='-fPIC -DPIC'
6978 PLUGIN_LDFLAGS='-shared'
6979 PLUGIN_SUFFIX='.so'
6980 INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0 && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i'
6981 UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0'
6982 CLEAN_LIB=''
6983 ;;
6984 esac
6985
472c7f87 6986
56299b8d 6987
56299b8d 6988
56299b8d 6989
56299b8d 6990
56299b8d 6991
56299b8d 6992
56299b8d 6993
56299b8d 6994
56299b8d 6995
472c7f87 6996
56299b8d 6997
4ff6a09b
AJ
6998
6999
ddf1c059
AJ
7000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need an implib" >&5
7001$as_echo_n "checking whether we need an implib... " >&6; }
7002 case "$host_os" in
7003 cygwin* | mingw*)
7004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7005$as_echo "yes" >&6; }
7006 PROG_IMPLIB_NEEDED='yes'
7007 PROG_IMPLIB_LDFLAGS='-Wl,-export-all-symbols,--out-implib,lib${PROG}.a'
7008 ;;
7009 *)
7010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7011$as_echo "no" >&6; }
7012 PROG_IMPLIB_NEEDED='no'
7013 PROG_IMPLIB_LDFLAGS=''
7014 ;;
7015 esac
7016
4ff6a09b
AJ
7017
7018
7019
ddf1c059 7020 LIBS="${DYNAMIC_LD_LIBS} ${LIBS}"
c2d29773 7021
3828bfac 7022 # If we're building on Windows we need socket and regex libraries from mingw
f54ed0d4
AJ
7023 case "${host}" in #(
7024 *-*-mingw32) :
7025
7026 CPPFLAGS="-I/mingw/include ${CPPFLAGS}"
7027 LIBS="-lwsock32 -lws2_32 -lregex ${LIBS}"
7028 ;; #(
7029 *) :
7030 ;;
7031esac
c2d29773
AJ
7032
7033
3828bfac
AJ
7034# Automake compatibility. --nenolod
7035PACKAGE=atheme
c2d29773 7036
3828bfac 7037VERSION=7.3.0-rc2
c2d29773 7038
3828bfac 7039VENDOR_STRING="Atheme Development Group <https://atheme.github.io/>"
c2d29773 7040
737aece1 7041PACKAGE_BUGREPORT_I18N="ircs://irc.libera.chat:6697/atheme-i18n"
c2d29773
AJ
7042
7043
3828bfac
AJ
7044cat >>confdefs.h <<_ACEOF
7045#define PACKAGE "${PACKAGE}"
7046_ACEOF
c2d29773
AJ
7047
7048
3828bfac
AJ
7049cat >>confdefs.h <<_ACEOF
7050#define VERSION "${VERSION}"
7051_ACEOF
c2d29773
AJ
7052
7053
3828bfac
AJ
7054cat >>confdefs.h <<_ACEOF
7055#define VENDOR_STRING "${VENDOR_STRING}"
7056_ACEOF
c2d29773
AJ
7057
7058
3828bfac
AJ
7059cat >>confdefs.h <<_ACEOF
7060#define PACKAGE_BUGREPORT_I18N "${PACKAGE_BUGREPORT_I18N}"
7061_ACEOF
c2d29773
AJ
7062
7063
3828bfac
AJ
7064# This should be before any library tests so that insufficient header
7065# inclusions in those tests are caught before they become a runtime
7066# problem
c2d29773 7067
90121a3e
AJ
7068
7069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Werror=implicit " >&5
3828bfac 7070$as_echo_n "checking for C compiler flag(s) -Werror=implicit ... " >&6; }
c2d29773 7071
90121a3e
AJ
7072 CFLAGS_SAVED="${CFLAGS:-}"
7073 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Werror=implicit"
c2d29773 7074
90121a3e 7075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3828bfac 7076/* end confdefs.h. */
c2d29773
AJ
7077
7078
90121a3e
AJ
7079 #ifdef HAVE_STDDEF_H
7080 # include <stddef.h>
7081 #endif
7082 static int
7083 return_zero(void)
7084 {
7085 return 0;
7086 }
7087
56299b8d
WP
7088int
7089main ()
7090{
3828bfac 7091
90121a3e
AJ
7092 int zero = return_zero();
7093
c2d29773
AJ
7094 ;
7095 return 0;
7096}
3828bfac 7097
c2d29773 7098_ACEOF
3828bfac
AJ
7099if ac_fn_c_try_compile "$LINENO"; then :
7100
90121a3e 7101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3828bfac 7102$as_echo "yes" >&6; }
90121a3e 7103 ATHEME_TEST_CC_FLAGS_RESULT="yes"
3828bfac
AJ
7104
7105else
7106
90121a3e 7107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3828bfac 7108$as_echo "no" >&6; }
90121a3e
AJ
7109 ATHEME_TEST_CC_FLAGS_RESULT="no"
7110 CFLAGS="${CFLAGS_SAVED}"
3828bfac 7111
c2d29773 7112fi
3828bfac 7113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
dfaaa8ce 7114
90121a3e 7115 unset CFLAGS_SAVED
3828bfac
AJ
7116
7117
7118# Conditional libraries for standard functions (no option to control detection)
7119
7120
7121 CFLAGS_SAVED="${CFLAGS}"
7122 LIBS_SAVED="${LIBS}"
7123
7124 LIBDL_LIBS=""
7125
7126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlinfo" >&5
7127$as_echo_n "checking for library containing dlinfo... " >&6; }
7128if ${ac_cv_search_dlinfo+:} false; then :
c2d29773
AJ
7129 $as_echo_n "(cached) " >&6
7130else
3828bfac
AJ
7131 ac_func_search_save_LIBS=$LIBS
7132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c2d29773 7133/* end confdefs.h. */
3828bfac
AJ
7134
7135/* Override any GCC internal prototype to avoid an error.
7136 Use char because int might match the return type of a GCC
7137 builtin and then its argument prototype would still apply. */
7138#ifdef __cplusplus
7139extern "C"
7140#endif
7141char dlinfo ();
c2d29773
AJ
7142int
7143main ()
7144{
3828bfac 7145return dlinfo ();
56299b8d
WP
7146 ;
7147 return 0;
7148}
7149_ACEOF
3828bfac
AJ
7150for ac_lib in '' dl; do
7151 if test -z "$ac_lib"; then
7152 ac_res="none required"
7153 else
7154 ac_res=-l$ac_lib
7155 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7156 fi
7157 if ac_fn_c_try_link "$LINENO"; then :
7158 ac_cv_search_dlinfo=$ac_res
083f09b4 7159fi
472c7f87 7160rm -f core conftest.err conftest.$ac_objext \
3828bfac
AJ
7161 conftest$ac_exeext
7162 if ${ac_cv_search_dlinfo+:} false; then :
7163 break
c2d29773 7164fi
3828bfac
AJ
7165done
7166if ${ac_cv_search_dlinfo+:} false; then :
c2d29773 7167
3828bfac
AJ
7168else
7169 ac_cv_search_dlinfo=no
7170fi
7171rm conftest.$ac_ext
7172LIBS=$ac_func_search_save_LIBS
7173fi
7174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlinfo" >&5
7175$as_echo "$ac_cv_search_dlinfo" >&6; }
7176ac_res=$ac_cv_search_dlinfo
7177if test "$ac_res" != no; then :
7178 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c2d29773 7179
3828bfac
AJ
7180 for ac_header in dlfcn.h link.h
7181do :
7182 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7183ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7184if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7185 cat >>confdefs.h <<_ACEOF
7186#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7187_ACEOF
c2d29773 7188
3828bfac 7189fi
c2d29773 7190
3828bfac 7191done
c2d29773 7192
3828bfac
AJ
7193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dlinfo appears to be usable" >&5
7194$as_echo_n "checking if dlinfo appears to be usable... " >&6; }
7195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
472c7f87 7196/* end confdefs.h. */
dfaaa8ce 7197
3828bfac
AJ
7198
7199 #ifdef HAVE_STDDEF_H
7200 # include <stddef.h>
7201 #endif
7202 #ifdef HAVE_DLFCN_H
7203 # include <dlfcn.h>
7204 #endif
7205 #ifdef HAVE_LINK_H
7206 # include <link.h>
7207 #endif
dfaaa8ce 7208
472c7f87
WP
7209int
7210main ()
7211{
dfaaa8ce 7212
3828bfac
AJ
7213 struct link_map *map = NULL;
7214 (void) dlinfo(NULL, RTLD_DI_LINKMAP, &map);
7215 (void) map->l_addr;
dfaaa8ce 7216
472c7f87
WP
7217 ;
7218 return 0;
7219}
3828bfac 7220
083f09b4 7221_ACEOF
472c7f87 7222if ac_fn_c_try_link "$LINENO"; then :
3828bfac
AJ
7223
7224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7225$as_echo "yes" >&6; }
7226
7227$as_echo "#define HAVE_USABLE_DLINFO 1" >>confdefs.h
7228
7229 if test "x${ac_cv_search_dlinfo}" != "xnone required"; then :
7230
7231 LIBDL_LIBS="${ac_cv_search_dlinfo}"
7232
7233
7234fi
7235
c2d29773 7236else
3828bfac
AJ
7237
7238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7239$as_echo "no" >&6; }
7240
c2d29773
AJ
7241fi
7242rm -f core conftest.err conftest.$ac_objext \
7243 conftest$ac_exeext conftest.$ac_ext
3828bfac 7244
c2d29773 7245fi
813fd892
WP
7246
7247
3828bfac
AJ
7248 CFLAGS="${CFLAGS_SAVED}"
7249 LIBS="${LIBS_SAVED}"
813fd892 7250
90121a3e 7251 unset CFLAGS_SAVED
6fb8526b 7252 unset LIBS_SAVED
90121a3e 7253
c2d29773
AJ
7254
7255
3828bfac 7256 LIBS_SAVED="${LIBS}"
c2d29773 7257
3828bfac 7258 LIBMATH_LIBS=""
c2d29773 7259
3828bfac
AJ
7260 for ac_header in math.h
7261do :
7262 ac_fn_c_check_header_mongrel "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
7263if test "x$ac_cv_header_math_h" = xyes; then :
7264 cat >>confdefs.h <<_ACEOF
7265#define HAVE_MATH_H 1
7266_ACEOF
813fd892 7267
3828bfac 7268fi
813fd892 7269
3828bfac 7270done
813fd892 7271
083f09b4 7272
3828bfac
AJ
7273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing floor" >&5
7274$as_echo_n "checking for library containing floor... " >&6; }
7275if ${ac_cv_search_floor+:} false; then :
083f09b4
WP
7276 $as_echo_n "(cached) " >&6
7277else
3828bfac
AJ
7278 ac_func_search_save_LIBS=$LIBS
7279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
083f09b4
WP
7280/* end confdefs.h. */
7281
3828bfac
AJ
7282/* Override any GCC internal prototype to avoid an error.
7283 Use char because int might match the return type of a GCC
7284 builtin and then its argument prototype would still apply. */
7285#ifdef __cplusplus
7286extern "C"
7287#endif
7288char floor ();
083f09b4
WP
7289int
7290main ()
7291{
3828bfac 7292return floor ();
083f09b4
WP
7293 ;
7294 return 0;
7295}
7296_ACEOF
3828bfac
AJ
7297for ac_lib in '' m; do
7298 if test -z "$ac_lib"; then
7299 ac_res="none required"
7300 else
7301 ac_res=-l$ac_lib
7302 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7303 fi
7304 if ac_fn_c_try_link "$LINENO"; then :
7305 ac_cv_search_floor=$ac_res
083f09b4
WP
7306fi
7307rm -f core conftest.err conftest.$ac_objext \
3828bfac
AJ
7308 conftest$ac_exeext
7309 if ${ac_cv_search_floor+:} false; then :
7310 break
7311fi
7312done
7313if ${ac_cv_search_floor+:} false; then :
083f09b4 7314
3828bfac
AJ
7315else
7316 ac_cv_search_floor=no
7317fi
7318rm conftest.$ac_ext
7319LIBS=$ac_func_search_save_LIBS
7320fi
7321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_floor" >&5
7322$as_echo "$ac_cv_search_floor" >&6; }
7323ac_res=$ac_cv_search_floor
7324if test "$ac_res" != no; then :
7325 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7326
7327 if test "x${ac_cv_search_floor}" != "xnone required"; then :
7328
7329 LIBMATH_LIBS="${LIBMATH_LIBS:-} ${ac_cv_search_floor}"
7330
7331fi
7332
7333else
7334
7335 as_fn_error $? "math functions appear to be unusable" "$LINENO" 5
7336
7337fi
7338
7339
7340 LIBS="${LIBS_SAVED}"
7341
7342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pow" >&5
7343$as_echo_n "checking for library containing pow... " >&6; }
7344if ${ac_cv_search_pow+:} false; then :
7345 $as_echo_n "(cached) " >&6
7346else
7347 ac_func_search_save_LIBS=$LIBS
7348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7349/* end confdefs.h. */
083f09b4 7350
3828bfac
AJ
7351/* Override any GCC internal prototype to avoid an error.
7352 Use char because int might match the return type of a GCC
7353 builtin and then its argument prototype would still apply. */
7354#ifdef __cplusplus
7355extern "C"
7356#endif
7357char pow ();
c2d29773
AJ
7358int
7359main ()
7360{
3828bfac 7361return pow ();
c2d29773
AJ
7362 ;
7363 return 0;
7364}
7365_ACEOF
3828bfac
AJ
7366for ac_lib in '' m; do
7367 if test -z "$ac_lib"; then
7368 ac_res="none required"
7369 else
7370 ac_res=-l$ac_lib
7371 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7372 fi
7373 if ac_fn_c_try_link "$LINENO"; then :
7374 ac_cv_search_pow=$ac_res
083f09b4 7375fi
c2d29773 7376rm -f core conftest.err conftest.$ac_objext \
3828bfac
AJ
7377 conftest$ac_exeext
7378 if ${ac_cv_search_pow+:} false; then :
7379 break
083f09b4 7380fi
3828bfac
AJ
7381done
7382if ${ac_cv_search_pow+:} false; then :
7383
083f09b4 7384else
3828bfac
AJ
7385 ac_cv_search_pow=no
7386fi
7387rm conftest.$ac_ext
7388LIBS=$ac_func_search_save_LIBS
7389fi
7390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pow" >&5
7391$as_echo "$ac_cv_search_pow" >&6; }
7392ac_res=$ac_cv_search_pow
7393if test "$ac_res" != no; then :
7394 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7395
7396 if test "x${ac_cv_search_pow}" != "xnone required"; then :
7397
7398 LIBMATH_LIBS="${LIBMATH_LIBS:-} ${ac_cv_search_pow}"
7399
7400fi
c2d29773 7401
c2d29773 7402else
3828bfac
AJ
7403
7404 as_fn_error $? "math functions appear to be unusable" "$LINENO" 5
7405
7406fi
7407
7408
7409 LIBS="${LIBMATH_LIBS} ${LIBS_SAVED}"
7410
7411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if math functions appear to be usable" >&5
7412$as_echo_n "checking if math functions appear to be usable... " >&6; }
7413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
083f09b4
WP
7414/* end confdefs.h. */
7415
c2d29773 7416
3828bfac
AJ
7417 #ifdef HAVE_MATH_H
7418 # include <math.h>
7419 #endif
c2d29773 7420
083f09b4
WP
7421int
7422main ()
7423{
3828bfac
AJ
7424
7425 const double tmp = 16.125;
7426 const double retf = floor(tmp);
7427 const double retp = pow(tmp, tmp);
c2d29773 7428
083f09b4
WP
7429 ;
7430 return 0;
7431}
3828bfac 7432
083f09b4 7433_ACEOF
3828bfac 7434if ac_fn_c_try_link "$LINENO"; then :
083f09b4 7435
3828bfac
AJ
7436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7437$as_echo "yes" >&6; }
7438
7439else
7440
7441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7442$as_echo "no" >&6; }
7443 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7444$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7445as_fn_error $? "math functions appear to be unusable
7446See \`config.log' for more details" "$LINENO" 5; }
083f09b4
WP
7447
7448fi
3828bfac
AJ
7449rm -f core conftest.err conftest.$ac_objext \
7450 conftest$ac_exeext conftest.$ac_ext
083f09b4 7451
083f09b4 7452
3828bfac
AJ
7453
7454 LIBS="${LIBS_SAVED}"
7455
6fb8526b 7456 unset LIBS_SAVED
90121a3e 7457
3828bfac
AJ
7458
7459
7460 LIBS_SAVED="${LIBS}"
7461
7462 LIBSOCKET_LIBS=""
7463
7464 for ac_header in netinet/in.h sys/socket.h sys/types.h
7465do :
7466 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7467ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7468if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7469 cat >>confdefs.h <<_ACEOF
7470#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7471_ACEOF
7472
7473fi
7474
7475done
7476
7477
7478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
7479$as_echo_n "checking for library containing socket... " >&6; }
7480if ${ac_cv_search_socket+:} false; then :
7481 $as_echo_n "(cached) " >&6
7482else
7483 ac_func_search_save_LIBS=$LIBS
7484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7485/* end confdefs.h. */
7486
7487/* Override any GCC internal prototype to avoid an error.
7488 Use char because int might match the return type of a GCC
7489 builtin and then its argument prototype would still apply. */
7490#ifdef __cplusplus
7491extern "C"
7492#endif
7493char socket ();
7494int
7495main ()
7496{
7497return socket ();
7498 ;
7499 return 0;
7500}
7501_ACEOF
7502for ac_lib in '' socket; do
7503 if test -z "$ac_lib"; then
7504 ac_res="none required"
c2d29773 7505 else
3828bfac
AJ
7506 ac_res=-l$ac_lib
7507 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
c2d29773 7508 fi
3828bfac
AJ
7509 if ac_fn_c_try_link "$LINENO"; then :
7510 ac_cv_search_socket=$ac_res
7511fi
7512rm -f core conftest.err conftest.$ac_objext \
7513 conftest$ac_exeext
7514 if ${ac_cv_search_socket+:} false; then :
7515 break
7516fi
7517done
7518if ${ac_cv_search_socket+:} false; then :
083f09b4 7519
3828bfac
AJ
7520else
7521 ac_cv_search_socket=no
7522fi
7523rm conftest.$ac_ext
7524LIBS=$ac_func_search_save_LIBS
7525fi
7526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
7527$as_echo "$ac_cv_search_socket" >&6; }
7528ac_res=$ac_cv_search_socket
7529if test "$ac_res" != no; then :
7530 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
77b1981e 7531
3828bfac 7532 if test "x${ac_cv_search_socket}" != "xnone required"; then :
77b1981e 7533
3828bfac 7534 LIBSOCKET_LIBS="${ac_cv_search_socket}"
77b1981e 7535
3828bfac 7536fi
77b1981e 7537
3828bfac 7538else
77b1981e 7539
3828bfac 7540 as_fn_error $? "socket functions appear to be unusable" "$LINENO" 5
77b1981e 7541
3828bfac 7542fi
77b1981e
WP
7543
7544
3828bfac 7545 LIBS="${LIBSOCKET_LIBS} ${LIBS_SAVED}"
77b1981e 7546
3828bfac
AJ
7547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socket functions are usable" >&5
7548$as_echo_n "checking if socket functions are usable... " >&6; }
7549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7550/* end confdefs.h. */
77b1981e
WP
7551
7552
3828bfac
AJ
7553 #ifdef HAVE_SYS_TYPES_H
7554 # include <sys/types.h>
7555 #endif
7556 #ifdef HAVE_SYS_SOCKET_H
7557 # include <sys/socket.h>
7558 #endif
7559 #ifdef HAVE_NETINET_IN_H
7560 # include <netinet/in.h>
7561 #endif
d82f3e17 7562
3828bfac
AJ
7563int
7564main ()
7565{
d82f3e17 7566
3828bfac
AJ
7567 const int fd1 = socket(AF_UNIX, SOCK_DGRAM, 0);
7568 const int fd2 = socket(AF_UNIX, SOCK_STREAM, 0);
7569 const int fd3 = socket(AF_INET, SOCK_DGRAM, 0);
7570 const int fd4 = socket(AF_INET, SOCK_STREAM, 0);
7571 const int fd5 = socket(AF_INET6, SOCK_DGRAM, 0);
7572 const int fd6 = socket(AF_INET6, SOCK_STREAM, 0);
d82f3e17 7573
3828bfac
AJ
7574 ;
7575 return 0;
7576}
d82f3e17 7577
3828bfac
AJ
7578_ACEOF
7579if ac_fn_c_try_link "$LINENO"; then :
d82f3e17 7580
3828bfac
AJ
7581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7582$as_echo "yes" >&6; }
d82f3e17 7583
3828bfac 7584else
d82f3e17 7585
3828bfac
AJ
7586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7587$as_echo "no" >&6; }
7588 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7590as_fn_error $? "socket functions appear to be unusable
7591See \`config.log' for more details" "$LINENO" 5; }
7592
7593fi
7594rm -f core conftest.err conftest.$ac_objext \
7595 conftest$ac_exeext conftest.$ac_ext
7596
7597
7598
7599 LIBS="${LIBS_SAVED}"
c2d29773 7600
90121a3e
AJ
7601 unset LIBS_SAVED
7602
77b1981e 7603
3828bfac
AJ
7604# Libraries that are autodetected (alphabetical)
7605
7606
7607 CFLAGS_SAVED="${CFLAGS}"
7608 LIBS_SAVED="${LIBS}"
7609
7610 LIBARGON2="No"
52d1876b 7611 LIBARGON2_TYPE_ID="No"
3828bfac
AJ
7612 LIBARGON2_PATH=""
7613
7614
7615# Check whether --with-argon2 was given.
7616if test "${with_argon2+set}" = set; then :
7617 withval=$with_argon2;
7618else
7619 with_argon2="auto"
77b1981e
WP
7620fi
7621
c2d29773 7622
f54ed0d4
AJ
7623 case "x${with_argon2}" in #(
7624 xno) :
7625 ;; #(
7626 xyes) :
7627 ;; #(
7628 xauto) :
7629 ;; #(
7630 x/*) :
7631
7632 LIBARGON2_PATH="${with_argon2}"
7633 with_argon2="yes"
7634 ;; #(
7635 *) :
7636
7637 as_fn_error $? "invalid option for --with-argon2" "$LINENO" 5
7638 ;;
7639esac
77b1981e 7640
3828bfac
AJ
7641 if test "${with_argon2}" != "no"; then :
7642
7643 if test -n "${LIBARGON2_PATH}"; then :
7644
7645 # Allow for user to provide custom installation directory
7646 if test -d "${LIBARGON2_PATH}/include" -a -d "${LIBARGON2_PATH}/lib"; then :
7647
7648 LIBARGON2_CFLAGS="-I${LIBARGON2_PATH}/include"
7649 LIBARGON2_LIBS="-L${LIBARGON2_PATH}/lib -largon2"
7650
7651else
7652
7653 as_fn_error $? "${LIBARGON2_PATH} is not a suitable directory for libargon2" "$LINENO" 5
7654
7655fi
7656
7657elif test -n "${PKG_CONFIG}"; then :
7658
7659 # Allow for the user to "override" pkg-config without it being installed
7660
7661pkg_failed=no
7662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBARGON2" >&5
7663$as_echo_n "checking for LIBARGON2... " >&6; }
7664
7665if test -n "$LIBARGON2_CFLAGS"; then
7666 pkg_cv_LIBARGON2_CFLAGS="$LIBARGON2_CFLAGS"
7667 elif test -n "$PKG_CONFIG"; then
7668 if test -n "$PKG_CONFIG" && \
7669 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libargon2\""; } >&5
7670 ($PKG_CONFIG --exists --print-errors "libargon2") 2>&5
7671 ac_status=$?
7672 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7673 test $ac_status = 0; }; then
7674 pkg_cv_LIBARGON2_CFLAGS=`$PKG_CONFIG --cflags "libargon2" 2>/dev/null`
7675 test "x$?" != "x0" && pkg_failed=yes
7676else
7677 pkg_failed=yes
7678fi
7679 else
7680 pkg_failed=untried
7681fi
7682if test -n "$LIBARGON2_LIBS"; then
7683 pkg_cv_LIBARGON2_LIBS="$LIBARGON2_LIBS"
7684 elif test -n "$PKG_CONFIG"; then
7685 if test -n "$PKG_CONFIG" && \
7686 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libargon2\""; } >&5
7687 ($PKG_CONFIG --exists --print-errors "libargon2") 2>&5
7688 ac_status=$?
7689 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7690 test $ac_status = 0; }; then
7691 pkg_cv_LIBARGON2_LIBS=`$PKG_CONFIG --libs "libargon2" 2>/dev/null`
7692 test "x$?" != "x0" && pkg_failed=yes
7693else
7694 pkg_failed=yes
7695fi
7696 else
7697 pkg_failed=untried
7698fi
7699
7700
7701
7702if test $pkg_failed = yes; then
7703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7704$as_echo "no" >&6; }
7705
7706if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7707 _pkg_short_errors_supported=yes
7708else
7709 _pkg_short_errors_supported=no
7710fi
7711 if test $_pkg_short_errors_supported = yes; then
7712 LIBARGON2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libargon2" 2>&1`
7713 else
7714 LIBARGON2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libargon2" 2>&1`
7715 fi
7716 # Put the nasty error message in config.log where it belongs
7717 echo "$LIBARGON2_PKG_ERRORS" >&5
7718
cbd32d76 7719 LIBARGON2="No"
3828bfac
AJ
7720elif test $pkg_failed = untried; then
7721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7722$as_echo "no" >&6; }
cbd32d76 7723 LIBARGON2="No"
3828bfac
AJ
7724else
7725 LIBARGON2_CFLAGS=$pkg_cv_LIBARGON2_CFLAGS
7726 LIBARGON2_LIBS=$pkg_cv_LIBARGON2_LIBS
7727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7728$as_echo "yes" >&6; }
7729
7730fi
7731
7732fi
7733 if test -n "${LIBARGON2_CFLAGS+set}" -a -n "${LIBARGON2_LIBS+set}"; then :
7734
7735 # Only proceed with library tests if custom paths were given or pkg-config succeeded
7736 LIBARGON2="Yes"
7737
7738else
7739
7740 LIBARGON2="No"
7741 if test "${with_argon2}" != "no" && test "${with_argon2}" != "auto"; then :
7742
7743 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7745as_fn_error $? "--with-argon2 was given but libargon2 could not be found
7746See \`config.log' for more details" "$LINENO" 5; }
7747
7748fi
7749
7750fi
7751
7752fi
7753
7754 if test "${LIBARGON2}" = "Yes"; then :
7755
7756 CFLAGS="${LIBARGON2_CFLAGS} ${CFLAGS}"
7757 LIBS="${LIBARGON2_LIBS} ${LIBS}"
7758
7759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libargon2 appears to be usable" >&5
7760$as_echo_n "checking if libargon2 appears to be usable... " >&6; }
7761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7762/* end confdefs.h. */
7763
7764
7765 #ifdef HAVE_STDDEF_H
7766 # include <stddef.h>
7767 #endif
7768 #ifdef HAVE_SIGNAL_H
7769 # include <signal.h>
7770 #endif
7771 #include <argon2.h>
7772
7773int
7774main ()
7775{
7776
7777 // POSIX.1-2001 Signal-blocking functions are necessary for thread-safety
7778 sigset_t oldset;
7779 sigset_t newset;
7780 (void) sigfillset(&newset);
7781 (void) sigprocmask(SIG_BLOCK, &newset, &oldset);
7782
7783 argon2_context ctx = {
7784 .out = NULL,
7785 .outlen = 0,
7786 .pwd = NULL,
7787 .pwdlen = 0,
7788 .salt = NULL,
7789 .saltlen = 0,
7790 .t_cost = ARGON2_MAX_TIME,
7791 .m_cost = ARGON2_MAX_MEMORY,
7792 .lanes = 1,
7793 .threads = 1,
7794 .version = ARGON2_VERSION_NUMBER,
7795 };
7796 (void) argon2_ctx(&ctx, Argon2_d);
7797 (void) argon2_ctx(&ctx, Argon2_i);
3828bfac 7798 (void) argon2_error_message(0);
3828bfac
AJ
7799
7800 ;
7801 return 0;
7802}
7803
7804_ACEOF
7805if ac_fn_c_try_link "$LINENO"; then :
7806
7807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7808$as_echo "yes" >&6; }
7809 LIBARGON2="Yes"
7810
7811$as_echo "#define HAVE_LIBARGON2 1" >>confdefs.h
7812
7813
52d1876b
AJ
7814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libargon2 algorithm type Argon2id appears to be usable" >&5
7815$as_echo_n "checking if libargon2 algorithm type Argon2id appears to be usable... " >&6; }
7816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7817/* end confdefs.h. */
7818
7819
7820 #ifdef HAVE_STDDEF_H
7821 # include <stddef.h>
7822 #endif
7823 #include <argon2.h>
7824
7825int
7826main ()
7827{
7828
7829 (void) argon2_ctx(NULL, Argon2_id);
7830
7831 ;
7832 return 0;
7833}
7834
7835_ACEOF
7836if ac_fn_c_try_link "$LINENO"; then :
7837
7838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7839$as_echo "yes" >&6; }
7840 LIBARGON2_TYPE_ID="Yes"
7841
7842$as_echo "#define HAVE_LIBARGON2_TYPE_ID 1" >>confdefs.h
7843
7844
7845else
7846
7847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7848$as_echo "no" >&6; }
7849 LIBARGON2_TYPE_ID="No"
7850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your libargon2 is very old -- you will not be able to use Argon2id" >&5
7851$as_echo "$as_me: WARNING: your libargon2 is very old -- you will not be able to use Argon2id" >&2;}
7852
7853fi
7854rm -f core conftest.err conftest.$ac_objext \
7855 conftest$ac_exeext conftest.$ac_ext
7856
3828bfac
AJ
7857else
7858
7859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7860$as_echo "no" >&6; }
7861 LIBARGON2="No"
7862 if test "${with_argon2}" != "no" && test "${with_argon2}" != "auto"; then :
7863
7864 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7865$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7866as_fn_error $? "--with-argon2 was given but libargon2 appears to be unusable
7867See \`config.log' for more details" "$LINENO" 5; }
7868
7869fi
7870
7871fi
7872rm -f core conftest.err conftest.$ac_objext \
7873 conftest$ac_exeext conftest.$ac_ext
7874
7875fi
7876
7877 if test "${LIBARGON2}" = "No"; then :
7878
7879 LIBARGON2_CFLAGS=""
7880 LIBARGON2_LIBS=""
7881
7882fi
7883
7884
7885
7886
7887 CFLAGS="${CFLAGS_SAVED}"
7888 LIBS="${LIBS_SAVED}"
7889
90121a3e
AJ
7890 unset CFLAGS_SAVED
7891 unset LIBS_SAVED
7892
3828bfac
AJ
7893
7894
7895 CFLAGS_SAVED="${CFLAGS}"
7896 LIBS_SAVED="${LIBS}"
7897
7898 LIBCRACK="No"
7899
7900 LIBCRACK_CFLAGS=""
7901 LIBCRACK_LIBS=""
7902
7903
7904# Check whether --with-cracklib was given.
7905if test "${with_cracklib+set}" = set; then :
7906 withval=$with_cracklib;
7907else
7908 with_cracklib="auto"
7909fi
7910
7911
f54ed0d4
AJ
7912 case "x${with_cracklib}" in #(
7913 xno) :
7914 ;; #(
7915 xyes) :
7916 ;; #(
7917 xauto) :
7918 ;; #(
7919 *) :
7920
7921 as_fn_error $? "invalid option for --with-cracklib" "$LINENO" 5
7922 ;;
7923esac
3828bfac
AJ
7924
7925 if test "${with_cracklib}" != "no"; then :
7926
7927 # If this library ever starts shipping a pkg-config file, change to PKG_CHECK_MODULES ?
7928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing FascistCheck" >&5
7929$as_echo_n "checking for library containing FascistCheck... " >&6; }
7930if ${ac_cv_search_FascistCheck+:} false; then :
7931 $as_echo_n "(cached) " >&6
7932else
7933 ac_func_search_save_LIBS=$LIBS
7934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7935/* end confdefs.h. */
7936
7937/* Override any GCC internal prototype to avoid an error.
7938 Use char because int might match the return type of a GCC
7939 builtin and then its argument prototype would still apply. */
7940#ifdef __cplusplus
7941extern "C"
7942#endif
7943char FascistCheck ();
7944int
7945main ()
7946{
7947return FascistCheck ();
7948 ;
7949 return 0;
7950}
7951_ACEOF
7952for ac_lib in '' crack; do
7953 if test -z "$ac_lib"; then
7954 ac_res="none required"
7955 else
7956 ac_res=-l$ac_lib
7957 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7958 fi
7959 if ac_fn_c_try_link "$LINENO"; then :
7960 ac_cv_search_FascistCheck=$ac_res
7961fi
7962rm -f core conftest.err conftest.$ac_objext \
7963 conftest$ac_exeext
7964 if ${ac_cv_search_FascistCheck+:} false; then :
7965 break
7966fi
7967done
7968if ${ac_cv_search_FascistCheck+:} false; then :
7969
7970else
7971 ac_cv_search_FascistCheck=no
7972fi
7973rm conftest.$ac_ext
7974LIBS=$ac_func_search_save_LIBS
7975fi
7976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_FascistCheck" >&5
7977$as_echo "$ac_cv_search_FascistCheck" >&6; }
7978ac_res=$ac_cv_search_FascistCheck
7979if test "$ac_res" != no; then :
7980 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7981
7982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if cracklib appears to be usable" >&5
7983$as_echo_n "checking if cracklib appears to be usable... " >&6; }
7984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7985/* end confdefs.h. */
7986
7987
7988 #ifdef HAVE_STDDEF_H
7989 # include <stddef.h>
7990 #endif
7991 #include <crack.h>
7992
7993int
7994main ()
7995{
7996
7997 (void) FascistCheck(NULL, NULL);
7998
7999 ;
8000 return 0;
8001}
8002
8003_ACEOF
8004if ac_fn_c_try_compile "$LINENO"; then :
8005
8006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8007$as_echo "yes" >&6; }
8008 LIBCRACK="Yes"
8009
8010$as_echo "#define HAVE_CRACKLIB 1" >>confdefs.h
8011
8012
8013$as_echo "#define HAVE_ANY_PASSWORD_QUALITY_LIBRARY 1" >>confdefs.h
8014
8015 if test "x${ac_cv_search_FascistCheck}" != "xnone required"; then :
8016
8017 LIBCRACK_LIBS="${ac_cv_search_FascistCheck}"
8018
8019fi
8020
8021else
8022
8023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8024$as_echo "no" >&6; }
8025 LIBCRACK="No"
8026 if test "${with_cracklib}" = "yes"; then :
8027
8028 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8029$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8030as_fn_error $? "--with-cracklib was given but cracklib appears to be unusable
8031See \`config.log' for more details" "$LINENO" 5; }
8032
8033fi
8034
8035fi
8036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8037
8038else
77b1981e 8039
3828bfac
AJ
8040 LIBCRACK="No"
8041 if test "${with_cracklib}" = "yes"; then :
77b1981e 8042
3828bfac 8043 as_fn_error $? "--with-cracklib was given but cracklib could not be found" "$LINENO" 5
77b1981e 8044
3828bfac 8045fi
77b1981e 8046
3828bfac 8047fi
77b1981e 8048
77b1981e 8049
3828bfac 8050else
77b1981e 8051
3828bfac 8052 LIBCRACK="No"
77b1981e 8053
3828bfac 8054fi
77b1981e 8055
3828bfac
AJ
8056 if test "${LIBCRACK}" = "No"; then :
8057
8058 LIBCRACK_CFLAGS=""
8059 LIBCRACK_LIBS=""
8060
8061fi
8062
8063
8064
8065
8066 CFLAGS="${CFLAGS_SAVED}"
8067 LIBS="${LIBS_SAVED}"
8068
90121a3e 8069 unset CFLAGS_SAVED
6fb8526b 8070 unset LIBS_SAVED
90121a3e 8071
3828bfac
AJ
8072
8073
8074 CFLAGS_SAVED="${CFLAGS}"
8075 LIBS_SAVED="${LIBS}"
8076
8077 LIBCRYPT="No"
8078
8079 LIBCRYPT_CFLAGS=""
8080 LIBCRYPT_LIBS=""
77b1981e 8081
77b1981e 8082
3828bfac
AJ
8083# Check whether --with-crypt was given.
8084if test "${with_crypt+set}" = set; then :
8085 withval=$with_crypt;
8086else
8087 with_crypt="auto"
8088fi
8089
77b1981e 8090
f54ed0d4
AJ
8091 case "x${with_crypt}" in #(
8092 xno) :
8093 ;; #(
8094 xyes) :
8095 ;; #(
8096 xauto) :
8097 ;; #(
8098 *) :
8099
8100 as_fn_error $? "invalid option for --with-crypt" "$LINENO" 5
8101 ;;
8102esac
77b1981e 8103
3828bfac 8104 if test "${with_crypt}" != "no"; then :
77b1981e 8105
3828bfac
AJ
8106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
8107$as_echo_n "checking for library containing crypt... " >&6; }
8108if ${ac_cv_search_crypt+:} false; then :
77b1981e
WP
8109 $as_echo_n "(cached) " >&6
8110else
3828bfac
AJ
8111 ac_func_search_save_LIBS=$LIBS
8112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77b1981e 8113/* end confdefs.h. */
77b1981e 8114
3828bfac
AJ
8115/* Override any GCC internal prototype to avoid an error.
8116 Use char because int might match the return type of a GCC
8117 builtin and then its argument prototype would still apply. */
c2d29773 8118#ifdef __cplusplus
3828bfac 8119extern "C"
c2d29773 8120#endif
3828bfac 8121char crypt ();
77b1981e
WP
8122int
8123main ()
8124{
3828bfac 8125return crypt ();
77b1981e
WP
8126 ;
8127 return 0;
8128}
8129_ACEOF
3828bfac
AJ
8130for ac_lib in '' crypt; do
8131 if test -z "$ac_lib"; then
8132 ac_res="none required"
8133 else
8134 ac_res=-l$ac_lib
8135 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8136 fi
8137 if ac_fn_c_try_link "$LINENO"; then :
8138 ac_cv_search_crypt=$ac_res
77b1981e 8139fi
c2d29773 8140rm -f core conftest.err conftest.$ac_objext \
3828bfac
AJ
8141 conftest$ac_exeext
8142 if ${ac_cv_search_crypt+:} false; then :
8143 break
8144fi
8145done
8146if ${ac_cv_search_crypt+:} false; then :
8147
8148else
8149 ac_cv_search_crypt=no
8150fi
8151rm conftest.$ac_ext
8152LIBS=$ac_func_search_save_LIBS
8153fi
8154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
8155$as_echo "$ac_cv_search_crypt" >&6; }
8156ac_res=$ac_cv_search_crypt
8157if test "$ac_res" != no; then :
8158 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8159
8160 for ac_header in crypt.h
8161do :
8162 ac_fn_c_check_header_mongrel "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default"
8163if test "x$ac_cv_header_crypt_h" = xyes; then :
8164 cat >>confdefs.h <<_ACEOF
8165#define HAVE_CRYPT_H 1
8166_ACEOF
8167
8168fi
8169
8170done
8171
8172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if crypt(3) appears to be usable" >&5
8173$as_echo_n "checking if crypt(3) appears to be usable... " >&6; }
8174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77b1981e
WP
8175/* end confdefs.h. */
8176
3828bfac
AJ
8177
8178 #ifdef HAVE_STDDEF_H
8179 # include <stddef.h>
8180 #endif
8181 #ifdef HAVE_UNISTD_H
8182 # include <unistd.h>
8183 #endif
8184 #ifdef HAVE_CRYPT_H
8185 # include <crypt.h>
8186 #endif
c2d29773 8187
77b1981e
WP
8188int
8189main ()
8190{
c2d29773 8191
3828bfac 8192 (void) crypt(NULL, NULL);
c2d29773 8193
77b1981e
WP
8194 ;
8195 return 0;
8196}
3828bfac 8197
77b1981e 8198_ACEOF
3828bfac
AJ
8199if ac_fn_c_try_compile "$LINENO"; then :
8200
8201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8202$as_echo "yes" >&6; }
8203 LIBCRYPT="Yes"
8204
8205$as_echo "#define HAVE_CRYPT 1" >>confdefs.h
8206
8207 if test "x${ac_cv_search_crypt}" != "xnone required"; then :
8208
8209 LIBCRYPT_LIBS="${ac_cv_search_crypt}"
d82f3e17 8210
77b1981e 8211fi
77b1981e 8212
3828bfac 8213else
77b1981e 8214
3828bfac
AJ
8215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8216$as_echo "no" >&6; }
8217 LIBCRYPT="No"
8218 if test "${with_crypt}" = "yes"; then :
77b1981e 8219
3828bfac
AJ
8220 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8221$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8222as_fn_error $? "--with-crypt was given but crypt(3) appears to be unusable
8223See \`config.log' for more details" "$LINENO" 5; }
77b1981e 8224
3828bfac 8225fi
77b1981e 8226
3828bfac
AJ
8227fi
8228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
77b1981e 8229
3828bfac 8230else
77b1981e 8231
3828bfac
AJ
8232 LIBCRYPT="No"
8233 if test "${with_crypt}" = "yes"; then :
77b1981e 8234
3828bfac 8235 as_fn_error $? "--with-crypt was given but crypt(3) could not be found" "$LINENO" 5
77b1981e 8236
3828bfac 8237fi
77b1981e 8238
3828bfac 8239fi
77b1981e 8240
77b1981e 8241
3828bfac 8242else
77b1981e 8243
3828bfac 8244 LIBCRYPT="No"
77b1981e 8245
3828bfac 8246fi
77b1981e 8247
3828bfac 8248 if test "${LIBCRYPT}" = "No"; then :
77b1981e 8249
3828bfac
AJ
8250 LIBCRYPT_CFLAGS=""
8251 LIBCRYPT_LIBS=""
77b1981e 8252
3828bfac 8253fi
77b1981e 8254
77b1981e 8255
77b1981e
WP
8256
8257
3828bfac
AJ
8258 CFLAGS="${CFLAGS_SAVED}"
8259 LIBS="${LIBS_SAVED}"
8260
90121a3e 8261 unset CFLAGS_SAVED
6fb8526b 8262 unset LIBS_SAVED
90121a3e 8263
3828bfac
AJ
8264
8265
8266 CFLAGS_SAVED="${CFLAGS}"
8267 LIBS_SAVED="${LIBS}"
77b1981e 8268
3828bfac
AJ
8269 LIBCRYPTO="No"
8270 LIBCRYPTO_PATH=""
8271 LIBCRYPTO_NAME=""
8272 LIBCRYPTO_USABLE="No"
8273 LIBCRYPTO_DIGEST="No"
8274 LIBCRYPTO_RANDOM="No"
77b1981e 8275
77b1981e 8276
3828bfac
AJ
8277# Check whether --with-openssl was given.
8278if test "${with_openssl+set}" = set; then :
8279 withval=$with_openssl;
8280else
8281 with_openssl="auto"
8282fi
77b1981e 8283
77b1981e 8284
f54ed0d4
AJ
8285 case "x${with_openssl}" in #(
8286 xno) :
8287 ;; #(
8288 xyes) :
8289 ;; #(
8290 xauto) :
8291 ;; #(
8292 x/*) :
8293
8294 LIBCRYPTO_PATH="${with_openssl}"
8295 with_openssl="yes"
8296 ;; #(
8297 *) :
8298
8299 as_fn_error $? "invalid option for --with-openssl" "$LINENO" 5
8300 ;;
8301esac
77b1981e 8302
3828bfac 8303 if test "${with_openssl}" != "no"; then :
77b1981e 8304
3828bfac 8305 if test -n "${LIBCRYPTO_PATH}"; then :
77b1981e 8306
3828bfac
AJ
8307 # Allow for user to provide custom installation directory
8308 if test -d "${LIBCRYPTO_PATH}/include" -a -d "${LIBCRYPTO_PATH}/lib"; then :
a65bc8da 8309
3828bfac
AJ
8310 LIBCRYPTO_CFLAGS="-I${LIBCRYPTO_PATH}/include"
8311 LIBCRYPTO_LIBS="-L${LIBCRYPTO_PATH}/lib -lcrypto"
a65bc8da 8312
3828bfac 8313else
a65bc8da 8314
3828bfac 8315 as_fn_error $? "${LIBCRYPTO_PATH} is not a suitable directory for OpenSSL" "$LINENO" 5
a65bc8da 8316
3828bfac 8317fi
a65bc8da 8318
3828bfac 8319elif test -n "${PKG_CONFIG}"; then :
a65bc8da 8320
3828bfac 8321 # Allow for the user to "override" pkg-config without it being installed
a65bc8da 8322
3828bfac
AJ
8323pkg_failed=no
8324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBCRYPTO" >&5
8325$as_echo_n "checking for LIBCRYPTO... " >&6; }
a65bc8da 8326
3828bfac
AJ
8327if test -n "$LIBCRYPTO_CFLAGS"; then
8328 pkg_cv_LIBCRYPTO_CFLAGS="$LIBCRYPTO_CFLAGS"
8329 elif test -n "$PKG_CONFIG"; then
8330 if test -n "$PKG_CONFIG" && \
8331 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypto\""; } >&5
8332 ($PKG_CONFIG --exists --print-errors "libcrypto") 2>&5
8333 ac_status=$?
8334 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8335 test $ac_status = 0; }; then
8336 pkg_cv_LIBCRYPTO_CFLAGS=`$PKG_CONFIG --cflags "libcrypto" 2>/dev/null`
8337 test "x$?" != "x0" && pkg_failed=yes
8338else
8339 pkg_failed=yes
8340fi
8341 else
8342 pkg_failed=untried
8343fi
8344if test -n "$LIBCRYPTO_LIBS"; then
8345 pkg_cv_LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS"
8346 elif test -n "$PKG_CONFIG"; then
8347 if test -n "$PKG_CONFIG" && \
8348 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypto\""; } >&5
8349 ($PKG_CONFIG --exists --print-errors "libcrypto") 2>&5
8350 ac_status=$?
8351 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8352 test $ac_status = 0; }; then
8353 pkg_cv_LIBCRYPTO_LIBS=`$PKG_CONFIG --libs "libcrypto" 2>/dev/null`
8354 test "x$?" != "x0" && pkg_failed=yes
8355else
8356 pkg_failed=yes
8357fi
8358 else
8359 pkg_failed=untried
8360fi
a65bc8da 8361
77b1981e 8362
a65bc8da 8363
3828bfac
AJ
8364if test $pkg_failed = yes; then
8365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8366$as_echo "no" >&6; }
a65bc8da 8367
3828bfac
AJ
8368if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8369 _pkg_short_errors_supported=yes
8370else
8371 _pkg_short_errors_supported=no
c2d29773 8372fi
3828bfac
AJ
8373 if test $_pkg_short_errors_supported = yes; then
8374 LIBCRYPTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcrypto" 2>&1`
8375 else
8376 LIBCRYPTO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcrypto" 2>&1`
8377 fi
8378 # Put the nasty error message in config.log where it belongs
8379 echo "$LIBCRYPTO_PKG_ERRORS" >&5
77b1981e 8380
cbd32d76 8381 LIBCRYPTO="No"
3828bfac
AJ
8382elif test $pkg_failed = untried; then
8383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8384$as_echo "no" >&6; }
cbd32d76 8385 LIBCRYPTO="No"
3828bfac
AJ
8386else
8387 LIBCRYPTO_CFLAGS=$pkg_cv_LIBCRYPTO_CFLAGS
8388 LIBCRYPTO_LIBS=$pkg_cv_LIBCRYPTO_LIBS
8389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8390$as_echo "yes" >&6; }
ddf1c059 8391
3828bfac 8392fi
ddf1c059 8393
3828bfac
AJ
8394fi
8395 if test -n "${LIBCRYPTO_CFLAGS+set}" -a -n "${LIBCRYPTO_LIBS+set}"; then :
ddf1c059 8396
3828bfac
AJ
8397 # Only proceed with library tests if custom paths were given or pkg-config succeeded
8398 LIBCRYPTO="Yes"
ddf1c059 8399
3828bfac 8400else
ddf1c059 8401
3828bfac
AJ
8402 LIBCRYPTO="No"
8403 if test "${with_openssl}" != "no" && test "${with_openssl}" != "auto"; then :
ddf1c059 8404
3828bfac
AJ
8405 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8406$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8407as_fn_error $? "--with-openssl was given but OpenSSL could not be found
8408See \`config.log' for more details" "$LINENO" 5; }
ddf1c059 8409
3828bfac 8410fi
77b1981e 8411
3828bfac 8412fi
77b1981e 8413
3828bfac 8414fi
77b1981e 8415
3828bfac 8416 if test "${LIBCRYPTO}" = "Yes"; then :
77b1981e 8417
3828bfac
AJ
8418 CFLAGS="${LIBCRYPTO_CFLAGS} ${CFLAGS}"
8419 LIBS="${LIBCRYPTO_LIBS} ${LIBS}"
77b1981e 8420
3828bfac
AJ
8421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libcrypto has usable MD5/SHA1/SHA2/HMAC/PBKDF2 functions" >&5
8422$as_echo_n "checking if libcrypto has usable MD5/SHA1/SHA2/HMAC/PBKDF2 functions... " >&6; }
6df79d8f 8423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77b1981e
WP
8424/* end confdefs.h. */
8425
c2d29773 8426
3828bfac
AJ
8427 #ifdef HAVE_STDDEF_H
8428 # include <stddef.h>
8429 #endif
8430 #include <openssl/evp.h>
8431 #include <openssl/hmac.h>
8432 #include <openssl/opensslv.h>
8433
77b1981e
WP
8434int
8435main ()
8436{
d24e2420 8437
3828bfac
AJ
8438 (void) EVP_MD_size(NULL);
8439 (void) EVP_DigestInit_ex(NULL, EVP_md5(), NULL);
8440 (void) EVP_DigestInit_ex(NULL, EVP_sha1(), NULL);
8441 (void) EVP_DigestInit_ex(NULL, EVP_sha256(), NULL);
8442 (void) EVP_DigestInit_ex(NULL, EVP_sha512(), NULL);
8443 (void) EVP_DigestUpdate(NULL, NULL, 0);
8444 (void) EVP_DigestFinal_ex(NULL, NULL, NULL);
8445 (void) HMAC_Init_ex(NULL, NULL, 0, EVP_md5(), NULL);
8446 (void) HMAC_Init_ex(NULL, NULL, 0, EVP_sha1(), NULL);
8447 (void) HMAC_Init_ex(NULL, NULL, 0, EVP_sha256(), NULL);
8448 (void) HMAC_Init_ex(NULL, NULL, 0, EVP_sha512(), NULL);
8449 (void) HMAC_Update(NULL, NULL, 0);
8450 (void) HMAC_Final(NULL, NULL, NULL);
8451 (void) PKCS5_PBKDF2_HMAC(NULL, 0, NULL, 0, 0, NULL, 0, NULL);
8452
77b1981e
WP
8453 ;
8454 return 0;
8455}
c2d29773 8456
77b1981e 8457_ACEOF
3828bfac 8458if ac_fn_c_try_link "$LINENO"; then :
77b1981e 8459
3828bfac 8460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
c2d29773 8461$as_echo "yes" >&6; }
3828bfac
AJ
8462 LIBCRYPTO_USABLE="Yes"
8463 LIBCRYPTO_DIGEST="Yes"
77b1981e 8464
3828bfac
AJ
8465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libcrypto has HMAC_CTX_new() & HMAC_CTX_free()" >&5
8466$as_echo_n "checking if libcrypto has HMAC_CTX_new() & HMAC_CTX_free()... " >&6; }
8467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8468/* end confdefs.h. */
c2d29773 8469
8f1afa5d 8470
3828bfac
AJ
8471 #ifdef HAVE_STDDEF_H
8472 # include <stddef.h>
8473 #endif
8474 #include <openssl/hmac.h>
8475 #include <openssl/opensslv.h>
c2d29773 8476
77b1981e
WP
8477int
8478main ()
8479{
3828bfac
AJ
8480
8481 (void) HMAC_CTX_new();
8482 (void) HMAC_CTX_free(NULL);
8483
77b1981e
WP
8484 ;
8485 return 0;
8486}
3828bfac 8487
77b1981e 8488_ACEOF
3828bfac
AJ
8489if ac_fn_c_try_link "$LINENO"; then :
8490
8491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8492$as_echo "yes" >&6; }
8493
8494$as_echo "#define HAVE_LIBCRYPTO_HMAC_CTX_DYNAMIC 1" >>confdefs.h
8495
8496
8497else
8498
8499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8500$as_echo "no" >&6; }
8501
77b1981e 8502fi
c2d29773 8503rm -f core conftest.err conftest.$ac_objext \
3828bfac 8504 conftest$ac_exeext conftest.$ac_ext
77b1981e 8505
77b1981e 8506else
77b1981e 8507
3828bfac
AJ
8508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8509$as_echo "no" >&6; }
77b1981e 8510
c2d29773 8511fi
3828bfac
AJ
8512rm -f core conftest.err conftest.$ac_objext \
8513 conftest$ac_exeext conftest.$ac_ext
77b1981e 8514
3828bfac
AJ
8515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libcrypto has a usable random number generator" >&5
8516$as_echo_n "checking if libcrypto has a usable random number generator... " >&6; }
6df79d8f 8517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77b1981e
WP
8518/* end confdefs.h. */
8519
c2d29773 8520
6df79d8f
AJ
8521 #ifdef HAVE_STDDEF_H
8522 # include <stddef.h>
8523 #endif
3828bfac
AJ
8524 #include <openssl/err.h>
8525 #include <openssl/rand.h>
8526 #include <openssl/opensslv.h>
c2d29773 8527
77b1981e
WP
8528int
8529main ()
8530{
d24e2420 8531
3828bfac
AJ
8532 (void) ERR_get_error();
8533 (void) ERR_get_error_line_data(NULL, NULL, NULL, NULL);
8534 (void) RAND_add(NULL, 0, (double) 0);
8535 (void) RAND_bytes(NULL, 0);
8536 (void) RAND_status();
77b1981e
WP
8537
8538 ;
8539 return 0;
8540}
c2d29773 8541
77b1981e 8542_ACEOF
c2d29773 8543if ac_fn_c_try_link "$LINENO"; then :
77b1981e 8544
6df79d8f 8545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
c2d29773 8546$as_echo "yes" >&6; }
3828bfac
AJ
8547 LIBCRYPTO_USABLE="Yes"
8548 LIBCRYPTO_RANDOM="Yes"
77b1981e 8549
c2d29773 8550else
77b1981e 8551
6df79d8f 8552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
c2d29773 8553$as_echo "no" >&6; }
77b1981e 8554
77b1981e 8555fi
c2d29773
AJ
8556rm -f core conftest.err conftest.$ac_objext \
8557 conftest$ac_exeext conftest.$ac_ext
77b1981e 8558
3828bfac
AJ
8559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libcrypto has a usable constant-time memory comparison function" >&5
8560$as_echo_n "checking if libcrypto has a usable constant-time memory comparison function... " >&6; }
8561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8562/* end confdefs.h. */
77b1981e
WP
8563
8564
3828bfac
AJ
8565 #ifdef HAVE_STDDEF_H
8566 # include <stddef.h>
8567 #endif
8568 #include <openssl/crypto.h>
8569 #include <openssl/opensslv.h>
77b1981e 8570
3828bfac
AJ
8571int
8572main ()
8573{
77b1981e 8574
3828bfac 8575 (void) CRYPTO_memcmp(NULL, NULL, 0);
77b1981e 8576
3828bfac
AJ
8577 ;
8578 return 0;
8579}
8f1afa5d 8580
77b1981e 8581_ACEOF
3828bfac 8582if ac_fn_c_try_link "$LINENO"; then :
77b1981e 8583
3828bfac
AJ
8584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8585$as_echo "yes" >&6; }
77b1981e 8586
3828bfac 8587$as_echo "#define HAVE_LIBCRYPTO_MEMCMP 1" >>confdefs.h
77b1981e 8588
3828bfac 8589 LIBCRYPTO_USABLE="Yes"
77b1981e 8590
77b1981e 8591else
3828bfac
AJ
8592
8593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8594$as_echo "no" >&6; }
8595
8596fi
8597rm -f core conftest.err conftest.$ac_objext \
8598 conftest$ac_exeext conftest.$ac_ext
8599
8600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libcrypto has a usable memory zeroing function" >&5
8601$as_echo_n "checking if libcrypto has a usable memory zeroing function... " >&6; }
8602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77b1981e 8603/* end confdefs.h. */
c2d29773 8604
3828bfac
AJ
8605
8606 #ifdef HAVE_STDDEF_H
8607 # include <stddef.h>
8608 #endif
8609 #include <openssl/crypto.h>
8610 #include <openssl/opensslv.h>
8611
77b1981e
WP
8612int
8613main ()
8614{
3828bfac
AJ
8615
8616 (void) OPENSSL_cleanse(NULL, 0);
8617
77b1981e
WP
8618 ;
8619 return 0;
8620}
77b1981e 8621
3828bfac
AJ
8622_ACEOF
8623if ac_fn_c_try_link "$LINENO"; then :
77b1981e 8624
3828bfac
AJ
8625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8626$as_echo "yes" >&6; }
c2d29773 8627
3828bfac 8628$as_echo "#define HAVE_LIBCRYPTO_CLEANSE 1" >>confdefs.h
77b1981e 8629
3828bfac 8630 LIBCRYPTO_USABLE="Yes"
77b1981e 8631
c2d29773
AJ
8632else
8633
3828bfac
AJ
8634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8635$as_echo "no" >&6; }
c2d29773 8636
77b1981e 8637fi
3828bfac
AJ
8638rm -f core conftest.err conftest.$ac_objext \
8639 conftest$ac_exeext conftest.$ac_ext
77b1981e 8640
3828bfac
AJ
8641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libcrypto can provide SASL ECDH-X25519-CHALLENGE" >&5
8642$as_echo_n "checking if libcrypto can provide SASL ECDH-X25519-CHALLENGE... " >&6; }
8643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8644/* end confdefs.h. */
c2d29773 8645
c2d29773 8646
3828bfac
AJ
8647 #ifdef HAVE_STDDEF_H
8648 # include <stddef.h>
8649 #endif
8650 #include <openssl/curve25519.h>
8651 #include <openssl/opensslv.h>
77b1981e
WP
8652
8653int
8654main ()
8655{
3828bfac
AJ
8656
8657 (void) X25519_keypair(NULL, NULL);
8658 (void) X25519(NULL, NULL, NULL);
8659
77b1981e
WP
8660 ;
8661 return 0;
8662}
3828bfac 8663
77b1981e 8664_ACEOF
3828bfac
AJ
8665if ac_fn_c_try_link "$LINENO"; then :
8666
8667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8668$as_echo "yes" >&6; }
8669
8670$as_echo "#define HAVE_LIBCRYPTO_ECDH_X25519 1" >>confdefs.h
8671
8672 FEATURE_SASL_ECDH_X25519_CHALLENGE="Yes"
8673 LIBCRYPTO_USABLE="Yes"
8674
8675else
8676
8677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8678$as_echo "no" >&6; }
8679
c2d29773
AJ
8680fi
8681rm -f core conftest.err conftest.$ac_objext \
3828bfac
AJ
8682 conftest$ac_exeext conftest.$ac_ext
8683
8684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libcrypto can provide SASL ECDSA-NIST256P-CHALLENGE" >&5
8685$as_echo_n "checking if libcrypto can provide SASL ECDSA-NIST256P-CHALLENGE... " >&6; }
8686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8687/* end confdefs.h. */
8688
8689
8690 #ifdef HAVE_STDDEF_H
8691 # include <stddef.h>
8692 #endif
8693 #include <openssl/ec.h>
8694 #include <openssl/ecdsa.h>
8695 #include <openssl/evp.h>
8696 #include <openssl/opensslv.h>
c2d29773 8697
3828bfac
AJ
8698int
8699main ()
8700{
77b1981e 8701
3828bfac
AJ
8702 EC_KEY *pubkey = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
8703 (void) EC_KEY_set_conv_form(pubkey, POINT_CONVERSION_COMPRESSED);
8704 (void) o2i_ECPublicKey(&pubkey, NULL, 0);
8705 (void) ECDSA_verify(0, NULL, 0, NULL, 0, pubkey);
c2d29773 8706
3828bfac
AJ
8707 ;
8708 return 0;
8709}
77b1981e 8710
3828bfac
AJ
8711_ACEOF
8712if ac_fn_c_try_link "$LINENO"; then :
8713
8714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8715$as_echo "yes" >&6; }
8716
8717$as_echo "#define HAVE_LIBCRYPTO_ECDSA 1" >>confdefs.h
8718
8719 FEATURE_SASL_ECDSA_NIST256P_CHALLENGE="Yes"
8720 LIBCRYPTO_USABLE="Yes"
77b1981e 8721
c2d29773 8722else
77b1981e 8723
3828bfac
AJ
8724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8725$as_echo "no" >&6; }
77b1981e 8726
c2d29773 8727fi
3828bfac
AJ
8728rm -f core conftest.err conftest.$ac_objext \
8729 conftest$ac_exeext conftest.$ac_ext
77b1981e 8730
3828bfac 8731fi
77b1981e 8732
3828bfac 8733 if test "${LIBCRYPTO_USABLE}" = "Yes"; then :
77b1981e 8734
3828bfac
AJ
8735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OpenSSL is really LibreSSL in disguise" >&5
8736$as_echo_n "checking if OpenSSL is really LibreSSL in disguise... " >&6; }
8737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c2d29773 8738/* end confdefs.h. */
77b1981e
WP
8739
8740
3828bfac
AJ
8741 #include <openssl/opensslv.h>
8742 #ifdef LIBRESSL_VERSION_NUMBER
8743 # error "Detected LibreSSL"
8744 #endif
c2d29773
AJ
8745
8746int
8747main ()
8748{
8749
3828bfac 8750 return 0;
c2d29773
AJ
8751
8752 ;
8753 return 0;
8754}
8755
77b1981e 8756_ACEOF
3828bfac 8757if ac_fn_c_try_compile "$LINENO"; then :
c2d29773 8758
3828bfac
AJ
8759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8760$as_echo "no" >&6; }
8761 LIBCRYPTO_NAME="OpenSSL"
8762
8763else
8764
8765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
c2d29773 8766$as_echo "yes" >&6; }
3828bfac
AJ
8767 LIBCRYPTO_NAME="LibreSSL"
8768
8769fi
8770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8771
8772
8773$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
8774
c2d29773 8775
77b1981e 8776else
77b1981e 8777
3828bfac
AJ
8778 LIBCRYPTO="No"
8779 if test "${with_openssl}" != "no" && test "${with_openssl}" != "auto"; then :
8780
8781 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
c2d29773 8782$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3828bfac 8783as_fn_error $? "--with-openssl was given but libcrypto appears to be unusable
c2d29773 8784See \`config.log' for more details" "$LINENO" 5; }
77b1981e 8785
c2d29773 8786fi
3828bfac
AJ
8787
8788fi
8789
8790 if test "${LIBCRYPTO}" = "No"; then :
8791
8792 LIBCRYPTO_CFLAGS=""
8793 LIBCRYPTO_LIBS=""
8794
8795fi
77b1981e
WP
8796
8797
77b1981e 8798
3828bfac
AJ
8799
8800 CFLAGS="${CFLAGS_SAVED}"
8f1afa5d
AJ
8801 LIBS="${LIBS_SAVED}"
8802
90121a3e 8803 unset CFLAGS_SAVED
6fb8526b 8804 unset LIBS_SAVED
90121a3e 8805
1af8aca0 8806
54cf1f00 8807
3828bfac 8808 CFLAGS_SAVED="${CFLAGS}"
6df79d8f 8809 LIBS_SAVED="${LIBS}"
c2d29773 8810
3828bfac
AJ
8811 LIBGCRYPT="No"
8812 LIBGCRYPT_USABLE="No"
8813 LIBGCRYPT_DIGEST="No"
8814
8815 LIBGCRYPT_CFLAGS=""
8816 LIBGCRYPT_LIBS=""
8f1afa5d 8817
c2d29773 8818
3828bfac
AJ
8819# Check whether --with-gcrypt was given.
8820if test "${with_gcrypt+set}" = set; then :
8821 withval=$with_gcrypt;
8822else
8823 with_gcrypt="auto"
c2d29773
AJ
8824fi
8825
c2d29773 8826
f54ed0d4
AJ
8827 case "x${with_gcrypt}" in #(
8828 xno) :
8829 ;; #(
8830 xyes) :
8831 ;; #(
8832 xauto) :
8833 ;; #(
8834 *) :
8835
8836 as_fn_error $? "invalid option for --with-gcrypt" "$LINENO" 5
8837 ;;
8838esac
3828bfac
AJ
8839
8840 if test "${with_gcrypt}" != "no"; then :
c2d29773 8841
3828bfac
AJ
8842 # If this library ever starts shipping a pkg-config file, change to PKG_CHECK_MODULES ?
8843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gcry_check_version" >&5
8844$as_echo_n "checking for library containing gcry_check_version... " >&6; }
8845if ${ac_cv_search_gcry_check_version+:} false; then :
c2d29773
AJ
8846 $as_echo_n "(cached) " >&6
8847else
8848 ac_func_search_save_LIBS=$LIBS
8849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8850/* end confdefs.h. */
8851
8852/* Override any GCC internal prototype to avoid an error.
8853 Use char because int might match the return type of a GCC
8854 builtin and then its argument prototype would still apply. */
8855#ifdef __cplusplus
8856extern "C"
8857#endif
3828bfac 8858char gcry_check_version ();
c2d29773
AJ
8859int
8860main ()
8861{
3828bfac 8862return gcry_check_version ();
77b1981e
WP
8863 ;
8864 return 0;
8865}
8866_ACEOF
3828bfac 8867for ac_lib in '' gcrypt; do
c2d29773
AJ
8868 if test -z "$ac_lib"; then
8869 ac_res="none required"
8870 else
8871 ac_res=-l$ac_lib
8872 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8873 fi
8874 if ac_fn_c_try_link "$LINENO"; then :
3828bfac 8875 ac_cv_search_gcry_check_version=$ac_res
77b1981e 8876fi
c2d29773
AJ
8877rm -f core conftest.err conftest.$ac_objext \
8878 conftest$ac_exeext
3828bfac 8879 if ${ac_cv_search_gcry_check_version+:} false; then :
c2d29773 8880 break
77b1981e 8881fi
c2d29773 8882done
3828bfac 8883if ${ac_cv_search_gcry_check_version+:} false; then :
77b1981e 8884
c2d29773 8885else
3828bfac 8886 ac_cv_search_gcry_check_version=no
77b1981e 8887fi
c2d29773
AJ
8888rm conftest.$ac_ext
8889LIBS=$ac_func_search_save_LIBS
8890fi
3828bfac
AJ
8891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gcry_check_version" >&5
8892$as_echo "$ac_cv_search_gcry_check_version" >&6; }
8893ac_res=$ac_cv_search_gcry_check_version
c2d29773
AJ
8894if test "$ac_res" != no; then :
8895 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
77b1981e 8896
3828bfac
AJ
8897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNU libgcrypt appears to be usable" >&5
8898$as_echo_n "checking if GNU libgcrypt appears to be usable... " >&6; }
8899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8900/* end confdefs.h. */
77b1981e 8901
3828bfac
AJ
8902
8903 #ifdef HAVE_STDDEF_H
8904 # include <stddef.h>
8905 #endif
8906 #define GCRYPT_NO_DEPRECATED 1
8907 #define GCRYPT_NO_MPI_MACROS 1
8908 #include <gcrypt.h>
8909
8910int
8911main ()
8912{
8913
8914 (void) gcry_check_version(GCRYPT_VERSION);
8915 (void) gcry_control(GCRYCTL_DISABLE_SECMEM_WARN, 0);
8916 (void) gcry_control(GCRYCTL_INIT_SECMEM, 0);
8917 (void) gcry_control(GCRYCTL_SET_VERBOSITY, 0);
8918 (void) gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);
8919 (void) gcry_control(GCRYCTL_SELFTEST, 0);
8920
8921 ;
8922 return 0;
8923}
8924
8925_ACEOF
8926if ac_fn_c_try_link "$LINENO"; then :
8927
8928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8929$as_echo "yes" >&6; }
8930 LIBGCRYPT="Yes"
8931
8932else
8933
8934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8935$as_echo "no" >&6; }
8936 LIBGCRYPT="No"
8937 if test "${with_gcrypt}" = "yes"; then :
8938
8939 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8940$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8941as_fn_error $? "--with-gcrypt was given but GNU libgcrypt appears to be unusable
8942See \`config.log' for more details" "$LINENO" 5; }
8943
8944fi
77b1981e
WP
8945
8946fi
3828bfac
AJ
8947rm -f core conftest.err conftest.$ac_objext \
8948 conftest$ac_exeext conftest.$ac_ext
77b1981e 8949
c2d29773 8950else
77b1981e 8951
3828bfac
AJ
8952 LIBGCRYPT="No"
8953 if test "${with_gcrypt}" = "yes"; then :
8954
8955 as_fn_error $? "--with-gcrypt was given but GNU libgcrypt could not be found" "$LINENO" 5
65863905 8956
c2d29773 8957fi
65863905 8958
3828bfac 8959fi
752694a2 8960
23d05ffa 8961
3828bfac
AJ
8962else
8963
8964 LIBGCRYPT="No"
8965
8966fi
8967
8968 if test "${LIBGCRYPT}" = "Yes"; then :
8969
8970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNU libgcrypt has usable MD5/SHA1/SHA2/HMAC/PBKDF2 functions" >&5
8971$as_echo_n "checking if GNU libgcrypt has usable MD5/SHA1/SHA2/HMAC/PBKDF2 functions... " >&6; }
8972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23d05ffa
AJ
8973/* end confdefs.h. */
8974
8975
3828bfac
AJ
8976 #ifdef HAVE_STDDEF_H
8977 # include <stddef.h>
8978 #endif
8979 #define GCRYPT_NO_DEPRECATED 1
8980 #define GCRYPT_NO_MPI_MACROS 1
8981 #include <gcrypt.h>
c2d29773 8982
23d05ffa
AJ
8983int
8984main ()
8985{
8986
3828bfac
AJ
8987 gcry_md_hd_t ctx;
8988 (void) gcry_md_test_algo(GCRY_MD_MD5);
8989 (void) gcry_md_test_algo(GCRY_MD_SHA1);
8990 (void) gcry_md_test_algo(GCRY_MD_SHA256);
8991 (void) gcry_md_test_algo(GCRY_MD_SHA512);
8992 (void) gcry_md_open(&ctx, GCRY_MD_NONE, GCRY_MD_FLAG_HMAC | GCRY_MD_FLAG_SECURE);
8993 (void) gcry_md_setkey(ctx, NULL, 0);
8994 (void) gcry_md_write(ctx, NULL, 0);
8995 (void) gcry_md_read(ctx, GCRY_MD_NONE);
8996 (void) gcry_md_close(ctx);
8997 (void) gcry_kdf_derive(NULL, 0, GCRY_KDF_PBKDF2, GCRY_MD_NONE, NULL, 0, 0, 0, NULL);
c2d29773 8998
23d05ffa
AJ
8999 ;
9000 return 0;
9001}
9002
9003_ACEOF
c2d29773 9004if ac_fn_c_try_link "$LINENO"; then :
23d05ffa 9005
3828bfac 9006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23d05ffa 9007$as_echo "yes" >&6; }
3828bfac
AJ
9008 LIBGCRYPT_USABLE="Yes"
9009 LIBGCRYPT_DIGEST="Yes"
23d05ffa
AJ
9010
9011else
9012
3828bfac 9013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23d05ffa
AJ
9014$as_echo "no" >&6; }
9015
9016fi
c2d29773
AJ
9017rm -f core conftest.err conftest.$ac_objext \
9018 conftest$ac_exeext conftest.$ac_ext
23d05ffa 9019
3828bfac
AJ
9020fi
9021
9022 if test "${LIBGCRYPT_USABLE}" = "Yes"; then :
23d05ffa
AJ
9023
9024
3828bfac 9025$as_echo "#define HAVE_LIBGCRYPT 1" >>confdefs.h
23d05ffa 9026
3828bfac
AJ
9027 if test "x${ac_cv_search_gcry_check_version}" != "xnone required"; then :
9028
9029 LIBGCRYPT_LIBS="${ac_cv_search_gcry_check_version}"
9030
9031fi
9032
9033else
9034
9035 LIBGCRYPT="No"
9036 if test "${with_gcrypt}" = "yes"; then :
9037
9038 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9039$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9040as_fn_error $? "--with-gcrypt was given but GNU libgcrypt appears to be unusable
9041See \`config.log' for more details" "$LINENO" 5; }
9042
9043fi
9044
9045fi
9046
9047 if test "${LIBGCRYPT}" = "No"; then :
9048
9049 LIBGCRYPT_CFLAGS=""
9050 LIBGCRYPT_LIBS=""
9051
9052fi
9053
9054
9055
9056
9057 CFLAGS="${CFLAGS_SAVED}"
9058 LIBS="${LIBS_SAVED}"
23d05ffa 9059
90121a3e 9060 unset CFLAGS_SAVED
6fb8526b 9061 unset LIBS_SAVED
90121a3e 9062
23d05ffa 9063
752694a2 9064
8f1afa5d
AJ
9065 CFLAGS_SAVED="${CFLAGS}"
9066 LIBS_SAVED="${LIBS}"
9067
3828bfac
AJ
9068 LIBIDN="No"
9069 LIBIDN_PATH=""
5fa0bd86
AJ
9070
9071
3828bfac
AJ
9072# Check whether --with-idn was given.
9073if test "${with_idn+set}" = set; then :
9074 withval=$with_idn;
5fa0bd86 9075else
3828bfac 9076 with_idn="auto"
5fa0bd86
AJ
9077fi
9078
9079
f54ed0d4
AJ
9080 case "x${with_idn}" in #(
9081 xno) :
9082 ;; #(
9083 xyes) :
9084 ;; #(
9085 xauto) :
9086 ;; #(
9087 x/*) :
9088
9089 LIBIDN_PATH="${with_idn}"
9090 with_idn="yes"
9091 ;; #(
9092 *) :
9093
9094 as_fn_error $? "invalid option for --with-idn" "$LINENO" 5
9095 ;;
9096esac
5fa0bd86 9097
3828bfac 9098 if test "${with_idn}" != "no"; then :
5fa0bd86 9099
3828bfac 9100 if test -n "${LIBIDN_PATH}"; then :
5fa0bd86 9101
016d2768 9102 # Allow for user to provide custom installation directory
3828bfac 9103 if test -d "${LIBIDN_PATH}/include" -a -d "${LIBIDN_PATH}/lib"; then :
5fa0bd86 9104
3828bfac
AJ
9105 LIBIDN_CFLAGS="-I${LIBIDN_PATH}/include"
9106 LIBIDN_LIBS="-L${LIBIDN_PATH}/lib -lidn"
5fa0bd86
AJ
9107
9108else
9109
3828bfac 9110 as_fn_error $? "${LIBIDN_PATH} is not a suitable directory for GNU libidn" "$LINENO" 5
5fa0bd86
AJ
9111
9112fi
9113
5a3259b2 9114elif test -n "${PKG_CONFIG}"; then :
5fa0bd86 9115
016d2768 9116 # Allow for the user to "override" pkg-config without it being installed
5fa0bd86
AJ
9117
9118pkg_failed=no
3828bfac
AJ
9119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBIDN" >&5
9120$as_echo_n "checking for LIBIDN... " >&6; }
5fa0bd86 9121
3828bfac
AJ
9122if test -n "$LIBIDN_CFLAGS"; then
9123 pkg_cv_LIBIDN_CFLAGS="$LIBIDN_CFLAGS"
5fa0bd86
AJ
9124 elif test -n "$PKG_CONFIG"; then
9125 if test -n "$PKG_CONFIG" && \
3828bfac
AJ
9126 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libidn\""; } >&5
9127 ($PKG_CONFIG --exists --print-errors "libidn") 2>&5
5fa0bd86
AJ
9128 ac_status=$?
9129 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9130 test $ac_status = 0; }; then
3828bfac 9131 pkg_cv_LIBIDN_CFLAGS=`$PKG_CONFIG --cflags "libidn" 2>/dev/null`
5fa0bd86
AJ
9132 test "x$?" != "x0" && pkg_failed=yes
9133else
9134 pkg_failed=yes
9135fi
9136 else
9137 pkg_failed=untried
9138fi
3828bfac
AJ
9139if test -n "$LIBIDN_LIBS"; then
9140 pkg_cv_LIBIDN_LIBS="$LIBIDN_LIBS"
9141 elif test -n "$PKG_CONFIG"; then
9142 if test -n "$PKG_CONFIG" && \
9143 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libidn\""; } >&5
9144 ($PKG_CONFIG --exists --print-errors "libidn") 2>&5
9145 ac_status=$?
9146 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9147 test $ac_status = 0; }; then
9148 pkg_cv_LIBIDN_LIBS=`$PKG_CONFIG --libs "libidn" 2>/dev/null`
9149 test "x$?" != "x0" && pkg_failed=yes
5fa0bd86 9150else
3828bfac 9151 pkg_failed=yes
5fa0bd86 9152fi
3828bfac
AJ
9153 else
9154 pkg_failed=untried
5fa0bd86 9155fi
5fa0bd86 9156
5fa0bd86 9157
5fa0bd86 9158
3828bfac
AJ
9159if test $pkg_failed = yes; then
9160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9161$as_echo "no" >&6; }
5fa0bd86 9162
3828bfac
AJ
9163if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9164 _pkg_short_errors_supported=yes
9165else
9166 _pkg_short_errors_supported=no
5fa0bd86 9167fi
3828bfac
AJ
9168 if test $_pkg_short_errors_supported = yes; then
9169 LIBIDN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libidn" 2>&1`
9170 else
9171 LIBIDN_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libidn" 2>&1`
9172 fi
9173 # Put the nasty error message in config.log where it belongs
9174 echo "$LIBIDN_PKG_ERRORS" >&5
5fa0bd86 9175
cbd32d76 9176 LIBIDN="No"
3828bfac
AJ
9177elif test $pkg_failed = untried; then
9178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9179$as_echo "no" >&6; }
cbd32d76 9180 LIBIDN="No"
3828bfac
AJ
9181else
9182 LIBIDN_CFLAGS=$pkg_cv_LIBIDN_CFLAGS
9183 LIBIDN_LIBS=$pkg_cv_LIBIDN_LIBS
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9185$as_echo "yes" >&6; }
752694a2 9186
3828bfac 9187fi
ca15c587 9188
ca15c587 9189fi
3828bfac 9190 if test -n "${LIBIDN_CFLAGS+set}" -a -n "${LIBIDN_LIBS+set}"; then :
ca15c587 9191
3828bfac
AJ
9192 # Only proceed with library tests if custom paths were given or pkg-config succeeded
9193 LIBIDN="Yes"
86e4a22b 9194
3828bfac 9195else
c523bb43 9196
3828bfac
AJ
9197 LIBIDN="No"
9198 if test "${with_idn}" != "no" && test "${with_idn}" != "auto"; then :
c523bb43 9199
3828bfac
AJ
9200 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9201$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9202as_fn_error $? "--with-idn was given but GNU libidn could not be found
9203See \`config.log' for more details" "$LINENO" 5; }
84a3211e 9204
84a3211e 9205fi
84a3211e 9206
84a3211e 9207fi
3828bfac 9208
84a3211e 9209fi
1e6c7f18 9210
3828bfac
AJ
9211 if test "${LIBIDN}" = "Yes"; then :
9212
9213 CFLAGS="${LIBIDN_CFLAGS} ${CFLAGS}"
9214 LIBS="${LIBIDN_LIBS} ${LIBS}"
9215
9216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNU libidn appears to be usable" >&5
9217$as_echo_n "checking if GNU libidn appears to be usable... " >&6; }
9218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1e6c7f18
AJ
9219/* end confdefs.h. */
9220
9221
3828bfac
AJ
9222 #ifdef HAVE_STDDEF_H
9223 # include <stddef.h>
9224 #endif
9225 #include <stringprep.h>
1e6c7f18
AJ
9226
9227int
9228main ()
9229{
9230
3828bfac
AJ
9231 (void) stringprep_locale_to_utf8(NULL);
9232 (void) stringprep(NULL, 0, (Stringprep_profile_flags) 0, stringprep_saslprep);
1e6c7f18
AJ
9233
9234 ;
9235 return 0;
9236}
9237
9238_ACEOF
3828bfac 9239if ac_fn_c_try_link "$LINENO"; then :
1e6c7f18 9240
3828bfac 9241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1e6c7f18 9242$as_echo "yes" >&6; }
3828bfac
AJ
9243 FEATURE_SASL_SCRAM="Yes"
9244 LIBIDN="Yes"
1e6c7f18 9245
3828bfac 9246$as_echo "#define HAVE_LIBIDN 1" >>confdefs.h
1e6c7f18 9247
583552e5 9248
c523bb43 9249else
f7291891 9250
3828bfac 9251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1e6c7f18 9252$as_echo "no" >&6; }
3828bfac
AJ
9253 LIBIDN="No"
9254 if test "${with_idn}" != "no" && test "${with_idn}" != "auto"; then :
1e6c7f18 9255
3828bfac 9256 as_fn_error $? "--with-idn was given but GNU libidn could not be found" "$LINENO" 5
f45ffa7e 9257
c523bb43
AJ
9258fi
9259
1e6c7f18 9260fi
3828bfac
AJ
9261rm -f core conftest.err conftest.$ac_objext \
9262 conftest$ac_exeext conftest.$ac_ext
460b89c1 9263
3ef71120
AJ
9264fi
9265
3828bfac 9266 if test "${LIBIDN}" = "No"; then :
8f1afa5d 9267
3828bfac
AJ
9268 LIBIDN_CFLAGS=""
9269 LIBIDN_LIBS=""
8f1afa5d
AJ
9270
9271fi
9272
9273
9274
9275
6df79d8f
AJ
9276 CFLAGS="${CFLAGS_SAVED}"
9277 LIBS="${LIBS_SAVED}"
1e6c7f18 9278
90121a3e 9279 unset CFLAGS_SAVED
6fb8526b 9280 unset LIBS_SAVED
90121a3e 9281
3ef71120
AJ
9282
9283
8f1afa5d
AJ
9284 CFLAGS_SAVED="${CFLAGS}"
9285 LIBS_SAVED="${LIBS}"
9286
3828bfac 9287 LIBLDAP="No"
544572f1
AJ
9288 LIBLDAP_CFLAGS=""
9289 LIBLDAP_LIBS=""
3ef71120 9290
3ef71120 9291
3828bfac
AJ
9292# Check whether --with-ldap was given.
9293if test "${with_ldap+set}" = set; then :
9294 withval=$with_ldap;
3ef71120 9295else
3828bfac 9296 with_ldap="auto"
3ef71120
AJ
9297fi
9298
9299
f54ed0d4
AJ
9300 case "x${with_ldap}" in #(
9301 xno) :
9302 ;; #(
9303 xyes) :
9304 ;; #(
9305 xauto) :
9306 ;; #(
9307 *) :
9308
9309 as_fn_error $? "invalid option for --with-ldap" "$LINENO" 5
9310 ;;
9311esac
3ef71120 9312
3828bfac 9313 if test "${with_ldap}" != "no"; then :
3ef71120 9314
3828bfac
AJ
9315 # If this library ever starts shipping a pkg-config file, change to PKG_CHECK_MODULES ?
9316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldap_initialize" >&5
9317$as_echo_n "checking for library containing ldap_initialize... " >&6; }
9318if ${ac_cv_search_ldap_initialize+:} false; then :
3ef71120
AJ
9319 $as_echo_n "(cached) " >&6
9320else
9321 ac_func_search_save_LIBS=$LIBS
9322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9323/* end confdefs.h. */
9324
9325/* Override any GCC internal prototype to avoid an error.
9326 Use char because int might match the return type of a GCC
9327 builtin and then its argument prototype would still apply. */
9328#ifdef __cplusplus
9329extern "C"
9330#endif
3828bfac 9331char ldap_initialize ();
3ef71120
AJ
9332int
9333main ()
9334{
3828bfac 9335return ldap_initialize ();
3ef71120
AJ
9336 ;
9337 return 0;
9338}
9339_ACEOF
3828bfac 9340for ac_lib in '' ldap; do
3ef71120
AJ
9341 if test -z "$ac_lib"; then
9342 ac_res="none required"
9343 else
9344 ac_res=-l$ac_lib
9345 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9346 fi
9347 if ac_fn_c_try_link "$LINENO"; then :
3828bfac 9348 ac_cv_search_ldap_initialize=$ac_res
3ef71120
AJ
9349fi
9350rm -f core conftest.err conftest.$ac_objext \
9351 conftest$ac_exeext
3828bfac 9352 if ${ac_cv_search_ldap_initialize+:} false; then :
3ef71120
AJ
9353 break
9354fi
9355done
3828bfac 9356if ${ac_cv_search_ldap_initialize+:} false; then :
3ef71120
AJ
9357
9358else
3828bfac 9359 ac_cv_search_ldap_initialize=no
3ef71120
AJ
9360fi
9361rm conftest.$ac_ext
9362LIBS=$ac_func_search_save_LIBS
9363fi
3828bfac
AJ
9364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldap_initialize" >&5
9365$as_echo "$ac_cv_search_ldap_initialize" >&6; }
9366ac_res=$ac_cv_search_ldap_initialize
3ef71120
AJ
9367if test "$ac_res" != no; then :
9368 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
3ef71120 9369
3828bfac
AJ
9370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libldap appears to be usable" >&5
9371$as_echo_n "checking if libldap appears to be usable... " >&6; }
6df79d8f 9372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4417cd6c
AJ
9373/* end confdefs.h. */
9374
9375
6df79d8f
AJ
9376 #ifdef HAVE_STDDEF_H
9377 # include <stddef.h>
9378 #endif
3828bfac 9379 #include <ldap.h>
4417cd6c
AJ
9380
9381int
9382main ()
9383{
9384
3828bfac
AJ
9385 (void) ldap_set_option(NULL, 0, NULL);
9386 (void) ldap_initialize(NULL, NULL);
9387 (void) ldap_get_dn(NULL, NULL);
9388 (void) ldap_err2string(0);
4417cd6c
AJ
9389
9390 ;
9391 return 0;
9392}
9393
9394_ACEOF
9395if ac_fn_c_try_compile "$LINENO"; then :
9396
6df79d8f 9397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4417cd6c 9398$as_echo "yes" >&6; }
3828bfac 9399 LIBLDAP="Yes"
460b89c1 9400
3828bfac 9401$as_echo "#define HAVE_LIBLDAP 1" >>confdefs.h
460b89c1 9402
3828bfac 9403 if test "x${ac_cv_search_ldap_initialize}" != "xnone required"; then :
01bc990a 9404
544572f1 9405 LIBLDAP_LIBS="${ac_cv_search_ldap_initialize}"
01bc990a 9406
01bc990a
AJ
9407fi
9408
4417cd6c
AJ
9409else
9410
6df79d8f 9411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4417cd6c 9412$as_echo "no" >&6; }
3828bfac
AJ
9413 LIBLDAP="No"
9414 if test "${with_ldap}" = "yes"; then :
01bc990a 9415
6df79d8f 9416 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
c1395d64 9417$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3828bfac 9418as_fn_error $? "--with-ldap was given but libldap appears to be unusable
c1395d64 9419See \`config.log' for more details" "$LINENO" 5; }
4417cd6c 9420
4417cd6c
AJ
9421fi
9422
9423fi
9424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9425
01bc990a 9426else
3ef71120 9427
3828bfac
AJ
9428 LIBLDAP="No"
9429 if test "${with_ldap}" = "yes"; then :
3ef71120 9430
3828bfac 9431 as_fn_error $? "--with-ldap was given but libldap could not be found" "$LINENO" 5
3ef71120
AJ
9432
9433fi
9434
01bc990a 9435fi
3ef71120
AJ
9436
9437
460b89c1
AJ
9438else
9439
3828bfac 9440 LIBLDAP="No"
460b89c1 9441
c523bb43 9442fi
84a3211e 9443
3828bfac 9444 if test "${LDAP}" = "No"; then :
8f1afa5d 9445
544572f1
AJ
9446 LIBLDAP_CFLAGS=""
9447 LIBLDAP_LIBS=""
8f1afa5d
AJ
9448
9449fi
9450
9451
9452
9453
9454 CFLAGS="${CFLAGS_SAVED}"
6df79d8f 9455 LIBS="${LIBS_SAVED}"
01bc990a 9456
90121a3e 9457 unset CFLAGS_SAVED
6fb8526b 9458 unset LIBS_SAVED
90121a3e 9459
84a3211e 9460
65863905 9461
8f1afa5d
AJ
9462 CFLAGS_SAVED="${CFLAGS}"
9463 LIBS_SAVED="${LIBS}"
9464
3828bfac
AJ
9465 LIBMBEDCRYPTO="No"
9466 LIBMBEDCRYPTO_USABLE="No"
9467 LIBMBEDCRYPTO_DIGEST="No"
9468 LIBMBEDCRYPTO_RANDOM="No"
bc2a87b4 9469
3828bfac
AJ
9470 LIBMBEDCRYPTO_CFLAGS=""
9471 LIBMBEDCRYPTO_LIBS=""
752694a2 9472
3828bfac
AJ
9473
9474# Check whether --with-mbedtls was given.
9475if test "${with_mbedtls+set}" = set; then :
9476 withval=$with_mbedtls;
bc2a87b4 9477else
3828bfac 9478 with_mbedtls="auto"
bc2a87b4
AJ
9479fi
9480
86e4a22b 9481
f54ed0d4
AJ
9482 case "x${with_mbedtls}" in #(
9483 xno) :
9484 ;; #(
9485 xyes) :
9486 ;; #(
9487 xauto) :
9488 ;; #(
9489 *) :
9490
9491 as_fn_error $? "invalid option for --with-mbedtls" "$LINENO" 5
9492 ;;
9493esac
c523bb43 9494
3828bfac 9495 if test "${with_mbedtls}" != "no"; then :
5a3259b2 9496
3828bfac
AJ
9497 # If this library ever starts shipping a pkg-config file, change to PKG_CHECK_MODULES ?
9498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing mbedtls_version_get_string" >&5
9499$as_echo_n "checking for library containing mbedtls_version_get_string... " >&6; }
9500if ${ac_cv_search_mbedtls_version_get_string+:} false; then :
9501 $as_echo_n "(cached) " >&6
5a3259b2 9502else
3828bfac
AJ
9503 ac_func_search_save_LIBS=$LIBS
9504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9505/* end confdefs.h. */
5a3259b2 9506
3828bfac
AJ
9507/* Override any GCC internal prototype to avoid an error.
9508 Use char because int might match the return type of a GCC
9509 builtin and then its argument prototype would still apply. */
9510#ifdef __cplusplus
9511extern "C"
9512#endif
9513char mbedtls_version_get_string ();
9514int
9515main ()
9516{
9517return mbedtls_version_get_string ();
9518 ;
9519 return 0;
9520}
9521_ACEOF
9522for ac_lib in '' mbedcrypto; do
9523 if test -z "$ac_lib"; then
9524 ac_res="none required"
9525 else
9526 ac_res=-l$ac_lib
9527 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9528 fi
9529 if ac_fn_c_try_link "$LINENO"; then :
9530 ac_cv_search_mbedtls_version_get_string=$ac_res
bc2a87b4 9531fi
3828bfac
AJ
9532rm -f core conftest.err conftest.$ac_objext \
9533 conftest$ac_exeext
9534 if ${ac_cv_search_mbedtls_version_get_string+:} false; then :
9535 break
bc2a87b4 9536fi
3828bfac
AJ
9537done
9538if ${ac_cv_search_mbedtls_version_get_string+:} false; then :
9539
e63c6763 9540else
3828bfac 9541 ac_cv_search_mbedtls_version_get_string=no
e63c6763 9542fi
3828bfac
AJ
9543rm conftest.$ac_ext
9544LIBS=$ac_func_search_save_LIBS
e63c6763 9545fi
3828bfac
AJ
9546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_mbedtls_version_get_string" >&5
9547$as_echo "$ac_cv_search_mbedtls_version_get_string" >&6; }
9548ac_res=$ac_cv_search_mbedtls_version_get_string
9549if test "$ac_res" != no; then :
9550 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
e63c6763 9551
3828bfac
AJ
9552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libmbedcrypto appears to be usable" >&5
9553$as_echo_n "checking if libmbedcrypto appears to be usable... " >&6; }
9554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9555/* end confdefs.h. */
e63c6763 9556
bc2a87b4 9557
3828bfac
AJ
9558 #ifdef HAVE_STDDEF_H
9559 # include <stddef.h>
9560 #endif
9561 #ifdef MBEDTLS_CONFIG_FILE
9562 # include MBEDTLS_CONFIG_FILE
9563 #else
9564 # include <mbedtls/config.h>
9565 #endif
9566 #include <mbedtls/error.h>
9567 #include <mbedtls/version.h>
9568 #ifndef MBEDTLS_ERROR_C
9569 # error "MBEDTLS_ERROR_C is not enabled"
9570 #endif
9571 #ifndef MBEDTLS_VERSION_C
9572 # error "MBEDTLS_VERSION_C is not enabled"
9573 #endif
e63c6763 9574
3828bfac
AJ
9575int
9576main ()
9577{
e63c6763 9578
3828bfac
AJ
9579 (void) mbedtls_strerror(0, NULL, 0);
9580 (void) mbedtls_version_get_string(NULL);
e63c6763 9581
3828bfac
AJ
9582 ;
9583 return 0;
9584}
e63c6763 9585
3828bfac
AJ
9586_ACEOF
9587if ac_fn_c_try_link "$LINENO"; then :
9588
9589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9590$as_echo "yes" >&6; }
9591 LIBMBEDCRYPTO="Yes"
9592
9593else
e63c6763 9594
3828bfac 9595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e63c6763 9596$as_echo "no" >&6; }
3828bfac
AJ
9597 LIBMBEDCRYPTO="No"
9598 if test "${with_mbedtls}" = "yes"; then :
e63c6763 9599
3828bfac
AJ
9600 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9602as_fn_error $? "--with-mbedtls was given but libmbedcrypto appears to be unusable
5a3259b2 9603See \`config.log' for more details" "$LINENO" 5; }
e63c6763 9604
ad5cc67e
AJ
9605fi
9606
9607fi
3828bfac
AJ
9608rm -f core conftest.err conftest.$ac_objext \
9609 conftest$ac_exeext conftest.$ac_ext
ad5cc67e 9610
5a3259b2 9611else
ad5cc67e 9612
3828bfac
AJ
9613 LIBMBEDCRYPTO="No"
9614 if test "${with_mbedtls}" = "yes"; then :
ad5cc67e 9615
3828bfac 9616 as_fn_error $? "--with-mbedtls was given but libmbedcrypto could not be found" "$LINENO" 5
460b89c1 9617
5a3259b2
AJ
9618fi
9619
9620fi
460b89c1 9621
3828bfac
AJ
9622
9623else
9624
9625 LIBMBEDCRYPTO="No"
9626
ad5cc67e
AJ
9627fi
9628
3828bfac 9629 if test "${LIBMBEDCRYPTO}" = "Yes"; then :
ad5cc67e 9630
3828bfac
AJ
9631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libmbedcrypto has usable MD5/SHA1/SHA2/HMAC/PBKDF2 functions" >&5
9632$as_echo_n "checking if libmbedcrypto has usable MD5/SHA1/SHA2/HMAC/PBKDF2 functions... " >&6; }
9633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9634/* end confdefs.h. */
5a3259b2 9635
3828bfac
AJ
9636
9637 #ifdef HAVE_STDDEF_H
9638 # include <stddef.h>
9639 #endif
9640 #ifdef MBEDTLS_CONFIG_FILE
9641 # include MBEDTLS_CONFIG_FILE
9642 #else
9643 # include <mbedtls/config.h>
9644 #endif
9645 #include <mbedtls/md.h>
9646 #include <mbedtls/pkcs5.h>
9647 #ifndef MBEDTLS_MD_C
9648 # error "MBEDTLS_MD_C is not enabled"
9649 #endif
9650 #ifndef MBEDTLS_PKCS5_C
9651 # error "MBEDTLS_PKCS5_C is not enabled"
9652 #endif
9653 #ifndef MBEDTLS_MD5_C
9654 # error "MBEDTLS_MD5_C is not enabled"
9655 #endif
9656 #ifndef MBEDTLS_SHA1_C
9657 # error "MBEDTLS_SHA1_C is not enabled"
9658 #endif
9659 #ifndef MBEDTLS_SHA256_C
9660 # error "MBEDTLS_SHA256_C is not enabled"
9661 #endif
9662 #ifndef MBEDTLS_SHA512_C
9663 # error "MBEDTLS_SHA512_C is not enabled"
9664 #endif
9665
9666int
9667main ()
9668{
9669
9670 (void) mbedtls_md_info_from_type(MBEDTLS_MD_MD5);
9671 (void) mbedtls_md_info_from_type(MBEDTLS_MD_SHA1);
9672 (void) mbedtls_md_info_from_type(MBEDTLS_MD_SHA256);
9673 (void) mbedtls_md_info_from_type(MBEDTLS_MD_SHA512);
9674 (void) mbedtls_md_init(NULL);
9675 (void) mbedtls_md_setup(NULL, NULL, 0);
9676 (void) mbedtls_md_starts(NULL);
9677 (void) mbedtls_md_update(NULL, NULL, 0);
9678 (void) mbedtls_md_finish(NULL, NULL);
9679 (void) mbedtls_md_hmac_starts(NULL, NULL, 0);
9680 (void) mbedtls_md_hmac_update(NULL, NULL, 0);
9681 (void) mbedtls_md_hmac_finish(NULL, NULL);
9682 (void) mbedtls_md_free(NULL);
9683 (void) mbedtls_pkcs5_pbkdf2_hmac(NULL, NULL, 0, NULL, 0, 0, 0, NULL);
9684
9685 ;
9686 return 0;
9687}
9688
9689_ACEOF
9690if ac_fn_c_try_link "$LINENO"; then :
9691
9692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9693$as_echo "yes" >&6; }
9694 LIBMBEDCRYPTO_USABLE="Yes"
9695 LIBMBEDCRYPTO_DIGEST="Yes"
9696
9697else
9698
9699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9700$as_echo "no" >&6; }
9701
9702fi
9703rm -f core conftest.err conftest.$ac_objext \
9704 conftest$ac_exeext conftest.$ac_ext
9705
9706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libmbedcrypto has a usable HMAC-DRBG random number generator" >&5
9707$as_echo_n "checking if libmbedcrypto has a usable HMAC-DRBG random number generator... " >&6; }
6df79d8f 9708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
beb2b070
AJ
9709/* end confdefs.h. */
9710
9711
6df79d8f
AJ
9712 #ifdef HAVE_STDDEF_H
9713 # include <stddef.h>
9714 #endif
3828bfac
AJ
9715 #ifdef MBEDTLS_CONFIG_FILE
9716 # include MBEDTLS_CONFIG_FILE
9717 #else
9718 # include <mbedtls/config.h>
9719 #endif
9720 #include <mbedtls/entropy.h>
9721 #include <mbedtls/hmac_drbg.h>
9722 #include <mbedtls/md.h>
9723 #ifndef MBEDTLS_ENTROPY_C
9724 # error "MBEDTLS_ENTROPY_C is not enabled"
9725 #endif
9726 #ifndef MBEDTLS_HMAC_DRBG_C
9727 # error "MBEDTLS_HMAC_DRBG_C is not enabled"
9728 #endif
9729 #ifndef MBEDTLS_MD_C
9730 # error "MBEDTLS_MD_C is not enabled"
9731 #endif
9732 #if !defined(MBEDTLS_SHA256_C) && !defined(MBEDTLS_SHA512_C)
9733 # error "Neither MBEDTLS_SHA256_C nor MBEDTLS_SHA512_C are enabled"
9734 #endif
beb2b070
AJ
9735
9736int
9737main ()
9738{
9739
3828bfac
AJ
9740 (void) mbedtls_entropy_init(NULL);
9741 (void) mbedtls_entropy_func(NULL, NULL, 0);
9742 (void) mbedtls_md_info_from_type(MBEDTLS_MD_NONE);
9743 (void) mbedtls_hmac_drbg_init(NULL);
9744 (void) mbedtls_hmac_drbg_seed(NULL, NULL, NULL, NULL, NULL, 0);
9745 (void) mbedtls_hmac_drbg_reseed(NULL, NULL, 0);
9746 (void) mbedtls_hmac_drbg_random(NULL, NULL, 0);
beb2b070
AJ
9747
9748 ;
9749 return 0;
9750}
9751
9752_ACEOF
e63c6763 9753if ac_fn_c_try_link "$LINENO"; then :
beb2b070 9754
6df79d8f 9755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
beb2b070 9756$as_echo "yes" >&6; }
3828bfac
AJ
9757 LIBMBEDCRYPTO_USABLE="Yes"
9758 LIBMBEDCRYPTO_RANDOM="Yes"
ed5bb1ac 9759
3828bfac
AJ
9760else
9761
9762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9763$as_echo "no" >&6; }
9764
9765fi
9766rm -f core conftest.err conftest.$ac_objext \
9767 conftest$ac_exeext conftest.$ac_ext
9768
9769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libmbedcrypto can provide SASL ECDH-X25519-CHALLENGE" >&5
9770$as_echo_n "checking if libmbedcrypto can provide SASL ECDH-X25519-CHALLENGE... " >&6; }
9771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e217d2e8
AJ
9772/* end confdefs.h. */
9773
9774
3828bfac
AJ
9775 #ifdef HAVE_STDDEF_H
9776 # include <stddef.h>
9777 #endif
9778 #ifdef MBEDTLS_CONFIG_FILE
9779 # include MBEDTLS_CONFIG_FILE
9780 #else
9781 # include <mbedtls/config.h>
9782 #endif
9783 #include <mbedtls/bignum.h>
9784 #include <mbedtls/ecdh.h>
9785 #include <mbedtls/ecp.h>
9786 #ifndef MBEDTLS_BIGNUM_C
9787 # error "MBEDTLS_BIGNUM_C is not enabled"
9788 #endif
9789 #ifndef MBEDTLS_ECDH_C
9790 # error "MBEDTLS_ECDH_C is not enabled"
9791 #endif
9792 #ifndef MBEDTLS_ECP_C
9793 # error "MBEDTLS_ECP_C is not enabled"
9794 #endif
e217d2e8
AJ
9795
9796int
9797main ()
9798{
9799
3828bfac
AJ
9800 (void) mbedtls_ecdh_compute_shared(NULL, NULL, NULL, NULL, NULL, NULL);
9801 (void) mbedtls_ecdh_gen_public(NULL, NULL, NULL, NULL, NULL);
9802 (void) mbedtls_ecp_check_pubkey(NULL, NULL);
9803 (void) mbedtls_ecp_group_free(NULL);
9804 (void) mbedtls_ecp_group_init(NULL);
9805 (void) mbedtls_ecp_group_load(NULL, 0);
9806 (void) mbedtls_ecp_point_free(NULL);
9807 (void) mbedtls_ecp_point_init(NULL);
9808 (void) mbedtls_mpi_free(NULL);
9809 (void) mbedtls_mpi_init(NULL);
9810 (void) mbedtls_mpi_lset(NULL, 0);
9811 (void) mbedtls_mpi_read_binary(NULL, NULL, 0);
9812 (void) mbedtls_mpi_write_binary(NULL, NULL, 0);
e217d2e8
AJ
9813
9814 ;
9815 return 0;
9816}
9817
3828bfac
AJ
9818_ACEOF
9819if ac_fn_c_try_link "$LINENO"; then :
9820
9821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9822$as_echo "yes" >&6; }
9823
9824$as_echo "#define HAVE_LIBMBEDCRYPTO_ECDH_X25519 1" >>confdefs.h
9825
9826 FEATURE_SASL_ECDH_X25519_CHALLENGE="Yes"
9827 LIBMBEDCRYPTO_USABLE="Yes"
9828
9829else
9830
9831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9832$as_echo "no" >&6; }
9833
9834fi
9835rm -f core conftest.err conftest.$ac_objext \
9836 conftest$ac_exeext conftest.$ac_ext
9837
9838fi
9839
9840 if test "${LIBMBEDCRYPTO_USABLE}" = "Yes"; then :
9841
e217d2e8 9842
3828bfac 9843$as_echo "#define HAVE_LIBMBEDCRYPTO 1" >>confdefs.h
460b89c1 9844
3828bfac
AJ
9845 if test "x${ac_cv_search_mbedtls_version_get_string}" != "xnone required"; then :
9846
9847 LIBMBEDCRYPTO_LIBS="${ac_cv_search_mbedtls_version_get_string}"
460b89c1 9848
3828bfac 9849fi
e217d2e8
AJ
9850
9851else
9852
3828bfac
AJ
9853 LIBMBEDCRYPTO="No"
9854 if test "${with_mbedtls}" = "yes"; then :
9855
9856 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9857$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9858as_fn_error $? "--with-mbedtls was given but libmbedcrypto appears to be unusable
9859See \`config.log' for more details" "$LINENO" 5; }
e217d2e8
AJ
9860
9861fi
e217d2e8 9862
3828bfac 9863fi
460b89c1 9864
3828bfac
AJ
9865 if test "${LIBMBEDCRYPTO}" = "No"; then :
9866
9867 LIBMBEDCRYPTO_CFLAGS=""
9868 LIBMBEDCRYPTO_LIBS=""
460b89c1
AJ
9869
9870fi
460b89c1 9871
ed5bb1ac
AJ
9872
9873
ed5bb1ac 9874
3828bfac
AJ
9875 CFLAGS="${CFLAGS_SAVED}"
9876 LIBS="${LIBS_SAVED}"
ed5bb1ac 9877
90121a3e
AJ
9878 unset CFLAGS_SAVED
9879 unset LIBS_SAVED
9880
ed5bb1ac 9881
ed5bb1ac 9882
c6167e86
AJ
9883 LIBMOWGLI_SOURCE=""
9884 LIBMOWGLI_CFLAGS=""
9885 LIBMOWGLI_LIBS=""
9886
9887
9888# Check whether --with-libmowgli was given.
9889if test "${with_libmowgli+set}" = set; then :
9890 withval=$with_libmowgli;
9891else
9892 with_libmowgli="no"
9893fi
9894
9895
9896 case "x${with_libmowgli}" in #(
9897 xno) :
9898
9899 LIBMOWGLI_SOURCE="Internal"
9900 LIBMOWGLI_CFLAGS="-I$(pwd)/libmowgli-2/src/libmowgli"
9901 LIBMOWGLI_LIBS="-L$(pwd)/libmowgli-2/src/libmowgli -lmowgli-2"
9902 ;; #(
9903 xyes) :
9904
9905 if test -z "${PKG_CONFIG}"; then :
9906
9907 as_fn_error $? "--with-libmowgli=yes was given, but pkg-config is required and is not available" "$LINENO" 5
9908
9909fi
9910
9911pkg_failed=no
9912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBMOWGLI" >&5
9913$as_echo_n "checking for LIBMOWGLI... " >&6; }
9914
9915if test -n "$LIBMOWGLI_CFLAGS"; then
9916 pkg_cv_LIBMOWGLI_CFLAGS="$LIBMOWGLI_CFLAGS"
9917 elif test -n "$PKG_CONFIG"; then
9918 if test -n "$PKG_CONFIG" && \
9919 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmowgli-2 >= 2.0.0\""; } >&5
9920 ($PKG_CONFIG --exists --print-errors "libmowgli-2 >= 2.0.0") 2>&5
9921 ac_status=$?
9922 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9923 test $ac_status = 0; }; then
9924 pkg_cv_LIBMOWGLI_CFLAGS=`$PKG_CONFIG --cflags "libmowgli-2 >= 2.0.0" 2>/dev/null`
9925 test "x$?" != "x0" && pkg_failed=yes
9926else
9927 pkg_failed=yes
9928fi
9929 else
9930 pkg_failed=untried
9931fi
9932if test -n "$LIBMOWGLI_LIBS"; then
9933 pkg_cv_LIBMOWGLI_LIBS="$LIBMOWGLI_LIBS"
9934 elif test -n "$PKG_CONFIG"; then
9935 if test -n "$PKG_CONFIG" && \
9936 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmowgli-2 >= 2.0.0\""; } >&5
9937 ($PKG_CONFIG --exists --print-errors "libmowgli-2 >= 2.0.0") 2>&5
9938 ac_status=$?
9939 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9940 test $ac_status = 0; }; then
9941 pkg_cv_LIBMOWGLI_LIBS=`$PKG_CONFIG --libs "libmowgli-2 >= 2.0.0" 2>/dev/null`
9942 test "x$?" != "x0" && pkg_failed=yes
9943else
9944 pkg_failed=yes
9945fi
9946 else
9947 pkg_failed=untried
9948fi
9949
9950
9951
9952if test $pkg_failed = yes; then
9953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9954$as_echo "no" >&6; }
9955
9956if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9957 _pkg_short_errors_supported=yes
9958else
9959 _pkg_short_errors_supported=no
9960fi
9961 if test $_pkg_short_errors_supported = yes; then
9962 LIBMOWGLI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libmowgli-2 >= 2.0.0" 2>&1`
9963 else
9964 LIBMOWGLI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libmowgli-2 >= 2.0.0" 2>&1`
9965 fi
9966 # Put the nasty error message in config.log where it belongs
9967 echo "$LIBMOWGLI_PKG_ERRORS" >&5
9968
9969
9970 as_fn_error $? "--with-libmowgli=yes was given, but pkg-config could not locate libmowgli" "$LINENO" 5
9971
9972elif test $pkg_failed = untried; then
9973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9974$as_echo "no" >&6; }
9975
9976 as_fn_error $? "--with-libmowgli=yes was given, but pkg-config could not locate libmowgli" "$LINENO" 5
9977
9978else
9979 LIBMOWGLI_CFLAGS=$pkg_cv_LIBMOWGLI_CFLAGS
9980 LIBMOWGLI_LIBS=$pkg_cv_LIBMOWGLI_LIBS
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9982$as_echo "yes" >&6; }
9983
9984fi
9985 LIBMOWGLI_SOURCE="System (pkg-config)"
b90f90e8
AJ
9986
9987
9988 CFLAGS_SAVED="${CFLAGS}"
9989 LIBS_SAVED="${LIBS}"
9990
9991 CFLAGS="${LIBMOWGLI_CFLAGS} ${CFLAGS}"
9992 LIBS="${LIBMOWGLI_LIBS} ${LIBS}"
9993
9994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libmowgli appears to be usable" >&5
9995$as_echo_n "checking if libmowgli appears to be usable... " >&6; }
9996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9997/* end confdefs.h. */
9998
9999
10000 #ifdef HAVE_STDDEF_H
10001 # include <stddef.h>
10002 #endif
10003 #include <mowgli.h>
10004
10005int
10006main ()
10007{
10008
10009 (void) mowgli_alloc(0);
10010 (void) mowgli_allocation_policy_create(NULL, NULL, NULL);
10011 (void) mowgli_allocator_set_policy(NULL);
10012 (void) mowgli_config_file_free(NULL);
10013 (void) mowgli_config_file_load(NULL);
10014 (void) mowgli_dns_create(NULL, MOWGLI_DNS_TYPE_ASYNC);
10015 (void) mowgli_dns_delete_query(NULL, NULL);
10016 (void) mowgli_dns_destroy(NULL);
10017 (void) mowgli_dns_gethost_byname(NULL, NULL, NULL, 0);
10018 (void) mowgli_eventloop_create();
10019 (void) mowgli_eventloop_destroy(NULL);
10020 (void) mowgli_eventloop_get_time(NULL);
10021 (void) mowgli_eventloop_ignore_errno(0);
10022 (void) mowgli_eventloop_run_once(NULL);
10023 (void) mowgli_eventloop_synchronize(NULL);
10024 (void) mowgli_free(NULL);
10025 (void) mowgli_getopt_long(0, NULL, NULL, NULL, NULL);
10026 (void) mowgli_global_storage_free(NULL);
10027 (void) mowgli_global_storage_get(NULL);
10028 (void) mowgli_global_storage_put(NULL, NULL);
10029 (void) mowgli_heap_alloc(NULL);
10030 (void) mowgli_heap_create(0, 0, BH_NOW);
10031 (void) mowgli_heap_destroy(NULL);
10032 (void) mowgli_heap_free(NULL, NULL);
10033 (void) mowgli_json_create_string(NULL);
10034 (void) mowgli_json_parse_string(NULL);
10035 (void) mowgli_json_serialize_to_string(NULL, NULL, 0);
10036 (void) mowgli_list_create();
10037 (void) mowgli_list_free(NULL);
10038 (void) mowgli_list_reverse(NULL);
10039 (void) mowgli_list_sort(NULL, NULL, NULL);
10040 (void) mowgli_module_close(NULL);
10041 (void) mowgli_module_open(NULL);
10042 (void) mowgli_module_symbol(NULL, NULL);
10043 (void) mowgli_node_add(NULL, NULL, NULL);
10044 (void) mowgli_node_add_before(NULL, NULL, NULL, NULL);
10045 (void) mowgli_node_add_head(NULL, NULL, NULL);
10046 (void) mowgli_node_create();
10047 (void) mowgli_node_delete(NULL, NULL);
10048 (void) mowgli_node_find(NULL, NULL);
10049 (void) mowgli_node_free(NULL);
10050 (void) mowgli_node_nth_data(NULL, 0);
10051 (void) mowgli_patricia_add(NULL, NULL, NULL);
10052 (void) mowgli_patricia_create(NULL);
10053 (void) mowgli_patricia_delete(NULL, NULL);
10054 (void) mowgli_patricia_destroy(NULL, NULL, NULL);
10055 (void) mowgli_patricia_foreach(NULL, NULL, NULL);
10056 (void) mowgli_patricia_foreach_cur(NULL, NULL);
10057 (void) mowgli_patricia_foreach_next(NULL, NULL);
10058 (void) mowgli_patricia_foreach_start(NULL, NULL);
10059 (void) mowgli_patricia_retrieve(NULL, NULL);
10060 (void) mowgli_patricia_size(NULL);
10061 (void) mowgli_patricia_stats(NULL, NULL, NULL);
10062 (void) mowgli_pollable_create(NULL, 0, NULL);
10063 (void) mowgli_pollable_destroy(NULL, NULL);
10064 (void) mowgli_pollable_setselect(NULL, NULL, MOWGLI_EVENTLOOP_IO_READ, NULL);
10065 (void) mowgli_pollable_setselect(NULL, NULL, MOWGLI_EVENTLOOP_IO_WRITE, NULL);
10066 (void) mowgli_signal_install_handler(0, NULL);
10067 (void) mowgli_strlcat(NULL, NULL, 0);
10068 (void) mowgli_strlcpy(NULL, NULL, 0);
10069 (void) mowgli_thread_set_policy(MOWGLI_THREAD_POLICY_DISABLED);
10070 (void) mowgli_timer_add(NULL, NULL, NULL, NULL, 0);
10071 (void) mowgli_timer_add_once(NULL, NULL, NULL, NULL, 0);
10072 (void) mowgli_timer_destroy(NULL, NULL);
10073
10074 ;
10075 return 0;
10076}
10077
10078_ACEOF
10079if ac_fn_c_try_link "$LINENO"; then :
10080
10081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10082$as_echo "yes" >&6; }
10083
10084else
10085
10086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10087$as_echo "no" >&6; }
10088 if test "${with_libmowgli}" = "yes"; then :
10089
10090 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10092as_fn_error $? "--with-libmowgli=yes was given, but the libmowgli detected by pkg-config is not suitable
10093See \`config.log' for more details" "$LINENO" 5; }
10094
10095else
10096
10097 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10098$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10099as_fn_error $? "--with-libmowgli=path was given, but the path does not contain a usable libmowgli
10100See \`config.log' for more details" "$LINENO" 5; }
10101
10102fi
10103
10104fi
10105rm -f core conftest.err conftest.$ac_objext \
10106 conftest$ac_exeext conftest.$ac_ext
10107
10108 CFLAGS="${CFLAGS_SAVED}"
10109 LIBS="${LIBS_SAVED}"
10110
10111 unset CFLAGS_SAVED
10112 unset LIBS_SAVED
10113
c6167e86
AJ
10114 ;; #(
10115 x/*) :
10116
10117 if test -d "${with_libmowgli}/include/libmowgli-2" -a -d "${with_libmowgli}/lib"; then :
10118
10119else
10120
10121 as_fn_error $? "${with_libmowgli} is not a suitable directory for libmowgli" "$LINENO" 5
10122
10123fi
10124 LIBMOWGLI_SOURCE="System (${with_libmowgli})"
10125 LIBMOWGLI_CFLAGS="-I${with_libmowgli}/include/libmowgli-2"
10126 LIBMOWGLI_LIBS="-L${with_libmowgli}/lib -lmowgli-2"
b90f90e8
AJ
10127
10128
10129 CFLAGS_SAVED="${CFLAGS}"
10130 LIBS_SAVED="${LIBS}"
10131
10132 CFLAGS="${LIBMOWGLI_CFLAGS} ${CFLAGS}"
10133 LIBS="${LIBMOWGLI_LIBS} ${LIBS}"
10134
10135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libmowgli appears to be usable" >&5
10136$as_echo_n "checking if libmowgli appears to be usable... " >&6; }
10137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10138/* end confdefs.h. */
10139
10140
10141 #ifdef HAVE_STDDEF_H
10142 # include <stddef.h>
10143 #endif
10144 #include <mowgli.h>
10145
10146int
10147main ()
10148{
10149
10150 (void) mowgli_alloc(0);
10151 (void) mowgli_allocation_policy_create(NULL, NULL, NULL);
10152 (void) mowgli_allocator_set_policy(NULL);
10153 (void) mowgli_config_file_free(NULL);
10154 (void) mowgli_config_file_load(NULL);
10155 (void) mowgli_dns_create(NULL, MOWGLI_DNS_TYPE_ASYNC);
10156 (void) mowgli_dns_delete_query(NULL, NULL);
10157 (void) mowgli_dns_destroy(NULL);
10158 (void) mowgli_dns_gethost_byname(NULL, NULL, NULL, 0);
10159 (void) mowgli_eventloop_create();
10160 (void) mowgli_eventloop_destroy(NULL);
10161 (void) mowgli_eventloop_get_time(NULL);
10162 (void) mowgli_eventloop_ignore_errno(0);
10163 (void) mowgli_eventloop_run_once(NULL);
10164 (void) mowgli_eventloop_synchronize(NULL);
10165 (void) mowgli_free(NULL);
10166 (void) mowgli_getopt_long(0, NULL, NULL, NULL, NULL);
10167 (void) mowgli_global_storage_free(NULL);
10168 (void) mowgli_global_storage_get(NULL);
10169 (void) mowgli_global_storage_put(NULL, NULL);
10170 (void) mowgli_heap_alloc(NULL);
10171 (void) mowgli_heap_create(0, 0, BH_NOW);
10172 (void) mowgli_heap_destroy(NULL);
10173 (void) mowgli_heap_free(NULL, NULL);
10174 (void) mowgli_json_create_string(NULL);
10175 (void) mowgli_json_parse_string(NULL);
10176 (void) mowgli_json_serialize_to_string(NULL, NULL, 0);
10177 (void) mowgli_list_create();
10178 (void) mowgli_list_free(NULL);
10179 (void) mowgli_list_reverse(NULL);
10180 (void) mowgli_list_sort(NULL, NULL, NULL);
10181 (void) mowgli_module_close(NULL);
10182 (void) mowgli_module_open(NULL);
10183 (void) mowgli_module_symbol(NULL, NULL);
10184 (void) mowgli_node_add(NULL, NULL, NULL);
10185 (void) mowgli_node_add_before(NULL, NULL, NULL, NULL);
10186 (void) mowgli_node_add_head(NULL, NULL, NULL);
10187 (void) mowgli_node_create();
10188 (void) mowgli_node_delete(NULL, NULL);
10189 (void) mowgli_node_find(NULL, NULL);
10190 (void) mowgli_node_free(NULL);
10191 (void) mowgli_node_nth_data(NULL, 0);
10192 (void) mowgli_patricia_add(NULL, NULL, NULL);
10193 (void) mowgli_patricia_create(NULL);
10194 (void) mowgli_patricia_delete(NULL, NULL);
10195 (void) mowgli_patricia_destroy(NULL, NULL, NULL);
10196 (void) mowgli_patricia_foreach(NULL, NULL, NULL);
10197 (void) mowgli_patricia_foreach_cur(NULL, NULL);
10198 (void) mowgli_patricia_foreach_next(NULL, NULL);
10199 (void) mowgli_patricia_foreach_start(NULL, NULL);
10200 (void) mowgli_patricia_retrieve(NULL, NULL);
10201 (void) mowgli_patricia_size(NULL);
10202 (void) mowgli_patricia_stats(NULL, NULL, NULL);
10203 (void) mowgli_pollable_create(NULL, 0, NULL);
10204 (void) mowgli_pollable_destroy(NULL, NULL);
10205 (void) mowgli_pollable_setselect(NULL, NULL, MOWGLI_EVENTLOOP_IO_READ, NULL);
10206 (void) mowgli_pollable_setselect(NULL, NULL, MOWGLI_EVENTLOOP_IO_WRITE, NULL);
10207 (void) mowgli_signal_install_handler(0, NULL);
10208 (void) mowgli_strlcat(NULL, NULL, 0);
10209 (void) mowgli_strlcpy(NULL, NULL, 0);
10210 (void) mowgli_thread_set_policy(MOWGLI_THREAD_POLICY_DISABLED);
10211 (void) mowgli_timer_add(NULL, NULL, NULL, NULL, 0);
10212 (void) mowgli_timer_add_once(NULL, NULL, NULL, NULL, 0);
10213 (void) mowgli_timer_destroy(NULL, NULL);
10214
10215 ;
10216 return 0;
10217}
10218
10219_ACEOF
10220if ac_fn_c_try_link "$LINENO"; then :
10221
10222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10223$as_echo "yes" >&6; }
10224
10225else
10226
10227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10228$as_echo "no" >&6; }
10229 if test "${with_libmowgli}" = "yes"; then :
10230
10231 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10232$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10233as_fn_error $? "--with-libmowgli=yes was given, but the libmowgli detected by pkg-config is not suitable
10234See \`config.log' for more details" "$LINENO" 5; }
10235
10236else
10237
10238 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10239$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10240as_fn_error $? "--with-libmowgli=path was given, but the path does not contain a usable libmowgli
10241See \`config.log' for more details" "$LINENO" 5; }
10242
10243fi
10244
10245fi
10246rm -f core conftest.err conftest.$ac_objext \
10247 conftest$ac_exeext conftest.$ac_ext
10248
10249 CFLAGS="${CFLAGS_SAVED}"
10250 LIBS="${LIBS_SAVED}"
10251
10252 unset CFLAGS_SAVED
10253 unset LIBS_SAVED
10254
c6167e86
AJ
10255 ;; #(
10256 *) :
10257
10258 as_fn_error $? "invalid option for --with-libmowgli" "$LINENO" 5
10259 ;;
10260esac
10261
10262
10263
10264
10265
10266
3828bfac
AJ
10267 CFLAGS_SAVED="${CFLAGS}"
10268 LIBS_SAVED="${LIBS}"
10269
10270 LIBNETTLE="No"
10271 LIBNETTLE_PATH=""
10272 LIBNETTLE_USABLE="No"
ed5bb1ac 10273
ed5bb1ac 10274
3828bfac
AJ
10275# Check whether --with-nettle was given.
10276if test "${with_nettle+set}" = set; then :
10277 withval=$with_nettle;
460b89c1 10278else
3828bfac
AJ
10279 with_nettle="auto"
10280fi
460b89c1 10281
460b89c1 10282
f54ed0d4
AJ
10283 case "x${with_nettle}" in #(
10284 xno) :
10285 ;; #(
10286 xyes) :
10287 ;; #(
10288 xauto) :
10289 ;; #(
10290 x/*) :
10291
10292 LIBNETTLE_PATH="${with_nettle}"
10293 with_nettle="yes"
10294 ;; #(
10295 *) :
10296
10297 as_fn_error $? "invalid option for --with-nettle" "$LINENO" 5
10298 ;;
10299esac
475a05fd 10300
3828bfac 10301 if test "${with_nettle}" != "no"; then :
475a05fd 10302
3828bfac 10303 if test -n "${LIBNETTLE_PATH}"; then :
475a05fd 10304
3828bfac
AJ
10305 # Allow for user to provide custom installation directory
10306 if test -d "${LIBNETTLE_PATH}/include" -a -d "${LIBNETTLE_PATH}/lib"; then :
475a05fd 10307
3828bfac
AJ
10308 LIBNETTLE_CFLAGS="-I${LIBNETTLE_PATH}/include"
10309 LIBNETTLE_LIBS="-L${LIBNETTLE_PATH}/lib -lnettle"
475a05fd 10310
3828bfac 10311else
475a05fd 10312
3828bfac 10313 as_fn_error $? "${LIBNETTLE_PATH} is not a suitable directory for GNU Nettle" "$LINENO" 5
475a05fd 10314
3828bfac 10315fi
475a05fd 10316
3828bfac 10317elif test -n "${PKG_CONFIG}"; then :
632c2921 10318
3828bfac 10319 # Allow for the user to "override" pkg-config without it being installed
632c2921 10320
3828bfac
AJ
10321pkg_failed=no
10322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBNETTLE" >&5
10323$as_echo_n "checking for LIBNETTLE... " >&6; }
475a05fd 10324
3828bfac
AJ
10325if test -n "$LIBNETTLE_CFLAGS"; then
10326 pkg_cv_LIBNETTLE_CFLAGS="$LIBNETTLE_CFLAGS"
10327 elif test -n "$PKG_CONFIG"; then
10328 if test -n "$PKG_CONFIG" && \
10329 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nettle\""; } >&5
10330 ($PKG_CONFIG --exists --print-errors "nettle") 2>&5
10331 ac_status=$?
10332 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10333 test $ac_status = 0; }; then
10334 pkg_cv_LIBNETTLE_CFLAGS=`$PKG_CONFIG --cflags "nettle" 2>/dev/null`
10335 test "x$?" != "x0" && pkg_failed=yes
10336else
10337 pkg_failed=yes
10338fi
10339 else
10340 pkg_failed=untried
10341fi
10342if test -n "$LIBNETTLE_LIBS"; then
10343 pkg_cv_LIBNETTLE_LIBS="$LIBNETTLE_LIBS"
10344 elif test -n "$PKG_CONFIG"; then
10345 if test -n "$PKG_CONFIG" && \
10346 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nettle\""; } >&5
10347 ($PKG_CONFIG --exists --print-errors "nettle") 2>&5
10348 ac_status=$?
10349 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10350 test $ac_status = 0; }; then
10351 pkg_cv_LIBNETTLE_LIBS=`$PKG_CONFIG --libs "nettle" 2>/dev/null`
10352 test "x$?" != "x0" && pkg_failed=yes
475a05fd 10353else
3828bfac
AJ
10354 pkg_failed=yes
10355fi
10356 else
10357 pkg_failed=untried
10358fi
475a05fd 10359
475a05fd 10360
d591939e 10361
3828bfac
AJ
10362if test $pkg_failed = yes; then
10363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10364$as_echo "no" >&6; }
d591939e 10365
3828bfac
AJ
10366if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
10367 _pkg_short_errors_supported=yes
10368else
10369 _pkg_short_errors_supported=no
10370fi
10371 if test $_pkg_short_errors_supported = yes; then
10372 LIBNETTLE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "nettle" 2>&1`
10373 else
10374 LIBNETTLE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "nettle" 2>&1`
10375 fi
10376 # Put the nasty error message in config.log where it belongs
10377 echo "$LIBNETTLE_PKG_ERRORS" >&5
d591939e 10378
cbd32d76 10379 LIBNETTLE="No"
3828bfac
AJ
10380elif test $pkg_failed = untried; then
10381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10382$as_echo "no" >&6; }
cbd32d76 10383 LIBNETTLE="No"
3828bfac
AJ
10384else
10385 LIBNETTLE_CFLAGS=$pkg_cv_LIBNETTLE_CFLAGS
10386 LIBNETTLE_LIBS=$pkg_cv_LIBNETTLE_LIBS
10387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
d591939e
AJ
10388$as_echo "yes" >&6; }
10389
3828bfac 10390fi
d591939e 10391
3828bfac
AJ
10392fi
10393 if test -n "${LIBNETTLE_CFLAGS+set}" -a -n "${LIBNETTLE_LIBS+set}"; then :
10394
10395 # Only proceed with library tests if custom paths were given or pkg-config succeeded
10396 LIBNETTLE="Yes"
d591939e
AJ
10397
10398else
10399
3828bfac
AJ
10400 LIBNETTLE="No"
10401 if test "${with_nettle}" != "no" && test "${with_nettle}" != "auto"; then :
10402
10403 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10405as_fn_error $? "--with-nettle was given but GNU Nettle could not be found
10406See \`config.log' for more details" "$LINENO" 5; }
d591939e 10407
460b89c1 10408fi
ed5bb1ac 10409
3828bfac
AJ
10410fi
10411
10412fi
10413
10414 if test "${LIBNETTLE}" = "Yes"; then :
10415
10416 CFLAGS="${LIBNETTLE_CFLAGS} ${CFLAGS}"
10417 LIBS="${LIBNETTLE_LIBS} ${LIBS}"
10418
10419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNU Nettle has a usable constant-time memory comparison function" >&5
10420$as_echo_n "checking if GNU Nettle has a usable constant-time memory comparison function... " >&6; }
6df79d8f 10421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67881d19
AJ
10422/* end confdefs.h. */
10423
10424
6df79d8f
AJ
10425 #ifdef HAVE_STDDEF_H
10426 # include <stddef.h>
10427 #endif
3828bfac 10428 #include <nettle/memops.h>
67881d19
AJ
10429
10430int
10431main ()
10432{
10433
3828bfac 10434 (void) nettle_memeql_sec(NULL, NULL, 0);
67881d19
AJ
10435
10436 ;
10437 return 0;
10438}
10439
10440_ACEOF
10441if ac_fn_c_try_link "$LINENO"; then :
10442
6df79d8f 10443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67881d19
AJ
10444$as_echo "yes" >&6; }
10445
3828bfac 10446$as_echo "#define HAVE_LIBNETTLE_MEMEQL 1" >>confdefs.h
67881d19 10447
3828bfac 10448 LIBNETTLE_USABLE="Yes"
67881d19
AJ
10449
10450else
10451
6df79d8f 10452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67881d19
AJ
10453$as_echo "no" >&6; }
10454
10455fi
10456rm -f core conftest.err conftest.$ac_objext \
10457 conftest$ac_exeext conftest.$ac_ext
10458
3828bfac
AJ
10459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNU Nettle can provide SASL ECDH-X25519-CHALLENGE" >&5
10460$as_echo_n "checking if GNU Nettle can provide SASL ECDH-X25519-CHALLENGE... " >&6; }
6df79d8f 10461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
460b89c1
AJ
10462/* end confdefs.h. */
10463
10464
6df79d8f
AJ
10465 #ifdef HAVE_STDDEF_H
10466 # include <stddef.h>
10467 #endif
3828bfac
AJ
10468 #include <nettle/curve25519.h>
10469 #ifndef NETTLE_CURVE25519_RFC7748
10470 # error "NETTLE_CURVE25519_RFC7748 is not set"
10471 #endif
460b89c1
AJ
10472
10473int
10474main ()
10475{
10476
3828bfac
AJ
10477 (void) nettle_curve25519_mul_g(NULL, NULL);
10478 (void) nettle_curve25519_mul(NULL, NULL, NULL);
460b89c1
AJ
10479
10480 ;
10481 return 0;
10482}
10483
10484_ACEOF
10485if ac_fn_c_try_link "$LINENO"; then :
10486
6df79d8f 10487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
460b89c1 10488$as_echo "yes" >&6; }
632c2921 10489
3828bfac 10490$as_echo "#define HAVE_LIBNETTLE_ECDH_X25519 1" >>confdefs.h
632c2921 10491
3828bfac
AJ
10492 FEATURE_SASL_ECDH_X25519_CHALLENGE="Yes"
10493 LIBNETTLE_USABLE="Yes"
a824f8db 10494
ed5bb1ac
AJ
10495else
10496
6df79d8f 10497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
ed5bb1ac
AJ
10498$as_echo "no" >&6; }
10499
10500fi
10501rm -f core conftest.err conftest.$ac_objext \
10502 conftest$ac_exeext conftest.$ac_ext
10503
460b89c1
AJ
10504fi
10505
3828bfac 10506 if test "${LIBNETTLE_USABLE}" = "Yes"; then :
bc2a87b4 10507
bc2a87b4 10508
3828bfac 10509$as_echo "#define HAVE_LIBNETTLE 1" >>confdefs.h
bc2a87b4 10510
3828bfac
AJ
10511 for ac_header in nettle/version.h
10512do :
10513 ac_fn_c_check_header_mongrel "$LINENO" "nettle/version.h" "ac_cv_header_nettle_version_h" "$ac_includes_default"
10514if test "x$ac_cv_header_nettle_version_h" = xyes; then :
10515 cat >>confdefs.h <<_ACEOF
10516#define HAVE_NETTLE_VERSION_H 1
ad5cc67e 10517_ACEOF
bc2a87b4
AJ
10518
10519fi
ed5bb1ac 10520
3828bfac 10521done
ad5cc67e 10522
ad5cc67e
AJ
10523
10524else
10525
3828bfac
AJ
10526 LIBNETTLE="No"
10527 if test "${with_nettle}" != "no" && test "${with_nettle}" != "auto"; then :
beb2b070 10528
6df79d8f 10529 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
c1395d64 10530$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3828bfac 10531as_fn_error $? "--with-nettle was given but GNU Nettle appears to be unusable
c1395d64 10532See \`config.log' for more details" "$LINENO" 5; }
bc2a87b4 10533
beb2b070 10534fi
bc2a87b4 10535
ad5cc67e 10536fi
3cfa8da2 10537
3828bfac 10538 if test "${LIBNETTLE}" = "No"; then :
ad5cc67e 10539
3828bfac
AJ
10540 LIBNETTLE_CFLAGS=""
10541 LIBNETTLE_LIBS=""
3cfa8da2 10542
bc2a87b4 10543fi
bc2a87b4 10544
2d0e0ee8
AJ
10545
10546
10547
fbced731
AJ
10548 CFLAGS="${CFLAGS_SAVED}"
10549 LIBS="${LIBS_SAVED}"
10550
90121a3e
AJ
10551 unset CFLAGS_SAVED
10552 unset LIBS_SAVED
10553
fbced731
AJ
10554
10555
10556 CFLAGS_SAVED="${CFLAGS}"
10557 LIBS_SAVED="${LIBS}"
10558
3828bfac 10559 LIBPASSWDQC="No"
fbced731 10560
3828bfac
AJ
10561 LIBPASSWDQC_CFLAGS=""
10562 LIBPASSWDQC_LIBS=""
fbced731
AJ
10563
10564
3828bfac
AJ
10565# Check whether --with-passwdqc was given.
10566if test "${with_passwdqc+set}" = set; then :
10567 withval=$with_passwdqc;
fbced731 10568else
3828bfac 10569 with_passwdqc="auto"
fbced731
AJ
10570fi
10571
10572
f54ed0d4
AJ
10573 case "x${with_passwdqc}" in #(
10574 xno) :
10575 ;; #(
10576 xyes) :
10577 ;; #(
10578 xauto) :
10579 ;; #(
10580 *) :
10581
10582 as_fn_error $? "invalid option for --with-passwdqc" "$LINENO" 5
10583 ;;
10584esac
fbced731 10585
3828bfac 10586 if test "${with_passwdqc}" != "no"; then :
fbced731
AJ
10587
10588 # If this library ever starts shipping a pkg-config file, change to PKG_CHECK_MODULES ?
3828bfac
AJ
10589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing passwdqc_check" >&5
10590$as_echo_n "checking for library containing passwdqc_check... " >&6; }
10591if ${ac_cv_search_passwdqc_check+:} false; then :
fbced731
AJ
10592 $as_echo_n "(cached) " >&6
10593else
10594 ac_func_search_save_LIBS=$LIBS
10595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10596/* end confdefs.h. */
10597
10598/* Override any GCC internal prototype to avoid an error.
10599 Use char because int might match the return type of a GCC
10600 builtin and then its argument prototype would still apply. */
10601#ifdef __cplusplus
10602extern "C"
10603#endif
3828bfac 10604char passwdqc_check ();
fbced731
AJ
10605int
10606main ()
10607{
3828bfac 10608return passwdqc_check ();
fbced731
AJ
10609 ;
10610 return 0;
10611}
10612_ACEOF
3828bfac 10613for ac_lib in '' passwdqc; do
fbced731
AJ
10614 if test -z "$ac_lib"; then
10615 ac_res="none required"
10616 else
10617 ac_res=-l$ac_lib
10618 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10619 fi
10620 if ac_fn_c_try_link "$LINENO"; then :
3828bfac 10621 ac_cv_search_passwdqc_check=$ac_res
fbced731
AJ
10622fi
10623rm -f core conftest.err conftest.$ac_objext \
10624 conftest$ac_exeext
3828bfac 10625 if ${ac_cv_search_passwdqc_check+:} false; then :
fbced731
AJ
10626 break
10627fi
10628done
3828bfac 10629if ${ac_cv_search_passwdqc_check+:} false; then :
fbced731
AJ
10630
10631else
3828bfac 10632 ac_cv_search_passwdqc_check=no
fbced731
AJ
10633fi
10634rm conftest.$ac_ext
10635LIBS=$ac_func_search_save_LIBS
10636fi
3828bfac
AJ
10637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_passwdqc_check" >&5
10638$as_echo "$ac_cv_search_passwdqc_check" >&6; }
10639ac_res=$ac_cv_search_passwdqc_check
fbced731
AJ
10640if test "$ac_res" != no; then :
10641 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10642
3828bfac
AJ
10643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libpasswdqc appears to be usable" >&5
10644$as_echo_n "checking if libpasswdqc appears to be usable... " >&6; }
fbced731
AJ
10645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10646/* end confdefs.h. */
10647
10648
10649 #ifdef HAVE_STDDEF_H
10650 # include <stddef.h>
10651 #endif
3828bfac 10652 #include <passwdqc.h>
fbced731
AJ
10653
10654int
10655main ()
10656{
10657
3828bfac
AJ
10658 passwdqc_params_qc_t qc_config = {
10659 .min = { 0, 0, 0, 0, 0 },
10660 .max = 0,
10661 .passphrase_words = 0,
10662 .match_length = 0,
10663 };
10664 (void) passwdqc_check(NULL, NULL, NULL, NULL);
fbced731
AJ
10665
10666 ;
10667 return 0;
10668}
10669
10670_ACEOF
3828bfac 10671if ac_fn_c_try_compile "$LINENO"; then :
fbced731
AJ
10672
10673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10674$as_echo "yes" >&6; }
3828bfac 10675 LIBPASSWDQC="Yes"
fbced731 10676
3828bfac 10677$as_echo "#define HAVE_LIBPASSWDQC 1" >>confdefs.h
fbced731 10678
fbced731 10679
3828bfac 10680$as_echo "#define HAVE_ANY_PASSWORD_QUALITY_LIBRARY 1" >>confdefs.h
fbced731 10681
3828bfac
AJ
10682 if test "x${ac_cv_search_passwdqc_check}" != "xnone required"; then :
10683
10684 LIBPASSWDQC_LIBS="${ac_cv_search_passwdqc_check}"
fbced731
AJ
10685
10686fi
fbced731
AJ
10687
10688else
10689
3828bfac
AJ
10690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10691$as_echo "no" >&6; }
10692 LIBPASSWDQC="No"
10693 if test "${with_passwdqc}" = "yes"; then :
fbced731 10694
3828bfac
AJ
10695 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10697as_fn_error $? "--with-passwdqc was given but libpasswdqc appears to be unusable
10698See \`config.log' for more details" "$LINENO" 5; }
fbced731
AJ
10699
10700fi
10701
fbced731 10702fi
3828bfac 10703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fbced731
AJ
10704
10705else
10706
3828bfac
AJ
10707 LIBPASSWDQC="No"
10708 if test "${with_passwdqc}" = "yes"; then :
fbced731 10709
3828bfac 10710 as_fn_error $? "--with-passwdqc was given but libpasswdqc could not be found" "$LINENO" 5
fbced731
AJ
10711
10712fi
10713
fbced731
AJ
10714fi
10715
fbced731 10716
3828bfac 10717else
fbced731 10718
3828bfac 10719 LIBPASSWDQC="No"
fbced731
AJ
10720
10721fi
10722
3828bfac 10723 if test "${LIBPASSWDQC}" = "No"; then :
fbced731 10724
3828bfac
AJ
10725 LIBPASSWDQC_CFLAGS=""
10726 LIBPASSWDQC_LIBS=""
fbced731
AJ
10727
10728fi
10729
10730
10731
10732
8f1afa5d
AJ
10733 CFLAGS="${CFLAGS_SAVED}"
10734 LIBS="${LIBS_SAVED}"
10735
90121a3e
AJ
10736 unset CFLAGS_SAVED
10737 unset LIBS_SAVED
10738
8f1afa5d 10739
c523bb43 10740
8f1afa5d
AJ
10741 CFLAGS_SAVED="${CFLAGS}"
10742 LIBS_SAVED="${LIBS}"
bc2a87b4 10743
3828bfac
AJ
10744 LIBPCRE="No"
10745 LIBPCRE_PATH=""
79073a80 10746
bc2a87b4 10747
3828bfac
AJ
10748# Check whether --with-pcre was given.
10749if test "${with_pcre+set}" = set; then :
10750 withval=$with_pcre;
752694a2 10751else
3828bfac 10752 with_pcre="auto"
c523bb43 10753fi
bc2a87b4 10754
bc2a87b4 10755
f54ed0d4
AJ
10756 case "x${with_pcre}" in #(
10757 xno) :
10758 ;; #(
10759 xyes) :
10760 ;; #(
10761 xauto) :
10762 ;; #(
10763 x/*) :
10764
10765 LIBPCRE_PATH="${with_pcre}"
10766 with_pcre="yes"
10767 ;; #(
10768 *) :
10769
10770 as_fn_error $? "invalid option for --with-pcre" "$LINENO" 5
10771 ;;
10772esac
bc2a87b4 10773
3828bfac 10774 if test "${with_pcre}" != "no"; then :
65863905 10775
3828bfac 10776 if test -n "${LIBPCRE_PATH}"; then :
5a3259b2 10777
016d2768 10778 # Allow for user to provide custom installation directory
3828bfac 10779 if test -d "${LIBPCRE_PATH}/include" -a -d "${LIBPCRE_PATH}/lib"; then :
5a3259b2 10780
3828bfac
AJ
10781 LIBPCRE_CFLAGS="-I${LIBPCRE_PATH}/include"
10782 LIBPCRE_LIBS="-L${LIBPCRE_PATH}/lib -lpcre"
5a3259b2
AJ
10783
10784else
10785
3828bfac 10786 as_fn_error $? "${LIBPCRE_PATH} is not a suitable directory for libpcre" "$LINENO" 5
5a3259b2
AJ
10787
10788fi
10789
10790elif test -n "${PKG_CONFIG}"; then :
10791
016d2768 10792 # Allow for the user to "override" pkg-config without it being installed
ad5cc67e
AJ
10793
10794pkg_failed=no
3828bfac
AJ
10795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBPCRE" >&5
10796$as_echo_n "checking for LIBPCRE... " >&6; }
ad5cc67e 10797
3828bfac
AJ
10798if test -n "$LIBPCRE_CFLAGS"; then
10799 pkg_cv_LIBPCRE_CFLAGS="$LIBPCRE_CFLAGS"
ad5cc67e
AJ
10800 elif test -n "$PKG_CONFIG"; then
10801 if test -n "$PKG_CONFIG" && \
3828bfac
AJ
10802 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre\""; } >&5
10803 ($PKG_CONFIG --exists --print-errors "libpcre") 2>&5
ad5cc67e
AJ
10804 ac_status=$?
10805 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10806 test $ac_status = 0; }; then
3828bfac 10807 pkg_cv_LIBPCRE_CFLAGS=`$PKG_CONFIG --cflags "libpcre" 2>/dev/null`
ad5cc67e
AJ
10808 test "x$?" != "x0" && pkg_failed=yes
10809else
10810 pkg_failed=yes
10811fi
10812 else
10813 pkg_failed=untried
10814fi
3828bfac
AJ
10815if test -n "$LIBPCRE_LIBS"; then
10816 pkg_cv_LIBPCRE_LIBS="$LIBPCRE_LIBS"
ad5cc67e
AJ
10817 elif test -n "$PKG_CONFIG"; then
10818 if test -n "$PKG_CONFIG" && \
3828bfac
AJ
10819 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre\""; } >&5
10820 ($PKG_CONFIG --exists --print-errors "libpcre") 2>&5
ad5cc67e
AJ
10821 ac_status=$?
10822 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10823 test $ac_status = 0; }; then
3828bfac 10824 pkg_cv_LIBPCRE_LIBS=`$PKG_CONFIG --libs "libpcre" 2>/dev/null`
ad5cc67e
AJ
10825 test "x$?" != "x0" && pkg_failed=yes
10826else
10827 pkg_failed=yes
10828fi
10829 else
10830 pkg_failed=untried
10831fi
10832
10833
10834
10835if test $pkg_failed = yes; then
10836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10837$as_echo "no" >&6; }
10838
10839if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
10840 _pkg_short_errors_supported=yes
10841else
10842 _pkg_short_errors_supported=no
10843fi
10844 if test $_pkg_short_errors_supported = yes; then
3828bfac 10845 LIBPCRE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpcre" 2>&1`
ad5cc67e 10846 else
3828bfac 10847 LIBPCRE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpcre" 2>&1`
ad5cc67e
AJ
10848 fi
10849 # Put the nasty error message in config.log where it belongs
3828bfac 10850 echo "$LIBPCRE_PKG_ERRORS" >&5
ad5cc67e 10851
cbd32d76 10852 LIBPCRE="No"
ad5cc67e
AJ
10853elif test $pkg_failed = untried; then
10854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10855$as_echo "no" >&6; }
cbd32d76 10856 LIBPCRE="No"
3828bfac
AJ
10857else
10858 LIBPCRE_CFLAGS=$pkg_cv_LIBPCRE_CFLAGS
10859 LIBPCRE_LIBS=$pkg_cv_LIBPCRE_LIBS
10860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10861$as_echo "yes" >&6; }
10862
a26547c7 10863fi
3828bfac 10864
752694a2 10865fi
3828bfac
AJ
10866 if test -n "${LIBPCRE_CFLAGS+set}" -a -n "${LIBPCRE_LIBS+set}"; then :
10867
10868 # Only proceed with library tests if custom paths were given or pkg-config succeeded
10869 LIBPCRE="Yes"
a26547c7 10870
752694a2 10871else
3828bfac
AJ
10872
10873 LIBPCRE="No"
10874 if test "${with_pcre}" != "no" && test "${with_pcre}" != "auto"; then :
10875
10876 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10877$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10878as_fn_error $? "--with-pcre was given but libpcre could not be found
10879See \`config.log' for more details" "$LINENO" 5; }
10880
79073a80 10881fi
3828bfac 10882
79073a80 10883fi
a26547c7 10884
3828bfac
AJ
10885fi
10886
10887 if test "${LIBPCRE}" = "Yes"; then :
10888
10889 CFLAGS="${LIBPCRE_CFLAGS} ${CFLAGS}"
10890 LIBS="${LIBPCRE_LIBS} ${LIBS}"
10891
10892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libpcre appears to be usable" >&5
10893$as_echo_n "checking if libpcre appears to be usable... " >&6; }
10894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f5cee21f 10895/* end confdefs.h. */
79399a90 10896
79399a90 10897
3828bfac
AJ
10898 #ifdef HAVE_STDDEF_H
10899 # include <stddef.h>
10900 #endif
10901 #include <pcre.h>
a26547c7 10902
a26547c7
AJ
10903int
10904main ()
10905{
f5cee21f 10906
3828bfac
AJ
10907 (void) pcre_compile(NULL, 0, NULL, NULL, NULL);
10908 (void) pcre_exec(NULL, NULL, NULL, 0, 0, 0, NULL, 0);
10909 (void) pcre_free(NULL);
f5cee21f 10910
a26547c7
AJ
10911 ;
10912 return 0;
10913}
f5cee21f 10914
a26547c7 10915_ACEOF
3828bfac 10916if ac_fn_c_try_link "$LINENO"; then :
f5cee21f 10917
3828bfac 10918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
f5cee21f 10919$as_echo "yes" >&6; }
3828bfac 10920 LIBPCRE="Yes"
f5cee21f 10921
3828bfac 10922$as_echo "#define HAVE_LIBPCRE 1" >>confdefs.h
f5cee21f 10923
752694a2 10924
79073a80 10925else
752694a2 10926
3828bfac 10927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
f5cee21f 10928$as_echo "no" >&6; }
3828bfac
AJ
10929 LIBPCRE="No"
10930 if test "${with_pcre}" != "no" && test "${with_pcre}" != "auto"; then :
752694a2 10931
3828bfac 10932 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
c1395d64 10933$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3828bfac 10934as_fn_error $? "--with-pcre was given but libpcre does not appear to be usable
c1395d64 10935See \`config.log' for more details" "$LINENO" 5; }
752694a2 10936
79073a80 10937fi
752694a2 10938
79073a80 10939fi
3828bfac
AJ
10940rm -f core conftest.err conftest.$ac_objext \
10941 conftest$ac_exeext conftest.$ac_ext
460b89c1 10942
752694a2
AJ
10943fi
10944
3828bfac 10945 if test "${LIBPCRE}" = "No"; then :
8f1afa5d 10946
3828bfac
AJ
10947 LIBPCRE_CFLAGS=""
10948 LIBPCRE_LIBS=""
8f1afa5d
AJ
10949
10950fi
10951
10952
10953
10954
6df79d8f
AJ
10955 CFLAGS="${CFLAGS_SAVED}"
10956 LIBS="${LIBS_SAVED}"
f5cee21f 10957
90121a3e
AJ
10958 unset CFLAGS_SAVED
10959 unset LIBS_SAVED
10960
752694a2
AJ
10961
10962
8f1afa5d
AJ
10963 CFLAGS_SAVED="${CFLAGS}"
10964 LIBS_SAVED="${LIBS}"
10965
3828bfac
AJ
10966 LIBQRENCODE="No"
10967 LIBQRENCODE_PATH=""
8f1afa5d 10968
752694a2 10969
3828bfac
AJ
10970# Check whether --with-qrencode was given.
10971if test "${with_qrencode+set}" = set; then :
10972 withval=$with_qrencode;
752694a2 10973else
3828bfac 10974 with_qrencode="auto"
752694a2
AJ
10975fi
10976
10977
f54ed0d4
AJ
10978 case "x${with_qrencode}" in #(
10979 xno) :
10980 ;; #(
10981 xyes) :
10982 ;; #(
10983 xauto) :
10984 ;; #(
10985 x/*) :
10986
10987 LIBQRENCODE_PATH="${with_qrencode}"
10988 with_qrencode="yes"
10989 ;; #(
10990 *) :
10991
10992 as_fn_error $? "invalid option for --with-qrencode" "$LINENO" 5
10993 ;;
10994esac
752694a2 10995
3828bfac 10996 if test "${with_qrencode}" != "no"; then :
c523bb43 10997
3828bfac 10998 if test -n "${LIBQRENCODE_PATH}"; then :
c523bb43 10999
3828bfac
AJ
11000 # Allow for user to provide custom installation directory
11001 if test -d "${LIBQRENCODE_PATH}/include" -a -d "${LIBQRENCODE_PATH}/lib"; then :
17a495ff 11002
3828bfac
AJ
11003 LIBQRENCODE_CFLAGS="-I${LIBQRENCODE_PATH}/include"
11004 LIBQRENCODE_LIBS="-L${LIBQRENCODE_PATH}/lib -lqrencode"
17a495ff 11005
3828bfac 11006else
17a495ff 11007
3828bfac 11008 as_fn_error $? "${LIBQRENCODE_PATH} is not a suitable directory for libqrencode" "$LINENO" 5
c523bb43 11009
17a495ff 11010fi
c523bb43 11011
3828bfac 11012elif test -n "${PKG_CONFIG}"; then :
c523bb43 11013
3828bfac 11014 # Allow for the user to "override" pkg-config without it being installed
460b89c1 11015
3828bfac
AJ
11016pkg_failed=no
11017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBQRENCODE" >&5
11018$as_echo_n "checking for LIBQRENCODE... " >&6; }
460b89c1 11019
3828bfac
AJ
11020if test -n "$LIBQRENCODE_CFLAGS"; then
11021 pkg_cv_LIBQRENCODE_CFLAGS="$LIBQRENCODE_CFLAGS"
11022 elif test -n "$PKG_CONFIG"; then
11023 if test -n "$PKG_CONFIG" && \
11024 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libqrencode\""; } >&5
11025 ($PKG_CONFIG --exists --print-errors "libqrencode") 2>&5
11026 ac_status=$?
11027 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11028 test $ac_status = 0; }; then
11029 pkg_cv_LIBQRENCODE_CFLAGS=`$PKG_CONFIG --cflags "libqrencode" 2>/dev/null`
11030 test "x$?" != "x0" && pkg_failed=yes
11031else
11032 pkg_failed=yes
11033fi
11034 else
11035 pkg_failed=untried
11036fi
11037if test -n "$LIBQRENCODE_LIBS"; then
11038 pkg_cv_LIBQRENCODE_LIBS="$LIBQRENCODE_LIBS"
11039 elif test -n "$PKG_CONFIG"; then
11040 if test -n "$PKG_CONFIG" && \
11041 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libqrencode\""; } >&5
11042 ($PKG_CONFIG --exists --print-errors "libqrencode") 2>&5
11043 ac_status=$?
11044 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11045 test $ac_status = 0; }; then
11046 pkg_cv_LIBQRENCODE_LIBS=`$PKG_CONFIG --libs "libqrencode" 2>/dev/null`
11047 test "x$?" != "x0" && pkg_failed=yes
11048else
11049 pkg_failed=yes
11050fi
11051 else
11052 pkg_failed=untried
17a495ff
AJ
11053fi
11054
17a495ff 11055
79399a90 11056
3828bfac
AJ
11057if test $pkg_failed = yes; then
11058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11059$as_echo "no" >&6; }
79399a90 11060
3828bfac
AJ
11061if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
11062 _pkg_short_errors_supported=yes
11063else
11064 _pkg_short_errors_supported=no
11065fi
11066 if test $_pkg_short_errors_supported = yes; then
11067 LIBQRENCODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libqrencode" 2>&1`
11068 else
11069 LIBQRENCODE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libqrencode" 2>&1`
11070 fi
11071 # Put the nasty error message in config.log where it belongs
11072 echo "$LIBQRENCODE_PKG_ERRORS" >&5
c523bb43 11073
cbd32d76 11074 LIBQRENCODE="No"
3828bfac
AJ
11075elif test $pkg_failed = untried; then
11076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11077$as_echo "no" >&6; }
cbd32d76 11078 LIBQRENCODE="No"
460b89c1 11079else
3828bfac
AJ
11080 LIBQRENCODE_CFLAGS=$pkg_cv_LIBQRENCODE_CFLAGS
11081 LIBQRENCODE_LIBS=$pkg_cv_LIBQRENCODE_LIBS
11082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11083$as_echo "yes" >&6; }
2dd84386
AJ
11084
11085fi
11086
3828bfac
AJ
11087fi
11088 if test -n "${LIBQRENCODE_CFLAGS+set}" -a -n "${LIBQRENCODE_LIBS+set}"; then :
2dd84386 11089
3828bfac
AJ
11090 # Only proceed with library tests if custom paths were given or pkg-config succeeded
11091 LIBQRENCODE="Yes"
c523bb43 11092
3828bfac 11093else
2dd84386 11094
3828bfac
AJ
11095 LIBQRENCODE="No"
11096 if test "${with_qrencode}" != "no" && test "${with_qrencode}" != "auto"; then :
2dd84386 11097
3828bfac
AJ
11098 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11099$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11100as_fn_error $? "--with-qrencode was given but libqrencode could not be found
11101See \`config.log' for more details" "$LINENO" 5; }
2dd84386 11102
3828bfac 11103fi
2dd84386 11104
3828bfac 11105fi
2dd84386 11106
67881d19 11107fi
67881d19 11108
3828bfac 11109 if test "${LIBQRENCODE}" = "Yes"; then :
67881d19 11110
3828bfac
AJ
11111 CFLAGS="${LIBQRENCODE_CFLAGS} ${CFLAGS}"
11112 LIBS="${LIBQRENCODE_LIBS} ${LIBS}"
67881d19 11113
3828bfac
AJ
11114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libqrencode appears to be usable" >&5
11115$as_echo_n "checking if libqrencode appears to be usable... " >&6; }
11116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11117/* end confdefs.h. */
11118
11119
11120 #ifdef HAVE_STDDEF_H
11121 # include <stddef.h>
6df79d8f 11122 #endif
3828bfac 11123 #include <qrencode.h>
67881d19
AJ
11124
11125int
11126main ()
11127{
11128
3828bfac
AJ
11129 (void) QRcode_encodeData(0, NULL, 0, (QRecLevel) 0);
11130 (void) QRcode_free(NULL);
67881d19
AJ
11131
11132 ;
11133 return 0;
11134}
11135
11136_ACEOF
11137if ac_fn_c_try_link "$LINENO"; then :
11138
6df79d8f 11139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67881d19 11140$as_echo "yes" >&6; }
3828bfac 11141 LIBQRENCODE="Yes"
67881d19 11142
3828bfac 11143$as_echo "#define HAVE_LIBQRENCODE 1" >>confdefs.h
460b89c1 11144
460b89c1
AJ
11145
11146
3828bfac 11147 QRCODE_COND_C="qrcode.c"
460b89c1 11148
460b89c1 11149
460b89c1 11150
17a495ff 11151else
79399a90 11152
3828bfac
AJ
11153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11154$as_echo "no" >&6; }
11155 LIBQRENCODE="No"
11156 if test "${with_qrencode}" != "no" && test "${with_qrencode}" != "auto"; then :
79399a90 11157
3828bfac 11158 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
c1395d64 11159$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3828bfac 11160as_fn_error $? "--with-qrencode was given but libqrencode does not appear to be usable
c1395d64 11161See \`config.log' for more details" "$LINENO" 5; }
79399a90 11162
a26547c7
AJ
11163fi
11164
3828bfac
AJ
11165fi
11166rm -f core conftest.err conftest.$ac_objext \
11167 conftest$ac_exeext conftest.$ac_ext
11168
c523bb43 11169fi
a26547c7 11170
3828bfac 11171 if test "${LIBQRENCODE}" = "No"; then :
8f1afa5d 11172
3828bfac
AJ
11173 LIBQRENCODE_CFLAGS=""
11174 LIBQRENCODE_LIBS=""
8f1afa5d
AJ
11175
11176fi
11177
11178
11179
11180
6df79d8f
AJ
11181 CFLAGS="${CFLAGS_SAVED}"
11182 LIBS="${LIBS_SAVED}"
17a495ff 11183
90121a3e
AJ
11184 unset CFLAGS_SAVED
11185 unset LIBS_SAVED
11186
a26547c7
AJ
11187
11188
8f1afa5d
AJ
11189 CFLAGS_SAVED="${CFLAGS}"
11190 LIBS_SAVED="${LIBS}"
11191
3828bfac
AJ
11192 LIBSODIUM="No"
11193 LIBSODIUM_PATH=""
11194 LIBSODIUM_USABLE="No"
3828bfac
AJ
11195 LIBSODIUM_RANDOM="No"
11196 LIBSODIUM_SCRYPT="No"
a26547c7 11197
5e9645fe 11198
3828bfac
AJ
11199# Check whether --with-sodium was given.
11200if test "${with_sodium+set}" = set; then :
11201 withval=$with_sodium;
5e9645fe 11202else
3828bfac 11203 with_sodium="auto"
5e9645fe
AJ
11204fi
11205
11206
f54ed0d4
AJ
11207 case "x${with_sodium}" in #(
11208 xno) :
11209 ;; #(
11210 xyes) :
11211 ;; #(
11212 xauto) :
11213 ;; #(
11214 x/*) :
11215
11216 LIBSODIUM_PATH="${with_sodium}"
11217 with_sodium="yes"
11218 ;; #(
11219 *) :
11220
11221 as_fn_error $? "invalid option for --with-sodium" "$LINENO" 5
11222 ;;
11223esac
5e9645fe 11224
3828bfac 11225 if test "${with_sodium}" != "no"; then :
5e9645fe 11226
3828bfac 11227 if test -n "${LIBSODIUM_PATH}"; then :
5a3259b2 11228
016d2768 11229 # Allow for user to provide custom installation directory
3828bfac 11230 if test -d "${LIBSODIUM_PATH}/include" -a -d "${LIBSODIUM_PATH}/lib"; then :
5a3259b2 11231
3828bfac
AJ
11232 LIBSODIUM_CFLAGS="-I${LIBSODIUM_PATH}/include"
11233 LIBSODIUM_LIBS="-L${LIBSODIUM_PATH}/lib -lsodium"
5a3259b2
AJ
11234
11235else
11236
3828bfac 11237 as_fn_error $? "${LIBSODIUM_PATH} is not a suitable directory for libsodium" "$LINENO" 5
5a3259b2
AJ
11238
11239fi
11240
11241elif test -n "${PKG_CONFIG}"; then :
11242
016d2768 11243 # Allow for the user to "override" pkg-config without it being installed
5e9645fe 11244
8a2ebdd4 11245pkg_failed=no
3828bfac
AJ
11246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBSODIUM" >&5
11247$as_echo_n "checking for LIBSODIUM... " >&6; }
8a2ebdd4 11248
3828bfac
AJ
11249if test -n "$LIBSODIUM_CFLAGS"; then
11250 pkg_cv_LIBSODIUM_CFLAGS="$LIBSODIUM_CFLAGS"
8a2ebdd4
AJ
11251 elif test -n "$PKG_CONFIG"; then
11252 if test -n "$PKG_CONFIG" && \
3828bfac
AJ
11253 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsodium\""; } >&5
11254 ($PKG_CONFIG --exists --print-errors "libsodium") 2>&5
8a2ebdd4
AJ
11255 ac_status=$?
11256 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11257 test $ac_status = 0; }; then
3828bfac 11258 pkg_cv_LIBSODIUM_CFLAGS=`$PKG_CONFIG --cflags "libsodium" 2>/dev/null`
8a2ebdd4
AJ
11259 test "x$?" != "x0" && pkg_failed=yes
11260else
11261 pkg_failed=yes
5e9645fe 11262fi
8a2ebdd4
AJ
11263 else
11264 pkg_failed=untried
11265fi
3828bfac
AJ
11266if test -n "$LIBSODIUM_LIBS"; then
11267 pkg_cv_LIBSODIUM_LIBS="$LIBSODIUM_LIBS"
8a2ebdd4
AJ
11268 elif test -n "$PKG_CONFIG"; then
11269 if test -n "$PKG_CONFIG" && \
3828bfac
AJ
11270 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsodium\""; } >&5
11271 ($PKG_CONFIG --exists --print-errors "libsodium") 2>&5
8a2ebdd4
AJ
11272 ac_status=$?
11273 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11274 test $ac_status = 0; }; then
3828bfac 11275 pkg_cv_LIBSODIUM_LIBS=`$PKG_CONFIG --libs "libsodium" 2>/dev/null`
8a2ebdd4
AJ
11276 test "x$?" != "x0" && pkg_failed=yes
11277else
11278 pkg_failed=yes
11279fi
11280 else
11281 pkg_failed=untried
5e9645fe 11282fi
5e9645fe 11283
8a2ebdd4
AJ
11284
11285
11286if test $pkg_failed = yes; then
11287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11288$as_echo "no" >&6; }
11289
11290if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
11291 _pkg_short_errors_supported=yes
5e9645fe 11292else
8a2ebdd4 11293 _pkg_short_errors_supported=no
5e9645fe 11294fi
8a2ebdd4 11295 if test $_pkg_short_errors_supported = yes; then
3828bfac 11296 LIBSODIUM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsodium" 2>&1`
8a2ebdd4 11297 else
3828bfac 11298 LIBSODIUM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsodium" 2>&1`
8a2ebdd4
AJ
11299 fi
11300 # Put the nasty error message in config.log where it belongs
3828bfac 11301 echo "$LIBSODIUM_PKG_ERRORS" >&5
8a2ebdd4 11302
cbd32d76 11303 LIBSODIUM="No"
8a2ebdd4
AJ
11304elif test $pkg_failed = untried; then
11305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11306$as_echo "no" >&6; }
cbd32d76 11307 LIBSODIUM="No"
8a2ebdd4 11308else
3828bfac
AJ
11309 LIBSODIUM_CFLAGS=$pkg_cv_LIBSODIUM_CFLAGS
11310 LIBSODIUM_LIBS=$pkg_cv_LIBSODIUM_LIBS
8a2ebdd4
AJ
11311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11312$as_echo "yes" >&6; }
11313
5a3259b2 11314fi
5e9645fe 11315
c523bb43 11316fi
3828bfac 11317 if test -n "${LIBSODIUM_CFLAGS+set}" -a -n "${LIBSODIUM_LIBS+set}"; then :
5a3259b2 11318
016d2768 11319 # Only proceed with library tests if custom paths were given or pkg-config succeeded
3828bfac 11320 LIBSODIUM="Yes"
5e9645fe 11321
5e9645fe
AJ
11322else
11323
3828bfac
AJ
11324 LIBSODIUM="No"
11325 if test "${with_sodium}" != "no" && test "${with_sodium}" != "auto"; then :
5a3259b2 11326
6df79d8f 11327 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5a3259b2 11328$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3828bfac 11329as_fn_error $? "--with-sodium was given but libsodium could not be found
5a3259b2
AJ
11330See \`config.log' for more details" "$LINENO" 5; }
11331
11332fi
11333
11334fi
5e9645fe 11335
3acbcefb
AJ
11336fi
11337
3828bfac 11338 if test "${LIBSODIUM}" = "Yes"; then :
5ae54cb1 11339
3828bfac
AJ
11340 CFLAGS="${LIBSODIUM_CFLAGS} ${CFLAGS}"
11341 LIBS="${LIBSODIUM_LIBS} ${LIBS}"
11342
11343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libsodium appears to be usable" >&5
11344$as_echo_n "checking if libsodium appears to be usable... " >&6; }
11345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11346/* end confdefs.h. */
11347
11348
11349 #include <sodium/core.h>
11350 #include <sodium/utils.h>
11351 #include <sodium/version.h>
11352
11353int
11354main ()
11355{
11356
11357 (void) sodium_init();
11358
11359 ;
11360 return 0;
11361}
11362
11363_ACEOF
11364if ac_fn_c_try_link "$LINENO"; then :
11365
11366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11367$as_echo "yes" >&6; }
11368 LIBSODIUM="Yes"
11369
11370else
11371
11372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11373$as_echo "no" >&6; }
11374 LIBSODIUM="No"
11375 if test "${with_sodium}" != "no" && test "${with_sodium}" != "auto"; then :
11376
11377 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11378$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11379as_fn_error $? "--with-sodium was given but libsodium appears to be unusable
11380See \`config.log' for more details" "$LINENO" 5; }
11381
11382fi
11383
11384fi
11385rm -f core conftest.err conftest.$ac_objext \
11386 conftest$ac_exeext conftest.$ac_ext
11387
11388fi
11389
11390 if test "${LIBSODIUM}" = "Yes"; then :
11391
11392
3828bfac
AJ
11393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libsodium has a usable constant-time memory comparison function" >&5
11394$as_echo_n "checking if libsodium has a usable constant-time memory comparison function... " >&6; }
6df79d8f 11395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
475a05fd
AJ
11396/* end confdefs.h. */
11397
11398
6df79d8f
AJ
11399 #ifdef HAVE_STDDEF_H
11400 # include <stddef.h>
11401 #endif
3828bfac
AJ
11402 #include <sodium/core.h>
11403 #include <sodium/utils.h>
475a05fd
AJ
11404
11405int
11406main ()
11407{
11408
3828bfac 11409 (void) sodium_memcmp(NULL, NULL, 0);
475a05fd
AJ
11410
11411 ;
11412 return 0;
11413}
11414
11415_ACEOF
11416if ac_fn_c_try_link "$LINENO"; then :
11417
6df79d8f 11418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
475a05fd 11419$as_echo "yes" >&6; }
632c2921 11420
3828bfac 11421$as_echo "#define HAVE_LIBSODIUM_MEMCMP 1" >>confdefs.h
632c2921 11422
3828bfac 11423 LIBSODIUM_USABLE="Yes"
475a05fd
AJ
11424
11425else
11426
6df79d8f 11427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
475a05fd
AJ
11428$as_echo "no" >&6; }
11429
67881d19
AJ
11430fi
11431rm -f core conftest.err conftest.$ac_objext \
11432 conftest$ac_exeext conftest.$ac_ext
11433
3828bfac
AJ
11434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libsodium has a usable memory zeroing function" >&5
11435$as_echo_n "checking if libsodium has a usable memory zeroing function... " >&6; }
6df79d8f 11436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67881d19
AJ
11437/* end confdefs.h. */
11438
11439
6df79d8f
AJ
11440 #ifdef HAVE_STDDEF_H
11441 # include <stddef.h>
11442 #endif
3828bfac
AJ
11443 #include <sodium/core.h>
11444 #include <sodium/utils.h>
67881d19
AJ
11445
11446int
11447main ()
11448{
11449
3828bfac 11450 (void) sodium_memzero(NULL, 0);
67881d19
AJ
11451
11452 ;
11453 return 0;
11454}
11455
11456_ACEOF
11457if ac_fn_c_try_link "$LINENO"; then :
11458
6df79d8f 11459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67881d19
AJ
11460$as_echo "yes" >&6; }
11461
3828bfac 11462$as_echo "#define HAVE_LIBSODIUM_MEMZERO 1" >>confdefs.h
67881d19 11463
3828bfac 11464 LIBSODIUM_USABLE="Yes"
67881d19
AJ
11465
11466else
11467
6df79d8f 11468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67881d19
AJ
11469$as_echo "no" >&6; }
11470
460b89c1
AJ
11471fi
11472rm -f core conftest.err conftest.$ac_objext \
11473 conftest$ac_exeext conftest.$ac_ext
11474
3828bfac
AJ
11475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libsodium has a usable random number generator" >&5
11476$as_echo_n "checking if libsodium has a usable random number generator... " >&6; }
11477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11478/* end confdefs.h. */
475a05fd
AJ
11479
11480
3828bfac
AJ
11481 #ifdef HAVE_STDDEF_H
11482 # include <stddef.h>
11483 #endif
11484 #include <sodium/core.h>
11485 #include <sodium/utils.h>
11486 #include <sodium/randombytes.h>
475a05fd 11487
3828bfac
AJ
11488int
11489main ()
11490{
475a05fd 11491
3828bfac
AJ
11492 (void) randombytes_random();
11493 (void) randombytes_uniform(0);
11494 (void) randombytes_buf(NULL, 0);
460b89c1 11495
3828bfac
AJ
11496 ;
11497 return 0;
11498}
460b89c1 11499
3828bfac
AJ
11500_ACEOF
11501if ac_fn_c_try_link "$LINENO"; then :
460b89c1 11502
3828bfac
AJ
11503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11504$as_echo "yes" >&6; }
11505 LIBSODIUM_USABLE="Yes"
11506 LIBSODIUM_RANDOM="Yes"
5e9645fe 11507
5ae54cb1
AJ
11508else
11509
3828bfac
AJ
11510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11511$as_echo "no" >&6; }
3cfa8da2 11512
5ae54cb1 11513fi
3828bfac
AJ
11514rm -f core conftest.err conftest.$ac_objext \
11515 conftest$ac_exeext conftest.$ac_ext
5ae54cb1 11516
3828bfac
AJ
11517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libsodium has a usable scrypt password hash generator" >&5
11518$as_echo_n "checking if libsodium has a usable scrypt password hash generator... " >&6; }
11519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11520/* end confdefs.h. */
2d0e0ee8
AJ
11521
11522
3828bfac
AJ
11523 #ifdef HAVE_STDDEF_H
11524 # include <stddef.h>
11525 #endif
11526 #include <sodium/crypto_pwhash_scryptsalsa208sha256.h>
2d0e0ee8 11527
3828bfac
AJ
11528int
11529main ()
11530{
8f1afa5d 11531
3828bfac
AJ
11532 (void) crypto_pwhash_scryptsalsa208sha256_str_needs_rehash(NULL, 0, 0);
11533 (void) crypto_pwhash_scryptsalsa208sha256_str_verify(NULL, NULL, 0);
11534 (void) crypto_pwhash_scryptsalsa208sha256_str(NULL, NULL, 0, 0, 0);
8f1afa5d 11535
3828bfac
AJ
11536 ;
11537 return 0;
11538}
bc2a87b4 11539
3828bfac
AJ
11540_ACEOF
11541if ac_fn_c_try_link "$LINENO"; then :
65863905 11542
3828bfac
AJ
11543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11544$as_echo "yes" >&6; }
8f1afa5d 11545
3828bfac 11546$as_echo "#define HAVE_LIBSODIUM_SCRYPT 1" >>confdefs.h
583552e5 11547
3828bfac
AJ
11548 LIBSODIUM_USABLE="Yes"
11549 LIBSODIUM_SCRYPT="Yes"
583552e5 11550
583552e5 11551else
583552e5 11552
3828bfac
AJ
11553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11554$as_echo "no" >&6; }
583552e5 11555
583552e5
AJ
11556fi
11557rm -f core conftest.err conftest.$ac_objext \
3828bfac 11558 conftest$ac_exeext conftest.$ac_ext
583552e5 11559
3828bfac
AJ
11560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libsodium can provide SASL ECDH-X25519-CHALLENGE" >&5
11561$as_echo_n "checking if libsodium can provide SASL ECDH-X25519-CHALLENGE... " >&6; }
11562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
583552e5
AJ
11563/* end confdefs.h. */
11564
11565
3828bfac
AJ
11566 #ifdef HAVE_STDDEF_H
11567 # include <stddef.h>
11568 #endif
11569 #include <sodium/crypto_scalarmult_curve25519.h>
583552e5
AJ
11570
11571int
11572main ()
11573{
11574
3828bfac
AJ
11575 (void) crypto_scalarmult_curve25519_base(NULL, NULL);
11576 (void) crypto_scalarmult_curve25519(NULL, NULL, NULL);
583552e5
AJ
11577
11578 ;
11579 return 0;
11580}
11581
11582_ACEOF
3828bfac 11583if ac_fn_c_try_link "$LINENO"; then :
583552e5 11584
3828bfac 11585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
583552e5 11586$as_echo "yes" >&6; }
583552e5 11587
3828bfac 11588$as_echo "#define HAVE_LIBSODIUM_ECDH_X25519 1" >>confdefs.h
583552e5 11589
3828bfac
AJ
11590 FEATURE_SASL_ECDH_X25519_CHALLENGE="Yes"
11591 LIBSODIUM_USABLE="Yes"
583552e5 11592
3828bfac 11593else
583552e5 11594
3828bfac
AJ
11595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11596$as_echo "no" >&6; }
583552e5 11597
460b89c1 11598fi
3828bfac
AJ
11599rm -f core conftest.err conftest.$ac_objext \
11600 conftest$ac_exeext conftest.$ac_ext
583552e5 11601
3828bfac 11602fi
583552e5 11603
3828bfac 11604 if test "${LIBSODIUM_USABLE}" = "Yes"; then :
583552e5 11605
583552e5 11606
3828bfac 11607$as_echo "#define HAVE_LIBSODIUM 1" >>confdefs.h
583552e5 11608
583552e5 11609
583552e5
AJ
11610else
11611
3828bfac
AJ
11612 LIBSODIUM="No"
11613 if test "${with_sodium}" != "no" && test "${with_sodium}" != "auto"; then :
583552e5 11614
3828bfac
AJ
11615 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11616$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11617as_fn_error $? "--with-sodium was given but libsodium appears to be unusable
11618See \`config.log' for more details" "$LINENO" 5; }
583552e5
AJ
11619
11620fi
11621
583552e5
AJ
11622fi
11623
3828bfac 11624 if test "${LIBSODIUM}" = "No"; then :
8f1afa5d 11625
3828bfac
AJ
11626 LIBSODIUM_CFLAGS=""
11627 LIBSODIUM_LIBS=""
8f1afa5d
AJ
11628
11629fi
11630
11631
11632
11633
6df79d8f
AJ
11634 CFLAGS="${CFLAGS_SAVED}"
11635 LIBS="${LIBS_SAVED}"
583552e5 11636
90121a3e
AJ
11637 unset CFLAGS_SAVED
11638 unset LIBS_SAVED
11639
583552e5 11640
3828bfac 11641# Libraries that need to be explicitly enabled (alphabetical)
583552e5 11642
8f1afa5d 11643
3828bfac
AJ
11644 LIBPERL="No"
11645
11646 LIBPERL_CFLAGS=""
11647 LIBPERL_LIBS=""
62f7ded0 11648
752694a2 11649
3828bfac
AJ
11650# Check whether --with-perl was given.
11651if test "${with_perl+set}" = set; then :
11652 withval=$with_perl;
62f7ded0 11653else
3828bfac 11654 with_perl="no"
62f7ded0
AJ
11655fi
11656
86e4a22b 11657
f54ed0d4
AJ
11658 case "x${with_perl}" in #(
11659 xno) :
11660 ;; #(
11661 xyes) :
11662 ;; #(
11663 xauto) :
11664 ;; #(
11665 *) :
11666
11667 as_fn_error $? "invalid option for --with-perl" "$LINENO" 5
11668 ;;
11669esac
c523bb43 11670
3828bfac 11671 if test "${with_perl}" != "no"; then :
5a3259b2 11672
5a3259b2 11673
3828bfac
AJ
11674 # Extract the first word of "perl", so it can be a program name with args.
11675set dummy perl; ac_word=$2
11676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11677$as_echo_n "checking for $ac_word... " >&6; }
11678if ${ac_cv_path_perlpath+:} false; then :
11679 $as_echo_n "(cached) " >&6
11680else
11681 case $perlpath in
11682 [\\/]* | ?:[\\/]*)
11683 ac_cv_path_perlpath="$perlpath" # Let the user override the test with a path.
11684 ;;
11685 *)
11686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11687for as_dir in $PATH
11688do
11689 IFS=$as_save_IFS
11690 test -z "$as_dir" && as_dir=.
11691 for ac_exec_ext in '' $ac_executable_extensions; do
11692 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11693 ac_cv_path_perlpath="$as_dir/$ac_word$ac_exec_ext"
11694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11695 break 2
11696 fi
11697done
11698 done
11699IFS=$as_save_IFS
5a3259b2 11700
3828bfac
AJ
11701 ;;
11702esac
11703fi
11704perlpath=$ac_cv_path_perlpath
11705if test -n "$perlpath"; then
11706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perlpath" >&5
11707$as_echo "$perlpath" >&6; }
5a3259b2 11708else
3828bfac
AJ
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11710$as_echo "no" >&6; }
11711fi
5a3259b2 11712
5a3259b2 11713
5a3259b2 11714
f54ed0d4
AJ
11715 if test -n "${perlpath}"; then :
11716
3828bfac
AJ
11717 LIBPERL="Yes"
11718 LIBPERL_CFLAGS="$(perl -MExtUtils::Embed -e ccopts)"
11719 LIBPERL_LIBS="$(perl -MExtUtils::Embed -e ldopts)"
5a3259b2 11720
3828bfac 11721 # if Perl is built with threading support, we need to link atheme against libpthread
f54ed0d4
AJ
11722 case "x${LIBPERL_LIBS}" in #(
11723 *-lpthread*) :
11724 LIBS="-lpthread ${LIBS}" ;; #(
11725 *) :
11726 ;;
11727esac
0122439c 11728
3828bfac 11729 if test "${with_perl}${LIBPERL_CFLAGS}" = "yes"; then :
0122439c 11730
3828bfac 11731 as_fn_error $? "--with-perl was given but Perl could not be found" "$LINENO" 5
0122439c 11732
62f7ded0 11733fi
0122439c 11734
0122439c 11735
bc2a87b4 11736
3828bfac 11737 PERL_COND_D="perl"
0122439c 11738
083f09b4 11739
f54ed0d4
AJ
11740
11741else
11742
3828bfac
AJ
11743 LIBPERL="No"
11744 if test "${with_perl}" = "yes"; then :
8649c8cd 11745
3828bfac 11746 as_fn_error $? "--with-perl was given but Perl could not be found" "$LINENO" 5
5a3259b2
AJ
11747
11748fi
f54ed0d4
AJ
11749
11750fi
5a3259b2
AJ
11751
11752else
11753
3828bfac 11754 LIBPERL="No"
5a3259b2
AJ
11755
11756fi
11757
3828bfac 11758 if test "${LIBPERL}" = "No"; then :
5a3259b2 11759
3828bfac
AJ
11760 LIBPERL_CFLAGS=""
11761 LIBPERL_LIBS=""
5a3259b2 11762
3828bfac 11763fi
5a3259b2 11764
7a27ba84
AJ
11765
11766
7a27ba84 11767
7a27ba84 11768
f3ddda9b 11769# Digest and RNG frontend to use in libathemecore
7a27ba84 11770
7a27ba84 11771
f3ddda9b
AJ
11772 DIGEST_FRONTEND_VAL=""
11773 DIGEST_FRONTEND=""
7a27ba84 11774
f3ddda9b
AJ
11775
11776# Check whether --with-digest-api-frontend was given.
11777if test "${with_digest_api_frontend+set}" = set; then :
11778 withval=$with_digest_api_frontend;
3828bfac 11779else
f3ddda9b 11780 with_digest_api_frontend="auto"
3828bfac 11781fi
8649c8cd 11782
752694a2 11783
f3ddda9b
AJ
11784 case "x${with_digest_api_frontend}" in #(
11785 xauto) :
90121a3e 11786
f3ddda9b 11787 if test "${LIBCRYPTO}${LIBCRYPTO_DIGEST}" = "YesYes"; then :
752694a2 11788
7a27ba84 11789
7a27ba84 11790
f3ddda9b
AJ
11791 DIGEST_FRONTEND_VAL="ATHEME_API_DIGEST_FRONTEND_OPENSSL"
11792 DIGEST_FRONTEND="${LIBCRYPTO_NAME}"
7a27ba84 11793
f3ddda9b
AJ
11794 { $as_echo "$as_me:${as_lineno-$LINENO}: using digest frontend: ${DIGEST_FRONTEND} (chosen automatically)" >&5
11795$as_echo "$as_me: using digest frontend: ${DIGEST_FRONTEND} (chosen automatically)" >&6;}
7a27ba84 11796
f3ddda9b 11797elif test "${LIBGCRYPT}${LIBGCRYPT_DIGEST}" = "YesYes"; then :
7a27ba84 11798
3cfa8da2 11799
3cfa8da2 11800
f3ddda9b
AJ
11801 DIGEST_FRONTEND_VAL="ATHEME_API_DIGEST_FRONTEND_GCRYPT"
11802 DIGEST_FRONTEND="GNU libgcrypt"
3cfa8da2 11803
f3ddda9b
AJ
11804 { $as_echo "$as_me:${as_lineno-$LINENO}: using digest frontend: ${DIGEST_FRONTEND} (chosen automatically)" >&5
11805$as_echo "$as_me: using digest frontend: ${DIGEST_FRONTEND} (chosen automatically)" >&6;}
752694a2 11806
f3ddda9b 11807elif test "${LIBMBEDCRYPTO}${LIBMBEDCRYPTO_DIGEST}" = "YesYes"; then :
2d0e0ee8
AJ
11808
11809
8f1afa5d 11810
f3ddda9b
AJ
11811 DIGEST_FRONTEND_VAL="ATHEME_API_DIGEST_FRONTEND_MBEDTLS"
11812 DIGEST_FRONTEND="ARM mbedTLS"
752694a2 11813
f3ddda9b
AJ
11814 { $as_echo "$as_me:${as_lineno-$LINENO}: using digest frontend: ${DIGEST_FRONTEND} (chosen automatically)" >&5
11815$as_echo "$as_me: using digest frontend: ${DIGEST_FRONTEND} (chosen automatically)" >&6;}
752694a2 11816
f3ddda9b 11817else
752694a2
AJ
11818
11819
752694a2 11820
f3ddda9b
AJ
11821 DIGEST_FRONTEND_VAL="ATHEME_API_DIGEST_FRONTEND_INTERNAL"
11822 DIGEST_FRONTEND="Internal"
11823
11824 { $as_echo "$as_me:${as_lineno-$LINENO}: using digest frontend: ${DIGEST_FRONTEND} (chosen automatically)" >&5
11825$as_echo "$as_me: using digest frontend: ${DIGEST_FRONTEND} (chosen automatically)" >&6;}
752694a2 11826
f3ddda9b
AJ
11827fi
11828 ;; #(
11829 xopenssl) :
5a3259b2 11830
f3ddda9b 11831 if test "${LIBCRYPTO}${LIBCRYPTO_DIGEST}" = "YesYes"; then :
5a3259b2 11832
5a3259b2 11833
5a3259b2 11834
f3ddda9b
AJ
11835 DIGEST_FRONTEND_VAL="ATHEME_API_DIGEST_FRONTEND_OPENSSL"
11836 DIGEST_FRONTEND="${LIBCRYPTO_NAME}"
5a3259b2 11837
f3ddda9b
AJ
11838 { $as_echo "$as_me:${as_lineno-$LINENO}: using digest frontend: ${DIGEST_FRONTEND} (chosen by user)" >&5
11839$as_echo "$as_me: using digest frontend: ${DIGEST_FRONTEND} (chosen by user)" >&6;}
5a3259b2 11840
f3ddda9b 11841else
5a3259b2 11842
f3ddda9b 11843 as_fn_error $? "--with-digest-api-frontend=openssl requires --with-openssl and usable MD5/SHA1/SHA2/HMAC/PBKDF2 functions" "$LINENO" 5
752694a2 11844
f3ddda9b
AJ
11845fi
11846 ;; #(
11847 xlibressl) :
752694a2 11848
f3ddda9b 11849 if test "${LIBCRYPTO}${LIBCRYPTO_DIGEST}" = "YesYes"; then :
752694a2
AJ
11850
11851
11852
f3ddda9b
AJ
11853 DIGEST_FRONTEND_VAL="ATHEME_API_DIGEST_FRONTEND_OPENSSL"
11854 DIGEST_FRONTEND="${LIBCRYPTO_NAME}"
11855
11856 { $as_echo "$as_me:${as_lineno-$LINENO}: using digest frontend: ${DIGEST_FRONTEND} (chosen by user)" >&5
11857$as_echo "$as_me: using digest frontend: ${DIGEST_FRONTEND} (chosen by user)" >&6;}
8649c8cd 11858
752694a2 11859else
f7c1979e 11860
f3ddda9b 11861 as_fn_error $? "--with-digest-api-frontend=libressl requires --with-openssl and usable MD5/SHA1/SHA2/HMAC/PBKDF2 functions" "$LINENO" 5
a4343815 11862
3828bfac 11863fi
f3ddda9b
AJ
11864 ;; #(
11865 xgcrypt) :
083f09b4 11866
f3ddda9b 11867 if test "${LIBGCRYPT}${LIBGCRYPT_DIGEST}" = "YesYes"; then :
752694a2 11868
5a3259b2 11869
5a3259b2 11870
f3ddda9b
AJ
11871 DIGEST_FRONTEND_VAL="ATHEME_API_DIGEST_FRONTEND_GCRYPT"
11872 DIGEST_FRONTEND="GNU libgcrypt"
5a3259b2 11873
f3ddda9b
AJ
11874 { $as_echo "$as_me:${as_lineno-$LINENO}: using digest frontend: ${DIGEST_FRONTEND} (chosen by user)" >&5
11875$as_echo "$as_me: using digest frontend: ${DIGEST_FRONTEND} (chosen by user)" >&6;}
5a3259b2 11876
f3ddda9b 11877else
a9495d03 11878
f3ddda9b 11879 as_fn_error $? "--with-digest-api-frontend=gcrypt requires --with-gcrypt and usable MD5/SHA1/SHA2/HMAC/PBKDF2 functions" "$LINENO" 5
a9495d03 11880
f3ddda9b
AJ
11881fi
11882 ;; #(
11883 xmbedtls) :
a9495d03 11884
f3ddda9b 11885 if test "${LIBMBEDCRYPTO}${LIBMBEDCRYPTO_DIGEST}" = "YesYes"; then :
a9495d03 11886
a9495d03 11887
a9495d03 11888
f3ddda9b
AJ
11889 DIGEST_FRONTEND_VAL="ATHEME_API_DIGEST_FRONTEND_MBEDTLS"
11890 DIGEST_FRONTEND="ARM mbedTLS"
a9495d03 11891
f3ddda9b
AJ
11892 { $as_echo "$as_me:${as_lineno-$LINENO}: using digest frontend: ${DIGEST_FRONTEND} (chosen by user)" >&5
11893$as_echo "$as_me: using digest frontend: ${DIGEST_FRONTEND} (chosen by user)" >&6;}
752694a2 11894
3828bfac 11895else
752694a2 11896
f3ddda9b 11897 as_fn_error $? "--with-digest-api-frontend=mbedtls requires --with-mbedtls and usable MD5/SHA1/SHA2/HMAC/PBKDF2 functions" "$LINENO" 5
083f09b4 11898
3828bfac 11899fi
f3ddda9b
AJ
11900 ;; #(
11901 xinternal) :
460b89c1 11902
a824f8db 11903
2d0e0ee8 11904
f3ddda9b
AJ
11905 DIGEST_FRONTEND_VAL="ATHEME_API_DIGEST_FRONTEND_INTERNAL"
11906 DIGEST_FRONTEND="Internal"
8f1afa5d 11907
f3ddda9b
AJ
11908 { $as_echo "$as_me:${as_lineno-$LINENO}: using digest frontend: ${DIGEST_FRONTEND} (chosen by user)" >&5
11909$as_echo "$as_me: using digest frontend: ${DIGEST_FRONTEND} (chosen by user)" >&6;}
f54ed0d4
AJ
11910 ;; #(
11911 *) :
90121a3e 11912
f3ddda9b 11913 as_fn_error $? "invalid option for --with-digest-api-frontend (auto, openssl, libressl, gcrypt, mbedtls, internal)" "$LINENO" 5
f54ed0d4
AJ
11914 ;;
11915esac
8f1afa5d 11916
083f09b4 11917
f3ddda9b
AJ
11918cat >>confdefs.h <<_ACEOF
11919#define ATHEME_API_DIGEST_FRONTEND ${DIGEST_FRONTEND_VAL}
11920_ACEOF
65863905 11921
c9f0e170 11922
c9f0e170
AJ
11923
11924
f3ddda9b 11925 HAVE_SECURE_ARC4RANDOM="No"
90121a3e 11926
f3ddda9b
AJ
11927 RANDOM_FRONTEND_VAL=""
11928 RANDOM_FRONTEND=""
c9f0e170 11929
5a3259b2 11930
f3ddda9b
AJ
11931# Check whether --with-rng-api-frontend was given.
11932if test "${with_rng_api_frontend+set}" = set; then :
11933 withval=$with_rng_api_frontend;
3828bfac 11934else
f3ddda9b
AJ
11935 with_rng_api_frontend="auto"
11936fi
11937
11938
11939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if a secure arc4random(3) is available" >&5
11940$as_echo_n "checking if a secure arc4random(3) is available... " >&6; }
11941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3828bfac 11942/* end confdefs.h. */
5a3259b2 11943
f3ddda9b
AJ
11944
11945 #ifdef HAVE_STDDEF_H
11946 # include <stddef.h>
11947 #endif
11948 #ifdef HAVE_STDLIB_H
11949 # include <stdlib.h>
11950 #endif
11951 #if defined(HAVE_AVAILABILITY_H)
11952 # include <Availability.h>
11953 #elif defined(HAVE_SYS_PARAM_H)
11954 # include <sys/param.h>
11955 #endif
11956 #undef HAVE_SECURE_ARCRANDOM
11957 #if defined(__MAC_10_12)
11958 # define HAVE_SECURE_ARCRANDOM 1
11959 #elif defined(__FreeBSD__)
11960 # if (__FreeBSD__ >= 12)
11961 # define HAVE_SECURE_ARCRANDOM 1
11962 # endif
11963 #elif defined(__NetBSD__) && defined(__NetBSD_Version__)
11964 # if (__NetBSD_Version__ >= 700000001)
11965 # define HAVE_SECURE_ARCRANDOM 1
11966 # endif
11967 #elif defined(__OpenBSD__) && defined(OpenBSD)
11968 # if (OpenBSD >= 201405)
11969 # define HAVE_SECURE_ARCRANDOM 1
11970 # endif
11971 #endif
11972 #ifndef HAVE_SECURE_ARCRANDOM
11973 # error "No secure arc4random(3) is available"
11974 #endif
11975
3828bfac
AJ
11976int
11977main ()
11978{
f3ddda9b
AJ
11979
11980 (void) arc4random();
11981 (void) arc4random_uniform(0);
11982 (void) arc4random_buf(NULL, 0);
11983
3828bfac
AJ
11984 ;
11985 return 0;
11986}
f3ddda9b 11987
3828bfac 11988_ACEOF
f3ddda9b 11989if ac_fn_c_try_link "$LINENO"; then :
5a3259b2 11990
f3ddda9b
AJ
11991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11992$as_echo "yes" >&6; }
11993 HAVE_SECURE_ARC4RANDOM="Yes"
5a3259b2 11994
f3ddda9b 11995else
3828bfac 11996
f3ddda9b
AJ
11997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11998$as_echo "no" >&6; }
11999 HAVE_SECURE_ARC4RANDOM="No"
5a3259b2
AJ
12000
12001fi
f3ddda9b
AJ
12002rm -f core conftest.err conftest.$ac_objext \
12003 conftest$ac_exeext conftest.$ac_ext
5a3259b2 12004
f3ddda9b
AJ
12005 case "x${with_rng_api_frontend}" in #(
12006 xauto) :
c9f0e170 12007
f3ddda9b 12008 if test "${HAVE_SECURE_ARC4RANDOM}" = "Yes"; then :
c9f0e170 12009
073ad2a0
AJ
12010
12011
f3ddda9b
AJ
12012 RANDOM_FRONTEND_VAL="ATHEME_API_RANDOM_FRONTEND_ARC4RANDOM"
12013 RANDOM_FRONTEND="Secure arc4random(3)"
073ad2a0 12014
f3ddda9b
AJ
12015 { $as_echo "$as_me:${as_lineno-$LINENO}: using RNG frontend: ${RANDOM_FRONTEND} (chosen automatically)" >&5
12016$as_echo "$as_me: using RNG frontend: ${RANDOM_FRONTEND} (chosen automatically)" >&6;}
073ad2a0 12017
f3ddda9b 12018elif test "${LIBSODIUM}${LIBSODIUM_RANDOM}" = "YesYes"; then :
c9f0e170 12019
073ad2a0 12020
c9f0e170 12021
f3ddda9b
AJ
12022 RANDOM_FRONTEND_VAL="ATHEME_API_RANDOM_FRONTEND_SODIUM"
12023 RANDOM_FRONTEND="Sodium"
c9f0e170 12024
f3ddda9b
AJ
12025 { $as_echo "$as_me:${as_lineno-$LINENO}: using RNG frontend: ${RANDOM_FRONTEND} (chosen automatically)" >&5
12026$as_echo "$as_me: using RNG frontend: ${RANDOM_FRONTEND} (chosen automatically)" >&6;}
c9f0e170 12027
f3ddda9b 12028elif test "${LIBCRYPTO}${LIBCRYPTO_RANDOM}" = "YesYes"; then :
c9f0e170 12029
3828bfac 12030
3828bfac 12031
f3ddda9b
AJ
12032 RANDOM_FRONTEND_VAL="ATHEME_API_RANDOM_FRONTEND_OPENSSL"
12033 RANDOM_FRONTEND="${LIBCRYPTO_NAME}"
c9f0e170 12034
f3ddda9b
AJ
12035 { $as_echo "$as_me:${as_lineno-$LINENO}: using RNG frontend: ${RANDOM_FRONTEND} (chosen automatically)" >&5
12036$as_echo "$as_me: using RNG frontend: ${RANDOM_FRONTEND} (chosen automatically)" >&6;}
5a3259b2 12037
f3ddda9b 12038elif test "${LIBMBEDCRYPTO}${LIBMBEDCRYPTO_RANDOM}" = "YesYes"; then :
5a3259b2 12039
5a3259b2 12040
5a3259b2 12041
f3ddda9b
AJ
12042 RANDOM_FRONTEND_VAL="ATHEME_API_RANDOM_FRONTEND_MBEDTLS"
12043 RANDOM_FRONTEND="ARM mbedTLS"
5a3259b2 12044
f3ddda9b
AJ
12045 { $as_echo "$as_me:${as_lineno-$LINENO}: using RNG frontend: ${RANDOM_FRONTEND} (chosen automatically)" >&5
12046$as_echo "$as_me: using RNG frontend: ${RANDOM_FRONTEND} (chosen automatically)" >&6;}
5a3259b2 12047
3828bfac
AJ
12048else
12049
3828bfac 12050
5a3259b2 12051
f3ddda9b
AJ
12052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getentropy(3) is available" >&5
12053$as_echo_n "checking if getentropy(3) is available... " >&6; }
12054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12055/* end confdefs.h. */
5a3259b2 12056
3828bfac 12057
f3ddda9b
AJ
12058 #ifdef HAVE_STDDEF_H
12059 # include <stddef.h>
12060 #endif
12061 #ifdef HAVE_STDLIB_H
12062 # include <stdlib.h>
12063 #endif
12064 #ifdef HAVE_UNISTD_H
12065 # include <unistd.h>
12066 #endif
12067 #ifdef HAVE_SYS_RANDOM_H
12068 # include <sys/random.h>
12069 #endif
5a3259b2 12070
f3ddda9b
AJ
12071int
12072main ()
12073{
5a3259b2 12074
f3ddda9b 12075 (void) getentropy(NULL, 0);
5a3259b2 12076
f3ddda9b
AJ
12077 ;
12078 return 0;
12079}
460b89c1 12080
f3ddda9b
AJ
12081_ACEOF
12082if ac_fn_c_try_link "$LINENO"; then :
90121a3e 12083
f3ddda9b
AJ
12084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12085$as_echo "yes" >&6; }
460b89c1 12086
f3ddda9b 12087$as_echo "#define HAVE_USABLE_GETENTROPY 1" >>confdefs.h
460b89c1 12088
460b89c1 12089
3828bfac 12090else
460b89c1 12091
f3ddda9b
AJ
12092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12093$as_echo "no" >&6; }
12094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getrandom(2) is available" >&5
12095$as_echo_n "checking if getrandom(2) is available... " >&6; }
12096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12097/* end confdefs.h. */
460b89c1 12098
90121a3e 12099
f3ddda9b
AJ
12100 #ifdef HAVE_STDDEF_H
12101 # include <stddef.h>
12102 #endif
12103 #ifdef HAVE_STDLIB_H
12104 # include <stdlib.h>
12105 #endif
12106 #ifdef HAVE_UNISTD_H
12107 # include <unistd.h>
12108 #endif
12109 #ifdef HAVE_SYS_RANDOM_H
12110 # include <sys/random.h>
12111 #endif
3828bfac 12112
f3ddda9b
AJ
12113int
12114main ()
12115{
3828bfac 12116
f3ddda9b 12117 (void) getrandom(NULL, 0, 0);
3828bfac 12118
f3ddda9b
AJ
12119 ;
12120 return 0;
12121}
3828bfac 12122
f3ddda9b
AJ
12123_ACEOF
12124if ac_fn_c_try_link "$LINENO"; then :
3828bfac 12125
f3ddda9b
AJ
12126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12127$as_echo "yes" >&6; }
3828bfac 12128
f3ddda9b 12129$as_echo "#define HAVE_USABLE_GETRANDOM 1" >>confdefs.h
3828bfac
AJ
12130
12131
f3ddda9b 12132else
3828bfac 12133
f3ddda9b
AJ
12134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12135$as_echo "no" >&6; }
12136 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: this program will need access to the urandom(4) device at run-time" >&5
12137$as_echo "$as_me: WARNING: this program will need access to the urandom(4) device at run-time" >&2;}
460b89c1 12138
f3ddda9b
AJ
12139fi
12140rm -f core conftest.err conftest.$ac_objext \
12141 conftest$ac_exeext conftest.$ac_ext
c9f0e170 12142
f3ddda9b
AJ
12143fi
12144rm -f core conftest.err conftest.$ac_objext \
12145 conftest$ac_exeext conftest.$ac_ext
c9f0e170 12146
f3ddda9b
AJ
12147 RANDOM_FRONTEND_VAL="ATHEME_API_RANDOM_FRONTEND_INTERNAL"
12148 RANDOM_FRONTEND="Internal"
073ad2a0 12149
f3ddda9b
AJ
12150 { $as_echo "$as_me:${as_lineno-$LINENO}: using RNG frontend: ${RANDOM_FRONTEND} (chosen automatically)" >&5
12151$as_echo "$as_me: using RNG frontend: ${RANDOM_FRONTEND} (chosen automatically)" >&6;}
073ad2a0 12152
c9f0e170 12153fi
f3ddda9b
AJ
12154 ;; #(
12155 xarc4random) :
c9f0e170 12156
f3ddda9b 12157 if test "${HAVE_SECURE_ARC4RANDOM}" = "Yes"; then :
c9f0e170 12158
073ad2a0 12159
460b89c1 12160
f3ddda9b
AJ
12161 RANDOM_FRONTEND_VAL="ATHEME_API_RANDOM_FRONTEND_ARC4RANDOM"
12162 RANDOM_FRONTEND="Secure arc4random(3)"
073ad2a0 12163
f3ddda9b
AJ
12164 { $as_echo "$as_me:${as_lineno-$LINENO}: using RNG frontend: ${RANDOM_FRONTEND} (chosen by user)" >&5
12165$as_echo "$as_me: using RNG frontend: ${RANDOM_FRONTEND} (chosen by user)" >&6;}
073ad2a0 12166
3828bfac 12167else
073ad2a0 12168
f3ddda9b 12169 as_fn_error $? "--with-rng-api-frontend=arc4random requires a secure arc4random(3)" "$LINENO" 5
073ad2a0 12170
f3ddda9b 12171fi
f54ed0d4 12172 ;; #(
f3ddda9b 12173 xsodium) :
073ad2a0 12174
f3ddda9b 12175 if test "${LIBSODIUM}${LIBSODIUM_RANDOM}" = "YesYes"; then :
073ad2a0 12176
073ad2a0 12177
073ad2a0 12178
f3ddda9b
AJ
12179 RANDOM_FRONTEND_VAL="ATHEME_API_RANDOM_FRONTEND_SODIUM"
12180 RANDOM_FRONTEND="Sodium"
475a05fd 12181
f3ddda9b
AJ
12182 { $as_echo "$as_me:${as_lineno-$LINENO}: using RNG frontend: ${RANDOM_FRONTEND} (chosen by user)" >&5
12183$as_echo "$as_me: using RNG frontend: ${RANDOM_FRONTEND} (chosen by user)" >&6;}
475a05fd 12184
3828bfac 12185else
475a05fd 12186
f3ddda9b 12187 as_fn_error $? "--with-rng-api-frontend=sodium requires --with-sodium and a usable random number generator" "$LINENO" 5
475a05fd 12188
3828bfac 12189fi
f3ddda9b
AJ
12190 ;; #(
12191 xopenssl) :
475a05fd 12192
f3ddda9b 12193 if test "${LIBCRYPTO}${LIBCRYPTO_RANDOM}" = "YesYes"; then :
475a05fd 12194
475a05fd 12195
632c2921 12196
f3ddda9b
AJ
12197 RANDOM_FRONTEND_VAL="ATHEME_API_RANDOM_FRONTEND_OPENSSL"
12198 RANDOM_FRONTEND="${LIBCRYPTO_NAME}"
632c2921 12199
f3ddda9b
AJ
12200 { $as_echo "$as_me:${as_lineno-$LINENO}: using RNG frontend: ${RANDOM_FRONTEND} (chosen by user)" >&5
12201$as_echo "$as_me: using RNG frontend: ${RANDOM_FRONTEND} (chosen by user)" >&6;}
475a05fd
AJ
12202
12203else
12204
f3ddda9b 12205 as_fn_error $? "--with-rng-api-frontend=openssl requires --with-openssl and a usable random number generator" "$LINENO" 5
475a05fd 12206
f3ddda9b 12207fi
f54ed0d4 12208 ;; #(
f3ddda9b 12209 xlibressl) :
90121a3e 12210
f3ddda9b 12211 if test "${LIBCRYPTO}${LIBCRYPTO_RANDOM}" = "YesYes"; then :
2fc47652 12212
2fc47652 12213
90121a3e 12214
f3ddda9b
AJ
12215 RANDOM_FRONTEND_VAL="ATHEME_API_RANDOM_FRONTEND_OPENSSL"
12216 RANDOM_FRONTEND="${LIBCRYPTO_NAME}"
073ad2a0 12217
f3ddda9b
AJ
12218 { $as_echo "$as_me:${as_lineno-$LINENO}: using RNG frontend: ${RANDOM_FRONTEND} (chosen by user)" >&5
12219$as_echo "$as_me: using RNG frontend: ${RANDOM_FRONTEND} (chosen by user)" >&6;}
073ad2a0 12220
f3ddda9b 12221else
073ad2a0 12222
f3ddda9b 12223 as_fn_error $? "--with-rng-api-frontend=libressl requires --with-openssl and a usable random number generator" "$LINENO" 5
073ad2a0 12224
f3ddda9b
AJ
12225fi
12226 ;; #(
12227 xmbedtls) :
073ad2a0 12228
f3ddda9b 12229 if test "${LIBMBEDCRYPTO}${LIBMBEDCRYPTO_RANDOM}" = "YesYes"; then :
073ad2a0 12230
073ad2a0 12231
073ad2a0 12232
f3ddda9b
AJ
12233 RANDOM_FRONTEND_VAL="ATHEME_API_RANDOM_FRONTEND_MBEDTLS"
12234 RANDOM_FRONTEND="ARM mbedTLS"
632c2921 12235
f3ddda9b
AJ
12236 { $as_echo "$as_me:${as_lineno-$LINENO}: using RNG frontend: ${RANDOM_FRONTEND} (chosen by user)" >&5
12237$as_echo "$as_me: using RNG frontend: ${RANDOM_FRONTEND} (chosen by user)" >&6;}
632c2921 12238
f3ddda9b 12239else
073ad2a0 12240
f3ddda9b 12241 as_fn_error $? "--with-rng-api-frontend=mbedtls requires --with-mbedtls and a usable random number generator" "$LINENO" 5
3828bfac 12242
3828bfac 12243fi
f3ddda9b
AJ
12244 ;; #(
12245 xinternal) :
073ad2a0 12246
c9f0e170 12247
90121a3e 12248
f3ddda9b
AJ
12249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getentropy(3) is available" >&5
12250$as_echo_n "checking if getentropy(3) is available... " >&6; }
12251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12252/* end confdefs.h. */
3828bfac 12253
3828bfac 12254
f3ddda9b
AJ
12255 #ifdef HAVE_STDDEF_H
12256 # include <stddef.h>
12257 #endif
12258 #ifdef HAVE_STDLIB_H
12259 # include <stdlib.h>
12260 #endif
12261 #ifdef HAVE_UNISTD_H
12262 # include <unistd.h>
12263 #endif
12264 #ifdef HAVE_SYS_RANDOM_H
12265 # include <sys/random.h>
12266 #endif
90121a3e 12267
f3ddda9b
AJ
12268int
12269main ()
12270{
3828bfac 12271
f3ddda9b 12272 (void) getentropy(NULL, 0);
073ad2a0 12273
f3ddda9b
AJ
12274 ;
12275 return 0;
12276}
d9b514bf 12277
f3ddda9b
AJ
12278_ACEOF
12279if ac_fn_c_try_link "$LINENO"; then :
d9b514bf 12280
f3ddda9b
AJ
12281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12282$as_echo "yes" >&6; }
d9b514bf 12283
f3ddda9b 12284$as_echo "#define HAVE_USABLE_GETENTROPY 1" >>confdefs.h
d9b514bf 12285
90121a3e 12286
f3ddda9b 12287else
d9b514bf 12288
f3ddda9b
AJ
12289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12290$as_echo "no" >&6; }
12291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getrandom(2) is available" >&5
12292$as_echo_n "checking if getrandom(2) is available... " >&6; }
12293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12294/* end confdefs.h. */
d9b514bf 12295
90121a3e 12296
f3ddda9b
AJ
12297 #ifdef HAVE_STDDEF_H
12298 # include <stddef.h>
12299 #endif
12300 #ifdef HAVE_STDLIB_H
12301 # include <stdlib.h>
12302 #endif
12303 #ifdef HAVE_UNISTD_H
12304 # include <unistd.h>
12305 #endif
12306 #ifdef HAVE_SYS_RANDOM_H
12307 # include <sys/random.h>
12308 #endif
d9b514bf 12309
f3ddda9b
AJ
12310int
12311main ()
12312{
d9b514bf 12313
f3ddda9b 12314 (void) getrandom(NULL, 0, 0);
d9b514bf 12315
f3ddda9b
AJ
12316 ;
12317 return 0;
12318}
d9b514bf 12319
f3ddda9b
AJ
12320_ACEOF
12321if ac_fn_c_try_link "$LINENO"; then :
8d8913e0 12322
f3ddda9b
AJ
12323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12324$as_echo "yes" >&6; }
8d8913e0 12325
f3ddda9b 12326$as_echo "#define HAVE_USABLE_GETRANDOM 1" >>confdefs.h
90121a3e 12327
8d8913e0 12328
f3ddda9b 12329else
8d8913e0 12330
f3ddda9b
AJ
12331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12332$as_echo "no" >&6; }
12333 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: this program will need access to the urandom(4) device at run-time" >&5
12334$as_echo "$as_me: WARNING: this program will need access to the urandom(4) device at run-time" >&2;}
8d8913e0 12335
f3ddda9b
AJ
12336fi
12337rm -f core conftest.err conftest.$ac_objext \
12338 conftest$ac_exeext conftest.$ac_ext
8d8913e0 12339
f3ddda9b
AJ
12340fi
12341rm -f core conftest.err conftest.$ac_objext \
12342 conftest$ac_exeext conftest.$ac_ext
8d8913e0 12343
f3ddda9b
AJ
12344 RANDOM_FRONTEND_VAL="ATHEME_API_RANDOM_FRONTEND_INTERNAL"
12345 RANDOM_FRONTEND="Internal"
632c2921 12346
f3ddda9b
AJ
12347 { $as_echo "$as_me:${as_lineno-$LINENO}: using RNG frontend: ${RANDOM_FRONTEND} (chosen by user)" >&5
12348$as_echo "$as_me: using RNG frontend: ${RANDOM_FRONTEND} (chosen by user)" >&6;}
f54ed0d4
AJ
12349 ;; #(
12350 *) :
90121a3e 12351
f3ddda9b 12352 as_fn_error $? "invalid option for --with-rng-api-frontend (auto, arc4random, sodium, openssl, libressl, mbedtls, internal)" "$LINENO" 5
f54ed0d4
AJ
12353 ;;
12354esac
632c2921 12355
8d8913e0 12356
f3ddda9b
AJ
12357cat >>confdefs.h <<_ACEOF
12358#define ATHEME_API_RANDOM_FRONTEND ${RANDOM_FRONTEND_VAL}
12359_ACEOF
12360
8d8913e0 12361
67881d19 12362
f3ddda9b
AJ
12363# Optional features
12364# These must be after library tests, because some of them depend on the
12365# library detection logic in the tests to set appropriate variables
12366
12367
12368 CONTRIB_MODULES="No"
12369
12370 # Check whether --enable-contrib was given.
12371if test "${enable_contrib+set}" = set; then :
12372 enableval=$enable_contrib;
3828bfac 12373else
f3ddda9b 12374 enable_contrib="no"
67881d19 12375fi
67881d19
AJ
12376
12377
f3ddda9b 12378 case "x${enable_contrib}" in #(
f54ed0d4
AJ
12379 xno) :
12380 ;; #(
12381 xyes) :
90121a3e 12382
f3ddda9b 12383 CONTRIB_MODULES="Yes"
3828bfac 12384
f3ddda9b 12385$as_echo "#define ATHEME_ENABLE_CONTRIB 1" >>confdefs.h
d9b514bf 12386
f3ddda9b
AJ
12387 ;; #(
12388 *) :
3828bfac 12389
f3ddda9b
AJ
12390 as_fn_error $? "invalid option for --enable-contrib" "$LINENO" 5
12391 ;;
12392esac
3828bfac 12393
3828bfac 12394
3828bfac 12395
f3ddda9b 12396 LIBS_SAVED="${LIBS}"
3828bfac 12397
f3ddda9b
AJ
12398 CLOCK_GETTIME_LIBS=""
12399 CRYPTO_BENCHMARKING="No"
8f1afa5d 12400
f3ddda9b
AJ
12401 # Check whether --enable-crypto-benchmarking was given.
12402if test "${enable_crypto_benchmarking+set}" = set; then :
12403 enableval=$enable_crypto_benchmarking;
12404else
12405 enable_crypto_benchmarking="auto"
8f1afa5d 12406fi
d9b514bf
AJ
12407
12408
f3ddda9b
AJ
12409 case "x${enable_crypto_benchmarking}" in #(
12410 xno) :
12411 ;; #(
12412 xyes) :
12413 ;; #(
12414 xauto) :
f54ed0d4
AJ
12415 ;; #(
12416 *) :
ab799702 12417
f3ddda9b 12418 as_fn_error $? "invalid option for --enable-crypto-benchmarking" "$LINENO" 5
f54ed0d4
AJ
12419 ;;
12420esac
ab799702 12421
f3ddda9b 12422 if test "${enable_crypto_benchmarking}" != "no"; then :
ab799702 12423
f3ddda9b
AJ
12424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
12425$as_echo_n "checking for library containing clock_gettime... " >&6; }
12426if ${ac_cv_search_clock_gettime+:} false; then :
12427 $as_echo_n "(cached) " >&6
12428else
12429 ac_func_search_save_LIBS=$LIBS
12430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12431/* end confdefs.h. */
3828bfac 12432
f3ddda9b
AJ
12433/* Override any GCC internal prototype to avoid an error.
12434 Use char because int might match the return type of a GCC
12435 builtin and then its argument prototype would still apply. */
12436#ifdef __cplusplus
12437extern "C"
12438#endif
12439char clock_gettime ();
12440int
12441main ()
12442{
12443return clock_gettime ();
12444 ;
12445 return 0;
12446}
12447_ACEOF
12448for ac_lib in '' rt; do
12449 if test -z "$ac_lib"; then
12450 ac_res="none required"
12451 else
12452 ac_res=-l$ac_lib
12453 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12454 fi
12455 if ac_fn_c_try_link "$LINENO"; then :
12456 ac_cv_search_clock_gettime=$ac_res
12457fi
12458rm -f core conftest.err conftest.$ac_objext \
12459 conftest$ac_exeext
12460 if ${ac_cv_search_clock_gettime+:} false; then :
12461 break
12462fi
12463done
12464if ${ac_cv_search_clock_gettime+:} false; then :
3828bfac 12465
f3ddda9b
AJ
12466else
12467 ac_cv_search_clock_gettime=no
12468fi
12469rm conftest.$ac_ext
12470LIBS=$ac_func_search_save_LIBS
12471fi
12472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
12473$as_echo "$ac_cv_search_clock_gettime" >&6; }
12474ac_res=$ac_cv_search_clock_gettime
12475if test "$ac_res" != no; then :
12476 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
3828bfac 12477
f3ddda9b 12478 if test "x${ac_cv_search_clock_gettime}" != "xnone required"; then :
3828bfac 12479
f3ddda9b
AJ
12480 CLOCK_GETTIME_LIBS="${ac_cv_search_clock_gettime}"
12481 LIBS="${CLOCK_GETTIME_LIBS} ${LIBS}"
3828bfac 12482
fe2e2f74
WP
12483fi
12484
f3ddda9b
AJ
12485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if clock_gettime(2) appears to be usable" >&5
12486$as_echo_n "checking if clock_gettime(2) appears to be usable... " >&6; }
12487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3828bfac 12488/* end confdefs.h. */
fe2e2f74 12489
0df7ff62 12490
f3ddda9b
AJ
12491 #ifdef HAVE_STDLIB_H
12492 # include <stdlib.h>
12493 #endif
12494 #ifdef HAVE_SYS_TIME_H
12495 # include <sys/time.h>
12496 #endif
12497 #ifdef HAVE_TIME_H
12498 # include <time.h>
12499 #endif
3828bfac
AJ
12500
12501int
12502main ()
12503{
c2d29773 12504
f3ddda9b
AJ
12505 struct timespec begin;
12506 (void) begin.tv_sec;
12507 (void) begin.tv_nsec;
12508 (void) clock_gettime(CLOCK_MONOTONIC, &begin);
3828bfac 12509
c2d29773
AJ
12510 ;
12511 return 0;
12512}
3828bfac 12513
c2d29773 12514_ACEOF
3828bfac
AJ
12515if ac_fn_c_try_link "$LINENO"; then :
12516
f3ddda9b 12517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3828bfac 12518$as_echo "yes" >&6; }
f3ddda9b
AJ
12519 CRYPTO_BENCHMARKING="Yes"
12520
12521
12522 CRYPTO_BENCHMARK_COND_D="crypto-benchmark"
12523
12524
3828bfac
AJ
12525
12526else
12527
f3ddda9b 12528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3828bfac 12529$as_echo "no" >&6; }
f3ddda9b
AJ
12530 CLOCK_GETTIME_LIBS=""
12531 if test "${enable_crypto_benchmarking}" = "yes"; then :
12532
12533 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12534$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12535as_fn_error $? "--enable-crypto-benchmarking was given but clock_gettime(2) does not appear to be usable
12536See \`config.log' for more details" "$LINENO" 5; }
12537
12538else
12539
12540 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the crypto benchmarking utility will not be available" >&5
12541$as_echo "$as_me: WARNING: the crypto benchmarking utility will not be available" >&2;}
12542
12543fi
3828bfac 12544
c2d29773
AJ
12545fi
12546rm -f core conftest.err conftest.$ac_objext \
3828bfac 12547 conftest$ac_exeext conftest.$ac_ext
c2d29773 12548
f3ddda9b 12549else
c2d29773 12550
f3ddda9b
AJ
12551 CLOCK_GETTIME_LIBS=""
12552 if test "${enable_crypto_benchmarking}" = "yes"; then :
c2d29773 12553
f3ddda9b
AJ
12554 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12555$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12556as_fn_error $? "--enable-crypto-benchmarking was given but clock_gettime(2) is not available
12557See \`config.log' for more details" "$LINENO" 5; }
c2d29773 12558
f3ddda9b 12559else
c2d29773 12560
f3ddda9b
AJ
12561 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the crypto benchmarking utility will not be available" >&5
12562$as_echo "$as_me: WARNING: the crypto benchmarking utility will not be available" >&2;}
c2d29773 12563
f3ddda9b 12564fi
c2d29773 12565
f3ddda9b 12566fi
c2d29773
AJ
12567
12568
f3ddda9b 12569fi
c2d29773 12570
3828bfac 12571
c2d29773 12572
f3ddda9b 12573 LIBS="${LIBS_SAVED}"
c2d29773 12574
f3ddda9b 12575 unset LIBS_SAVED
0df7ff62 12576
c77f30fc
AJ
12577
12578
f3ddda9b 12579 ECDH_X25519_TOOL="No"
3828bfac 12580
f3ddda9b
AJ
12581 # Check whether --enable-ecdh-x25519-tool was given.
12582if test "${enable_ecdh_x25519_tool+set}" = set; then :
12583 enableval=$enable_ecdh_x25519_tool;
12584else
12585 enable_ecdh_x25519_tool="auto"
12586fi
3828bfac
AJ
12587
12588
f3ddda9b
AJ
12589 case "x${enable_ecdh_x25519_tool}" in #(
12590 xno) :
12591 ;; #(
12592 xyes) :
12593 ;; #(
12594 xauto) :
12595 ;; #(
12596 *) :
3828bfac 12597
f3ddda9b
AJ
12598 as_fn_error $? "invalid option for --enable-ecdh-x25519-tool" "$LINENO" 5
12599 ;;
12600esac
3828bfac 12601
f3ddda9b 12602 if test "${enable_ecdh_x25519_tool}" != "no"; then :
3828bfac 12603
f3ddda9b 12604 if test "x${FEATURE_SASL_ECDH_X25519_CHALLENGE}" = "xYes"; then :
c77f30fc 12605
f3ddda9b 12606 ECDH_X25519_TOOL="Yes"
c77f30fc
AJ
12607
12608
f3ddda9b 12609 ECDH_X25519_TOOL_COND_D="ecdh-x25519-tool"
c77f30fc
AJ
12610
12611
c77f30fc 12612
f3ddda9b 12613$as_echo "#define HAVE_ANYLIB_ECDH_X25519 1" >>confdefs.h
c77f30fc 12614
c77f30fc 12615
c77f30fc 12616
f3ddda9b 12617else
c77f30fc 12618
f3ddda9b 12619 if test "${enable_ecdh_x25519_tool}" = "yes"; then :
c2d29773 12620
f3ddda9b 12621 as_fn_error $? "--enable-ecdh-x25519-tool requires a crypto library capable of X25519 ECDH" "$LINENO" 5
c77f30fc 12622
f3ddda9b 12623fi
c77f30fc 12624
f3ddda9b 12625fi
c77f30fc 12626
f3ddda9b 12627fi
c77f30fc
AJ
12628
12629
c77f30fc 12630
f3ddda9b 12631 ECDSA_NIST256P_TOOLS="No"
c77f30fc 12632
f3ddda9b
AJ
12633 # Check whether --enable-ecdsa-nist256p-tools was given.
12634if test "${enable_ecdsa_nist256p_tools+set}" = set; then :
12635 enableval=$enable_ecdsa_nist256p_tools;
12636else
12637 enable_ecdsa_nist256p_tools="auto"
12638fi
c77f30fc 12639
c77f30fc 12640
f3ddda9b
AJ
12641 case "x${enable_ecdsa_nist256p_tools}" in #(
12642 xno) :
12643 ;; #(
12644 xyes) :
12645 ;; #(
12646 xauto) :
12647 ;; #(
12648 *) :
12649
12650 as_fn_error $? "invalid option for --enable-ecdsa-nist256p-tools" "$LINENO" 5
12651 ;;
12652esac
c77f30fc 12653
f3ddda9b 12654 if test "${enable_ecdsa_nist256p_tools}" != "no"; then :
3828bfac 12655
f3ddda9b 12656 if test "x${FEATURE_SASL_ECDSA_NIST256P_CHALLENGE}" = "xYes"; then :
3828bfac 12657
f3ddda9b 12658 ECDSA_NIST256P_TOOLS="Yes"
c77f30fc 12659
c77f30fc 12660
f3ddda9b 12661 ECDSA_NIST256P_TOOLS_COND_D="ecdsadecode ecdsakeygen ecdsasign"
c77f30fc 12662
c77f30fc
AJ
12663
12664
f3ddda9b 12665else
c2d29773 12666
f3ddda9b
AJ
12667 if test "${enable_ecdsa_nist256p_tools}" = "yes"; then :
12668
12669 as_fn_error $? "--enable-ecdsa-nist256p-tools requires a crypto library capable of ECDSA with NIST P-256" "$LINENO" 5
c77f30fc 12670
3828bfac 12671fi
c77f30fc 12672
f3ddda9b 12673fi
c77f30fc 12674
f3ddda9b 12675fi
c77f30fc 12676
c77f30fc 12677
3828bfac 12678
f3ddda9b
AJ
12679 DATADIR='${prefix}/etc'
12680 DOCDIR='${prefix}/doc'
12681 LOCALEDIR='${datadir}/locale'
12682 LOGDIR='${prefix}/var'
12683 MODDIR='${exec_prefix}'
12684 RUNDIR='${prefix}/var'
12685 SHAREDIR='${prefix}'
c77f30fc 12686
f3ddda9b
AJ
12687 # Check whether --enable-fhs-paths was given.
12688if test "${enable_fhs_paths+set}" = set; then :
12689 enableval=$enable_fhs_paths;
3828bfac 12690else
f3ddda9b
AJ
12691 enable_fhs_paths="no"
12692fi
c77f30fc 12693
c77f30fc 12694
f3ddda9b
AJ
12695 case "x${enable_fhs_paths}" in #(
12696 xno) :
f54ed0d4 12697 ;; #(
f3ddda9b 12698 xyes) :
c77f30fc 12699
c77f30fc 12700
f3ddda9b 12701$as_echo "#define ATHEME_ENABLE_FHS_PATHS 1" >>confdefs.h
a824f8db 12702
f3ddda9b
AJ
12703 DATADIR='${localstatedir}/lib/atheme'
12704 DOCDIR='${datadir}/doc/atheme'
12705 LOGDIR='${localstatedir}/log/atheme'
12706 MODDIR='${libdir}/atheme'
12707 RUNDIR='${localstatedir}/run/atheme'
12708 SHAREDIR='${datadir}/atheme'
12709 ;; #(
12710 *) :
a824f8db 12711
f3ddda9b
AJ
12712 as_fn_error $? "invalid option for --enable-fhs-paths" "$LINENO" 5
12713 ;;
12714esac
a824f8db 12715
3828bfac 12716
3828bfac 12717
3828bfac 12718
fe2e2f74
WP
12719
12720
65863905 12721
21f35da3 12722
3828bfac 12723
21f35da3 12724
21f35da3 12725
f3ddda9b 12726 HEAP_ALLOCATOR="No"
21f35da3 12727
f3ddda9b
AJ
12728 # Check whether --enable-heap-allocator was given.
12729if test "${enable_heap_allocator+set}" = set; then :
12730 enableval=$enable_heap_allocator;
12731else
12732 enable_heap_allocator="yes"
3828bfac 12733fi
f3ddda9b
AJ
12734
12735
12736 case "x${enable_heap_allocator}" in #(
12737 xno) :
f54ed0d4 12738 ;; #(
f3ddda9b 12739 xyes) :
f54ed0d4 12740
f3ddda9b 12741 HEAP_ALLOCATOR="Yes"
21f35da3 12742
f3ddda9b 12743$as_echo "#define ATHEME_ENABLE_HEAP_ALLOCATOR 1" >>confdefs.h
f54ed0d4 12744
f3ddda9b
AJ
12745 ;; #(
12746 *) :
f54ed0d4 12747
f3ddda9b
AJ
12748 as_fn_error $? "invalid option for --enable-heap-allocator" "$LINENO" 5
12749 ;;
12750esac
f54ed0d4 12751
f54ed0d4 12752
f54ed0d4 12753
f3ddda9b 12754 LARGE_NET="No"
f54ed0d4 12755
f3ddda9b
AJ
12756 # Check whether --enable-large-net was given.
12757if test "${enable_large_net+set}" = set; then :
12758 enableval=$enable_large_net;
12759else
12760 enable_large_net="no"
f54ed0d4 12761fi
f3ddda9b
AJ
12762
12763
12764 case "x${enable_large_net}" in #(
12765 xno) :
f54ed0d4 12766 ;; #(
f3ddda9b 12767 xyes) :
f54ed0d4 12768
f3ddda9b 12769 LARGE_NET="Yes"
21f35da3 12770
f3ddda9b 12771$as_echo "#define ATHEME_ENABLE_LARGE_NET 1" >>confdefs.h
21f35da3 12772
f3ddda9b
AJ
12773 ;; #(
12774 *) :
21f35da3 12775
f3ddda9b
AJ
12776 as_fn_error $? "invalid option for --enable-large-net" "$LINENO" 5
12777 ;;
12778esac
21f35da3 12779
21f35da3 12780
3828bfac 12781
f3ddda9b 12782 LEGACY_PWCRYPTO="No"
21f35da3 12783
f3ddda9b
AJ
12784 # Check whether --enable-legacy-pwcrypto was given.
12785if test "${enable_legacy_pwcrypto+set}" = set; then :
12786 enableval=$enable_legacy_pwcrypto;
12787else
12788 enable_legacy_pwcrypto="no"
21f35da3
AJ
12789fi
12790
3828bfac 12791
f3ddda9b
AJ
12792 case "x${enable_legacy_pwcrypto}" in #(
12793 xno) :
12794 ;; #(
12795 xyes) :
3828bfac 12796
f3ddda9b 12797 LEGACY_PWCRYPTO="Yes"
21f35da3 12798
f3ddda9b 12799$as_echo "#define ATHEME_ENABLE_LEGACY_PWCRYPTO 1" >>confdefs.h
21f35da3 12800
21f35da3 12801
21f35da3 12802
f3ddda9b 12803 LEGACY_PWCRYPTO_COND_D="legacy"
21f35da3 12804
21f35da3 12805
f3ddda9b
AJ
12806 ;; #(
12807 *) :
21f35da3 12808
f3ddda9b
AJ
12809 as_fn_error $? "invalid option for --enable-legacy-pwcrypto" "$LINENO" 5
12810 ;;
12811esac
21f35da3
AJ
12812
12813
12814
f3ddda9b
AJ
12815 REPRODUCIBLE_BUILDS="No"
12816
12817 # Check whether --enable-reproducible-builds was given.
12818if test "${enable_reproducible_builds+set}" = set; then :
12819 enableval=$enable_reproducible_builds;
21f35da3 12820else
f3ddda9b
AJ
12821 enable_reproducible_builds="no"
12822fi
21f35da3 12823
21f35da3 12824
f3ddda9b
AJ
12825 case "x${enable_reproducible_builds}" in #(
12826 xno) :
12827 ;; #(
12828 xyes) :
21f35da3 12829
f3ddda9b 12830 REPRODUCIBLE_BUILDS="Yes"
21f35da3 12831
f3ddda9b 12832$as_echo "#define ATHEME_ENABLE_REPRODUCIBLE_BUILDS 1" >>confdefs.h
21f35da3 12833
f3ddda9b 12834 if test "x${SOURCE_DATE_EPOCH}" != "x"; then :
21f35da3 12835
21f35da3 12836
f3ddda9b
AJ
12837cat >>confdefs.h <<_ACEOF
12838#define SOURCE_DATE_EPOCH ${SOURCE_DATE_EPOCH}
3828bfac 12839_ACEOF
21f35da3 12840
21f35da3
AJ
12841
12842fi
f54ed0d4
AJ
12843 ;; #(
12844 *) :
3828bfac 12845
f3ddda9b 12846 as_fn_error $? "invalid option for --enable-reproducible-builds" "$LINENO" 5
f54ed0d4
AJ
12847 ;;
12848esac
21f35da3
AJ
12849
12850
3828bfac
AJ
12851# These must be here, not above, or they might interfere with library and feature tests
12852# Explanation is that these modify one or more of CFLAGS, CPPFLAGS, LDFLAGS, and LIBS
12853# Warnings should be last so that diagnostics don't clutter the contents of config.log
12854# Sanitizers must be before CFLAGS and LDFLAGS
21f35da3 12855
a57c74d8 12856
3828bfac 12857 COMPILER_SANITIZERS="No"
d45b7041 12858 COMPILER_SANITIZERS_ENABLED=""
3828bfac
AJ
12859
12860 # Check whether --enable-compiler-sanitizers was given.
12861if test "${enable_compiler_sanitizers+set}" = set; then :
12862 enableval=$enable_compiler_sanitizers;
a57c74d8 12863else
3828bfac 12864 enable_compiler_sanitizers="no"
a57c74d8
AJ
12865fi
12866
12867
f54ed0d4
AJ
12868 case "x${enable_compiler_sanitizers}" in #(
12869 xno) :
12870
12871 # Enable compiler optimisations (what autoconf would have done if we didn't explicitly overrule it)
12872
12873
12874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -O2 " >&5
12875$as_echo_n "checking for C compiler flag(s) -O2 ... " >&6; }
12876
12877 CFLAGS_SAVED="${CFLAGS:-}"
12878 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-O2"
12879
12880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12881/* end confdefs.h. */
12882
12883
12884 #ifdef HAVE_STDDEF_H
12885 # include <stddef.h>
12886 #endif
12887 static int
12888 return_zero(void)
12889 {
12890 return 0;
12891 }
12892
12893int
12894main ()
12895{
12896
12897 int zero = return_zero();
12898
12899 ;
12900 return 0;
12901}
12902
12903_ACEOF
12904if ac_fn_c_try_compile "$LINENO"; then :
12905
12906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12907$as_echo "yes" >&6; }
12908 ATHEME_TEST_CC_FLAGS_RESULT="yes"
12909
12910else
12911
12912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12913$as_echo "no" >&6; }
12914 ATHEME_TEST_CC_FLAGS_RESULT="no"
12915 CFLAGS="${CFLAGS_SAVED}"
12916
12917fi
12918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12919
12920 unset CFLAGS_SAVED
12921
12922 ;; #(
12923 xyes) :
a57c74d8 12924
f54ed0d4 12925 if test "${HEAP_ALLOCATOR}" = "Yes"; then :
a57c74d8 12926
f54ed0d4 12927 as_fn_error $? "To use --enable-compiler-sanitizers you must pass --disable-heap-allocator" "$LINENO" 5
a57c74d8 12928
90121a3e
AJ
12929fi
12930
f54ed0d4 12931 # Disable compiler optimisations for more accurate stack-traces
90121a3e
AJ
12932
12933
12934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -O0 " >&5
12935$as_echo_n "checking for C compiler flag(s) -O0 ... " >&6; }
12936
12937 CFLAGS_SAVED="${CFLAGS:-}"
12938 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-O0"
12939
12940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3828bfac 12941/* end confdefs.h. */
a57c74d8 12942
a57c74d8 12943
90121a3e
AJ
12944 #ifdef HAVE_STDDEF_H
12945 # include <stddef.h>
12946 #endif
12947 static int
12948 return_zero(void)
12949 {
12950 return 0;
12951 }
12952
3828bfac
AJ
12953int
12954main ()
12955{
a57c74d8 12956
90121a3e
AJ
12957 int zero = return_zero();
12958
3828bfac
AJ
12959 ;
12960 return 0;
12961}
a57c74d8 12962
3828bfac
AJ
12963_ACEOF
12964if ac_fn_c_try_compile "$LINENO"; then :
a57c74d8 12965
90121a3e 12966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3828bfac 12967$as_echo "yes" >&6; }
90121a3e 12968 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a57c74d8
AJ
12969
12970else
12971
90121a3e 12972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3828bfac 12973$as_echo "no" >&6; }
90121a3e
AJ
12974 ATHEME_TEST_CC_FLAGS_RESULT="no"
12975 CFLAGS="${CFLAGS_SAVED}"
a57c74d8
AJ
12976
12977fi
3828bfac 12978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a57c74d8 12979
90121a3e 12980 unset CFLAGS_SAVED
a57c74d8 12981
81edff03 12982
f54ed0d4 12983 # -fsanitize= benefits from these, but they're not strictly necessary
a57c74d8 12984
90121a3e
AJ
12985
12986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -fno-omit-frame-pointer " >&5
3828bfac 12987$as_echo_n "checking for C compiler flag(s) -fno-omit-frame-pointer ... " >&6; }
a57c74d8 12988
90121a3e
AJ
12989 CFLAGS_SAVED="${CFLAGS:-}"
12990 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fno-omit-frame-pointer"
a57c74d8 12991
90121a3e 12992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3828bfac 12993/* end confdefs.h. */
a57c74d8 12994
a57c74d8 12995
90121a3e
AJ
12996 #ifdef HAVE_STDDEF_H
12997 # include <stddef.h>
12998 #endif
12999 static int
13000 return_zero(void)
13001 {
13002 return 0;
13003 }
13004
3828bfac
AJ
13005int
13006main ()
13007{
a57c74d8 13008
90121a3e
AJ
13009 int zero = return_zero();
13010
3828bfac
AJ
13011 ;
13012 return 0;
13013}
a57c74d8 13014
3828bfac
AJ
13015_ACEOF
13016if ac_fn_c_try_compile "$LINENO"; then :
a57c74d8 13017
90121a3e 13018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3828bfac 13019$as_echo "yes" >&6; }
90121a3e 13020 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a57c74d8
AJ
13021
13022else
13023
90121a3e 13024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3828bfac 13025$as_echo "no" >&6; }
90121a3e
AJ
13026 ATHEME_TEST_CC_FLAGS_RESULT="no"
13027 CFLAGS="${CFLAGS_SAVED}"
a57c74d8
AJ
13028
13029fi
3828bfac 13030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a57c74d8 13031
90121a3e 13032 unset CFLAGS_SAVED
a57c74d8
AJ
13033
13034
f7291891 13035
90121a3e 13036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -fno-optimize-sibling-calls " >&5
3828bfac 13037$as_echo_n "checking for C compiler flag(s) -fno-optimize-sibling-calls ... " >&6; }
f7291891 13038
90121a3e
AJ
13039 CFLAGS_SAVED="${CFLAGS:-}"
13040 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fno-optimize-sibling-calls"
41e63e1f 13041
90121a3e 13042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3828bfac 13043/* end confdefs.h. */
083f09b4 13044
f7291891 13045
90121a3e
AJ
13046 #ifdef HAVE_STDDEF_H
13047 # include <stddef.h>
13048 #endif
13049 static int
13050 return_zero(void)
13051 {
13052 return 0;
13053 }
13054
3828bfac
AJ
13055int
13056main ()
13057{
f7291891 13058
90121a3e
AJ
13059 int zero = return_zero();
13060
3828bfac
AJ
13061 ;
13062 return 0;
13063}
f7291891 13064
3828bfac
AJ
13065_ACEOF
13066if ac_fn_c_try_compile "$LINENO"; then :
a7b9a285 13067
90121a3e 13068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3828bfac 13069$as_echo "yes" >&6; }
90121a3e 13070 ATHEME_TEST_CC_FLAGS_RESULT="yes"
f7291891 13071
3828bfac 13072else
f7291891 13073
90121a3e 13074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3828bfac 13075$as_echo "no" >&6; }
90121a3e
AJ
13076 ATHEME_TEST_CC_FLAGS_RESULT="no"
13077 CFLAGS="${CFLAGS_SAVED}"
fe1e7dec 13078
fe1e7dec 13079fi
3828bfac 13080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fe1e7dec 13081
90121a3e 13082 unset CFLAGS_SAVED
fe1e7dec 13083
fe1e7dec 13084
f54ed0d4
AJ
13085 # Some compilers (like Clang) require LTO to be enabled for some of their sanitizers to function.
13086 # This test will fail if you are using Clang and not using an LLVM bitcode-parsing-capable linker.
13087 # Clang in LTO mode compiles to LLVM bitcode, not machine code.
13088 #
13089 # The linker is responsible for translating that to machine code. If you want to use Clang, you
13090 # must set LDFLAGS="-fuse-ld=lld", to use the LLVM linker, or you can use the Gold linker with
13091 # the LLVM linker plugin (an exercise for the reader).
fe1e7dec
AJ
13092
13093
3828bfac
AJ
13094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fvisibility=default -flto " >&5
13095$as_echo_n "checking for C compiler *and* linker flag(s) -fvisibility=default -flto ... " >&6; }
fe1e7dec 13096
90121a3e
AJ
13097 CFLAGS_SAVED="${CFLAGS:-}"
13098 LDFLAGS_SAVED="${LDFLAGS:-}"
f7291891 13099
90121a3e
AJ
13100 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fvisibility=default -flto"
13101 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fvisibility=default -flto"
f7291891 13102
3828bfac
AJ
13103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13104/* end confdefs.h. */
083f09b4 13105
083f09b4 13106
3828bfac
AJ
13107 #ifdef HAVE_STDDEF_H
13108 # include <stddef.h>
13109 #endif
13110 static int
90121a3e 13111 return_zero(void)
3828bfac
AJ
13112 {
13113 return 0;
13114 }
083f09b4 13115
3828bfac
AJ
13116int
13117main ()
13118{
f7291891 13119
90121a3e 13120 int zero = return_zero();
f7291891 13121
3828bfac
AJ
13122 ;
13123 return 0;
13124}
f7291891 13125
3828bfac
AJ
13126_ACEOF
13127if ac_fn_c_try_link "$LINENO"; then :
13128
13129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13130$as_echo "yes" >&6; }
90121a3e 13131 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
554602d0 13132
554602d0 13133else
554602d0 13134
3828bfac
AJ
13135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13136$as_echo "no" >&6; }
90121a3e 13137 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
3828bfac
AJ
13138 CFLAGS="${CFLAGS_SAVED}"
13139 LDFLAGS="${LDFLAGS_SAVED}"
554602d0 13140
3828bfac
AJ
13141fi
13142rm -f core conftest.err conftest.$ac_objext \
13143 conftest$ac_exeext conftest.$ac_ext
554602d0 13144
90121a3e
AJ
13145 unset CFLAGS_SAVED
13146 unset LDFLAGS_SAVED
6a0c030d 13147
6a0c030d 13148
f54ed0d4 13149 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "no"; then :
a824f8db 13150
f54ed0d4 13151 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
d45b7041
AJ
13152$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13153as_fn_error $? "--enable-compiler-sanitizers was given, but LTO (a common pre-requisite) could not be enabled
13154See \`config.log' for more details" "$LINENO" 5; }
a824f8db 13155
d45b7041
AJ
13156fi
13157
f54ed0d4 13158 # Now on to the good stuff ...
a824f8db 13159
554602d0 13160
90121a3e
AJ
13161
13162
3828bfac
AJ
13163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=address " >&5
13164$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=address ... " >&6; }
554602d0 13165
90121a3e
AJ
13166 CFLAGS_SAVED="${CFLAGS:-}"
13167 LDFLAGS_SAVED="${LDFLAGS:-}"
554602d0 13168
90121a3e
AJ
13169 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=address"
13170 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=address"
a7b9a285 13171
3828bfac
AJ
13172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13173/* end confdefs.h. */
083f09b4 13174
be144253 13175
3828bfac
AJ
13176 #ifdef HAVE_STDDEF_H
13177 # include <stddef.h>
13178 #endif
13179 static int
90121a3e 13180 return_zero(void)
3828bfac
AJ
13181 {
13182 return 0;
13183 }
be144253 13184
3828bfac
AJ
13185int
13186main ()
13187{
083f09b4 13188
90121a3e 13189 int zero = return_zero();
6dac1548 13190
3828bfac
AJ
13191 ;
13192 return 0;
13193}
6dac1548 13194
6dac1548 13195_ACEOF
3828bfac 13196if ac_fn_c_try_link "$LINENO"; then :
6dac1548 13197
3828bfac
AJ
13198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13199$as_echo "yes" >&6; }
90121a3e 13200 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
6dac1548 13201
3828bfac 13202else
083f09b4 13203
3828bfac
AJ
13204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13205$as_echo "no" >&6; }
90121a3e 13206 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
3828bfac
AJ
13207 CFLAGS="${CFLAGS_SAVED}"
13208 LDFLAGS="${LDFLAGS_SAVED}"
4f9e5d3c 13209
4f9e5d3c 13210fi
3828bfac
AJ
13211rm -f core conftest.err conftest.$ac_objext \
13212 conftest$ac_exeext conftest.$ac_ext
4f9e5d3c 13213
90121a3e
AJ
13214 unset CFLAGS_SAVED
13215 unset LDFLAGS_SAVED
13216
13217 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
d45b7041
AJ
13218
13219 COMPILER_SANITIZERS="Yes"
13220 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }address"
13221
90121a3e
AJ
13222fi
13223
13224
13225
4f9e5d3c 13226
fe1e7dec 13227
d45b7041
AJ
13228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=bounds " >&5
13229$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=bounds ... " >&6; }
fe1e7dec 13230
90121a3e
AJ
13231 CFLAGS_SAVED="${CFLAGS:-}"
13232 LDFLAGS_SAVED="${LDFLAGS:-}"
4f9e5d3c 13233
d45b7041
AJ
13234 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=bounds"
13235 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=bounds"
4f9e5d3c 13236
3828bfac
AJ
13237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13238/* end confdefs.h. */
4f9e5d3c 13239
4f9e5d3c 13240
3828bfac
AJ
13241 #ifdef HAVE_STDDEF_H
13242 # include <stddef.h>
13243 #endif
13244 static int
90121a3e 13245 return_zero(void)
3828bfac
AJ
13246 {
13247 return 0;
13248 }
4f9e5d3c 13249
3828bfac
AJ
13250int
13251main ()
13252{
4f9e5d3c 13253
90121a3e 13254 int zero = return_zero();
4f9e5d3c 13255
3828bfac
AJ
13256 ;
13257 return 0;
13258}
083f09b4 13259
3828bfac
AJ
13260_ACEOF
13261if ac_fn_c_try_link "$LINENO"; then :
44d10669 13262
3828bfac
AJ
13263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13264$as_echo "yes" >&6; }
90121a3e 13265 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
44d10669 13266
44d10669 13267else
3828bfac
AJ
13268
13269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13270$as_echo "no" >&6; }
90121a3e 13271 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
3828bfac
AJ
13272 CFLAGS="${CFLAGS_SAVED}"
13273 LDFLAGS="${LDFLAGS_SAVED}"
13274
44d10669 13275fi
3828bfac
AJ
13276rm -f core conftest.err conftest.$ac_objext \
13277 conftest$ac_exeext conftest.$ac_ext
44d10669 13278
90121a3e
AJ
13279 unset CFLAGS_SAVED
13280 unset LDFLAGS_SAVED
13281
13282 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
d45b7041
AJ
13283
13284 COMPILER_SANITIZERS="Yes"
13285 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }bounds"
13286
90121a3e
AJ
13287fi
13288
f54ed0d4 13289 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "no"; then :
90121a3e
AJ
13290
13291
44d10669 13292
44d10669 13293
d45b7041
AJ
13294
13295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=array-bounds " >&5
13296$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=array-bounds ... " >&6; }
44d10669 13297
90121a3e
AJ
13298 CFLAGS_SAVED="${CFLAGS:-}"
13299 LDFLAGS_SAVED="${LDFLAGS:-}"
44d10669 13300
d45b7041
AJ
13301 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=array-bounds"
13302 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=array-bounds"
44d10669 13303
3828bfac
AJ
13304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13305/* end confdefs.h. */
44d10669 13306
44d10669 13307
3828bfac
AJ
13308 #ifdef HAVE_STDDEF_H
13309 # include <stddef.h>
13310 #endif
13311 static int
90121a3e 13312 return_zero(void)
3828bfac
AJ
13313 {
13314 return 0;
13315 }
13316
13317int
13318main ()
13319{
fbced731 13320
90121a3e 13321 int zero = return_zero();
fbced731 13322
3828bfac
AJ
13323 ;
13324 return 0;
13325}
fbced731 13326
3828bfac
AJ
13327_ACEOF
13328if ac_fn_c_try_link "$LINENO"; then :
fbced731 13329
3828bfac
AJ
13330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13331$as_echo "yes" >&6; }
90121a3e 13332 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
fbced731 13333
3828bfac 13334else
44d10669 13335
3828bfac
AJ
13336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13337$as_echo "no" >&6; }
90121a3e 13338 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
3828bfac
AJ
13339 CFLAGS="${CFLAGS_SAVED}"
13340 LDFLAGS="${LDFLAGS_SAVED}"
44d10669 13341
3828bfac
AJ
13342fi
13343rm -f core conftest.err conftest.$ac_objext \
13344 conftest$ac_exeext conftest.$ac_ext
44d10669 13345
90121a3e
AJ
13346 unset CFLAGS_SAVED
13347 unset LDFLAGS_SAVED
13348
13349 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
d45b7041
AJ
13350
13351 COMPILER_SANITIZERS="Yes"
13352 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }array-bounds"
13353
90121a3e
AJ
13354fi
13355
13356
13357
44d10669 13358
44d10669 13359
d45b7041
AJ
13360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=local-bounds " >&5
13361$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=local-bounds ... " >&6; }
44d10669 13362
90121a3e
AJ
13363 CFLAGS_SAVED="${CFLAGS:-}"
13364 LDFLAGS_SAVED="${LDFLAGS:-}"
44d10669 13365
d45b7041
AJ
13366 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=local-bounds"
13367 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=local-bounds"
44d10669 13368
3828bfac
AJ
13369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13370/* end confdefs.h. */
ad5cc67e 13371
44d10669 13372
3828bfac
AJ
13373 #ifdef HAVE_STDDEF_H
13374 # include <stddef.h>
13375 #endif
13376 static int
90121a3e 13377 return_zero(void)
3828bfac
AJ
13378 {
13379 return 0;
13380 }
44d10669 13381
3828bfac
AJ
13382int
13383main ()
13384{
44d10669 13385
90121a3e 13386 int zero = return_zero();
ad5cc67e 13387
3828bfac
AJ
13388 ;
13389 return 0;
13390}
ad5cc67e 13391
3828bfac
AJ
13392_ACEOF
13393if ac_fn_c_try_link "$LINENO"; then :
44d10669 13394
3828bfac
AJ
13395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13396$as_echo "yes" >&6; }
90121a3e 13397 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
44d10669
AJ
13398
13399else
13400
3828bfac
AJ
13401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13402$as_echo "no" >&6; }
90121a3e 13403 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
3828bfac
AJ
13404 CFLAGS="${CFLAGS_SAVED}"
13405 LDFLAGS="${LDFLAGS_SAVED}"
ad5cc67e 13406
fbced731 13407fi
3828bfac
AJ
13408rm -f core conftest.err conftest.$ac_objext \
13409 conftest$ac_exeext conftest.$ac_ext
fbced731 13410
90121a3e
AJ
13411 unset CFLAGS_SAVED
13412 unset LDFLAGS_SAVED
13413
13414 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
d45b7041
AJ
13415
13416 COMPILER_SANITIZERS="Yes"
13417 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }local-bounds"
13418
90121a3e
AJ
13419fi
13420
13421
d45b7041
AJ
13422fi
13423
90121a3e 13424
fbced731
AJ
13425
13426
d45b7041
AJ
13427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=float-divide-by-zero " >&5
13428$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=float-divide-by-zero ... " >&6; }
fbced731 13429
90121a3e
AJ
13430 CFLAGS_SAVED="${CFLAGS:-}"
13431 LDFLAGS_SAVED="${LDFLAGS:-}"
fbced731 13432
d45b7041
AJ
13433 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=float-divide-by-zero"
13434 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=float-divide-by-zero"
fbced731 13435
3828bfac
AJ
13436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13437/* end confdefs.h. */
fbced731 13438
fbced731 13439
3828bfac
AJ
13440 #ifdef HAVE_STDDEF_H
13441 # include <stddef.h>
13442 #endif
13443 static int
90121a3e 13444 return_zero(void)
3828bfac
AJ
13445 {
13446 return 0;
13447 }
44d10669 13448
3828bfac
AJ
13449int
13450main ()
13451{
44d10669 13452
90121a3e 13453 int zero = return_zero();
44d10669 13454
3828bfac
AJ
13455 ;
13456 return 0;
13457}
ad5cc67e 13458
3828bfac
AJ
13459_ACEOF
13460if ac_fn_c_try_link "$LINENO"; then :
ad5cc67e 13461
3828bfac
AJ
13462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13463$as_echo "yes" >&6; }
90121a3e 13464 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
44d10669
AJ
13465
13466else
13467
3828bfac
AJ
13468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13469$as_echo "no" >&6; }
90121a3e 13470 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
3828bfac
AJ
13471 CFLAGS="${CFLAGS_SAVED}"
13472 LDFLAGS="${LDFLAGS_SAVED}"
ad5cc67e
AJ
13473
13474fi
3828bfac
AJ
13475rm -f core conftest.err conftest.$ac_objext \
13476 conftest$ac_exeext conftest.$ac_ext
44d10669 13477
90121a3e
AJ
13478 unset CFLAGS_SAVED
13479 unset LDFLAGS_SAVED
13480
13481 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
d45b7041
AJ
13482
13483 COMPILER_SANITIZERS="Yes"
13484 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }float-divide-by-zero"
13485
90121a3e
AJ
13486fi
13487
13488
13489
44d10669
AJ
13490
13491
3828bfac
AJ
13492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=leak " >&5
13493$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=leak ... " >&6; }
44d10669 13494
90121a3e
AJ
13495 CFLAGS_SAVED="${CFLAGS:-}"
13496 LDFLAGS_SAVED="${LDFLAGS:-}"
44d10669 13497
90121a3e
AJ
13498 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=leak"
13499 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=leak"
ad5cc67e 13500
3828bfac
AJ
13501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13502/* end confdefs.h. */
ad5cc67e 13503
ad5cc67e 13504
3828bfac
AJ
13505 #ifdef HAVE_STDDEF_H
13506 # include <stddef.h>
13507 #endif
13508 static int
90121a3e 13509 return_zero(void)
3828bfac
AJ
13510 {
13511 return 0;
13512 }
ad5cc67e 13513
3828bfac
AJ
13514int
13515main ()
13516{
ad5cc67e 13517
90121a3e 13518 int zero = return_zero();
ad5cc67e 13519
3828bfac
AJ
13520 ;
13521 return 0;
13522}
44d10669 13523
3828bfac
AJ
13524_ACEOF
13525if ac_fn_c_try_link "$LINENO"; then :
ad5cc67e 13526
3828bfac
AJ
13527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13528$as_echo "yes" >&6; }
90121a3e 13529 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
44d10669 13530
44d10669 13531else
3828bfac
AJ
13532
13533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13534$as_echo "no" >&6; }
90121a3e 13535 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
3828bfac
AJ
13536 CFLAGS="${CFLAGS_SAVED}"
13537 LDFLAGS="${LDFLAGS_SAVED}"
13538
44d10669 13539fi
3828bfac
AJ
13540rm -f core conftest.err conftest.$ac_objext \
13541 conftest$ac_exeext conftest.$ac_ext
44d10669 13542
90121a3e
AJ
13543 unset CFLAGS_SAVED
13544 unset LDFLAGS_SAVED
13545
13546 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
d45b7041
AJ
13547
13548 COMPILER_SANITIZERS="Yes"
13549 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }leak"
13550
90121a3e
AJ
13551fi
13552
13553
13554
44d10669 13555
3828bfac 13556
d45b7041
AJ
13557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=undefined " >&5
13558$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=undefined ... " >&6; }
3828bfac 13559
90121a3e
AJ
13560 CFLAGS_SAVED="${CFLAGS:-}"
13561 LDFLAGS_SAVED="${LDFLAGS:-}"
3828bfac 13562
d45b7041
AJ
13563 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=undefined"
13564 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=undefined"
3828bfac 13565
6df79d8f 13566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ad5cc67e
AJ
13567/* end confdefs.h. */
13568
13569
3828bfac
AJ
13570 #ifdef HAVE_STDDEF_H
13571 # include <stddef.h>
6df79d8f 13572 #endif
3828bfac 13573 static int
90121a3e 13574 return_zero(void)
3828bfac
AJ
13575 {
13576 return 0;
13577 }
ad5cc67e
AJ
13578
13579int
13580main ()
13581{
13582
90121a3e 13583 int zero = return_zero();
ad5cc67e
AJ
13584
13585 ;
13586 return 0;
13587}
13588
13589_ACEOF
3828bfac 13590if ac_fn_c_try_link "$LINENO"; then :
ad5cc67e 13591
6df79d8f 13592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
ad5cc67e 13593$as_echo "yes" >&6; }
90121a3e 13594 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
44d10669 13595
3828bfac
AJ
13596else
13597
13598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13599$as_echo "no" >&6; }
90121a3e 13600 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
3828bfac
AJ
13601 CFLAGS="${CFLAGS_SAVED}"
13602 LDFLAGS="${LDFLAGS_SAVED}"
13603
13604fi
13605rm -f core conftest.err conftest.$ac_objext \
13606 conftest$ac_exeext conftest.$ac_ext
13607
90121a3e
AJ
13608 unset CFLAGS_SAVED
13609 unset LDFLAGS_SAVED
13610
13611 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
d45b7041
AJ
13612
13613 COMPILER_SANITIZERS="Yes"
13614 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }undefined"
13615
90121a3e
AJ
13616fi
13617
f54ed0d4 13618 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "no"; then :
90121a3e
AJ
13619
13620
3828bfac
AJ
13621
13622
d45b7041
AJ
13623
13624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=alignment " >&5
13625$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=alignment ... " >&6; }
3828bfac 13626
90121a3e
AJ
13627 CFLAGS_SAVED="${CFLAGS:-}"
13628 LDFLAGS_SAVED="${LDFLAGS:-}"
3828bfac 13629
d45b7041
AJ
13630 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=alignment"
13631 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=alignment"
3828bfac
AJ
13632
13633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ad5cc67e
AJ
13634/* end confdefs.h. */
13635
13636
3828bfac
AJ
13637 #ifdef HAVE_STDDEF_H
13638 # include <stddef.h>
13639 #endif
13640 static int
90121a3e 13641 return_zero(void)
3828bfac
AJ
13642 {
13643 return 0;
13644 }
ad5cc67e
AJ
13645
13646int
13647main ()
13648{
13649
90121a3e 13650 int zero = return_zero();
3828bfac 13651
ad5cc67e
AJ
13652 ;
13653 return 0;
13654}
13655
13656_ACEOF
13657if ac_fn_c_try_link "$LINENO"; then :
13658
3828bfac 13659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
ad5cc67e 13660$as_echo "yes" >&6; }
90121a3e 13661 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
ad5cc67e
AJ
13662
13663else
13664
3828bfac 13665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
ad5cc67e 13666$as_echo "no" >&6; }
90121a3e 13667 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
3828bfac
AJ
13668 CFLAGS="${CFLAGS_SAVED}"
13669 LDFLAGS="${LDFLAGS_SAVED}"
ad5cc67e
AJ
13670
13671fi
13672rm -f core conftest.err conftest.$ac_objext \
13673 conftest$ac_exeext conftest.$ac_ext
13674
90121a3e
AJ
13675 unset CFLAGS_SAVED
13676 unset LDFLAGS_SAVED
13677
13678 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
d45b7041
AJ
13679
13680 COMPILER_SANITIZERS="Yes"
13681 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }alignment"
13682
90121a3e
AJ
13683fi
13684
13685
13686
ad5cc67e 13687
ad5cc67e 13688
d45b7041
AJ
13689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=bool " >&5
13690$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=bool ... " >&6; }
ad5cc67e 13691
90121a3e
AJ
13692 CFLAGS_SAVED="${CFLAGS:-}"
13693 LDFLAGS_SAVED="${LDFLAGS:-}"
ad5cc67e 13694
d45b7041
AJ
13695 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=bool"
13696 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=bool"
e217d2e8 13697
3828bfac
AJ
13698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13699/* end confdefs.h. */
e217d2e8 13700
e217d2e8 13701
3828bfac
AJ
13702 #ifdef HAVE_STDDEF_H
13703 # include <stddef.h>
13704 #endif
13705 static int
90121a3e 13706 return_zero(void)
3828bfac
AJ
13707 {
13708 return 0;
13709 }
ad5cc67e 13710
3828bfac
AJ
13711int
13712main ()
13713{
ad5cc67e 13714
90121a3e 13715 int zero = return_zero();
44d10669 13716
3828bfac
AJ
13717 ;
13718 return 0;
13719}
44d10669 13720
3828bfac
AJ
13721_ACEOF
13722if ac_fn_c_try_link "$LINENO"; then :
44d10669 13723
3828bfac
AJ
13724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13725$as_echo "yes" >&6; }
90121a3e 13726 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
44d10669 13727
3828bfac 13728else
44d10669 13729
3828bfac
AJ
13730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13731$as_echo "no" >&6; }
90121a3e 13732 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
3828bfac
AJ
13733 CFLAGS="${CFLAGS_SAVED}"
13734 LDFLAGS="${LDFLAGS_SAVED}"
44d10669 13735
3828bfac
AJ
13736fi
13737rm -f core conftest.err conftest.$ac_objext \
13738 conftest$ac_exeext conftest.$ac_ext
44d10669 13739
90121a3e
AJ
13740 unset CFLAGS_SAVED
13741 unset LDFLAGS_SAVED
44d10669 13742
90121a3e 13743 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
d45b7041
AJ
13744
13745 COMPILER_SANITIZERS="Yes"
13746 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }bool"
13747
3828bfac 13748fi
44d10669
AJ
13749
13750
90121a3e
AJ
13751
13752
13753
d45b7041
AJ
13754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=builtin " >&5
13755$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=builtin ... " >&6; }
13756
13757 CFLAGS_SAVED="${CFLAGS:-}"
13758 LDFLAGS_SAVED="${LDFLAGS:-}"
90121a3e 13759
d45b7041
AJ
13760 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=builtin"
13761 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=builtin"
90121a3e 13762
d45b7041
AJ
13763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13764/* end confdefs.h. */
44d10669 13765
44d10669 13766
d45b7041
AJ
13767 #ifdef HAVE_STDDEF_H
13768 # include <stddef.h>
13769 #endif
13770 static int
13771 return_zero(void)
13772 {
13773 return 0;
13774 }
13775
13776int
13777main ()
13778{
13779
13780 int zero = return_zero();
13781
13782 ;
13783 return 0;
13784}
13785
13786_ACEOF
13787if ac_fn_c_try_link "$LINENO"; then :
13788
13789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13790$as_echo "yes" >&6; }
13791 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
13792
13793else
13794
13795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13796$as_echo "no" >&6; }
13797 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
13798 CFLAGS="${CFLAGS_SAVED}"
13799 LDFLAGS="${LDFLAGS_SAVED}"
13800
13801fi
13802rm -f core conftest.err conftest.$ac_objext \
13803 conftest$ac_exeext conftest.$ac_ext
13804
13805 unset CFLAGS_SAVED
13806 unset LDFLAGS_SAVED
13807
13808 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
13809
13810 COMPILER_SANITIZERS="Yes"
13811 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }builtin"
13812
13813fi
13814
13815
13816
13817
13818
13819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=enum " >&5
13820$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=enum ... " >&6; }
44d10669 13821
90121a3e
AJ
13822 CFLAGS_SAVED="${CFLAGS:-}"
13823 LDFLAGS_SAVED="${LDFLAGS:-}"
44d10669 13824
d45b7041
AJ
13825 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=enum"
13826 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=enum"
44d10669 13827
6df79d8f 13828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44d10669
AJ
13829/* end confdefs.h. */
13830
13831
6df79d8f
AJ
13832 #ifdef HAVE_STDDEF_H
13833 # include <stddef.h>
13834 #endif
3828bfac 13835 static int
90121a3e 13836 return_zero(void)
3828bfac
AJ
13837 {
13838 return 0;
13839 }
44d10669
AJ
13840
13841int
13842main ()
13843{
13844
90121a3e 13845 int zero = return_zero();
44d10669
AJ
13846
13847 ;
13848 return 0;
13849}
13850
13851_ACEOF
13852if ac_fn_c_try_link "$LINENO"; then :
13853
6df79d8f 13854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44d10669 13855$as_echo "yes" >&6; }
90121a3e 13856 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
44d10669
AJ
13857
13858else
13859
6df79d8f 13860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44d10669 13861$as_echo "no" >&6; }
90121a3e 13862 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
3828bfac
AJ
13863 CFLAGS="${CFLAGS_SAVED}"
13864 LDFLAGS="${LDFLAGS_SAVED}"
13865
13866fi
13867rm -f core conftest.err conftest.$ac_objext \
13868 conftest$ac_exeext conftest.$ac_ext
13869
90121a3e
AJ
13870 unset CFLAGS_SAVED
13871 unset LDFLAGS_SAVED
3828bfac 13872
d45b7041
AJ
13873 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
13874
13875 COMPILER_SANITIZERS="Yes"
13876 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }enum"
13877
13878fi
13879
13880
13881
13882
13883
13884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=float-cast-overflow " >&5
13885$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=float-cast-overflow ... " >&6; }
13886
13887 CFLAGS_SAVED="${CFLAGS:-}"
13888 LDFLAGS_SAVED="${LDFLAGS:-}"
13889
13890 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=float-cast-overflow"
13891 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=float-cast-overflow"
13892
13893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13894/* end confdefs.h. */
13895
13896
13897 #ifdef HAVE_STDDEF_H
13898 # include <stddef.h>
13899 #endif
13900 static int
13901 return_zero(void)
13902 {
13903 return 0;
13904 }
13905
13906int
13907main ()
13908{
13909
13910 int zero = return_zero();
13911
13912 ;
13913 return 0;
13914}
13915
13916_ACEOF
13917if ac_fn_c_try_link "$LINENO"; then :
13918
13919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13920$as_echo "yes" >&6; }
13921 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
3828bfac
AJ
13922
13923else
13924
d45b7041
AJ
13925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13926$as_echo "no" >&6; }
13927 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
13928 CFLAGS="${CFLAGS_SAVED}"
13929 LDFLAGS="${LDFLAGS_SAVED}"
3828bfac
AJ
13930
13931fi
d45b7041
AJ
13932rm -f core conftest.err conftest.$ac_objext \
13933 conftest$ac_exeext conftest.$ac_ext
13934
13935 unset CFLAGS_SAVED
13936 unset LDFLAGS_SAVED
13937
13938 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
13939
13940 COMPILER_SANITIZERS="Yes"
13941 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }float-cast-overflow"
13942
13943fi
13944
13945
13946
13947
13948
13949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=function " >&5
13950$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=function ... " >&6; }
13951
13952 CFLAGS_SAVED="${CFLAGS:-}"
13953 LDFLAGS_SAVED="${LDFLAGS:-}"
13954
13955 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=function"
13956 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=function"
13957
13958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13959/* end confdefs.h. */
13960
13961
13962 #ifdef HAVE_STDDEF_H
13963 # include <stddef.h>
13964 #endif
13965 static int
13966 return_zero(void)
13967 {
13968 return 0;
13969 }
13970
13971int
13972main ()
13973{
13974
13975 int zero = return_zero();
13976
13977 ;
13978 return 0;
13979}
13980
13981_ACEOF
13982if ac_fn_c_try_link "$LINENO"; then :
13983
13984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13985$as_echo "yes" >&6; }
13986 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
3828bfac 13987
90121a3e 13988else
3828bfac 13989
d45b7041
AJ
13990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13991$as_echo "no" >&6; }
13992 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
13993 CFLAGS="${CFLAGS_SAVED}"
13994 LDFLAGS="${LDFLAGS_SAVED}"
13995
13996fi
13997rm -f core conftest.err conftest.$ac_objext \
13998 conftest$ac_exeext conftest.$ac_ext
13999
14000 unset CFLAGS_SAVED
14001 unset LDFLAGS_SAVED
14002
14003 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
14004
14005 COMPILER_SANITIZERS="Yes"
14006 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }function"
3828bfac 14007
3828bfac 14008fi
d45b7041
AJ
14009
14010
14011
14012
14013
14014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=integer " >&5
14015$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=integer ... " >&6; }
14016
14017 CFLAGS_SAVED="${CFLAGS:-}"
14018 LDFLAGS_SAVED="${LDFLAGS:-}"
14019
14020 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=integer"
14021 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=integer"
14022
14023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14024/* end confdefs.h. */
14025
14026
14027 #ifdef HAVE_STDDEF_H
14028 # include <stddef.h>
14029 #endif
14030 static int
14031 return_zero(void)
14032 {
14033 return 0;
14034 }
14035
14036int
14037main ()
14038{
14039
14040 int zero = return_zero();
14041
14042 ;
14043 return 0;
14044}
14045
14046_ACEOF
14047if ac_fn_c_try_link "$LINENO"; then :
14048
14049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14050$as_echo "yes" >&6; }
14051 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
14052
14053else
14054
14055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14056$as_echo "no" >&6; }
14057 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
14058 CFLAGS="${CFLAGS_SAVED}"
14059 LDFLAGS="${LDFLAGS_SAVED}"
14060
14061fi
14062rm -f core conftest.err conftest.$ac_objext \
14063 conftest$ac_exeext conftest.$ac_ext
14064
14065 unset CFLAGS_SAVED
14066 unset LDFLAGS_SAVED
14067
14068 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
14069
14070 COMPILER_SANITIZERS="Yes"
14071 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }integer"
14072
14073fi
14074
f54ed0d4 14075 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "no"; then :
d45b7041
AJ
14076
14077
14078
14079
14080
14081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=implicit-conversion " >&5
14082$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=implicit-conversion ... " >&6; }
14083
14084 CFLAGS_SAVED="${CFLAGS:-}"
14085 LDFLAGS_SAVED="${LDFLAGS:-}"
14086
14087 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=implicit-conversion"
14088 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=implicit-conversion"
14089
14090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14091/* end confdefs.h. */
14092
14093
14094 #ifdef HAVE_STDDEF_H
14095 # include <stddef.h>
14096 #endif
14097 static int
14098 return_zero(void)
14099 {
14100 return 0;
14101 }
14102
14103int
14104main ()
14105{
14106
14107 int zero = return_zero();
14108
14109 ;
14110 return 0;
14111}
14112
14113_ACEOF
14114if ac_fn_c_try_link "$LINENO"; then :
14115
14116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14117$as_echo "yes" >&6; }
14118 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
14119
14120else
14121
14122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14123$as_echo "no" >&6; }
14124 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
14125 CFLAGS="${CFLAGS_SAVED}"
14126 LDFLAGS="${LDFLAGS_SAVED}"
14127
14128fi
14129rm -f core conftest.err conftest.$ac_objext \
14130 conftest$ac_exeext conftest.$ac_ext
14131
14132 unset CFLAGS_SAVED
14133 unset LDFLAGS_SAVED
14134
14135 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
14136
14137 COMPILER_SANITIZERS="Yes"
14138 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }implicit-conversion"
14139
14140fi
14141
f54ed0d4 14142 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "no"; then :
d45b7041
AJ
14143
14144
14145
14146
14147
14148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=implicit-integer-sign-change " >&5
14149$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=implicit-integer-sign-change ... " >&6; }
14150
14151 CFLAGS_SAVED="${CFLAGS:-}"
14152 LDFLAGS_SAVED="${LDFLAGS:-}"
14153
14154 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=implicit-integer-sign-change"
14155 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=implicit-integer-sign-change"
14156
14157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14158/* end confdefs.h. */
14159
14160
14161 #ifdef HAVE_STDDEF_H
14162 # include <stddef.h>
14163 #endif
14164 static int
14165 return_zero(void)
14166 {
14167 return 0;
14168 }
14169
14170int
14171main ()
14172{
14173
14174 int zero = return_zero();
14175
14176 ;
14177 return 0;
14178}
14179
14180_ACEOF
14181if ac_fn_c_try_link "$LINENO"; then :
14182
14183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14184$as_echo "yes" >&6; }
14185 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
14186
14187else
14188
14189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14190$as_echo "no" >&6; }
14191 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
14192 CFLAGS="${CFLAGS_SAVED}"
14193 LDFLAGS="${LDFLAGS_SAVED}"
14194
14195fi
14196rm -f core conftest.err conftest.$ac_objext \
14197 conftest$ac_exeext conftest.$ac_ext
14198
14199 unset CFLAGS_SAVED
14200 unset LDFLAGS_SAVED
14201
14202 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
14203
14204 COMPILER_SANITIZERS="Yes"
14205 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }implicit-integer-sign-change"
14206
14207fi
14208
14209
14210
14211
14212
14213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=implicit-signed-integer-truncation " >&5
14214$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=implicit-signed-integer-truncation ... " >&6; }
14215
14216 CFLAGS_SAVED="${CFLAGS:-}"
14217 LDFLAGS_SAVED="${LDFLAGS:-}"
14218
14219 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=implicit-signed-integer-truncation"
14220 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=implicit-signed-integer-truncation"
14221
14222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14223/* end confdefs.h. */
14224
14225
14226 #ifdef HAVE_STDDEF_H
14227 # include <stddef.h>
14228 #endif
14229 static int
14230 return_zero(void)
14231 {
14232 return 0;
14233 }
14234
14235int
14236main ()
14237{
14238
14239 int zero = return_zero();
14240
14241 ;
14242 return 0;
14243}
14244
14245_ACEOF
14246if ac_fn_c_try_link "$LINENO"; then :
14247
14248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14249$as_echo "yes" >&6; }
14250 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
14251
14252else
14253
14254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14255$as_echo "no" >&6; }
14256 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
14257 CFLAGS="${CFLAGS_SAVED}"
14258 LDFLAGS="${LDFLAGS_SAVED}"
14259
14260fi
14261rm -f core conftest.err conftest.$ac_objext \
14262 conftest$ac_exeext conftest.$ac_ext
14263
14264 unset CFLAGS_SAVED
14265 unset LDFLAGS_SAVED
14266
14267 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
14268
14269 COMPILER_SANITIZERS="Yes"
14270 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }implicit-signed-integer-truncation"
14271
14272fi
14273
14274
14275
14276
14277
14278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=implicit-unsigned-integer-truncation " >&5
14279$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=implicit-unsigned-integer-truncation ... " >&6; }
14280
14281 CFLAGS_SAVED="${CFLAGS:-}"
14282 LDFLAGS_SAVED="${LDFLAGS:-}"
14283
14284 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=implicit-unsigned-integer-truncation"
14285 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=implicit-unsigned-integer-truncation"
14286
14287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14288/* end confdefs.h. */
14289
14290
14291 #ifdef HAVE_STDDEF_H
14292 # include <stddef.h>
14293 #endif
14294 static int
14295 return_zero(void)
14296 {
14297 return 0;
14298 }
14299
14300int
14301main ()
14302{
14303
14304 int zero = return_zero();
14305
14306 ;
14307 return 0;
14308}
14309
14310_ACEOF
14311if ac_fn_c_try_link "$LINENO"; then :
14312
14313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14314$as_echo "yes" >&6; }
14315 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
14316
14317else
14318
14319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14320$as_echo "no" >&6; }
14321 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
14322 CFLAGS="${CFLAGS_SAVED}"
14323 LDFLAGS="${LDFLAGS_SAVED}"
14324
14325fi
14326rm -f core conftest.err conftest.$ac_objext \
14327 conftest$ac_exeext conftest.$ac_ext
14328
14329 unset CFLAGS_SAVED
14330 unset LDFLAGS_SAVED
14331
14332 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
14333
14334 COMPILER_SANITIZERS="Yes"
14335 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }implicit-unsigned-integer-truncation"
14336
14337fi
14338
14339
14340fi
14341
14342
14343
14344
14345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=integer-divide-by-zero " >&5
14346$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=integer-divide-by-zero ... " >&6; }
14347
14348 CFLAGS_SAVED="${CFLAGS:-}"
14349 LDFLAGS_SAVED="${LDFLAGS:-}"
14350
14351 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=integer-divide-by-zero"
14352 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=integer-divide-by-zero"
14353
14354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14355/* end confdefs.h. */
14356
14357
14358 #ifdef HAVE_STDDEF_H
14359 # include <stddef.h>
14360 #endif
14361 static int
14362 return_zero(void)
14363 {
14364 return 0;
14365 }
14366
14367int
14368main ()
14369{
14370
14371 int zero = return_zero();
14372
14373 ;
14374 return 0;
14375}
14376
14377_ACEOF
14378if ac_fn_c_try_link "$LINENO"; then :
14379
14380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14381$as_echo "yes" >&6; }
14382 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
14383
14384else
14385
14386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14387$as_echo "no" >&6; }
14388 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
14389 CFLAGS="${CFLAGS_SAVED}"
14390 LDFLAGS="${LDFLAGS_SAVED}"
14391
14392fi
14393rm -f core conftest.err conftest.$ac_objext \
14394 conftest$ac_exeext conftest.$ac_ext
14395
14396 unset CFLAGS_SAVED
14397 unset LDFLAGS_SAVED
14398
14399 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
14400
14401 COMPILER_SANITIZERS="Yes"
14402 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }integer-divide-by-zero"
14403
14404fi
14405
14406
14407
14408
14409
14410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=shift " >&5
14411$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=shift ... " >&6; }
14412
14413 CFLAGS_SAVED="${CFLAGS:-}"
14414 LDFLAGS_SAVED="${LDFLAGS:-}"
14415
14416 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=shift"
14417 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=shift"
14418
14419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14420/* end confdefs.h. */
14421
14422
14423 #ifdef HAVE_STDDEF_H
14424 # include <stddef.h>
14425 #endif
14426 static int
14427 return_zero(void)
14428 {
14429 return 0;
14430 }
14431
14432int
14433main ()
14434{
14435
14436 int zero = return_zero();
14437
14438 ;
14439 return 0;
14440}
14441
14442_ACEOF
14443if ac_fn_c_try_link "$LINENO"; then :
14444
14445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14446$as_echo "yes" >&6; }
14447 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
14448
14449else
14450
14451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14452$as_echo "no" >&6; }
14453 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
14454 CFLAGS="${CFLAGS_SAVED}"
14455 LDFLAGS="${LDFLAGS_SAVED}"
14456
14457fi
14458rm -f core conftest.err conftest.$ac_objext \
14459 conftest$ac_exeext conftest.$ac_ext
14460
14461 unset CFLAGS_SAVED
14462 unset LDFLAGS_SAVED
14463
14464 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
14465
14466 COMPILER_SANITIZERS="Yes"
14467 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }shift"
14468
14469fi
14470
f54ed0d4 14471 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "no"; then :
d45b7041
AJ
14472
14473
14474
14475
14476
14477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=shift-base " >&5
14478$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=shift-base ... " >&6; }
14479
14480 CFLAGS_SAVED="${CFLAGS:-}"
14481 LDFLAGS_SAVED="${LDFLAGS:-}"
14482
14483 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=shift-base"
14484 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=shift-base"
14485
14486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14487/* end confdefs.h. */
14488
14489
14490 #ifdef HAVE_STDDEF_H
14491 # include <stddef.h>
14492 #endif
14493 static int
14494 return_zero(void)
14495 {
14496 return 0;
14497 }
14498
14499int
14500main ()
14501{
14502
14503 int zero = return_zero();
14504
14505 ;
14506 return 0;
14507}
14508
14509_ACEOF
14510if ac_fn_c_try_link "$LINENO"; then :
14511
14512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14513$as_echo "yes" >&6; }
14514 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
14515
14516else
14517
14518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14519$as_echo "no" >&6; }
14520 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
14521 CFLAGS="${CFLAGS_SAVED}"
14522 LDFLAGS="${LDFLAGS_SAVED}"
14523
14524fi
14525rm -f core conftest.err conftest.$ac_objext \
14526 conftest$ac_exeext conftest.$ac_ext
14527
14528 unset CFLAGS_SAVED
14529 unset LDFLAGS_SAVED
14530
14531 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
14532
14533 COMPILER_SANITIZERS="Yes"
14534 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }shift-base"
14535
14536fi
14537
14538
14539
14540
14541
14542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=shift-exponent " >&5
14543$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=shift-exponent ... " >&6; }
14544
14545 CFLAGS_SAVED="${CFLAGS:-}"
14546 LDFLAGS_SAVED="${LDFLAGS:-}"
14547
14548 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=shift-exponent"
14549 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=shift-exponent"
14550
14551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14552/* end confdefs.h. */
14553
14554
14555 #ifdef HAVE_STDDEF_H
14556 # include <stddef.h>
14557 #endif
14558 static int
14559 return_zero(void)
14560 {
14561 return 0;
14562 }
14563
14564int
14565main ()
14566{
14567
14568 int zero = return_zero();
14569
14570 ;
14571 return 0;
14572}
14573
14574_ACEOF
14575if ac_fn_c_try_link "$LINENO"; then :
14576
14577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14578$as_echo "yes" >&6; }
14579 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
14580
14581else
14582
14583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14584$as_echo "no" >&6; }
14585 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
14586 CFLAGS="${CFLAGS_SAVED}"
14587 LDFLAGS="${LDFLAGS_SAVED}"
14588
14589fi
14590rm -f core conftest.err conftest.$ac_objext \
14591 conftest$ac_exeext conftest.$ac_ext
14592
14593 unset CFLAGS_SAVED
14594 unset LDFLAGS_SAVED
14595
14596 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
14597
14598 COMPILER_SANITIZERS="Yes"
14599 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }shift-exponent"
14600
14601fi
14602
14603
14604fi
14605
14606
14607
14608
14609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=signed-integer-overflow " >&5
14610$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=signed-integer-overflow ... " >&6; }
14611
14612 CFLAGS_SAVED="${CFLAGS:-}"
14613 LDFLAGS_SAVED="${LDFLAGS:-}"
14614
14615 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=signed-integer-overflow"
14616 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=signed-integer-overflow"
14617
14618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14619/* end confdefs.h. */
14620
14621
14622 #ifdef HAVE_STDDEF_H
14623 # include <stddef.h>
14624 #endif
14625 static int
14626 return_zero(void)
14627 {
14628 return 0;
14629 }
14630
14631int
14632main ()
14633{
14634
14635 int zero = return_zero();
14636
14637 ;
14638 return 0;
14639}
14640
14641_ACEOF
14642if ac_fn_c_try_link "$LINENO"; then :
14643
14644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14645$as_echo "yes" >&6; }
14646 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
14647
14648else
14649
14650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14651$as_echo "no" >&6; }
14652 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
14653 CFLAGS="${CFLAGS_SAVED}"
14654 LDFLAGS="${LDFLAGS_SAVED}"
14655
14656fi
14657rm -f core conftest.err conftest.$ac_objext \
14658 conftest$ac_exeext conftest.$ac_ext
14659
14660 unset CFLAGS_SAVED
14661 unset LDFLAGS_SAVED
14662
14663 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
14664
14665 COMPILER_SANITIZERS="Yes"
14666 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }signed-integer-overflow"
14667
14668fi
14669
14670
14671fi
14672
14673
14674
14675
14676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=nonnull-attribute " >&5
14677$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=nonnull-attribute ... " >&6; }
14678
14679 CFLAGS_SAVED="${CFLAGS:-}"
14680 LDFLAGS_SAVED="${LDFLAGS:-}"
14681
14682 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=nonnull-attribute"
14683 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=nonnull-attribute"
14684
14685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14686/* end confdefs.h. */
14687
14688
14689 #ifdef HAVE_STDDEF_H
14690 # include <stddef.h>
14691 #endif
14692 static int
14693 return_zero(void)
14694 {
14695 return 0;
14696 }
14697
14698int
14699main ()
14700{
14701
14702 int zero = return_zero();
14703
14704 ;
14705 return 0;
14706}
14707
14708_ACEOF
14709if ac_fn_c_try_link "$LINENO"; then :
14710
14711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14712$as_echo "yes" >&6; }
14713 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
14714
14715else
14716
14717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14718$as_echo "no" >&6; }
14719 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
14720 CFLAGS="${CFLAGS_SAVED}"
14721 LDFLAGS="${LDFLAGS_SAVED}"
14722
14723fi
14724rm -f core conftest.err conftest.$ac_objext \
14725 conftest$ac_exeext conftest.$ac_ext
14726
14727 unset CFLAGS_SAVED
14728 unset LDFLAGS_SAVED
14729
14730 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
14731
14732 COMPILER_SANITIZERS="Yes"
14733 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }nonnull-attribute"
14734
14735fi
14736
14737
14738
14739
14740
14741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=null " >&5
14742$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=null ... " >&6; }
14743
14744 CFLAGS_SAVED="${CFLAGS:-}"
14745 LDFLAGS_SAVED="${LDFLAGS:-}"
14746
14747 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=null"
14748 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=null"
14749
14750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14751/* end confdefs.h. */
14752
14753
14754 #ifdef HAVE_STDDEF_H
14755 # include <stddef.h>
14756 #endif
14757 static int
14758 return_zero(void)
14759 {
14760 return 0;
14761 }
14762
14763int
14764main ()
14765{
14766
14767 int zero = return_zero();
14768
14769 ;
14770 return 0;
14771}
14772
14773_ACEOF
14774if ac_fn_c_try_link "$LINENO"; then :
14775
14776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14777$as_echo "yes" >&6; }
14778 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
14779
14780else
14781
14782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14783$as_echo "no" >&6; }
14784 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
14785 CFLAGS="${CFLAGS_SAVED}"
14786 LDFLAGS="${LDFLAGS_SAVED}"
14787
14788fi
14789rm -f core conftest.err conftest.$ac_objext \
14790 conftest$ac_exeext conftest.$ac_ext
14791
14792 unset CFLAGS_SAVED
14793 unset LDFLAGS_SAVED
14794
14795 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
14796
14797 COMPILER_SANITIZERS="Yes"
14798 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }null"
14799
14800fi
14801
14802
14803
14804
14805
14806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=nullability " >&5
14807$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=nullability ... " >&6; }
14808
14809 CFLAGS_SAVED="${CFLAGS:-}"
14810 LDFLAGS_SAVED="${LDFLAGS:-}"
14811
14812 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=nullability"
14813 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=nullability"
14814
14815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14816/* end confdefs.h. */
14817
14818
14819 #ifdef HAVE_STDDEF_H
14820 # include <stddef.h>
14821 #endif
14822 static int
14823 return_zero(void)
14824 {
14825 return 0;
14826 }
14827
14828int
14829main ()
14830{
14831
14832 int zero = return_zero();
14833
14834 ;
14835 return 0;
14836}
14837
14838_ACEOF
14839if ac_fn_c_try_link "$LINENO"; then :
14840
14841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14842$as_echo "yes" >&6; }
14843 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
14844
14845else
14846
14847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14848$as_echo "no" >&6; }
14849 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
14850 CFLAGS="${CFLAGS_SAVED}"
14851 LDFLAGS="${LDFLAGS_SAVED}"
14852
14853fi
14854rm -f core conftest.err conftest.$ac_objext \
14855 conftest$ac_exeext conftest.$ac_ext
14856
14857 unset CFLAGS_SAVED
14858 unset LDFLAGS_SAVED
14859
14860 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
14861
14862 COMPILER_SANITIZERS="Yes"
14863 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }nullability"
14864
14865fi
14866
f54ed0d4 14867 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "no"; then :
d45b7041
AJ
14868
14869
14870
14871
14872
14873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=nullability-arg " >&5
14874$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=nullability-arg ... " >&6; }
14875
14876 CFLAGS_SAVED="${CFLAGS:-}"
14877 LDFLAGS_SAVED="${LDFLAGS:-}"
14878
14879 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=nullability-arg"
14880 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=nullability-arg"
14881
14882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14883/* end confdefs.h. */
14884
14885
14886 #ifdef HAVE_STDDEF_H
14887 # include <stddef.h>
14888 #endif
14889 static int
14890 return_zero(void)
14891 {
14892 return 0;
14893 }
14894
14895int
14896main ()
14897{
14898
14899 int zero = return_zero();
14900
14901 ;
14902 return 0;
14903}
14904
14905_ACEOF
14906if ac_fn_c_try_link "$LINENO"; then :
14907
14908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14909$as_echo "yes" >&6; }
14910 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
14911
14912else
14913
14914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14915$as_echo "no" >&6; }
14916 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
14917 CFLAGS="${CFLAGS_SAVED}"
14918 LDFLAGS="${LDFLAGS_SAVED}"
14919
14920fi
14921rm -f core conftest.err conftest.$ac_objext \
14922 conftest$ac_exeext conftest.$ac_ext
14923
14924 unset CFLAGS_SAVED
14925 unset LDFLAGS_SAVED
14926
14927 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
14928
14929 COMPILER_SANITIZERS="Yes"
14930 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }nullability-arg"
14931
14932fi
14933
14934
14935
14936
14937
14938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=nullability-assign " >&5
14939$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=nullability-assign ... " >&6; }
14940
14941 CFLAGS_SAVED="${CFLAGS:-}"
14942 LDFLAGS_SAVED="${LDFLAGS:-}"
14943
14944 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=nullability-assign"
14945 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=nullability-assign"
14946
14947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14948/* end confdefs.h. */
14949
14950
14951 #ifdef HAVE_STDDEF_H
14952 # include <stddef.h>
14953 #endif
14954 static int
14955 return_zero(void)
14956 {
14957 return 0;
14958 }
14959
14960int
14961main ()
14962{
14963
14964 int zero = return_zero();
14965
14966 ;
14967 return 0;
14968}
14969
14970_ACEOF
14971if ac_fn_c_try_link "$LINENO"; then :
14972
14973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14974$as_echo "yes" >&6; }
14975 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
14976
14977else
14978
14979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14980$as_echo "no" >&6; }
14981 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
14982 CFLAGS="${CFLAGS_SAVED}"
14983 LDFLAGS="${LDFLAGS_SAVED}"
14984
14985fi
14986rm -f core conftest.err conftest.$ac_objext \
14987 conftest$ac_exeext conftest.$ac_ext
14988
14989 unset CFLAGS_SAVED
14990 unset LDFLAGS_SAVED
14991
14992 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
14993
14994 COMPILER_SANITIZERS="Yes"
14995 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }nullability-assign"
14996
14997fi
14998
14999
15000
15001
15002
15003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=nullability-return " >&5
15004$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=nullability-return ... " >&6; }
15005
15006 CFLAGS_SAVED="${CFLAGS:-}"
15007 LDFLAGS_SAVED="${LDFLAGS:-}"
15008
15009 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=nullability-return"
15010 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=nullability-return"
15011
15012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15013/* end confdefs.h. */
15014
15015
15016 #ifdef HAVE_STDDEF_H
15017 # include <stddef.h>
15018 #endif
15019 static int
15020 return_zero(void)
15021 {
15022 return 0;
15023 }
15024
15025int
15026main ()
15027{
15028
15029 int zero = return_zero();
15030
15031 ;
15032 return 0;
15033}
15034
15035_ACEOF
15036if ac_fn_c_try_link "$LINENO"; then :
15037
15038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15039$as_echo "yes" >&6; }
15040 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
15041
15042else
15043
15044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15045$as_echo "no" >&6; }
15046 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
15047 CFLAGS="${CFLAGS_SAVED}"
15048 LDFLAGS="${LDFLAGS_SAVED}"
15049
15050fi
15051rm -f core conftest.err conftest.$ac_objext \
15052 conftest$ac_exeext conftest.$ac_ext
15053
15054 unset CFLAGS_SAVED
15055 unset LDFLAGS_SAVED
15056
15057 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
15058
15059 COMPILER_SANITIZERS="Yes"
15060 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }nullability-return"
15061
15062fi
15063
15064
15065fi
15066
15067
15068
15069
15070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=object-size " >&5
15071$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=object-size ... " >&6; }
15072
15073 CFLAGS_SAVED="${CFLAGS:-}"
15074 LDFLAGS_SAVED="${LDFLAGS:-}"
15075
15076 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=object-size"
15077 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=object-size"
15078
15079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15080/* end confdefs.h. */
15081
15082
15083 #ifdef HAVE_STDDEF_H
15084 # include <stddef.h>
15085 #endif
15086 static int
15087 return_zero(void)
15088 {
15089 return 0;
15090 }
15091
15092int
15093main ()
15094{
15095
15096 int zero = return_zero();
15097
15098 ;
15099 return 0;
15100}
15101
15102_ACEOF
15103if ac_fn_c_try_link "$LINENO"; then :
15104
15105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15106$as_echo "yes" >&6; }
15107 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
15108
15109else
15110
15111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15112$as_echo "no" >&6; }
15113 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
15114 CFLAGS="${CFLAGS_SAVED}"
15115 LDFLAGS="${LDFLAGS_SAVED}"
15116
15117fi
15118rm -f core conftest.err conftest.$ac_objext \
15119 conftest$ac_exeext conftest.$ac_ext
15120
15121 unset CFLAGS_SAVED
15122 unset LDFLAGS_SAVED
15123
15124 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
15125
15126 COMPILER_SANITIZERS="Yes"
15127 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }object-size"
15128
15129fi
15130
15131
15132
15133
15134
15135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=pointer-overflow " >&5
15136$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=pointer-overflow ... " >&6; }
15137
15138 CFLAGS_SAVED="${CFLAGS:-}"
15139 LDFLAGS_SAVED="${LDFLAGS:-}"
15140
15141 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=pointer-overflow"
15142 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=pointer-overflow"
15143
15144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15145/* end confdefs.h. */
15146
15147
15148 #ifdef HAVE_STDDEF_H
15149 # include <stddef.h>
15150 #endif
15151 static int
15152 return_zero(void)
15153 {
15154 return 0;
15155 }
15156
15157int
15158main ()
15159{
15160
15161 int zero = return_zero();
15162
15163 ;
15164 return 0;
15165}
15166
15167_ACEOF
15168if ac_fn_c_try_link "$LINENO"; then :
15169
15170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15171$as_echo "yes" >&6; }
15172 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
15173
15174else
15175
15176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15177$as_echo "no" >&6; }
15178 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
15179 CFLAGS="${CFLAGS_SAVED}"
15180 LDFLAGS="${LDFLAGS_SAVED}"
15181
15182fi
15183rm -f core conftest.err conftest.$ac_objext \
15184 conftest$ac_exeext conftest.$ac_ext
15185
15186 unset CFLAGS_SAVED
15187 unset LDFLAGS_SAVED
15188
15189 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
15190
15191 COMPILER_SANITIZERS="Yes"
15192 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }pointer-overflow"
15193
15194fi
15195
15196
15197
15198
15199
15200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=return " >&5
15201$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=return ... " >&6; }
15202
15203 CFLAGS_SAVED="${CFLAGS:-}"
15204 LDFLAGS_SAVED="${LDFLAGS:-}"
15205
15206 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=return"
15207 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=return"
15208
15209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15210/* end confdefs.h. */
15211
15212
15213 #ifdef HAVE_STDDEF_H
15214 # include <stddef.h>
15215 #endif
15216 static int
15217 return_zero(void)
15218 {
15219 return 0;
15220 }
15221
15222int
15223main ()
15224{
15225
15226 int zero = return_zero();
15227
15228 ;
15229 return 0;
15230}
15231
15232_ACEOF
15233if ac_fn_c_try_link "$LINENO"; then :
15234
15235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15236$as_echo "yes" >&6; }
15237 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
15238
15239else
15240
15241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15242$as_echo "no" >&6; }
15243 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
15244 CFLAGS="${CFLAGS_SAVED}"
15245 LDFLAGS="${LDFLAGS_SAVED}"
15246
15247fi
15248rm -f core conftest.err conftest.$ac_objext \
15249 conftest$ac_exeext conftest.$ac_ext
15250
15251 unset CFLAGS_SAVED
15252 unset LDFLAGS_SAVED
15253
15254 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
15255
15256 COMPILER_SANITIZERS="Yes"
15257 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }return"
15258
15259fi
15260
15261
15262
15263
15264
15265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=returns-nonnull-attribute " >&5
15266$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=returns-nonnull-attribute ... " >&6; }
15267
15268 CFLAGS_SAVED="${CFLAGS:-}"
15269 LDFLAGS_SAVED="${LDFLAGS:-}"
15270
15271 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=returns-nonnull-attribute"
15272 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=returns-nonnull-attribute"
15273
15274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15275/* end confdefs.h. */
15276
15277
15278 #ifdef HAVE_STDDEF_H
15279 # include <stddef.h>
15280 #endif
15281 static int
15282 return_zero(void)
15283 {
15284 return 0;
15285 }
15286
15287int
15288main ()
15289{
15290
15291 int zero = return_zero();
15292
15293 ;
15294 return 0;
15295}
15296
15297_ACEOF
15298if ac_fn_c_try_link "$LINENO"; then :
15299
15300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15301$as_echo "yes" >&6; }
15302 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
15303
15304else
15305
15306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15307$as_echo "no" >&6; }
15308 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
15309 CFLAGS="${CFLAGS_SAVED}"
15310 LDFLAGS="${LDFLAGS_SAVED}"
15311
15312fi
15313rm -f core conftest.err conftest.$ac_objext \
15314 conftest$ac_exeext conftest.$ac_ext
15315
15316 unset CFLAGS_SAVED
15317 unset LDFLAGS_SAVED
15318
15319 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
15320
15321 COMPILER_SANITIZERS="Yes"
15322 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }returns-nonnull-attribute"
15323
15324fi
15325
15326
15327
15328
15329
15330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=unreachable " >&5
15331$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=unreachable ... " >&6; }
15332
15333 CFLAGS_SAVED="${CFLAGS:-}"
15334 LDFLAGS_SAVED="${LDFLAGS:-}"
15335
15336 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=unreachable"
15337 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=unreachable"
15338
15339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15340/* end confdefs.h. */
15341
15342
15343 #ifdef HAVE_STDDEF_H
15344 # include <stddef.h>
15345 #endif
15346 static int
15347 return_zero(void)
15348 {
15349 return 0;
15350 }
15351
15352int
15353main ()
15354{
15355
15356 int zero = return_zero();
15357
15358 ;
15359 return 0;
15360}
15361
15362_ACEOF
15363if ac_fn_c_try_link "$LINENO"; then :
15364
15365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15366$as_echo "yes" >&6; }
15367 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
15368
15369else
15370
15371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15372$as_echo "no" >&6; }
15373 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
15374 CFLAGS="${CFLAGS_SAVED}"
15375 LDFLAGS="${LDFLAGS_SAVED}"
15376
15377fi
15378rm -f core conftest.err conftest.$ac_objext \
15379 conftest$ac_exeext conftest.$ac_ext
15380
15381 unset CFLAGS_SAVED
15382 unset LDFLAGS_SAVED
15383
15384 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
15385
15386 COMPILER_SANITIZERS="Yes"
15387 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }unreachable"
15388
15389fi
15390
15391
15392
15393
15394
15395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=unsigned-shift-base " >&5
15396$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=unsigned-shift-base ... " >&6; }
15397
15398 CFLAGS_SAVED="${CFLAGS:-}"
15399 LDFLAGS_SAVED="${LDFLAGS:-}"
15400
15401 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=unsigned-shift-base"
15402 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=unsigned-shift-base"
15403
15404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15405/* end confdefs.h. */
15406
15407
15408 #ifdef HAVE_STDDEF_H
15409 # include <stddef.h>
15410 #endif
15411 static int
15412 return_zero(void)
15413 {
15414 return 0;
15415 }
15416
15417int
15418main ()
15419{
15420
15421 int zero = return_zero();
15422
15423 ;
15424 return 0;
15425}
15426
15427_ACEOF
15428if ac_fn_c_try_link "$LINENO"; then :
15429
15430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15431$as_echo "yes" >&6; }
15432 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
15433
15434else
15435
15436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15437$as_echo "no" >&6; }
15438 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
15439 CFLAGS="${CFLAGS_SAVED}"
15440 LDFLAGS="${LDFLAGS_SAVED}"
15441
15442fi
15443rm -f core conftest.err conftest.$ac_objext \
15444 conftest$ac_exeext conftest.$ac_ext
15445
15446 unset CFLAGS_SAVED
15447 unset LDFLAGS_SAVED
15448
15449 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
15450
15451 COMPILER_SANITIZERS="Yes"
15452 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }unsigned-shift-base"
15453
15454fi
15455
15456
15457
15458
15459
15460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fsanitize=vla-bound " >&5
15461$as_echo_n "checking for C compiler *and* linker flag(s) -fsanitize=vla-bound ... " >&6; }
15462
15463 CFLAGS_SAVED="${CFLAGS:-}"
15464 LDFLAGS_SAVED="${LDFLAGS:-}"
15465
15466 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fsanitize=vla-bound"
15467 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fsanitize=vla-bound"
15468
15469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15470/* end confdefs.h. */
15471
15472
15473 #ifdef HAVE_STDDEF_H
15474 # include <stddef.h>
15475 #endif
15476 static int
15477 return_zero(void)
15478 {
15479 return 0;
15480 }
15481
15482int
15483main ()
15484{
15485
15486 int zero = return_zero();
15487
15488 ;
15489 return 0;
15490}
15491
15492_ACEOF
15493if ac_fn_c_try_link "$LINENO"; then :
15494
15495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15496$as_echo "yes" >&6; }
15497 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
15498
15499else
15500
15501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15502$as_echo "no" >&6; }
15503 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
15504 CFLAGS="${CFLAGS_SAVED}"
15505 LDFLAGS="${LDFLAGS_SAVED}"
15506
15507fi
15508rm -f core conftest.err conftest.$ac_objext \
15509 conftest$ac_exeext conftest.$ac_ext
15510
15511 unset CFLAGS_SAVED
15512 unset LDFLAGS_SAVED
15513
15514 if test "${ATHEME_TEST_CCLD_FLAGS_RESULT}" = "yes"; then :
15515
15516 COMPILER_SANITIZERS="Yes"
15517 COMPILER_SANITIZERS_ENABLED="${COMPILER_SANITIZERS_ENABLED:-}${COMPILER_SANITIZERS_ENABLED:+, }vla-bound"
15518
15519fi
15520
15521
15522fi
15523
f54ed0d4 15524 if test "${COMPILER_SANITIZERS}" = "No"; then :
d45b7041 15525
f54ed0d4 15526 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
d45b7041
AJ
15527$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15528as_fn_error $? "--enable-compiler-sanitizers was given, but no sanitizers could be enabled
15529See \`config.log' for more details" "$LINENO" 5; }
15530
15531fi
15532
f54ed0d4 15533 # This causes pointless noise, turn it off.
d45b7041
AJ
15534
15535
15536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler *and* linker flag(s) -fno-sanitize=unsigned-integer-overflow " >&5
15537$as_echo_n "checking for C compiler *and* linker flag(s) -fno-sanitize=unsigned-integer-overflow ... " >&6; }
15538
15539 CFLAGS_SAVED="${CFLAGS:-}"
15540 LDFLAGS_SAVED="${LDFLAGS:-}"
15541
15542 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fno-sanitize=unsigned-integer-overflow"
15543 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-fno-sanitize=unsigned-integer-overflow"
15544
15545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15546/* end confdefs.h. */
15547
15548
15549 #ifdef HAVE_STDDEF_H
15550 # include <stddef.h>
15551 #endif
15552 static int
15553 return_zero(void)
15554 {
15555 return 0;
15556 }
15557
15558int
15559main ()
15560{
15561
15562 int zero = return_zero();
15563
15564 ;
15565 return 0;
15566}
15567
15568_ACEOF
15569if ac_fn_c_try_link "$LINENO"; then :
15570
15571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15572$as_echo "yes" >&6; }
15573 ATHEME_TEST_CCLD_FLAGS_RESULT="yes"
15574
15575else
15576
15577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15578$as_echo "no" >&6; }
15579 ATHEME_TEST_CCLD_FLAGS_RESULT="no"
15580 CFLAGS="${CFLAGS_SAVED}"
15581 LDFLAGS="${LDFLAGS_SAVED}"
15582
15583fi
15584rm -f core conftest.err conftest.$ac_objext \
15585 conftest$ac_exeext conftest.$ac_ext
15586
15587 unset CFLAGS_SAVED
15588 unset LDFLAGS_SAVED
15589
15590
15591
15592$as_echo "#define ATHEME_ENABLE_COMPILER_SANITIZERS 1" >>confdefs.h
15593
f54ed0d4
AJ
15594 ;; #(
15595 *) :
90121a3e 15596
f54ed0d4
AJ
15597 as_fn_error $? "invalid option for --enable-compiler-sanitizers" "$LINENO" 5
15598 ;;
15599esac
90121a3e
AJ
15600
15601
15602
15603 # Check whether --enable-fortify-source was given.
15604if test "${enable_fortify_source+set}" = set; then :
15605 enableval=$enable_fortify_source;
15606else
15607 enable_fortify_source="yes"
15608fi
15609
15610
f54ed0d4
AJ
15611 case "x${enable_fortify_source}" in #(
15612 xno) :
15613 ;; #(
15614 xyes) :
90121a3e 15615
90121a3e
AJ
15616
15617
15618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C preprocessor flag(s) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 " >&5
15619$as_echo_n "checking for C preprocessor flag(s) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 ... " >&6; }
15620
15621 CPPFLAGS_SAVED="${CPPFLAGS:-}"
15622 CPPFLAGS="${CPPFLAGS:-}${CPPFLAGS:+ }-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
15623
15624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15625/* end confdefs.h. */
15626
15627
15628 #ifdef HAVE_STDDEF_H
15629 # include <stddef.h>
15630 #endif
15631 static int
15632 return_zero(void)
15633 {
15634 return 0;
15635 }
15636
15637int
15638main ()
15639{
15640
15641 int zero = return_zero();
15642
15643 ;
15644 return 0;
15645}
15646
15647_ACEOF
15648if ac_fn_c_try_compile "$LINENO"; then :
15649
15650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15651$as_echo "yes" >&6; }
15652 ATHEME_CPP_TEST_FLAGS_RESULT="yes"
15653
15654else
15655
15656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15657$as_echo "no" >&6; }
15658 ATHEME_CPP_TEST_FLAGS_RESULT="no"
15659 CPPFLAGS="${CPPFLAGS_SAVED}"
15660
15661fi
15662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15663
15664 unset CPPFLAGS_SAVED
15665
f54ed0d4
AJ
15666 ;; #(
15667 *) :
90121a3e 15668
f54ed0d4
AJ
15669 as_fn_error $? "invalid option for --enable-fortify-source" "$LINENO" 5
15670 ;;
15671esac
44d10669
AJ
15672
15673
15674
3828bfac
AJ
15675 # Check whether --enable-async-unwind-tables was given.
15676if test "${enable_async_unwind_tables+set}" = set; then :
15677 enableval=$enable_async_unwind_tables;
15678else
15679 enable_async_unwind_tables="yes"
15680fi
44d10669 15681
44d10669 15682
90121a3e
AJ
15683 # Check whether --enable-debugging-symbols was given.
15684if test "${enable_debugging_symbols+set}" = set; then :
15685 enableval=$enable_debugging_symbols;
15686else
15687 enable_debugging_symbols="yes"
15688fi
15689
15690
3828bfac
AJ
15691 # Check whether --enable-stack-clash-protection was given.
15692if test "${enable_stack_clash_protection+set}" = set; then :
15693 enableval=$enable_stack_clash_protection;
44d10669 15694else
3828bfac
AJ
15695 enable_stack_clash_protection="yes"
15696fi
44d10669 15697
44d10669 15698
3828bfac
AJ
15699 # Check whether --enable-stack-protector was given.
15700if test "${enable_stack_protector+set}" = set; then :
15701 enableval=$enable_stack_protector;
15702else
15703 enable_stack_protector="yes"
44d10669 15704fi
44d10669 15705
44d10669 15706
90121a3e
AJ
15707
15708
f54ed0d4
AJ
15709 case "x${enable_async_unwind_tables}" in #(
15710 xno) :
15711 ;; #(
15712 xyes) :
90121a3e 15713
44d10669 15714
90121a3e
AJ
15715
15716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -fasynchronous-unwind-tables " >&5
3828bfac 15717$as_echo_n "checking for C compiler flag(s) -fasynchronous-unwind-tables ... " >&6; }
44d10669 15718
90121a3e
AJ
15719 CFLAGS_SAVED="${CFLAGS:-}"
15720 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fasynchronous-unwind-tables"
44d10669 15721
90121a3e 15722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3828bfac
AJ
15723/* end confdefs.h. */
15724
15725
90121a3e
AJ
15726 #ifdef HAVE_STDDEF_H
15727 # include <stddef.h>
15728 #endif
15729 static int
15730 return_zero(void)
15731 {
15732 return 0;
15733 }
15734
3828bfac
AJ
15735int
15736main ()
15737{
15738
90121a3e
AJ
15739 int zero = return_zero();
15740
3828bfac
AJ
15741 ;
15742 return 0;
15743}
15744
15745_ACEOF
15746if ac_fn_c_try_compile "$LINENO"; then :
15747
90121a3e
AJ
15748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15749$as_echo "yes" >&6; }
15750 ATHEME_TEST_CC_FLAGS_RESULT="yes"
15751
15752else
3828bfac 15753
90121a3e
AJ
15754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15755$as_echo "no" >&6; }
15756 ATHEME_TEST_CC_FLAGS_RESULT="no"
15757 CFLAGS="${CFLAGS_SAVED}"
15758
15759fi
15760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15761
15762 unset CFLAGS_SAVED
15763
f54ed0d4
AJ
15764 ;; #(
15765 *) :
90121a3e 15766
f54ed0d4
AJ
15767 as_fn_error $? "invalid option for --enable-async-unwind-tables" "$LINENO" 5
15768 ;;
15769esac
90121a3e 15770
f54ed0d4
AJ
15771 case "x${enable_debugging_symbols}" in #(
15772 xno) :
15773 ;; #(
15774 xyes) :
90121a3e 15775
90121a3e
AJ
15776
15777
15778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -gdwarf-4 " >&5
15779$as_echo_n "checking for C compiler flag(s) -gdwarf-4 ... " >&6; }
15780
15781 CFLAGS_SAVED="${CFLAGS:-}"
15782 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-gdwarf-4"
15783
15784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15785/* end confdefs.h. */
15786
15787
15788 #ifdef HAVE_STDDEF_H
15789 # include <stddef.h>
15790 #endif
15791 static int
15792 return_zero(void)
15793 {
15794 return 0;
15795 }
15796
15797int
15798main ()
15799{
15800
15801 int zero = return_zero();
15802
15803 ;
15804 return 0;
15805}
15806
15807_ACEOF
15808if ac_fn_c_try_compile "$LINENO"; then :
15809
15810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3828bfac 15811$as_echo "yes" >&6; }
90121a3e 15812 ATHEME_TEST_CC_FLAGS_RESULT="yes"
44d10669
AJ
15813
15814else
15815
90121a3e
AJ
15816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15817$as_echo "no" >&6; }
15818 ATHEME_TEST_CC_FLAGS_RESULT="no"
15819 CFLAGS="${CFLAGS_SAVED}"
15820
15821fi
15822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3828bfac 15823
90121a3e
AJ
15824 unset CFLAGS_SAVED
15825
f54ed0d4 15826 if test "${ATHEME_TEST_CC_FLAGS_RESULT}" = "no"; then :
90121a3e
AJ
15827
15828
15829
15830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -ggdb3 " >&5
15831$as_echo_n "checking for C compiler flag(s) -ggdb3 ... " >&6; }
15832
15833 CFLAGS_SAVED="${CFLAGS:-}"
15834 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-ggdb3"
15835
15836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15837/* end confdefs.h. */
15838
15839
15840 #ifdef HAVE_STDDEF_H
15841 # include <stddef.h>
15842 #endif
15843 static int
15844 return_zero(void)
15845 {
15846 return 0;
15847 }
15848
15849int
15850main ()
15851{
15852
15853 int zero = return_zero();
15854
15855 ;
15856 return 0;
15857}
15858
15859_ACEOF
15860if ac_fn_c_try_compile "$LINENO"; then :
15861
15862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15863$as_echo "yes" >&6; }
15864 ATHEME_TEST_CC_FLAGS_RESULT="yes"
15865
15866else
15867
15868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3828bfac 15869$as_echo "no" >&6; }
90121a3e
AJ
15870 ATHEME_TEST_CC_FLAGS_RESULT="no"
15871 CFLAGS="${CFLAGS_SAVED}"
44d10669
AJ
15872
15873fi
3828bfac 15874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44d10669 15875
90121a3e
AJ
15876 unset CFLAGS_SAVED
15877
f54ed0d4 15878 if test "${ATHEME_TEST_CC_FLAGS_RESULT}" = "no"; then :
90121a3e
AJ
15879
15880
15881
15882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -g " >&5
15883$as_echo_n "checking for C compiler flag(s) -g ... " >&6; }
15884
15885 CFLAGS_SAVED="${CFLAGS:-}"
15886 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-g"
15887
15888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15889/* end confdefs.h. */
44d10669
AJ
15890
15891
90121a3e
AJ
15892 #ifdef HAVE_STDDEF_H
15893 # include <stddef.h>
15894 #endif
15895 static int
15896 return_zero(void)
15897 {
15898 return 0;
15899 }
15900
15901int
15902main ()
15903{
15904
15905 int zero = return_zero();
15906
15907 ;
15908 return 0;
15909}
15910
15911_ACEOF
15912if ac_fn_c_try_compile "$LINENO"; then :
15913
15914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15915$as_echo "yes" >&6; }
15916 ATHEME_TEST_CC_FLAGS_RESULT="yes"
15917
15918else
15919
15920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15921$as_echo "no" >&6; }
15922 ATHEME_TEST_CC_FLAGS_RESULT="no"
15923 CFLAGS="${CFLAGS_SAVED}"
15924
15925fi
15926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15927
15928 unset CFLAGS_SAVED
15929
f54ed0d4 15930 if test "${ATHEME_TEST_CC_FLAGS_RESULT}" = "no"; then :
90121a3e 15931
f54ed0d4 15932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-debugging-symbols was given, but they could not be enabled" >&5
90121a3e
AJ
15933$as_echo "$as_me: WARNING: --enable-debugging-symbols was given, but they could not be enabled" >&2;}
15934
15935fi
15936
15937fi
15938
15939fi
f54ed0d4
AJ
15940 ;; #(
15941 *) :
90121a3e 15942
f54ed0d4
AJ
15943 as_fn_error $? "invalid option for --enable-debugging-symbols" "$LINENO" 5
15944 ;;
15945esac
44d10669 15946
f54ed0d4
AJ
15947 case "x${enable_stack_clash_protection}" in #(
15948 xno) :
15949 ;; #(
15950 xyes) :
90121a3e 15951
44d10669 15952
90121a3e
AJ
15953
15954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -fstack-clash-protection " >&5
3828bfac 15955$as_echo_n "checking for C compiler flag(s) -fstack-clash-protection ... " >&6; }
44d10669 15956
90121a3e
AJ
15957 CFLAGS_SAVED="${CFLAGS:-}"
15958 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fstack-clash-protection"
44d10669 15959
90121a3e 15960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3828bfac 15961/* end confdefs.h. */
44d10669 15962
44d10669 15963
90121a3e
AJ
15964 #ifdef HAVE_STDDEF_H
15965 # include <stddef.h>
15966 #endif
15967 static int
15968 return_zero(void)
15969 {
15970 return 0;
15971 }
15972
3828bfac
AJ
15973int
15974main ()
15975{
44d10669 15976
90121a3e
AJ
15977 int zero = return_zero();
15978
3828bfac
AJ
15979 ;
15980 return 0;
15981}
44d10669 15982
3828bfac
AJ
15983_ACEOF
15984if ac_fn_c_try_compile "$LINENO"; then :
44d10669 15985
90121a3e 15986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3828bfac 15987$as_echo "yes" >&6; }
90121a3e 15988 ATHEME_TEST_CC_FLAGS_RESULT="yes"
44d10669
AJ
15989
15990else
15991
90121a3e 15992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3828bfac 15993$as_echo "no" >&6; }
90121a3e
AJ
15994 ATHEME_TEST_CC_FLAGS_RESULT="no"
15995 CFLAGS="${CFLAGS_SAVED}"
44d10669
AJ
15996
15997fi
3828bfac
AJ
15998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15999
90121a3e 16000 unset CFLAGS_SAVED
3828bfac 16001
f54ed0d4
AJ
16002 ;; #(
16003 *) :
90121a3e 16004
f54ed0d4
AJ
16005 as_fn_error $? "invalid option for --enable-stack-clash-protection" "$LINENO" 5
16006 ;;
16007esac
44d10669 16008
f54ed0d4
AJ
16009 case "x${enable_stack_protector}" in #(
16010 xno) :
16011 ;; #(
16012 xyes) :
90121a3e 16013
44d10669 16014
90121a3e
AJ
16015
16016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -fstack-protector-all " >&5
3828bfac 16017$as_echo_n "checking for C compiler flag(s) -fstack-protector-all ... " >&6; }
44d10669 16018
90121a3e
AJ
16019 CFLAGS_SAVED="${CFLAGS:-}"
16020 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fstack-protector-all"
44d10669 16021
90121a3e 16022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3828bfac 16023/* end confdefs.h. */
44d10669 16024
44d10669 16025
90121a3e
AJ
16026 #ifdef HAVE_STDDEF_H
16027 # include <stddef.h>
16028 #endif
16029 static int
16030 return_zero(void)
16031 {
16032 return 0;
16033 }
16034
44d10669
AJ
16035int
16036main ()
16037{
16038
90121a3e
AJ
16039 int zero = return_zero();
16040
44d10669
AJ
16041 ;
16042 return 0;
16043}
16044
16045_ACEOF
3828bfac 16046if ac_fn_c_try_compile "$LINENO"; then :
44d10669 16047
90121a3e 16048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3828bfac 16049$as_echo "yes" >&6; }
90121a3e 16050 ATHEME_TEST_CC_FLAGS_RESULT="yes"
44d10669
AJ
16051
16052else
16053
90121a3e 16054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44d10669 16055$as_echo "no" >&6; }
90121a3e
AJ
16056 ATHEME_TEST_CC_FLAGS_RESULT="no"
16057 CFLAGS="${CFLAGS_SAVED}"
3828bfac
AJ
16058
16059fi
16060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16061
90121a3e 16062 unset CFLAGS_SAVED
3828bfac 16063
f54ed0d4 16064 if test "${ATHEME_TEST_CC_FLAGS_RESULT}" = "no"; then :
3828bfac
AJ
16065
16066
16067
90121a3e 16068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -fstack-protector-strong " >&5
3828bfac
AJ
16069$as_echo_n "checking for C compiler flag(s) -fstack-protector-strong ... " >&6; }
16070
90121a3e
AJ
16071 CFLAGS_SAVED="${CFLAGS:-}"
16072 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fstack-protector-strong"
3828bfac 16073
90121a3e 16074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ad5cc67e
AJ
16075/* end confdefs.h. */
16076
16077
90121a3e
AJ
16078 #ifdef HAVE_STDDEF_H
16079 # include <stddef.h>
16080 #endif
16081 static int
16082 return_zero(void)
16083 {
16084 return 0;
16085 }
16086
ad5cc67e
AJ
16087int
16088main ()
16089{
16090
90121a3e
AJ
16091 int zero = return_zero();
16092
ad5cc67e
AJ
16093 ;
16094 return 0;
16095}
16096
16097_ACEOF
3828bfac 16098if ac_fn_c_try_compile "$LINENO"; then :
ad5cc67e 16099
90121a3e 16100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3828bfac 16101$as_echo "yes" >&6; }
90121a3e 16102 ATHEME_TEST_CC_FLAGS_RESULT="yes"
ad5cc67e
AJ
16103
16104else
16105
90121a3e 16106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3828bfac 16107$as_echo "no" >&6; }
90121a3e
AJ
16108 ATHEME_TEST_CC_FLAGS_RESULT="no"
16109 CFLAGS="${CFLAGS_SAVED}"
ad5cc67e
AJ
16110
16111fi
3828bfac 16112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ad5cc67e 16113
90121a3e 16114 unset CFLAGS_SAVED
ad5cc67e 16115
f54ed0d4 16116 if test "${ATHEME_TEST_CC_FLAGS_RESULT}" = "no"; then :
3f9992da 16117
a19ae377
AJ
16118
16119
90121a3e 16120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -fstack-protector " >&5
3828bfac 16121$as_echo_n "checking for C compiler flag(s) -fstack-protector ... " >&6; }
f7291891 16122
90121a3e
AJ
16123 CFLAGS_SAVED="${CFLAGS:-}"
16124 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-fstack-protector"
f7291891 16125
90121a3e 16126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85f61964
WP
16127/* end confdefs.h. */
16128
083f09b4 16129
90121a3e
AJ
16130 #ifdef HAVE_STDDEF_H
16131 # include <stddef.h>
16132 #endif
16133 static int
16134 return_zero(void)
16135 {
16136 return 0;
16137 }
16138
85f61964
WP
16139int
16140main ()
16141{
083f09b4 16142
90121a3e
AJ
16143 int zero = return_zero();
16144
85f61964
WP
16145 ;
16146 return 0;
16147}
f7291891 16148
85f61964 16149_ACEOF
0133cdd9 16150if ac_fn_c_try_compile "$LINENO"; then :
f7291891 16151
90121a3e 16152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 16153$as_echo "yes" >&6; }
90121a3e 16154 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 16155
85f61964 16156else
f7291891 16157
90121a3e 16158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 16159$as_echo "no" >&6; }
90121a3e
AJ
16160 ATHEME_TEST_CC_FLAGS_RESULT="no"
16161 CFLAGS="${CFLAGS_SAVED}"
f7291891 16162
14967f86 16163fi
3828bfac
AJ
16164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16165
90121a3e 16166 unset CFLAGS_SAVED
3828bfac
AJ
16167
16168
16169fi
16170
16171fi
f54ed0d4
AJ
16172 ;; #(
16173 *) :
90121a3e 16174
f54ed0d4
AJ
16175 as_fn_error $? "invalid option for --enable-stack-protector" "$LINENO" 5
16176 ;;
16177esac
3828bfac
AJ
16178
16179
16180
16181 # Check whether --enable-profile was given.
16182if test "${enable_profile+set}" = set; then :
16183 enableval=$enable_profile;
16184else
16185 enable_profile="no"
16186fi
16187
16188
16189 # Check whether --enable-relro was given.
16190if test "${enable_relro+set}" = set; then :
16191 enableval=$enable_relro;
16192else
16193 enable_relro="yes"
16194fi
16195
16196
16197 # Check whether --enable-nonlazy-bind was given.
16198if test "${enable_nonlazy_bind+set}" = set; then :
16199 enableval=$enable_nonlazy_bind;
16200else
16201 enable_nonlazy_bind="yes"
16202fi
16203
16204
16205 # Check whether --enable-linker-defs was given.
16206if test "${enable_linker_defs+set}" = set; then :
16207 enableval=$enable_linker_defs;
16208else
16209 enable_linker_defs="yes"
16210fi
16211
16212
6440ab19
AJ
16213 # Check whether --enable-noexecstack was given.
16214if test "${enable_noexecstack+set}" = set; then :
16215 enableval=$enable_noexecstack;
16216else
16217 enable_noexecstack="yes"
16218fi
16219
16220
3828bfac
AJ
16221 # Check whether --enable-as-needed was given.
16222if test "${enable_as_needed+set}" = set; then :
16223 enableval=$enable_as_needed;
16224else
16225 enable_as_needed="yes"
16226fi
0133cdd9
AJ
16227
16228
3828bfac
AJ
16229 # Check whether --enable-rpath was given.
16230if test "${enable_rpath+set}" = set; then :
16231 enableval=$enable_rpath;
16232else
16233 enable_rpath="yes"
16234fi
0133cdd9
AJ
16235
16236
90121a3e
AJ
16237
16238
f54ed0d4
AJ
16239 case "x${enable_profile}" in #(
16240 xno) :
16241 ;; #(
16242 xyes) :
90121a3e 16243
f7291891 16244
90121a3e
AJ
16245
16246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C linker flag(s) -pg " >&5
3828bfac 16247$as_echo_n "checking for C linker flag(s) -pg ... " >&6; }
5d77e6b8 16248
90121a3e
AJ
16249 LDFLAGS_SAVED="${LDFLAGS:-}"
16250 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-pg"
f7291891 16251
90121a3e 16252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
083f09b4 16253/* end confdefs.h. */
85f61964 16254
85f61964 16255
90121a3e
AJ
16256 #ifdef HAVE_STDDEF_H
16257 # include <stddef.h>
16258 #endif
16259 static int
16260 return_zero(void)
16261 {
16262 return 0;
16263 }
16264
083f09b4
WP
16265int
16266main ()
16267{
16268
90121a3e
AJ
16269 int zero = return_zero();
16270
083f09b4
WP
16271 ;
16272 return 0;
16273}
f7291891 16274
083f09b4 16275_ACEOF
3828bfac 16276if ac_fn_c_try_link "$LINENO"; then :
f7291891 16277
90121a3e 16278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 16279$as_echo "yes" >&6; }
90121a3e 16280 ATHEME_TEST_LD_FLAGS_RESULT="yes"
a7b9a285 16281
85f61964 16282else
f7291891 16283
90121a3e 16284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 16285$as_echo "no" >&6; }
90121a3e
AJ
16286 ATHEME_TEST_LD_FLAGS_RESULT="no"
16287 LDFLAGS="${LDFLAGS_SAVED}"
3828bfac 16288
083f09b4 16289fi
3828bfac
AJ
16290rm -f core conftest.err conftest.$ac_objext \
16291 conftest$ac_exeext conftest.$ac_ext
85f61964 16292
90121a3e 16293 unset LDFLAGS_SAVED
85f61964 16294
f54ed0d4
AJ
16295 ;; #(
16296 *) :
90121a3e 16297
f54ed0d4
AJ
16298 as_fn_error $? "invalid option for --enable-profile" "$LINENO" 5
16299 ;;
16300esac
a19ae377 16301
f54ed0d4
AJ
16302 case "x${enable_relro}" in #(
16303 xno) :
16304 ;; #(
16305 xyes) :
90121a3e 16306
f7291891 16307
90121a3e
AJ
16308
16309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C linker flag(s) -Wl,-z,relro " >&5
3828bfac
AJ
16310$as_echo_n "checking for C linker flag(s) -Wl,-z,relro ... " >&6; }
16311
90121a3e
AJ
16312 LDFLAGS_SAVED="${LDFLAGS:-}"
16313 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-Wl,-z,relro"
f7291891 16314
90121a3e 16315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85f61964
WP
16316/* end confdefs.h. */
16317
083f09b4 16318
90121a3e
AJ
16319 #ifdef HAVE_STDDEF_H
16320 # include <stddef.h>
16321 #endif
16322 static int
16323 return_zero(void)
16324 {
16325 return 0;
16326 }
16327
85f61964
WP
16328int
16329main ()
16330{
083f09b4 16331
90121a3e
AJ
16332 int zero = return_zero();
16333
85f61964
WP
16334 ;
16335 return 0;
16336}
f7291891 16337
85f61964 16338_ACEOF
3828bfac 16339if ac_fn_c_try_link "$LINENO"; then :
f7291891 16340
90121a3e 16341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 16342$as_echo "yes" >&6; }
90121a3e 16343 ATHEME_TEST_LD_FLAGS_RESULT="yes"
a7b9a285 16344
85f61964 16345else
f7291891 16346
90121a3e 16347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 16348$as_echo "no" >&6; }
90121a3e
AJ
16349 ATHEME_TEST_LD_FLAGS_RESULT="no"
16350 LDFLAGS="${LDFLAGS_SAVED}"
083f09b4 16351
3828bfac
AJ
16352fi
16353rm -f core conftest.err conftest.$ac_objext \
16354 conftest$ac_exeext conftest.$ac_ext
f7291891 16355
90121a3e 16356 unset LDFLAGS_SAVED
f7291891 16357
f54ed0d4
AJ
16358 ;; #(
16359 *) :
90121a3e 16360
f54ed0d4
AJ
16361 as_fn_error $? "invalid option for --enable-relro" "$LINENO" 5
16362 ;;
16363esac
f7291891 16364
f54ed0d4
AJ
16365 case "x${enable_nonlazy_bind}" in #(
16366 xno) :
16367 ;; #(
16368 xyes) :
90121a3e 16369
f7291891 16370
90121a3e
AJ
16371
16372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C linker flag(s) -Wl,-z,now " >&5
3828bfac 16373$as_echo_n "checking for C linker flag(s) -Wl,-z,now ... " >&6; }
3f9992da 16374
90121a3e
AJ
16375 LDFLAGS_SAVED="${LDFLAGS:-}"
16376 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-Wl,-z,now"
3f9992da 16377
90121a3e 16378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
16379/* end confdefs.h. */
16380
16381
90121a3e
AJ
16382 #ifdef HAVE_STDDEF_H
16383 # include <stddef.h>
16384 #endif
16385 static int
16386 return_zero(void)
16387 {
16388 return 0;
16389 }
16390
f7291891
AJ
16391int
16392main ()
16393{
16394
90121a3e
AJ
16395 int zero = return_zero();
16396
f7291891
AJ
16397 ;
16398 return 0;
16399}
16400
16401_ACEOF
3f9992da 16402if ac_fn_c_try_link "$LINENO"; then :
f7291891 16403
90121a3e 16404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 16405$as_echo "yes" >&6; }
90121a3e 16406 ATHEME_TEST_LD_FLAGS_RESULT="yes"
a7b9a285 16407
f7291891
AJ
16408else
16409
90121a3e 16410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 16411$as_echo "no" >&6; }
90121a3e
AJ
16412 ATHEME_TEST_LD_FLAGS_RESULT="no"
16413 LDFLAGS="${LDFLAGS_SAVED}"
f7291891 16414
5d77e6b8 16415fi
3f9992da
AJ
16416rm -f core conftest.err conftest.$ac_objext \
16417 conftest$ac_exeext conftest.$ac_ext
f7291891 16418
90121a3e 16419 unset LDFLAGS_SAVED
f7291891 16420
f54ed0d4
AJ
16421 ;; #(
16422 *) :
90121a3e 16423
f54ed0d4
AJ
16424 as_fn_error $? "invalid option for --enable-nonlazy-bind" "$LINENO" 5
16425 ;;
16426esac
f7291891 16427
f54ed0d4
AJ
16428 case "x${enable_linker_defs}" in #(
16429 xno) :
16430 ;; #(
16431 xyes) :
90121a3e 16432
f54ed0d4 16433 if test "${COMPILER_SANITIZERS}" = "Yes"; then :
5d77e6b8 16434
f54ed0d4 16435 as_fn_error $? "To use --enable-compiler-sanitizers you must pass --disable-linker-defs" "$LINENO" 5
0133cdd9 16436
81edff03 16437fi
0133cdd9 16438
90121a3e
AJ
16439
16440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C linker flag(s) -Wl,-z,defs " >&5
3828bfac 16441$as_echo_n "checking for C linker flag(s) -Wl,-z,defs ... " >&6; }
f7291891 16442
90121a3e
AJ
16443 LDFLAGS_SAVED="${LDFLAGS:-}"
16444 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-Wl,-z,defs"
3f9992da 16445
90121a3e 16446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
16447/* end confdefs.h. */
16448
16449
90121a3e
AJ
16450 #ifdef HAVE_STDDEF_H
16451 # include <stddef.h>
16452 #endif
16453 static int
16454 return_zero(void)
16455 {
16456 return 0;
16457 }
16458
f7291891
AJ
16459int
16460main ()
16461{
16462
90121a3e
AJ
16463 int zero = return_zero();
16464
f7291891
AJ
16465 ;
16466 return 0;
16467}
16468
16469_ACEOF
3f9992da 16470if ac_fn_c_try_link "$LINENO"; then :
f7291891 16471
90121a3e 16472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 16473$as_echo "yes" >&6; }
90121a3e 16474 ATHEME_TEST_LD_FLAGS_RESULT="yes"
a7b9a285 16475
f7291891
AJ
16476else
16477
90121a3e 16478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 16479$as_echo "no" >&6; }
90121a3e
AJ
16480 ATHEME_TEST_LD_FLAGS_RESULT="no"
16481 LDFLAGS="${LDFLAGS_SAVED}"
f7291891
AJ
16482
16483fi
3f9992da
AJ
16484rm -f core conftest.err conftest.$ac_objext \
16485 conftest$ac_exeext conftest.$ac_ext
5d77e6b8 16486
90121a3e 16487 unset LDFLAGS_SAVED
f7291891 16488
f54ed0d4
AJ
16489 ;; #(
16490 *) :
90121a3e 16491
f54ed0d4
AJ
16492 as_fn_error $? "invalid option for --enable-linker-defs" "$LINENO" 5
16493 ;;
16494esac
0133cdd9 16495
f54ed0d4
AJ
16496 case "x${enable_noexecstack}" in #(
16497 xno) :
16498 ;; #(
16499 xyes) :
6440ab19 16500
6440ab19
AJ
16501
16502
16503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C linker flag(s) -Wl,-z,noexecstack " >&5
16504$as_echo_n "checking for C linker flag(s) -Wl,-z,noexecstack ... " >&6; }
16505
16506 LDFLAGS_SAVED="${LDFLAGS:-}"
16507 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-Wl,-z,noexecstack"
16508
16509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16510/* end confdefs.h. */
16511
16512
16513 #ifdef HAVE_STDDEF_H
16514 # include <stddef.h>
16515 #endif
16516 static int
16517 return_zero(void)
16518 {
16519 return 0;
16520 }
16521
16522int
16523main ()
16524{
16525
16526 int zero = return_zero();
16527
16528 ;
16529 return 0;
16530}
16531
16532_ACEOF
16533if ac_fn_c_try_link "$LINENO"; then :
16534
16535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16536$as_echo "yes" >&6; }
16537 ATHEME_TEST_LD_FLAGS_RESULT="yes"
16538
16539else
16540
16541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16542$as_echo "no" >&6; }
16543 ATHEME_TEST_LD_FLAGS_RESULT="no"
16544 LDFLAGS="${LDFLAGS_SAVED}"
16545
16546fi
16547rm -f core conftest.err conftest.$ac_objext \
16548 conftest$ac_exeext conftest.$ac_ext
16549
16550 unset LDFLAGS_SAVED
16551
f54ed0d4
AJ
16552 ;; #(
16553 *) :
6440ab19 16554
f54ed0d4
AJ
16555 as_fn_error $? "invalid option for --enable-noexecstack" "$LINENO" 5
16556 ;;
16557esac
6440ab19 16558
f54ed0d4
AJ
16559 case "x${enable_as_needed}" in #(
16560 xno) :
16561 ;; #(
16562 xyes) :
90121a3e 16563
f7291891 16564
90121a3e
AJ
16565
16566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C linker flag(s) -Wl,--as-needed " >&5
3828bfac 16567$as_echo_n "checking for C linker flag(s) -Wl,--as-needed ... " >&6; }
f7291891 16568
90121a3e
AJ
16569 LDFLAGS_SAVED="${LDFLAGS:-}"
16570 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }-Wl,--as-needed"
3828bfac 16571
90121a3e 16572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3828bfac 16573/* end confdefs.h. */
f7291891 16574
3f9992da 16575
90121a3e
AJ
16576 #ifdef HAVE_STDDEF_H
16577 # include <stddef.h>
16578 #endif
16579 static int
16580 return_zero(void)
16581 {
16582 return 0;
16583 }
16584
f7291891
AJ
16585int
16586main ()
16587{
16588
90121a3e
AJ
16589 int zero = return_zero();
16590
f7291891
AJ
16591 ;
16592 return 0;
16593}
16594
16595_ACEOF
3f9992da 16596if ac_fn_c_try_link "$LINENO"; then :
f7291891 16597
90121a3e 16598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 16599$as_echo "yes" >&6; }
90121a3e 16600 ATHEME_TEST_LD_FLAGS_RESULT="yes"
a7b9a285 16601
f7291891
AJ
16602else
16603
90121a3e 16604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 16605$as_echo "no" >&6; }
90121a3e
AJ
16606 ATHEME_TEST_LD_FLAGS_RESULT="no"
16607 LDFLAGS="${LDFLAGS_SAVED}"
f7291891
AJ
16608
16609fi
3f9992da
AJ
16610rm -f core conftest.err conftest.$ac_objext \
16611 conftest$ac_exeext conftest.$ac_ext
0133cdd9 16612
90121a3e 16613 unset LDFLAGS_SAVED
5d77e6b8 16614
f54ed0d4
AJ
16615 ;; #(
16616 *) :
90121a3e 16617
f54ed0d4
AJ
16618 as_fn_error $? "invalid option for --enable-as-needed" "$LINENO" 5
16619 ;;
16620esac
5d77e6b8 16621
f54ed0d4
AJ
16622 case "x${enable_rpath}" in #(
16623 xno) :
16624 ;; #(
16625 xyes) :
90121a3e 16626
5d77e6b8 16627
90121a3e
AJ
16628
16629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C linker flag(s) ${LDFLAGS_RPATH} " >&5
3828bfac 16630$as_echo_n "checking for C linker flag(s) ${LDFLAGS_RPATH} ... " >&6; }
f7291891 16631
90121a3e
AJ
16632 LDFLAGS_SAVED="${LDFLAGS:-}"
16633 LDFLAGS="${LDFLAGS:-}${LDFLAGS:+ }${LDFLAGS_RPATH}"
f7291891 16634
90121a3e 16635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3828bfac 16636/* end confdefs.h. */
f7291891 16637
3f9992da 16638
90121a3e
AJ
16639 #ifdef HAVE_STDDEF_H
16640 # include <stddef.h>
16641 #endif
16642 static int
16643 return_zero(void)
16644 {
16645 return 0;
16646 }
16647
f7291891
AJ
16648int
16649main ()
16650{
16651
90121a3e
AJ
16652 int zero = return_zero();
16653
f7291891
AJ
16654 ;
16655 return 0;
16656}
16657
16658_ACEOF
3f9992da 16659if ac_fn_c_try_link "$LINENO"; then :
f7291891 16660
90121a3e 16661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 16662$as_echo "yes" >&6; }
90121a3e 16663 ATHEME_TEST_LD_FLAGS_RESULT="yes"
a7b9a285 16664
f7291891
AJ
16665else
16666
90121a3e 16667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 16668$as_echo "no" >&6; }
90121a3e
AJ
16669 ATHEME_TEST_LD_FLAGS_RESULT="no"
16670 LDFLAGS="${LDFLAGS_SAVED}"
f7291891
AJ
16671
16672fi
3f9992da
AJ
16673rm -f core conftest.err conftest.$ac_objext \
16674 conftest$ac_exeext conftest.$ac_ext
0133cdd9 16675
90121a3e 16676 unset LDFLAGS_SAVED
b11ef6c2 16677
f54ed0d4
AJ
16678 ;; #(
16679 *) :
90121a3e 16680
f54ed0d4
AJ
16681 as_fn_error $? "invalid option for --enable-rpath" "$LINENO" 5
16682 ;;
16683esac
6a7d3169 16684
6a7d3169 16685
6a7d3169 16686
3828bfac 16687 # Do nothing
6a7d3169 16688
3f9992da 16689
3828bfac
AJ
16690 if test "X$prefix" = "XNONE"; then
16691 acl_final_prefix="$ac_default_prefix"
16692 else
16693 acl_final_prefix="$prefix"
16694 fi
16695 if test "X$exec_prefix" = "XNONE"; then
16696 acl_final_exec_prefix='${prefix}'
16697 else
16698 acl_final_exec_prefix="$exec_prefix"
16699 fi
16700 acl_save_prefix="$prefix"
16701 prefix="$acl_final_prefix"
16702 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
16703 prefix="$acl_save_prefix"
6a7d3169 16704
3f9992da 16705
6a7d3169 16706
3828bfac
AJ
16707# Check whether --with-gnu-ld was given.
16708if test "${with_gnu_ld+set}" = set; then :
16709 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
16710else
16711 with_gnu_ld=no
16712fi
6a7d3169 16713
3828bfac
AJ
16714# Prepare PATH_SEPARATOR.
16715# The user is always right.
16716if test "${PATH_SEPARATOR+set}" != set; then
16717 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
16718 # contains only /bin. Note that ksh looks also at the FPATH variable,
16719 # so we have to set that as well for the test.
16720 PATH_SEPARATOR=:
16721 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
16722 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
16723 || PATH_SEPARATOR=';'
16724 }
16725fi
6a7d3169 16726
3828bfac
AJ
16727ac_prog=ld
16728if test "$GCC" = yes; then
16729 # Check if gcc -print-prog-name=ld gives a path.
16730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
16731$as_echo_n "checking for ld used by $CC... " >&6; }
16732 case $host in
16733 *-*-mingw*)
16734 # gcc leaves a trailing carriage return which upsets mingw
16735 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
16736 *)
16737 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
16738 esac
16739 case $ac_prog in
16740 # Accept absolute paths.
16741 [\\/]* | ?:[\\/]*)
16742 re_direlt='/[^/][^/]*/\.\./'
16743 # Canonicalize the pathname of ld
16744 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
16745 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
16746 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
16747 done
16748 test -z "$LD" && LD="$ac_prog"
16749 ;;
16750 "")
16751 # If it fails, then pretend we aren't using GCC.
16752 ac_prog=ld
16753 ;;
16754 *)
16755 # If it is relative, then search for the first ld in PATH.
16756 with_gnu_ld=unknown
16757 ;;
16758 esac
16759elif test "$with_gnu_ld" = yes; then
16760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
16761$as_echo_n "checking for GNU ld... " >&6; }
16762else
16763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
16764$as_echo_n "checking for non-GNU ld... " >&6; }
16765fi
16766if ${acl_cv_path_LD+:} false; then :
16767 $as_echo_n "(cached) " >&6
16768else
16769 if test -z "$LD"; then
16770 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
16771 for ac_dir in $PATH; do
16772 IFS="$acl_save_ifs"
16773 test -z "$ac_dir" && ac_dir=.
16774 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
16775 acl_cv_path_LD="$ac_dir/$ac_prog"
16776 # Check to see if the program is GNU ld. I'd rather use --version,
16777 # but apparently some variants of GNU ld only accept -v.
16778 # Break only if it was the GNU/non-GNU ld that we prefer.
16779 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
16780 *GNU* | *'with BFD'*)
16781 test "$with_gnu_ld" != no && break
16782 ;;
16783 *)
16784 test "$with_gnu_ld" != yes && break
16785 ;;
16786 esac
16787 fi
16788 done
16789 IFS="$acl_save_ifs"
6a7d3169 16790else
3828bfac
AJ
16791 acl_cv_path_LD="$LD" # Let the user override the test with a path.
16792fi
16793fi
6a7d3169 16794
3828bfac
AJ
16795LD="$acl_cv_path_LD"
16796if test -n "$LD"; then
16797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
16798$as_echo "$LD" >&6; }
16799else
16800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3f9992da 16801$as_echo "no" >&6; }
3f9992da 16802fi
3828bfac
AJ
16803test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
16804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
16805$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
16806if ${acl_cv_prog_gnu_ld+:} false; then :
16807 $as_echo_n "(cached) " >&6
16808else
16809 # I'd rather use --version here, but apparently some GNU lds only accept -v.
16810case `$LD -v 2>&1 </dev/null` in
16811*GNU* | *'with BFD'*)
16812 acl_cv_prog_gnu_ld=yes
16813 ;;
16814*)
16815 acl_cv_prog_gnu_ld=no
16816 ;;
16817esac
16818fi
16819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
16820$as_echo "$acl_cv_prog_gnu_ld" >&6; }
16821with_gnu_ld=$acl_cv_prog_gnu_ld
3f9992da 16822
3f9992da 16823
3f9992da
AJ
16824
16825
3828bfac
AJ
16826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
16827$as_echo_n "checking for shared library run path origin... " >&6; }
16828if ${acl_cv_rpath+:} false; then :
16829 $as_echo_n "(cached) " >&6
16830else
3f9992da 16831
3828bfac
AJ
16832 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
16833 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
16834 . ./conftest.sh
16835 rm -f ./conftest.sh
16836 acl_cv_rpath=done
3f9992da 16837
3828bfac
AJ
16838fi
16839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
16840$as_echo "$acl_cv_rpath" >&6; }
16841 wl="$acl_cv_wl"
16842 acl_libext="$acl_cv_libext"
16843 acl_shlibext="$acl_cv_shlibext"
16844 acl_libname_spec="$acl_cv_libname_spec"
16845 acl_library_names_spec="$acl_cv_library_names_spec"
16846 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
16847 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
16848 acl_hardcode_direct="$acl_cv_hardcode_direct"
16849 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
16850 # Check whether --enable-rpath was given.
16851if test "${enable_rpath+set}" = set; then :
16852 enableval=$enable_rpath; :
16853else
16854 enable_rpath=yes
16855fi
3f9992da 16856
3f9992da 16857
3f9992da 16858
3f9992da 16859
3828bfac
AJ
16860 acl_libdirstem=lib
16861 acl_libdirstem2=
16862 case "$host_os" in
16863 solaris*)
16864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
16865$as_echo_n "checking for 64-bit host... " >&6; }
16866if ${gl_cv_solaris_64bit+:} false; then :
16867 $as_echo_n "(cached) " >&6
3f9992da 16868else
3828bfac
AJ
16869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16870/* end confdefs.h. */
3f9992da 16871
3828bfac
AJ
16872#ifdef _LP64
16873sixtyfour bits
16874#endif
3f9992da 16875
3828bfac
AJ
16876_ACEOF
16877if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16878 $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
16879 gl_cv_solaris_64bit=yes
16880else
16881 gl_cv_solaris_64bit=no
3f9992da 16882fi
3828bfac 16883rm -f conftest*
3f9992da
AJ
16884
16885
3828bfac
AJ
16886fi
16887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
16888$as_echo "$gl_cv_solaris_64bit" >&6; }
16889 if test $gl_cv_solaris_64bit = yes; then
16890 acl_libdirstem=lib/64
16891 case "$host_cpu" in
16892 sparc*) acl_libdirstem2=lib/sparcv9 ;;
16893 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
16894 esac
16895 fi
16896 ;;
16897 *)
16898 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
16899 if test -n "$searchpath"; then
16900 acl_save_IFS="${IFS= }"; IFS=":"
16901 for searchdir in $searchpath; do
16902 if test -d "$searchdir"; then
16903 case "$searchdir" in
16904 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
16905 */../ | */.. )
16906 # Better ignore directories of this form. They are misleading.
16907 ;;
16908 *) searchdir=`cd "$searchdir" && pwd`
16909 case "$searchdir" in
16910 */lib64 ) acl_libdirstem=lib64 ;;
16911 esac ;;
16912 esac
16913 fi
16914 done
16915 IFS="$acl_save_IFS"
16916 fi
16917 ;;
16918 esac
16919 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
3f9992da 16920
3f9992da 16921
3f9992da 16922
3f9992da
AJ
16923
16924
3f9992da 16925
3f9992da 16926
3f9992da 16927
3f9992da 16928
3f9992da 16929
3f9992da 16930
3f9992da 16931
3828bfac 16932 use_additional=yes
3f9992da 16933
3828bfac
AJ
16934 acl_save_prefix="$prefix"
16935 prefix="$acl_final_prefix"
16936 acl_save_exec_prefix="$exec_prefix"
16937 exec_prefix="$acl_final_exec_prefix"
3f9992da 16938
3828bfac
AJ
16939 eval additional_includedir=\"$includedir\"
16940 eval additional_libdir=\"$libdir\"
3f9992da 16941
3828bfac
AJ
16942 exec_prefix="$acl_save_exec_prefix"
16943 prefix="$acl_save_prefix"
3f9992da 16944
3f9992da 16945
3828bfac
AJ
16946# Check whether --with-libiconv-prefix was given.
16947if test "${with_libiconv_prefix+set}" = set; then :
16948 withval=$with_libiconv_prefix;
16949 if test "X$withval" = "Xno"; then
16950 use_additional=no
16951 else
16952 if test "X$withval" = "X"; then
3f9992da 16953
3828bfac
AJ
16954 acl_save_prefix="$prefix"
16955 prefix="$acl_final_prefix"
16956 acl_save_exec_prefix="$exec_prefix"
16957 exec_prefix="$acl_final_exec_prefix"
3f9992da 16958
3828bfac
AJ
16959 eval additional_includedir=\"$includedir\"
16960 eval additional_libdir=\"$libdir\"
3f9992da 16961
3828bfac
AJ
16962 exec_prefix="$acl_save_exec_prefix"
16963 prefix="$acl_save_prefix"
3f9992da 16964
3828bfac
AJ
16965 else
16966 additional_includedir="$withval/include"
16967 additional_libdir="$withval/$acl_libdirstem"
16968 if test "$acl_libdirstem2" != "$acl_libdirstem" \
16969 && ! test -d "$withval/$acl_libdirstem"; then
16970 additional_libdir="$withval/$acl_libdirstem2"
16971 fi
16972 fi
16973 fi
3f9992da 16974
3828bfac 16975fi
3f9992da 16976
3828bfac
AJ
16977 LIBICONV=
16978 LTLIBICONV=
16979 INCICONV=
16980 LIBICONV_PREFIX=
16981 HAVE_LIBICONV=
16982 rpathdirs=
16983 ltrpathdirs=
16984 names_already_handled=
16985 names_next_round='iconv '
16986 while test -n "$names_next_round"; do
16987 names_this_round="$names_next_round"
16988 names_next_round=
16989 for name in $names_this_round; do
16990 already_handled=
16991 for n in $names_already_handled; do
16992 if test "$n" = "$name"; then
16993 already_handled=yes
16994 break
16995 fi
16996 done
16997 if test -z "$already_handled"; then
16998 names_already_handled="$names_already_handled $name"
16999 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
17000 eval value=\"\$HAVE_LIB$uppername\"
17001 if test -n "$value"; then
17002 if test "$value" = yes; then
17003 eval value=\"\$LIB$uppername\"
17004 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
17005 eval value=\"\$LTLIB$uppername\"
17006 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
17007 else
17008 :
17009 fi
17010 else
17011 found_dir=
17012 found_la=
17013 found_so=
17014 found_a=
17015 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
17016 if test -n "$acl_shlibext"; then
17017 shrext=".$acl_shlibext" # typically: shrext=.so
17018 else
17019 shrext=
17020 fi
17021 if test $use_additional = yes; then
17022 dir="$additional_libdir"
17023 if test -n "$acl_shlibext"; then
17024 if test -f "$dir/$libname$shrext"; then
17025 found_dir="$dir"
17026 found_so="$dir/$libname$shrext"
17027 else
17028 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
17029 ver=`(cd "$dir" && \
17030 for f in "$libname$shrext".*; do echo "$f"; done \
17031 | sed -e "s,^$libname$shrext\\\\.,," \
17032 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
17033 | sed 1q ) 2>/dev/null`
17034 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
17035 found_dir="$dir"
17036 found_so="$dir/$libname$shrext.$ver"
17037 fi
17038 else
17039 eval library_names=\"$acl_library_names_spec\"
17040 for f in $library_names; do
17041 if test -f "$dir/$f"; then
17042 found_dir="$dir"
17043 found_so="$dir/$f"
17044 break
17045 fi
17046 done
17047 fi
17048 fi
17049 fi
17050 if test "X$found_dir" = "X"; then
17051 if test -f "$dir/$libname.$acl_libext"; then
17052 found_dir="$dir"
17053 found_a="$dir/$libname.$acl_libext"
17054 fi
17055 fi
17056 if test "X$found_dir" != "X"; then
17057 if test -f "$dir/$libname.la"; then
17058 found_la="$dir/$libname.la"
17059 fi
17060 fi
17061 fi
17062 if test "X$found_dir" = "X"; then
17063 for x in $LDFLAGS $LTLIBICONV; do
3f9992da 17064
3828bfac
AJ
17065 acl_save_prefix="$prefix"
17066 prefix="$acl_final_prefix"
17067 acl_save_exec_prefix="$exec_prefix"
17068 exec_prefix="$acl_final_exec_prefix"
17069 eval x=\"$x\"
17070 exec_prefix="$acl_save_exec_prefix"
17071 prefix="$acl_save_prefix"
3f9992da 17072
3828bfac
AJ
17073 case "$x" in
17074 -L*)
17075 dir=`echo "X$x" | sed -e 's/^X-L//'`
17076 if test -n "$acl_shlibext"; then
17077 if test -f "$dir/$libname$shrext"; then
17078 found_dir="$dir"
17079 found_so="$dir/$libname$shrext"
17080 else
17081 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
17082 ver=`(cd "$dir" && \
17083 for f in "$libname$shrext".*; do echo "$f"; done \
17084 | sed -e "s,^$libname$shrext\\\\.,," \
17085 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
17086 | sed 1q ) 2>/dev/null`
17087 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
17088 found_dir="$dir"
17089 found_so="$dir/$libname$shrext.$ver"
17090 fi
17091 else
17092 eval library_names=\"$acl_library_names_spec\"
17093 for f in $library_names; do
17094 if test -f "$dir/$f"; then
17095 found_dir="$dir"
17096 found_so="$dir/$f"
17097 break
17098 fi
17099 done
17100 fi
17101 fi
17102 fi
17103 if test "X$found_dir" = "X"; then
17104 if test -f "$dir/$libname.$acl_libext"; then
17105 found_dir="$dir"
17106 found_a="$dir/$libname.$acl_libext"
17107 fi
17108 fi
17109 if test "X$found_dir" != "X"; then
17110 if test -f "$dir/$libname.la"; then
17111 found_la="$dir/$libname.la"
17112 fi
17113 fi
17114 ;;
17115 esac
17116 if test "X$found_dir" != "X"; then
17117 break
17118 fi
17119 done
17120 fi
17121 if test "X$found_dir" != "X"; then
17122 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
17123 if test "X$found_so" != "X"; then
17124 if test "$enable_rpath" = no \
17125 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
17126 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
17127 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
17128 else
17129 haveit=
17130 for x in $ltrpathdirs; do
17131 if test "X$x" = "X$found_dir"; then
17132 haveit=yes
17133 break
17134 fi
17135 done
17136 if test -z "$haveit"; then
17137 ltrpathdirs="$ltrpathdirs $found_dir"
17138 fi
17139 if test "$acl_hardcode_direct" = yes; then
17140 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
17141 else
17142 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
17143 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
17144 haveit=
17145 for x in $rpathdirs; do
17146 if test "X$x" = "X$found_dir"; then
17147 haveit=yes
17148 break
17149 fi
17150 done
17151 if test -z "$haveit"; then
17152 rpathdirs="$rpathdirs $found_dir"
17153 fi
17154 else
17155 haveit=
17156 for x in $LDFLAGS $LIBICONV; do
3f9992da 17157
3828bfac
AJ
17158 acl_save_prefix="$prefix"
17159 prefix="$acl_final_prefix"
17160 acl_save_exec_prefix="$exec_prefix"
17161 exec_prefix="$acl_final_exec_prefix"
17162 eval x=\"$x\"
17163 exec_prefix="$acl_save_exec_prefix"
17164 prefix="$acl_save_prefix"
3f9992da 17165
3828bfac
AJ
17166 if test "X$x" = "X-L$found_dir"; then
17167 haveit=yes
17168 break
17169 fi
17170 done
17171 if test -z "$haveit"; then
17172 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
17173 fi
17174 if test "$acl_hardcode_minus_L" != no; then
17175 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
17176 else
17177 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
17178 fi
17179 fi
17180 fi
17181 fi
17182 else
17183 if test "X$found_a" != "X"; then
17184 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
17185 else
17186 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
17187 fi
17188 fi
17189 additional_includedir=
17190 case "$found_dir" in
17191 */$acl_libdirstem | */$acl_libdirstem/)
17192 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
17193 if test "$name" = 'iconv'; then
17194 LIBICONV_PREFIX="$basedir"
17195 fi
17196 additional_includedir="$basedir/include"
17197 ;;
17198 */$acl_libdirstem2 | */$acl_libdirstem2/)
17199 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
17200 if test "$name" = 'iconv'; then
17201 LIBICONV_PREFIX="$basedir"
17202 fi
17203 additional_includedir="$basedir/include"
17204 ;;
17205 esac
17206 if test "X$additional_includedir" != "X"; then
17207 if test "X$additional_includedir" != "X/usr/include"; then
17208 haveit=
17209 if test "X$additional_includedir" = "X/usr/local/include"; then
17210 if test -n "$GCC"; then
17211 case $host_os in
17212 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
17213 esac
17214 fi
17215 fi
17216 if test -z "$haveit"; then
17217 for x in $CPPFLAGS $INCICONV; do
3f9992da 17218
3828bfac
AJ
17219 acl_save_prefix="$prefix"
17220 prefix="$acl_final_prefix"
17221 acl_save_exec_prefix="$exec_prefix"
17222 exec_prefix="$acl_final_exec_prefix"
17223 eval x=\"$x\"
17224 exec_prefix="$acl_save_exec_prefix"
17225 prefix="$acl_save_prefix"
3f9992da 17226
3828bfac
AJ
17227 if test "X$x" = "X-I$additional_includedir"; then
17228 haveit=yes
17229 break
17230 fi
17231 done
17232 if test -z "$haveit"; then
17233 if test -d "$additional_includedir"; then
17234 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
17235 fi
17236 fi
17237 fi
17238 fi
17239 fi
17240 if test -n "$found_la"; then
17241 save_libdir="$libdir"
17242 case "$found_la" in
17243 */* | *\\*) . "$found_la" ;;
17244 *) . "./$found_la" ;;
17245 esac
17246 libdir="$save_libdir"
17247 for dep in $dependency_libs; do
17248 case "$dep" in
17249 -L*)
17250 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17251 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
17252 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
17253 haveit=
17254 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
17255 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
17256 if test -n "$GCC"; then
17257 case $host_os in
17258 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
17259 esac
17260 fi
17261 fi
17262 if test -z "$haveit"; then
17263 haveit=
17264 for x in $LDFLAGS $LIBICONV; do
3f9992da 17265
3828bfac
AJ
17266 acl_save_prefix="$prefix"
17267 prefix="$acl_final_prefix"
17268 acl_save_exec_prefix="$exec_prefix"
17269 exec_prefix="$acl_final_exec_prefix"
17270 eval x=\"$x\"
17271 exec_prefix="$acl_save_exec_prefix"
17272 prefix="$acl_save_prefix"
3f9992da 17273
3828bfac
AJ
17274 if test "X$x" = "X-L$additional_libdir"; then
17275 haveit=yes
17276 break
17277 fi
17278 done
17279 if test -z "$haveit"; then
17280 if test -d "$additional_libdir"; then
17281 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
17282 fi
17283 fi
17284 haveit=
17285 for x in $LDFLAGS $LTLIBICONV; do
3f9992da 17286
3828bfac
AJ
17287 acl_save_prefix="$prefix"
17288 prefix="$acl_final_prefix"
17289 acl_save_exec_prefix="$exec_prefix"
17290 exec_prefix="$acl_final_exec_prefix"
17291 eval x=\"$x\"
17292 exec_prefix="$acl_save_exec_prefix"
17293 prefix="$acl_save_prefix"
3f9992da 17294
3828bfac
AJ
17295 if test "X$x" = "X-L$additional_libdir"; then
17296 haveit=yes
17297 break
17298 fi
17299 done
17300 if test -z "$haveit"; then
17301 if test -d "$additional_libdir"; then
17302 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
17303 fi
17304 fi
17305 fi
17306 fi
17307 ;;
17308 -R*)
17309 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17310 if test "$enable_rpath" != no; then
17311 haveit=
17312 for x in $rpathdirs; do
17313 if test "X$x" = "X$dir"; then
17314 haveit=yes
17315 break
17316 fi
17317 done
17318 if test -z "$haveit"; then
17319 rpathdirs="$rpathdirs $dir"
17320 fi
17321 haveit=
17322 for x in $ltrpathdirs; do
17323 if test "X$x" = "X$dir"; then
17324 haveit=yes
17325 break
17326 fi
17327 done
17328 if test -z "$haveit"; then
17329 ltrpathdirs="$ltrpathdirs $dir"
17330 fi
17331 fi
17332 ;;
17333 -l*)
17334 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17335 ;;
17336 *.la)
17337 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17338 ;;
17339 *)
17340 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
17341 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
17342 ;;
17343 esac
17344 done
17345 fi
17346 else
17347 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
17348 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
17349 fi
17350 fi
17351 fi
17352 done
17353 done
17354 if test "X$rpathdirs" != "X"; then
17355 if test -n "$acl_hardcode_libdir_separator"; then
17356 alldirs=
17357 for found_dir in $rpathdirs; do
17358 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
17359 done
17360 acl_save_libdir="$libdir"
17361 libdir="$alldirs"
17362 eval flag=\"$acl_hardcode_libdir_flag_spec\"
17363 libdir="$acl_save_libdir"
17364 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
17365 else
17366 for found_dir in $rpathdirs; do
17367 acl_save_libdir="$libdir"
17368 libdir="$found_dir"
17369 eval flag=\"$acl_hardcode_libdir_flag_spec\"
17370 libdir="$acl_save_libdir"
17371 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
17372 done
17373 fi
17374 fi
17375 if test "X$ltrpathdirs" != "X"; then
17376 for found_dir in $ltrpathdirs; do
17377 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
17378 done
17379 fi
3f9992da 17380
3f9992da 17381
3f9992da
AJ
17382
17383
3f9992da 17384
3f9992da 17385
3f9992da 17386
3f9992da 17387
3f9992da 17388
ad7d2f2d 17389 # This must be lowercase; gettext.m4 requires it so
3828bfac 17390 USE_NLS="no"
3f9992da 17391
3828bfac
AJ
17392 # Check whether --enable-nls was given.
17393if test "${enable_nls+set}" = set; then :
17394 enableval=$enable_nls;
3f9992da 17395else
3828bfac 17396 enable_nls="no"
3f9992da 17397fi
3f9992da
AJ
17398
17399
f54ed0d4
AJ
17400 case "x${enable_nls}" in #(
17401 xno) :
17402 ;; #(
17403 xyes) :
3f9992da
AJ
17404
17405
3f9992da 17406
3828bfac 17407 GETTEXT_MACRO_VERSION=0.19
3f9992da 17408
3f9992da 17409
3f9992da 17410
3f9992da 17411
3828bfac
AJ
17412# Prepare PATH_SEPARATOR.
17413# The user is always right.
17414if test "${PATH_SEPARATOR+set}" != set; then
17415 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
17416 # contains only /bin. Note that ksh looks also at the FPATH variable,
17417 # so we have to set that as well for the test.
17418 PATH_SEPARATOR=:
17419 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
17420 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
17421 || PATH_SEPARATOR=';'
17422 }
17423fi
3f9992da 17424
3828bfac
AJ
17425# Find out how to test for executable files. Don't use a zero-byte file,
17426# as systems may use methods other than mode bits to determine executability.
17427cat >conf$$.file <<_ASEOF
17428#! /bin/sh
17429exit 0
17430_ASEOF
17431chmod +x conf$$.file
17432if test -x conf$$.file >/dev/null 2>&1; then
17433 ac_executable_p="test -x"
3f9992da 17434else
3828bfac 17435 ac_executable_p="test -f"
53cc3754 17436fi
3828bfac 17437rm -f conf$$.file
53cc3754 17438
3828bfac
AJ
17439# Extract the first word of "msgfmt", so it can be a program name with args.
17440set dummy msgfmt; ac_word=$2
17441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17442$as_echo_n "checking for $ac_word... " >&6; }
17443if ${ac_cv_path_MSGFMT+:} false; then :
17444 $as_echo_n "(cached) " >&6
17445else
17446 case "$MSGFMT" in
17447 [\\/]* | ?:[\\/]*)
17448 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
17449 ;;
17450 *)
17451 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
17452 for ac_dir in $PATH; do
17453 IFS="$ac_save_IFS"
17454 test -z "$ac_dir" && ac_dir=.
17455 for ac_exec_ext in '' $ac_executable_extensions; do
17456 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
17457 echo "$as_me: trying $ac_dir/$ac_word..." >&5
17458 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
17459 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
17460 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
17461 break 2
17462 fi
17463 fi
17464 done
17465 done
17466 IFS="$ac_save_IFS"
17467 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
17468 ;;
17469esac
17470fi
17471MSGFMT="$ac_cv_path_MSGFMT"
17472if test "$MSGFMT" != ":"; then
17473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17474$as_echo "$MSGFMT" >&6; }
17475else
17476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17477$as_echo "no" >&6; }
53cc3754
AJ
17478fi
17479
3828bfac
AJ
17480 # Extract the first word of "gmsgfmt", so it can be a program name with args.
17481set dummy gmsgfmt; ac_word=$2
17482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17483$as_echo_n "checking for $ac_word... " >&6; }
17484if ${ac_cv_path_GMSGFMT+:} false; then :
17485 $as_echo_n "(cached) " >&6
53cc3754 17486else
3828bfac
AJ
17487 case $GMSGFMT in
17488 [\\/]* | ?:[\\/]*)
17489 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
17490 ;;
17491 *)
17492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17493for as_dir in $PATH
17494do
17495 IFS=$as_save_IFS
17496 test -z "$as_dir" && as_dir=.
17497 for ac_exec_ext in '' $ac_executable_extensions; do
17498 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17499 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
17500 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17501 break 2
17502 fi
17503done
17504 done
17505IFS=$as_save_IFS
53cc3754 17506
3828bfac
AJ
17507 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
17508 ;;
17509esac
17510fi
17511GMSGFMT=$ac_cv_path_GMSGFMT
17512if test -n "$GMSGFMT"; then
17513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
17514$as_echo "$GMSGFMT" >&6; }
17515else
17516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53cc3754 17517$as_echo "no" >&6; }
3f9992da 17518fi
3f9992da
AJ
17519
17520
3f9992da 17521
3828bfac
AJ
17522 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
17523 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
17524 *) MSGFMT_015=$MSGFMT ;;
17525 esac
3f9992da 17526
3828bfac
AJ
17527 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
17528 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
17529 *) GMSGFMT_015=$GMSGFMT ;;
17530 esac
3f9992da
AJ
17531
17532
3f9992da 17533
3828bfac
AJ
17534# Prepare PATH_SEPARATOR.
17535# The user is always right.
17536if test "${PATH_SEPARATOR+set}" != set; then
17537 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
17538 # contains only /bin. Note that ksh looks also at the FPATH variable,
17539 # so we have to set that as well for the test.
17540 PATH_SEPARATOR=:
17541 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
17542 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
17543 || PATH_SEPARATOR=';'
17544 }
17545fi
3f9992da 17546
3828bfac
AJ
17547# Find out how to test for executable files. Don't use a zero-byte file,
17548# as systems may use methods other than mode bits to determine executability.
17549cat >conf$$.file <<_ASEOF
17550#! /bin/sh
17551exit 0
17552_ASEOF
17553chmod +x conf$$.file
17554if test -x conf$$.file >/dev/null 2>&1; then
17555 ac_executable_p="test -x"
3f9992da 17556else
3828bfac 17557 ac_executable_p="test -f"
3f9992da 17558fi
3828bfac 17559rm -f conf$$.file
3f9992da 17560
3828bfac
AJ
17561# Extract the first word of "xgettext", so it can be a program name with args.
17562set dummy xgettext; ac_word=$2
17563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17564$as_echo_n "checking for $ac_word... " >&6; }
17565if ${ac_cv_path_XGETTEXT+:} false; then :
17566 $as_echo_n "(cached) " >&6
3f9992da 17567else
3828bfac
AJ
17568 case "$XGETTEXT" in
17569 [\\/]* | ?:[\\/]*)
17570 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
17571 ;;
17572 *)
17573 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
17574 for ac_dir in $PATH; do
17575 IFS="$ac_save_IFS"
17576 test -z "$ac_dir" && ac_dir=.
17577 for ac_exec_ext in '' $ac_executable_extensions; do
17578 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
17579 echo "$as_me: trying $ac_dir/$ac_word..." >&5
17580 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
17581 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
17582 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
17583 break 2
17584 fi
17585 fi
17586 done
17587 done
17588 IFS="$ac_save_IFS"
17589 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
17590 ;;
17591esac
3f9992da 17592fi
3828bfac
AJ
17593XGETTEXT="$ac_cv_path_XGETTEXT"
17594if test "$XGETTEXT" != ":"; then
17595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
17596$as_echo "$XGETTEXT" >&6; }
3f9992da 17597else
3828bfac 17598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3f9992da 17599$as_echo "no" >&6; }
3f9992da 17600fi
3f9992da 17601
3828bfac 17602 rm -f messages.po
3f9992da 17603
3828bfac
AJ
17604 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
17605 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
17606 *) XGETTEXT_015=$XGETTEXT ;;
17607 esac
3f9992da 17608
3f9992da
AJ
17609
17610
3828bfac
AJ
17611# Prepare PATH_SEPARATOR.
17612# The user is always right.
17613if test "${PATH_SEPARATOR+set}" != set; then
17614 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
17615 # contains only /bin. Note that ksh looks also at the FPATH variable,
17616 # so we have to set that as well for the test.
17617 PATH_SEPARATOR=:
17618 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
17619 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
17620 || PATH_SEPARATOR=';'
17621 }
17622fi
3f9992da 17623
3828bfac
AJ
17624# Find out how to test for executable files. Don't use a zero-byte file,
17625# as systems may use methods other than mode bits to determine executability.
17626cat >conf$$.file <<_ASEOF
17627#! /bin/sh
17628exit 0
17629_ASEOF
17630chmod +x conf$$.file
17631if test -x conf$$.file >/dev/null 2>&1; then
17632 ac_executable_p="test -x"
3f9992da 17633else
3828bfac 17634 ac_executable_p="test -f"
3f9992da 17635fi
3828bfac 17636rm -f conf$$.file
3f9992da 17637
3828bfac
AJ
17638# Extract the first word of "msgmerge", so it can be a program name with args.
17639set dummy msgmerge; ac_word=$2
17640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17641$as_echo_n "checking for $ac_word... " >&6; }
17642if ${ac_cv_path_MSGMERGE+:} false; then :
17643 $as_echo_n "(cached) " >&6
3f9992da 17644else
3828bfac
AJ
17645 case "$MSGMERGE" in
17646 [\\/]* | ?:[\\/]*)
17647 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
17648 ;;
17649 *)
17650 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
17651 for ac_dir in $PATH; do
17652 IFS="$ac_save_IFS"
17653 test -z "$ac_dir" && ac_dir=.
17654 for ac_exec_ext in '' $ac_executable_extensions; do
17655 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
17656 echo "$as_me: trying $ac_dir/$ac_word..." >&5
17657 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
17658 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
17659 break 2
17660 fi
17661 fi
17662 done
17663 done
17664 IFS="$ac_save_IFS"
17665 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
17666 ;;
17667esac
3f9992da 17668fi
3828bfac
AJ
17669MSGMERGE="$ac_cv_path_MSGMERGE"
17670if test "$MSGMERGE" != ":"; then
17671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
17672$as_echo "$MSGMERGE" >&6; }
3f9992da 17673else
3828bfac
AJ
17674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17675$as_echo "no" >&6; }
3f9992da
AJ
17676fi
17677
17678
3828bfac 17679 test -n "$localedir" || localedir='${datadir}/locale'
3f9992da 17680
3f9992da 17681
3828bfac 17682 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
6a7d3169 17683
6a7d3169 17684
3828bfac
AJ
17685 ac_config_commands="$ac_config_commands po-directories"
17686
6a7d3169
AJ
17687
17688
b11ef6c2 17689
3f9992da 17690
b11ef6c2 17691
3f9992da 17692
3f9992da
AJ
17693
17694
3f9992da 17695
3f9992da 17696
3f9992da 17697
3f9992da 17698
3f9992da 17699
3f9992da 17700
3f9992da 17701
3f9992da 17702
3f9992da 17703
3f9992da
AJ
17704
17705
3f9992da 17706
3f9992da 17707
3f9992da 17708
3f9992da 17709
3f9992da
AJ
17710
17711
3828bfac
AJ
17712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
17713$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
17714if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
17715 $as_echo_n "(cached) " >&6
17716else
17717 gt_save_LIBS="$LIBS"
17718 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
17719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17720/* end confdefs.h. */
17721#include <CoreFoundation/CFPreferences.h>
3f9992da
AJ
17722int
17723main ()
17724{
3828bfac 17725CFPreferencesCopyAppValue(NULL, NULL)
3f9992da
AJ
17726 ;
17727 return 0;
17728}
3f9992da 17729_ACEOF
3828bfac
AJ
17730if ac_fn_c_try_link "$LINENO"; then :
17731 gt_cv_func_CFPreferencesCopyAppValue=yes
17732else
17733 gt_cv_func_CFPreferencesCopyAppValue=no
17734fi
17735rm -f core conftest.err conftest.$ac_objext \
17736 conftest$ac_exeext conftest.$ac_ext
17737 LIBS="$gt_save_LIBS"
17738fi
17739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
17740$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
17741 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
3f9992da 17742
3828bfac 17743$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
3f9992da 17744
3828bfac
AJ
17745 fi
17746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
17747$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
17748if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
17749 $as_echo_n "(cached) " >&6
17750else
17751 gt_save_LIBS="$LIBS"
17752 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
17753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17754/* end confdefs.h. */
17755#include <CoreFoundation/CFLocale.h>
17756int
17757main ()
17758{
17759CFLocaleCopyCurrent();
17760 ;
17761 return 0;
17762}
17763_ACEOF
17764if ac_fn_c_try_link "$LINENO"; then :
17765 gt_cv_func_CFLocaleCopyCurrent=yes
3f9992da 17766else
3828bfac
AJ
17767 gt_cv_func_CFLocaleCopyCurrent=no
17768fi
17769rm -f core conftest.err conftest.$ac_objext \
17770 conftest$ac_exeext conftest.$ac_ext
17771 LIBS="$gt_save_LIBS"
17772fi
17773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
17774$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
17775 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
3f9992da 17776
3828bfac 17777$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
3f9992da 17778
3828bfac
AJ
17779 fi
17780 INTL_MACOSX_LIBS=
17781 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
17782 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
17783 fi
3f9992da 17784
3f9992da 17785
3f9992da
AJ
17786
17787
17788
3f9992da 17789
3828bfac
AJ
17790 LIBINTL=
17791 LTLIBINTL=
17792 POSUB=
17793
17794 case " $gt_needs " in
17795 *" need-formatstring-macros "*) gt_api_version=3 ;;
17796 *" need-ngettext "*) gt_api_version=2 ;;
17797 *) gt_api_version=1 ;;
17798 esac
17799 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
17800 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
3f9992da 17801
3828bfac
AJ
17802 if test "$USE_NLS" = "yes"; then
17803 gt_use_preinstalled_gnugettext=no
3f9992da 17804
3f9992da 17805
3828bfac
AJ
17806 if test $gt_api_version -ge 3; then
17807 gt_revision_test_code='
17808#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
17809#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
17810#endif
17811typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
17812'
17813 else
17814 gt_revision_test_code=
17815 fi
17816 if test $gt_api_version -ge 2; then
17817 gt_expression_test_code=' + * ngettext ("", "", 0)'
17818 else
17819 gt_expression_test_code=
17820 fi
3f9992da 17821
3828bfac
AJ
17822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
17823$as_echo_n "checking for GNU gettext in libc... " >&6; }
17824if eval \${$gt_func_gnugettext_libc+:} false; then :
17825 $as_echo_n "(cached) " >&6
17826else
17827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3f9992da
AJ
17828/* end confdefs.h. */
17829
3828bfac
AJ
17830#include <libintl.h>
17831#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
17832extern int _nl_msg_cat_cntr;
17833extern int *_nl_domain_bindings;
17834#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
17835#else
17836#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
17837#endif
17838$gt_revision_test_code
3f9992da
AJ
17839
17840int
17841main ()
17842{
17843
3828bfac
AJ
17844bindtextdomain ("", "");
17845return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
17846
3f9992da
AJ
17847 ;
17848 return 0;
17849}
3f9992da 17850_ACEOF
3828bfac
AJ
17851if ac_fn_c_try_link "$LINENO"; then :
17852 eval "$gt_func_gnugettext_libc=yes"
17853else
17854 eval "$gt_func_gnugettext_libc=no"
17855fi
17856rm -f core conftest.err conftest.$ac_objext \
17857 conftest$ac_exeext conftest.$ac_ext
17858fi
17859eval ac_res=\$$gt_func_gnugettext_libc
17860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17861$as_echo "$ac_res" >&6; }
3f9992da 17862
3828bfac 17863 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
3f9992da 17864
3f9992da 17865
3f9992da 17866
3f9992da 17867
3f9992da 17868
3828bfac 17869 am_save_CPPFLAGS="$CPPFLAGS"
3f9992da 17870
3828bfac
AJ
17871 for element in $INCICONV; do
17872 haveit=
17873 for x in $CPPFLAGS; do
3f9992da 17874
3828bfac
AJ
17875 acl_save_prefix="$prefix"
17876 prefix="$acl_final_prefix"
17877 acl_save_exec_prefix="$exec_prefix"
17878 exec_prefix="$acl_final_exec_prefix"
17879 eval x=\"$x\"
17880 exec_prefix="$acl_save_exec_prefix"
17881 prefix="$acl_save_prefix"
3f9992da 17882
3828bfac
AJ
17883 if test "X$x" = "X$element"; then
17884 haveit=yes
17885 break
17886 fi
17887 done
17888 if test -z "$haveit"; then
17889 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17890 fi
17891 done
3f9992da
AJ
17892
17893
3828bfac
AJ
17894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
17895$as_echo_n "checking for iconv... " >&6; }
17896if ${am_cv_func_iconv+:} false; then :
17897 $as_echo_n "(cached) " >&6
17898else
3f9992da 17899
3828bfac
AJ
17900 am_cv_func_iconv="no, consider installing GNU libiconv"
17901 am_cv_lib_iconv=no
17902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17903/* end confdefs.h. */
3f9992da 17904
3828bfac
AJ
17905#include <stdlib.h>
17906#include <iconv.h>
b11ef6c2 17907
3828bfac
AJ
17908int
17909main ()
17910{
17911iconv_t cd = iconv_open("","");
17912 iconv(cd,NULL,NULL,NULL,NULL);
17913 iconv_close(cd);
17914 ;
17915 return 0;
17916}
17917_ACEOF
17918if ac_fn_c_try_link "$LINENO"; then :
17919 am_cv_func_iconv=yes
17920fi
17921rm -f core conftest.err conftest.$ac_objext \
17922 conftest$ac_exeext conftest.$ac_ext
17923 if test "$am_cv_func_iconv" != yes; then
17924 am_save_LIBS="$LIBS"
17925 LIBS="$LIBS $LIBICONV"
17926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b11ef6c2
AJ
17927/* end confdefs.h. */
17928
3828bfac
AJ
17929#include <stdlib.h>
17930#include <iconv.h>
b11ef6c2
AJ
17931
17932int
17933main ()
17934{
3828bfac
AJ
17935iconv_t cd = iconv_open("","");
17936 iconv(cd,NULL,NULL,NULL,NULL);
17937 iconv_close(cd);
b11ef6c2
AJ
17938 ;
17939 return 0;
17940}
b11ef6c2 17941_ACEOF
3828bfac
AJ
17942if ac_fn_c_try_link "$LINENO"; then :
17943 am_cv_lib_iconv=yes
17944 am_cv_func_iconv=yes
b11ef6c2 17945fi
3828bfac
AJ
17946rm -f core conftest.err conftest.$ac_objext \
17947 conftest$ac_exeext conftest.$ac_ext
17948 LIBS="$am_save_LIBS"
17949 fi
3f9992da
AJ
17950
17951fi
3828bfac
AJ
17952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
17953$as_echo "$am_cv_func_iconv" >&6; }
17954 if test "$am_cv_func_iconv" = yes; then
17955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
17956$as_echo_n "checking for working iconv... " >&6; }
17957if ${am_cv_func_iconv_works+:} false; then :
17958 $as_echo_n "(cached) " >&6
5d77e6b8 17959else
5d77e6b8 17960
3828bfac
AJ
17961 am_save_LIBS="$LIBS"
17962 if test $am_cv_lib_iconv = yes; then
17963 LIBS="$LIBS $LIBICONV"
17964 fi
17965 am_cv_func_iconv_works=no
17966 for ac_iconv_const in '' 'const'; do
17967 if test "$cross_compiling" = yes; then :
17968 case "$host_os" in
17969 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
17970 *) am_cv_func_iconv_works="guessing yes" ;;
17971 esac
5c498012 17972else
3828bfac
AJ
17973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17974/* end confdefs.h. */
5c498012 17975
3828bfac
AJ
17976#include <iconv.h>
17977#include <string.h>
5c498012 17978
3828bfac
AJ
17979#ifndef ICONV_CONST
17980# define ICONV_CONST $ac_iconv_const
17981#endif
19617271 17982
3828bfac
AJ
17983int
17984main ()
17985{
17986int result = 0;
17987 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
17988 returns. */
17989 {
17990 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
17991 if (cd_utf8_to_88591 != (iconv_t)(-1))
17992 {
17993 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
17994 char buf[10];
17995 ICONV_CONST char *inptr = input;
17996 size_t inbytesleft = strlen (input);
17997 char *outptr = buf;
17998 size_t outbytesleft = sizeof (buf);
17999 size_t res = iconv (cd_utf8_to_88591,
18000 &inptr, &inbytesleft,
18001 &outptr, &outbytesleft);
18002 if (res == 0)
18003 result |= 1;
18004 iconv_close (cd_utf8_to_88591);
18005 }
18006 }
18007 /* Test against Solaris 10 bug: Failures are not distinguishable from
18008 successful returns. */
18009 {
18010 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
18011 if (cd_ascii_to_88591 != (iconv_t)(-1))
18012 {
18013 static ICONV_CONST char input[] = "\263";
18014 char buf[10];
18015 ICONV_CONST char *inptr = input;
18016 size_t inbytesleft = strlen (input);
18017 char *outptr = buf;
18018 size_t outbytesleft = sizeof (buf);
18019 size_t res = iconv (cd_ascii_to_88591,
18020 &inptr, &inbytesleft,
18021 &outptr, &outbytesleft);
18022 if (res == 0)
18023 result |= 2;
18024 iconv_close (cd_ascii_to_88591);
18025 }
18026 }
18027 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
18028 {
18029 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
18030 if (cd_88591_to_utf8 != (iconv_t)(-1))
18031 {
18032 static ICONV_CONST char input[] = "\304";
18033 static char buf[2] = { (char)0xDE, (char)0xAD };
18034 ICONV_CONST char *inptr = input;
18035 size_t inbytesleft = 1;
18036 char *outptr = buf;
18037 size_t outbytesleft = 1;
18038 size_t res = iconv (cd_88591_to_utf8,
18039 &inptr, &inbytesleft,
18040 &outptr, &outbytesleft);
18041 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
18042 result |= 4;
18043 iconv_close (cd_88591_to_utf8);
18044 }
18045 }
18046#if 0 /* This bug could be worked around by the caller. */
18047 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
18048 {
18049 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
18050 if (cd_88591_to_utf8 != (iconv_t)(-1))
18051 {
18052 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
18053 char buf[50];
18054 ICONV_CONST char *inptr = input;
18055 size_t inbytesleft = strlen (input);
18056 char *outptr = buf;
18057 size_t outbytesleft = sizeof (buf);
18058 size_t res = iconv (cd_88591_to_utf8,
18059 &inptr, &inbytesleft,
18060 &outptr, &outbytesleft);
18061 if ((int)res > 0)
18062 result |= 8;
18063 iconv_close (cd_88591_to_utf8);
18064 }
18065 }
18066#endif
18067 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
18068 provided. */
18069 if (/* Try standardized names. */
18070 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
18071 /* Try IRIX, OSF/1 names. */
18072 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
18073 /* Try AIX names. */
18074 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
18075 /* Try HP-UX names. */
18076 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
18077 result |= 16;
18078 return result;
19617271 18079
3828bfac
AJ
18080 ;
18081 return 0;
18082}
18083_ACEOF
18084if ac_fn_c_try_run "$LINENO"; then :
18085 am_cv_func_iconv_works=yes
0133cdd9 18086fi
3828bfac
AJ
18087rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18088 conftest.$ac_objext conftest.beam conftest.$ac_ext
0133cdd9
AJ
18089fi
18090
3828bfac
AJ
18091 test "$am_cv_func_iconv_works" = no || break
18092 done
18093 LIBS="$am_save_LIBS"
0133cdd9 18094
0133cdd9 18095fi
3828bfac
AJ
18096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
18097$as_echo "$am_cv_func_iconv_works" >&6; }
18098 case "$am_cv_func_iconv_works" in
18099 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
18100 *) am_func_iconv=yes ;;
18101 esac
18102 else
18103 am_func_iconv=no am_cv_lib_iconv=no
18104 fi
18105 if test "$am_func_iconv" = yes; then
0133cdd9 18106
3828bfac 18107$as_echo "#define HAVE_ICONV 1" >>confdefs.h
0133cdd9 18108
3828bfac
AJ
18109 fi
18110 if test "$am_cv_lib_iconv" = yes; then
18111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
18112$as_echo_n "checking how to link with libiconv... " >&6; }
18113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
18114$as_echo "$LIBICONV" >&6; }
18115 else
18116 CPPFLAGS="$am_save_CPPFLAGS"
18117 LIBICONV=
18118 LTLIBICONV=
18119 fi
f7291891
AJ
18120
18121
f7291891 18122
f7291891 18123
f7291891 18124
f7291891 18125
a7b9a285 18126
f7291891 18127
f7291891
AJ
18128
18129
0133cdd9 18130
3828bfac 18131 use_additional=yes
f7291891 18132
3828bfac
AJ
18133 acl_save_prefix="$prefix"
18134 prefix="$acl_final_prefix"
18135 acl_save_exec_prefix="$exec_prefix"
18136 exec_prefix="$acl_final_exec_prefix"
f7291891 18137
3828bfac
AJ
18138 eval additional_includedir=\"$includedir\"
18139 eval additional_libdir=\"$libdir\"
f7291891 18140
3828bfac
AJ
18141 exec_prefix="$acl_save_exec_prefix"
18142 prefix="$acl_save_prefix"
f7291891 18143
5c498012 18144
3828bfac
AJ
18145# Check whether --with-libintl-prefix was given.
18146if test "${with_libintl_prefix+set}" = set; then :
18147 withval=$with_libintl_prefix;
18148 if test "X$withval" = "Xno"; then
18149 use_additional=no
18150 else
18151 if test "X$withval" = "X"; then
5c498012 18152
3828bfac
AJ
18153 acl_save_prefix="$prefix"
18154 prefix="$acl_final_prefix"
18155 acl_save_exec_prefix="$exec_prefix"
18156 exec_prefix="$acl_final_exec_prefix"
5c498012 18157
3828bfac
AJ
18158 eval additional_includedir=\"$includedir\"
18159 eval additional_libdir=\"$libdir\"
5c498012 18160
3828bfac
AJ
18161 exec_prefix="$acl_save_exec_prefix"
18162 prefix="$acl_save_prefix"
5c498012 18163
3828bfac
AJ
18164 else
18165 additional_includedir="$withval/include"
18166 additional_libdir="$withval/$acl_libdirstem"
18167 if test "$acl_libdirstem2" != "$acl_libdirstem" \
18168 && ! test -d "$withval/$acl_libdirstem"; then
18169 additional_libdir="$withval/$acl_libdirstem2"
18170 fi
18171 fi
18172 fi
5c498012 18173
3828bfac 18174fi
5c498012 18175
3828bfac
AJ
18176 LIBINTL=
18177 LTLIBINTL=
18178 INCINTL=
18179 LIBINTL_PREFIX=
18180 HAVE_LIBINTL=
18181 rpathdirs=
18182 ltrpathdirs=
18183 names_already_handled=
18184 names_next_round='intl '
18185 while test -n "$names_next_round"; do
18186 names_this_round="$names_next_round"
18187 names_next_round=
18188 for name in $names_this_round; do
18189 already_handled=
18190 for n in $names_already_handled; do
18191 if test "$n" = "$name"; then
18192 already_handled=yes
18193 break
18194 fi
18195 done
18196 if test -z "$already_handled"; then
18197 names_already_handled="$names_already_handled $name"
18198 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
18199 eval value=\"\$HAVE_LIB$uppername\"
18200 if test -n "$value"; then
18201 if test "$value" = yes; then
18202 eval value=\"\$LIB$uppername\"
18203 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
18204 eval value=\"\$LTLIB$uppername\"
18205 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
18206 else
18207 :
18208 fi
18209 else
18210 found_dir=
18211 found_la=
18212 found_so=
18213 found_a=
18214 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
18215 if test -n "$acl_shlibext"; then
18216 shrext=".$acl_shlibext" # typically: shrext=.so
18217 else
18218 shrext=
18219 fi
18220 if test $use_additional = yes; then
18221 dir="$additional_libdir"
18222 if test -n "$acl_shlibext"; then
18223 if test -f "$dir/$libname$shrext"; then
18224 found_dir="$dir"
18225 found_so="$dir/$libname$shrext"
18226 else
18227 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
18228 ver=`(cd "$dir" && \
18229 for f in "$libname$shrext".*; do echo "$f"; done \
18230 | sed -e "s,^$libname$shrext\\\\.,," \
18231 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
18232 | sed 1q ) 2>/dev/null`
18233 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
18234 found_dir="$dir"
18235 found_so="$dir/$libname$shrext.$ver"
18236 fi
18237 else
18238 eval library_names=\"$acl_library_names_spec\"
18239 for f in $library_names; do
18240 if test -f "$dir/$f"; then
18241 found_dir="$dir"
18242 found_so="$dir/$f"
18243 break
18244 fi
18245 done
18246 fi
18247 fi
18248 fi
18249 if test "X$found_dir" = "X"; then
18250 if test -f "$dir/$libname.$acl_libext"; then
18251 found_dir="$dir"
18252 found_a="$dir/$libname.$acl_libext"
18253 fi
18254 fi
18255 if test "X$found_dir" != "X"; then
18256 if test -f "$dir/$libname.la"; then
18257 found_la="$dir/$libname.la"
18258 fi
18259 fi
18260 fi
18261 if test "X$found_dir" = "X"; then
18262 for x in $LDFLAGS $LTLIBINTL; do
5c498012 18263
3828bfac
AJ
18264 acl_save_prefix="$prefix"
18265 prefix="$acl_final_prefix"
18266 acl_save_exec_prefix="$exec_prefix"
18267 exec_prefix="$acl_final_exec_prefix"
18268 eval x=\"$x\"
18269 exec_prefix="$acl_save_exec_prefix"
18270 prefix="$acl_save_prefix"
18271
18272 case "$x" in
18273 -L*)
18274 dir=`echo "X$x" | sed -e 's/^X-L//'`
18275 if test -n "$acl_shlibext"; then
18276 if test -f "$dir/$libname$shrext"; then
18277 found_dir="$dir"
18278 found_so="$dir/$libname$shrext"
18279 else
18280 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
18281 ver=`(cd "$dir" && \
18282 for f in "$libname$shrext".*; do echo "$f"; done \
18283 | sed -e "s,^$libname$shrext\\\\.,," \
18284 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
18285 | sed 1q ) 2>/dev/null`
18286 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
18287 found_dir="$dir"
18288 found_so="$dir/$libname$shrext.$ver"
18289 fi
18290 else
18291 eval library_names=\"$acl_library_names_spec\"
18292 for f in $library_names; do
18293 if test -f "$dir/$f"; then
18294 found_dir="$dir"
18295 found_so="$dir/$f"
18296 break
18297 fi
18298 done
18299 fi
18300 fi
18301 fi
18302 if test "X$found_dir" = "X"; then
18303 if test -f "$dir/$libname.$acl_libext"; then
18304 found_dir="$dir"
18305 found_a="$dir/$libname.$acl_libext"
18306 fi
18307 fi
18308 if test "X$found_dir" != "X"; then
18309 if test -f "$dir/$libname.la"; then
18310 found_la="$dir/$libname.la"
18311 fi
18312 fi
18313 ;;
18314 esac
18315 if test "X$found_dir" != "X"; then
18316 break
18317 fi
18318 done
18319 fi
18320 if test "X$found_dir" != "X"; then
18321 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
18322 if test "X$found_so" != "X"; then
18323 if test "$enable_rpath" = no \
18324 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
18325 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
18326 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
18327 else
18328 haveit=
18329 for x in $ltrpathdirs; do
18330 if test "X$x" = "X$found_dir"; then
18331 haveit=yes
18332 break
18333 fi
18334 done
18335 if test -z "$haveit"; then
18336 ltrpathdirs="$ltrpathdirs $found_dir"
18337 fi
18338 if test "$acl_hardcode_direct" = yes; then
18339 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
18340 else
18341 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
18342 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
18343 haveit=
18344 for x in $rpathdirs; do
18345 if test "X$x" = "X$found_dir"; then
18346 haveit=yes
18347 break
18348 fi
18349 done
18350 if test -z "$haveit"; then
18351 rpathdirs="$rpathdirs $found_dir"
18352 fi
18353 else
18354 haveit=
18355 for x in $LDFLAGS $LIBINTL; do
18356
18357 acl_save_prefix="$prefix"
18358 prefix="$acl_final_prefix"
18359 acl_save_exec_prefix="$exec_prefix"
18360 exec_prefix="$acl_final_exec_prefix"
18361 eval x=\"$x\"
18362 exec_prefix="$acl_save_exec_prefix"
18363 prefix="$acl_save_prefix"
5c498012 18364
3828bfac
AJ
18365 if test "X$x" = "X-L$found_dir"; then
18366 haveit=yes
18367 break
18368 fi
18369 done
18370 if test -z "$haveit"; then
18371 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
18372 fi
18373 if test "$acl_hardcode_minus_L" != no; then
18374 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
18375 else
18376 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
18377 fi
18378 fi
18379 fi
18380 fi
18381 else
18382 if test "X$found_a" != "X"; then
18383 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
18384 else
18385 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
18386 fi
18387 fi
18388 additional_includedir=
18389 case "$found_dir" in
18390 */$acl_libdirstem | */$acl_libdirstem/)
18391 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
18392 if test "$name" = 'intl'; then
18393 LIBINTL_PREFIX="$basedir"
18394 fi
18395 additional_includedir="$basedir/include"
18396 ;;
18397 */$acl_libdirstem2 | */$acl_libdirstem2/)
18398 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
18399 if test "$name" = 'intl'; then
18400 LIBINTL_PREFIX="$basedir"
18401 fi
18402 additional_includedir="$basedir/include"
18403 ;;
18404 esac
18405 if test "X$additional_includedir" != "X"; then
18406 if test "X$additional_includedir" != "X/usr/include"; then
18407 haveit=
18408 if test "X$additional_includedir" = "X/usr/local/include"; then
18409 if test -n "$GCC"; then
18410 case $host_os in
18411 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
18412 esac
18413 fi
18414 fi
18415 if test -z "$haveit"; then
18416 for x in $CPPFLAGS $INCINTL; do
5c498012 18417
3828bfac
AJ
18418 acl_save_prefix="$prefix"
18419 prefix="$acl_final_prefix"
18420 acl_save_exec_prefix="$exec_prefix"
18421 exec_prefix="$acl_final_exec_prefix"
18422 eval x=\"$x\"
18423 exec_prefix="$acl_save_exec_prefix"
18424 prefix="$acl_save_prefix"
5c498012 18425
3828bfac
AJ
18426 if test "X$x" = "X-I$additional_includedir"; then
18427 haveit=yes
18428 break
18429 fi
18430 done
18431 if test -z "$haveit"; then
18432 if test -d "$additional_includedir"; then
18433 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
18434 fi
18435 fi
18436 fi
18437 fi
18438 fi
18439 if test -n "$found_la"; then
18440 save_libdir="$libdir"
18441 case "$found_la" in
18442 */* | *\\*) . "$found_la" ;;
18443 *) . "./$found_la" ;;
18444 esac
18445 libdir="$save_libdir"
18446 for dep in $dependency_libs; do
18447 case "$dep" in
18448 -L*)
18449 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18450 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
18451 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
18452 haveit=
18453 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
18454 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
18455 if test -n "$GCC"; then
18456 case $host_os in
18457 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
18458 esac
18459 fi
18460 fi
18461 if test -z "$haveit"; then
18462 haveit=
18463 for x in $LDFLAGS $LIBINTL; do
5c498012 18464
3828bfac
AJ
18465 acl_save_prefix="$prefix"
18466 prefix="$acl_final_prefix"
18467 acl_save_exec_prefix="$exec_prefix"
18468 exec_prefix="$acl_final_exec_prefix"
18469 eval x=\"$x\"
18470 exec_prefix="$acl_save_exec_prefix"
18471 prefix="$acl_save_prefix"
5c498012 18472
3828bfac
AJ
18473 if test "X$x" = "X-L$additional_libdir"; then
18474 haveit=yes
18475 break
18476 fi
18477 done
18478 if test -z "$haveit"; then
18479 if test -d "$additional_libdir"; then
18480 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
18481 fi
18482 fi
18483 haveit=
18484 for x in $LDFLAGS $LTLIBINTL; do
0133cdd9 18485
3828bfac
AJ
18486 acl_save_prefix="$prefix"
18487 prefix="$acl_final_prefix"
18488 acl_save_exec_prefix="$exec_prefix"
18489 exec_prefix="$acl_final_exec_prefix"
18490 eval x=\"$x\"
18491 exec_prefix="$acl_save_exec_prefix"
18492 prefix="$acl_save_prefix"
5c498012 18493
3828bfac
AJ
18494 if test "X$x" = "X-L$additional_libdir"; then
18495 haveit=yes
18496 break
18497 fi
18498 done
18499 if test -z "$haveit"; then
18500 if test -d "$additional_libdir"; then
18501 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
18502 fi
18503 fi
18504 fi
18505 fi
18506 ;;
18507 -R*)
18508 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18509 if test "$enable_rpath" != no; then
18510 haveit=
18511 for x in $rpathdirs; do
18512 if test "X$x" = "X$dir"; then
18513 haveit=yes
18514 break
18515 fi
18516 done
18517 if test -z "$haveit"; then
18518 rpathdirs="$rpathdirs $dir"
18519 fi
18520 haveit=
18521 for x in $ltrpathdirs; do
18522 if test "X$x" = "X$dir"; then
18523 haveit=yes
18524 break
18525 fi
18526 done
18527 if test -z "$haveit"; then
18528 ltrpathdirs="$ltrpathdirs $dir"
18529 fi
18530 fi
18531 ;;
18532 -l*)
18533 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18534 ;;
18535 *.la)
18536 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18537 ;;
18538 *)
18539 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
18540 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
18541 ;;
18542 esac
18543 done
18544 fi
18545 else
18546 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
18547 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
18548 fi
18549 fi
18550 fi
18551 done
18552 done
18553 if test "X$rpathdirs" != "X"; then
18554 if test -n "$acl_hardcode_libdir_separator"; then
18555 alldirs=
18556 for found_dir in $rpathdirs; do
18557 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
18558 done
18559 acl_save_libdir="$libdir"
18560 libdir="$alldirs"
18561 eval flag=\"$acl_hardcode_libdir_flag_spec\"
18562 libdir="$acl_save_libdir"
18563 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
18564 else
18565 for found_dir in $rpathdirs; do
18566 acl_save_libdir="$libdir"
18567 libdir="$found_dir"
18568 eval flag=\"$acl_hardcode_libdir_flag_spec\"
18569 libdir="$acl_save_libdir"
18570 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
18571 done
18572 fi
18573 fi
18574 if test "X$ltrpathdirs" != "X"; then
18575 for found_dir in $ltrpathdirs; do
18576 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
18577 done
18578 fi
5c498012
AJ
18579
18580
5c498012 18581
5d77e6b8 18582
f7291891 18583
f7291891 18584
3828bfac
AJ
18585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
18586$as_echo_n "checking for GNU gettext in libintl... " >&6; }
18587if eval \${$gt_func_gnugettext_libintl+:} false; then :
18588 $as_echo_n "(cached) " >&6
18589else
18590 gt_save_CPPFLAGS="$CPPFLAGS"
18591 CPPFLAGS="$CPPFLAGS $INCINTL"
18592 gt_save_LIBS="$LIBS"
18593 LIBS="$LIBS $LIBINTL"
18594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
18595/* end confdefs.h. */
18596
3828bfac
AJ
18597#include <libintl.h>
18598#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
18599extern int _nl_msg_cat_cntr;
18600extern
18601#ifdef __cplusplus
18602"C"
18603#endif
18604const char *_nl_expand_alias (const char *);
18605#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
18606#else
18607#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
18608#endif
18609$gt_revision_test_code
f7291891
AJ
18610
18611int
18612main ()
18613{
18614
3828bfac
AJ
18615bindtextdomain ("", "");
18616return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
18617
f7291891
AJ
18618 ;
18619 return 0;
18620}
f7291891 18621_ACEOF
0133cdd9 18622if ac_fn_c_try_link "$LINENO"; then :
3828bfac 18623 eval "$gt_func_gnugettext_libintl=yes"
f7291891 18624else
3828bfac 18625 eval "$gt_func_gnugettext_libintl=no"
0133cdd9
AJ
18626fi
18627rm -f core conftest.err conftest.$ac_objext \
18628 conftest$ac_exeext conftest.$ac_ext
3828bfac
AJ
18629 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
18630 LIBS="$LIBS $LIBICONV"
18631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
18632/* end confdefs.h. */
18633
3828bfac
AJ
18634#include <libintl.h>
18635#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
18636extern int _nl_msg_cat_cntr;
18637extern
18638#ifdef __cplusplus
18639"C"
18640#endif
18641const char *_nl_expand_alias (const char *);
18642#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
18643#else
18644#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
18645#endif
18646$gt_revision_test_code
f7291891
AJ
18647
18648int
18649main ()
18650{
18651
3828bfac
AJ
18652bindtextdomain ("", "");
18653return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
18654
f7291891
AJ
18655 ;
18656 return 0;
18657}
f7291891 18658_ACEOF
0133cdd9 18659if ac_fn_c_try_link "$LINENO"; then :
3828bfac
AJ
18660 LIBINTL="$LIBINTL $LIBICONV"
18661 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
18662 eval "$gt_func_gnugettext_libintl=yes"
f7291891 18663
0133cdd9
AJ
18664fi
18665rm -f core conftest.err conftest.$ac_objext \
18666 conftest$ac_exeext conftest.$ac_ext
3828bfac
AJ
18667 fi
18668 CPPFLAGS="$gt_save_CPPFLAGS"
18669 LIBS="$gt_save_LIBS"
18670fi
18671eval ac_res=\$$gt_func_gnugettext_libintl
18672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18673$as_echo "$ac_res" >&6; }
18674 fi
f7291891 18675
3828bfac
AJ
18676 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
18677 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
18678 && test "$PACKAGE" != gettext-runtime \
18679 && test "$PACKAGE" != gettext-tools; }; then
18680 gt_use_preinstalled_gnugettext=yes
18681 else
18682 LIBINTL=
18683 LTLIBINTL=
18684 INCINTL=
18685 fi
f7291891 18686
5d77e6b8 18687
3f9992da 18688
3828bfac
AJ
18689 if test -n "$INTL_MACOSX_LIBS"; then
18690 if test "$gt_use_preinstalled_gnugettext" = "yes" \
18691 || test "$nls_cv_use_gnu_gettext" = "yes"; then
18692 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
18693 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
18694 fi
18695 fi
5d77e6b8 18696
3828bfac
AJ
18697 if test "$gt_use_preinstalled_gnugettext" = "yes" \
18698 || test "$nls_cv_use_gnu_gettext" = "yes"; then
5d77e6b8 18699
3828bfac 18700$as_echo "#define ENABLE_NLS 1" >>confdefs.h
f7291891 18701
3828bfac
AJ
18702 else
18703 USE_NLS=no
18704 fi
18705 fi
f7291891 18706
3828bfac
AJ
18707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
18708$as_echo_n "checking whether to use NLS... " >&6; }
18709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
18710$as_echo "$USE_NLS" >&6; }
18711 if test "$USE_NLS" = "yes"; then
18712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
18713$as_echo_n "checking where the gettext function comes from... " >&6; }
18714 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
18715 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
18716 gt_source="external libintl"
18717 else
18718 gt_source="libc"
18719 fi
18720 else
18721 gt_source="included intl directory"
18722 fi
18723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
18724$as_echo "$gt_source" >&6; }
18725 fi
f7291891 18726
3828bfac 18727 if test "$USE_NLS" = "yes"; then
f7291891 18728
3828bfac
AJ
18729 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
18730 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
18731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
18732$as_echo_n "checking how to link with libintl... " >&6; }
18733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
18734$as_echo "$LIBINTL" >&6; }
f7291891 18735
3828bfac
AJ
18736 for element in $INCINTL; do
18737 haveit=
18738 for x in $CPPFLAGS; do
f7291891 18739
3828bfac
AJ
18740 acl_save_prefix="$prefix"
18741 prefix="$acl_final_prefix"
18742 acl_save_exec_prefix="$exec_prefix"
18743 exec_prefix="$acl_final_exec_prefix"
18744 eval x=\"$x\"
18745 exec_prefix="$acl_save_exec_prefix"
18746 prefix="$acl_save_prefix"
f7291891 18747
3828bfac
AJ
18748 if test "X$x" = "X$element"; then
18749 haveit=yes
18750 break
18751 fi
18752 done
18753 if test -z "$haveit"; then
18754 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18755 fi
18756 done
f7291891 18757
3828bfac 18758 fi
a7b9a285 18759
f7291891 18760
3828bfac 18761$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
f7291891
AJ
18762
18763
3828bfac 18764$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
19617271 18765
3828bfac 18766 fi
0133cdd9 18767
3828bfac
AJ
18768 POSUB=po
18769 fi
19617271 18770
19617271 18771
5d77e6b8 18772
3828bfac 18773 INTLLIBS="$LIBINTL"
447cda49 18774
447cda49 18775
447cda49 18776
447cda49
AJ
18777
18778
447cda49 18779
3828bfac 18780 if test "x${USE_NLS}" = "xyes"; then :
447cda49 18781
447cda49 18782
447cda49 18783
3828bfac 18784 PODIR_COND_D="po"
447cda49 18785
447cda49 18786
3828bfac 18787 if test "x${LIBINTL}" != "x"; then :
447cda49 18788
3828bfac
AJ
18789 LIBS="${LIBINTL} ${LIBS}"
18790
18791fi
18792
18793else
447cda49 18794
3828bfac
AJ
18795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: NLS was requested but is unavailable" >&5
18796$as_echo "$as_me: WARNING: NLS was requested but is unavailable" >&2;}
447cda49
AJ
18797
18798fi
f54ed0d4
AJ
18799 ;; #(
18800 *) :
447cda49 18801
f54ed0d4
AJ
18802 as_fn_error $? "invalid option for --enable-nls" "$LINENO" 5
18803 ;;
18804esac
447cda49 18805
447cda49 18806
447cda49
AJ
18807
18808
18809
6df79d8f 18810 BUILD_WARNINGS="No"
5d77e6b8 18811
6df79d8f 18812 # Check whether --enable-warnings was given.
5d77e6b8
AJ
18813if test "${enable_warnings+set}" = set; then :
18814 enableval=$enable_warnings;
a19ae377 18815else
5d77e6b8
AJ
18816 enable_warnings="no"
18817fi
a19ae377
AJ
18818
18819
f54ed0d4
AJ
18820 case "x${enable_warnings}" in #(
18821 xno) :
18822 ;; #(
18823 xyes) :
90121a3e 18824
f54ed0d4 18825 BUILD_WARNINGS="Yes"
5d77e6b8
AJ
18826
18827
18828
90121a3e
AJ
18829
18830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Werror=unknown-warning-option " >&5
5d77e6b8 18831$as_echo_n "checking for C compiler flag(s) -Werror=unknown-warning-option ... " >&6; }
f7291891 18832
90121a3e
AJ
18833 CFLAGS_SAVED="${CFLAGS:-}"
18834 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Werror=unknown-warning-option"
f7291891 18835
90121a3e 18836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
18837/* end confdefs.h. */
18838
18839
90121a3e
AJ
18840 #ifdef HAVE_STDDEF_H
18841 # include <stddef.h>
18842 #endif
18843 static int
18844 return_zero(void)
18845 {
18846 return 0;
18847 }
18848
f7291891
AJ
18849int
18850main ()
18851{
18852
90121a3e
AJ
18853 int zero = return_zero();
18854
f7291891
AJ
18855 ;
18856 return 0;
18857}
18858
18859_ACEOF
18860if ac_fn_c_try_compile "$LINENO"; then :
18861
90121a3e 18862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 18863$as_echo "yes" >&6; }
90121a3e 18864 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 18865
f7291891
AJ
18866else
18867
90121a3e 18868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 18869$as_echo "no" >&6; }
90121a3e
AJ
18870 ATHEME_TEST_CC_FLAGS_RESULT="no"
18871 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
18872
18873fi
18874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18875
90121a3e 18876 unset CFLAGS_SAVED
f7291891
AJ
18877
18878
18879
a19ae377 18880
90121a3e 18881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Weverything " >&5
5d77e6b8 18882$as_echo_n "checking for C compiler flag(s) -Weverything ... " >&6; }
f7291891 18883
90121a3e
AJ
18884 CFLAGS_SAVED="${CFLAGS:-}"
18885 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Weverything"
f7291891 18886
90121a3e 18887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
18888/* end confdefs.h. */
18889
18890
90121a3e
AJ
18891 #ifdef HAVE_STDDEF_H
18892 # include <stddef.h>
18893 #endif
18894 static int
18895 return_zero(void)
18896 {
18897 return 0;
18898 }
18899
f7291891
AJ
18900int
18901main ()
18902{
18903
90121a3e
AJ
18904 int zero = return_zero();
18905
f7291891
AJ
18906 ;
18907 return 0;
18908}
18909
18910_ACEOF
18911if ac_fn_c_try_compile "$LINENO"; then :
18912
90121a3e 18913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 18914$as_echo "yes" >&6; }
90121a3e 18915 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 18916
f7291891
AJ
18917else
18918
90121a3e 18919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 18920$as_echo "no" >&6; }
90121a3e
AJ
18921 ATHEME_TEST_CC_FLAGS_RESULT="no"
18922 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
18923
18924fi
18925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18926
90121a3e 18927 unset CFLAGS_SAVED
f7291891
AJ
18928
18929
90121a3e 18930 if test "${ATHEME_TEST_CC_FLAGS_RESULT}" = "no"; then :
5d77e6b8
AJ
18931
18932
016d2768
AJ
18933 # These two have to be consecutive and first for the most reliable
18934 # results. Do not alphabetise with the flags below. -- amdj
5d77e6b8 18935
90121a3e
AJ
18936
18937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wall " >&5
df10dcc4 18938$as_echo_n "checking for C compiler flag(s) -Wall ... " >&6; }
f7291891 18939
90121a3e
AJ
18940 CFLAGS_SAVED="${CFLAGS:-}"
18941 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wall"
f7291891 18942
90121a3e 18943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
18944/* end confdefs.h. */
18945
18946
90121a3e
AJ
18947 #ifdef HAVE_STDDEF_H
18948 # include <stddef.h>
18949 #endif
18950 static int
18951 return_zero(void)
18952 {
18953 return 0;
18954 }
18955
f7291891
AJ
18956int
18957main ()
18958{
18959
90121a3e
AJ
18960 int zero = return_zero();
18961
f7291891
AJ
18962 ;
18963 return 0;
18964}
18965
18966_ACEOF
18967if ac_fn_c_try_compile "$LINENO"; then :
18968
90121a3e 18969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 18970$as_echo "yes" >&6; }
90121a3e 18971 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 18972
f7291891
AJ
18973else
18974
90121a3e 18975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 18976$as_echo "no" >&6; }
90121a3e
AJ
18977 ATHEME_TEST_CC_FLAGS_RESULT="no"
18978 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
18979
18980fi
18981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18982
90121a3e 18983 unset CFLAGS_SAVED
f7291891
AJ
18984
18985
18986
90121a3e 18987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wextra " >&5
df10dcc4 18988$as_echo_n "checking for C compiler flag(s) -Wextra ... " >&6; }
f7291891 18989
90121a3e
AJ
18990 CFLAGS_SAVED="${CFLAGS:-}"
18991 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wextra"
f7291891 18992
90121a3e 18993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
18994/* end confdefs.h. */
18995
18996
90121a3e
AJ
18997 #ifdef HAVE_STDDEF_H
18998 # include <stddef.h>
18999 #endif
19000 static int
19001 return_zero(void)
19002 {
19003 return 0;
19004 }
19005
f7291891
AJ
19006int
19007main ()
19008{
19009
90121a3e
AJ
19010 int zero = return_zero();
19011
f7291891
AJ
19012 ;
19013 return 0;
19014}
19015
19016_ACEOF
19017if ac_fn_c_try_compile "$LINENO"; then :
19018
90121a3e 19019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19020$as_echo "yes" >&6; }
90121a3e 19021 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19022
f7291891
AJ
19023else
19024
90121a3e 19025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19026$as_echo "no" >&6; }
90121a3e
AJ
19027 ATHEME_TEST_CC_FLAGS_RESULT="no"
19028 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19029
19030fi
19031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19032
90121a3e 19033 unset CFLAGS_SAVED
f7291891
AJ
19034
19035
19036
df10dcc4 19037
90121a3e 19038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Waggregate-return " >&5
df10dcc4 19039$as_echo_n "checking for C compiler flag(s) -Waggregate-return ... " >&6; }
f7291891 19040
90121a3e
AJ
19041 CFLAGS_SAVED="${CFLAGS:-}"
19042 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Waggregate-return"
f7291891 19043
90121a3e 19044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19045/* end confdefs.h. */
19046
19047
90121a3e
AJ
19048 #ifdef HAVE_STDDEF_H
19049 # include <stddef.h>
19050 #endif
19051 static int
19052 return_zero(void)
19053 {
19054 return 0;
19055 }
19056
a09446b7
AJ
19057int
19058main ()
19059{
19060
90121a3e
AJ
19061 int zero = return_zero();
19062
a09446b7
AJ
19063 ;
19064 return 0;
19065}
19066
19067_ACEOF
19068if ac_fn_c_try_compile "$LINENO"; then :
19069
90121a3e 19070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a09446b7 19071$as_echo "yes" >&6; }
90121a3e 19072 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a09446b7
AJ
19073
19074else
19075
90121a3e 19076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a09446b7 19077$as_echo "no" >&6; }
90121a3e
AJ
19078 ATHEME_TEST_CC_FLAGS_RESULT="no"
19079 CFLAGS="${CFLAGS_SAVED}"
a09446b7
AJ
19080
19081fi
19082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19083
90121a3e 19084 unset CFLAGS_SAVED
a09446b7
AJ
19085
19086
19087
90121a3e 19088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Waggressive-loop-optimizations " >&5
df10dcc4 19089$as_echo_n "checking for C compiler flag(s) -Waggressive-loop-optimizations ... " >&6; }
a09446b7 19090
90121a3e
AJ
19091 CFLAGS_SAVED="${CFLAGS:-}"
19092 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Waggressive-loop-optimizations"
a09446b7 19093
90121a3e 19094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a09446b7
AJ
19095/* end confdefs.h. */
19096
19097
90121a3e
AJ
19098 #ifdef HAVE_STDDEF_H
19099 # include <stddef.h>
19100 #endif
19101 static int
19102 return_zero(void)
19103 {
19104 return 0;
19105 }
19106
f7291891
AJ
19107int
19108main ()
19109{
19110
90121a3e
AJ
19111 int zero = return_zero();
19112
f7291891
AJ
19113 ;
19114 return 0;
19115}
19116
19117_ACEOF
19118if ac_fn_c_try_compile "$LINENO"; then :
19119
90121a3e 19120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19121$as_echo "yes" >&6; }
90121a3e 19122 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19123
f7291891
AJ
19124else
19125
90121a3e 19126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19127$as_echo "no" >&6; }
90121a3e
AJ
19128 ATHEME_TEST_CC_FLAGS_RESULT="no"
19129 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19130
19131fi
19132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19133
90121a3e 19134 unset CFLAGS_SAVED
f7291891
AJ
19135
19136
19137
90121a3e 19138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Walloc-zero " >&5
df10dcc4 19139$as_echo_n "checking for C compiler flag(s) -Walloc-zero ... " >&6; }
f7291891 19140
90121a3e
AJ
19141 CFLAGS_SAVED="${CFLAGS:-}"
19142 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Walloc-zero"
f7291891 19143
90121a3e 19144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19145/* end confdefs.h. */
19146
19147
90121a3e
AJ
19148 #ifdef HAVE_STDDEF_H
19149 # include <stddef.h>
19150 #endif
19151 static int
19152 return_zero(void)
19153 {
19154 return 0;
19155 }
19156
f7291891
AJ
19157int
19158main ()
19159{
19160
90121a3e
AJ
19161 int zero = return_zero();
19162
f7291891
AJ
19163 ;
19164 return 0;
19165}
19166
19167_ACEOF
19168if ac_fn_c_try_compile "$LINENO"; then :
19169
90121a3e 19170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19171$as_echo "yes" >&6; }
90121a3e 19172 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19173
f7291891
AJ
19174else
19175
90121a3e 19176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19177$as_echo "no" >&6; }
90121a3e
AJ
19178 ATHEME_TEST_CC_FLAGS_RESULT="no"
19179 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19180
19181fi
19182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19183
90121a3e 19184 unset CFLAGS_SAVED
f7291891
AJ
19185
19186
19187
90121a3e 19188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Walloca " >&5
df10dcc4 19189$as_echo_n "checking for C compiler flag(s) -Walloca ... " >&6; }
f7291891 19190
90121a3e
AJ
19191 CFLAGS_SAVED="${CFLAGS:-}"
19192 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Walloca"
f7291891 19193
90121a3e 19194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19195/* end confdefs.h. */
19196
19197
90121a3e
AJ
19198 #ifdef HAVE_STDDEF_H
19199 # include <stddef.h>
19200 #endif
19201 static int
19202 return_zero(void)
19203 {
19204 return 0;
19205 }
19206
f7291891
AJ
19207int
19208main ()
19209{
19210
90121a3e
AJ
19211 int zero = return_zero();
19212
f7291891
AJ
19213 ;
19214 return 0;
19215}
19216
19217_ACEOF
19218if ac_fn_c_try_compile "$LINENO"; then :
19219
90121a3e 19220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19221$as_echo "yes" >&6; }
90121a3e 19222 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19223
f7291891
AJ
19224else
19225
90121a3e 19226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19227$as_echo "no" >&6; }
90121a3e
AJ
19228 ATHEME_TEST_CC_FLAGS_RESULT="no"
19229 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19230
19231fi
19232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19233
90121a3e 19234 unset CFLAGS_SAVED
f7291891
AJ
19235
19236
19237
90121a3e 19238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Warray-bounds " >&5
df10dcc4 19239$as_echo_n "checking for C compiler flag(s) -Warray-bounds ... " >&6; }
f7291891 19240
90121a3e
AJ
19241 CFLAGS_SAVED="${CFLAGS:-}"
19242 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Warray-bounds"
f7291891 19243
90121a3e 19244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19245/* end confdefs.h. */
19246
19247
90121a3e
AJ
19248 #ifdef HAVE_STDDEF_H
19249 # include <stddef.h>
19250 #endif
19251 static int
19252 return_zero(void)
19253 {
19254 return 0;
19255 }
19256
f7291891
AJ
19257int
19258main ()
19259{
19260
90121a3e
AJ
19261 int zero = return_zero();
19262
f7291891
AJ
19263 ;
19264 return 0;
19265}
19266
19267_ACEOF
19268if ac_fn_c_try_compile "$LINENO"; then :
19269
90121a3e 19270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19271$as_echo "yes" >&6; }
90121a3e 19272 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19273
f7291891
AJ
19274else
19275
90121a3e 19276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19277$as_echo "no" >&6; }
90121a3e
AJ
19278 ATHEME_TEST_CC_FLAGS_RESULT="no"
19279 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19280
19281fi
19282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19283
90121a3e 19284 unset CFLAGS_SAVED
f7291891
AJ
19285
19286
19287
90121a3e 19288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wbad-function-cast " >&5
df10dcc4 19289$as_echo_n "checking for C compiler flag(s) -Wbad-function-cast ... " >&6; }
f7291891 19290
90121a3e
AJ
19291 CFLAGS_SAVED="${CFLAGS:-}"
19292 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wbad-function-cast"
f7291891 19293
90121a3e 19294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19295/* end confdefs.h. */
19296
19297
90121a3e
AJ
19298 #ifdef HAVE_STDDEF_H
19299 # include <stddef.h>
19300 #endif
19301 static int
19302 return_zero(void)
19303 {
19304 return 0;
19305 }
19306
f7291891
AJ
19307int
19308main ()
19309{
19310
90121a3e
AJ
19311 int zero = return_zero();
19312
f7291891
AJ
19313 ;
19314 return 0;
19315}
19316
19317_ACEOF
19318if ac_fn_c_try_compile "$LINENO"; then :
19319
90121a3e 19320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19321$as_echo "yes" >&6; }
90121a3e 19322 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19323
f7291891
AJ
19324else
19325
90121a3e 19326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19327$as_echo "no" >&6; }
90121a3e
AJ
19328 ATHEME_TEST_CC_FLAGS_RESULT="no"
19329 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19330
19331fi
19332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19333
90121a3e 19334 unset CFLAGS_SAVED
f7291891
AJ
19335
19336
19337
90121a3e 19338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wc99-c11-compat " >&5
df10dcc4 19339$as_echo_n "checking for C compiler flag(s) -Wc99-c11-compat ... " >&6; }
f7291891 19340
90121a3e
AJ
19341 CFLAGS_SAVED="${CFLAGS:-}"
19342 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wc99-c11-compat"
f7291891 19343
90121a3e 19344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19345/* end confdefs.h. */
19346
19347
90121a3e
AJ
19348 #ifdef HAVE_STDDEF_H
19349 # include <stddef.h>
19350 #endif
19351 static int
19352 return_zero(void)
19353 {
19354 return 0;
19355 }
19356
f7291891
AJ
19357int
19358main ()
19359{
19360
90121a3e
AJ
19361 int zero = return_zero();
19362
f7291891
AJ
19363 ;
19364 return 0;
19365}
19366
19367_ACEOF
19368if ac_fn_c_try_compile "$LINENO"; then :
19369
90121a3e 19370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19371$as_echo "yes" >&6; }
90121a3e 19372 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19373
f7291891
AJ
19374else
19375
90121a3e 19376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19377$as_echo "no" >&6; }
90121a3e
AJ
19378 ATHEME_TEST_CC_FLAGS_RESULT="no"
19379 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19380
19381fi
19382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19383
90121a3e 19384 unset CFLAGS_SAVED
f7291891
AJ
19385
19386
19387
90121a3e 19388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wcast-qual " >&5
df10dcc4 19389$as_echo_n "checking for C compiler flag(s) -Wcast-qual ... " >&6; }
f7291891 19390
90121a3e
AJ
19391 CFLAGS_SAVED="${CFLAGS:-}"
19392 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wcast-qual"
f7291891 19393
90121a3e 19394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19395/* end confdefs.h. */
19396
19397
90121a3e
AJ
19398 #ifdef HAVE_STDDEF_H
19399 # include <stddef.h>
19400 #endif
19401 static int
19402 return_zero(void)
19403 {
19404 return 0;
19405 }
19406
f7291891
AJ
19407int
19408main ()
19409{
19410
90121a3e
AJ
19411 int zero = return_zero();
19412
f7291891
AJ
19413 ;
19414 return 0;
19415}
19416
19417_ACEOF
19418if ac_fn_c_try_compile "$LINENO"; then :
19419
90121a3e 19420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19421$as_echo "yes" >&6; }
90121a3e 19422 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19423
f7291891
AJ
19424else
19425
90121a3e 19426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19427$as_echo "no" >&6; }
90121a3e
AJ
19428 ATHEME_TEST_CC_FLAGS_RESULT="no"
19429 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19430
19431fi
19432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19433
90121a3e 19434 unset CFLAGS_SAVED
f7291891
AJ
19435
19436
19437
90121a3e 19438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wdangling-else " >&5
df10dcc4 19439$as_echo_n "checking for C compiler flag(s) -Wdangling-else ... " >&6; }
f7291891 19440
90121a3e
AJ
19441 CFLAGS_SAVED="${CFLAGS:-}"
19442 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wdangling-else"
f7291891 19443
90121a3e 19444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19445/* end confdefs.h. */
19446
19447
90121a3e
AJ
19448 #ifdef HAVE_STDDEF_H
19449 # include <stddef.h>
19450 #endif
19451 static int
19452 return_zero(void)
19453 {
19454 return 0;
19455 }
19456
f7291891
AJ
19457int
19458main ()
19459{
19460
90121a3e
AJ
19461 int zero = return_zero();
19462
f7291891
AJ
19463 ;
19464 return 0;
19465}
19466
19467_ACEOF
19468if ac_fn_c_try_compile "$LINENO"; then :
19469
90121a3e 19470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19471$as_echo "yes" >&6; }
90121a3e 19472 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19473
f7291891
AJ
19474else
19475
90121a3e 19476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19477$as_echo "no" >&6; }
90121a3e
AJ
19478 ATHEME_TEST_CC_FLAGS_RESULT="no"
19479 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19480
19481fi
19482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19483
90121a3e 19484 unset CFLAGS_SAVED
f7291891
AJ
19485
19486
19487
90121a3e 19488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wdate-time " >&5
df10dcc4 19489$as_echo_n "checking for C compiler flag(s) -Wdate-time ... " >&6; }
f7291891 19490
90121a3e
AJ
19491 CFLAGS_SAVED="${CFLAGS:-}"
19492 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wdate-time"
f7291891 19493
90121a3e 19494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19495/* end confdefs.h. */
19496
19497
90121a3e
AJ
19498 #ifdef HAVE_STDDEF_H
19499 # include <stddef.h>
19500 #endif
19501 static int
19502 return_zero(void)
19503 {
19504 return 0;
19505 }
19506
f7291891
AJ
19507int
19508main ()
19509{
19510
90121a3e
AJ
19511 int zero = return_zero();
19512
f7291891
AJ
19513 ;
19514 return 0;
19515}
19516
19517_ACEOF
19518if ac_fn_c_try_compile "$LINENO"; then :
19519
90121a3e 19520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19521$as_echo "yes" >&6; }
90121a3e 19522 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19523
f7291891
AJ
19524else
19525
90121a3e 19526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19527$as_echo "no" >&6; }
90121a3e
AJ
19528 ATHEME_TEST_CC_FLAGS_RESULT="no"
19529 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19530
19531fi
19532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19533
90121a3e 19534 unset CFLAGS_SAVED
f7291891
AJ
19535
19536
19537
90121a3e 19538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wdisabled-optimization " >&5
df10dcc4 19539$as_echo_n "checking for C compiler flag(s) -Wdisabled-optimization ... " >&6; }
f7291891 19540
90121a3e
AJ
19541 CFLAGS_SAVED="${CFLAGS:-}"
19542 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wdisabled-optimization"
f7291891 19543
90121a3e 19544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19545/* end confdefs.h. */
19546
19547
90121a3e
AJ
19548 #ifdef HAVE_STDDEF_H
19549 # include <stddef.h>
19550 #endif
19551 static int
19552 return_zero(void)
19553 {
19554 return 0;
19555 }
19556
f7291891
AJ
19557int
19558main ()
19559{
19560
90121a3e
AJ
19561 int zero = return_zero();
19562
f7291891
AJ
19563 ;
19564 return 0;
19565}
19566
19567_ACEOF
19568if ac_fn_c_try_compile "$LINENO"; then :
19569
90121a3e 19570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19571$as_echo "yes" >&6; }
90121a3e 19572 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19573
f7291891
AJ
19574else
19575
90121a3e 19576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19577$as_echo "no" >&6; }
90121a3e
AJ
19578 ATHEME_TEST_CC_FLAGS_RESULT="no"
19579 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19580
19581fi
19582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19583
90121a3e 19584 unset CFLAGS_SAVED
f7291891
AJ
19585
19586
19587
90121a3e 19588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wdouble-promotion " >&5
df10dcc4 19589$as_echo_n "checking for C compiler flag(s) -Wdouble-promotion ... " >&6; }
f7291891 19590
90121a3e
AJ
19591 CFLAGS_SAVED="${CFLAGS:-}"
19592 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wdouble-promotion"
f7291891 19593
90121a3e 19594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19595/* end confdefs.h. */
19596
19597
90121a3e
AJ
19598 #ifdef HAVE_STDDEF_H
19599 # include <stddef.h>
19600 #endif
19601 static int
19602 return_zero(void)
19603 {
19604 return 0;
19605 }
19606
f7291891
AJ
19607int
19608main ()
19609{
19610
90121a3e
AJ
19611 int zero = return_zero();
19612
f7291891
AJ
19613 ;
19614 return 0;
19615}
19616
19617_ACEOF
19618if ac_fn_c_try_compile "$LINENO"; then :
19619
90121a3e 19620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19621$as_echo "yes" >&6; }
90121a3e 19622 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19623
f7291891
AJ
19624else
19625
90121a3e 19626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19627$as_echo "no" >&6; }
90121a3e
AJ
19628 ATHEME_TEST_CC_FLAGS_RESULT="no"
19629 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19630
19631fi
19632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19633
90121a3e 19634 unset CFLAGS_SAVED
f7291891
AJ
19635
19636
19637
90121a3e 19638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wduplicated-branches " >&5
df10dcc4 19639$as_echo_n "checking for C compiler flag(s) -Wduplicated-branches ... " >&6; }
37af1faa 19640
90121a3e
AJ
19641 CFLAGS_SAVED="${CFLAGS:-}"
19642 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wduplicated-branches"
37af1faa 19643
90121a3e 19644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37af1faa
AJ
19645/* end confdefs.h. */
19646
19647
90121a3e
AJ
19648 #ifdef HAVE_STDDEF_H
19649 # include <stddef.h>
19650 #endif
19651 static int
19652 return_zero(void)
19653 {
19654 return 0;
19655 }
19656
37af1faa
AJ
19657int
19658main ()
19659{
19660
90121a3e
AJ
19661 int zero = return_zero();
19662
37af1faa
AJ
19663 ;
19664 return 0;
19665}
19666
19667_ACEOF
19668if ac_fn_c_try_compile "$LINENO"; then :
19669
90121a3e 19670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37af1faa 19671$as_echo "yes" >&6; }
90121a3e 19672 ATHEME_TEST_CC_FLAGS_RESULT="yes"
37af1faa
AJ
19673
19674else
19675
90121a3e 19676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37af1faa 19677$as_echo "no" >&6; }
90121a3e
AJ
19678 ATHEME_TEST_CC_FLAGS_RESULT="no"
19679 CFLAGS="${CFLAGS_SAVED}"
37af1faa
AJ
19680
19681fi
19682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19683
90121a3e 19684 unset CFLAGS_SAVED
37af1faa
AJ
19685
19686
19687
90121a3e 19688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wduplicated-cond " >&5
df10dcc4 19689$as_echo_n "checking for C compiler flag(s) -Wduplicated-cond ... " >&6; }
f7291891 19690
90121a3e
AJ
19691 CFLAGS_SAVED="${CFLAGS:-}"
19692 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wduplicated-cond"
f7291891 19693
90121a3e 19694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19695/* end confdefs.h. */
19696
19697
90121a3e
AJ
19698 #ifdef HAVE_STDDEF_H
19699 # include <stddef.h>
19700 #endif
19701 static int
19702 return_zero(void)
19703 {
19704 return 0;
19705 }
19706
f7291891
AJ
19707int
19708main ()
19709{
19710
90121a3e
AJ
19711 int zero = return_zero();
19712
f7291891
AJ
19713 ;
19714 return 0;
19715}
19716
19717_ACEOF
19718if ac_fn_c_try_compile "$LINENO"; then :
19719
90121a3e 19720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19721$as_echo "yes" >&6; }
90121a3e 19722 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19723
f7291891
AJ
19724else
19725
90121a3e 19726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19727$as_echo "no" >&6; }
90121a3e
AJ
19728 ATHEME_TEST_CC_FLAGS_RESULT="no"
19729 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19730
19731fi
19732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19733
90121a3e 19734 unset CFLAGS_SAVED
f7291891
AJ
19735
19736
19737
90121a3e 19738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wfatal-errors " >&5
df10dcc4 19739$as_echo_n "checking for C compiler flag(s) -Wfatal-errors ... " >&6; }
f7291891 19740
90121a3e
AJ
19741 CFLAGS_SAVED="${CFLAGS:-}"
19742 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wfatal-errors"
f7291891 19743
90121a3e 19744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19745/* end confdefs.h. */
19746
19747
90121a3e
AJ
19748 #ifdef HAVE_STDDEF_H
19749 # include <stddef.h>
19750 #endif
19751 static int
19752 return_zero(void)
19753 {
19754 return 0;
19755 }
19756
f7291891
AJ
19757int
19758main ()
19759{
19760
90121a3e
AJ
19761 int zero = return_zero();
19762
f7291891
AJ
19763 ;
19764 return 0;
19765}
19766
19767_ACEOF
19768if ac_fn_c_try_compile "$LINENO"; then :
19769
90121a3e 19770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19771$as_echo "yes" >&6; }
90121a3e 19772 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19773
f7291891
AJ
19774else
19775
90121a3e 19776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19777$as_echo "no" >&6; }
90121a3e
AJ
19778 ATHEME_TEST_CC_FLAGS_RESULT="no"
19779 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19780
19781fi
19782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19783
90121a3e 19784 unset CFLAGS_SAVED
f7291891
AJ
19785
19786
19787
90121a3e 19788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wfloat-equal " >&5
df10dcc4 19789$as_echo_n "checking for C compiler flag(s) -Wfloat-equal ... " >&6; }
f7291891 19790
90121a3e
AJ
19791 CFLAGS_SAVED="${CFLAGS:-}"
19792 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wfloat-equal"
f7291891 19793
90121a3e 19794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19795/* end confdefs.h. */
19796
19797
90121a3e
AJ
19798 #ifdef HAVE_STDDEF_H
19799 # include <stddef.h>
19800 #endif
19801 static int
19802 return_zero(void)
19803 {
19804 return 0;
19805 }
19806
f7291891
AJ
19807int
19808main ()
19809{
19810
90121a3e
AJ
19811 int zero = return_zero();
19812
f7291891
AJ
19813 ;
19814 return 0;
19815}
19816
19817_ACEOF
19818if ac_fn_c_try_compile "$LINENO"; then :
19819
90121a3e 19820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19821$as_echo "yes" >&6; }
90121a3e 19822 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19823
f7291891
AJ
19824else
19825
90121a3e 19826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19827$as_echo "no" >&6; }
90121a3e
AJ
19828 ATHEME_TEST_CC_FLAGS_RESULT="no"
19829 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19830
19831fi
19832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19833
90121a3e 19834 unset CFLAGS_SAVED
f7291891
AJ
19835
19836
19837
90121a3e 19838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wformat-nonliteral " >&5
df10dcc4 19839$as_echo_n "checking for C compiler flag(s) -Wformat-nonliteral ... " >&6; }
f7291891 19840
90121a3e
AJ
19841 CFLAGS_SAVED="${CFLAGS:-}"
19842 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wformat-nonliteral"
f7291891 19843
90121a3e 19844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19845/* end confdefs.h. */
19846
19847
90121a3e
AJ
19848 #ifdef HAVE_STDDEF_H
19849 # include <stddef.h>
19850 #endif
19851 static int
19852 return_zero(void)
19853 {
19854 return 0;
19855 }
19856
f7291891
AJ
19857int
19858main ()
19859{
19860
90121a3e
AJ
19861 int zero = return_zero();
19862
f7291891
AJ
19863 ;
19864 return 0;
19865}
19866
19867_ACEOF
19868if ac_fn_c_try_compile "$LINENO"; then :
19869
90121a3e 19870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19871$as_echo "yes" >&6; }
90121a3e 19872 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19873
f7291891
AJ
19874else
19875
90121a3e 19876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19877$as_echo "no" >&6; }
90121a3e
AJ
19878 ATHEME_TEST_CC_FLAGS_RESULT="no"
19879 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19880
19881fi
19882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19883
90121a3e 19884 unset CFLAGS_SAVED
f7291891
AJ
19885
19886
19887
90121a3e 19888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wformat-overflow " >&5
df10dcc4 19889$as_echo_n "checking for C compiler flag(s) -Wformat-overflow ... " >&6; }
f7291891 19890
90121a3e
AJ
19891 CFLAGS_SAVED="${CFLAGS:-}"
19892 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wformat-overflow"
f7291891 19893
90121a3e 19894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19895/* end confdefs.h. */
19896
19897
90121a3e
AJ
19898 #ifdef HAVE_STDDEF_H
19899 # include <stddef.h>
19900 #endif
19901 static int
19902 return_zero(void)
19903 {
19904 return 0;
19905 }
19906
f7291891
AJ
19907int
19908main ()
19909{
19910
90121a3e
AJ
19911 int zero = return_zero();
19912
f7291891
AJ
19913 ;
19914 return 0;
19915}
19916
19917_ACEOF
19918if ac_fn_c_try_compile "$LINENO"; then :
19919
90121a3e 19920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19921$as_echo "yes" >&6; }
90121a3e 19922 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19923
f7291891
AJ
19924else
19925
90121a3e 19926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19927$as_echo "no" >&6; }
90121a3e
AJ
19928 ATHEME_TEST_CC_FLAGS_RESULT="no"
19929 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19930
19931fi
19932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19933
90121a3e 19934 unset CFLAGS_SAVED
f7291891
AJ
19935
19936
19937
90121a3e 19938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wformat-security " >&5
df10dcc4 19939$as_echo_n "checking for C compiler flag(s) -Wformat-security ... " >&6; }
f7291891 19940
90121a3e
AJ
19941 CFLAGS_SAVED="${CFLAGS:-}"
19942 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wformat-security"
f7291891 19943
90121a3e 19944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19945/* end confdefs.h. */
19946
19947
90121a3e
AJ
19948 #ifdef HAVE_STDDEF_H
19949 # include <stddef.h>
19950 #endif
19951 static int
19952 return_zero(void)
19953 {
19954 return 0;
19955 }
19956
f7291891
AJ
19957int
19958main ()
19959{
19960
90121a3e
AJ
19961 int zero = return_zero();
19962
f7291891
AJ
19963 ;
19964 return 0;
19965}
19966
19967_ACEOF
19968if ac_fn_c_try_compile "$LINENO"; then :
19969
90121a3e 19970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 19971$as_echo "yes" >&6; }
90121a3e 19972 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 19973
f7291891
AJ
19974else
19975
90121a3e 19976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 19977$as_echo "no" >&6; }
90121a3e
AJ
19978 ATHEME_TEST_CC_FLAGS_RESULT="no"
19979 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
19980
19981fi
19982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19983
90121a3e 19984 unset CFLAGS_SAVED
f7291891
AJ
19985
19986
19987
90121a3e 19988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wformat-signedness " >&5
df10dcc4 19989$as_echo_n "checking for C compiler flag(s) -Wformat-signedness ... " >&6; }
f7291891 19990
90121a3e
AJ
19991 CFLAGS_SAVED="${CFLAGS:-}"
19992 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wformat-signedness"
f7291891 19993
90121a3e 19994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
19995/* end confdefs.h. */
19996
19997
90121a3e
AJ
19998 #ifdef HAVE_STDDEF_H
19999 # include <stddef.h>
20000 #endif
20001 static int
20002 return_zero(void)
20003 {
20004 return 0;
20005 }
20006
f7291891
AJ
20007int
20008main ()
20009{
20010
90121a3e
AJ
20011 int zero = return_zero();
20012
f7291891
AJ
20013 ;
20014 return 0;
20015}
20016
20017_ACEOF
20018if ac_fn_c_try_compile "$LINENO"; then :
20019
90121a3e 20020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 20021$as_echo "yes" >&6; }
90121a3e 20022 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 20023
f7291891
AJ
20024else
20025
90121a3e 20026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 20027$as_echo "no" >&6; }
90121a3e
AJ
20028 ATHEME_TEST_CC_FLAGS_RESULT="no"
20029 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
20030
20031fi
20032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20033
90121a3e 20034 unset CFLAGS_SAVED
f7291891
AJ
20035
20036
20037
90121a3e 20038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wformat-truncation " >&5
df10dcc4 20039$as_echo_n "checking for C compiler flag(s) -Wformat-truncation ... " >&6; }
f7291891 20040
90121a3e
AJ
20041 CFLAGS_SAVED="${CFLAGS:-}"
20042 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wformat-truncation"
f7291891 20043
90121a3e 20044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
20045/* end confdefs.h. */
20046
20047
90121a3e
AJ
20048 #ifdef HAVE_STDDEF_H
20049 # include <stddef.h>
20050 #endif
20051 static int
20052 return_zero(void)
20053 {
20054 return 0;
20055 }
20056
f7291891
AJ
20057int
20058main ()
20059{
20060
90121a3e
AJ
20061 int zero = return_zero();
20062
f7291891
AJ
20063 ;
20064 return 0;
20065}
20066
20067_ACEOF
20068if ac_fn_c_try_compile "$LINENO"; then :
20069
90121a3e 20070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 20071$as_echo "yes" >&6; }
90121a3e 20072 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 20073
f7291891
AJ
20074else
20075
90121a3e 20076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 20077$as_echo "no" >&6; }
90121a3e
AJ
20078 ATHEME_TEST_CC_FLAGS_RESULT="no"
20079 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
20080
20081fi
20082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20083
90121a3e 20084 unset CFLAGS_SAVED
f7291891
AJ
20085
20086
20087
90121a3e 20088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wformat-y2k " >&5
df10dcc4 20089$as_echo_n "checking for C compiler flag(s) -Wformat-y2k ... " >&6; }
f7291891 20090
90121a3e
AJ
20091 CFLAGS_SAVED="${CFLAGS:-}"
20092 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wformat-y2k"
f7291891 20093
90121a3e 20094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
20095/* end confdefs.h. */
20096
20097
90121a3e
AJ
20098 #ifdef HAVE_STDDEF_H
20099 # include <stddef.h>
20100 #endif
20101 static int
20102 return_zero(void)
20103 {
20104 return 0;
20105 }
20106
f7291891
AJ
20107int
20108main ()
20109{
20110
90121a3e
AJ
20111 int zero = return_zero();
20112
f7291891
AJ
20113 ;
20114 return 0;
20115}
20116
20117_ACEOF
20118if ac_fn_c_try_compile "$LINENO"; then :
20119
90121a3e 20120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 20121$as_echo "yes" >&6; }
90121a3e 20122 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 20123
f7291891
AJ
20124else
20125
90121a3e 20126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 20127$as_echo "no" >&6; }
90121a3e
AJ
20128 ATHEME_TEST_CC_FLAGS_RESULT="no"
20129 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
20130
20131fi
20132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20133
90121a3e 20134 unset CFLAGS_SAVED
f7291891
AJ
20135
20136
20137
90121a3e 20138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Winline " >&5
df10dcc4 20139$as_echo_n "checking for C compiler flag(s) -Winline ... " >&6; }
f7291891 20140
90121a3e
AJ
20141 CFLAGS_SAVED="${CFLAGS:-}"
20142 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Winline"
f7291891 20143
90121a3e 20144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
20145/* end confdefs.h. */
20146
20147
90121a3e
AJ
20148 #ifdef HAVE_STDDEF_H
20149 # include <stddef.h>
20150 #endif
20151 static int
20152 return_zero(void)
20153 {
20154 return 0;
20155 }
20156
f7291891
AJ
20157int
20158main ()
20159{
20160
90121a3e
AJ
20161 int zero = return_zero();
20162
f7291891
AJ
20163 ;
20164 return 0;
20165}
20166
20167_ACEOF
20168if ac_fn_c_try_compile "$LINENO"; then :
20169
90121a3e 20170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 20171$as_echo "yes" >&6; }
90121a3e 20172 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 20173
f7291891
AJ
20174else
20175
90121a3e 20176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 20177$as_echo "no" >&6; }
90121a3e
AJ
20178 ATHEME_TEST_CC_FLAGS_RESULT="no"
20179 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
20180
20181fi
20182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20183
90121a3e 20184 unset CFLAGS_SAVED
f7291891
AJ
20185
20186
20187
90121a3e 20188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Winit-self " >&5
df10dcc4 20189$as_echo_n "checking for C compiler flag(s) -Winit-self ... " >&6; }
f7291891 20190
90121a3e
AJ
20191 CFLAGS_SAVED="${CFLAGS:-}"
20192 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Winit-self"
f7291891 20193
90121a3e 20194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
20195/* end confdefs.h. */
20196
20197
90121a3e
AJ
20198 #ifdef HAVE_STDDEF_H
20199 # include <stddef.h>
20200 #endif
20201 static int
20202 return_zero(void)
20203 {
20204 return 0;
20205 }
20206
f7291891
AJ
20207int
20208main ()
20209{
20210
90121a3e
AJ
20211 int zero = return_zero();
20212
f7291891
AJ
20213 ;
20214 return 0;
20215}
20216
20217_ACEOF
20218if ac_fn_c_try_compile "$LINENO"; then :
20219
90121a3e 20220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 20221$as_echo "yes" >&6; }
90121a3e 20222 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 20223
f7291891
AJ
20224else
20225
90121a3e 20226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 20227$as_echo "no" >&6; }
90121a3e
AJ
20228 ATHEME_TEST_CC_FLAGS_RESULT="no"
20229 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
20230
20231fi
20232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20233
90121a3e 20234 unset CFLAGS_SAVED
f7291891
AJ
20235
20236
20237
90121a3e 20238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Winvalid-pch " >&5
df10dcc4 20239$as_echo_n "checking for C compiler flag(s) -Winvalid-pch ... " >&6; }
f7291891 20240
90121a3e
AJ
20241 CFLAGS_SAVED="${CFLAGS:-}"
20242 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Winvalid-pch"
f7291891 20243
90121a3e 20244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
20245/* end confdefs.h. */
20246
20247
90121a3e
AJ
20248 #ifdef HAVE_STDDEF_H
20249 # include <stddef.h>
20250 #endif
20251 static int
20252 return_zero(void)
20253 {
20254 return 0;
20255 }
20256
f7291891
AJ
20257int
20258main ()
20259{
20260
90121a3e
AJ
20261 int zero = return_zero();
20262
f7291891
AJ
20263 ;
20264 return 0;
20265}
20266
20267_ACEOF
20268if ac_fn_c_try_compile "$LINENO"; then :
20269
90121a3e 20270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 20271$as_echo "yes" >&6; }
90121a3e 20272 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 20273
f7291891
AJ
20274else
20275
90121a3e 20276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 20277$as_echo "no" >&6; }
90121a3e
AJ
20278 ATHEME_TEST_CC_FLAGS_RESULT="no"
20279 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
20280
20281fi
20282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20283
90121a3e 20284 unset CFLAGS_SAVED
f7291891
AJ
20285
20286
20287
90121a3e 20288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wjump-misses-init " >&5
df10dcc4 20289$as_echo_n "checking for C compiler flag(s) -Wjump-misses-init ... " >&6; }
37af1faa 20290
90121a3e
AJ
20291 CFLAGS_SAVED="${CFLAGS:-}"
20292 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wjump-misses-init"
37af1faa 20293
90121a3e 20294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37af1faa
AJ
20295/* end confdefs.h. */
20296
20297
90121a3e
AJ
20298 #ifdef HAVE_STDDEF_H
20299 # include <stddef.h>
20300 #endif
20301 static int
20302 return_zero(void)
20303 {
20304 return 0;
20305 }
20306
37af1faa
AJ
20307int
20308main ()
20309{
20310
90121a3e
AJ
20311 int zero = return_zero();
20312
37af1faa
AJ
20313 ;
20314 return 0;
20315}
20316
20317_ACEOF
20318if ac_fn_c_try_compile "$LINENO"; then :
20319
90121a3e 20320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37af1faa 20321$as_echo "yes" >&6; }
90121a3e 20322 ATHEME_TEST_CC_FLAGS_RESULT="yes"
37af1faa
AJ
20323
20324else
20325
90121a3e 20326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37af1faa 20327$as_echo "no" >&6; }
90121a3e
AJ
20328 ATHEME_TEST_CC_FLAGS_RESULT="no"
20329 CFLAGS="${CFLAGS_SAVED}"
37af1faa
AJ
20330
20331fi
20332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20333
90121a3e 20334 unset CFLAGS_SAVED
37af1faa
AJ
20335
20336
20337
90121a3e 20338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wlogical-op " >&5
df10dcc4 20339$as_echo_n "checking for C compiler flag(s) -Wlogical-op ... " >&6; }
f7291891 20340
90121a3e
AJ
20341 CFLAGS_SAVED="${CFLAGS:-}"
20342 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wlogical-op"
f7291891 20343
90121a3e 20344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
20345/* end confdefs.h. */
20346
20347
90121a3e
AJ
20348 #ifdef HAVE_STDDEF_H
20349 # include <stddef.h>
20350 #endif
20351 static int
20352 return_zero(void)
20353 {
20354 return 0;
20355 }
20356
f7291891
AJ
20357int
20358main ()
20359{
20360
90121a3e
AJ
20361 int zero = return_zero();
20362
f7291891
AJ
20363 ;
20364 return 0;
20365}
20366
20367_ACEOF
20368if ac_fn_c_try_compile "$LINENO"; then :
20369
90121a3e 20370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 20371$as_echo "yes" >&6; }
90121a3e 20372 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 20373
f7291891
AJ
20374else
20375
90121a3e 20376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 20377$as_echo "no" >&6; }
90121a3e
AJ
20378 ATHEME_TEST_CC_FLAGS_RESULT="no"
20379 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
20380
20381fi
20382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20383
90121a3e 20384 unset CFLAGS_SAVED
f7291891
AJ
20385
20386
20387
90121a3e 20388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wmissing-declarations " >&5
df10dcc4 20389$as_echo_n "checking for C compiler flag(s) -Wmissing-declarations ... " >&6; }
f7291891 20390
90121a3e
AJ
20391 CFLAGS_SAVED="${CFLAGS:-}"
20392 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wmissing-declarations"
f7291891 20393
90121a3e 20394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
20395/* end confdefs.h. */
20396
20397
90121a3e
AJ
20398 #ifdef HAVE_STDDEF_H
20399 # include <stddef.h>
20400 #endif
20401 static int
20402 return_zero(void)
20403 {
20404 return 0;
20405 }
20406
f7291891
AJ
20407int
20408main ()
20409{
20410
90121a3e
AJ
20411 int zero = return_zero();
20412
f7291891
AJ
20413 ;
20414 return 0;
20415}
20416
20417_ACEOF
20418if ac_fn_c_try_compile "$LINENO"; then :
20419
90121a3e 20420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 20421$as_echo "yes" >&6; }
90121a3e 20422 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 20423
f7291891
AJ
20424else
20425
90121a3e 20426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 20427$as_echo "no" >&6; }
90121a3e
AJ
20428 ATHEME_TEST_CC_FLAGS_RESULT="no"
20429 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
20430
20431fi
20432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20433
90121a3e 20434 unset CFLAGS_SAVED
f7291891
AJ
20435
20436
20437
90121a3e 20438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wmissing-format-attribute " >&5
df10dcc4 20439$as_echo_n "checking for C compiler flag(s) -Wmissing-format-attribute ... " >&6; }
37af1faa 20440
90121a3e
AJ
20441 CFLAGS_SAVED="${CFLAGS:-}"
20442 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wmissing-format-attribute"
37af1faa 20443
90121a3e 20444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37af1faa
AJ
20445/* end confdefs.h. */
20446
20447
90121a3e
AJ
20448 #ifdef HAVE_STDDEF_H
20449 # include <stddef.h>
20450 #endif
20451 static int
20452 return_zero(void)
20453 {
20454 return 0;
20455 }
20456
37af1faa
AJ
20457int
20458main ()
20459{
20460
90121a3e
AJ
20461 int zero = return_zero();
20462
37af1faa
AJ
20463 ;
20464 return 0;
20465}
20466
20467_ACEOF
20468if ac_fn_c_try_compile "$LINENO"; then :
20469
90121a3e 20470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37af1faa 20471$as_echo "yes" >&6; }
90121a3e 20472 ATHEME_TEST_CC_FLAGS_RESULT="yes"
37af1faa
AJ
20473
20474else
20475
90121a3e 20476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37af1faa 20477$as_echo "no" >&6; }
90121a3e
AJ
20478 ATHEME_TEST_CC_FLAGS_RESULT="no"
20479 CFLAGS="${CFLAGS_SAVED}"
37af1faa
AJ
20480
20481fi
20482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20483
90121a3e 20484 unset CFLAGS_SAVED
37af1faa
AJ
20485
20486
20487
90121a3e 20488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wmissing-include-dirs " >&5
18df1bfd
AJ
20489$as_echo_n "checking for C compiler flag(s) -Wmissing-include-dirs ... " >&6; }
20490
90121a3e
AJ
20491 CFLAGS_SAVED="${CFLAGS:-}"
20492 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wmissing-include-dirs"
18df1bfd 20493
90121a3e 20494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18df1bfd
AJ
20495/* end confdefs.h. */
20496
20497
90121a3e
AJ
20498 #ifdef HAVE_STDDEF_H
20499 # include <stddef.h>
20500 #endif
20501 static int
20502 return_zero(void)
20503 {
20504 return 0;
20505 }
20506
18df1bfd
AJ
20507int
20508main ()
20509{
20510
90121a3e
AJ
20511 int zero = return_zero();
20512
18df1bfd
AJ
20513 ;
20514 return 0;
20515}
20516
20517_ACEOF
20518if ac_fn_c_try_compile "$LINENO"; then :
20519
90121a3e 20520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18df1bfd 20521$as_echo "yes" >&6; }
90121a3e 20522 ATHEME_TEST_CC_FLAGS_RESULT="yes"
18df1bfd
AJ
20523
20524else
20525
90121a3e 20526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18df1bfd 20527$as_echo "no" >&6; }
90121a3e
AJ
20528 ATHEME_TEST_CC_FLAGS_RESULT="no"
20529 CFLAGS="${CFLAGS_SAVED}"
18df1bfd
AJ
20530
20531fi
20532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20533
90121a3e 20534 unset CFLAGS_SAVED
18df1bfd
AJ
20535
20536
20537
90121a3e 20538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wmissing-prototypes " >&5
df10dcc4 20539$as_echo_n "checking for C compiler flag(s) -Wmissing-prototypes ... " >&6; }
f7291891 20540
90121a3e
AJ
20541 CFLAGS_SAVED="${CFLAGS:-}"
20542 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wmissing-prototypes"
f7291891 20543
90121a3e 20544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
20545/* end confdefs.h. */
20546
20547
90121a3e
AJ
20548 #ifdef HAVE_STDDEF_H
20549 # include <stddef.h>
20550 #endif
20551 static int
20552 return_zero(void)
20553 {
20554 return 0;
20555 }
20556
f7291891
AJ
20557int
20558main ()
20559{
20560
90121a3e
AJ
20561 int zero = return_zero();
20562
f7291891
AJ
20563 ;
20564 return 0;
20565}
20566
20567_ACEOF
20568if ac_fn_c_try_compile "$LINENO"; then :
20569
90121a3e 20570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 20571$as_echo "yes" >&6; }
90121a3e 20572 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 20573
f7291891
AJ
20574else
20575
90121a3e 20576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 20577$as_echo "no" >&6; }
90121a3e
AJ
20578 ATHEME_TEST_CC_FLAGS_RESULT="no"
20579 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
20580
20581fi
20582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20583
90121a3e 20584 unset CFLAGS_SAVED
f7291891
AJ
20585
20586
20587
90121a3e 20588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wmissing-variable-declarations " >&5
2ae1738f
AJ
20589$as_echo_n "checking for C compiler flag(s) -Wmissing-variable-declarations ... " >&6; }
20590
90121a3e
AJ
20591 CFLAGS_SAVED="${CFLAGS:-}"
20592 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wmissing-variable-declarations"
2ae1738f 20593
90121a3e 20594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2ae1738f
AJ
20595/* end confdefs.h. */
20596
20597
90121a3e
AJ
20598 #ifdef HAVE_STDDEF_H
20599 # include <stddef.h>
20600 #endif
20601 static int
20602 return_zero(void)
20603 {
20604 return 0;
20605 }
20606
2ae1738f
AJ
20607int
20608main ()
20609{
20610
90121a3e
AJ
20611 int zero = return_zero();
20612
2ae1738f
AJ
20613 ;
20614 return 0;
20615}
20616
20617_ACEOF
20618if ac_fn_c_try_compile "$LINENO"; then :
20619
90121a3e 20620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2ae1738f 20621$as_echo "yes" >&6; }
90121a3e 20622 ATHEME_TEST_CC_FLAGS_RESULT="yes"
2ae1738f
AJ
20623
20624else
20625
90121a3e 20626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2ae1738f 20627$as_echo "no" >&6; }
90121a3e
AJ
20628 ATHEME_TEST_CC_FLAGS_RESULT="no"
20629 CFLAGS="${CFLAGS_SAVED}"
2ae1738f
AJ
20630
20631fi
20632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20633
90121a3e 20634 unset CFLAGS_SAVED
2ae1738f
AJ
20635
20636
20637
90121a3e 20638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wmultistatement-macros " >&5
df10dcc4 20639$as_echo_n "checking for C compiler flag(s) -Wmultistatement-macros ... " >&6; }
f7291891 20640
90121a3e
AJ
20641 CFLAGS_SAVED="${CFLAGS:-}"
20642 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wmultistatement-macros"
f7291891 20643
90121a3e 20644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
20645/* end confdefs.h. */
20646
20647
90121a3e
AJ
20648 #ifdef HAVE_STDDEF_H
20649 # include <stddef.h>
20650 #endif
20651 static int
20652 return_zero(void)
20653 {
20654 return 0;
20655 }
20656
f7291891
AJ
20657int
20658main ()
20659{
20660
90121a3e
AJ
20661 int zero = return_zero();
20662
f7291891
AJ
20663 ;
20664 return 0;
20665}
20666
20667_ACEOF
20668if ac_fn_c_try_compile "$LINENO"; then :
20669
90121a3e 20670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 20671$as_echo "yes" >&6; }
90121a3e 20672 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 20673
f7291891
AJ
20674else
20675
90121a3e 20676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 20677$as_echo "no" >&6; }
90121a3e
AJ
20678 ATHEME_TEST_CC_FLAGS_RESULT="no"
20679 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
20680
20681fi
20682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20683
90121a3e 20684 unset CFLAGS_SAVED
f7291891
AJ
20685
20686
20687
90121a3e 20688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wnested-externs " >&5
df10dcc4 20689$as_echo_n "checking for C compiler flag(s) -Wnested-externs ... " >&6; }
f7291891 20690
90121a3e
AJ
20691 CFLAGS_SAVED="${CFLAGS:-}"
20692 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wnested-externs"
f7291891 20693
90121a3e 20694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
20695/* end confdefs.h. */
20696
20697
90121a3e
AJ
20698 #ifdef HAVE_STDDEF_H
20699 # include <stddef.h>
20700 #endif
20701 static int
20702 return_zero(void)
20703 {
20704 return 0;
20705 }
20706
f7291891
AJ
20707int
20708main ()
20709{
20710
90121a3e
AJ
20711 int zero = return_zero();
20712
f7291891
AJ
20713 ;
20714 return 0;
20715}
20716
20717_ACEOF
20718if ac_fn_c_try_compile "$LINENO"; then :
20719
90121a3e 20720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 20721$as_echo "yes" >&6; }
90121a3e 20722 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 20723
f7291891
AJ
20724else
20725
90121a3e 20726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 20727$as_echo "no" >&6; }
90121a3e
AJ
20728 ATHEME_TEST_CC_FLAGS_RESULT="no"
20729 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
20730
20731fi
20732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20733
90121a3e 20734 unset CFLAGS_SAVED
f7291891
AJ
20735
20736
20737
90121a3e 20738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wnormalized=nfkc " >&5
df10dcc4 20739$as_echo_n "checking for C compiler flag(s) -Wnormalized=nfkc ... " >&6; }
f7291891 20740
90121a3e
AJ
20741 CFLAGS_SAVED="${CFLAGS:-}"
20742 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wnormalized=nfkc"
f7291891 20743
90121a3e 20744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
20745/* end confdefs.h. */
20746
20747
90121a3e
AJ
20748 #ifdef HAVE_STDDEF_H
20749 # include <stddef.h>
20750 #endif
20751 static int
20752 return_zero(void)
20753 {
20754 return 0;
20755 }
20756
f7291891
AJ
20757int
20758main ()
20759{
20760
90121a3e
AJ
20761 int zero = return_zero();
20762
f7291891
AJ
20763 ;
20764 return 0;
20765}
20766
20767_ACEOF
20768if ac_fn_c_try_compile "$LINENO"; then :
20769
90121a3e 20770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 20771$as_echo "yes" >&6; }
90121a3e 20772 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 20773
f7291891
AJ
20774else
20775
90121a3e 20776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 20777$as_echo "no" >&6; }
90121a3e
AJ
20778 ATHEME_TEST_CC_FLAGS_RESULT="no"
20779 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
20780
20781fi
20782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20783
90121a3e 20784 unset CFLAGS_SAVED
f7291891
AJ
20785
20786
f7291891 20787
90121a3e 20788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wnull-dereference " >&5
df10dcc4 20789$as_echo_n "checking for C compiler flag(s) -Wnull-dereference ... " >&6; }
f7291891 20790
90121a3e
AJ
20791 CFLAGS_SAVED="${CFLAGS:-}"
20792 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wnull-dereference"
f7291891 20793
90121a3e 20794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
20795/* end confdefs.h. */
20796
20797
90121a3e
AJ
20798 #ifdef HAVE_STDDEF_H
20799 # include <stddef.h>
20800 #endif
20801 static int
20802 return_zero(void)
20803 {
20804 return 0;
20805 }
20806
f7291891
AJ
20807int
20808main ()
20809{
20810
90121a3e
AJ
20811 int zero = return_zero();
20812
f7291891
AJ
20813 ;
20814 return 0;
20815}
20816
20817_ACEOF
20818if ac_fn_c_try_compile "$LINENO"; then :
20819
90121a3e 20820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 20821$as_echo "yes" >&6; }
90121a3e 20822 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 20823
f7291891
AJ
20824else
20825
90121a3e 20826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 20827$as_echo "no" >&6; }
90121a3e
AJ
20828 ATHEME_TEST_CC_FLAGS_RESULT="no"
20829 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
20830
20831fi
20832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20833
90121a3e 20834 unset CFLAGS_SAVED
f7291891
AJ
20835
20836
20837
90121a3e 20838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wold-style-definition " >&5
df10dcc4 20839$as_echo_n "checking for C compiler flag(s) -Wold-style-definition ... " >&6; }
f7291891 20840
90121a3e
AJ
20841 CFLAGS_SAVED="${CFLAGS:-}"
20842 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wold-style-definition"
f7291891 20843
90121a3e 20844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
20845/* end confdefs.h. */
20846
20847
90121a3e
AJ
20848 #ifdef HAVE_STDDEF_H
20849 # include <stddef.h>
20850 #endif
20851 static int
20852 return_zero(void)
20853 {
20854 return 0;
20855 }
20856
f7291891
AJ
20857int
20858main ()
20859{
20860
90121a3e
AJ
20861 int zero = return_zero();
20862
f7291891
AJ
20863 ;
20864 return 0;
20865}
20866
20867_ACEOF
20868if ac_fn_c_try_compile "$LINENO"; then :
20869
90121a3e 20870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 20871$as_echo "yes" >&6; }
90121a3e 20872 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 20873
f7291891
AJ
20874else
20875
90121a3e 20876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 20877$as_echo "no" >&6; }
90121a3e
AJ
20878 ATHEME_TEST_CC_FLAGS_RESULT="no"
20879 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
20880
20881fi
20882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20883
90121a3e 20884 unset CFLAGS_SAVED
f7291891
AJ
20885
20886
20887
90121a3e 20888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Woverlength-strings " >&5
df10dcc4 20889$as_echo_n "checking for C compiler flag(s) -Woverlength-strings ... " >&6; }
f7291891 20890
90121a3e
AJ
20891 CFLAGS_SAVED="${CFLAGS:-}"
20892 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Woverlength-strings"
f7291891 20893
90121a3e 20894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
20895/* end confdefs.h. */
20896
20897
90121a3e
AJ
20898 #ifdef HAVE_STDDEF_H
20899 # include <stddef.h>
20900 #endif
20901 static int
20902 return_zero(void)
20903 {
20904 return 0;
20905 }
20906
f7291891
AJ
20907int
20908main ()
20909{
20910
90121a3e
AJ
20911 int zero = return_zero();
20912
f7291891
AJ
20913 ;
20914 return 0;
20915}
20916
20917_ACEOF
20918if ac_fn_c_try_compile "$LINENO"; then :
20919
90121a3e 20920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 20921$as_echo "yes" >&6; }
90121a3e 20922 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 20923
f7291891
AJ
20924else
20925
90121a3e 20926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 20927$as_echo "no" >&6; }
90121a3e
AJ
20928 ATHEME_TEST_CC_FLAGS_RESULT="no"
20929 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
20930
20931fi
20932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20933
90121a3e 20934 unset CFLAGS_SAVED
f7291891
AJ
20935
20936
20937
90121a3e 20938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wpointer-arith " >&5
df10dcc4 20939$as_echo_n "checking for C compiler flag(s) -Wpointer-arith ... " >&6; }
f7291891 20940
90121a3e
AJ
20941 CFLAGS_SAVED="${CFLAGS:-}"
20942 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wpointer-arith"
f7291891 20943
90121a3e 20944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
20945/* end confdefs.h. */
20946
20947
90121a3e
AJ
20948 #ifdef HAVE_STDDEF_H
20949 # include <stddef.h>
20950 #endif
20951 static int
20952 return_zero(void)
20953 {
20954 return 0;
20955 }
20956
f7291891
AJ
20957int
20958main ()
20959{
20960
90121a3e
AJ
20961 int zero = return_zero();
20962
f7291891
AJ
20963 ;
20964 return 0;
20965}
20966
20967_ACEOF
20968if ac_fn_c_try_compile "$LINENO"; then :
20969
90121a3e 20970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 20971$as_echo "yes" >&6; }
90121a3e 20972 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 20973
f7291891
AJ
20974else
20975
90121a3e 20976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 20977$as_echo "no" >&6; }
90121a3e
AJ
20978 ATHEME_TEST_CC_FLAGS_RESULT="no"
20979 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
20980
20981fi
20982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20983
90121a3e 20984 unset CFLAGS_SAVED
f7291891
AJ
20985
20986
20987
90121a3e 20988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wpointer-compare " >&5
df10dcc4 20989$as_echo_n "checking for C compiler flag(s) -Wpointer-compare ... " >&6; }
f7291891 20990
90121a3e
AJ
20991 CFLAGS_SAVED="${CFLAGS:-}"
20992 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wpointer-compare"
f7291891 20993
90121a3e 20994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
20995/* end confdefs.h. */
20996
083f09b4 20997
90121a3e
AJ
20998 #ifdef HAVE_STDDEF_H
20999 # include <stddef.h>
21000 #endif
21001 static int
21002 return_zero(void)
21003 {
21004 return 0;
21005 }
21006
85f61964
WP
21007int
21008main ()
21009{
083f09b4 21010
90121a3e
AJ
21011 int zero = return_zero();
21012
85f61964
WP
21013 ;
21014 return 0;
21015}
f7291891 21016
85f61964 21017_ACEOF
083f09b4 21018if ac_fn_c_try_compile "$LINENO"; then :
f7291891 21019
90121a3e 21020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 21021$as_echo "yes" >&6; }
90121a3e 21022 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 21023
85f61964 21024else
f7291891 21025
90121a3e 21026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 21027$as_echo "no" >&6; }
90121a3e
AJ
21028 ATHEME_TEST_CC_FLAGS_RESULT="no"
21029 CFLAGS="${CFLAGS_SAVED}"
f7291891 21030
85f61964 21031fi
083f09b4 21032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
85f61964 21033
90121a3e 21034 unset CFLAGS_SAVED
85f61964 21035
85f61964 21036
85f61964 21037
90121a3e 21038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wredundant-decls " >&5
df10dcc4 21039$as_echo_n "checking for C compiler flag(s) -Wredundant-decls ... " >&6; }
37af1faa 21040
90121a3e
AJ
21041 CFLAGS_SAVED="${CFLAGS:-}"
21042 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wredundant-decls"
37af1faa 21043
90121a3e 21044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37af1faa
AJ
21045/* end confdefs.h. */
21046
21047
90121a3e
AJ
21048 #ifdef HAVE_STDDEF_H
21049 # include <stddef.h>
21050 #endif
21051 static int
21052 return_zero(void)
21053 {
21054 return 0;
21055 }
21056
37af1faa
AJ
21057int
21058main ()
21059{
21060
90121a3e
AJ
21061 int zero = return_zero();
21062
37af1faa
AJ
21063 ;
21064 return 0;
21065}
21066
21067_ACEOF
21068if ac_fn_c_try_compile "$LINENO"; then :
21069
90121a3e 21070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37af1faa 21071$as_echo "yes" >&6; }
90121a3e 21072 ATHEME_TEST_CC_FLAGS_RESULT="yes"
37af1faa
AJ
21073
21074else
21075
90121a3e 21076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37af1faa 21077$as_echo "no" >&6; }
90121a3e
AJ
21078 ATHEME_TEST_CC_FLAGS_RESULT="no"
21079 CFLAGS="${CFLAGS_SAVED}"
37af1faa
AJ
21080
21081fi
21082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21083
90121a3e 21084 unset CFLAGS_SAVED
37af1faa
AJ
21085
21086
21087
90121a3e 21088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wrestrict " >&5
df10dcc4 21089$as_echo_n "checking for C compiler flag(s) -Wrestrict ... " >&6; }
f7291891 21090
90121a3e
AJ
21091 CFLAGS_SAVED="${CFLAGS:-}"
21092 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wrestrict"
f7291891 21093
90121a3e 21094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
083f09b4
WP
21095/* end confdefs.h. */
21096
85f61964 21097
90121a3e
AJ
21098 #ifdef HAVE_STDDEF_H
21099 # include <stddef.h>
21100 #endif
21101 static int
21102 return_zero(void)
21103 {
21104 return 0;
21105 }
21106
083f09b4
WP
21107int
21108main ()
21109{
85f61964 21110
90121a3e
AJ
21111 int zero = return_zero();
21112
083f09b4
WP
21113 ;
21114 return 0;
21115}
f7291891 21116
083f09b4
WP
21117_ACEOF
21118if ac_fn_c_try_compile "$LINENO"; then :
f7291891 21119
90121a3e 21120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 21121$as_echo "yes" >&6; }
90121a3e 21122 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 21123
083f09b4 21124else
f7291891 21125
90121a3e 21126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 21127$as_echo "no" >&6; }
90121a3e
AJ
21128 ATHEME_TEST_CC_FLAGS_RESULT="no"
21129 CFLAGS="${CFLAGS_SAVED}"
f7291891 21130
083f09b4
WP
21131fi
21132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
85f61964 21133
90121a3e 21134 unset CFLAGS_SAVED
85f61964
WP
21135
21136
f7291891 21137
90121a3e 21138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wshadow " >&5
df10dcc4 21139$as_echo_n "checking for C compiler flag(s) -Wshadow ... " >&6; }
f7291891 21140
90121a3e
AJ
21141 CFLAGS_SAVED="${CFLAGS:-}"
21142 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wshadow"
f7291891 21143
90121a3e 21144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
21145/* end confdefs.h. */
21146
21147
90121a3e
AJ
21148 #ifdef HAVE_STDDEF_H
21149 # include <stddef.h>
21150 #endif
21151 static int
21152 return_zero(void)
21153 {
21154 return 0;
21155 }
21156
e2872439
AJ
21157int
21158main ()
21159{
21160
90121a3e
AJ
21161 int zero = return_zero();
21162
e2872439
AJ
21163 ;
21164 return 0;
21165}
21166
21167_ACEOF
21168if ac_fn_c_try_compile "$LINENO"; then :
21169
90121a3e 21170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 21171$as_echo "yes" >&6; }
90121a3e 21172 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 21173
e2872439
AJ
21174else
21175
90121a3e 21176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 21177$as_echo "no" >&6; }
90121a3e
AJ
21178 ATHEME_TEST_CC_FLAGS_RESULT="no"
21179 CFLAGS="${CFLAGS_SAVED}"
e2872439
AJ
21180
21181fi
21182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21183
90121a3e 21184 unset CFLAGS_SAVED
e2872439
AJ
21185
21186
a19ae377 21187
90121a3e 21188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wstack-protector " >&5
df10dcc4 21189$as_echo_n "checking for C compiler flag(s) -Wstack-protector ... " >&6; }
e2872439 21190
90121a3e
AJ
21191 CFLAGS_SAVED="${CFLAGS:-}"
21192 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wstack-protector"
e2872439 21193
90121a3e 21194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e2872439
AJ
21195/* end confdefs.h. */
21196
21197
90121a3e
AJ
21198 #ifdef HAVE_STDDEF_H
21199 # include <stddef.h>
21200 #endif
21201 static int
21202 return_zero(void)
21203 {
21204 return 0;
21205 }
21206
f7291891
AJ
21207int
21208main ()
21209{
21210
90121a3e
AJ
21211 int zero = return_zero();
21212
f7291891
AJ
21213 ;
21214 return 0;
21215}
21216
21217_ACEOF
21218if ac_fn_c_try_compile "$LINENO"; then :
21219
90121a3e 21220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 21221$as_echo "yes" >&6; }
90121a3e 21222 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 21223
083f09b4 21224else
85f61964 21225
90121a3e 21226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 21227$as_echo "no" >&6; }
90121a3e
AJ
21228 ATHEME_TEST_CC_FLAGS_RESULT="no"
21229 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
21230
21231fi
21232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21233
90121a3e 21234 unset CFLAGS_SAVED
f7291891
AJ
21235
21236
21237
df10dcc4 21238
90121a3e 21239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wstrict-overflow=3 " >&5
df10dcc4 21240$as_echo_n "checking for C compiler flag(s) -Wstrict-overflow=3 ... " >&6; }
f7291891 21241
90121a3e
AJ
21242 CFLAGS_SAVED="${CFLAGS:-}"
21243 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wstrict-overflow=3"
f7291891 21244
90121a3e 21245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
083f09b4 21246/* end confdefs.h. */
85f61964 21247
85f61964 21248
90121a3e
AJ
21249 #ifdef HAVE_STDDEF_H
21250 # include <stddef.h>
21251 #endif
21252 static int
21253 return_zero(void)
21254 {
21255 return 0;
21256 }
21257
083f09b4
WP
21258int
21259main ()
21260{
14967f86 21261
90121a3e
AJ
21262 int zero = return_zero();
21263
f7291891
AJ
21264 ;
21265 return 0;
21266}
21267
21268_ACEOF
21269if ac_fn_c_try_compile "$LINENO"; then :
21270
90121a3e 21271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 21272$as_echo "yes" >&6; }
90121a3e 21273 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 21274
f7291891
AJ
21275else
21276
90121a3e 21277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 21278$as_echo "no" >&6; }
90121a3e
AJ
21279 ATHEME_TEST_CC_FLAGS_RESULT="no"
21280 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
21281
21282fi
21283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21284
90121a3e 21285 unset CFLAGS_SAVED
f7291891 21286
90121a3e 21287 if test "${ATHEME_TEST_CC_FLAGS_RESULT}" = "no"; then :
f7291891
AJ
21288
21289
df10dcc4 21290
90121a3e 21291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wstrict-overflow " >&5
df10dcc4 21292$as_echo_n "checking for C compiler flag(s) -Wstrict-overflow ... " >&6; }
f7291891 21293
90121a3e
AJ
21294 CFLAGS_SAVED="${CFLAGS:-}"
21295 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wstrict-overflow"
f7291891 21296
90121a3e 21297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
21298/* end confdefs.h. */
21299
21300
90121a3e
AJ
21301 #ifdef HAVE_STDDEF_H
21302 # include <stddef.h>
21303 #endif
21304 static int
21305 return_zero(void)
21306 {
21307 return 0;
21308 }
21309
f7291891
AJ
21310int
21311main ()
21312{
85f61964 21313
90121a3e
AJ
21314 int zero = return_zero();
21315
083f09b4
WP
21316 ;
21317 return 0;
21318}
f7291891 21319
083f09b4
WP
21320_ACEOF
21321if ac_fn_c_try_compile "$LINENO"; then :
f7291891 21322
90121a3e 21323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 21324$as_echo "yes" >&6; }
90121a3e 21325 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 21326
083f09b4 21327else
f7291891 21328
90121a3e 21329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 21330$as_echo "no" >&6; }
90121a3e
AJ
21331 ATHEME_TEST_CC_FLAGS_RESULT="no"
21332 CFLAGS="${CFLAGS_SAVED}"
f7291891 21333
083f09b4
WP
21334fi
21335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f7291891 21336
90121a3e 21337 unset CFLAGS_SAVED
f7291891
AJ
21338
21339
df10dcc4
AJ
21340fi
21341
21342
90121a3e
AJ
21343
21344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wstrict-prototypes " >&5
df10dcc4 21345$as_echo_n "checking for C compiler flag(s) -Wstrict-prototypes ... " >&6; }
f7291891 21346
90121a3e
AJ
21347 CFLAGS_SAVED="${CFLAGS:-}"
21348 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wstrict-prototypes"
f7291891 21349
90121a3e 21350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
21351/* end confdefs.h. */
21352
21353
90121a3e
AJ
21354 #ifdef HAVE_STDDEF_H
21355 # include <stddef.h>
21356 #endif
21357 static int
21358 return_zero(void)
21359 {
21360 return 0;
21361 }
21362
f7291891
AJ
21363int
21364main ()
21365{
21366
90121a3e
AJ
21367 int zero = return_zero();
21368
f7291891
AJ
21369 ;
21370 return 0;
21371}
21372
21373_ACEOF
21374if ac_fn_c_try_compile "$LINENO"; then :
21375
90121a3e 21376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 21377$as_echo "yes" >&6; }
90121a3e 21378 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 21379
083f09b4
WP
21380else
21381
90121a3e 21382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 21383$as_echo "no" >&6; }
90121a3e
AJ
21384 ATHEME_TEST_CC_FLAGS_RESULT="no"
21385 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
21386
21387fi
21388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21389
90121a3e 21390 unset CFLAGS_SAVED
f7291891
AJ
21391
21392
21393
90121a3e 21394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wstringop-overflow=4 " >&5
df10dcc4 21395$as_echo_n "checking for C compiler flag(s) -Wstringop-overflow=4 ... " >&6; }
f7291891 21396
90121a3e
AJ
21397 CFLAGS_SAVED="${CFLAGS:-}"
21398 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wstringop-overflow=4"
f7291891 21399
90121a3e 21400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
083f09b4
WP
21401/* end confdefs.h. */
21402
083f09b4 21403
90121a3e
AJ
21404 #ifdef HAVE_STDDEF_H
21405 # include <stddef.h>
21406 #endif
21407 static int
21408 return_zero(void)
21409 {
21410 return 0;
21411 }
21412
083f09b4
WP
21413int
21414main ()
21415{
21416
90121a3e
AJ
21417 int zero = return_zero();
21418
f7291891
AJ
21419 ;
21420 return 0;
21421}
21422
21423_ACEOF
21424if ac_fn_c_try_compile "$LINENO"; then :
21425
90121a3e 21426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 21427$as_echo "yes" >&6; }
90121a3e 21428 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 21429
f7291891
AJ
21430else
21431
90121a3e 21432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 21433$as_echo "no" >&6; }
90121a3e
AJ
21434 ATHEME_TEST_CC_FLAGS_RESULT="no"
21435 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
21436
21437fi
21438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21439
90121a3e 21440 unset CFLAGS_SAVED
f7291891
AJ
21441
21442
21443
90121a3e 21444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wstringop-truncation " >&5
df10dcc4 21445$as_echo_n "checking for C compiler flag(s) -Wstringop-truncation ... " >&6; }
a19ae377 21446
90121a3e
AJ
21447 CFLAGS_SAVED="${CFLAGS:-}"
21448 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wstringop-truncation"
f7291891 21449
90121a3e 21450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
21451/* end confdefs.h. */
21452
21453
90121a3e
AJ
21454 #ifdef HAVE_STDDEF_H
21455 # include <stddef.h>
21456 #endif
21457 static int
21458 return_zero(void)
21459 {
21460 return 0;
21461 }
21462
f7291891
AJ
21463int
21464main ()
21465{
21466
90121a3e
AJ
21467 int zero = return_zero();
21468
f7291891
AJ
21469 ;
21470 return 0;
21471}
21472
21473_ACEOF
21474if ac_fn_c_try_compile "$LINENO"; then :
21475
90121a3e 21476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 21477$as_echo "yes" >&6; }
90121a3e 21478 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 21479
f7291891
AJ
21480else
21481
90121a3e 21482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 21483$as_echo "no" >&6; }
90121a3e
AJ
21484 ATHEME_TEST_CC_FLAGS_RESULT="no"
21485 CFLAGS="${CFLAGS_SAVED}"
f7291891 21486
85f61964 21487fi
f7291891 21488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
85f61964 21489
90121a3e 21490 unset CFLAGS_SAVED
85f61964
WP
21491
21492
f7291891 21493
90121a3e 21494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wtrampolines " >&5
df10dcc4 21495$as_echo_n "checking for C compiler flag(s) -Wtrampolines ... " >&6; }
f7291891 21496
90121a3e
AJ
21497 CFLAGS_SAVED="${CFLAGS:-}"
21498 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wtrampolines"
f7291891 21499
90121a3e 21500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f7291891
AJ
21501/* end confdefs.h. */
21502
21503
90121a3e
AJ
21504 #ifdef HAVE_STDDEF_H
21505 # include <stddef.h>
21506 #endif
21507 static int
21508 return_zero(void)
21509 {
21510 return 0;
21511 }
21512
f7291891
AJ
21513int
21514main ()
21515{
21516
90121a3e
AJ
21517 int zero = return_zero();
21518
f7291891
AJ
21519 ;
21520 return 0;
21521}
21522
21523_ACEOF
21524if ac_fn_c_try_compile "$LINENO"; then :
21525
90121a3e 21526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 21527$as_echo "yes" >&6; }
90121a3e 21528 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 21529
083f09b4 21530else
85f61964 21531
90121a3e 21532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 21533$as_echo "no" >&6; }
90121a3e
AJ
21534 ATHEME_TEST_CC_FLAGS_RESULT="no"
21535 CFLAGS="${CFLAGS_SAVED}"
f7291891
AJ
21536
21537fi
21538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21539
90121a3e 21540 unset CFLAGS_SAVED
f7291891
AJ
21541
21542
21543
90121a3e 21544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wundef " >&5
df10dcc4 21545$as_echo_n "checking for C compiler flag(s) -Wundef ... " >&6; }
f7291891 21546
90121a3e
AJ
21547 CFLAGS_SAVED="${CFLAGS:-}"
21548 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wundef"
f7291891 21549
90121a3e 21550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
083f09b4 21551/* end confdefs.h. */
85f61964 21552
85f61964 21553
90121a3e
AJ
21554 #ifdef HAVE_STDDEF_H
21555 # include <stddef.h>
21556 #endif
21557 static int
21558 return_zero(void)
21559 {
21560 return 0;
21561 }
21562
083f09b4
WP
21563int
21564main ()
21565{
85f61964 21566
90121a3e
AJ
21567 int zero = return_zero();
21568
083f09b4
WP
21569 ;
21570 return 0;
21571}
f7291891 21572
083f09b4
WP
21573_ACEOF
21574if ac_fn_c_try_compile "$LINENO"; then :
f7291891 21575
90121a3e 21576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 21577$as_echo "yes" >&6; }
90121a3e 21578 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 21579
083f09b4 21580else
f7291891 21581
90121a3e 21582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 21583$as_echo "no" >&6; }
90121a3e
AJ
21584 ATHEME_TEST_CC_FLAGS_RESULT="no"
21585 CFLAGS="${CFLAGS_SAVED}"
f7291891 21586
083f09b4
WP
21587fi
21588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
85f61964 21589
90121a3e 21590 unset CFLAGS_SAVED
85f61964
WP
21591
21592
14967f86 21593
90121a3e 21594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wunsafe-loop-optimizations " >&5
df10dcc4 21595$as_echo_n "checking for C compiler flag(s) -Wunsafe-loop-optimizations ... " >&6; }
f7291891 21596
90121a3e
AJ
21597 CFLAGS_SAVED="${CFLAGS:-}"
21598 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wunsafe-loop-optimizations"
f7291891 21599
90121a3e 21600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
083f09b4 21601/* end confdefs.h. */
14967f86 21602
14967f86 21603
90121a3e
AJ
21604 #ifdef HAVE_STDDEF_H
21605 # include <stddef.h>
21606 #endif
21607 static int
21608 return_zero(void)
21609 {
21610 return 0;
21611 }
21612
083f09b4
WP
21613int
21614main ()
21615{
14967f86 21616
90121a3e
AJ
21617 int zero = return_zero();
21618
083f09b4
WP
21619 ;
21620 return 0;
21621}
f7291891 21622
083f09b4
WP
21623_ACEOF
21624if ac_fn_c_try_compile "$LINENO"; then :
f7291891 21625
90121a3e 21626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 21627$as_echo "yes" >&6; }
90121a3e 21628 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 21629
14967f86 21630else
f7291891 21631
90121a3e 21632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 21633$as_echo "no" >&6; }
90121a3e
AJ
21634 ATHEME_TEST_CC_FLAGS_RESULT="no"
21635 CFLAGS="${CFLAGS_SAVED}"
f7291891 21636
083f09b4
WP
21637fi
21638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
85f61964 21639
90121a3e 21640 unset CFLAGS_SAVED
083f09b4 21641
85f61964 21642
083f09b4 21643
90121a3e 21644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wunsuffixed-float-constants " >&5
df10dcc4 21645$as_echo_n "checking for C compiler flag(s) -Wunsuffixed-float-constants ... " >&6; }
f7291891 21646
90121a3e
AJ
21647 CFLAGS_SAVED="${CFLAGS:-}"
21648 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wunsuffixed-float-constants"
f7291891 21649
90121a3e 21650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85f61964
WP
21651/* end confdefs.h. */
21652
083f09b4 21653
90121a3e
AJ
21654 #ifdef HAVE_STDDEF_H
21655 # include <stddef.h>
21656 #endif
21657 static int
21658 return_zero(void)
21659 {
21660 return 0;
21661 }
21662
85f61964
WP
21663int
21664main ()
21665{
083f09b4 21666
90121a3e
AJ
21667 int zero = return_zero();
21668
85f61964
WP
21669 ;
21670 return 0;
21671}
f7291891 21672
85f61964 21673_ACEOF
083f09b4 21674if ac_fn_c_try_compile "$LINENO"; then :
f7291891 21675
90121a3e 21676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 21677$as_echo "yes" >&6; }
90121a3e 21678 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 21679
85f61964 21680else
f7291891 21681
90121a3e 21682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 21683$as_echo "no" >&6; }
90121a3e
AJ
21684 ATHEME_TEST_CC_FLAGS_RESULT="no"
21685 CFLAGS="${CFLAGS_SAVED}"
f7291891 21686
85f61964 21687fi
083f09b4 21688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
85f61964 21689
90121a3e 21690 unset CFLAGS_SAVED
85f61964 21691
85f61964 21692
a19ae377 21693
90121a3e 21694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wunused " >&5
df10dcc4 21695$as_echo_n "checking for C compiler flag(s) -Wunused ... " >&6; }
f7291891 21696
90121a3e
AJ
21697 CFLAGS_SAVED="${CFLAGS:-}"
21698 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wunused"
f7291891 21699
90121a3e 21700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
083f09b4 21701/* end confdefs.h. */
14967f86 21702
14967f86 21703
90121a3e
AJ
21704 #ifdef HAVE_STDDEF_H
21705 # include <stddef.h>
21706 #endif
21707 static int
21708 return_zero(void)
21709 {
21710 return 0;
21711 }
21712
083f09b4
WP
21713int
21714main ()
21715{
85f61964 21716
90121a3e
AJ
21717 int zero = return_zero();
21718
083f09b4
WP
21719 ;
21720 return 0;
21721}
f7291891 21722
14967f86 21723_ACEOF
083f09b4 21724if ac_fn_c_try_compile "$LINENO"; then :
f7291891 21725
90121a3e 21726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 21727$as_echo "yes" >&6; }
90121a3e 21728 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 21729
083f09b4 21730else
f7291891 21731
90121a3e 21732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 21733$as_echo "no" >&6; }
90121a3e
AJ
21734 ATHEME_TEST_CC_FLAGS_RESULT="no"
21735 CFLAGS="${CFLAGS_SAVED}"
f7291891 21736
083f09b4
WP
21737fi
21738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
85f61964 21739
90121a3e 21740 unset CFLAGS_SAVED
85f61964 21741
083f09b4 21742
083f09b4 21743
90121a3e 21744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wwrite-strings " >&5
df10dcc4 21745$as_echo_n "checking for C compiler flag(s) -Wwrite-strings ... " >&6; }
5d77e6b8 21746
90121a3e
AJ
21747 CFLAGS_SAVED="${CFLAGS:-}"
21748 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wwrite-strings"
5d77e6b8 21749
90121a3e 21750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5d77e6b8 21751/* end confdefs.h. */
85f61964 21752
083f09b4 21753
90121a3e
AJ
21754 #ifdef HAVE_STDDEF_H
21755 # include <stddef.h>
21756 #endif
21757 static int
21758 return_zero(void)
21759 {
21760 return 0;
21761 }
21762
85f61964
WP
21763int
21764main ()
21765{
083f09b4 21766
90121a3e
AJ
21767 int zero = return_zero();
21768
85f61964
WP
21769 ;
21770 return 0;
21771}
f7291891 21772
85f61964 21773_ACEOF
083f09b4 21774if ac_fn_c_try_compile "$LINENO"; then :
f7291891 21775
90121a3e 21776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 21777$as_echo "yes" >&6; }
90121a3e 21778 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 21779
85f61964 21780else
f7291891 21781
90121a3e 21782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 21783$as_echo "no" >&6; }
90121a3e
AJ
21784 ATHEME_TEST_CC_FLAGS_RESULT="no"
21785 CFLAGS="${CFLAGS_SAVED}"
f7291891 21786
14967f86 21787fi
083f09b4 21788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
85f61964 21789
90121a3e 21790 unset CFLAGS_SAVED
85f61964 21791
85f61964 21792
df10dcc4
AJ
21793fi
21794
21795
90121a3e
AJ
21796
21797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wno-conversion " >&5
df10dcc4 21798$as_echo_n "checking for C compiler flag(s) -Wno-conversion ... " >&6; }
a19ae377 21799
90121a3e
AJ
21800 CFLAGS_SAVED="${CFLAGS:-}"
21801 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wno-conversion"
a19ae377 21802
cad56349
AJ
21803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21804/* end confdefs.h. */
21805
21806
21807 #ifdef HAVE_STDDEF_H
21808 # include <stddef.h>
21809 #endif
21810 static int
21811 return_zero(void)
21812 {
21813 return 0;
21814 }
21815
21816int
21817main ()
21818{
21819
21820 int zero = return_zero();
21821
21822 ;
21823 return 0;
21824}
21825
21826_ACEOF
21827if ac_fn_c_try_compile "$LINENO"; then :
21828
21829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21830$as_echo "yes" >&6; }
21831 ATHEME_TEST_CC_FLAGS_RESULT="yes"
21832
21833else
21834
21835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21836$as_echo "no" >&6; }
21837 ATHEME_TEST_CC_FLAGS_RESULT="no"
21838 CFLAGS="${CFLAGS_SAVED}"
21839
21840fi
21841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21842
21843 unset CFLAGS_SAVED
21844
21845
21846
21847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wno-declaration-after-statement " >&5
21848$as_echo_n "checking for C compiler flag(s) -Wno-declaration-after-statement ... " >&6; }
21849
21850 CFLAGS_SAVED="${CFLAGS:-}"
21851 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wno-declaration-after-statement"
21852
90121a3e 21853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a19ae377
AJ
21854/* end confdefs.h. */
21855
21856
90121a3e
AJ
21857 #ifdef HAVE_STDDEF_H
21858 # include <stddef.h>
21859 #endif
21860 static int
21861 return_zero(void)
21862 {
21863 return 0;
21864 }
21865
a19ae377
AJ
21866int
21867main ()
21868{
21869
90121a3e
AJ
21870 int zero = return_zero();
21871
a19ae377
AJ
21872 ;
21873 return 0;
21874}
21875
21876_ACEOF
21877if ac_fn_c_try_compile "$LINENO"; then :
85f61964 21878
90121a3e 21879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a19ae377 21880$as_echo "yes" >&6; }
90121a3e 21881 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a19ae377
AJ
21882
21883else
21884
90121a3e 21885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a19ae377 21886$as_echo "no" >&6; }
90121a3e
AJ
21887 ATHEME_TEST_CC_FLAGS_RESULT="no"
21888 CFLAGS="${CFLAGS_SAVED}"
41e63e1f 21889
14967f86 21890fi
a19ae377 21891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14967f86 21892
90121a3e 21893 unset CFLAGS_SAVED
65863905
AJ
21894
21895
a19ae377 21896
90121a3e 21897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wno-disabled-macro-expansion " >&5
df10dcc4 21898$as_echo_n "checking for C compiler flag(s) -Wno-disabled-macro-expansion ... " >&6; }
a19ae377 21899
90121a3e
AJ
21900 CFLAGS_SAVED="${CFLAGS:-}"
21901 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wno-disabled-macro-expansion"
a19ae377 21902
90121a3e 21903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a19ae377
AJ
21904/* end confdefs.h. */
21905
21906
90121a3e
AJ
21907 #ifdef HAVE_STDDEF_H
21908 # include <stddef.h>
21909 #endif
21910 static int
21911 return_zero(void)
21912 {
21913 return 0;
21914 }
21915
a19ae377
AJ
21916int
21917main ()
21918{
21919
90121a3e
AJ
21920 int zero = return_zero();
21921
a19ae377
AJ
21922 ;
21923 return 0;
21924}
21925
21926_ACEOF
21927if ac_fn_c_try_compile "$LINENO"; then :
21928
90121a3e 21929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a19ae377 21930$as_echo "yes" >&6; }
90121a3e 21931 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a19ae377 21932
be144253 21933else
a19ae377 21934
90121a3e 21935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a19ae377 21936$as_echo "no" >&6; }
90121a3e
AJ
21937 ATHEME_TEST_CC_FLAGS_RESULT="no"
21938 CFLAGS="${CFLAGS_SAVED}"
a19ae377 21939
be144253 21940fi
a19ae377 21941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
be144253 21942
90121a3e 21943 unset CFLAGS_SAVED
be144253 21944
083f09b4 21945
a19ae377 21946
90121a3e 21947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wno-documentation-deprecated-sync " >&5
df10dcc4 21948$as_echo_n "checking for C compiler flag(s) -Wno-documentation-deprecated-sync ... " >&6; }
083f09b4 21949
90121a3e
AJ
21950 CFLAGS_SAVED="${CFLAGS:-}"
21951 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wno-documentation-deprecated-sync"
f7291891 21952
90121a3e 21953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14967f86 21954/* end confdefs.h. */
85f61964 21955
083f09b4 21956
90121a3e
AJ
21957 #ifdef HAVE_STDDEF_H
21958 # include <stddef.h>
21959 #endif
21960 static int
21961 return_zero(void)
21962 {
21963 return 0;
21964 }
21965
85f61964
WP
21966int
21967main ()
21968{
083f09b4 21969
90121a3e
AJ
21970 int zero = return_zero();
21971
85f61964
WP
21972 ;
21973 return 0;
21974}
f7291891 21975
85f61964 21976_ACEOF
083f09b4 21977if ac_fn_c_try_compile "$LINENO"; then :
f7291891 21978
90121a3e 21979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 21980$as_echo "yes" >&6; }
90121a3e 21981 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 21982
85f61964 21983else
f7291891 21984
90121a3e 21985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 21986$as_echo "no" >&6; }
90121a3e
AJ
21987 ATHEME_TEST_CC_FLAGS_RESULT="no"
21988 CFLAGS="${CFLAGS_SAVED}"
f7291891 21989
083f09b4
WP
21990fi
21991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
85f61964 21992
90121a3e 21993 unset CFLAGS_SAVED
85f61964 21994
85f61964 21995
85f61964 21996
90121a3e 21997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wno-documentation-unknown-command " >&5
df10dcc4 21998$as_echo_n "checking for C compiler flag(s) -Wno-documentation-unknown-command ... " >&6; }
f7291891 21999
90121a3e
AJ
22000 CFLAGS_SAVED="${CFLAGS:-}"
22001 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wno-documentation-unknown-command"
f7291891 22002
90121a3e 22003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
083f09b4 22004/* end confdefs.h. */
85f61964 22005
85f61964 22006
90121a3e
AJ
22007 #ifdef HAVE_STDDEF_H
22008 # include <stddef.h>
22009 #endif
22010 static int
22011 return_zero(void)
22012 {
22013 return 0;
22014 }
22015
083f09b4
WP
22016int
22017main ()
22018{
85f61964 22019
90121a3e
AJ
22020 int zero = return_zero();
22021
083f09b4
WP
22022 ;
22023 return 0;
22024}
f7291891 22025
083f09b4
WP
22026_ACEOF
22027if ac_fn_c_try_compile "$LINENO"; then :
f7291891 22028
90121a3e 22029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 22030$as_echo "yes" >&6; }
90121a3e 22031 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 22032
083f09b4 22033else
f7291891 22034
90121a3e 22035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 22036$as_echo "no" >&6; }
90121a3e
AJ
22037 ATHEME_TEST_CC_FLAGS_RESULT="no"
22038 CFLAGS="${CFLAGS_SAVED}"
f7291891 22039
083f09b4
WP
22040fi
22041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
85f61964 22042
90121a3e 22043 unset CFLAGS_SAVED
85f61964 22044
85f61964 22045
85f61964 22046
90121a3e 22047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wno-extra-semi-stmt " >&5
df10dcc4 22048$as_echo_n "checking for C compiler flag(s) -Wno-extra-semi-stmt ... " >&6; }
f7291891 22049
90121a3e
AJ
22050 CFLAGS_SAVED="${CFLAGS:-}"
22051 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wno-extra-semi-stmt"
f7291891 22052
90121a3e 22053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
083f09b4 22054/* end confdefs.h. */
85f61964 22055
85f61964 22056
90121a3e
AJ
22057 #ifdef HAVE_STDDEF_H
22058 # include <stddef.h>
22059 #endif
22060 static int
22061 return_zero(void)
22062 {
22063 return 0;
22064 }
22065
083f09b4
WP
22066int
22067main ()
22068{
22069
90121a3e
AJ
22070 int zero = return_zero();
22071
083f09b4
WP
22072 ;
22073 return 0;
22074}
f7291891 22075
083f09b4
WP
22076_ACEOF
22077if ac_fn_c_try_compile "$LINENO"; then :
f7291891 22078
90121a3e 22079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 22080$as_echo "yes" >&6; }
90121a3e 22081 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 22082
083f09b4 22083else
f7291891 22084
90121a3e 22085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 22086$as_echo "no" >&6; }
90121a3e
AJ
22087 ATHEME_TEST_CC_FLAGS_RESULT="no"
22088 CFLAGS="${CFLAGS_SAVED}"
f7291891 22089
083f09b4
WP
22090fi
22091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
85f61964 22092
90121a3e 22093 unset CFLAGS_SAVED
85f61964
WP
22094
22095
083f09b4 22096
90121a3e 22097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wno-format-pedantic " >&5
df10dcc4 22098$as_echo_n "checking for C compiler flag(s) -Wno-format-pedantic ... " >&6; }
a19ae377 22099
90121a3e
AJ
22100 CFLAGS_SAVED="${CFLAGS:-}"
22101 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wno-format-pedantic"
a19ae377 22102
90121a3e 22103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a19ae377
AJ
22104/* end confdefs.h. */
22105
22106
90121a3e
AJ
22107 #ifdef HAVE_STDDEF_H
22108 # include <stddef.h>
22109 #endif
22110 static int
22111 return_zero(void)
22112 {
22113 return 0;
22114 }
22115
a19ae377
AJ
22116int
22117main ()
22118{
22119
90121a3e
AJ
22120 int zero = return_zero();
22121
a19ae377
AJ
22122 ;
22123 return 0;
22124}
22125
22126_ACEOF
22127if ac_fn_c_try_compile "$LINENO"; then :
22128
90121a3e 22129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a19ae377 22130$as_echo "yes" >&6; }
90121a3e 22131 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a19ae377
AJ
22132
22133else
22134
90121a3e 22135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a19ae377 22136$as_echo "no" >&6; }
90121a3e
AJ
22137 ATHEME_TEST_CC_FLAGS_RESULT="no"
22138 CFLAGS="${CFLAGS_SAVED}"
a19ae377
AJ
22139
22140fi
22141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22142
90121a3e 22143 unset CFLAGS_SAVED
a19ae377
AJ
22144
22145
22146
90121a3e 22147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wno-format-zero-length " >&5
8f1afa5d
AJ
22148$as_echo_n "checking for C compiler flag(s) -Wno-format-zero-length ... " >&6; }
22149
90121a3e
AJ
22150 CFLAGS_SAVED="${CFLAGS:-}"
22151 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wno-format-zero-length"
8f1afa5d 22152
90121a3e 22153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8f1afa5d
AJ
22154/* end confdefs.h. */
22155
22156
90121a3e
AJ
22157 #ifdef HAVE_STDDEF_H
22158 # include <stddef.h>
22159 #endif
22160 static int
22161 return_zero(void)
22162 {
22163 return 0;
22164 }
22165
8f1afa5d
AJ
22166int
22167main ()
22168{
22169
90121a3e
AJ
22170 int zero = return_zero();
22171
8f1afa5d
AJ
22172 ;
22173 return 0;
22174}
22175
22176_ACEOF
22177if ac_fn_c_try_compile "$LINENO"; then :
22178
90121a3e 22179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8f1afa5d 22180$as_echo "yes" >&6; }
90121a3e 22181 ATHEME_TEST_CC_FLAGS_RESULT="yes"
8f1afa5d
AJ
22182
22183else
22184
90121a3e 22185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8f1afa5d 22186$as_echo "no" >&6; }
90121a3e
AJ
22187 ATHEME_TEST_CC_FLAGS_RESULT="no"
22188 CFLAGS="${CFLAGS_SAVED}"
8f1afa5d
AJ
22189
22190fi
22191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22192
90121a3e 22193 unset CFLAGS_SAVED
8f1afa5d
AJ
22194
22195
22196
90121a3e 22197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wno-packed " >&5
df10dcc4 22198$as_echo_n "checking for C compiler flag(s) -Wno-packed ... " >&6; }
5d77e6b8 22199
90121a3e
AJ
22200 CFLAGS_SAVED="${CFLAGS:-}"
22201 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wno-packed"
f7291891 22202
90121a3e 22203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85f61964
WP
22204/* end confdefs.h. */
22205
083f09b4 22206
90121a3e
AJ
22207 #ifdef HAVE_STDDEF_H
22208 # include <stddef.h>
22209 #endif
22210 static int
22211 return_zero(void)
22212 {
22213 return 0;
22214 }
22215
85f61964
WP
22216int
22217main ()
22218{
083f09b4 22219
90121a3e
AJ
22220 int zero = return_zero();
22221
85f61964
WP
22222 ;
22223 return 0;
22224}
f7291891 22225
85f61964 22226_ACEOF
083f09b4 22227if ac_fn_c_try_compile "$LINENO"; then :
f7291891 22228
90121a3e 22229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
a7b9a285 22230$as_echo "yes" >&6; }
90121a3e 22231 ATHEME_TEST_CC_FLAGS_RESULT="yes"
a7b9a285 22232
85f61964 22233else
f7291891 22234
90121a3e 22235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a7b9a285 22236$as_echo "no" >&6; }
90121a3e
AJ
22237 ATHEME_TEST_CC_FLAGS_RESULT="no"
22238 CFLAGS="${CFLAGS_SAVED}"
f7291891 22239
14967f86 22240fi
083f09b4 22241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
85f61964 22242
90121a3e 22243 unset CFLAGS_SAVED
f7291891 22244
a19ae377 22245
fbffd891 22246
90121a3e 22247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wno-padded " >&5
df10dcc4 22248$as_echo_n "checking for C compiler flag(s) -Wno-padded ... " >&6; }
fbffd891 22249
90121a3e
AJ
22250 CFLAGS_SAVED="${CFLAGS:-}"
22251 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wno-padded"
fbffd891 22252
90121a3e 22253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
fbffd891
AJ
22254/* end confdefs.h. */
22255
22256
90121a3e
AJ
22257 #ifdef HAVE_STDDEF_H
22258 # include <stddef.h>
22259 #endif
22260 static int
22261 return_zero(void)
22262 {
22263 return 0;
22264 }
22265
fbffd891
AJ
22266int
22267main ()
22268{
22269
90121a3e
AJ
22270 int zero = return_zero();
22271
fbffd891
AJ
22272 ;
22273 return 0;
22274}
22275
22276_ACEOF
22277if ac_fn_c_try_compile "$LINENO"; then :
22278
90121a3e 22279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
fbffd891 22280$as_echo "yes" >&6; }
90121a3e 22281 ATHEME_TEST_CC_FLAGS_RESULT="yes"
fbffd891
AJ
22282
22283else
22284
90121a3e 22285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
fbffd891 22286$as_echo "no" >&6; }
90121a3e
AJ
22287 ATHEME_TEST_CC_FLAGS_RESULT="no"
22288 CFLAGS="${CFLAGS_SAVED}"
fbffd891
AJ
22289
22290fi
22291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22292
90121a3e 22293 unset CFLAGS_SAVED
fbffd891 22294
a19ae377 22295
fbffd891 22296
90121a3e 22297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wno-pedantic " >&5
df10dcc4 22298$as_echo_n "checking for C compiler flag(s) -Wno-pedantic ... " >&6; }
dc97ef3b 22299
90121a3e
AJ
22300 CFLAGS_SAVED="${CFLAGS:-}"
22301 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wno-pedantic"
42b7ee21 22302
90121a3e 22303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a19ae377 22304/* end confdefs.h. */
8197c480 22305
8197c480 22306
90121a3e
AJ
22307 #ifdef HAVE_STDDEF_H
22308 # include <stddef.h>
22309 #endif
22310 static int
22311 return_zero(void)
22312 {
22313 return 0;
22314 }
22315
a19ae377
AJ
22316int
22317main ()
22318{
8197c480 22319
90121a3e
AJ
22320 int zero = return_zero();
22321
a19ae377
AJ
22322 ;
22323 return 0;
22324}
8197c480 22325
a19ae377
AJ
22326_ACEOF
22327if ac_fn_c_try_compile "$LINENO"; then :
8197c480 22328
90121a3e 22329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
f7c1979e 22330$as_echo "yes" >&6; }
90121a3e 22331 ATHEME_TEST_CC_FLAGS_RESULT="yes"
42b7ee21 22332
f7c1979e 22333else
dc97ef3b 22334
90121a3e 22335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
a19ae377 22336$as_echo "no" >&6; }
90121a3e
AJ
22337 ATHEME_TEST_CC_FLAGS_RESULT="no"
22338 CFLAGS="${CFLAGS_SAVED}"
83784128
AJ
22339
22340fi
a19ae377 22341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
83784128 22342
90121a3e 22343 unset CFLAGS_SAVED
83784128
AJ
22344
22345
5d77e6b8 22346
90121a3e 22347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wno-reserved-id-macro " >&5
df10dcc4 22348$as_echo_n "checking for C compiler flag(s) -Wno-reserved-id-macro ... " >&6; }
5d77e6b8 22349
90121a3e
AJ
22350 CFLAGS_SAVED="${CFLAGS:-}"
22351 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wno-reserved-id-macro"
5d77e6b8 22352
90121a3e 22353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5d77e6b8
AJ
22354/* end confdefs.h. */
22355
22356
90121a3e
AJ
22357 #ifdef HAVE_STDDEF_H
22358 # include <stddef.h>
22359 #endif
22360 static int
22361 return_zero(void)
22362 {
22363 return 0;
22364 }
22365
5d77e6b8
AJ
22366int
22367main ()
22368{
22369
90121a3e
AJ
22370 int zero = return_zero();
22371
5d77e6b8
AJ
22372 ;
22373 return 0;
22374}
22375
aa0f4a91
AJ
22376_ACEOF
22377if ac_fn_c_try_compile "$LINENO"; then :
22378
22379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22380$as_echo "yes" >&6; }
22381 ATHEME_TEST_CC_FLAGS_RESULT="yes"
22382
22383else
22384
22385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22386$as_echo "no" >&6; }
22387 ATHEME_TEST_CC_FLAGS_RESULT="no"
22388 CFLAGS="${CFLAGS_SAVED}"
22389
22390fi
22391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22392
22393 unset CFLAGS_SAVED
22394
22395
22396
22397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wno-reserved-identifier " >&5
22398$as_echo_n "checking for C compiler flag(s) -Wno-reserved-identifier ... " >&6; }
22399
22400 CFLAGS_SAVED="${CFLAGS:-}"
22401 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wno-reserved-identifier"
22402
22403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22404/* end confdefs.h. */
22405
22406
22407 #ifdef HAVE_STDDEF_H
22408 # include <stddef.h>
22409 #endif
22410 static int
22411 return_zero(void)
22412 {
22413 return 0;
22414 }
22415
22416int
22417main ()
22418{
22419
22420 int zero = return_zero();
22421
22422 ;
22423 return 0;
22424}
22425
5d77e6b8
AJ
22426_ACEOF
22427if ac_fn_c_try_compile "$LINENO"; then :
22428
90121a3e 22429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5d77e6b8 22430$as_echo "yes" >&6; }
90121a3e 22431 ATHEME_TEST_CC_FLAGS_RESULT="yes"
5d77e6b8
AJ
22432
22433else
22434
90121a3e 22435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5d77e6b8 22436$as_echo "no" >&6; }
90121a3e
AJ
22437 ATHEME_TEST_CC_FLAGS_RESULT="no"
22438 CFLAGS="${CFLAGS_SAVED}"
5d77e6b8
AJ
22439
22440fi
22441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22442
90121a3e 22443 unset CFLAGS_SAVED
5d77e6b8
AJ
22444
22445
22446
90121a3e 22447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wno-sign-conversion " >&5
5d77e6b8
AJ
22448$as_echo_n "checking for C compiler flag(s) -Wno-sign-conversion ... " >&6; }
22449
90121a3e
AJ
22450 CFLAGS_SAVED="${CFLAGS:-}"
22451 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wno-sign-conversion"
5d77e6b8 22452
90121a3e 22453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5d77e6b8
AJ
22454/* end confdefs.h. */
22455
22456
90121a3e
AJ
22457 #ifdef HAVE_STDDEF_H
22458 # include <stddef.h>
22459 #endif
22460 static int
22461 return_zero(void)
22462 {
22463 return 0;
22464 }
22465
5d77e6b8
AJ
22466int
22467main ()
22468{
22469
90121a3e
AJ
22470 int zero = return_zero();
22471
5d77e6b8
AJ
22472 ;
22473 return 0;
22474}
22475
22476_ACEOF
22477if ac_fn_c_try_compile "$LINENO"; then :
22478
90121a3e 22479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5d77e6b8 22480$as_echo "yes" >&6; }
90121a3e 22481 ATHEME_TEST_CC_FLAGS_RESULT="yes"
5d77e6b8
AJ
22482
22483else
22484
90121a3e 22485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5d77e6b8 22486$as_echo "no" >&6; }
90121a3e
AJ
22487 ATHEME_TEST_CC_FLAGS_RESULT="no"
22488 CFLAGS="${CFLAGS_SAVED}"
5d77e6b8
AJ
22489
22490fi
22491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22492
90121a3e 22493 unset CFLAGS_SAVED
5d77e6b8
AJ
22494
22495
22496
90121a3e 22497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wno-unused-parameter " >&5
5d77e6b8
AJ
22498$as_echo_n "checking for C compiler flag(s) -Wno-unused-parameter ... " >&6; }
22499
90121a3e
AJ
22500 CFLAGS_SAVED="${CFLAGS:-}"
22501 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wno-unused-parameter"
5d77e6b8 22502
90121a3e 22503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5d77e6b8
AJ
22504/* end confdefs.h. */
22505
22506
90121a3e
AJ
22507 #ifdef HAVE_STDDEF_H
22508 # include <stddef.h>
22509 #endif
22510 static int
22511 return_zero(void)
22512 {
22513 return 0;
22514 }
22515
5d77e6b8
AJ
22516int
22517main ()
22518{
22519
90121a3e
AJ
22520 int zero = return_zero();
22521
5d77e6b8
AJ
22522 ;
22523 return 0;
22524}
22525
22526_ACEOF
22527if ac_fn_c_try_compile "$LINENO"; then :
22528
90121a3e 22529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5d77e6b8 22530$as_echo "yes" >&6; }
90121a3e 22531 ATHEME_TEST_CC_FLAGS_RESULT="yes"
5d77e6b8
AJ
22532
22533else
22534
90121a3e 22535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5d77e6b8 22536$as_echo "no" >&6; }
90121a3e
AJ
22537 ATHEME_TEST_CC_FLAGS_RESULT="no"
22538 CFLAGS="${CFLAGS_SAVED}"
5d77e6b8
AJ
22539
22540fi
22541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22542
90121a3e 22543 unset CFLAGS_SAVED
5d77e6b8
AJ
22544
22545
22546
90121a3e 22547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wno-unused-variable " >&5
5d77e6b8
AJ
22548$as_echo_n "checking for C compiler flag(s) -Wno-unused-variable ... " >&6; }
22549
90121a3e
AJ
22550 CFLAGS_SAVED="${CFLAGS:-}"
22551 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wno-unused-variable"
5d77e6b8 22552
90121a3e 22553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5d77e6b8
AJ
22554/* end confdefs.h. */
22555
22556
90121a3e
AJ
22557 #ifdef HAVE_STDDEF_H
22558 # include <stddef.h>
22559 #endif
22560 static int
22561 return_zero(void)
22562 {
22563 return 0;
22564 }
22565
b9f8fd0c
AJ
22566int
22567main ()
22568{
22569
90121a3e
AJ
22570 int zero = return_zero();
22571
b9f8fd0c
AJ
22572 ;
22573 return 0;
22574}
22575
22576_ACEOF
22577if ac_fn_c_try_compile "$LINENO"; then :
22578
90121a3e 22579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
b9f8fd0c 22580$as_echo "yes" >&6; }
90121a3e 22581 ATHEME_TEST_CC_FLAGS_RESULT="yes"
b9f8fd0c
AJ
22582
22583else
22584
90121a3e 22585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
b9f8fd0c 22586$as_echo "no" >&6; }
90121a3e
AJ
22587 ATHEME_TEST_CC_FLAGS_RESULT="no"
22588 CFLAGS="${CFLAGS_SAVED}"
b9f8fd0c
AJ
22589
22590fi
22591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22592
90121a3e 22593 unset CFLAGS_SAVED
b9f8fd0c
AJ
22594
22595
22596
90121a3e 22597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag(s) -Wno-vla " >&5
b9f8fd0c
AJ
22598$as_echo_n "checking for C compiler flag(s) -Wno-vla ... " >&6; }
22599
90121a3e
AJ
22600 CFLAGS_SAVED="${CFLAGS:-}"
22601 CFLAGS="${CFLAGS:-}${CFLAGS:+ }-Wno-vla"
b9f8fd0c 22602
90121a3e 22603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b9f8fd0c
AJ
22604/* end confdefs.h. */
22605
22606
90121a3e
AJ
22607 #ifdef HAVE_STDDEF_H
22608 # include <stddef.h>
22609 #endif
22610 static int
22611 return_zero(void)
22612 {
22613 return 0;
22614 }
22615
5d77e6b8
AJ
22616int
22617main ()
22618{
22619
90121a3e
AJ
22620 int zero = return_zero();
22621
5d77e6b8
AJ
22622 ;
22623 return 0;
22624}
22625
22626_ACEOF
22627if ac_fn_c_try_compile "$LINENO"; then :
22628
90121a3e 22629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5d77e6b8 22630$as_echo "yes" >&6; }
90121a3e 22631 ATHEME_TEST_CC_FLAGS_RESULT="yes"
5d77e6b8
AJ
22632
22633else
22634
90121a3e 22635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5d77e6b8 22636$as_echo "no" >&6; }
90121a3e
AJ
22637 ATHEME_TEST_CC_FLAGS_RESULT="no"
22638 CFLAGS="${CFLAGS_SAVED}"
5d77e6b8
AJ
22639
22640fi
22641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22642
90121a3e 22643 unset CFLAGS_SAVED
5d77e6b8
AJ
22644
22645
f54ed0d4
AJ
22646 ;; #(
22647 *) :
90121a3e 22648
f54ed0d4
AJ
22649 as_fn_error $? "invalid option for --enable-warnings" "$LINENO" 5
22650 ;;
22651esac
5d77e6b8
AJ
22652
22653
c6167e86 22654# Handle enabling and configuration of submodules
f754b1b2
AJ
22655
22656
5d77e6b8 22657
5d77e6b8 22658
c6167e86 22659 if test "${LIBMOWGLI_SOURCE}" = "Internal"; then :
5d77e6b8 22660
5d77e6b8 22661
c6167e86 22662 SUBMODULE_LIBMOWGLI=libmowgli-2
5d77e6b8 22663
5a3259b2 22664
c6167e86
AJ
22665 # Run ./configure in the libmowgli submodule directory but without OpenSSL support
22666 # Atheme does not use the OpenSSL VIO interface in Mowgli and this avoids an unnecessary -lssl
22667 # The arguments to remove (last macro argument) must be on one line
2cbf22d6
AJ
22668
22669
22670
22671 # Various preliminary checks.
22672
22673
22674
22675
22676
22677 ax_dir="libmowgli-2"
22678
22679 # Do not complain, so a configure script can configure whichever parts of a
22680 # large source tree are present.
22681 if test -d "$srcdir/$ax_dir"; then
22682 ac_builddir=.
22683
22684case "$ax_dir" in
22685.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
22686*)
22687 ac_dir_suffix=/`$as_echo "$ax_dir" | sed 's|^\.[\\/]||'`
22688 # A ".." for each directory in $ac_dir_suffix.
22689 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
22690 case $ac_top_builddir_sub in
22691 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
22692 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
22693 esac ;;
22694esac
22695ac_abs_top_builddir=$ac_pwd
22696ac_abs_builddir=$ac_pwd$ac_dir_suffix
22697# for backward compatibility:
22698ac_top_builddir=$ac_top_build_prefix
22699
22700case $srcdir in
22701 .) # We are building in place.
22702 ac_srcdir=.
22703 ac_top_srcdir=$ac_top_builddir_sub
22704 ac_abs_top_srcdir=$ac_pwd ;;
22705 [\\/]* | ?:[\\/]* ) # Absolute name.
22706 ac_srcdir=$srcdir$ac_dir_suffix;
22707 ac_top_srcdir=$srcdir
22708 ac_abs_top_srcdir=$srcdir ;;
22709 *) # Relative name.
22710 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
22711 ac_top_srcdir=$ac_top_build_prefix$srcdir
22712 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
22713esac
22714ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
22715
22716 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
22717 # so they do not pile up.
22718 ax_args=
22719 ax_prev=
22720 eval "set x $ac_configure_args"
22721 shift
22722 for ax_arg; do
22723 if test -n "$ax_prev"; then
22724 ax_prev=
22725 continue
22726 fi
22727 case $ax_arg in
22728 -cache-file | --cache-file | --cache-fil | --cache-fi | --cache-f \
22729 | --cache- | --cache | --cach | --cac | --ca | --c)
22730 ax_prev=cache_file ;;
22731 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
22732 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
22733 | --c=*)
22734 ;;
22735 --config-cache | -C)
22736 ;;
22737 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
22738 ax_prev=srcdir ;;
22739 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
22740 ;;
22741 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
22742 ax_prev=prefix ;;
22743 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* \
22744 | --p=*)
22745 ;;
22746 --disable-option-checking)
22747 ;;
22748 *) case $ax_arg in
22749 *\'*) ax_arg=$($as_echo "$ax_arg" | sed "s/'/'\\\\\\\\''/g");;
22750 esac
22751 as_fn_append ax_args " '$ax_arg'" ;;
22752 esac
22753 done
22754 # Always prepend --disable-option-checking to silence warnings, since
22755 # different subdirs can have different --enable and --with options.
22756 ax_args="--disable-option-checking $ax_args"
22757 # Options that must be added as they are provided.
22758 as_fn_append ax_args " '--without-openssl'"
c6167e86
AJ
22759 as_fn_append ax_args " 'CC="\${CC}"'"
22760 as_fn_append ax_args " 'LD="\${LD}"'"
22761 as_fn_append ax_args " 'CFLAGS="\${CFLAGS}"'"
22762 as_fn_append ax_args " 'CPPFLAGS="\${CPPFLAGS}"'"
22763 as_fn_append ax_args " 'LDFLAGS="\${LDFLAGS}"'"
22764 as_fn_append ax_args " 'LIBS="\${LIBS}"
22765 '"
2cbf22d6
AJ
22766
22767 # New options that may need to be merged with existing options.
22768 ax_candidate=""
22769 ax_candidate_flag="${ax_candidate%%=*}"
22770 ax_candidate_content="${ax_candidate#*=}"
22771 if test "x$ax_candidate" != "x" -a "x$ax_candidate_flag" != "x"; then
22772 if echo "$ax_args" | grep -- "${ax_candidate_flag}=" >/dev/null 2>&1; then
22773 ax_args=$(echo $ax_args | sed "s,\(${ax_candidate_flag}=[^']*\),\1 ${ax_candidate_content},")
22774 else
22775 as_fn_append ax_args " ''"
22776 fi
22777 fi
22778
22779 # New options that must replace existing options.
22780 ax_candidate=""
22781 ax_candidate_flag="${ax_candidate%%=*}"
22782 ax_candidate_content="${ax_candidate#*=}"
22783 if test "x$ax_candidate" != "x" -a "x$ax_candidate_flag" != "x"; then
22784 if echo "$ax_args" | grep -- "${ax_candidate_flag}=" >/dev/null 2>&1; then
22785 ax_args=$(echo $ax_args | sed "s,${ax_candidate_flag}=[^']*,${ax_candidate},")
22786 else
22787 as_fn_append ax_args " ''"
22788 fi
22789 fi
22790
22791 # Options that must be removed.
22792 ax_args=$(echo $ax_args | sed "s,'--with-openssl',,")
22793 ax_args=$(echo $ax_args | sed "s,'--with-openssl=auto',,")
22794 ax_args=$(echo $ax_args | sed "s,'--with-openssl=yes',,")
22795
22796 as_fn_append ax_args " '--srcdir=$ac_srcdir'"
22797
22798 # Add the subdirectory to the list of target subdirectories.
22799 ax_subconfigures="$ax_subconfigures $ax_dir"
22800 # Save the argument list for this subdirectory.
22801 ax_var=$(printf "$ax_dir" | tr -c "0-9a-zA-Z_" "_")
22802 eval "ax_sub_configure_args_$ax_var=\"$ax_args\""
22803 eval "ax_sub_configure_$ax_var=\"yes\""
22804 else
22805 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find source tree for $ax_dir" >&5
22806$as_echo "$as_me: WARNING: could not find source tree for $ax_dir" >&2;}
22807 fi
22808
22809
22810
22811
22812
22813fi
22814
c6167e86
AJ
22815 if test "${CONTRIB_MODULES}" = "Yes"; then :
22816
22817
22818 SUBMODULE_CONTRIB=contrib
22819
22820
08817d8c
AJ
22821
22822
22823 # Various preliminary checks.
22824
22825
22826
22827
22828
22829 ax_dir="modules/contrib"
22830
22831 # Do not complain, so a configure script can configure whichever parts of a
22832 # large source tree are present.
22833 if test -d "$srcdir/$ax_dir"; then
22834 ac_builddir=.
22835
22836case "$ax_dir" in
22837.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
22838*)
22839 ac_dir_suffix=/`$as_echo "$ax_dir" | sed 's|^\.[\\/]||'`
22840 # A ".." for each directory in $ac_dir_suffix.
22841 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
22842 case $ac_top_builddir_sub in
22843 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
22844 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
22845 esac ;;
22846esac
22847ac_abs_top_builddir=$ac_pwd
22848ac_abs_builddir=$ac_pwd$ac_dir_suffix
22849# for backward compatibility:
22850ac_top_builddir=$ac_top_build_prefix
22851
22852case $srcdir in
22853 .) # We are building in place.
22854 ac_srcdir=.
22855 ac_top_srcdir=$ac_top_builddir_sub
22856 ac_abs_top_srcdir=$ac_pwd ;;
22857 [\\/]* | ?:[\\/]* ) # Absolute name.
22858 ac_srcdir=$srcdir$ac_dir_suffix;
22859 ac_top_srcdir=$srcdir
22860 ac_abs_top_srcdir=$srcdir ;;
22861 *) # Relative name.
22862 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
22863 ac_top_srcdir=$ac_top_build_prefix$srcdir
22864 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
22865esac
22866ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
22867
22868 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
22869 # so they do not pile up.
22870 ax_args=
22871 ax_prev=
22872 eval "set x $ac_configure_args"
22873 shift
22874 for ax_arg; do
22875 if test -n "$ax_prev"; then
22876 ax_prev=
22877 continue
22878 fi
22879 case $ax_arg in
22880 -cache-file | --cache-file | --cache-fil | --cache-fi | --cache-f \
22881 | --cache- | --cache | --cach | --cac | --ca | --c)
22882 ax_prev=cache_file ;;
22883 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
22884 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
22885 | --c=*)
22886 ;;
22887 --config-cache | -C)
22888 ;;
22889 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
22890 ax_prev=srcdir ;;
22891 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
22892 ;;
22893 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
22894 ax_prev=prefix ;;
22895 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* \
22896 | --p=*)
22897 ;;
22898 --disable-option-checking)
22899 ;;
22900 *) case $ax_arg in
22901 *\'*) ax_arg=$($as_echo "$ax_arg" | sed "s/'/'\\\\\\\\''/g");;
22902 esac
22903 as_fn_append ax_args " '$ax_arg'" ;;
22904 esac
22905 done
22906 # Always prepend --disable-option-checking to silence warnings, since
22907 # different subdirs can have different --enable and --with options.
22908 ax_args="--disable-option-checking $ax_args"
22909 # Options that must be added as they are provided.
22910 as_fn_append ax_args " 'CC="\${CC}"'"
22911 as_fn_append ax_args " 'LD="\${LD}"'"
22912 as_fn_append ax_args " 'CFLAGS="\${CFLAGS}"'"
22913 as_fn_append ax_args " 'CPPFLAGS="\${CPPFLAGS}"'"
22914 as_fn_append ax_args " 'LDFLAGS="\${LDFLAGS}"'"
22915 as_fn_append ax_args " 'LIBS="\${LIBS}"
22916 '"
22917
22918 # New options that may need to be merged with existing options.
22919 ax_candidate=""
22920 ax_candidate_flag="${ax_candidate%%=*}"
22921 ax_candidate_content="${ax_candidate#*=}"
22922 if test "x$ax_candidate" != "x" -a "x$ax_candidate_flag" != "x"; then
22923 if echo "$ax_args" | grep -- "${ax_candidate_flag}=" >/dev/null 2>&1; then
22924 ax_args=$(echo $ax_args | sed "s,\(${ax_candidate_flag}=[^']*\),\1 ${ax_candidate_content},")
22925 else
22926 as_fn_append ax_args " ''"
22927 fi
22928 fi
22929
22930 # New options that must replace existing options.
22931 ax_candidate=""
22932 ax_candidate_flag="${ax_candidate%%=*}"
22933 ax_candidate_content="${ax_candidate#*=}"
22934 if test "x$ax_candidate" != "x" -a "x$ax_candidate_flag" != "x"; then
22935 if echo "$ax_args" | grep -- "${ax_candidate_flag}=" >/dev/null 2>&1; then
22936 ax_args=$(echo $ax_args | sed "s,${ax_candidate_flag}=[^']*,${ax_candidate},")
22937 else
22938 as_fn_append ax_args " ''"
22939 fi
22940 fi
22941
22942 # Options that must be removed.
22943 ax_args=$(echo $ax_args | sed "s,'',,")
22944
22945 as_fn_append ax_args " '--srcdir=$ac_srcdir'"
22946
22947 # Add the subdirectory to the list of target subdirectories.
22948 ax_subconfigures="$ax_subconfigures $ax_dir"
22949 # Save the argument list for this subdirectory.
22950 ax_var=$(printf "$ax_dir" | tr -c "0-9a-zA-Z_" "_")
22951 eval "ax_sub_configure_args_$ax_var=\"$ax_args\""
22952 eval "ax_sub_configure_$ax_var=\"yes\""
22953 else
22954 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find source tree for $ax_dir" >&5
22955$as_echo "$as_me: WARNING: could not find source tree for $ax_dir" >&2;}
22956 fi
22957
22958
22959
22960
22961
c6167e86
AJ
22962fi
22963
22964
22965# Now add libmowgli and libpcre to CFLAGS and LIBS because the whole codebase uses them
22966if test "x${LIBMOWGLI_CFLAGS}" != "x"; then :
22967 CFLAGS="${LIBMOWGLI_CFLAGS} ${CFLAGS}"
22968fi
22969if test "x${LIBMOWGLI_LIBS}" != "x"; then :
22970 LIBS="${LIBMOWGLI_LIBS} ${LIBS}"
22971fi
22972if test "x${LIBPCRE_CFLAGS}" != "x"; then :
22973 CFLAGS="${LIBPCRE_CFLAGS} ${CFLAGS}"
22974fi
22975if test "x${LIBPCRE_LIBS}" != "x"; then :
22976 LIBS="${LIBPCRE_LIBS} ${LIBS}"
22977fi
22978
22979
22980
85f61964
WP
22981cat >confcache <<\_ACEOF
22982# This file is a shell script that caches the results of configure
22983# tests run on this system so they can be shared between configure
22984# scripts and configure runs, see configure's option --config-cache.
22985# It is not useful on other systems. If it contains results you don't
22986# want to keep, you may remove or edit it.
22987#
22988# config.status only pays attention to the cache file if you give it
22989# the --recheck option to rerun configure.
22990#
22991# `ac_cv_env_foo' variables (set or unset) will be overridden when
22992# loading this file, other *unset* `ac_cv_foo' will be assigned the
22993# following values.
22994
22995_ACEOF
22996
22997# The following way of writing the cache mishandles newlines in values,
22998# but we know of no workaround that is simple, portable, and efficient.
22999# So, we kill variables containing newlines.
23000# Ultrix sh set writes to stderr and can't be redirected directly,
23001# and sets the high bit in the cache file unless we assign to the vars.
23002(
23003 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23004 eval ac_val=\$$ac_var
23005 case $ac_val in #(
23006 *${as_nl}*)
23007 case $ac_var in #(
648c9700 23008 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
105203ad 23009$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
85f61964
WP
23010 esac
23011 case $ac_var in #(
23012 _ | IFS | as_nl) ;; #(
07c7b319 23013 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
648c9700 23014 *) { eval $ac_var=; unset $ac_var;} ;;
85f61964
WP
23015 esac ;;
23016 esac
23017 done
23018
23019 (set) 2>&1 |
23020 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23021 *${as_nl}ac_space=\ *)
648c9700
WP
23022 # `set' does not quote correctly, so add quotes: double-quote
23023 # substitution turns \\\\ into \\, and sed turns \\ into \.
85f61964
WP
23024 sed -n \
23025 "s/'/'\\\\''/g;
23026 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23027 ;; #(
23028 *)
23029 # `set' quotes correctly as required by POSIX, so do not add quotes.
23030 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
23031 ;;
23032 esac |
23033 sort
23034) |
23035 sed '
23036 /^ac_cv_env_/b end
23037 t clear
23038 :clear
23039 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23040 t end
23041 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23042 :end' >>confcache
23043if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23044 if test -w "$cache_file"; then
0ab5d73e 23045 if test "x$cache_file" != "x/dev/null"; then
648c9700 23046 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
07c7b319 23047$as_echo "$as_me: updating cache $cache_file" >&6;}
0ab5d73e
JH
23048 if test ! -f "$cache_file" || test -h "$cache_file"; then
23049 cat confcache >"$cache_file"
23050 else
23051 case $cache_file in #(
23052 */* | ?:*)
23053 mv -f confcache "$cache_file"$$ &&
23054 mv -f "$cache_file"$$ "$cache_file" ;; #(
23055 *)
23056 mv -f confcache "$cache_file" ;;
23057 esac
23058 fi
23059 fi
85f61964 23060 else
648c9700 23061 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
07c7b319 23062$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
85f61964
WP
23063 fi
23064fi
23065rm -f confcache
23066
23067test "x$prefix" = xNONE && prefix=$ac_default_prefix
23068# Let make expand exec_prefix.
23069test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23070
23071DEFS=-DHAVE_CONFIG_H
23072
23073ac_libobjs=
23074ac_ltlibobjs=
0ab5d73e 23075U=
85f61964
WP
23076for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23077 # 1. Remove the extension, and $U if already installed.
23078 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
07c7b319 23079 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
85f61964
WP
23080 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
23081 # will be set to the directory where LIBOBJS objects are built.
648c9700
WP
23082 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
23083 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
85f61964
WP
23084done
23085LIBOBJS=$ac_libobjs
23086
23087LTLIBOBJS=$ac_ltlibobjs
23088
23089
23090
5a08ffb5
AJ
23091 ax_dir="libmowgli-2"
23092
23093 # Convert the path to the subdirectory into a shell variable name.
23094 ax_var=$(printf "$ax_dir" | tr -c "0-9a-zA-Z_" "_")
23095 ax_configure_ax_var=$(eval "echo \"\$ax_sub_configure_$ax_var\"")
23096 if test "$no_recursion" != "yes" -a "x$ax_configure_ax_var" = "xyes"; then
23097 subdirs_extra="$subdirs_extra $ax_dir"
23098
23099 ax_msg="=== configuring in $ax_dir ($(pwd)/$ax_dir)"
23100 $as_echo "$as_me:${as_lineno-$LINENO}: $ax_msg" >&5
23101 $as_echo "$ax_msg" >&6
23102 as_dir="$ax_dir"; as_fn_mkdir_p
08817d8c
AJ
23103 ac_builddir=.
23104
23105case "$ax_dir" in
23106.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
23107*)
23108 ac_dir_suffix=/`$as_echo "$ax_dir" | sed 's|^\.[\\/]||'`
23109 # A ".." for each directory in $ac_dir_suffix.
23110 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
23111 case $ac_top_builddir_sub in
23112 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
23113 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
23114 esac ;;
23115esac
23116ac_abs_top_builddir=$ac_pwd
23117ac_abs_builddir=$ac_pwd$ac_dir_suffix
23118# for backward compatibility:
23119ac_top_builddir=$ac_top_build_prefix
23120
23121case $srcdir in
23122 .) # We are building in place.
23123 ac_srcdir=.
23124 ac_top_srcdir=$ac_top_builddir_sub
23125 ac_abs_top_srcdir=$ac_pwd ;;
23126 [\\/]* | ?:[\\/]* ) # Absolute name.
23127 ac_srcdir=$srcdir$ac_dir_suffix;
23128 ac_top_srcdir=$srcdir
23129 ac_abs_top_srcdir=$srcdir ;;
23130 *) # Relative name.
23131 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
23132 ac_top_srcdir=$ac_top_build_prefix$srcdir
23133 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
23134esac
23135ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
23136
23137
23138 ax_popdir=$(pwd)
23139 cd "$ax_dir"
23140
23141 # Check for guested configure; otherwise get Cygnus style configure.
23142 if test -f "$ac_srcdir/configure.gnu"; then
23143 ax_sub_configure=$ac_srcdir/configure.gnu
23144 elif test -f "$ac_srcdir/configure"; then
23145 ax_sub_configure=$ac_srcdir/configure
23146 elif test -f "$ac_srcdir/configure.in"; then
23147 # This should be Cygnus configure.
23148 ax_sub_configure=$ac_aux_dir/configure
23149 else
23150 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ax_dir" >&5
23151$as_echo "$as_me: WARNING: no configuration information is in $ax_dir" >&2;}
23152 ax_sub_configure=
23153 fi
23154
23155 if test -n "$ax_sub_configure"; then
23156 # Get the configure arguments for the current configure.
23157 eval "ax_sub_configure_args=\"\$ax_sub_configure_args_${ax_var}\""
23158
23159 # Always prepend --prefix to ensure using the same prefix
23160 # in subdir configurations.
23161 ax_arg="--prefix=$prefix"
23162 case $ax_arg in
23163 *\'*) ax_arg=$($as_echo "$ax_arg" | sed "s/'/'\\\\\\\\''/g");;
23164 esac
23165 ax_sub_configure_args="'$ax_arg' $ax_sub_configure_args"
23166 if test "$silent" = yes; then
23167 ax_sub_configure_args="--silent $ax_sub_configure_args"
23168 fi
23169 # Make the cache file name correct relative to the subdirectory.
23170 case $cache_file in
23171 [\\/]* | ?:[\\/]* )
23172 ax_sub_cache_file=$cache_file ;;
23173 *) # Relative name.
23174 ax_sub_cache_file=$ac_top_build_prefix$cache_file ;;
23175 esac
23176
23177 { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ax_sub_configure $ax_sub_configure_args --cache-file=$ac_sub_cache_file" >&5
23178$as_echo "$as_me: running $SHELL $ax_sub_configure $ax_sub_configure_args --cache-file=$ac_sub_cache_file" >&6;}
23179 eval "\$SHELL \"$ax_sub_configure\" $ax_sub_configure_args --cache-file=\"$ax_sub_cache_file\"" \
23180 || as_fn_error $? "$ax_sub_configure failed for $ax_dir" "$LINENO" 5
23181 fi
23182
23183 cd "$ax_popdir"
23184 fi
23185
23186 ax_dir="modules/contrib"
23187
23188 # Convert the path to the subdirectory into a shell variable name.
23189 ax_var=$(printf "$ax_dir" | tr -c "0-9a-zA-Z_" "_")
23190 ax_configure_ax_var=$(eval "echo \"\$ax_sub_configure_$ax_var\"")
23191 if test "$no_recursion" != "yes" -a "x$ax_configure_ax_var" = "xyes"; then
23192 subdirs_extra="$subdirs_extra $ax_dir"
23193
23194 ax_msg="=== configuring in $ax_dir ($(pwd)/$ax_dir)"
23195 $as_echo "$as_me:${as_lineno-$LINENO}: $ax_msg" >&5
23196 $as_echo "$ax_msg" >&6
23197 as_dir="$ax_dir"; as_fn_mkdir_p
5a08ffb5
AJ
23198 ac_builddir=.
23199
23200case "$ax_dir" in
23201.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
23202*)
23203 ac_dir_suffix=/`$as_echo "$ax_dir" | sed 's|^\.[\\/]||'`
23204 # A ".." for each directory in $ac_dir_suffix.
23205 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
23206 case $ac_top_builddir_sub in
23207 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
23208 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
23209 esac ;;
23210esac
23211ac_abs_top_builddir=$ac_pwd
23212ac_abs_builddir=$ac_pwd$ac_dir_suffix
23213# for backward compatibility:
23214ac_top_builddir=$ac_top_build_prefix
23215
2cbf22d6
AJ
23216case $srcdir in
23217 .) # We are building in place.
23218 ac_srcdir=.
23219 ac_top_srcdir=$ac_top_builddir_sub
23220 ac_abs_top_srcdir=$ac_pwd ;;
23221 [\\/]* | ?:[\\/]* ) # Absolute name.
23222 ac_srcdir=$srcdir$ac_dir_suffix;
23223 ac_top_srcdir=$srcdir
23224 ac_abs_top_srcdir=$srcdir ;;
23225 *) # Relative name.
23226 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
23227 ac_top_srcdir=$ac_top_build_prefix$srcdir
23228 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
23229esac
23230ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
23231
23232
23233 ax_popdir=$(pwd)
23234 cd "$ax_dir"
23235
23236 # Check for guested configure; otherwise get Cygnus style configure.
23237 if test -f "$ac_srcdir/configure.gnu"; then
23238 ax_sub_configure=$ac_srcdir/configure.gnu
23239 elif test -f "$ac_srcdir/configure"; then
23240 ax_sub_configure=$ac_srcdir/configure
23241 elif test -f "$ac_srcdir/configure.in"; then
23242 # This should be Cygnus configure.
23243 ax_sub_configure=$ac_aux_dir/configure
23244 else
23245 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ax_dir" >&5
23246$as_echo "$as_me: WARNING: no configuration information is in $ax_dir" >&2;}
23247 ax_sub_configure=
23248 fi
23249
23250 if test -n "$ax_sub_configure"; then
23251 # Get the configure arguments for the current configure.
23252 eval "ax_sub_configure_args=\"\$ax_sub_configure_args_${ax_var}\""
23253
23254 # Always prepend --prefix to ensure using the same prefix
23255 # in subdir configurations.
23256 ax_arg="--prefix=$prefix"
23257 case $ax_arg in
23258 *\'*) ax_arg=$($as_echo "$ax_arg" | sed "s/'/'\\\\\\\\''/g");;
23259 esac
23260 ax_sub_configure_args="'$ax_arg' $ax_sub_configure_args"
23261 if test "$silent" = yes; then
23262 ax_sub_configure_args="--silent $ax_sub_configure_args"
23263 fi
23264 # Make the cache file name correct relative to the subdirectory.
23265 case $cache_file in
23266 [\\/]* | ?:[\\/]* )
23267 ax_sub_cache_file=$cache_file ;;
23268 *) # Relative name.
23269 ax_sub_cache_file=$ac_top_build_prefix$cache_file ;;
23270 esac
23271
23272 { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ax_sub_configure $ax_sub_configure_args --cache-file=$ac_sub_cache_file" >&5
23273$as_echo "$as_me: running $SHELL $ax_sub_configure $ax_sub_configure_args --cache-file=$ac_sub_cache_file" >&6;}
23274 eval "\$SHELL \"$ax_sub_configure\" $ax_sub_configure_args --cache-file=\"$ax_sub_cache_file\"" \
23275 || as_fn_error $? "$ax_sub_configure failed for $ax_dir" "$LINENO" 5
23276 fi
23277
23278 cd "$ax_popdir"
23279 fi
23280
56299b8d 23281
0ab5d73e 23282: "${CONFIG_STATUS=./config.status}"
07c7b319 23283ac_write_fail=0
85f61964
WP
23284ac_clean_files_save=$ac_clean_files
23285ac_clean_files="$ac_clean_files $CONFIG_STATUS"
648c9700 23286{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
07c7b319 23287$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
648c9700
WP
23288as_write_fail=0
23289cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
85f61964
WP
23290#! $SHELL
23291# Generated by $as_me.
23292# Run this file to recreate the current configuration.
23293# Compiler output produced by configure, useful for debugging
23294# configure, is in config.log if it exists.
23295
23296debug=false
23297ac_cs_recheck=false
23298ac_cs_silent=false
85f61964 23299
648c9700
WP
23300SHELL=\${CONFIG_SHELL-$SHELL}
23301export SHELL
23302_ASEOF
23303cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
23304## -------------------- ##
23305## M4sh Initialization. ##
23306## -------------------- ##
85f61964
WP
23307
23308# Be more Bourne compatible
23309DUALCASE=1; export DUALCASE # for MKS sh
648c9700 23310if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
85f61964
WP
23311 emulate sh
23312 NULLCMD=:
07c7b319 23313 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
85f61964
WP
23314 # is contrary to our usage. Disable this feature.
23315 alias -g '${1+"$@"}'='"$@"'
23316 setopt NO_GLOB_SUBST
23317else
648c9700
WP
23318 case `(set -o) 2>/dev/null` in #(
23319 *posix*) :
23320 set -o posix ;; #(
23321 *) :
23322 ;;
85f61964 23323esac
85f61964
WP
23324fi
23325
23326
07c7b319
JT
23327as_nl='
23328'
23329export as_nl
23330# Printing a long string crashes Solaris 7 /usr/bin/printf.
23331as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
23332as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
23333as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
648c9700
WP
23334# Prefer a ksh shell builtin over an external printf program on Solaris,
23335# but without wasting forks for bash or zsh.
23336if test -z "$BASH_VERSION$ZSH_VERSION" \
23337 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
23338 as_echo='print -r --'
23339 as_echo_n='print -rn --'
23340elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
07c7b319
JT
23341 as_echo='printf %s\n'
23342 as_echo_n='printf %s'
23343else
23344 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
23345 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
23346 as_echo_n='/usr/ucb/echo -n'
85f61964 23347 else
07c7b319
JT
23348 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
23349 as_echo_n_body='eval
23350 arg=$1;
648c9700 23351 case $arg in #(
07c7b319
JT
23352 *"$as_nl"*)
23353 expr "X$arg" : "X\\(.*\\)$as_nl";
23354 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
23355 esac;
23356 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
23357 '
23358 export as_echo_n_body
23359 as_echo_n='sh -c $as_echo_n_body as_echo'
85f61964 23360 fi
07c7b319
JT
23361 export as_echo_body
23362 as_echo='sh -c $as_echo_body as_echo'
23363fi
23364
23365# The user is always right.
23366if test "${PATH_SEPARATOR+set}" != set; then
23367 PATH_SEPARATOR=:
23368 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
23369 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
23370 PATH_SEPARATOR=';'
23371 }
85f61964
WP
23372fi
23373
85f61964
WP
23374
23375# IFS
23376# We need space, tab and new line, in precisely that order. Quoting is
23377# there to prevent editors from complaining about space-tab.
23378# (If _AS_PATH_WALK were called with IFS unset, it would disable word
23379# splitting by setting IFS to empty value.)
85f61964
WP
23380IFS=" "" $as_nl"
23381
23382# Find who we are. Look in the path if we contain no directory separator.
0ab5d73e 23383as_myself=
648c9700 23384case $0 in #((
85f61964
WP
23385 *[\\/]* ) as_myself=$0 ;;
23386 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23387for as_dir in $PATH
23388do
23389 IFS=$as_save_IFS
23390 test -z "$as_dir" && as_dir=.
648c9700
WP
23391 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23392 done
85f61964
WP
23393IFS=$as_save_IFS
23394
23395 ;;
23396esac
23397# We did not find ourselves, most probably we were run as `sh COMMAND'
23398# in which case we are not to be found in the path.
23399if test "x$as_myself" = x; then
23400 as_myself=$0
23401fi
23402if test ! -f "$as_myself"; then
07c7b319 23403 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
648c9700 23404 exit 1
85f61964
WP
23405fi
23406
648c9700
WP
23407# Unset variables that we do not need and which cause bugs (e.g. in
23408# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
23409# suppresses any "Segmentation fault" message there. '((' could
23410# trigger a bug in pdksh 5.2.14.
23411for as_var in BASH_ENV ENV MAIL MAILPATH
23412do eval test x\${$as_var+set} = xset \
23413 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
85f61964
WP
23414done
23415PS1='$ '
23416PS2='> '
23417PS4='+ '
23418
23419# NLS nuisances.
07c7b319
JT
23420LC_ALL=C
23421export LC_ALL
23422LANGUAGE=C
23423export LANGUAGE
85f61964 23424
648c9700
WP
23425# CDPATH.
23426(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
23427
23428
0ab5d73e
JH
23429# as_fn_error STATUS ERROR [LINENO LOG_FD]
23430# ----------------------------------------
648c9700
WP
23431# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
23432# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
0ab5d73e 23433# script with STATUS, using 1 if that was 0.
648c9700
WP
23434as_fn_error ()
23435{
0ab5d73e
JH
23436 as_status=$1; test $as_status -eq 0 && as_status=1
23437 if test "$4"; then
23438 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
23439 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
648c9700 23440 fi
0ab5d73e 23441 $as_echo "$as_me: error: $2" >&2
648c9700
WP
23442 as_fn_exit $as_status
23443} # as_fn_error
23444
23445
23446# as_fn_set_status STATUS
23447# -----------------------
23448# Set $? to STATUS, without forking.
23449as_fn_set_status ()
23450{
23451 return $1
23452} # as_fn_set_status
23453
23454# as_fn_exit STATUS
23455# -----------------
23456# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
23457as_fn_exit ()
23458{
23459 set +e
23460 as_fn_set_status $1
23461 exit $1
23462} # as_fn_exit
23463
23464# as_fn_unset VAR
23465# ---------------
23466# Portably unset VAR.
23467as_fn_unset ()
23468{
23469 { eval $1=; unset $1;}
23470}
23471as_unset=as_fn_unset
23472# as_fn_append VAR VALUE
23473# ----------------------
23474# Append the text in VALUE to the end of the definition contained in VAR. Take
23475# advantage of any shell optimizations that allow amortized linear growth over
23476# repeated appends, instead of the typical quadratic growth present in naive
23477# implementations.
23478if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
23479 eval 'as_fn_append ()
23480 {
23481 eval $1+=\$2
23482 }'
23483else
23484 as_fn_append ()
23485 {
23486 eval $1=\$$1\$2
23487 }
23488fi # as_fn_append
23489
23490# as_fn_arith ARG...
23491# ------------------
23492# Perform arithmetic evaluation on the ARGs, and store the result in the
23493# global $as_val. Take advantage of shells that can avoid forks. The arguments
23494# must be portable across $(()) and expr.
23495if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
23496 eval 'as_fn_arith ()
23497 {
23498 as_val=$(( $* ))
23499 }'
23500else
23501 as_fn_arith ()
23502 {
23503 as_val=`expr "$@" || test $? -eq 1`
23504 }
23505fi # as_fn_arith
23506
23507
85f61964
WP
23508if expr a : '\(a\)' >/dev/null 2>&1 &&
23509 test "X`expr 00001 : '.*\(...\)'`" = X001; then
23510 as_expr=expr
23511else
23512 as_expr=false
23513fi
23514
23515if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
23516 as_basename=basename
23517else
23518 as_basename=false
23519fi
23520
648c9700
WP
23521if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
23522 as_dirname=dirname
23523else
23524 as_dirname=false
23525fi
85f61964 23526
85f61964
WP
23527as_me=`$as_basename -- "$0" ||
23528$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23529 X"$0" : 'X\(//\)$' \| \
23530 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
07c7b319 23531$as_echo X/"$0" |
85f61964
WP
23532 sed '/^.*\/\([^/][^/]*\)\/*$/{
23533 s//\1/
23534 q
23535 }
23536 /^X\/\(\/\/\)$/{
23537 s//\1/
23538 q
23539 }
23540 /^X\/\(\/\).*/{
23541 s//\1/
23542 q
23543 }
23544 s/.*/./; q'`
23545
648c9700
WP
23546# Avoid depending upon Character Ranges.
23547as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23548as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23549as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23550as_cr_digits='0123456789'
23551as_cr_alnum=$as_cr_Letters$as_cr_digits
85f61964
WP
23552
23553ECHO_C= ECHO_N= ECHO_T=
648c9700 23554case `echo -n x` in #(((((
85f61964 23555-n*)
648c9700 23556 case `echo 'xy\c'` in
85f61964 23557 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
648c9700
WP
23558 xy) ECHO_C='\c';;
23559 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
23560 ECHO_T=' ';;
85f61964
WP
23561 esac;;
23562*)
23563 ECHO_N='-n';;
23564esac
85f61964
WP
23565
23566rm -f conf$$ conf$$.exe conf$$.file
23567if test -d conf$$.dir; then
23568 rm -f conf$$.dir/conf$$.file
23569else
23570 rm -f conf$$.dir
07c7b319
JT
23571 mkdir conf$$.dir 2>/dev/null
23572fi
23573if (echo >conf$$.file) 2>/dev/null; then
23574 if ln -s conf$$.file conf$$ 2>/dev/null; then
23575 as_ln_s='ln -s'
23576 # ... but there are two gotchas:
23577 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
23578 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d24e2420 23579 # In both cases, we have to default to `cp -pR'.
07c7b319 23580 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d24e2420 23581 as_ln_s='cp -pR'
07c7b319
JT
23582 elif ln conf$$.file conf$$ 2>/dev/null; then
23583 as_ln_s=ln
23584 else
d24e2420 23585 as_ln_s='cp -pR'
07c7b319 23586 fi
85f61964 23587else
d24e2420 23588 as_ln_s='cp -pR'
85f61964
WP
23589fi
23590rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
23591rmdir conf$$.dir 2>/dev/null
23592
648c9700
WP
23593
23594# as_fn_mkdir_p
23595# -------------
23596# Create "$as_dir" as a directory, including parents if necessary.
23597as_fn_mkdir_p ()
23598{
23599
23600 case $as_dir in #(
23601 -*) as_dir=./$as_dir;;
23602 esac
23603 test -d "$as_dir" || eval $as_mkdir_p || {
23604 as_dirs=
23605 while :; do
23606 case $as_dir in #(
23607 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
23608 *) as_qdir=$as_dir;;
23609 esac
23610 as_dirs="'$as_qdir' $as_dirs"
23611 as_dir=`$as_dirname -- "$as_dir" ||
23612$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23613 X"$as_dir" : 'X\(//\)[^/]' \| \
23614 X"$as_dir" : 'X\(//\)$' \| \
23615 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
23616$as_echo X"$as_dir" |
23617 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23618 s//\1/
23619 q
23620 }
23621 /^X\(\/\/\)[^/].*/{
23622 s//\1/
23623 q
23624 }
23625 /^X\(\/\/\)$/{
23626 s//\1/
23627 q
23628 }
23629 /^X\(\/\).*/{
23630 s//\1/
23631 q
23632 }
23633 s/.*/./; q'`
23634 test -d "$as_dir" && break
23635 done
23636 test -z "$as_dirs" || eval "mkdir $as_dirs"
0ab5d73e 23637 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
648c9700
WP
23638
23639
23640} # as_fn_mkdir_p
85f61964 23641if mkdir -p . 2>/dev/null; then
648c9700 23642 as_mkdir_p='mkdir -p "$as_dir"'
85f61964
WP
23643else
23644 test -d ./-p && rmdir ./-p
23645 as_mkdir_p=false
23646fi
23647
d24e2420
WP
23648
23649# as_fn_executable_p FILE
23650# -----------------------
23651# Test if FILE is an executable regular file.
23652as_fn_executable_p ()
23653{
23654 test -f "$1" && test -x "$1"
23655} # as_fn_executable_p
23656as_test_x='test -x'
23657as_executable_p=as_fn_executable_p
85f61964
WP
23658
23659# Sed expression to map a string onto a valid CPP name.
23660as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
23661
23662# Sed expression to map a string onto a valid variable name.
23663as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
23664
23665
23666exec 6>&1
648c9700
WP
23667## ----------------------------------- ##
23668## Main body of $CONFIG_STATUS script. ##
23669## ----------------------------------- ##
23670_ASEOF
23671test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
85f61964 23672
648c9700
WP
23673cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23674# Save the log message, to keep $0 and so on meaningful, and to
85f61964
WP
23675# report actual input values of CONFIG_FILES etc. instead of their
23676# values after options handling.
23677ac_log="
7d09d888 23678This file was extended by Atheme IRC Services $as_me 7.3.0-rc2, which was
d24e2420 23679generated by GNU Autoconf 2.69. Invocation command line was
85f61964
WP
23680
23681 CONFIG_FILES = $CONFIG_FILES
23682 CONFIG_HEADERS = $CONFIG_HEADERS
23683 CONFIG_LINKS = $CONFIG_LINKS
23684 CONFIG_COMMANDS = $CONFIG_COMMANDS
23685 $ $0 $@
23686
23687on `(hostname || uname -n) 2>/dev/null | sed 1q`
23688"
23689
23690_ACEOF
23691
105203ad
WP
23692case $ac_config_files in *"
23693"*) set x $ac_config_files; shift; ac_config_files=$*;;
23694esac
23695
23696case $ac_config_headers in *"
23697"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
23698esac
23699
23700
07c7b319 23701cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
85f61964
WP
23702# Files that config.status was made for.
23703config_files="$ac_config_files"
23704config_headers="$ac_config_headers"
083f09b4 23705config_commands="$ac_config_commands"
85f61964
WP
23706
23707_ACEOF
23708
07c7b319 23709cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
85f61964 23710ac_cs_usage="\
648c9700
WP
23711\`$as_me' instantiates files and other configuration actions
23712from templates according to the current configuration. Unless the files
23713and actions are specified as TAGs, all are instantiated by default.
85f61964 23714
648c9700 23715Usage: $0 [OPTION]... [TAG]...
85f61964
WP
23716
23717 -h, --help print this help, then exit
23718 -V, --version print version number and configuration settings, then exit
fe2e2f74 23719 --config print configuration, then exit
105203ad
WP
23720 -q, --quiet, --silent
23721 do not print progress messages
85f61964
WP
23722 -d, --debug don't remove temporary files
23723 --recheck update $as_me by reconfiguring in the same conditions
105203ad 23724 --file=FILE[:TEMPLATE]
07c7b319 23725 instantiate the configuration file FILE
105203ad 23726 --header=FILE[:TEMPLATE]
07c7b319 23727 instantiate the configuration header FILE
85f61964
WP
23728
23729Configuration files:
23730$config_files
23731
23732Configuration headers:
23733$config_headers
23734
083f09b4
WP
23735Configuration commands:
23736$config_commands
23737
109cf8f3
AJ
23738Report bugs to <https://github.com/atheme/atheme/issues/>.
23739Atheme IRC Services home page: <https://atheme.github.io/>."
85f61964
WP
23740
23741_ACEOF
07c7b319 23742cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
fe2e2f74 23743ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
85f61964 23744ac_cs_version="\\
7d09d888 23745Atheme IRC Services config.status 7.3.0-rc2
d24e2420 23746configured by $0, generated by GNU Autoconf 2.69,
fe2e2f74 23747 with options \\"\$ac_cs_config\\"
85f61964 23748
d24e2420 23749Copyright (C) 2012 Free Software Foundation, Inc.
85f61964
WP
23750This config.status script is free software; the Free Software Foundation
23751gives unlimited permission to copy, distribute and modify it."
23752
23753ac_pwd='$ac_pwd'
23754srcdir='$srcdir'
23755INSTALL='$INSTALL'
e81f5cb3 23756MKDIR_P='$MKDIR_P'
07c7b319 23757test -n "\$AWK" || AWK=awk
85f61964
WP
23758_ACEOF
23759
07c7b319
JT
23760cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23761# The default lists apply if the user does not specify any file.
85f61964
WP
23762ac_need_defaults=:
23763while test $# != 0
23764do
23765 case $1 in
0ab5d73e 23766 --*=?*)
85f61964
WP
23767 ac_option=`expr "X$1" : 'X\([^=]*\)='`
23768 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
23769 ac_shift=:
23770 ;;
0ab5d73e
JH
23771 --*=)
23772 ac_option=`expr "X$1" : 'X\([^=]*\)='`
23773 ac_optarg=
23774 ac_shift=:
23775 ;;
85f61964
WP
23776 *)
23777 ac_option=$1
23778 ac_optarg=$2
23779 ac_shift=shift
23780 ;;
23781 esac
23782
23783 case $ac_option in
23784 # Handling of the options.
23785 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23786 ac_cs_recheck=: ;;
23787 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
07c7b319 23788 $as_echo "$ac_cs_version"; exit ;;
fe2e2f74
WP
23789 --config | --confi | --conf | --con | --co | --c )
23790 $as_echo "$ac_cs_config"; exit ;;
85f61964
WP
23791 --debug | --debu | --deb | --de | --d | -d )
23792 debug=: ;;
23793 --file | --fil | --fi | --f )
23794 $ac_shift
07c7b319
JT
23795 case $ac_optarg in
23796 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
0ab5d73e 23797 '') as_fn_error $? "missing file argument" ;;
07c7b319 23798 esac
648c9700 23799 as_fn_append CONFIG_FILES " '$ac_optarg'"
85f61964
WP
23800 ac_need_defaults=false;;
23801 --header | --heade | --head | --hea )
23802 $ac_shift
07c7b319
JT
23803 case $ac_optarg in
23804 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
23805 esac
648c9700 23806 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
85f61964
WP
23807 ac_need_defaults=false;;
23808 --he | --h)
23809 # Conflict between --help and --header
0ab5d73e 23810 as_fn_error $? "ambiguous option: \`$1'
648c9700 23811Try \`$0 --help' for more information.";;
85f61964 23812 --help | --hel | -h )
07c7b319 23813 $as_echo "$ac_cs_usage"; exit ;;
85f61964
WP
23814 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23815 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23816 ac_cs_silent=: ;;
23817
23818 # This is an error.
0ab5d73e 23819 -*) as_fn_error $? "unrecognized option: \`$1'
648c9700 23820Try \`$0 --help' for more information." ;;
85f61964 23821
648c9700 23822 *) as_fn_append ac_config_targets " $1"
85f61964
WP
23823 ac_need_defaults=false ;;
23824
23825 esac
23826 shift
23827done
23828
23829ac_configure_extra_args=
23830
23831if $ac_cs_silent; then
23832 exec 6>/dev/null
23833 ac_configure_extra_args="$ac_configure_extra_args --silent"
23834fi
23835
23836_ACEOF
07c7b319 23837cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
85f61964 23838if \$ac_cs_recheck; then
d24e2420 23839 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
07c7b319
JT
23840 shift
23841 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
23842 CONFIG_SHELL='$SHELL'
85f61964 23843 export CONFIG_SHELL
07c7b319 23844 exec "\$@"
85f61964
WP
23845fi
23846
23847_ACEOF
07c7b319 23848cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
85f61964
WP
23849exec 5>>config.log
23850{
23851 echo
23852 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23853## Running $as_me. ##
23854_ASBOX
07c7b319 23855 $as_echo "$ac_log"
85f61964
WP
23856} >&5
23857
23858_ACEOF
07c7b319 23859cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
083f09b4
WP
23860#
23861# INIT-COMMANDS
23862#
23863# Capture the value of obsolete ALL_LINGUAS because we need it to compute
e81f5cb3
AJ
23864 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
23865 # from automake < 1.5.
083f09b4
WP
23866 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
23867 # Capture the value of LINGUAS because we need it to compute CATALOGS.
23868 LINGUAS="${LINGUAS-%UNSET%}"
23869
23870
85f61964
WP
23871_ACEOF
23872
07c7b319 23873cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
85f61964
WP
23874
23875# Handling of arguments.
23876for ac_config_target in $ac_config_targets
23877do
23878 case $ac_config_target in
d19ec966 23879 "buildsys.mk") CONFIG_FILES="$CONFIG_FILES buildsys.mk" ;;
505f945e 23880 "extra.mk") CONFIG_FILES="$CONFIG_FILES extra.mk" ;;
8f395567
AJ
23881 "include/atheme/sysconf.h") CONFIG_HEADERS="$CONFIG_HEADERS include/atheme/sysconf.h" ;;
23882 "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
85f61964 23883
0ab5d73e 23884 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
85f61964
WP
23885 esac
23886done
23887
23888
23889# If the user did not use the arguments to specify the items to instantiate,
23890# then the envvar interface is used. Set only those that are not.
23891# We use the long form for the default assignment because of an extremely
23892# bizarre bug on SunOS 4.1.3.
23893if $ac_need_defaults; then
23894 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23895 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
083f09b4 23896 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
85f61964
WP
23897fi
23898
23899# Have a temporary directory for convenience. Make it in the build tree
23900# simply because there is no reason against having it here, and in addition,
23901# creating and moving files from /tmp can sometimes cause problems.
23902# Hook for its removal unless debugging.
23903# Note that there is a small window in which the directory will not be cleaned:
23904# after its creation but before its name has been assigned to `$tmp'.
23905$debug ||
23906{
0ab5d73e 23907 tmp= ac_tmp=
85f61964 23908 trap 'exit_status=$?
0ab5d73e
JH
23909 : "${ac_tmp:=$tmp}"
23910 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
85f61964 23911' 0
648c9700 23912 trap 'as_fn_exit 1' 1 2 13 15
85f61964
WP
23913}
23914# Create a (secure) tmp directory for tmp files.
23915
23916{
23917 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
0ab5d73e 23918 test -d "$tmp"
85f61964
WP
23919} ||
23920{
23921 tmp=./conf$$-$RANDOM
23922 (umask 077 && mkdir "$tmp")
0ab5d73e
JH
23923} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
23924ac_tmp=$tmp
85f61964 23925
07c7b319
JT
23926# Set up the scripts for CONFIG_FILES section.
23927# No need to generate them if there are no CONFIG_FILES.
23928# This happens for instance with `./config.status config.h'.
85f61964
WP
23929if test -n "$CONFIG_FILES"; then
23930
85f61964 23931
648c9700
WP
23932ac_cr=`echo X | tr X '\015'`
23933# On cygwin, bash can eat \r inside `` if the user requested igncr.
23934# But we know of no other shell where ac_cr would be empty at this
23935# point, so we can use a bashism as a fallback.
23936if test "x$ac_cr" = x; then
23937 eval ac_cr=\$\'\\r\'
23938fi
07c7b319
JT
23939ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
23940if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
0ab5d73e 23941 ac_cs_awk_cr='\\r'
07c7b319
JT
23942else
23943 ac_cs_awk_cr=$ac_cr
85f61964
WP
23944fi
23945
0ab5d73e 23946echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
85f61964
WP
23947_ACEOF
23948
23949
07c7b319
JT
23950{
23951 echo "cat >conf$$subs.awk <<_ACEOF" &&
23952 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
23953 echo "_ACEOF"
23954} >conf$$subs.sh ||
0ab5d73e
JH
23955 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
23956ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
85f61964
WP
23957ac_delim='%!_!# '
23958for ac_last_try in false false false false false :; do
07c7b319 23959 . ./conf$$subs.sh ||
0ab5d73e 23960 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
07c7b319 23961
105203ad
WP
23962 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
23963 if test $ac_delim_n = $ac_delim_num; then
85f61964
WP
23964 break
23965 elif $ac_last_try; then
0ab5d73e 23966 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
85f61964
WP
23967 else
23968 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
23969 fi
23970done
07c7b319
JT
23971rm -f conf$$subs.sh
23972
23973cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
0ab5d73e 23974cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
07c7b319
JT
23975_ACEOF
23976sed -n '
23977h
23978s/^/S["/; s/!.*/"]=/
23979p
23980g
23981s/^[^!]*!//
23982:repl
23983t repl
23984s/'"$ac_delim"'$//
23985t delim
23986:nl
23987h
fe2e2f74 23988s/\(.\{148\}\)..*/\1/
07c7b319
JT
23989t more1
23990s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
23991p
23992n
23993b repl
23994:more1
23995s/["\\]/\\&/g; s/^/"/; s/$/"\\/
23996p
23997g
23998s/.\{148\}//
23999t nl
24000:delim
24001h
fe2e2f74 24002s/\(.\{148\}\)..*/\1/
07c7b319
JT
24003t more2
24004s/["\\]/\\&/g; s/^/"/; s/$/"/
24005p
24006b
24007:more2
24008s/["\\]/\\&/g; s/^/"/; s/$/"\\/
24009p
24010g
24011s/.\{148\}//
24012t delim
24013' <conf$$subs.awk | sed '
24014/^[^""]/{
24015 N
24016 s/\n//
24017}
24018' >>$CONFIG_STATUS || ac_write_fail=1
24019rm -f conf$$subs.awk
24020cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24021_ACAWK
0ab5d73e 24022cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
07c7b319
JT
24023 for (key in S) S_is_set[key] = 1
24024 FS = "\a"
85f61964 24025
07c7b319
JT
24026}
24027{
24028 line = $ 0
24029 nfields = split(line, field, "@")
24030 substed = 0
24031 len = length(field[1])
24032 for (i = 2; i < nfields; i++) {
24033 key = field[i]
24034 keylen = length(key)
24035 if (S_is_set[key]) {
24036 value = S[key]
24037 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
24038 len += length(value) + length(field[++i])
24039 substed = 1
24040 } else
24041 len += 1 + keylen
24042 }
24043
24044 print line
24045}
85f61964 24046
07c7b319 24047_ACAWK
85f61964 24048_ACEOF
07c7b319
JT
24049cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24050if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
24051 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
24052else
24053 cat
0ab5d73e
JH
24054fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
24055 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
85f61964
WP
24056_ACEOF
24057
0ab5d73e
JH
24058# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
24059# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
85f61964
WP
24060# trailing colons and then remove the whole line if VPATH becomes empty
24061# (actually we leave an empty line to preserve line numbers).
24062if test "x$srcdir" = x.; then
0ab5d73e
JH
24063 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
24064h
24065s///
24066s/^/:/
24067s/[ ]*$/:/
24068s/:\$(srcdir):/:/g
24069s/:\${srcdir}:/:/g
24070s/:@srcdir@:/:/g
24071s/^:*//
85f61964 24072s/:*$//
0ab5d73e
JH
24073x
24074s/\(=[ ]*\).*/\1/
24075G
24076s/\n//
85f61964
WP
24077s/^[^=]*=[ ]*$//
24078}'
24079fi
24080
07c7b319 24081cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
85f61964
WP
24082fi # test -n "$CONFIG_FILES"
24083
07c7b319
JT
24084# Set up the scripts for CONFIG_HEADERS section.
24085# No need to generate them if there are no CONFIG_HEADERS.
24086# This happens for instance with `./config.status Makefile'.
24087if test -n "$CONFIG_HEADERS"; then
0ab5d73e 24088cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
07c7b319
JT
24089BEGIN {
24090_ACEOF
24091
24092# Transform confdefs.h into an awk script `defines.awk', embedded as
24093# here-document in config.status, that substitutes the proper values into
24094# config.h.in to produce config.h.
24095
24096# Create a delimiter string that does not exist in confdefs.h, to ease
24097# handling of long lines.
24098ac_delim='%!_!# '
24099for ac_last_try in false false :; do
0ab5d73e
JH
24100 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
24101 if test -z "$ac_tt"; then
07c7b319
JT
24102 break
24103 elif $ac_last_try; then
0ab5d73e 24104 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
07c7b319
JT
24105 else
24106 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24107 fi
24108done
24109
24110# For the awk script, D is an array of macro values keyed by name,
24111# likewise P contains macro parameters if any. Preserve backslash
24112# newline sequences.
24113
24114ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
24115sed -n '
24116s/.\{148\}/&'"$ac_delim"'/g
24117t rset
24118:rset
24119s/^[ ]*#[ ]*define[ ][ ]*/ /
24120t def
24121d
24122:def
24123s/\\$//
24124t bsnl
24125s/["\\]/\\&/g
24126s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
24127D["\1"]=" \3"/p
24128s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
24129d
24130:bsnl
24131s/["\\]/\\&/g
24132s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
24133D["\1"]=" \3\\\\\\n"\\/p
24134t cont
24135s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
24136t cont
24137d
24138:cont
24139n
24140s/.\{148\}/&'"$ac_delim"'/g
24141t clear
24142:clear
24143s/\\$//
24144t bsnlc
24145s/["\\]/\\&/g; s/^/"/; s/$/"/p
24146d
24147:bsnlc
24148s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
24149b cont
24150' <confdefs.h | sed '
24151s/'"$ac_delim"'/"\\\
24152"/g' >>$CONFIG_STATUS || ac_write_fail=1
24153
24154cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24155 for (key in D) D_is_set[key] = 1
24156 FS = "\a"
24157}
24158/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
24159 line = \$ 0
24160 split(line, arg, " ")
24161 if (arg[1] == "#") {
24162 defundef = arg[2]
24163 mac1 = arg[3]
24164 } else {
24165 defundef = substr(arg[1], 2)
24166 mac1 = arg[2]
24167 }
24168 split(mac1, mac2, "(") #)
24169 macro = mac2[1]
105203ad 24170 prefix = substr(line, 1, index(line, defundef) - 1)
07c7b319
JT
24171 if (D_is_set[macro]) {
24172 # Preserve the white space surrounding the "#".
07c7b319
JT
24173 print prefix "define", macro P[macro] D[macro]
24174 next
24175 } else {
24176 # Replace #undef with comments. This is necessary, for example,
24177 # in the case of _POSIX_SOURCE, which is predefined and required
24178 # on some systems where configure will not decide to define it.
24179 if (defundef == "undef") {
105203ad 24180 print "/*", prefix defundef, macro, "*/"
07c7b319
JT
24181 next
24182 }
24183 }
24184}
24185{ print }
24186_ACAWK
24187_ACEOF
24188cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
0ab5d73e 24189 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
07c7b319
JT
24190fi # test -n "$CONFIG_HEADERS"
24191
85f61964 24192
083f09b4 24193eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
07c7b319
JT
24194shift
24195for ac_tag
85f61964
WP
24196do
24197 case $ac_tag in
24198 :[FHLC]) ac_mode=$ac_tag; continue;;
24199 esac
24200 case $ac_mode$ac_tag in
24201 :[FHL]*:*);;
0ab5d73e 24202 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
85f61964
WP
24203 :[FH]-) ac_tag=-:-;;
24204 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24205 esac
24206 ac_save_IFS=$IFS
24207 IFS=:
24208 set x $ac_tag
24209 IFS=$ac_save_IFS
24210 shift
24211 ac_file=$1
24212 shift
24213
24214 case $ac_mode in
24215 :L) ac_source=$1;;
24216 :[FH])
24217 ac_file_inputs=
24218 for ac_f
24219 do
24220 case $ac_f in
0ab5d73e 24221 -) ac_f="$ac_tmp/stdin";;
85f61964
WP
24222 *) # Look for the file first in the build tree, then in the source tree
24223 # (if the path is not absolute). The absolute path cannot be DOS-style,
24224 # because $ac_f cannot contain `:'.
24225 test -f "$ac_f" ||
24226 case $ac_f in
24227 [\\/$]*) false;;
24228 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24229 esac ||
0ab5d73e 24230 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
85f61964 24231 esac
07c7b319 24232 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
648c9700 24233 as_fn_append ac_file_inputs " '$ac_f'"
85f61964
WP
24234 done
24235
24236 # Let's still pretend it is `configure' which instantiates (i.e., don't
24237 # use $as_me), people would be surprised to read:
24238 # /* config.h. Generated by config.status. */
07c7b319
JT
24239 configure_input='Generated from '`
24240 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
24241 `' by configure.'
85f61964
WP
24242 if test x"$ac_file" != x-; then
24243 configure_input="$ac_file. $configure_input"
648c9700 24244 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
07c7b319 24245$as_echo "$as_me: creating $ac_file" >&6;}
85f61964 24246 fi
07c7b319
JT
24247 # Neutralize special characters interpreted by sed in replacement strings.
24248 case $configure_input in #(
24249 *\&* | *\|* | *\\* )
24250 ac_sed_conf_input=`$as_echo "$configure_input" |
24251 sed 's/[\\\\&|]/\\\\&/g'`;; #(
24252 *) ac_sed_conf_input=$configure_input;;
24253 esac
85f61964
WP
24254
24255 case $ac_tag in
0ab5d73e
JH
24256 *:-:* | *:-) cat >"$ac_tmp/stdin" \
24257 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
85f61964
WP
24258 esac
24259 ;;
24260 esac
24261
24262 ac_dir=`$as_dirname -- "$ac_file" ||
24263$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24264 X"$ac_file" : 'X\(//\)[^/]' \| \
24265 X"$ac_file" : 'X\(//\)$' \| \
24266 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
07c7b319 24267$as_echo X"$ac_file" |
85f61964
WP
24268 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24269 s//\1/
24270 q
24271 }
24272 /^X\(\/\/\)[^/].*/{
24273 s//\1/
24274 q
24275 }
24276 /^X\(\/\/\)$/{
24277 s//\1/
24278 q
24279 }
24280 /^X\(\/\).*/{
24281 s//\1/
24282 q
24283 }
24284 s/.*/./; q'`
648c9700 24285 as_dir="$ac_dir"; as_fn_mkdir_p
85f61964
WP
24286 ac_builddir=.
24287
24288case "$ac_dir" in
24289.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24290*)
07c7b319 24291 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
85f61964 24292 # A ".." for each directory in $ac_dir_suffix.
07c7b319 24293 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
85f61964
WP
24294 case $ac_top_builddir_sub in
24295 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24296 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24297 esac ;;
24298esac
24299ac_abs_top_builddir=$ac_pwd
24300ac_abs_builddir=$ac_pwd$ac_dir_suffix
24301# for backward compatibility:
24302ac_top_builddir=$ac_top_build_prefix
24303
24304case $srcdir in
24305 .) # We are building in place.
24306 ac_srcdir=.
24307 ac_top_srcdir=$ac_top_builddir_sub
24308 ac_abs_top_srcdir=$ac_pwd ;;
24309 [\\/]* | ?:[\\/]* ) # Absolute name.
24310 ac_srcdir=$srcdir$ac_dir_suffix;
24311 ac_top_srcdir=$srcdir
24312 ac_abs_top_srcdir=$srcdir ;;
24313 *) # Relative name.
24314 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24315 ac_top_srcdir=$ac_top_build_prefix$srcdir
24316 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
24317esac
24318ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
24319
24320
24321 case $ac_mode in
24322 :F)
24323 #
24324 # CONFIG_FILE
24325 #
24326
24327 case $INSTALL in
24328 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24329 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
24330 esac
e81f5cb3
AJ
24331 ac_MKDIR_P=$MKDIR_P
24332 case $MKDIR_P in
24333 [\\/$]* | ?:[\\/]* ) ;;
24334 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
24335 esac
85f61964
WP
24336_ACEOF
24337
07c7b319 24338cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
85f61964
WP
24339# If the template does not know about datarootdir, expand it.
24340# FIXME: This hack should be removed a few years after 2.60.
24341ac_datarootdir_hack=; ac_datarootdir_seen=
07c7b319
JT
24342ac_sed_dataroot='
24343/datarootdir/ {
85f61964
WP
24344 p
24345 q
24346}
24347/@datadir@/p
24348/@docdir@/p
24349/@infodir@/p
24350/@localedir@/p
648c9700 24351/@mandir@/p'
07c7b319 24352case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
85f61964
WP
24353*datarootdir*) ac_datarootdir_seen=yes;;
24354*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
648c9700 24355 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
07c7b319 24356$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
85f61964 24357_ACEOF
07c7b319 24358cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
85f61964
WP
24359 ac_datarootdir_hack='
24360 s&@datadir@&$datadir&g
24361 s&@docdir@&$docdir&g
24362 s&@infodir@&$infodir&g
24363 s&@localedir@&$localedir&g
24364 s&@mandir@&$mandir&g
648c9700 24365 s&\\\${datarootdir}&$datarootdir&g' ;;
85f61964
WP
24366esac
24367_ACEOF
24368
24369# Neutralize VPATH when `$srcdir' = `.'.
24370# Shell code in configure.ac might set extrasub.
24371# FIXME: do we really want to maintain this feature?
07c7b319
JT
24372cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24373ac_sed_extra="$ac_vpsub
85f61964
WP
24374$extrasub
24375_ACEOF
07c7b319 24376cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
85f61964
WP
24377:t
24378/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
07c7b319 24379s|@configure_input@|$ac_sed_conf_input|;t t
85f61964 24380s&@top_builddir@&$ac_top_builddir_sub&;t t
07c7b319 24381s&@top_build_prefix@&$ac_top_build_prefix&;t t
85f61964
WP
24382s&@srcdir@&$ac_srcdir&;t t
24383s&@abs_srcdir@&$ac_abs_srcdir&;t t
24384s&@top_srcdir@&$ac_top_srcdir&;t t
24385s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24386s&@builddir@&$ac_builddir&;t t
24387s&@abs_builddir@&$ac_abs_builddir&;t t
24388s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24389s&@INSTALL@&$ac_INSTALL&;t t
e81f5cb3 24390s&@MKDIR_P@&$ac_MKDIR_P&;t t
85f61964 24391$ac_datarootdir_hack
07c7b319 24392"
0ab5d73e
JH
24393eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
24394 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
85f61964
WP
24395
24396test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
0ab5d73e
JH
24397 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
24398 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
24399 "$ac_tmp/out"`; test -z "$ac_out"; } &&
648c9700 24400 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
0ab5d73e 24401which seems to be undefined. Please make sure it is defined" >&5
07c7b319 24402$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
0ab5d73e 24403which seems to be undefined. Please make sure it is defined" >&2;}
85f61964 24404
0ab5d73e 24405 rm -f "$ac_tmp/stdin"
85f61964 24406 case $ac_file in
0ab5d73e
JH
24407 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
24408 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
07c7b319 24409 esac \
0ab5d73e 24410 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
85f61964
WP
24411 ;;
24412 :H)
24413 #
24414 # CONFIG_HEADER
24415 #
85f61964 24416 if test x"$ac_file" != x-; then
07c7b319
JT
24417 {
24418 $as_echo "/* $configure_input */" \
0ab5d73e
JH
24419 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
24420 } >"$ac_tmp/config.h" \
24421 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
24422 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
648c9700 24423 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
07c7b319 24424$as_echo "$as_me: $ac_file is unchanged" >&6;}
85f61964 24425 else
07c7b319 24426 rm -f "$ac_file"
0ab5d73e
JH
24427 mv "$ac_tmp/config.h" "$ac_file" \
24428 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
85f61964
WP
24429 fi
24430 else
07c7b319 24431 $as_echo "/* $configure_input */" \
0ab5d73e
JH
24432 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
24433 || as_fn_error $? "could not create -" "$LINENO" 5
85f61964 24434 fi
85f61964
WP
24435 ;;
24436
083f09b4
WP
24437 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
24438$as_echo "$as_me: executing $ac_file commands" >&6;}
24439 ;;
85f61964 24440 esac
14967f86 24441
083f09b4
WP
24442
24443 case $ac_file$ac_mode in
e81f5cb3 24444 "po-directories":C)
083f09b4
WP
24445 for ac_file in $CONFIG_FILES; do
24446 # Support "outfile[:infile[:infile...]]"
24447 case "$ac_file" in
24448 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24449 esac
24450 # PO directories have a Makefile.in generated from Makefile.in.in.
24451 case "$ac_file" in */Makefile.in)
24452 # Adjust a relative srcdir.
24453 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
e81f5cb3 24454 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
083f09b4 24455 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
fa273052
WP
24456 # In autoconf-2.13 it is called $ac_given_srcdir.
24457 # In autoconf-2.50 it is called $srcdir.
24458 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
24459 case "$ac_given_srcdir" in
24460 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
24461 /*) top_srcdir="$ac_given_srcdir" ;;
24462 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
24463 esac
e81f5cb3
AJ
24464 # Treat a directory as a PO directory if and only if it has a
24465 # POTFILES.in file. This allows packages to have multiple PO
24466 # directories under different names or in different locations.
fa273052
WP
24467 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
24468 rm -f "$ac_dir/POTFILES"
24469 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
e81f5cb3
AJ
24470 gt_tab=`printf '\t'`
24471 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
fa273052 24472 POMAKEFILEDEPS="POTFILES.in"
e81f5cb3 24473 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
fa273052
WP
24474 # on $ac_dir but don't depend on user-specified configuration
24475 # parameters.
24476 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
24477 # The LINGUAS file contains the set of available languages.
24478 if test -n "$OBSOLETE_ALL_LINGUAS"; then
24479 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
24480 fi
e81f5cb3
AJ
24481 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
24482 # Hide the ALL_LINGUAS assignment from automake < 1.5.
fa273052
WP
24483 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
24484 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
24485 else
24486 # The set of available languages was given in configure.in.
e81f5cb3 24487 # Hide the ALL_LINGUAS assignment from automake < 1.5.
fa273052
WP
24488 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
24489 fi
e81f5cb3
AJ
24490 # Compute POFILES
24491 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
24492 # Compute UPDATEPOFILES
24493 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
24494 # Compute DUMMYPOFILES
24495 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
24496 # Compute GMOFILES
24497 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
fa273052
WP
24498 case "$ac_given_srcdir" in
24499 .) srcdirpre= ;;
24500 *) srcdirpre='$(srcdir)/' ;;
24501 esac
24502 POFILES=
fa273052
WP
24503 UPDATEPOFILES=
24504 DUMMYPOFILES=
e81f5cb3 24505 GMOFILES=
fa273052
WP
24506 for lang in $ALL_LINGUAS; do
24507 POFILES="$POFILES $srcdirpre$lang.po"
fa273052
WP
24508 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
24509 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
e81f5cb3 24510 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
fa273052
WP
24511 done
24512 # CATALOGS depends on both $ac_dir and the user's LINGUAS
24513 # environment variable.
24514 INST_LINGUAS=
24515 if test -n "$ALL_LINGUAS"; then
24516 for presentlang in $ALL_LINGUAS; do
24517 useit=no
24518 if test "%UNSET%" != "$LINGUAS"; then
24519 desiredlanguages="$LINGUAS"
24520 else
24521 desiredlanguages="$ALL_LINGUAS"
24522 fi
24523 for desiredlang in $desiredlanguages; do
24524 # Use the presentlang catalog if desiredlang is
24525 # a. equal to presentlang, or
24526 # b. a variant of presentlang (because in this case,
24527 # presentlang can be used as a fallback for messages
24528 # which are not translated in the desiredlang catalog).
24529 case "$desiredlang" in
24530 "$presentlang"*) useit=yes;;
24531 esac
24532 done
24533 if test $useit = yes; then
24534 INST_LINGUAS="$INST_LINGUAS $presentlang"
24535 fi
24536 done
24537 fi
24538 CATALOGS=
24539 if test -n "$INST_LINGUAS"; then
24540 for lang in $INST_LINGUAS; do
24541 CATALOGS="$CATALOGS $lang.gmo"
24542 done
24543 fi
24544 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
e81f5cb3 24545 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
fa273052
WP
24546 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
24547 if test -f "$f"; then
24548 case "$f" in
24549 *.orig | *.bak | *~) ;;
24550 *) cat "$f" >> "$ac_dir/Makefile" ;;
24551 esac
24552 fi
24553 done
24554 fi
24555 ;;
24556 esac
24557 done ;;
083f09b4
WP
24558
24559 esac
85f61964
WP
24560done # for ac_tag
24561
24562
648c9700 24563as_fn_exit 0
85f61964 24564_ACEOF
85f61964
WP
24565ac_clean_files=$ac_clean_files_save
24566
07c7b319 24567test $ac_write_fail = 0 ||
0ab5d73e 24568 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
07c7b319 24569
85f61964
WP
24570
24571# configure is writing to config.log, and then calls config.status.
24572# config.status does its own redirection, appending to config.log.
24573# Unfortunately, on DOS this fails, as config.log is still kept open
24574# by configure, so config.status won't be able to write to it; its
24575# output is simply discarded. So we exec the FD to /dev/null,
24576# effectively closing config.log, so it can be properly (re)opened and
24577# appended to by config.status. When coming back to configure, we
24578# need to make the FD available again.
24579if test "$no_create" != yes; then
24580 ac_cs_success=:
24581 ac_config_status_args=
24582 test "$silent" = yes &&
24583 ac_config_status_args="$ac_config_status_args --quiet"
24584 exec 5>/dev/null
24585 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24586 exec 5>>config.log
24587 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24588 # would make configure fail if this is the last instruction.
0ab5d73e 24589 $ac_cs_success || as_fn_exit 1
85f61964 24590fi
07c7b319 24591if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
648c9700 24592 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
105203ad 24593$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
07c7b319 24594fi
85f61964
WP
24595
24596
c6167e86
AJ
24597 ${as_echo:="echo"} ${as_me:="configure"}": touching .deps files"
24598 for i in $(find . -name Makefile); do
24599 DEPSFILE="$(dirname $i)/.deps"
24600 test -f "$DEPSFILE" && rm "$DEPSFILE"
24601 touch -t 0001010000 "$DEPSFILE"
24602 done
24603
65863905
AJ
24604
24605
6df79d8f 24606 if test "${DIGEST_FRONTEND}" = "Internal"; then :
d9b514bf
AJ
24607 DIGEST_FRONTEND="None (Internal MD5/SHA/HMAC/PBKDF2 Fallback)"
24608fi
6df79d8f 24609 if test "${RANDOM_FRONTEND}" = "Internal"; then :
d9b514bf 24610 RANDOM_FRONTEND="None (Internal ChaCha20-based Fallback RNG)"
156a2bd0 24611fi
6df79d8f 24612 if test "${BUILD_WARNINGS}" = "Yes"; then :
670f5931 24613 BUILD_WARNINGS="Yes (NOT INTENDED FOR PRODUCTION USAGE)"
3f9992da
AJ
24614fi
24615 if test "${COMPILER_SANITIZERS}" = "Yes"; then :
d45b7041 24616 COMPILER_SANITIZERS="Yes (${COMPILER_SANITIZERS_ENABLED})"
670f5931 24617fi
6df79d8f 24618 if test "x${USE_NLS}" = "xyes"; then :
a65bc8da
AJ
24619 USE_NLS="Yes"
24620else
24621 USE_NLS="No"
24622fi
f28b03d5 24623
73d7acad
AJ
24624 if test "x${FEATURE_SASL_ECDH_X25519_CHALLENGE}" != "xYes"; then :
24625 FEATURE_SASL_ECDH_X25519_CHALLENGE="No"
24626fi
24627 if test "x${FEATURE_SASL_ECDSA_NIST256P_CHALLENGE}" != "xYes"; then :
24628 FEATURE_SASL_ECDSA_NIST256P_CHALLENGE="No"
24629fi
24630 if test "x${FEATURE_SASL_SCRAM}" != "xYes"; then :
24631 FEATURE_SASL_SCRAM="No"
52d1876b
AJ
24632fi
24633
24634 if test "${LIBARGON2}${LIBARGON2_TYPE_ID}" = "YesNo"; then :
24635
24636 LIBARGON2="Partial (Please consider upgrading your Argon2 library)"
24637
73d7acad
AJ
24638fi
24639
6df79d8f 24640 echo "
109cf8f3 24641Configuration of ${PACKAGE_STRING}:
f7c1979e 24642
73d7acad 24643 Directories:
f7c1979e 24644 Installation Prefix .....: ${prefix}
afac9cc5 24645 Binary Directory ........: ${bindir}
e717550e 24646 Module Directory ........: ${MODDIR}/modules
f7c1979e 24647 Config Directory ........: ${sysconfdir}
f7c1979e 24648 Data Directory ..........: ${DATADIR}
0c76cf6a 24649 Logfile Directory .......: ${LOGDIR}
e717550e 24650 PID File Directory ......: ${RUNDIR}
f7c1979e 24651
73d7acad
AJ
24652 Libraries:
24653 ARM mbedTLS support .....: ${LIBMBEDCRYPTO}
583552e5 24654 CrackLib support ........: ${LIBCRACK}
fbced731 24655 GNU libgcrypt support ...: ${LIBGCRYPT}
583552e5 24656 GNU libidn support ......: ${LIBIDN}
fbced731 24657 GNU Nettle support ......: ${LIBNETTLE}
73d7acad 24658 LDAP support ............: ${LIBLDAP}
583552e5
AJ
24659 OpenSSL support .........: ${LIBCRYPTO}
24660 passwdqc support ........: ${LIBPASSWDQC}
24661 PCRE support ............: ${LIBPCRE}
24662 Perl support ............: ${LIBPERL}
24663 QR Code support .........: ${LIBQRENCODE}
24664 Sodium support ..........: ${LIBSODIUM}
f7c1979e 24665
73d7acad
AJ
24666 Password Cryptography:
24667 Argon2 support ..........: ${LIBARGON2}
24668 crypt(3) support ........: ${LIBCRYPT}
24669 scrypt support ..........: ${LIBSODIUM_SCRYPT}
24670
24671 SASL Mechanisms:
24672 AUTHCOOKIE ..............: Yes
24673 ECDH-X25519-CHALLENGE ...: ${FEATURE_SASL_ECDH_X25519_CHALLENGE}
24674 ECDSA-NIST256P-CHALLENGE : ${FEATURE_SASL_ECDSA_NIST256P_CHALLENGE}
24675 EXTERNAL ................: Yes
24676 PLAIN ...................: Yes
24677 SCRAM ...................: ${FEATURE_SASL_SCRAM}
24678
24679 Program Features:
4f9e5d3c 24680 Contrib Modules .........: ${CONTRIB_MODULES}
21f35da3 24681 Crypto Benchmarking .....: ${CRYPTO_BENCHMARKING}
73d7acad 24682 Digest Frontend .........: ${DIGEST_FRONTEND}
a57c74d8
AJ
24683 ECDH-X25519 Tool ........: ${ECDH_X25519_TOOL}
24684 ECDSA-NIST256P Tools ....: ${ECDSA_NIST256P_TOOLS}
fe1e7dec 24685 Heap Allocator ..........: ${HEAP_ALLOCATOR}
a65bc8da 24686 Internationalization ....: ${USE_NLS}
4f9e5d3c 24687 Large Network Support ...: ${LARGE_NET}
73d7acad 24688 Legacy Crypto Modules ...: ${LEGACY_PWCRYPTO}
4f9e5d3c 24689 Reproducible Builds .....: ${REPRODUCIBLE_BUILDS}
73d7acad 24690 RNG Frontend ............: ${RANDOM_FRONTEND}
3f9992da 24691
73d7acad 24692 Build Features:
4f9e5d3c 24693 Build Warnings ..........: ${BUILD_WARNINGS}
73d7acad 24694 Compiler Sanitizers .....: ${COMPILER_SANITIZERS}
c6167e86 24695 Mowgli Installation .....: ${LIBMOWGLI_SOURCE}
2dd84386 24696
73d7acad 24697 Build Variables:
f7c1979e
AJ
24698 CC ......................: ${CC}
24699 CFLAGS ..................: ${CFLAGS}
24700 CPPFLAGS ................: ${CPPFLAGS}
f7c1979e 24701 LDFLAGS .................: ${LDFLAGS}
c523bb43
AJ
24702 LIBS ....................: ${LIBS}
24703
ad5cc67e 24704Type 'make' to build ${PACKAGE_TARNAME}, and 'make install' to install it.
c523bb43
AJ
24705"
24706
24707