Document cf_pair_replace
[freeradius.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for freeradius $Id$.
4 #
5 # Report bugs to <http://bugs.freeradius.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
16
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20   emulate sh
21   NULLCMD=:
22   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23   # is contrary to our usage.  Disable this feature.
24   alias -g '${1+"$@"}'='"$@"'
25   setopt NO_GLOB_SUBST
26 else
27   case `(set -o) 2>/dev/null` in #(
28   *posix*) :
29     set -o posix ;; #(
30   *) :
31      ;;
32 esac
33 fi
34
35
36 as_nl='
37 '
38 export as_nl
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if 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 --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50   as_echo='printf %s\n'
51   as_echo_n='printf %s'
52 else
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'
56   else
57     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58     as_echo_n_body='eval
59       arg=$1;
60       case $arg in #(
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'
69   fi
70   export as_echo_body
71   as_echo='sh -c $as_echo_body as_echo'
72 fi
73
74 # The user is always right.
75 if 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   }
81 fi
82
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.)
89 IFS=" ""        $as_nl"
90
91 # Find who we are.  Look in the path if we contain no directory separator.
92 as_myself=
93 case $0 in #((
94   *[\\/]* ) as_myself=$0 ;;
95   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96 for as_dir in $PATH
97 do
98   IFS=$as_save_IFS
99   test -z "$as_dir" && as_dir=.
100     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101   done
102 IFS=$as_save_IFS
103
104      ;;
105 esac
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.
108 if test "x$as_myself" = x; then
109   as_myself=$0
110 fi
111 if test ! -f "$as_myself"; then
112   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113   exit 1
114 fi
115
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.
120 for as_var in BASH_ENV ENV MAIL MAILPATH
121 do eval test x\${$as_var+set} = xset \
122   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123 done
124 PS1='$ '
125 PS2='> '
126 PS4='+ '
127
128 # NLS nuisances.
129 LC_ALL=C
130 export LC_ALL
131 LANGUAGE=C
132 export LANGUAGE
133
134 # CDPATH.
135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
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.
145 BASH_ENV=/dev/null
146 ENV=/dev/null
147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148 case $- in # ((((
149   *v*x* | *x*v* ) as_opts=-vx ;;
150   *v* ) as_opts=-v ;;
151   *x* ) as_opts=-x ;;
152   * ) as_opts= ;;
153 esac
154 exec $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
158 as_fn_exit 255
159   fi
160   # We don't want this to propagate to other subprocesses.
161           { _as_can_reexec=; unset _as_can_reexec;}
162 if 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
170 else
171   case \`(set -o) 2>/dev/null\` in #(
172   *posix*) :
173     set -o posix ;; #(
174   *) :
175      ;;
176 esac
177 fi
178 "
179   as_required="as_fn_return () { (exit \$1); }
180 as_fn_success () { as_fn_return 0; }
181 as_fn_failure () { as_fn_return 1; }
182 as_fn_ret_success () { return 0; }
183 as_fn_ret_failure () { return 1; }
184
185 exitcode=0
186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192 else
193   exitcode=1; echo positional parameters were not saved.
194 fi
195 test x\$exitcode = x0 || exit 1
196 test -x / || exit 1"
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
201 test \$(( 1 + 1 )) = 2 || exit 1"
202   if (eval "$as_required") 2>/dev/null; then :
203   as_have_required=yes
204 else
205   as_have_required=no
206 fi
207   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209 else
210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211 as_found=false
212 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213 do
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
227 fi
228 fi
229            done;;
230        esac
231   as_found=false
232 done
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
236 fi; }
237 IFS=$as_save_IFS
238
239
240       if test "x$CONFIG_SHELL" != x; then :
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.
246 BASH_ENV=/dev/null
247 ENV=/dev/null
248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249 case $- in # ((((
250   *v*x* | *x*v* ) as_opts=-vx ;;
251   *v* ) as_opts=-v ;;
252   *x* ) as_opts=-x ;;
253   * ) as_opts= ;;
254 esac
255 exec $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
259 exit 255
260 fi
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
269     $as_echo "$0: Please tell bug-autoconf@gnu.org and
270 $0: http://bugs.freeradius.org about your system, including
271 $0: any error possibly output before this message. Then
272 $0: install a modern shell, or manually run the script
273 $0: under such a shell if you do have one."
274   fi
275   exit 1
276 fi
277 fi
278 fi
279 SHELL=${CONFIG_SHELL-/bin/sh}
280 export SHELL
281 # Unset more variables known to interfere with behavior of common tools.
282 CLICOLOR_FORCE= GREP_OPTIONS=
283 unset CLICOLOR_FORCE GREP_OPTIONS
284
285 ## --------------------- ##
286 ## M4sh Shell Functions. ##
287 ## --------------------- ##
288 # as_fn_unset VAR
289 # ---------------
290 # Portably unset VAR.
291 as_fn_unset ()
292 {
293   { eval $1=; unset $1;}
294 }
295 as_unset=as_fn_unset
296
297 # as_fn_set_status STATUS
298 # -----------------------
299 # Set $? to STATUS, without forking.
300 as_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.
308 as_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.
318 as_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"
358   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361 } # as_fn_mkdir_p
362
363 # as_fn_executable_p FILE
364 # -----------------------
365 # Test if FILE is an executable regular file.
366 as_fn_executable_p ()
367 {
368   test -f "$1" && test -x "$1"
369 } # as_fn_executable_p
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.
376 if (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   }'
381 else
382   as_fn_append ()
383   {
384     eval $1=\$$1\$2
385   }
386 fi # 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.
393 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394   eval 'as_fn_arith ()
395   {
396     as_val=$(( $* ))
397   }'
398 else
399   as_fn_arith ()
400   {
401     as_val=`expr "$@" || test $? -eq 1`
402   }
403 fi # as_fn_arith
404
405
406 # as_fn_error STATUS ERROR [LINENO LOG_FD]
407 # ----------------------------------------
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
410 # script with STATUS, using 1 if that was 0.
411 as_fn_error ()
412 {
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
417   fi
418   $as_echo "$as_me: error: $2" >&2
419   as_fn_exit $as_status
420 } # as_fn_error
421
422 if expr a : '\(a\)' >/dev/null 2>&1 &&
423    test "X`expr 00001 : '.*\(...\)'`" = X001; then
424   as_expr=expr
425 else
426   as_expr=false
427 fi
428
429 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430   as_basename=basename
431 else
432   as_basename=false
433 fi
434
435 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436   as_dirname=dirname
437 else
438   as_dirname=false
439 fi
440
441 as_me=`$as_basename -- "$0" ||
442 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443          X"$0" : 'X\(//\)$' \| \
444          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445 $as_echo X/"$0" |
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
460 # Avoid depending upon Character Ranges.
461 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464 as_cr_digits='0123456789'
465 as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
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; }
490
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
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
501 }
502
503 ECHO_C= ECHO_N= ECHO_T=
504 case `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';;
514 esac
515
516 rm -f conf$$ conf$$.exe conf$$.file
517 if test -d conf$$.dir; then
518   rm -f conf$$.dir/conf$$.file
519 else
520   rm -f conf$$.dir
521   mkdir conf$$.dir 2>/dev/null
522 fi
523 if (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.
529     # In both cases, we have to default to `cp -pR'.
530     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531       as_ln_s='cp -pR'
532   elif ln conf$$.file conf$$ 2>/dev/null; then
533     as_ln_s=ln
534   else
535     as_ln_s='cp -pR'
536   fi
537 else
538   as_ln_s='cp -pR'
539 fi
540 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541 rmdir conf$$.dir 2>/dev/null
542
543 if mkdir -p . 2>/dev/null; then
544   as_mkdir_p='mkdir -p "$as_dir"'
545 else
546   test -d ./-p && rmdir ./-p
547   as_mkdir_p=false
548 fi
549
550 as_test_x='test -x'
551 as_executable_p=as_fn_executable_p
552
553 # Sed expression to map a string onto a valid CPP name.
554 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556 # Sed expression to map a string onto a valid variable name.
557 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560 test -n "$DJDIR" || exec 7<&0 </dev/null
561 exec 6>&1
562
563 # Name of the host.
564 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565 # so uname gets run too.
566 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568 #
569 # Initializations.
570 #
571 ac_default_prefix=/usr/local
572 ac_clean_files=
573 ac_config_libobj_dir=.
574 LIBOBJS=
575 cross_compiling=no
576 subdirs=
577 MFLAGS=
578 MAKEFLAGS=
579
580 # Identity of this package.
581 PACKAGE_NAME='freeradius'
582 PACKAGE_TARNAME='freeradius'
583 PACKAGE_VERSION='$Id$'
584 PACKAGE_STRING='freeradius $Id$'
585 PACKAGE_BUGREPORT='http://bugs.freeradius.org'
586 PACKAGE_URL='http://www.freeradius.org'
587
588 ac_unique_file="src/main/radiusd.c"
589 # Factoring default headers for most tests.
590 ac_includes_default="\
591 #include <stdio.h>
592 #ifdef HAVE_SYS_TYPES_H
593 # include <sys/types.h>
594 #endif
595 #ifdef HAVE_SYS_STAT_H
596 # include <sys/stat.h>
597 #endif
598 #ifdef STDC_HEADERS
599 # include <stdlib.h>
600 # include <stddef.h>
601 #else
602 # ifdef HAVE_STDLIB_H
603 #  include <stdlib.h>
604 # endif
605 #endif
606 #ifdef HAVE_STRING_H
607 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
608 #  include <memory.h>
609 # endif
610 # include <string.h>
611 #endif
612 #ifdef HAVE_STRINGS_H
613 # include <strings.h>
614 #endif
615 #ifdef HAVE_INTTYPES_H
616 # include <inttypes.h>
617 #endif
618 #ifdef HAVE_STDINT_H
619 # include <stdint.h>
620 #endif
621 #ifdef HAVE_UNISTD_H
622 # include <unistd.h>
623 #endif"
624
625 enable_option_checking=no
626 ac_subst_vars='LTLIBOBJS
627 LIBOBJS
628 STATIC_MODULES
629 USE_STATIC_LIBS
630 USE_SHARED_LIBS
631 INSTALLSTRIP
632 MODULES
633 subdirs
634 HOSTINFO
635 CRYPTLIB
636 LIBPREFIX
637 COLLECTDC_LDFLAGS
638 COLLECTDC_LIBS
639 PCAP_LDFLAGS
640 PCAP_LIBS
641 OPENSSL_CPPFLAGS
642 OPENSSL_LDFLAGS
643 OPENSSL_LIBS
644 LIBREADLINE
645 TALLOC_LDFLAGS
646 TALLOC_LIBS
647 DIRNAME
648 LOCATE
649 AUTOHEADER
650 AUTOCONF
651 ACLOCAL
652 RUSERS
653 SNMPWALK
654 SNMPGET
655 PERL
656 openssl_version_check_config
657 modconfdir
658 dictdir
659 raddbdir
660 radacctdir
661 logdir
662 GIT
663 FR_MAKEFLAGS
664 MAKE
665 GMAKE
666 clang_path
667 RANLIB
668 EGREP
669 GREP
670 CPP
671 ac_ct_CXX
672 CXXFLAGS
673 CXX
674 OBJEXT
675 EXEEXT
676 ac_ct_CC
677 CPPFLAGS
678 LDFLAGS
679 CFLAGS
680 CC
681 target_os
682 target_vendor
683 target_cpu
684 target
685 host_os
686 host_vendor
687 host_cpu
688 host
689 build_os
690 build_vendor
691 build_cpu
692 build
693 RADIUSD_VERSION_STRING
694 target_alias
695 host_alias
696 build_alias
697 LIBS
698 ECHO_T
699 ECHO_N
700 ECHO_C
701 DEFS
702 mandir
703 localedir
704 libdir
705 psdir
706 pdfdir
707 dvidir
708 htmldir
709 infodir
710 docdir
711 oldincludedir
712 includedir
713 localstatedir
714 sharedstatedir
715 sysconfdir
716 datadir
717 datarootdir
718 libexecdir
719 sbindir
720 bindir
721 program_transform_name
722 prefix
723 exec_prefix
724 PACKAGE_URL
725 PACKAGE_BUGREPORT
726 PACKAGE_STRING
727 PACKAGE_VERSION
728 PACKAGE_TARNAME
729 PACKAGE_NAME
730 PATH_SEPARATOR
731 SHELL'
732 ac_subst_files=''
733 ac_user_opts='
734 enable_option_checking
735 enable_developer
736 enable_largefile
737 enable_strict_dependencies
738 enable_werror
739 with_docdir
740 with_logdir
741 with_radacctdir
742 with_raddbdir
743 with_dictdir
744 with_ascend_binary
745 with_threads
746 with_tcp
747 with_vmps
748 with_dhcp
749 with_static_modules
750 with_shared_libs
751 with_modules
752 with_experimental_modules
753 with_udpfromto
754 with_rlm_FOO_lib_dir
755 with_rlm_FOO_include_dir
756 with_openssl
757 with_openssl_lib_dir
758 with_openssl_include_dir
759 enable_openssl_version_check
760 with_talloc_lib_dir
761 with_talloc_include_dir
762 with_pcap_lib_dir
763 with_pcap_include_dir
764 with_collectdclient_lib_dir
765 with_collectdclient_include_dir
766 with_cap_lib_dir
767 with_cap_include_dir
768 with_execinfo_lib_dir
769 with_execinfo_include_dir
770 with_pcre
771 with_pcre_lib_dir
772 with_pcre_include_dir
773 with_regex
774 '
775       ac_precious_vars='build_alias
776 host_alias
777 target_alias
778 CC
779 CFLAGS
780 LDFLAGS
781 LIBS
782 CPPFLAGS
783 CXX
784 CXXFLAGS
785 CCC
786 CPP'
787 ac_subdirs_all='$mysubdirs'
788
789 # Initialize some variables set by options.
790 ac_init_help=
791 ac_init_version=false
792 ac_unrecognized_opts=
793 ac_unrecognized_sep=
794 # The variables have the same names as the options, with
795 # dashes changed to underlines.
796 cache_file=/dev/null
797 exec_prefix=NONE
798 no_create=
799 no_recursion=
800 prefix=NONE
801 program_prefix=NONE
802 program_suffix=NONE
803 program_transform_name=s,x,x,
804 silent=
805 site=
806 srcdir=
807 verbose=
808 x_includes=NONE
809 x_libraries=NONE
810
811 # Installation directory options.
812 # These are left unexpanded so users can "make install exec_prefix=/foo"
813 # and all the variables that are supposed to be based on exec_prefix
814 # by default will actually change.
815 # Use braces instead of parens because sh, perl, etc. also accept them.
816 # (The list follows the same order as the GNU Coding Standards.)
817 bindir='${exec_prefix}/bin'
818 sbindir='${exec_prefix}/sbin'
819 libexecdir='${exec_prefix}/libexec'
820 datarootdir='${prefix}/share'
821 datadir='${datarootdir}'
822 sysconfdir='${prefix}/etc'
823 sharedstatedir='${prefix}/com'
824 localstatedir='${prefix}/var'
825 includedir='${prefix}/include'
826 oldincludedir='/usr/include'
827 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
828 infodir='${datarootdir}/info'
829 htmldir='${docdir}'
830 dvidir='${docdir}'
831 pdfdir='${docdir}'
832 psdir='${docdir}'
833 libdir='${exec_prefix}/lib'
834 localedir='${datarootdir}/locale'
835 mandir='${datarootdir}/man'
836
837 ac_prev=
838 ac_dashdash=
839 for ac_option
840 do
841   # If the previous option needs an argument, assign it.
842   if test -n "$ac_prev"; then
843     eval $ac_prev=\$ac_option
844     ac_prev=
845     continue
846   fi
847
848   case $ac_option in
849   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
850   *=)   ac_optarg= ;;
851   *)    ac_optarg=yes ;;
852   esac
853
854   # Accept the important Cygnus configure options, so we can diagnose typos.
855
856   case $ac_dashdash$ac_option in
857   --)
858     ac_dashdash=yes ;;
859
860   -bindir | --bindir | --bindi | --bind | --bin | --bi)
861     ac_prev=bindir ;;
862   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
863     bindir=$ac_optarg ;;
864
865   -build | --build | --buil | --bui | --bu)
866     ac_prev=build_alias ;;
867   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
868     build_alias=$ac_optarg ;;
869
870   -cache-file | --cache-file | --cache-fil | --cache-fi \
871   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
872     ac_prev=cache_file ;;
873   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
874   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
875     cache_file=$ac_optarg ;;
876
877   --config-cache | -C)
878     cache_file=config.cache ;;
879
880   -datadir | --datadir | --datadi | --datad)
881     ac_prev=datadir ;;
882   -datadir=* | --datadir=* | --datadi=* | --datad=*)
883     datadir=$ac_optarg ;;
884
885   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
886   | --dataroo | --dataro | --datar)
887     ac_prev=datarootdir ;;
888   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
889   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
890     datarootdir=$ac_optarg ;;
891
892   -disable-* | --disable-*)
893     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
894     # Reject names that are not valid shell variable names.
895     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
896       as_fn_error $? "invalid feature name: $ac_useropt"
897     ac_useropt_orig=$ac_useropt
898     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
899     case $ac_user_opts in
900       *"
901 "enable_$ac_useropt"
902 "*) ;;
903       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
904          ac_unrecognized_sep=', ';;
905     esac
906     eval enable_$ac_useropt=no ;;
907
908   -docdir | --docdir | --docdi | --doc | --do)
909     ac_prev=docdir ;;
910   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
911     docdir=$ac_optarg ;;
912
913   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
914     ac_prev=dvidir ;;
915   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
916     dvidir=$ac_optarg ;;
917
918   -enable-* | --enable-*)
919     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
920     # Reject names that are not valid shell variable names.
921     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
922       as_fn_error $? "invalid feature name: $ac_useropt"
923     ac_useropt_orig=$ac_useropt
924     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
925     case $ac_user_opts in
926       *"
927 "enable_$ac_useropt"
928 "*) ;;
929       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
930          ac_unrecognized_sep=', ';;
931     esac
932     eval enable_$ac_useropt=\$ac_optarg ;;
933
934   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
935   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
936   | --exec | --exe | --ex)
937     ac_prev=exec_prefix ;;
938   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
939   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
940   | --exec=* | --exe=* | --ex=*)
941     exec_prefix=$ac_optarg ;;
942
943   -gas | --gas | --ga | --g)
944     # Obsolete; use --with-gas.
945     with_gas=yes ;;
946
947   -help | --help | --hel | --he | -h)
948     ac_init_help=long ;;
949   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
950     ac_init_help=recursive ;;
951   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
952     ac_init_help=short ;;
953
954   -host | --host | --hos | --ho)
955     ac_prev=host_alias ;;
956   -host=* | --host=* | --hos=* | --ho=*)
957     host_alias=$ac_optarg ;;
958
959   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
960     ac_prev=htmldir ;;
961   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
962   | --ht=*)
963     htmldir=$ac_optarg ;;
964
965   -includedir | --includedir | --includedi | --included | --include \
966   | --includ | --inclu | --incl | --inc)
967     ac_prev=includedir ;;
968   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
969   | --includ=* | --inclu=* | --incl=* | --inc=*)
970     includedir=$ac_optarg ;;
971
972   -infodir | --infodir | --infodi | --infod | --info | --inf)
973     ac_prev=infodir ;;
974   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
975     infodir=$ac_optarg ;;
976
977   -libdir | --libdir | --libdi | --libd)
978     ac_prev=libdir ;;
979   -libdir=* | --libdir=* | --libdi=* | --libd=*)
980     libdir=$ac_optarg ;;
981
982   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
983   | --libexe | --libex | --libe)
984     ac_prev=libexecdir ;;
985   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
986   | --libexe=* | --libex=* | --libe=*)
987     libexecdir=$ac_optarg ;;
988
989   -localedir | --localedir | --localedi | --localed | --locale)
990     ac_prev=localedir ;;
991   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
992     localedir=$ac_optarg ;;
993
994   -localstatedir | --localstatedir | --localstatedi | --localstated \
995   | --localstate | --localstat | --localsta | --localst | --locals)
996     ac_prev=localstatedir ;;
997   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
998   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
999     localstatedir=$ac_optarg ;;
1000
1001   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1002     ac_prev=mandir ;;
1003   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1004     mandir=$ac_optarg ;;
1005
1006   -nfp | --nfp | --nf)
1007     # Obsolete; use --without-fp.
1008     with_fp=no ;;
1009
1010   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1011   | --no-cr | --no-c | -n)
1012     no_create=yes ;;
1013
1014   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1015   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1016     no_recursion=yes ;;
1017
1018   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1019   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1020   | --oldin | --oldi | --old | --ol | --o)
1021     ac_prev=oldincludedir ;;
1022   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1023   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1024   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1025     oldincludedir=$ac_optarg ;;
1026
1027   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1028     ac_prev=prefix ;;
1029   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1030     prefix=$ac_optarg ;;
1031
1032   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1033   | --program-pre | --program-pr | --program-p)
1034     ac_prev=program_prefix ;;
1035   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1036   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1037     program_prefix=$ac_optarg ;;
1038
1039   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1040   | --program-suf | --program-su | --program-s)
1041     ac_prev=program_suffix ;;
1042   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1043   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1044     program_suffix=$ac_optarg ;;
1045
1046   -program-transform-name | --program-transform-name \
1047   | --program-transform-nam | --program-transform-na \
1048   | --program-transform-n | --program-transform- \
1049   | --program-transform | --program-transfor \
1050   | --program-transfo | --program-transf \
1051   | --program-trans | --program-tran \
1052   | --progr-tra | --program-tr | --program-t)
1053     ac_prev=program_transform_name ;;
1054   -program-transform-name=* | --program-transform-name=* \
1055   | --program-transform-nam=* | --program-transform-na=* \
1056   | --program-transform-n=* | --program-transform-=* \
1057   | --program-transform=* | --program-transfor=* \
1058   | --program-transfo=* | --program-transf=* \
1059   | --program-trans=* | --program-tran=* \
1060   | --progr-tra=* | --program-tr=* | --program-t=*)
1061     program_transform_name=$ac_optarg ;;
1062
1063   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1064     ac_prev=pdfdir ;;
1065   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1066     pdfdir=$ac_optarg ;;
1067
1068   -psdir | --psdir | --psdi | --psd | --ps)
1069     ac_prev=psdir ;;
1070   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1071     psdir=$ac_optarg ;;
1072
1073   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1074   | -silent | --silent | --silen | --sile | --sil)
1075     silent=yes ;;
1076
1077   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1078     ac_prev=sbindir ;;
1079   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1080   | --sbi=* | --sb=*)
1081     sbindir=$ac_optarg ;;
1082
1083   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1084   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1085   | --sharedst | --shareds | --shared | --share | --shar \
1086   | --sha | --sh)
1087     ac_prev=sharedstatedir ;;
1088   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1089   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1090   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1091   | --sha=* | --sh=*)
1092     sharedstatedir=$ac_optarg ;;
1093
1094   -site | --site | --sit)
1095     ac_prev=site ;;
1096   -site=* | --site=* | --sit=*)
1097     site=$ac_optarg ;;
1098
1099   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1100     ac_prev=srcdir ;;
1101   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1102     srcdir=$ac_optarg ;;
1103
1104   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1105   | --syscon | --sysco | --sysc | --sys | --sy)
1106     ac_prev=sysconfdir ;;
1107   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1108   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1109     sysconfdir=$ac_optarg ;;
1110
1111   -target | --target | --targe | --targ | --tar | --ta | --t)
1112     ac_prev=target_alias ;;
1113   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1114     target_alias=$ac_optarg ;;
1115
1116   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1117     verbose=yes ;;
1118
1119   -version | --version | --versio | --versi | --vers | -V)
1120     ac_init_version=: ;;
1121
1122   -with-* | --with-*)
1123     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1124     # Reject names that are not valid shell variable names.
1125     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1126       as_fn_error $? "invalid package name: $ac_useropt"
1127     ac_useropt_orig=$ac_useropt
1128     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1129     case $ac_user_opts in
1130       *"
1131 "with_$ac_useropt"
1132 "*) ;;
1133       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1134          ac_unrecognized_sep=', ';;
1135     esac
1136     eval with_$ac_useropt=\$ac_optarg ;;
1137
1138   -without-* | --without-*)
1139     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1140     # Reject names that are not valid shell variable names.
1141     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1142       as_fn_error $? "invalid package name: $ac_useropt"
1143     ac_useropt_orig=$ac_useropt
1144     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1145     case $ac_user_opts in
1146       *"
1147 "with_$ac_useropt"
1148 "*) ;;
1149       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1150          ac_unrecognized_sep=', ';;
1151     esac
1152     eval with_$ac_useropt=no ;;
1153
1154   --x)
1155     # Obsolete; use --with-x.
1156     with_x=yes ;;
1157
1158   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1159   | --x-incl | --x-inc | --x-in | --x-i)
1160     ac_prev=x_includes ;;
1161   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1162   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1163     x_includes=$ac_optarg ;;
1164
1165   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1166   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1167     ac_prev=x_libraries ;;
1168   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1169   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1170     x_libraries=$ac_optarg ;;
1171
1172   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1173 Try \`$0 --help' for more information"
1174     ;;
1175
1176   *=*)
1177     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1178     # Reject names that are not valid shell variable names.
1179     case $ac_envvar in #(
1180       '' | [0-9]* | *[!_$as_cr_alnum]* )
1181       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1182     esac
1183     eval $ac_envvar=\$ac_optarg
1184     export $ac_envvar ;;
1185
1186   *)
1187     # FIXME: should be removed in autoconf 3.0.
1188     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1189     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1190       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1191     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1192     ;;
1193
1194   esac
1195 done
1196
1197 if test -n "$ac_prev"; then
1198   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1199   as_fn_error $? "missing argument to $ac_option"
1200 fi
1201
1202 if test -n "$ac_unrecognized_opts"; then
1203   case $enable_option_checking in
1204     no) ;;
1205     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1206     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1207   esac
1208 fi
1209
1210 # Check all directory arguments for consistency.
1211 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1212                 datadir sysconfdir sharedstatedir localstatedir includedir \
1213                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1214                 libdir localedir mandir
1215 do
1216   eval ac_val=\$$ac_var
1217   # Remove trailing slashes.
1218   case $ac_val in
1219     */ )
1220       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1221       eval $ac_var=\$ac_val;;
1222   esac
1223   # Be sure to have absolute directory names.
1224   case $ac_val in
1225     [\\/$]* | ?:[\\/]* )  continue;;
1226     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1227   esac
1228   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1229 done
1230
1231 # There might be people who depend on the old broken behavior: `$host'
1232 # used to hold the argument of --host etc.
1233 # FIXME: To remove some day.
1234 build=$build_alias
1235 host=$host_alias
1236 target=$target_alias
1237
1238 # FIXME: To remove some day.
1239 if test "x$host_alias" != x; then
1240   if test "x$build_alias" = x; then
1241     cross_compiling=maybe
1242   elif test "x$build_alias" != "x$host_alias"; then
1243     cross_compiling=yes
1244   fi
1245 fi
1246
1247 ac_tool_prefix=
1248 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1249
1250 test "$silent" = yes && exec 6>/dev/null
1251
1252
1253 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1254 ac_ls_di=`ls -di .` &&
1255 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1256   as_fn_error $? "working directory cannot be determined"
1257 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1258   as_fn_error $? "pwd does not report name of working directory"
1259
1260
1261 # Find the source files, if location was not specified.
1262 if test -z "$srcdir"; then
1263   ac_srcdir_defaulted=yes
1264   # Try the directory containing this script, then the parent directory.
1265   ac_confdir=`$as_dirname -- "$as_myself" ||
1266 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1267          X"$as_myself" : 'X\(//\)[^/]' \| \
1268          X"$as_myself" : 'X\(//\)$' \| \
1269          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1270 $as_echo X"$as_myself" |
1271     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1272             s//\1/
1273             q
1274           }
1275           /^X\(\/\/\)[^/].*/{
1276             s//\1/
1277             q
1278           }
1279           /^X\(\/\/\)$/{
1280             s//\1/
1281             q
1282           }
1283           /^X\(\/\).*/{
1284             s//\1/
1285             q
1286           }
1287           s/.*/./; q'`
1288   srcdir=$ac_confdir
1289   if test ! -r "$srcdir/$ac_unique_file"; then
1290     srcdir=..
1291   fi
1292 else
1293   ac_srcdir_defaulted=no
1294 fi
1295 if test ! -r "$srcdir/$ac_unique_file"; then
1296   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1297   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1298 fi
1299 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1300 ac_abs_confdir=`(
1301         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1302         pwd)`
1303 # When building in place, set srcdir=.
1304 if test "$ac_abs_confdir" = "$ac_pwd"; then
1305   srcdir=.
1306 fi
1307 # Remove unnecessary trailing slashes from srcdir.
1308 # Double slashes in file names in object file debugging info
1309 # mess up M-x gdb in Emacs.
1310 case $srcdir in
1311 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1312 esac
1313 for ac_var in $ac_precious_vars; do
1314   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1315   eval ac_env_${ac_var}_value=\$${ac_var}
1316   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1317   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1318 done
1319
1320 #
1321 # Report the --help message.
1322 #
1323 if test "$ac_init_help" = "long"; then
1324   # Omit some internal or obsolete options to make the list less imposing.
1325   # This message is too long to be a string in the A/UX 3.1 sh.
1326   cat <<_ACEOF
1327 \`configure' configures freeradius $Id$ to adapt to many kinds of systems.
1328
1329 Usage: $0 [OPTION]... [VAR=VALUE]...
1330
1331 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1332 VAR=VALUE.  See below for descriptions of some of the useful variables.
1333
1334 Defaults for the options are specified in brackets.
1335
1336 Configuration:
1337   -h, --help              display this help and exit
1338       --help=short        display options specific to this package
1339       --help=recursive    display the short help of all the included packages
1340   -V, --version           display version information and exit
1341   -q, --quiet, --silent   do not print \`checking ...' messages
1342       --cache-file=FILE   cache test results in FILE [disabled]
1343   -C, --config-cache      alias for \`--cache-file=config.cache'
1344   -n, --no-create         do not create output files
1345       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1346
1347 Installation directories:
1348   --prefix=PREFIX         install architecture-independent files in PREFIX
1349                           [$ac_default_prefix]
1350   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1351                           [PREFIX]
1352
1353 By default, \`make install' will install all the files in
1354 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1355 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1356 for instance \`--prefix=\$HOME'.
1357
1358 For better control, use the options below.
1359
1360 Fine tuning of the installation directories:
1361   --bindir=DIR            user executables [EPREFIX/bin]
1362   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1363   --libexecdir=DIR        program executables [EPREFIX/libexec]
1364   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1365   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1366   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1367   --libdir=DIR            object code libraries [EPREFIX/lib]
1368   --includedir=DIR        C header files [PREFIX/include]
1369   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1370   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1371   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1372   --infodir=DIR           info documentation [DATAROOTDIR/info]
1373   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1374   --mandir=DIR            man documentation [DATAROOTDIR/man]
1375   --docdir=DIR            documentation root [DATAROOTDIR/doc/freeradius]
1376   --htmldir=DIR           html documentation [DOCDIR]
1377   --dvidir=DIR            dvi documentation [DOCDIR]
1378   --pdfdir=DIR            pdf documentation [DOCDIR]
1379   --psdir=DIR             ps documentation [DOCDIR]
1380 _ACEOF
1381
1382   cat <<\_ACEOF
1383
1384 System types:
1385   --build=BUILD     configure for building on BUILD [guessed]
1386   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1387   --target=TARGET   configure for building compilers for TARGET [HOST]
1388 _ACEOF
1389 fi
1390
1391 if test -n "$ac_init_help"; then
1392   case $ac_init_help in
1393      short | recursive ) echo "Configuration of freeradius $Id$:";;
1394    esac
1395   cat <<\_ACEOF
1396
1397 Optional Features:
1398   --disable-option-checking  ignore unrecognized --enable/--with options
1399   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1400   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1401   --enable-developer      enables features of interest to developers.
1402   --disable-largefile     omit support for large files
1403   --enable-strict-dependencies  fail configure on lack of module dependancy.
1404   --enable-werror         causes the build to fail if any warnings are generated.
1405   --disable-openssl-version-check
1406                           disable vulnerable OpenSSL version check
1407
1408
1409 Optional Packages:
1410   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1411   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1412   --with-docdir=DIR       directory for documentation DATADIR/doc/freeradius
1413   --with-logdir=DIR       directory for logfiles LOCALSTATEDIR/log/radius
1414   --with-radacctdir=DIR   directory for detail files LOGDIR/radacct
1415   --with-raddbdir=DIR     directory for config files SYSCONFDIR/raddb
1416   --with-dictdir=DIR      directory for dictionary files DATAROOTDIR/freeradius
1417   --with-ascend-binary    include support for Ascend binary filter attributes (default=yes)
1418   --with-threads          use threads, if available.  (default=yes)
1419   --with-tcp              compile in TCP support. (default=yes)
1420   --with-vmps             compile in VMPS support. (default=yes)
1421   --with-dhcp             compile in DHCP support. (default=yes)
1422   --with-static-modules=QUOTED-MODULE-LIST
1423   --with-shared-libs      build dynamic libraries and link against them.
1424                           (default=yes)
1425   --with-modules=QUOTED-MODULE-LIST
1426   --with-experimental-modules
1427                           use experimental and unstable modules. (default=no,
1428                           unless --enable-developer=yes)
1429   --with-udpfromto        compile in UDPFROMTO support. (default=yes)
1430   --with-rlm-FOO-lib-dir=DIR
1431                           directory in which to look for library files used by
1432                           module FOO
1433   --with-rlm-FOO-include-dir=DIR
1434                           directory in which to look for include files used by
1435                           module FOO
1436   --with-openssl          use OpenSSL. (default=yes)
1437   --with-openssl-lib-dir=DIR
1438                           directory to look for OpenSSL library files
1439   --with-openssl-include-dir=DIR
1440                           directory to look for OpenSSL include files
1441   --with-talloc-lib-dir=DIR
1442                           directory in which to look for talloc library files
1443   --with-talloc-include-dir=DIR
1444                           directory in which to look for talloc include files
1445   --with-pcap-lib-dir=DIR directory in which to look for pcap library files
1446   --with-pcap-include-dir=DIR
1447                           directory in which to look for pcap include files
1448   --with-collectdclient-lib-dir=DIR
1449                           directory in which to look for collectdclient
1450                           library files
1451   --with-collectdclient-include-dir=DIR
1452                           directory in which to look for collectdclient
1453                           include files
1454   --with-cap-lib-dir=DIR  directory in which to look for cap library files
1455   --with-cap-include-dir=DIR
1456                           directory in which to look for cap include files
1457   --with-execinfo-lib-dir=DIR
1458                           directory in which to look for execinfo library
1459                           files
1460   --with-execinfo-include-dir=DIR
1461                           directory in which to look for execinfo include
1462                           files
1463   --with-pcre             use libpcre (if available). (default=yes)
1464   --with-pcre-lib-dir=DIR directory in which to look for pcre library files
1465   --with-pcre-include-dir=DIR
1466                           directory in which to look for pcre include files
1467   --with-regex            Whether to build with regular expressions
1468                           (default=yes)
1469
1470 Some influential environment variables:
1471   CC          C compiler command
1472   CFLAGS      C compiler flags
1473   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1474               nonstandard directory <lib dir>
1475   LIBS        libraries to pass to the linker, e.g. -l<library>
1476   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1477               you have headers in a nonstandard directory <include dir>
1478   CXX         C++ compiler command
1479   CXXFLAGS    C++ compiler flags
1480   CPP         C preprocessor
1481
1482 Use these variables to override the choices made by `configure' or to help
1483 it to find libraries and programs with nonstandard names/locations.
1484
1485 Report bugs to <http://bugs.freeradius.org>.
1486 freeradius home page: <http://www.freeradius.org>.
1487 _ACEOF
1488 ac_status=$?
1489 fi
1490
1491 if test "$ac_init_help" = "recursive"; then
1492   # If there are subdirs, report their specific --help.
1493   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1494     test -d "$ac_dir" ||
1495       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1496       continue
1497     ac_builddir=.
1498
1499 case "$ac_dir" in
1500 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1501 *)
1502   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1503   # A ".." for each directory in $ac_dir_suffix.
1504   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1505   case $ac_top_builddir_sub in
1506   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1507   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1508   esac ;;
1509 esac
1510 ac_abs_top_builddir=$ac_pwd
1511 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1512 # for backward compatibility:
1513 ac_top_builddir=$ac_top_build_prefix
1514
1515 case $srcdir in
1516   .)  # We are building in place.
1517     ac_srcdir=.
1518     ac_top_srcdir=$ac_top_builddir_sub
1519     ac_abs_top_srcdir=$ac_pwd ;;
1520   [\\/]* | ?:[\\/]* )  # Absolute name.
1521     ac_srcdir=$srcdir$ac_dir_suffix;
1522     ac_top_srcdir=$srcdir
1523     ac_abs_top_srcdir=$srcdir ;;
1524   *) # Relative name.
1525     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1526     ac_top_srcdir=$ac_top_build_prefix$srcdir
1527     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1528 esac
1529 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1530
1531     cd "$ac_dir" || { ac_status=$?; continue; }
1532     # Check for guested configure.
1533     if test -f "$ac_srcdir/configure.gnu"; then
1534       echo &&
1535       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1536     elif test -f "$ac_srcdir/configure"; then
1537       echo &&
1538       $SHELL "$ac_srcdir/configure" --help=recursive
1539     else
1540       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1541     fi || ac_status=$?
1542     cd "$ac_pwd" || { ac_status=$?; break; }
1543   done
1544 fi
1545
1546 test -n "$ac_init_help" && exit $ac_status
1547 if $ac_init_version; then
1548   cat <<\_ACEOF
1549 freeradius configure $Id$
1550 generated by GNU Autoconf 2.69
1551
1552 Copyright (C) 2012 Free Software Foundation, Inc.
1553 This configure script is free software; the Free Software Foundation
1554 gives unlimited permission to copy, distribute and modify it.
1555 _ACEOF
1556   exit
1557 fi
1558
1559 ## ------------------------ ##
1560 ## Autoconf initialization. ##
1561 ## ------------------------ ##
1562
1563 # ac_fn_c_try_compile LINENO
1564 # --------------------------
1565 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1566 ac_fn_c_try_compile ()
1567 {
1568   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1569   rm -f conftest.$ac_objext
1570   if { { ac_try="$ac_compile"
1571 case "(($ac_try" in
1572   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1573   *) ac_try_echo=$ac_try;;
1574 esac
1575 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1576 $as_echo "$ac_try_echo"; } >&5
1577   (eval "$ac_compile") 2>conftest.err
1578   ac_status=$?
1579   if test -s conftest.err; then
1580     grep -v '^ *+' conftest.err >conftest.er1
1581     cat conftest.er1 >&5
1582     mv -f conftest.er1 conftest.err
1583   fi
1584   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1585   test $ac_status = 0; } && {
1586          test -z "$ac_c_werror_flag" ||
1587          test ! -s conftest.err
1588        } && test -s conftest.$ac_objext; then :
1589   ac_retval=0
1590 else
1591   $as_echo "$as_me: failed program was:" >&5
1592 sed 's/^/| /' conftest.$ac_ext >&5
1593
1594         ac_retval=1
1595 fi
1596   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1597   as_fn_set_status $ac_retval
1598
1599 } # ac_fn_c_try_compile
1600
1601 # ac_fn_cxx_try_compile LINENO
1602 # ----------------------------
1603 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1604 ac_fn_cxx_try_compile ()
1605 {
1606   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1607   rm -f conftest.$ac_objext
1608   if { { ac_try="$ac_compile"
1609 case "(($ac_try" in
1610   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1611   *) ac_try_echo=$ac_try;;
1612 esac
1613 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1614 $as_echo "$ac_try_echo"; } >&5
1615   (eval "$ac_compile") 2>conftest.err
1616   ac_status=$?
1617   if test -s conftest.err; then
1618     grep -v '^ *+' conftest.err >conftest.er1
1619     cat conftest.er1 >&5
1620     mv -f conftest.er1 conftest.err
1621   fi
1622   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1623   test $ac_status = 0; } && {
1624          test -z "$ac_cxx_werror_flag" ||
1625          test ! -s conftest.err
1626        } && test -s conftest.$ac_objext; then :
1627   ac_retval=0
1628 else
1629   $as_echo "$as_me: failed program was:" >&5
1630 sed 's/^/| /' conftest.$ac_ext >&5
1631
1632         ac_retval=1
1633 fi
1634   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1635   as_fn_set_status $ac_retval
1636
1637 } # ac_fn_cxx_try_compile
1638
1639 # ac_fn_c_try_cpp LINENO
1640 # ----------------------
1641 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1642 ac_fn_c_try_cpp ()
1643 {
1644   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1645   if { { ac_try="$ac_cpp conftest.$ac_ext"
1646 case "(($ac_try" in
1647   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1648   *) ac_try_echo=$ac_try;;
1649 esac
1650 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1651 $as_echo "$ac_try_echo"; } >&5
1652   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1653   ac_status=$?
1654   if test -s conftest.err; then
1655     grep -v '^ *+' conftest.err >conftest.er1
1656     cat conftest.er1 >&5
1657     mv -f conftest.er1 conftest.err
1658   fi
1659   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1660   test $ac_status = 0; } > conftest.i && {
1661          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1662          test ! -s conftest.err
1663        }; then :
1664   ac_retval=0
1665 else
1666   $as_echo "$as_me: failed program was:" >&5
1667 sed 's/^/| /' conftest.$ac_ext >&5
1668
1669     ac_retval=1
1670 fi
1671   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1672   as_fn_set_status $ac_retval
1673
1674 } # ac_fn_c_try_cpp
1675
1676 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1677 # -------------------------------------------------------
1678 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1679 # the include files in INCLUDES and setting the cache variable VAR
1680 # accordingly.
1681 ac_fn_c_check_header_mongrel ()
1682 {
1683   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1684   if eval \${$3+:} false; then :
1685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1686 $as_echo_n "checking for $2... " >&6; }
1687 if eval \${$3+:} false; then :
1688   $as_echo_n "(cached) " >&6
1689 fi
1690 eval ac_res=\$$3
1691                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1692 $as_echo "$ac_res" >&6; }
1693 else
1694   # Is the header compilable?
1695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1696 $as_echo_n "checking $2 usability... " >&6; }
1697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1698 /* end confdefs.h.  */
1699 $4
1700 #include <$2>
1701 _ACEOF
1702 if ac_fn_c_try_compile "$LINENO"; then :
1703   ac_header_compiler=yes
1704 else
1705   ac_header_compiler=no
1706 fi
1707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1709 $as_echo "$ac_header_compiler" >&6; }
1710
1711 # Is the header present?
1712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1713 $as_echo_n "checking $2 presence... " >&6; }
1714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1715 /* end confdefs.h.  */
1716 #include <$2>
1717 _ACEOF
1718 if ac_fn_c_try_cpp "$LINENO"; then :
1719   ac_header_preproc=yes
1720 else
1721   ac_header_preproc=no
1722 fi
1723 rm -f conftest.err conftest.i conftest.$ac_ext
1724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1725 $as_echo "$ac_header_preproc" >&6; }
1726
1727 # So?  What about this header?
1728 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1729   yes:no: )
1730     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1731 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1732     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1733 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1734     ;;
1735   no:yes:* )
1736     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1737 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1738     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1739 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1740     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1741 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1742     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1743 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1744     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1745 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1746 ( $as_echo "## ----------------------------------------- ##
1747 ## Report this to http://bugs.freeradius.org ##
1748 ## ----------------------------------------- ##"
1749      ) | sed "s/^/$as_me: WARNING:     /" >&2
1750     ;;
1751 esac
1752   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1753 $as_echo_n "checking for $2... " >&6; }
1754 if eval \${$3+:} false; then :
1755   $as_echo_n "(cached) " >&6
1756 else
1757   eval "$3=\$ac_header_compiler"
1758 fi
1759 eval ac_res=\$$3
1760                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1761 $as_echo "$ac_res" >&6; }
1762 fi
1763   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1764
1765 } # ac_fn_c_check_header_mongrel
1766
1767 # ac_fn_c_try_run LINENO
1768 # ----------------------
1769 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1770 # that executables *can* be run.
1771 ac_fn_c_try_run ()
1772 {
1773   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1774   if { { ac_try="$ac_link"
1775 case "(($ac_try" in
1776   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1777   *) ac_try_echo=$ac_try;;
1778 esac
1779 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1780 $as_echo "$ac_try_echo"; } >&5
1781   (eval "$ac_link") 2>&5
1782   ac_status=$?
1783   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1784   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1785   { { case "(($ac_try" in
1786   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1787   *) ac_try_echo=$ac_try;;
1788 esac
1789 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1790 $as_echo "$ac_try_echo"; } >&5
1791   (eval "$ac_try") 2>&5
1792   ac_status=$?
1793   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1794   test $ac_status = 0; }; }; then :
1795   ac_retval=0
1796 else
1797   $as_echo "$as_me: program exited with status $ac_status" >&5
1798        $as_echo "$as_me: failed program was:" >&5
1799 sed 's/^/| /' conftest.$ac_ext >&5
1800
1801        ac_retval=$ac_status
1802 fi
1803   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1804   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1805   as_fn_set_status $ac_retval
1806
1807 } # ac_fn_c_try_run
1808
1809 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1810 # -------------------------------------------------------
1811 # Tests whether HEADER exists and can be compiled using the include files in
1812 # INCLUDES, setting the cache variable VAR accordingly.
1813 ac_fn_c_check_header_compile ()
1814 {
1815   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1816   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1817 $as_echo_n "checking for $2... " >&6; }
1818 if eval \${$3+:} false; then :
1819   $as_echo_n "(cached) " >&6
1820 else
1821   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1822 /* end confdefs.h.  */
1823 $4
1824 #include <$2>
1825 _ACEOF
1826 if ac_fn_c_try_compile "$LINENO"; then :
1827   eval "$3=yes"
1828 else
1829   eval "$3=no"
1830 fi
1831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1832 fi
1833 eval ac_res=\$$3
1834                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1835 $as_echo "$ac_res" >&6; }
1836   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1837
1838 } # ac_fn_c_check_header_compile
1839
1840 # ac_fn_c_try_link LINENO
1841 # -----------------------
1842 # Try to link conftest.$ac_ext, and return whether this succeeded.
1843 ac_fn_c_try_link ()
1844 {
1845   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1846   rm -f conftest.$ac_objext conftest$ac_exeext
1847   if { { ac_try="$ac_link"
1848 case "(($ac_try" in
1849   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1850   *) ac_try_echo=$ac_try;;
1851 esac
1852 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1853 $as_echo "$ac_try_echo"; } >&5
1854   (eval "$ac_link") 2>conftest.err
1855   ac_status=$?
1856   if test -s conftest.err; then
1857     grep -v '^ *+' conftest.err >conftest.er1
1858     cat conftest.er1 >&5
1859     mv -f conftest.er1 conftest.err
1860   fi
1861   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1862   test $ac_status = 0; } && {
1863          test -z "$ac_c_werror_flag" ||
1864          test ! -s conftest.err
1865        } && test -s conftest$ac_exeext && {
1866          test "$cross_compiling" = yes ||
1867          test -x conftest$ac_exeext
1868        }; then :
1869   ac_retval=0
1870 else
1871   $as_echo "$as_me: failed program was:" >&5
1872 sed 's/^/| /' conftest.$ac_ext >&5
1873
1874         ac_retval=1
1875 fi
1876   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1877   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1878   # interfere with the next link command; also delete a directory that is
1879   # left behind by Apple's compiler.  We do this before executing the actions.
1880   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1881   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1882   as_fn_set_status $ac_retval
1883
1884 } # ac_fn_c_try_link
1885
1886 # ac_fn_c_check_func LINENO FUNC VAR
1887 # ----------------------------------
1888 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1889 ac_fn_c_check_func ()
1890 {
1891   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1892   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1893 $as_echo_n "checking for $2... " >&6; }
1894 if eval \${$3+:} false; then :
1895   $as_echo_n "(cached) " >&6
1896 else
1897   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1898 /* end confdefs.h.  */
1899 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1900    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1901 #define $2 innocuous_$2
1902
1903 /* System header to define __stub macros and hopefully few prototypes,
1904     which can conflict with char $2 (); below.
1905     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1906     <limits.h> exists even on freestanding compilers.  */
1907
1908 #ifdef __STDC__
1909 # include <limits.h>
1910 #else
1911 # include <assert.h>
1912 #endif
1913
1914 #undef $2
1915
1916 /* Override any GCC internal prototype to avoid an error.
1917    Use char because int might match the return type of a GCC
1918    builtin and then its argument prototype would still apply.  */
1919 #ifdef __cplusplus
1920 extern "C"
1921 #endif
1922 char $2 ();
1923 /* The GNU C library defines this for functions which it implements
1924     to always fail with ENOSYS.  Some functions are actually named
1925     something starting with __ and the normal name is an alias.  */
1926 #if defined __stub_$2 || defined __stub___$2
1927 choke me
1928 #endif
1929
1930 int
1931 main ()
1932 {
1933 return $2 ();
1934   ;
1935   return 0;
1936 }
1937 _ACEOF
1938 if ac_fn_c_try_link "$LINENO"; then :
1939   eval "$3=yes"
1940 else
1941   eval "$3=no"
1942 fi
1943 rm -f core conftest.err conftest.$ac_objext \
1944     conftest$ac_exeext conftest.$ac_ext
1945 fi
1946 eval ac_res=\$$3
1947                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1948 $as_echo "$ac_res" >&6; }
1949   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1950
1951 } # ac_fn_c_check_func
1952
1953 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1954 # -------------------------------------------
1955 # Tests whether TYPE exists after having included INCLUDES, setting cache
1956 # variable VAR accordingly.
1957 ac_fn_c_check_type ()
1958 {
1959   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1960   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1961 $as_echo_n "checking for $2... " >&6; }
1962 if eval \${$3+:} false; then :
1963   $as_echo_n "(cached) " >&6
1964 else
1965   eval "$3=no"
1966   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1967 /* end confdefs.h.  */
1968 $4
1969 int
1970 main ()
1971 {
1972 if (sizeof ($2))
1973          return 0;
1974   ;
1975   return 0;
1976 }
1977 _ACEOF
1978 if ac_fn_c_try_compile "$LINENO"; then :
1979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1980 /* end confdefs.h.  */
1981 $4
1982 int
1983 main ()
1984 {
1985 if (sizeof (($2)))
1986             return 0;
1987   ;
1988   return 0;
1989 }
1990 _ACEOF
1991 if ac_fn_c_try_compile "$LINENO"; then :
1992
1993 else
1994   eval "$3=yes"
1995 fi
1996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1997 fi
1998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1999 fi
2000 eval ac_res=\$$3
2001                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2002 $as_echo "$ac_res" >&6; }
2003   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2004
2005 } # ac_fn_c_check_type
2006
2007 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2008 # ---------------------------------------------
2009 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2010 # accordingly.
2011 ac_fn_c_check_decl ()
2012 {
2013   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014   as_decl_name=`echo $2|sed 's/ *(.*//'`
2015   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2016   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2017 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2018 if eval \${$3+:} false; then :
2019   $as_echo_n "(cached) " >&6
2020 else
2021   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2022 /* end confdefs.h.  */
2023 $4
2024 int
2025 main ()
2026 {
2027 #ifndef $as_decl_name
2028 #ifdef __cplusplus
2029   (void) $as_decl_use;
2030 #else
2031   (void) $as_decl_name;
2032 #endif
2033 #endif
2034
2035   ;
2036   return 0;
2037 }
2038 _ACEOF
2039 if ac_fn_c_try_compile "$LINENO"; then :
2040   eval "$3=yes"
2041 else
2042   eval "$3=no"
2043 fi
2044 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2045 fi
2046 eval ac_res=\$$3
2047                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2048 $as_echo "$ac_res" >&6; }
2049   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2050
2051 } # ac_fn_c_check_decl
2052 cat >config.log <<_ACEOF
2053 This file contains any messages produced by compilers while
2054 running configure, to aid debugging if configure makes a mistake.
2055
2056 It was created by freeradius $as_me $Id$, which was
2057 generated by GNU Autoconf 2.69.  Invocation command line was
2058
2059   $ $0 $@
2060
2061 _ACEOF
2062 exec 5>>config.log
2063 {
2064 cat <<_ASUNAME
2065 ## --------- ##
2066 ## Platform. ##
2067 ## --------- ##
2068
2069 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2070 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2071 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2072 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2073 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2074
2075 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2076 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2077
2078 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2079 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2080 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2081 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2082 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2083 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2084 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2085
2086 _ASUNAME
2087
2088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2089 for as_dir in $PATH
2090 do
2091   IFS=$as_save_IFS
2092   test -z "$as_dir" && as_dir=.
2093     $as_echo "PATH: $as_dir"
2094   done
2095 IFS=$as_save_IFS
2096
2097 } >&5
2098
2099 cat >&5 <<_ACEOF
2100
2101
2102 ## ----------- ##
2103 ## Core tests. ##
2104 ## ----------- ##
2105
2106 _ACEOF
2107
2108
2109 # Keep a trace of the command line.
2110 # Strip out --no-create and --no-recursion so they do not pile up.
2111 # Strip out --silent because we don't want to record it for future runs.
2112 # Also quote any args containing shell meta-characters.
2113 # Make two passes to allow for proper duplicate-argument suppression.
2114 ac_configure_args=
2115 ac_configure_args0=
2116 ac_configure_args1=
2117 ac_must_keep_next=false
2118 for ac_pass in 1 2
2119 do
2120   for ac_arg
2121   do
2122     case $ac_arg in
2123     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2124     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2125     | -silent | --silent | --silen | --sile | --sil)
2126       continue ;;
2127     *\'*)
2128       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2129     esac
2130     case $ac_pass in
2131     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2132     2)
2133       as_fn_append ac_configure_args1 " '$ac_arg'"
2134       if test $ac_must_keep_next = true; then
2135         ac_must_keep_next=false # Got value, back to normal.
2136       else
2137         case $ac_arg in
2138           *=* | --config-cache | -C | -disable-* | --disable-* \
2139           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2140           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2141           | -with-* | --with-* | -without-* | --without-* | --x)
2142             case "$ac_configure_args0 " in
2143               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2144             esac
2145             ;;
2146           -* ) ac_must_keep_next=true ;;
2147         esac
2148       fi
2149       as_fn_append ac_configure_args " '$ac_arg'"
2150       ;;
2151     esac
2152   done
2153 done
2154 { ac_configure_args0=; unset ac_configure_args0;}
2155 { ac_configure_args1=; unset ac_configure_args1;}
2156
2157 # When interrupted or exit'd, cleanup temporary files, and complete
2158 # config.log.  We remove comments because anyway the quotes in there
2159 # would cause problems or look ugly.
2160 # WARNING: Use '\'' to represent an apostrophe within the trap.
2161 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2162 trap 'exit_status=$?
2163   # Save into config.log some information that might help in debugging.
2164   {
2165     echo
2166
2167     $as_echo "## ---------------- ##
2168 ## Cache variables. ##
2169 ## ---------------- ##"
2170     echo
2171     # The following way of writing the cache mishandles newlines in values,
2172 (
2173   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2174     eval ac_val=\$$ac_var
2175     case $ac_val in #(
2176     *${as_nl}*)
2177       case $ac_var in #(
2178       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2179 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2180       esac
2181       case $ac_var in #(
2182       _ | IFS | as_nl) ;; #(
2183       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2184       *) { eval $ac_var=; unset $ac_var;} ;;
2185       esac ;;
2186     esac
2187   done
2188   (set) 2>&1 |
2189     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2190     *${as_nl}ac_space=\ *)
2191       sed -n \
2192         "s/'\''/'\''\\\\'\'''\''/g;
2193           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2194       ;; #(
2195     *)
2196       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2197       ;;
2198     esac |
2199     sort
2200 )
2201     echo
2202
2203     $as_echo "## ----------------- ##
2204 ## Output variables. ##
2205 ## ----------------- ##"
2206     echo
2207     for ac_var in $ac_subst_vars
2208     do
2209       eval ac_val=\$$ac_var
2210       case $ac_val in
2211       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2212       esac
2213       $as_echo "$ac_var='\''$ac_val'\''"
2214     done | sort
2215     echo
2216
2217     if test -n "$ac_subst_files"; then
2218       $as_echo "## ------------------- ##
2219 ## File substitutions. ##
2220 ## ------------------- ##"
2221       echo
2222       for ac_var in $ac_subst_files
2223       do
2224         eval ac_val=\$$ac_var
2225         case $ac_val in
2226         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2227         esac
2228         $as_echo "$ac_var='\''$ac_val'\''"
2229       done | sort
2230       echo
2231     fi
2232
2233     if test -s confdefs.h; then
2234       $as_echo "## ----------- ##
2235 ## confdefs.h. ##
2236 ## ----------- ##"
2237       echo
2238       cat confdefs.h
2239       echo
2240     fi
2241     test "$ac_signal" != 0 &&
2242       $as_echo "$as_me: caught signal $ac_signal"
2243     $as_echo "$as_me: exit $exit_status"
2244   } >&5
2245   rm -f core *.core core.conftest.* &&
2246     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2247     exit $exit_status
2248 ' 0
2249 for ac_signal in 1 2 13 15; do
2250   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2251 done
2252 ac_signal=0
2253
2254 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2255 rm -f -r conftest* confdefs.h
2256
2257 $as_echo "/* confdefs.h */" > confdefs.h
2258
2259 # Predefined preprocessor variables.
2260
2261 cat >>confdefs.h <<_ACEOF
2262 #define PACKAGE_NAME "$PACKAGE_NAME"
2263 _ACEOF
2264
2265 cat >>confdefs.h <<_ACEOF
2266 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2267 _ACEOF
2268
2269 cat >>confdefs.h <<_ACEOF
2270 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2271 _ACEOF
2272
2273 cat >>confdefs.h <<_ACEOF
2274 #define PACKAGE_STRING "$PACKAGE_STRING"
2275 _ACEOF
2276
2277 cat >>confdefs.h <<_ACEOF
2278 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2279 _ACEOF
2280
2281 cat >>confdefs.h <<_ACEOF
2282 #define PACKAGE_URL "$PACKAGE_URL"
2283 _ACEOF
2284
2285
2286 # Let the site file select an alternate cache file if it wants to.
2287 # Prefer an explicitly selected file to automatically selected ones.
2288 ac_site_file1=NONE
2289 ac_site_file2=NONE
2290 if test -n "$CONFIG_SITE"; then
2291   # We do not want a PATH search for config.site.
2292   case $CONFIG_SITE in #((
2293     -*)  ac_site_file1=./$CONFIG_SITE;;
2294     */*) ac_site_file1=$CONFIG_SITE;;
2295     *)   ac_site_file1=./$CONFIG_SITE;;
2296   esac
2297 elif test "x$prefix" != xNONE; then
2298   ac_site_file1=$prefix/share/config.site
2299   ac_site_file2=$prefix/etc/config.site
2300 else
2301   ac_site_file1=$ac_default_prefix/share/config.site
2302   ac_site_file2=$ac_default_prefix/etc/config.site
2303 fi
2304 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2305 do
2306   test "x$ac_site_file" = xNONE && continue
2307   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2308     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2309 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2310     sed 's/^/| /' "$ac_site_file" >&5
2311     . "$ac_site_file" \
2312       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2313 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2314 as_fn_error $? "failed to load site script $ac_site_file
2315 See \`config.log' for more details" "$LINENO" 5; }
2316   fi
2317 done
2318
2319 if test -r "$cache_file"; then
2320   # Some versions of bash will fail to source /dev/null (special files
2321   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2322   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2323     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2324 $as_echo "$as_me: loading cache $cache_file" >&6;}
2325     case $cache_file in
2326       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2327       *)                      . "./$cache_file";;
2328     esac
2329   fi
2330 else
2331   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2332 $as_echo "$as_me: creating cache $cache_file" >&6;}
2333   >$cache_file
2334 fi
2335
2336 # Check that the precious variables saved in the cache have kept the same
2337 # value.
2338 ac_cache_corrupted=false
2339 for ac_var in $ac_precious_vars; do
2340   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2341   eval ac_new_set=\$ac_env_${ac_var}_set
2342   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2343   eval ac_new_val=\$ac_env_${ac_var}_value
2344   case $ac_old_set,$ac_new_set in
2345     set,)
2346       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2347 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2348       ac_cache_corrupted=: ;;
2349     ,set)
2350       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2351 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2352       ac_cache_corrupted=: ;;
2353     ,);;
2354     *)
2355       if test "x$ac_old_val" != "x$ac_new_val"; then
2356         # differences in whitespace do not lead to failure.
2357         ac_old_val_w=`echo x $ac_old_val`
2358         ac_new_val_w=`echo x $ac_new_val`
2359         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2360           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2361 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2362           ac_cache_corrupted=:
2363         else
2364           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2365 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2366           eval $ac_var=\$ac_old_val
2367         fi
2368         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2369 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2370         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2371 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2372       fi;;
2373   esac
2374   # Pass precious variables to config.status.
2375   if test "$ac_new_set" = set; then
2376     case $ac_new_val in
2377     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2378     *) ac_arg=$ac_var=$ac_new_val ;;
2379     esac
2380     case " $ac_configure_args " in
2381       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2382       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2383     esac
2384   fi
2385 done
2386 if $ac_cache_corrupted; then
2387   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2388 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2389   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2390 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2391   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2392 fi
2393 ## -------------------- ##
2394 ## Main body of script. ##
2395 ## -------------------- ##
2396
2397 ac_ext=c
2398 ac_cpp='$CPP $CPPFLAGS'
2399 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2400 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2401 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2402
2403
2404
2405 ac_config_headers="$ac_config_headers src/include/autoconf.h"
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422 RADIUSD_MAJOR_VERSION=`cat VERSION | sed 's/\..*//'`
2423 RADIUSD_MINOR_VERSION=`cat VERSION | sed 's/^[^\.]*\.//' | sed 's/\..*$//'`
2424 RADIUSD_INCRM_VERSION=`cat VERSION | sed 's/^.*\..*\.//' | sed 's/[\.-].*$//'`
2425
2426 RADIUSD_VERSION=`echo | awk -v major="$RADIUSD_MAJOR_VERSION" \
2427 -v minor="$RADIUSD_MINOR_VERSION" \
2428 -v incrm="$RADIUSD_INCRM_VERSION" \
2429 '{ printf "%02i%02i%02i", major, minor, incrm }'`
2430
2431 RADIUSD_VERSION_STRING=`cat VERSION`
2432
2433
2434
2435
2436 cat >>confdefs.h <<_ACEOF
2437 #define RADIUSD_VERSION ${RADIUSD_VERSION}
2438 _ACEOF
2439
2440
2441 cat >>confdefs.h <<_ACEOF
2442 #define RADIUSD_VERSION_STRING "${RADIUSD_VERSION_STRING}"
2443 _ACEOF
2444
2445
2446
2447 # Check whether --enable-developer was given.
2448 if test "${enable_developer+set}" = set; then :
2449   enableval=$enable_developer;  case "$enableval" in
2450   no)
2451     developer=no
2452     ;;
2453   *)
2454     developer=yes
2455   esac
2456
2457 fi
2458
2459
2460 if test -d $srcdir/.git; then
2461   if test "x$developer" != "xno"; then
2462     { $as_echo "$as_me:${as_lineno-$LINENO}: found .git directory, enabling developer build implicitly, disable with --disable-developer" >&5
2463 $as_echo "$as_me: found .git directory, enabling developer build implicitly, disable with --disable-developer" >&6;}
2464     developer="yes"
2465   fi
2466 fi
2467
2468 if test "x$developer" = "xyes"; then
2469   : ${CFLAGS=-g3}
2470 fi
2471
2472
2473 ac_aux_dir=
2474 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2475   if test -f "$ac_dir/install-sh"; then
2476     ac_aux_dir=$ac_dir
2477     ac_install_sh="$ac_aux_dir/install-sh -c"
2478     break
2479   elif test -f "$ac_dir/install.sh"; then
2480     ac_aux_dir=$ac_dir
2481     ac_install_sh="$ac_aux_dir/install.sh -c"
2482     break
2483   elif test -f "$ac_dir/shtool"; then
2484     ac_aux_dir=$ac_dir
2485     ac_install_sh="$ac_aux_dir/shtool install -c"
2486     break
2487   fi
2488 done
2489 if test -z "$ac_aux_dir"; then
2490   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2491 fi
2492
2493 # These three variables are undocumented and unsupported,
2494 # and are intended to be withdrawn in a future Autoconf release.
2495 # They can cause serious problems if a builder's source tree is in a directory
2496 # whose full name contains unusual characters.
2497 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2498 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2499 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2500
2501
2502 # Make sure we can run config.sub.
2503 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2504   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2505
2506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2507 $as_echo_n "checking build system type... " >&6; }
2508 if ${ac_cv_build+:} false; then :
2509   $as_echo_n "(cached) " >&6
2510 else
2511   ac_build_alias=$build_alias
2512 test "x$ac_build_alias" = x &&
2513   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2514 test "x$ac_build_alias" = x &&
2515   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2516 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2517   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2518
2519 fi
2520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2521 $as_echo "$ac_cv_build" >&6; }
2522 case $ac_cv_build in
2523 *-*-*) ;;
2524 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2525 esac
2526 build=$ac_cv_build
2527 ac_save_IFS=$IFS; IFS='-'
2528 set x $ac_cv_build
2529 shift
2530 build_cpu=$1
2531 build_vendor=$2
2532 shift; shift
2533 # Remember, the first character of IFS is used to create $*,
2534 # except with old shells:
2535 build_os=$*
2536 IFS=$ac_save_IFS
2537 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2538
2539
2540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2541 $as_echo_n "checking host system type... " >&6; }
2542 if ${ac_cv_host+:} false; then :
2543   $as_echo_n "(cached) " >&6
2544 else
2545   if test "x$host_alias" = x; then
2546   ac_cv_host=$ac_cv_build
2547 else
2548   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2549     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2550 fi
2551
2552 fi
2553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2554 $as_echo "$ac_cv_host" >&6; }
2555 case $ac_cv_host in
2556 *-*-*) ;;
2557 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2558 esac
2559 host=$ac_cv_host
2560 ac_save_IFS=$IFS; IFS='-'
2561 set x $ac_cv_host
2562 shift
2563 host_cpu=$1
2564 host_vendor=$2
2565 shift; shift
2566 # Remember, the first character of IFS is used to create $*,
2567 # except with old shells:
2568 host_os=$*
2569 IFS=$ac_save_IFS
2570 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2571
2572
2573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2574 $as_echo_n "checking target system type... " >&6; }
2575 if ${ac_cv_target+:} false; then :
2576   $as_echo_n "(cached) " >&6
2577 else
2578   if test "x$target_alias" = x; then
2579   ac_cv_target=$ac_cv_host
2580 else
2581   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2582     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2583 fi
2584
2585 fi
2586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2587 $as_echo "$ac_cv_target" >&6; }
2588 case $ac_cv_target in
2589 *-*-*) ;;
2590 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
2591 esac
2592 target=$ac_cv_target
2593 ac_save_IFS=$IFS; IFS='-'
2594 set x $ac_cv_target
2595 shift
2596 target_cpu=$1
2597 target_vendor=$2
2598 shift; shift
2599 # Remember, the first character of IFS is used to create $*,
2600 # except with old shells:
2601 target_os=$*
2602 IFS=$ac_save_IFS
2603 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2604
2605
2606 # The aliases save the names the user supplied, while $host etc.
2607 # will get canonicalized.
2608 test -n "$target_alias" &&
2609   test "$program_prefix$program_suffix$program_transform_name" = \
2610     NONENONEs,x,x, &&
2611   program_prefix=${target_alias}-
2612
2613
2614 ac_ext=c
2615 ac_cpp='$CPP $CPPFLAGS'
2616 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2617 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2618 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2619 if test -n "$ac_tool_prefix"; then
2620   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2621 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2623 $as_echo_n "checking for $ac_word... " >&6; }
2624 if ${ac_cv_prog_CC+:} false; then :
2625   $as_echo_n "(cached) " >&6
2626 else
2627   if test -n "$CC"; then
2628   ac_cv_prog_CC="$CC" # Let the user override the test.
2629 else
2630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2631 for as_dir in $PATH
2632 do
2633   IFS=$as_save_IFS
2634   test -z "$as_dir" && as_dir=.
2635     for ac_exec_ext in '' $ac_executable_extensions; do
2636   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2637     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2638     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2639     break 2
2640   fi
2641 done
2642   done
2643 IFS=$as_save_IFS
2644
2645 fi
2646 fi
2647 CC=$ac_cv_prog_CC
2648 if test -n "$CC"; then
2649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2650 $as_echo "$CC" >&6; }
2651 else
2652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2653 $as_echo "no" >&6; }
2654 fi
2655
2656
2657 fi
2658 if test -z "$ac_cv_prog_CC"; then
2659   ac_ct_CC=$CC
2660   # Extract the first word of "gcc", so it can be a program name with args.
2661 set dummy gcc; ac_word=$2
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2663 $as_echo_n "checking for $ac_word... " >&6; }
2664 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2665   $as_echo_n "(cached) " >&6
2666 else
2667   if test -n "$ac_ct_CC"; then
2668   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2669 else
2670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2671 for as_dir in $PATH
2672 do
2673   IFS=$as_save_IFS
2674   test -z "$as_dir" && as_dir=.
2675     for ac_exec_ext in '' $ac_executable_extensions; do
2676   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2677     ac_cv_prog_ac_ct_CC="gcc"
2678     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2679     break 2
2680   fi
2681 done
2682   done
2683 IFS=$as_save_IFS
2684
2685 fi
2686 fi
2687 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2688 if test -n "$ac_ct_CC"; then
2689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2690 $as_echo "$ac_ct_CC" >&6; }
2691 else
2692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2693 $as_echo "no" >&6; }
2694 fi
2695
2696   if test "x$ac_ct_CC" = x; then
2697     CC=""
2698   else
2699     case $cross_compiling:$ac_tool_warned in
2700 yes:)
2701 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2702 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2703 ac_tool_warned=yes ;;
2704 esac
2705     CC=$ac_ct_CC
2706   fi
2707 else
2708   CC="$ac_cv_prog_CC"
2709 fi
2710
2711 if test -z "$CC"; then
2712           if test -n "$ac_tool_prefix"; then
2713     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2714 set dummy ${ac_tool_prefix}cc; ac_word=$2
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2716 $as_echo_n "checking for $ac_word... " >&6; }
2717 if ${ac_cv_prog_CC+:} false; then :
2718   $as_echo_n "(cached) " >&6
2719 else
2720   if test -n "$CC"; then
2721   ac_cv_prog_CC="$CC" # Let the user override the test.
2722 else
2723 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2724 for as_dir in $PATH
2725 do
2726   IFS=$as_save_IFS
2727   test -z "$as_dir" && as_dir=.
2728     for ac_exec_ext in '' $ac_executable_extensions; do
2729   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2730     ac_cv_prog_CC="${ac_tool_prefix}cc"
2731     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2732     break 2
2733   fi
2734 done
2735   done
2736 IFS=$as_save_IFS
2737
2738 fi
2739 fi
2740 CC=$ac_cv_prog_CC
2741 if test -n "$CC"; then
2742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2743 $as_echo "$CC" >&6; }
2744 else
2745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2746 $as_echo "no" >&6; }
2747 fi
2748
2749
2750   fi
2751 fi
2752 if test -z "$CC"; then
2753   # Extract the first word of "cc", so it can be a program name with args.
2754 set dummy cc; ac_word=$2
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2756 $as_echo_n "checking for $ac_word... " >&6; }
2757 if ${ac_cv_prog_CC+:} false; then :
2758   $as_echo_n "(cached) " >&6
2759 else
2760   if test -n "$CC"; then
2761   ac_cv_prog_CC="$CC" # Let the user override the test.
2762 else
2763   ac_prog_rejected=no
2764 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2765 for as_dir in $PATH
2766 do
2767   IFS=$as_save_IFS
2768   test -z "$as_dir" && as_dir=.
2769     for ac_exec_ext in '' $ac_executable_extensions; do
2770   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2771     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2772        ac_prog_rejected=yes
2773        continue
2774      fi
2775     ac_cv_prog_CC="cc"
2776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2777     break 2
2778   fi
2779 done
2780   done
2781 IFS=$as_save_IFS
2782
2783 if test $ac_prog_rejected = yes; then
2784   # We found a bogon in the path, so make sure we never use it.
2785   set dummy $ac_cv_prog_CC
2786   shift
2787   if test $# != 0; then
2788     # We chose a different compiler from the bogus one.
2789     # However, it has the same basename, so the bogon will be chosen
2790     # first if we set CC to just the basename; use the full file name.
2791     shift
2792     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2793   fi
2794 fi
2795 fi
2796 fi
2797 CC=$ac_cv_prog_CC
2798 if test -n "$CC"; then
2799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2800 $as_echo "$CC" >&6; }
2801 else
2802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2803 $as_echo "no" >&6; }
2804 fi
2805
2806
2807 fi
2808 if test -z "$CC"; then
2809   if test -n "$ac_tool_prefix"; then
2810   for ac_prog in cl.exe
2811   do
2812     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2813 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2815 $as_echo_n "checking for $ac_word... " >&6; }
2816 if ${ac_cv_prog_CC+:} false; then :
2817   $as_echo_n "(cached) " >&6
2818 else
2819   if test -n "$CC"; then
2820   ac_cv_prog_CC="$CC" # Let the user override the test.
2821 else
2822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2823 for as_dir in $PATH
2824 do
2825   IFS=$as_save_IFS
2826   test -z "$as_dir" && as_dir=.
2827     for ac_exec_ext in '' $ac_executable_extensions; do
2828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2829     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2831     break 2
2832   fi
2833 done
2834   done
2835 IFS=$as_save_IFS
2836
2837 fi
2838 fi
2839 CC=$ac_cv_prog_CC
2840 if test -n "$CC"; then
2841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2842 $as_echo "$CC" >&6; }
2843 else
2844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2845 $as_echo "no" >&6; }
2846 fi
2847
2848
2849     test -n "$CC" && break
2850   done
2851 fi
2852 if test -z "$CC"; then
2853   ac_ct_CC=$CC
2854   for ac_prog in cl.exe
2855 do
2856   # Extract the first word of "$ac_prog", so it can be a program name with args.
2857 set dummy $ac_prog; ac_word=$2
2858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2859 $as_echo_n "checking for $ac_word... " >&6; }
2860 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2861   $as_echo_n "(cached) " >&6
2862 else
2863   if test -n "$ac_ct_CC"; then
2864   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2865 else
2866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2867 for as_dir in $PATH
2868 do
2869   IFS=$as_save_IFS
2870   test -z "$as_dir" && as_dir=.
2871     for ac_exec_ext in '' $ac_executable_extensions; do
2872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2873     ac_cv_prog_ac_ct_CC="$ac_prog"
2874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2875     break 2
2876   fi
2877 done
2878   done
2879 IFS=$as_save_IFS
2880
2881 fi
2882 fi
2883 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2884 if test -n "$ac_ct_CC"; then
2885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2886 $as_echo "$ac_ct_CC" >&6; }
2887 else
2888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2889 $as_echo "no" >&6; }
2890 fi
2891
2892
2893   test -n "$ac_ct_CC" && break
2894 done
2895
2896   if test "x$ac_ct_CC" = x; then
2897     CC=""
2898   else
2899     case $cross_compiling:$ac_tool_warned in
2900 yes:)
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2902 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2903 ac_tool_warned=yes ;;
2904 esac
2905     CC=$ac_ct_CC
2906   fi
2907 fi
2908
2909 fi
2910
2911
2912 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2913 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2914 as_fn_error $? "no acceptable C compiler found in \$PATH
2915 See \`config.log' for more details" "$LINENO" 5; }
2916
2917 # Provide some information about the compiler.
2918 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2919 set X $ac_compile
2920 ac_compiler=$2
2921 for ac_option in --version -v -V -qversion; do
2922   { { ac_try="$ac_compiler $ac_option >&5"
2923 case "(($ac_try" in
2924   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2925   *) ac_try_echo=$ac_try;;
2926 esac
2927 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2928 $as_echo "$ac_try_echo"; } >&5
2929   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2930   ac_status=$?
2931   if test -s conftest.err; then
2932     sed '10a\
2933 ... rest of stderr output deleted ...
2934          10q' conftest.err >conftest.er1
2935     cat conftest.er1 >&5
2936   fi
2937   rm -f conftest.er1 conftest.err
2938   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2939   test $ac_status = 0; }
2940 done
2941
2942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2943 /* end confdefs.h.  */
2944
2945 int
2946 main ()
2947 {
2948
2949   ;
2950   return 0;
2951 }
2952 _ACEOF
2953 ac_clean_files_save=$ac_clean_files
2954 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2955 # Try to create an executable without -o first, disregard a.out.
2956 # It will help us diagnose broken compilers, and finding out an intuition
2957 # of exeext.
2958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2959 $as_echo_n "checking whether the C compiler works... " >&6; }
2960 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2961
2962 # The possible output files:
2963 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2964
2965 ac_rmfiles=
2966 for ac_file in $ac_files
2967 do
2968   case $ac_file in
2969     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2970     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2971   esac
2972 done
2973 rm -f $ac_rmfiles
2974
2975 if { { ac_try="$ac_link_default"
2976 case "(($ac_try" in
2977   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2978   *) ac_try_echo=$ac_try;;
2979 esac
2980 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2981 $as_echo "$ac_try_echo"; } >&5
2982   (eval "$ac_link_default") 2>&5
2983   ac_status=$?
2984   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2985   test $ac_status = 0; }; then :
2986   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2987 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2988 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2989 # so that the user can short-circuit this test for compilers unknown to
2990 # Autoconf.
2991 for ac_file in $ac_files ''
2992 do
2993   test -f "$ac_file" || continue
2994   case $ac_file in
2995     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2996         ;;
2997     [ab].out )
2998         # We found the default executable, but exeext='' is most
2999         # certainly right.
3000         break;;
3001     *.* )
3002         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3003         then :; else
3004            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3005         fi
3006         # We set ac_cv_exeext here because the later test for it is not
3007         # safe: cross compilers may not add the suffix if given an `-o'
3008         # argument, so we may need to know it at that point already.
3009         # Even if this section looks crufty: it has the advantage of
3010         # actually working.
3011         break;;
3012     * )
3013         break;;
3014   esac
3015 done
3016 test "$ac_cv_exeext" = no && ac_cv_exeext=
3017
3018 else
3019   ac_file=''
3020 fi
3021 if test -z "$ac_file"; then :
3022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3023 $as_echo "no" >&6; }
3024 $as_echo "$as_me: failed program was:" >&5
3025 sed 's/^/| /' conftest.$ac_ext >&5
3026
3027 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3028 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3029 as_fn_error 77 "C compiler cannot create executables
3030 See \`config.log' for more details" "$LINENO" 5; }
3031 else
3032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3033 $as_echo "yes" >&6; }
3034 fi
3035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3036 $as_echo_n "checking for C compiler default output file name... " >&6; }
3037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3038 $as_echo "$ac_file" >&6; }
3039 ac_exeext=$ac_cv_exeext
3040
3041 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3042 ac_clean_files=$ac_clean_files_save
3043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3044 $as_echo_n "checking for suffix of executables... " >&6; }
3045 if { { ac_try="$ac_link"
3046 case "(($ac_try" in
3047   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3048   *) ac_try_echo=$ac_try;;
3049 esac
3050 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3051 $as_echo "$ac_try_echo"; } >&5
3052   (eval "$ac_link") 2>&5
3053   ac_status=$?
3054   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3055   test $ac_status = 0; }; then :
3056   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3057 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3058 # work properly (i.e., refer to `conftest.exe'), while it won't with
3059 # `rm'.
3060 for ac_file in conftest.exe conftest conftest.*; do
3061   test -f "$ac_file" || continue
3062   case $ac_file in
3063     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3064     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3065           break;;
3066     * ) break;;
3067   esac
3068 done
3069 else
3070   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3071 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3072 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3073 See \`config.log' for more details" "$LINENO" 5; }
3074 fi
3075 rm -f conftest conftest$ac_cv_exeext
3076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3077 $as_echo "$ac_cv_exeext" >&6; }
3078
3079 rm -f conftest.$ac_ext
3080 EXEEXT=$ac_cv_exeext
3081 ac_exeext=$EXEEXT
3082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3083 /* end confdefs.h.  */
3084 #include <stdio.h>
3085 int
3086 main ()
3087 {
3088 FILE *f = fopen ("conftest.out", "w");
3089  return ferror (f) || fclose (f) != 0;
3090
3091   ;
3092   return 0;
3093 }
3094 _ACEOF
3095 ac_clean_files="$ac_clean_files conftest.out"
3096 # Check that the compiler produces executables we can run.  If not, either
3097 # the compiler is broken, or we cross compile.
3098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3099 $as_echo_n "checking whether we are cross compiling... " >&6; }
3100 if test "$cross_compiling" != yes; then
3101   { { ac_try="$ac_link"
3102 case "(($ac_try" in
3103   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3104   *) ac_try_echo=$ac_try;;
3105 esac
3106 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3107 $as_echo "$ac_try_echo"; } >&5
3108   (eval "$ac_link") 2>&5
3109   ac_status=$?
3110   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3111   test $ac_status = 0; }
3112   if { ac_try='./conftest$ac_cv_exeext'
3113   { { case "(($ac_try" in
3114   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3115   *) ac_try_echo=$ac_try;;
3116 esac
3117 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3118 $as_echo "$ac_try_echo"; } >&5
3119   (eval "$ac_try") 2>&5
3120   ac_status=$?
3121   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3122   test $ac_status = 0; }; }; then
3123     cross_compiling=no
3124   else
3125     if test "$cross_compiling" = maybe; then
3126         cross_compiling=yes
3127     else
3128         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3129 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3130 as_fn_error $? "cannot run C compiled programs.
3131 If you meant to cross compile, use \`--host'.
3132 See \`config.log' for more details" "$LINENO" 5; }
3133     fi
3134   fi
3135 fi
3136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3137 $as_echo "$cross_compiling" >&6; }
3138
3139 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3140 ac_clean_files=$ac_clean_files_save
3141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3142 $as_echo_n "checking for suffix of object files... " >&6; }
3143 if ${ac_cv_objext+:} false; then :
3144   $as_echo_n "(cached) " >&6
3145 else
3146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3147 /* end confdefs.h.  */
3148
3149 int
3150 main ()
3151 {
3152
3153   ;
3154   return 0;
3155 }
3156 _ACEOF
3157 rm -f conftest.o conftest.obj
3158 if { { ac_try="$ac_compile"
3159 case "(($ac_try" in
3160   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3161   *) ac_try_echo=$ac_try;;
3162 esac
3163 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3164 $as_echo "$ac_try_echo"; } >&5
3165   (eval "$ac_compile") 2>&5
3166   ac_status=$?
3167   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3168   test $ac_status = 0; }; then :
3169   for ac_file in conftest.o conftest.obj conftest.*; do
3170   test -f "$ac_file" || continue;
3171   case $ac_file in
3172     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3173     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3174        break;;
3175   esac
3176 done
3177 else
3178   $as_echo "$as_me: failed program was:" >&5
3179 sed 's/^/| /' conftest.$ac_ext >&5
3180
3181 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3182 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3183 as_fn_error $? "cannot compute suffix of object files: cannot compile
3184 See \`config.log' for more details" "$LINENO" 5; }
3185 fi
3186 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3187 fi
3188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3189 $as_echo "$ac_cv_objext" >&6; }
3190 OBJEXT=$ac_cv_objext
3191 ac_objext=$OBJEXT
3192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3193 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3194 if ${ac_cv_c_compiler_gnu+:} false; then :
3195   $as_echo_n "(cached) " >&6
3196 else
3197   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3198 /* end confdefs.h.  */
3199
3200 int
3201 main ()
3202 {
3203 #ifndef __GNUC__
3204        choke me
3205 #endif
3206
3207   ;
3208   return 0;
3209 }
3210 _ACEOF
3211 if ac_fn_c_try_compile "$LINENO"; then :
3212   ac_compiler_gnu=yes
3213 else
3214   ac_compiler_gnu=no
3215 fi
3216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3217 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3218
3219 fi
3220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3221 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3222 if test $ac_compiler_gnu = yes; then
3223   GCC=yes
3224 else
3225   GCC=
3226 fi
3227 ac_test_CFLAGS=${CFLAGS+set}
3228 ac_save_CFLAGS=$CFLAGS
3229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3230 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3231 if ${ac_cv_prog_cc_g+:} false; then :
3232   $as_echo_n "(cached) " >&6
3233 else
3234   ac_save_c_werror_flag=$ac_c_werror_flag
3235    ac_c_werror_flag=yes
3236    ac_cv_prog_cc_g=no
3237    CFLAGS="-g"
3238    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3239 /* end confdefs.h.  */
3240
3241 int
3242 main ()
3243 {
3244
3245   ;
3246   return 0;
3247 }
3248 _ACEOF
3249 if ac_fn_c_try_compile "$LINENO"; then :
3250   ac_cv_prog_cc_g=yes
3251 else
3252   CFLAGS=""
3253       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3254 /* end confdefs.h.  */
3255
3256 int
3257 main ()
3258 {
3259
3260   ;
3261   return 0;
3262 }
3263 _ACEOF
3264 if ac_fn_c_try_compile "$LINENO"; then :
3265
3266 else
3267   ac_c_werror_flag=$ac_save_c_werror_flag
3268          CFLAGS="-g"
3269          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3270 /* end confdefs.h.  */
3271
3272 int
3273 main ()
3274 {
3275
3276   ;
3277   return 0;
3278 }
3279 _ACEOF
3280 if ac_fn_c_try_compile "$LINENO"; then :
3281   ac_cv_prog_cc_g=yes
3282 fi
3283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3284 fi
3285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3286 fi
3287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3288    ac_c_werror_flag=$ac_save_c_werror_flag
3289 fi
3290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3291 $as_echo "$ac_cv_prog_cc_g" >&6; }
3292 if test "$ac_test_CFLAGS" = set; then
3293   CFLAGS=$ac_save_CFLAGS
3294 elif test $ac_cv_prog_cc_g = yes; then
3295   if test "$GCC" = yes; then
3296     CFLAGS="-g -O2"
3297   else
3298     CFLAGS="-g"
3299   fi
3300 else
3301   if test "$GCC" = yes; then
3302     CFLAGS="-O2"
3303   else
3304     CFLAGS=
3305   fi
3306 fi
3307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3308 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3309 if ${ac_cv_prog_cc_c89+:} false; then :
3310   $as_echo_n "(cached) " >&6
3311 else
3312   ac_cv_prog_cc_c89=no
3313 ac_save_CC=$CC
3314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3315 /* end confdefs.h.  */
3316 #include <stdarg.h>
3317 #include <stdio.h>
3318 struct stat;
3319 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3320 struct buf { int x; };
3321 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3322 static char *e (p, i)
3323      char **p;
3324      int i;
3325 {
3326   return p[i];
3327 }
3328 static char *f (char * (*g) (char **, int), char **p, ...)
3329 {
3330   char *s;
3331   va_list v;
3332   va_start (v,p);
3333   s = g (p, va_arg (v,int));
3334   va_end (v);
3335   return s;
3336 }
3337
3338 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3339    function prototypes and stuff, but not '\xHH' hex character constants.
3340    These don't provoke an error unfortunately, instead are silently treated
3341    as 'x'.  The following induces an error, until -std is added to get
3342    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3343    array size at least.  It's necessary to write '\x00'==0 to get something
3344    that's true only with -std.  */
3345 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3346
3347 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3348    inside strings and character constants.  */
3349 #define FOO(x) 'x'
3350 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3351
3352 int test (int i, double x);
3353 struct s1 {int (*f) (int a);};
3354 struct s2 {int (*f) (double a);};
3355 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3356 int argc;
3357 char **argv;
3358 int
3359 main ()
3360 {
3361 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3362   ;
3363   return 0;
3364 }
3365 _ACEOF
3366 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3367         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3368 do
3369   CC="$ac_save_CC $ac_arg"
3370   if ac_fn_c_try_compile "$LINENO"; then :
3371   ac_cv_prog_cc_c89=$ac_arg
3372 fi
3373 rm -f core conftest.err conftest.$ac_objext
3374   test "x$ac_cv_prog_cc_c89" != "xno" && break
3375 done
3376 rm -f conftest.$ac_ext
3377 CC=$ac_save_CC
3378
3379 fi
3380 # AC_CACHE_VAL
3381 case "x$ac_cv_prog_cc_c89" in
3382   x)
3383     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3384 $as_echo "none needed" >&6; } ;;
3385   xno)
3386     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3387 $as_echo "unsupported" >&6; } ;;
3388   *)
3389     CC="$CC $ac_cv_prog_cc_c89"
3390     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3391 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3392 esac
3393 if test "x$ac_cv_prog_cc_c89" != xno; then :
3394
3395 fi
3396
3397 ac_ext=c
3398 ac_cpp='$CPP $CPPFLAGS'
3399 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3400 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3401 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3402
3403 ac_ext=cpp
3404 ac_cpp='$CXXCPP $CPPFLAGS'
3405 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3406 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3407 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3408 if test -z "$CXX"; then
3409   if test -n "$CCC"; then
3410     CXX=$CCC
3411   else
3412     if test -n "$ac_tool_prefix"; then
3413   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3414   do
3415     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3416 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3418 $as_echo_n "checking for $ac_word... " >&6; }
3419 if ${ac_cv_prog_CXX+:} false; then :
3420   $as_echo_n "(cached) " >&6
3421 else
3422   if test -n "$CXX"; then
3423   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3424 else
3425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3426 for as_dir in $PATH
3427 do
3428   IFS=$as_save_IFS
3429   test -z "$as_dir" && as_dir=.
3430     for ac_exec_ext in '' $ac_executable_extensions; do
3431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3432     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3434     break 2
3435   fi
3436 done
3437   done
3438 IFS=$as_save_IFS
3439
3440 fi
3441 fi
3442 CXX=$ac_cv_prog_CXX
3443 if test -n "$CXX"; then
3444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3445 $as_echo "$CXX" >&6; }
3446 else
3447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3448 $as_echo "no" >&6; }
3449 fi
3450
3451
3452     test -n "$CXX" && break
3453   done
3454 fi
3455 if test -z "$CXX"; then
3456   ac_ct_CXX=$CXX
3457   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3458 do
3459   # Extract the first word of "$ac_prog", so it can be a program name with args.
3460 set dummy $ac_prog; ac_word=$2
3461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3462 $as_echo_n "checking for $ac_word... " >&6; }
3463 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3464   $as_echo_n "(cached) " >&6
3465 else
3466   if test -n "$ac_ct_CXX"; then
3467   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3468 else
3469 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3470 for as_dir in $PATH
3471 do
3472   IFS=$as_save_IFS
3473   test -z "$as_dir" && as_dir=.
3474     for ac_exec_ext in '' $ac_executable_extensions; do
3475   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3476     ac_cv_prog_ac_ct_CXX="$ac_prog"
3477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3478     break 2
3479   fi
3480 done
3481   done
3482 IFS=$as_save_IFS
3483
3484 fi
3485 fi
3486 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3487 if test -n "$ac_ct_CXX"; then
3488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3489 $as_echo "$ac_ct_CXX" >&6; }
3490 else
3491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3492 $as_echo "no" >&6; }
3493 fi
3494
3495
3496   test -n "$ac_ct_CXX" && break
3497 done
3498
3499   if test "x$ac_ct_CXX" = x; then
3500     CXX="g++"
3501   else
3502     case $cross_compiling:$ac_tool_warned in
3503 yes:)
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3505 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3506 ac_tool_warned=yes ;;
3507 esac
3508     CXX=$ac_ct_CXX
3509   fi
3510 fi
3511
3512   fi
3513 fi
3514 # Provide some information about the compiler.
3515 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3516 set X $ac_compile
3517 ac_compiler=$2
3518 for ac_option in --version -v -V -qversion; do
3519   { { ac_try="$ac_compiler $ac_option >&5"
3520 case "(($ac_try" in
3521   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3522   *) ac_try_echo=$ac_try;;
3523 esac
3524 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3525 $as_echo "$ac_try_echo"; } >&5
3526   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3527   ac_status=$?
3528   if test -s conftest.err; then
3529     sed '10a\
3530 ... rest of stderr output deleted ...
3531          10q' conftest.err >conftest.er1
3532     cat conftest.er1 >&5
3533   fi
3534   rm -f conftest.er1 conftest.err
3535   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3536   test $ac_status = 0; }
3537 done
3538
3539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3540 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3541 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3542   $as_echo_n "(cached) " >&6
3543 else
3544   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3545 /* end confdefs.h.  */
3546
3547 int
3548 main ()
3549 {
3550 #ifndef __GNUC__
3551        choke me
3552 #endif
3553
3554   ;
3555   return 0;
3556 }
3557 _ACEOF
3558 if ac_fn_cxx_try_compile "$LINENO"; then :
3559   ac_compiler_gnu=yes
3560 else
3561   ac_compiler_gnu=no
3562 fi
3563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3564 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3565
3566 fi
3567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3568 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3569 if test $ac_compiler_gnu = yes; then
3570   GXX=yes
3571 else
3572   GXX=
3573 fi
3574 ac_test_CXXFLAGS=${CXXFLAGS+set}
3575 ac_save_CXXFLAGS=$CXXFLAGS
3576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3577 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3578 if ${ac_cv_prog_cxx_g+:} false; then :
3579   $as_echo_n "(cached) " >&6
3580 else
3581   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3582    ac_cxx_werror_flag=yes
3583    ac_cv_prog_cxx_g=no
3584    CXXFLAGS="-g"
3585    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3586 /* end confdefs.h.  */
3587
3588 int
3589 main ()
3590 {
3591
3592   ;
3593   return 0;
3594 }
3595 _ACEOF
3596 if ac_fn_cxx_try_compile "$LINENO"; then :
3597   ac_cv_prog_cxx_g=yes
3598 else
3599   CXXFLAGS=""
3600       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3601 /* end confdefs.h.  */
3602
3603 int
3604 main ()
3605 {
3606
3607   ;
3608   return 0;
3609 }
3610 _ACEOF
3611 if ac_fn_cxx_try_compile "$LINENO"; then :
3612
3613 else
3614   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3615          CXXFLAGS="-g"
3616          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3617 /* end confdefs.h.  */
3618
3619 int
3620 main ()
3621 {
3622
3623   ;
3624   return 0;
3625 }
3626 _ACEOF
3627 if ac_fn_cxx_try_compile "$LINENO"; then :
3628   ac_cv_prog_cxx_g=yes
3629 fi
3630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3631 fi
3632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3633 fi
3634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3635    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3636 fi
3637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3638 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3639 if test "$ac_test_CXXFLAGS" = set; then
3640   CXXFLAGS=$ac_save_CXXFLAGS
3641 elif test $ac_cv_prog_cxx_g = yes; then
3642   if test "$GXX" = yes; then
3643     CXXFLAGS="-g -O2"
3644   else
3645     CXXFLAGS="-g"
3646   fi
3647 else
3648   if test "$GXX" = yes; then
3649     CXXFLAGS="-O2"
3650   else
3651     CXXFLAGS=
3652   fi
3653 fi
3654 ac_ext=c
3655 ac_cpp='$CPP $CPPFLAGS'
3656 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3657 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3658 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3659
3660
3661
3662 ac_ext=c
3663 ac_cpp='$CPP $CPPFLAGS'
3664 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3665 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3666 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3668 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3669 # On Suns, sometimes $CPP names a directory.
3670 if test -n "$CPP" && test -d "$CPP"; then
3671   CPP=
3672 fi
3673 if test -z "$CPP"; then
3674   if ${ac_cv_prog_CPP+:} false; then :
3675   $as_echo_n "(cached) " >&6
3676 else
3677       # Double quotes because CPP needs to be expanded
3678     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3679     do
3680       ac_preproc_ok=false
3681 for ac_c_preproc_warn_flag in '' yes
3682 do
3683   # Use a header file that comes with gcc, so configuring glibc
3684   # with a fresh cross-compiler works.
3685   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3686   # <limits.h> exists even on freestanding compilers.
3687   # On the NeXT, cc -E runs the code through the compiler's parser,
3688   # not just through cpp. "Syntax error" is here to catch this case.
3689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3690 /* end confdefs.h.  */
3691 #ifdef __STDC__
3692 # include <limits.h>
3693 #else
3694 # include <assert.h>
3695 #endif
3696                      Syntax error
3697 _ACEOF
3698 if ac_fn_c_try_cpp "$LINENO"; then :
3699
3700 else
3701   # Broken: fails on valid input.
3702 continue
3703 fi
3704 rm -f conftest.err conftest.i conftest.$ac_ext
3705
3706   # OK, works on sane cases.  Now check whether nonexistent headers
3707   # can be detected and how.
3708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3709 /* end confdefs.h.  */
3710 #include <ac_nonexistent.h>
3711 _ACEOF
3712 if ac_fn_c_try_cpp "$LINENO"; then :
3713   # Broken: success on invalid input.
3714 continue
3715 else
3716   # Passes both tests.
3717 ac_preproc_ok=:
3718 break
3719 fi
3720 rm -f conftest.err conftest.i conftest.$ac_ext
3721
3722 done
3723 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3724 rm -f conftest.i conftest.err conftest.$ac_ext
3725 if $ac_preproc_ok; then :
3726   break
3727 fi
3728
3729     done
3730     ac_cv_prog_CPP=$CPP
3731
3732 fi
3733   CPP=$ac_cv_prog_CPP
3734 else
3735   ac_cv_prog_CPP=$CPP
3736 fi
3737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3738 $as_echo "$CPP" >&6; }
3739 ac_preproc_ok=false
3740 for ac_c_preproc_warn_flag in '' yes
3741 do
3742   # Use a header file that comes with gcc, so configuring glibc
3743   # with a fresh cross-compiler works.
3744   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3745   # <limits.h> exists even on freestanding compilers.
3746   # On the NeXT, cc -E runs the code through the compiler's parser,
3747   # not just through cpp. "Syntax error" is here to catch this case.
3748   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3749 /* end confdefs.h.  */
3750 #ifdef __STDC__
3751 # include <limits.h>
3752 #else
3753 # include <assert.h>
3754 #endif
3755                      Syntax error
3756 _ACEOF
3757 if ac_fn_c_try_cpp "$LINENO"; then :
3758
3759 else
3760   # Broken: fails on valid input.
3761 continue
3762 fi
3763 rm -f conftest.err conftest.i conftest.$ac_ext
3764
3765   # OK, works on sane cases.  Now check whether nonexistent headers
3766   # can be detected and how.
3767   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3768 /* end confdefs.h.  */
3769 #include <ac_nonexistent.h>
3770 _ACEOF
3771 if ac_fn_c_try_cpp "$LINENO"; then :
3772   # Broken: success on invalid input.
3773 continue
3774 else
3775   # Passes both tests.
3776 ac_preproc_ok=:
3777 break
3778 fi
3779 rm -f conftest.err conftest.i conftest.$ac_ext
3780
3781 done
3782 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3783 rm -f conftest.i conftest.err conftest.$ac_ext
3784 if $ac_preproc_ok; then :
3785
3786 else
3787   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3788 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3789 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3790 See \`config.log' for more details" "$LINENO" 5; }
3791 fi
3792
3793 ac_ext=c
3794 ac_cpp='$CPP $CPPFLAGS'
3795 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3796 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3797 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3798
3799
3800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3801 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3802 if ${ac_cv_path_GREP+:} false; then :
3803   $as_echo_n "(cached) " >&6
3804 else
3805   if test -z "$GREP"; then
3806   ac_path_GREP_found=false
3807   # Loop through the user's path and test for each of PROGNAME-LIST
3808   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3809 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3810 do
3811   IFS=$as_save_IFS
3812   test -z "$as_dir" && as_dir=.
3813     for ac_prog in grep ggrep; do
3814     for ac_exec_ext in '' $ac_executable_extensions; do
3815       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3816       as_fn_executable_p "$ac_path_GREP" || continue
3817 # Check for GNU ac_path_GREP and select it if it is found.
3818   # Check for GNU $ac_path_GREP
3819 case `"$ac_path_GREP" --version 2>&1` in
3820 *GNU*)
3821   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3822 *)
3823   ac_count=0
3824   $as_echo_n 0123456789 >"conftest.in"
3825   while :
3826   do
3827     cat "conftest.in" "conftest.in" >"conftest.tmp"
3828     mv "conftest.tmp" "conftest.in"
3829     cp "conftest.in" "conftest.nl"
3830     $as_echo 'GREP' >> "conftest.nl"
3831     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3832     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3833     as_fn_arith $ac_count + 1 && ac_count=$as_val
3834     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3835       # Best one so far, save it but keep looking for a better one
3836       ac_cv_path_GREP="$ac_path_GREP"
3837       ac_path_GREP_max=$ac_count
3838     fi
3839     # 10*(2^10) chars as input seems more than enough
3840     test $ac_count -gt 10 && break
3841   done
3842   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3843 esac
3844
3845       $ac_path_GREP_found && break 3
3846     done
3847   done
3848   done
3849 IFS=$as_save_IFS
3850   if test -z "$ac_cv_path_GREP"; then
3851     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3852   fi
3853 else
3854   ac_cv_path_GREP=$GREP
3855 fi
3856
3857 fi
3858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3859 $as_echo "$ac_cv_path_GREP" >&6; }
3860  GREP="$ac_cv_path_GREP"
3861
3862
3863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3864 $as_echo_n "checking for egrep... " >&6; }
3865 if ${ac_cv_path_EGREP+:} false; then :
3866   $as_echo_n "(cached) " >&6
3867 else
3868   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3869    then ac_cv_path_EGREP="$GREP -E"
3870    else
3871      if test -z "$EGREP"; then
3872   ac_path_EGREP_found=false
3873   # Loop through the user's path and test for each of PROGNAME-LIST
3874   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3875 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3876 do
3877   IFS=$as_save_IFS
3878   test -z "$as_dir" && as_dir=.
3879     for ac_prog in egrep; do
3880     for ac_exec_ext in '' $ac_executable_extensions; do
3881       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3882       as_fn_executable_p "$ac_path_EGREP" || continue
3883 # Check for GNU ac_path_EGREP and select it if it is found.
3884   # Check for GNU $ac_path_EGREP
3885 case `"$ac_path_EGREP" --version 2>&1` in
3886 *GNU*)
3887   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3888 *)
3889   ac_count=0
3890   $as_echo_n 0123456789 >"conftest.in"
3891   while :
3892   do
3893     cat "conftest.in" "conftest.in" >"conftest.tmp"
3894     mv "conftest.tmp" "conftest.in"
3895     cp "conftest.in" "conftest.nl"
3896     $as_echo 'EGREP' >> "conftest.nl"
3897     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3898     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3899     as_fn_arith $ac_count + 1 && ac_count=$as_val
3900     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3901       # Best one so far, save it but keep looking for a better one
3902       ac_cv_path_EGREP="$ac_path_EGREP"
3903       ac_path_EGREP_max=$ac_count
3904     fi
3905     # 10*(2^10) chars as input seems more than enough
3906     test $ac_count -gt 10 && break
3907   done
3908   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3909 esac
3910
3911       $ac_path_EGREP_found && break 3
3912     done
3913   done
3914   done
3915 IFS=$as_save_IFS
3916   if test -z "$ac_cv_path_EGREP"; then
3917     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3918   fi
3919 else
3920   ac_cv_path_EGREP=$EGREP
3921 fi
3922
3923    fi
3924 fi
3925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3926 $as_echo "$ac_cv_path_EGREP" >&6; }
3927  EGREP="$ac_cv_path_EGREP"
3928
3929
3930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3931 $as_echo_n "checking for ANSI C header files... " >&6; }
3932 if ${ac_cv_header_stdc+:} false; then :
3933   $as_echo_n "(cached) " >&6
3934 else
3935   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3936 /* end confdefs.h.  */
3937 #include <stdlib.h>
3938 #include <stdarg.h>
3939 #include <string.h>
3940 #include <float.h>
3941
3942 int
3943 main ()
3944 {
3945
3946   ;
3947   return 0;
3948 }
3949 _ACEOF
3950 if ac_fn_c_try_compile "$LINENO"; then :
3951   ac_cv_header_stdc=yes
3952 else
3953   ac_cv_header_stdc=no
3954 fi
3955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3956
3957 if test $ac_cv_header_stdc = yes; then
3958   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3959   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3960 /* end confdefs.h.  */
3961 #include <string.h>
3962
3963 _ACEOF
3964 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3965   $EGREP "memchr" >/dev/null 2>&1; then :
3966
3967 else
3968   ac_cv_header_stdc=no
3969 fi
3970 rm -f conftest*
3971
3972 fi
3973
3974 if test $ac_cv_header_stdc = yes; then
3975   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3976   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3977 /* end confdefs.h.  */
3978 #include <stdlib.h>
3979
3980 _ACEOF
3981 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3982   $EGREP "free" >/dev/null 2>&1; then :
3983
3984 else
3985   ac_cv_header_stdc=no
3986 fi
3987 rm -f conftest*
3988
3989 fi
3990
3991 if test $ac_cv_header_stdc = yes; then
3992   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3993   if test "$cross_compiling" = yes; then :
3994   :
3995 else
3996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3997 /* end confdefs.h.  */
3998 #include <ctype.h>
3999 #include <stdlib.h>
4000 #if ((' ' & 0x0FF) == 0x020)
4001 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4002 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4003 #else
4004 # define ISLOWER(c) \
4005                    (('a' <= (c) && (c) <= 'i') \
4006                      || ('j' <= (c) && (c) <= 'r') \
4007                      || ('s' <= (c) && (c) <= 'z'))
4008 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4009 #endif
4010
4011 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4012 int
4013 main ()
4014 {
4015   int i;
4016   for (i = 0; i < 256; i++)
4017     if (XOR (islower (i), ISLOWER (i))
4018         || toupper (i) != TOUPPER (i))
4019       return 2;
4020   return 0;
4021 }
4022 _ACEOF
4023 if ac_fn_c_try_run "$LINENO"; then :
4024
4025 else
4026   ac_cv_header_stdc=no
4027 fi
4028 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4029   conftest.$ac_objext conftest.beam conftest.$ac_ext
4030 fi
4031
4032 fi
4033 fi
4034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4035 $as_echo "$ac_cv_header_stdc" >&6; }
4036 if test $ac_cv_header_stdc = yes; then
4037
4038 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4039
4040 fi
4041
4042 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4043 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4044                   inttypes.h stdint.h unistd.h
4045 do :
4046   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4047 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4048 "
4049 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4050   cat >>confdefs.h <<_ACEOF
4051 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4052 _ACEOF
4053
4054 fi
4055
4056 done
4057
4058
4059
4060   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4061 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4062   MINIX=yes
4063 else
4064   MINIX=
4065 fi
4066
4067
4068   if test "$MINIX" = yes; then
4069
4070 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4071
4072
4073 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4074
4075
4076 $as_echo "#define _MINIX 1" >>confdefs.h
4077
4078   fi
4079
4080
4081   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4082 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4083 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4084   $as_echo_n "(cached) " >&6
4085 else
4086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4087 /* end confdefs.h.  */
4088
4089 #         define __EXTENSIONS__ 1
4090           $ac_includes_default
4091 int
4092 main ()
4093 {
4094
4095   ;
4096   return 0;
4097 }
4098 _ACEOF
4099 if ac_fn_c_try_compile "$LINENO"; then :
4100   ac_cv_safe_to_define___extensions__=yes
4101 else
4102   ac_cv_safe_to_define___extensions__=no
4103 fi
4104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4105 fi
4106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4107 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4108   test $ac_cv_safe_to_define___extensions__ = yes &&
4109     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4110
4111   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4112
4113   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4114
4115   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4116
4117   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4118
4119
4120
4121
4122 if test $ac_cv_c_compiler_gnu = yes; then
4123     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
4124 $as_echo_n "checking whether $CC needs -traditional... " >&6; }
4125 if ${ac_cv_prog_gcc_traditional+:} false; then :
4126   $as_echo_n "(cached) " >&6
4127 else
4128     ac_pattern="Autoconf.*'x'"
4129   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4130 /* end confdefs.h.  */
4131 #include <sgtty.h>
4132 Autoconf TIOCGETP
4133 _ACEOF
4134 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4135   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
4136   ac_cv_prog_gcc_traditional=yes
4137 else
4138   ac_cv_prog_gcc_traditional=no
4139 fi
4140 rm -f conftest*
4141
4142
4143   if test $ac_cv_prog_gcc_traditional = no; then
4144     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4145 /* end confdefs.h.  */
4146 #include <termio.h>
4147 Autoconf TCGETA
4148 _ACEOF
4149 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4150   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
4151   ac_cv_prog_gcc_traditional=yes
4152 fi
4153 rm -f conftest*
4154
4155   fi
4156 fi
4157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
4158 $as_echo "$ac_cv_prog_gcc_traditional" >&6; }
4159   if test $ac_cv_prog_gcc_traditional = yes; then
4160     CC="$CC -traditional"
4161   fi
4162 fi
4163
4164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using SUNPro C" >&5
4165 $as_echo_n "checking whether we are using SUNPro C... " >&6; }
4166 if ${ac_cv_prog_suncc+:} false; then :
4167   $as_echo_n "(cached) " >&6
4168 else
4169   cat > conftest.c <<EOF
4170 #ifdef __SUNPRO_C
4171   yes;
4172 #endif
4173 EOF
4174 if { ac_try='${CC-cc} -E conftest.c'
4175   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
4176   (eval $ac_try) 2>&5
4177   ac_status=$?
4178   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4179   test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
4180   ac_cv_prog_suncc=yes
4181 else
4182   ac_cv_prog_suncc=no
4183 fi
4184 fi
4185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_suncc" >&5
4186 $as_echo "$ac_cv_prog_suncc" >&6; }
4187 if test -n "$ac_tool_prefix"; then
4188   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4189 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4191 $as_echo_n "checking for $ac_word... " >&6; }
4192 if ${ac_cv_prog_RANLIB+:} false; then :
4193   $as_echo_n "(cached) " >&6
4194 else
4195   if test -n "$RANLIB"; then
4196   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4197 else
4198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4199 for as_dir in $PATH
4200 do
4201   IFS=$as_save_IFS
4202   test -z "$as_dir" && as_dir=.
4203     for ac_exec_ext in '' $ac_executable_extensions; do
4204   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4205     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4206     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4207     break 2
4208   fi
4209 done
4210   done
4211 IFS=$as_save_IFS
4212
4213 fi
4214 fi
4215 RANLIB=$ac_cv_prog_RANLIB
4216 if test -n "$RANLIB"; then
4217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4218 $as_echo "$RANLIB" >&6; }
4219 else
4220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4221 $as_echo "no" >&6; }
4222 fi
4223
4224
4225 fi
4226 if test -z "$ac_cv_prog_RANLIB"; then
4227   ac_ct_RANLIB=$RANLIB
4228   # Extract the first word of "ranlib", so it can be a program name with args.
4229 set dummy ranlib; ac_word=$2
4230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4231 $as_echo_n "checking for $ac_word... " >&6; }
4232 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4233   $as_echo_n "(cached) " >&6
4234 else
4235   if test -n "$ac_ct_RANLIB"; then
4236   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4237 else
4238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4239 for as_dir in $PATH
4240 do
4241   IFS=$as_save_IFS
4242   test -z "$as_dir" && as_dir=.
4243     for ac_exec_ext in '' $ac_executable_extensions; do
4244   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4245     ac_cv_prog_ac_ct_RANLIB="ranlib"
4246     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4247     break 2
4248   fi
4249 done
4250   done
4251 IFS=$as_save_IFS
4252
4253 fi
4254 fi
4255 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4256 if test -n "$ac_ct_RANLIB"; then
4257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4258 $as_echo "$ac_ct_RANLIB" >&6; }
4259 else
4260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4261 $as_echo "no" >&6; }
4262 fi
4263
4264   if test "x$ac_ct_RANLIB" = x; then
4265     RANLIB=":"
4266   else
4267     case $cross_compiling:$ac_tool_warned in
4268 yes:)
4269 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4270 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4271 ac_tool_warned=yes ;;
4272 esac
4273     RANLIB=$ac_ct_RANLIB
4274   fi
4275 else
4276   RANLIB="$ac_cv_prog_RANLIB"
4277 fi
4278
4279
4280
4281   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is clang" >&5
4282 $as_echo_n "checking if compiler is clang... " >&6; }
4283 if ${ax_cv_cc_clang+:} false; then :
4284   $as_echo_n "(cached) " >&6
4285 else
4286
4287
4288   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4289 /* end confdefs.h.  */
4290
4291 int
4292 main ()
4293 {
4294
4295     #ifndef __clang__
4296          not clang
4297     #endif
4298
4299   ;
4300   return 0;
4301 }
4302 _ACEOF
4303 if ac_fn_c_try_compile "$LINENO"; then :
4304   ax_cv_cc_clang=yes
4305 else
4306   ax_cv_cc_clang=no
4307 fi
4308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4309
4310 fi
4311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_clang" >&5
4312 $as_echo "$ax_cv_cc_clang" >&6; }
4313
4314 if test "x$ax_cv_cc_clang" = "xyes"; then
4315   clang_path="$CC"
4316
4317 else
4318   clang_path=""
4319
4320 fi
4321
4322
4323   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag to enable C11 support" >&5
4324 $as_echo_n "checking for the compiler flag to enable C11 support... " >&6; }
4325 if ${ax_cv_cc_std_c11_flag+:} false; then :
4326   $as_echo_n "(cached) " >&6
4327 else
4328
4329     ax_cv_cc_std_c11_flag=
4330
4331     CFLAGS_SAVED=$CFLAGS
4332     CFLAGS="$CFLAGS -Werror -std=c11"
4333
4334     ac_ext=c
4335 ac_cpp='$CPP $CPPFLAGS'
4336 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4337 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4338 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4339
4340     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4341 /* end confdefs.h.  */
4342
4343 int
4344 main ()
4345 {
4346
4347         struct foo {
4348           union {
4349             int a;
4350             int b;
4351           };
4352         } bar;
4353         return 0;
4354
4355   ;
4356   return 0;
4357 }
4358 _ACEOF
4359 if ac_fn_c_try_compile "$LINENO"; then :
4360   ax_cv_cc_std_c11_flag="-std=c11"
4361 fi
4362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4363
4364     if test "x$ax_cv_cc_std_c11_flag" = x; then
4365       CFLAGS="$CFLAGS_SAVED -std=c1x"
4366       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4367 /* end confdefs.h.  */
4368
4369 int
4370 main ()
4371 {
4372
4373           struct foo {
4374             union {
4375               int a;
4376               int b;
4377             };
4378           } bar;
4379           return 0;
4380
4381   ;
4382   return 0;
4383 }
4384 _ACEOF
4385 if ac_fn_c_try_compile "$LINENO"; then :
4386   ax_cv_cc_std_c11_flag="-std=c1x"
4387 fi
4388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4389     fi
4390
4391     ac_ext=c
4392 ac_cpp='$CPP $CPPFLAGS'
4393 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4394 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4395 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4396
4397     CFLAGS="$CFLAGS_SAVED"
4398
4399 fi
4400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_std_c11_flag" >&5
4401 $as_echo "$ax_cv_cc_std_c11_flag" >&6; }
4402
4403 if test "x$ax_cv_cc_std_c11_flag" != x; then
4404   CFLAGS="$CFLAGS $ax_cv_cc_std_c11_flag"
4405 else
4406   as_fn_error $? "FreeRADIUS requires a C11 compiler" "$LINENO" 5
4407 fi
4408
4409 if test "x$GCC" = "xyes"; then
4410   CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
4411 fi
4412
4413
4414   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Qunused-arguments\"" >&5
4415 $as_echo_n "checking for the compiler flag \"-Qunused-arguments\"... " >&6; }
4416 if ${ax_cv_cc_qunused_arguments_flag+:} false; then :
4417   $as_echo_n "(cached) " >&6
4418 else
4419
4420
4421     CFLAGS_SAVED=$CFLAGS
4422     CFLAGS="$CFLAGS -Werror -Qunused-arguments -foobar"
4423
4424     ac_ext=c
4425 ac_cpp='$CPP $CPPFLAGS'
4426 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4427 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4428 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4429
4430     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4431 /* end confdefs.h.  */
4432
4433 int
4434 main ()
4435 {
4436 return 0;
4437   ;
4438   return 0;
4439 }
4440 _ACEOF
4441 if ac_fn_c_try_compile "$LINENO"; then :
4442   ax_cv_cc_qunused_arguments_flag="yes"
4443 else
4444   ax_cv_cc_qunused_arguments_flag="no"
4445 fi
4446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4447     ac_ext=c
4448 ac_cpp='$CPP $CPPFLAGS'
4449 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4450 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4451 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4452
4453
4454     CFLAGS="$CFLAGS_SAVED"
4455
4456 fi
4457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_qunused_arguments_flag" >&5
4458 $as_echo "$ax_cv_cc_qunused_arguments_flag" >&6; }
4459
4460 if test "x$ax_cv_cc_qunused_arguments_flag" = "xyes"; then
4461   CFLAGS="$CFLAGS -Qunused-arguments"
4462   LDFLAGS="$LDFLAGS -Qunused-arguments"
4463 fi
4464
4465 # Check whether --enable-largefile was given.
4466 if test "${enable_largefile+set}" = set; then :
4467   enableval=$enable_largefile;
4468 fi
4469
4470 if test "$enable_largefile" != no; then
4471
4472   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4473 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4474 if ${ac_cv_sys_largefile_CC+:} false; then :
4475   $as_echo_n "(cached) " >&6
4476 else
4477   ac_cv_sys_largefile_CC=no
4478      if test "$GCC" != yes; then
4479        ac_save_CC=$CC
4480        while :; do
4481          # IRIX 6.2 and later do not support large files by default,
4482          # so use the C compiler's -n32 option if that helps.
4483          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4484 /* end confdefs.h.  */
4485 #include <sys/types.h>
4486  /* Check that off_t can represent 2**63 - 1 correctly.
4487     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4488     since some C++ compilers masquerading as C compilers
4489     incorrectly reject 9223372036854775807.  */
4490 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4491   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4492                        && LARGE_OFF_T % 2147483647 == 1)
4493                       ? 1 : -1];
4494 int
4495 main ()
4496 {
4497
4498   ;
4499   return 0;
4500 }
4501 _ACEOF
4502          if ac_fn_c_try_compile "$LINENO"; then :
4503   break
4504 fi
4505 rm -f core conftest.err conftest.$ac_objext
4506          CC="$CC -n32"
4507          if ac_fn_c_try_compile "$LINENO"; then :
4508   ac_cv_sys_largefile_CC=' -n32'; break
4509 fi
4510 rm -f core conftest.err conftest.$ac_objext
4511          break
4512        done
4513        CC=$ac_save_CC
4514        rm -f conftest.$ac_ext
4515     fi
4516 fi
4517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4518 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4519   if test "$ac_cv_sys_largefile_CC" != no; then
4520     CC=$CC$ac_cv_sys_largefile_CC
4521   fi
4522
4523   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4524 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4525 if ${ac_cv_sys_file_offset_bits+:} false; then :
4526   $as_echo_n "(cached) " >&6
4527 else
4528   while :; do
4529   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4530 /* end confdefs.h.  */
4531 #include <sys/types.h>
4532  /* Check that off_t can represent 2**63 - 1 correctly.
4533     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4534     since some C++ compilers masquerading as C compilers
4535     incorrectly reject 9223372036854775807.  */
4536 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4537   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4538                        && LARGE_OFF_T % 2147483647 == 1)
4539                       ? 1 : -1];
4540 int
4541 main ()
4542 {
4543
4544   ;
4545   return 0;
4546 }
4547 _ACEOF
4548 if ac_fn_c_try_compile "$LINENO"; then :
4549   ac_cv_sys_file_offset_bits=no; break
4550 fi
4551 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4552   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4553 /* end confdefs.h.  */
4554 #define _FILE_OFFSET_BITS 64
4555 #include <sys/types.h>
4556  /* Check that off_t can represent 2**63 - 1 correctly.
4557     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4558     since some C++ compilers masquerading as C compilers
4559     incorrectly reject 9223372036854775807.  */
4560 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4561   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4562                        && LARGE_OFF_T % 2147483647 == 1)
4563                       ? 1 : -1];
4564 int
4565 main ()
4566 {
4567
4568   ;
4569   return 0;
4570 }
4571 _ACEOF
4572 if ac_fn_c_try_compile "$LINENO"; then :
4573   ac_cv_sys_file_offset_bits=64; break
4574 fi
4575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4576   ac_cv_sys_file_offset_bits=unknown
4577   break
4578 done
4579 fi
4580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4581 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4582 case $ac_cv_sys_file_offset_bits in #(
4583   no | unknown) ;;
4584   *)
4585 cat >>confdefs.h <<_ACEOF
4586 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4587 _ACEOF
4588 ;;
4589 esac
4590 rm -rf conftest*
4591   if test $ac_cv_sys_file_offset_bits = unknown; then
4592     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4593 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4594 if ${ac_cv_sys_large_files+:} false; then :
4595   $as_echo_n "(cached) " >&6
4596 else
4597   while :; do
4598   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4599 /* end confdefs.h.  */
4600 #include <sys/types.h>
4601  /* Check that off_t can represent 2**63 - 1 correctly.
4602     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4603     since some C++ compilers masquerading as C compilers
4604     incorrectly reject 9223372036854775807.  */
4605 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4606   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4607                        && LARGE_OFF_T % 2147483647 == 1)
4608                       ? 1 : -1];
4609 int
4610 main ()
4611 {
4612
4613   ;
4614   return 0;
4615 }
4616 _ACEOF
4617 if ac_fn_c_try_compile "$LINENO"; then :
4618   ac_cv_sys_large_files=no; break
4619 fi
4620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4621   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4622 /* end confdefs.h.  */
4623 #define _LARGE_FILES 1
4624 #include <sys/types.h>
4625  /* Check that off_t can represent 2**63 - 1 correctly.
4626     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4627     since some C++ compilers masquerading as C compilers
4628     incorrectly reject 9223372036854775807.  */
4629 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4630   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4631                        && LARGE_OFF_T % 2147483647 == 1)
4632                       ? 1 : -1];
4633 int
4634 main ()
4635 {
4636
4637   ;
4638   return 0;
4639 }
4640 _ACEOF
4641 if ac_fn_c_try_compile "$LINENO"; then :
4642   ac_cv_sys_large_files=1; break
4643 fi
4644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4645   ac_cv_sys_large_files=unknown
4646   break
4647 done
4648 fi
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4650 $as_echo "$ac_cv_sys_large_files" >&6; }
4651 case $ac_cv_sys_large_files in #(
4652   no | unknown) ;;
4653   *)
4654 cat >>confdefs.h <<_ACEOF
4655 #define _LARGE_FILES $ac_cv_sys_large_files
4656 _ACEOF
4657 ;;
4658 esac
4659 rm -rf conftest*
4660   fi
4661
4662
4663 fi
4664
4665
4666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
4667 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
4668 if ${ac_cv_c_bigendian+:} false; then :
4669   $as_echo_n "(cached) " >&6
4670 else
4671   ac_cv_c_bigendian=unknown
4672     # See if we're dealing with a universal compiler.
4673     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4674 /* end confdefs.h.  */
4675 #ifndef __APPLE_CC__
4676                not a universal capable compiler
4677              #endif
4678              typedef int dummy;
4679
4680 _ACEOF
4681 if ac_fn_c_try_compile "$LINENO"; then :
4682
4683         # Check for potential -arch flags.  It is not universal unless
4684         # there are at least two -arch flags with different values.
4685         ac_arch=
4686         ac_prev=
4687         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
4688          if test -n "$ac_prev"; then
4689            case $ac_word in
4690              i?86 | x86_64 | ppc | ppc64)
4691                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
4692                  ac_arch=$ac_word
4693                else
4694                  ac_cv_c_bigendian=universal
4695                  break
4696                fi
4697                ;;
4698            esac
4699            ac_prev=
4700          elif test "x$ac_word" = "x-arch"; then
4701            ac_prev=arch
4702          fi
4703        done
4704 fi
4705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4706     if test $ac_cv_c_bigendian = unknown; then
4707       # See if sys/param.h defines the BYTE_ORDER macro.
4708       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4709 /* end confdefs.h.  */
4710 #include <sys/types.h>
4711              #include <sys/param.h>
4712
4713 int
4714 main ()
4715 {
4716 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
4717                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
4718                      && LITTLE_ENDIAN)
4719               bogus endian macros
4720              #endif
4721
4722   ;
4723   return 0;
4724 }
4725 _ACEOF
4726 if ac_fn_c_try_compile "$LINENO"; then :
4727   # It does; now see whether it defined to BIG_ENDIAN or not.
4728          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4729 /* end confdefs.h.  */
4730 #include <sys/types.h>
4731                 #include <sys/param.h>
4732
4733 int
4734 main ()
4735 {
4736 #if BYTE_ORDER != BIG_ENDIAN
4737                  not big endian
4738                 #endif
4739
4740   ;
4741   return 0;
4742 }
4743 _ACEOF
4744 if ac_fn_c_try_compile "$LINENO"; then :
4745   ac_cv_c_bigendian=yes
4746 else
4747   ac_cv_c_bigendian=no
4748 fi
4749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4750 fi
4751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4752     fi
4753     if test $ac_cv_c_bigendian = unknown; then
4754       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
4755       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4756 /* end confdefs.h.  */
4757 #include <limits.h>
4758
4759 int
4760 main ()
4761 {
4762 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
4763               bogus endian macros
4764              #endif
4765
4766   ;
4767   return 0;
4768 }
4769 _ACEOF
4770 if ac_fn_c_try_compile "$LINENO"; then :
4771   # It does; now see whether it defined to _BIG_ENDIAN or not.
4772          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4773 /* end confdefs.h.  */
4774 #include <limits.h>
4775
4776 int
4777 main ()
4778 {
4779 #ifndef _BIG_ENDIAN
4780                  not big endian
4781                 #endif
4782
4783   ;
4784   return 0;
4785 }
4786 _ACEOF
4787 if ac_fn_c_try_compile "$LINENO"; then :
4788   ac_cv_c_bigendian=yes
4789 else
4790   ac_cv_c_bigendian=no
4791 fi
4792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4793 fi
4794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4795     fi
4796     if test $ac_cv_c_bigendian = unknown; then
4797       # Compile a test program.
4798       if test "$cross_compiling" = yes; then :
4799   # Try to guess by grepping values from an object file.
4800          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4801 /* end confdefs.h.  */
4802 short int ascii_mm[] =
4803                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4804                 short int ascii_ii[] =
4805                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4806                 int use_ascii (int i) {
4807                   return ascii_mm[i] + ascii_ii[i];
4808                 }
4809                 short int ebcdic_ii[] =
4810                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4811                 short int ebcdic_mm[] =
4812                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4813                 int use_ebcdic (int i) {
4814                   return ebcdic_mm[i] + ebcdic_ii[i];
4815                 }
4816                 extern int foo;
4817
4818 int
4819 main ()
4820 {
4821 return use_ascii (foo) == use_ebcdic (foo);
4822   ;
4823   return 0;
4824 }
4825 _ACEOF
4826 if ac_fn_c_try_compile "$LINENO"; then :
4827   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
4828               ac_cv_c_bigendian=yes
4829             fi
4830             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4831               if test "$ac_cv_c_bigendian" = unknown; then
4832                 ac_cv_c_bigendian=no
4833               else
4834                 # finding both strings is unlikely to happen, but who knows?
4835                 ac_cv_c_bigendian=unknown
4836               fi
4837             fi
4838 fi
4839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4840 else
4841   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4842 /* end confdefs.h.  */
4843 $ac_includes_default
4844 int
4845 main ()
4846 {
4847
4848              /* Are we little or big endian?  From Harbison&Steele.  */
4849              union
4850              {
4851                long int l;
4852                char c[sizeof (long int)];
4853              } u;
4854              u.l = 1;
4855              return u.c[sizeof (long int) - 1] == 1;
4856
4857   ;
4858   return 0;
4859 }
4860 _ACEOF
4861 if ac_fn_c_try_run "$LINENO"; then :
4862   ac_cv_c_bigendian=no
4863 else
4864   ac_cv_c_bigendian=yes
4865 fi
4866 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4867   conftest.$ac_objext conftest.beam conftest.$ac_ext
4868 fi
4869
4870     fi
4871 fi
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
4873 $as_echo "$ac_cv_c_bigendian" >&6; }
4874  case $ac_cv_c_bigendian in #(
4875    yes)
4876
4877 $as_echo "#define RADIUS_BIG_ENDIAN 1" >>confdefs.h
4878 ;; #(
4879    no)
4880
4881 $as_echo "#define RADIUS_LITTLE_ENDIAN 1" >>confdefs.h
4882
4883  ;; #(
4884    universal)
4885
4886 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
4887
4888      ;; #(
4889    *)
4890      as_fn_error $? "unknown endianness
4891  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
4892  esac
4893
4894
4895 # Extract the first word of "gmake", so it can be a program name with args.
4896 set dummy gmake; ac_word=$2
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4898 $as_echo_n "checking for $ac_word... " >&6; }
4899 if ${ac_cv_prog_GMAKE+:} false; then :
4900   $as_echo_n "(cached) " >&6
4901 else
4902   if test -n "$GMAKE"; then
4903   ac_cv_prog_GMAKE="$GMAKE" # Let the user override the test.
4904 else
4905 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4906 for as_dir in $PATH
4907 do
4908   IFS=$as_save_IFS
4909   test -z "$as_dir" && as_dir=.
4910     for ac_exec_ext in '' $ac_executable_extensions; do
4911   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4912     ac_cv_prog_GMAKE="yes"
4913     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4914     break 2
4915   fi
4916 done
4917   done
4918 IFS=$as_save_IFS
4919
4920   test -z "$ac_cv_prog_GMAKE" && ac_cv_prog_GMAKE="no"
4921 fi
4922 fi
4923 GMAKE=$ac_cv_prog_GMAKE
4924 if test -n "$GMAKE"; then
4925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMAKE" >&5
4926 $as_echo "$GMAKE" >&6; }
4927 else
4928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4929 $as_echo "no" >&6; }
4930 fi
4931
4932
4933 if test $GMAKE = no; then
4934   # Extract the first word of "make", so it can be a program name with args.
4935 set dummy make; ac_word=$2
4936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4937 $as_echo_n "checking for $ac_word... " >&6; }
4938 if ${ac_cv_path_MAKE+:} false; then :
4939   $as_echo_n "(cached) " >&6
4940 else
4941   case $MAKE in
4942   [\\/]* | ?:[\\/]*)
4943   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
4944   ;;
4945   *)
4946   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4947 for as_dir in $PATH
4948 do
4949   IFS=$as_save_IFS
4950   test -z "$as_dir" && as_dir=.
4951     for ac_exec_ext in '' $ac_executable_extensions; do
4952   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4953     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
4954     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4955     break 2
4956   fi
4957 done
4958   done
4959 IFS=$as_save_IFS
4960
4961   test -z "$ac_cv_path_MAKE" && ac_cv_path_MAKE="/usr/local/bin/make"
4962   ;;
4963 esac
4964 fi
4965 MAKE=$ac_cv_path_MAKE
4966 if test -n "$MAKE"; then
4967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4968 $as_echo "$MAKE" >&6; }
4969 else
4970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4971 $as_echo "no" >&6; }
4972 fi
4973
4974
4975 else
4976   # Extract the first word of "gmake", so it can be a program name with args.
4977 set dummy gmake; ac_word=$2
4978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4979 $as_echo_n "checking for $ac_word... " >&6; }
4980 if ${ac_cv_path_MAKE+:} false; then :
4981   $as_echo_n "(cached) " >&6
4982 else
4983   case $MAKE in
4984   [\\/]* | ?:[\\/]*)
4985   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
4986   ;;
4987   *)
4988   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4989 for as_dir in $PATH
4990 do
4991   IFS=$as_save_IFS
4992   test -z "$as_dir" && as_dir=.
4993     for ac_exec_ext in '' $ac_executable_extensions; do
4994   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4995     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
4996     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4997     break 2
4998   fi
4999 done
5000   done
5001 IFS=$as_save_IFS
5002
5003   test -z "$ac_cv_path_MAKE" && ac_cv_path_MAKE="/usr/local/gnu/bin/make"
5004   ;;
5005 esac
5006 fi
5007 MAKE=$ac_cv_path_MAKE
5008 if test -n "$MAKE"; then
5009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
5010 $as_echo "$MAKE" >&6; }
5011 else
5012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5013 $as_echo "no" >&6; }
5014 fi
5015
5016
5017 fi
5018 makever=`$ac_cv_path_MAKE --version 2>&1 | grep "GNU Make"`
5019 if test -z "$makever"; then
5020   as_fn_error $? "GNU Make is not installed.  Please download and install it from ftp://prep.ai.mit.edu/pub/gnu/make/ before continuing." "$LINENO" 5
5021 fi
5022
5023
5024   { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of system cores" >&5
5025 $as_echo_n "checking number of system cores... " >&6; }
5026 if ${ax_cv_system_cores+:} false; then :
5027   $as_echo_n "(cached) " >&6
5028 else
5029
5030       ac_ext=c
5031 ac_cpp='$CPP $CPPFLAGS'
5032 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5033 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5034 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5035
5036       if test "$cross_compiling" = yes; then :
5037   ax_cv_system_cores=
5038
5039 else
5040   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5041 /* end confdefs.h.  */
5042
5043           #include <stdio.h>
5044           #include <stdint.h>
5045           #ifdef _WIN32
5046           #  include <windows.h>
5047           #elif MACOS
5048           #  include <sys/param.h>
5049           #  include <sys/sysctl.h>
5050           #else
5051           #  include <unistd.h>
5052           #endif
5053
5054           int main (int argc, char *argv[])
5055           {
5056             uint32_t count;
5057
5058             #ifdef WIN32
5059             SYSTEM_INFO sysinfo;
5060             GetSystemInfo(&sysinfo);
5061
5062             count = sysinfo.dwNumberOfProcessors;
5063
5064             #elif MACOS
5065             int nm[2];
5066             size_t len = 4;
5067
5068             nm[0] = CTL_HW;
5069             nm[1] = HW_AVAILCPU;
5070             sysctl(nm, 2, &count, &len, NULL, 0);
5071
5072             if(count < 1) {
5073               nm[1] = HW_NCPU;
5074               sysctl(nm, 2, &count, &len, NULL, 0);
5075               if(count < 1) {
5076                 count = 1;
5077               }
5078             }
5079
5080             #else
5081             count = sysconf(_SC_NPROCESSORS_ONLN);
5082             #endif
5083
5084             return count;
5085           }
5086
5087 _ACEOF
5088 if ac_fn_c_try_run "$LINENO"; then :
5089   ax_cv_system_cores=$?
5090 else
5091   ax_cv_system_cores=$?
5092 fi
5093 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5094   conftest.$ac_objext conftest.beam conftest.$ac_ext
5095 fi
5096
5097     ac_ext=c
5098 ac_cpp='$CPP $CPPFLAGS'
5099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5102
5103
5104 fi
5105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_system_cores" >&5
5106 $as_echo "$ax_cv_system_cores" >&6; }
5107
5108
5109
5110
5111 # Extract the first word of "git", so it can be a program name with args.
5112 set dummy git; ac_word=$2
5113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5114 $as_echo_n "checking for $ac_word... " >&6; }
5115 if ${ac_cv_prog_GIT+:} false; then :
5116   $as_echo_n "(cached) " >&6
5117 else
5118   if test -n "$GIT"; then
5119   ac_cv_prog_GIT="$GIT" # Let the user override the test.
5120 else
5121 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5122 for as_dir in $PATH
5123 do
5124   IFS=$as_save_IFS
5125   test -z "$as_dir" && as_dir=.
5126     for ac_exec_ext in '' $ac_executable_extensions; do
5127   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5128     ac_cv_prog_GIT="yes"
5129     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5130     break 2
5131   fi
5132 done
5133   done
5134 IFS=$as_save_IFS
5135
5136   test -z "$ac_cv_prog_GIT" && ac_cv_prog_GIT="no"
5137 fi
5138 fi
5139 GIT=$ac_cv_prog_GIT
5140 if test -n "$GIT"; then
5141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5
5142 $as_echo "$GIT" >&6; }
5143 else
5144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5145 $as_echo "no" >&6; }
5146 fi
5147
5148
5149
5150
5151 # Check whether --enable-strict-dependencies was given.
5152 if test "${enable_strict_dependencies+set}" = set; then :
5153   enableval=$enable_strict_dependencies;
5154 fi
5155
5156
5157 # Check whether --enable-werror was given.
5158 if test "${enable_werror+set}" = set; then :
5159   enableval=$enable_werror;  case "$enableval" in
5160     no)
5161       werror=no
5162     ;;
5163     *)
5164       werror=yes
5165   esac
5166
5167 fi
5168
5169
5170 docdir='${datadir}/doc/freeradius'
5171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking docdir" >&5
5172 $as_echo_n "checking docdir... " >&6; }
5173
5174 # Check whether --with-docdir was given.
5175 if test "${with_docdir+set}" = set; then :
5176   withval=$with_docdir;  case "$withval" in
5177   no)
5178     docdir=no
5179     ;;
5180   yes)
5181     ;;
5182   [\\/$]* | ?:[\\/]* )
5183     docdir="$withval"
5184     ;;
5185   *)
5186     as_fn_error $? "expected an absolute directory name for --with-docdir: $withval" "$LINENO" 5
5187     ;;
5188   esac
5189
5190 fi
5191
5192
5193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $docdir" >&5
5194 $as_echo "$docdir" >&6; }
5195 if test "x$docdir" = xno; then
5196   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Documentation files will NOT be installed." >&5
5197 $as_echo "$as_me: WARNING: Documentation files will NOT be installed." >&2;}
5198 fi
5199
5200 logdir='${localstatedir}/log/radius'
5201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking logdir" >&5
5202 $as_echo_n "checking logdir... " >&6; }
5203
5204 # Check whether --with-logdir was given.
5205 if test "${with_logdir+set}" = set; then :
5206   withval=$with_logdir;  case "$withval" in
5207   no)
5208     as_fn_error $? "Need logdir" "$LINENO" 5
5209     ;;
5210   yes)
5211     ;;
5212   [\\/$]* | ?:[\\/]* )
5213     logdir="$withval"
5214     ;;
5215   *)
5216     as_fn_error $? "expected an absolute directory name for --with-logdir: $withval" "$LINENO" 5
5217     ;;
5218   esac
5219
5220 fi
5221
5222
5223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $logdir" >&5
5224 $as_echo "$logdir" >&6; }
5225
5226 radacctdir='${logdir}/radacct'
5227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking radacctdir" >&5
5228 $as_echo_n "checking radacctdir... " >&6; }
5229
5230 # Check whether --with-radacctdir was given.
5231 if test "${with_radacctdir+set}" = set; then :
5232   withval=$with_radacctdir;  case "$withval" in
5233   no)
5234     as_fn_error $? "Need radacctdir" "$LINENO" 5
5235     ;;
5236   yes)
5237     ;;
5238   [\\/$]* | ?:[\\/]* )
5239     radacctdir="$withval"
5240     ;;
5241   *)
5242     as_fn_error $? "expected an absolute directory name for --with-radacctdir: $withval" "$LINENO" 5
5243     ;;
5244   esac
5245
5246 fi
5247
5248
5249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $radacctdir" >&5
5250 $as_echo "$radacctdir" >&6; }
5251
5252 raddbdir='${sysconfdir}/raddb'
5253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking raddbdir" >&5
5254 $as_echo_n "checking raddbdir... " >&6; }
5255
5256 # Check whether --with-raddbdir was given.
5257 if test "${with_raddbdir+set}" = set; then :
5258   withval=$with_raddbdir;  case "$withval" in
5259   no)
5260     as_fn_error $? "Need raddbdir" "$LINENO" 5
5261     ;;
5262   yes)
5263     ;;
5264   [\\/$]* | ?:[\\/]* )
5265     raddbdir="$withval"
5266     ;;
5267   *)
5268     as_fn_error $? "expected an absolute directory name for --with-raddbdir: $withval" "$LINENO" 5
5269     ;;
5270   esac
5271
5272 fi
5273
5274
5275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $raddbdir" >&5
5276 $as_echo "$raddbdir" >&6; }
5277
5278 dictdir='${datarootdir}/freeradius'
5279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dictdir" >&5
5280 $as_echo_n "checking dictdir... " >&6; }
5281
5282 # Check whether --with-dictdir was given.
5283 if test "${with_dictdir+set}" = set; then :
5284   withval=$with_dictdir;  case "$withval" in
5285   no)
5286     as_fn_error $? "Need dictdir" "$LINENO" 5
5287     ;;
5288   yes)
5289     ;;
5290   [\\/$]* | ?:[\\/]* )
5291     dictdir="$withval"
5292     ;;
5293   *)
5294     as_fn_error $? "expected an absolute directory name for --with-dictdir: $withval" "$LINENO" 5
5295     ;;
5296   esac
5297
5298 fi
5299
5300
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dictdir" >&5
5302 $as_echo "$dictdir" >&6; }
5303
5304 modconfdir='${raddbdir}/mods-config'
5305
5306
5307 WITH_ASCEND_BINARY=yes
5308
5309 # Check whether --with-ascend-binary was given.
5310 if test "${with_ascend_binary+set}" = set; then :
5311   withval=$with_ascend_binary;  case "$withval" in
5312   yes)
5313     ;;
5314   *)
5315     WITH_ASCEND_BINARY=no
5316   esac
5317
5318 fi
5319
5320 if test "x$WITH_ASCEND_BINARY" = "xyes"; then
5321
5322 $as_echo "#define WITH_ASCEND_BINARY 1" >>confdefs.h
5323
5324 fi
5325
5326 WITH_THREADS=yes
5327
5328 # Check whether --with-threads was given.
5329 if test "${with_threads+set}" = set; then :
5330   withval=$with_threads;  case "$withval" in
5331   yes)
5332     ;;
5333   *)
5334     WITH_THREADS=no
5335   esac
5336
5337 fi
5338
5339
5340 WITH_TCP=yes
5341
5342 # Check whether --with-tcp was given.
5343 if test "${with_tcp+set}" = set; then :
5344   withval=$with_tcp;  case "$withval" in
5345   yes)
5346     ;;
5347   *)
5348     WITH_TCP=no
5349   esac
5350
5351 fi
5352
5353 if test "x$WITH_TCP" = "xyes"; then
5354
5355 $as_echo "#define WITH_TCP 1" >>confdefs.h
5356
5357 fi
5358
5359 WITH_VMPS=yes
5360
5361 # Check whether --with-vmps was given.
5362 if test "${with_vmps+set}" = set; then :
5363   withval=$with_vmps;  case "$withval" in
5364   yes)
5365     ;;
5366   *)
5367     WITH_VMPS=no
5368   esac
5369
5370 fi
5371
5372 if test "x$WITH_VMPS" = "xyes"; then
5373
5374 $as_echo "#define WITH_VMPS 1" >>confdefs.h
5375
5376 fi
5377
5378 WITH_DHCP=yes
5379
5380 # Check whether --with-dhcp was given.
5381 if test "${with_dhcp+set}" = set; then :
5382   withval=$with_dhcp;  case "$withval" in
5383   yes)
5384     ;;
5385   *)
5386     WITH_DHCP=no
5387   esac
5388
5389 fi
5390
5391 if test "x$WITH_DHCP" = "xyes"; then
5392
5393 $as_echo "#define WITH_DHCP 1" >>confdefs.h
5394
5395 fi
5396
5397 STATIC_MODULES=
5398
5399 # Check whether --with-static_modules was given.
5400 if test "${with_static_modules+set}" = set; then :
5401   withval=$with_static_modules;
5402   for i in $withval; do
5403     STATIC_MODULES="$STATIC_MODULES -dlpreopen ../modules/rlm_$i/rlm_$i.la"
5404   done
5405
5406 fi
5407
5408
5409 USE_SHARED_LIBS=yes
5410
5411 # Check whether --with-shared-libs was given.
5412 if test "${with_shared_libs+set}" = set; then :
5413   withval=$with_shared_libs;  case "$withval" in
5414   no)
5415     USE_SHARED_LIBS=no
5416     ;;
5417   *)
5418   esac
5419
5420 fi
5421
5422
5423 MODULES=
5424
5425 # Check whether --with-modules was given.
5426 if test "${with_modules+set}" = set; then :
5427   withval=$with_modules;
5428  for i in $withval; do
5429    MODULES="$MODULES $i"
5430  done
5431
5432 fi
5433
5434
5435 EXPERIMENTAL=
5436
5437 # Check whether --with-experimental-modules was given.
5438 if test "${with_experimental_modules+set}" = set; then :
5439   withval=$with_experimental_modules;  case "$withval" in
5440   yes)
5441     EXPERIMENTAL=yes
5442     ;;
5443   no)
5444     EXPERIMENTAL=no
5445     ;;
5446   *)
5447   esac
5448
5449 fi
5450
5451
5452 WITH_UDPFROMTO=yes
5453
5454 # Check whether --with-udpfromto was given.
5455 if test "${with_udpfromto+set}" = set; then :
5456   withval=$with_udpfromto;  case "$withval" in
5457   yes)
5458     WITH_UDPFROMTO=yes
5459     ;;
5460   *)
5461     WITH_UDPFROMTO=no
5462   esac
5463
5464 fi
5465
5466
5467 if test "x$WITH_UDPFROMTO" = "xyes"; then
5468
5469 $as_echo "#define WITH_UDPFROMTO /**/" >>confdefs.h
5470
5471 fi
5472
5473
5474
5475 # Check whether --with-rlm-FOO-lib-dir was given.
5476 if test "${with_rlm_FOO_lib_dir+set}" = set; then :
5477   withval=$with_rlm_FOO_lib_dir;  case "$withval" in
5478   *)
5479     ;;
5480   esac
5481
5482 fi
5483
5484
5485
5486 # Check whether --with-rlm-FOO-include-dir was given.
5487 if test "${with_rlm_FOO_include_dir+set}" = set; then :
5488   withval=$with_rlm_FOO_include_dir;  case "$withval" in
5489   *)
5490     ;;
5491   esac
5492
5493 fi
5494
5495
5496 WITH_OPENSSL=yes
5497
5498 # Check whether --with-openssl was given.
5499 if test "${with_openssl+set}" = set; then :
5500   withval=$with_openssl;  case "$withval" in
5501   no)
5502     WITH_OPENSSL=no
5503     ;;
5504   *)
5505     WITH_OPENSSL=yes
5506     ;;
5507   esac
5508
5509 fi
5510
5511
5512 openssl_lib_dir=
5513
5514 # Check whether --with-openssl-lib-dir was given.
5515 if test "${with_openssl_lib_dir+set}" = set; then :
5516   withval=$with_openssl_lib_dir;  case "$withval" in
5517   *) openssl_lib_dir="$withval"
5518     ;;
5519   esac
5520
5521 fi
5522
5523
5524 openssl_include_dir=
5525
5526 # Check whether --with-openssl-include-dir was given.
5527 if test "${with_openssl_include_dir+set}" = set; then :
5528   withval=$with_openssl_include_dir;  case "$withval" in
5529   *) openssl_include_dir="$withval"
5530     ;;
5531   esac
5532
5533 fi
5534
5535
5536 # Check whether --enable-openssl-version-check was given.
5537 if test "${enable_openssl_version_check+set}" = set; then :
5538   enableval=$enable_openssl_version_check;
5539 fi
5540
5541 if test "x$enable_openssl_version_check" != "xno"; then
5542
5543 $as_echo "#define ENABLE_OPENSSL_VERSION_CHECK 1" >>confdefs.h
5544
5545   openssl_version_check_config="\
5546         #
5547         #  allow_vulnerable_openssl: Allow the server to start with
5548         #  versions of OpenSSL known to have critical vulnerabilities.
5549         #
5550         #  This check is based on the version number reported by libssl
5551         #  and may not reflect patches applied to libssl by
5552         #  distribution maintainers.
5553         #
5554         allow_vulnerable_openssl = no"
5555 else
5556   openssl_version_check_config=
5557 fi
5558
5559
5560
5561
5562 CHECKRAD=checkrad
5563 # Extract the first word of "perl", so it can be a program name with args.
5564 set dummy perl; ac_word=$2
5565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5566 $as_echo_n "checking for $ac_word... " >&6; }
5567 if ${ac_cv_path_PERL+:} false; then :
5568   $as_echo_n "(cached) " >&6
5569 else
5570   case $PERL in
5571   [\\/]* | ?:[\\/]*)
5572   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5573   ;;
5574   *)
5575   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5576 for as_dir in $PATH
5577 do
5578   IFS=$as_save_IFS
5579   test -z "$as_dir" && as_dir=.
5580     for ac_exec_ext in '' $ac_executable_extensions; do
5581   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5582     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5583     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5584     break 2
5585   fi
5586 done
5587   done
5588 IFS=$as_save_IFS
5589
5590   test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="/usr/local/bin/perl"
5591   ;;
5592 esac
5593 fi
5594 PERL=$ac_cv_path_PERL
5595 if test -n "$PERL"; then
5596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
5597 $as_echo "$PERL" >&6; }
5598 else
5599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5600 $as_echo "no" >&6; }
5601 fi
5602
5603
5604 if test "x$ac_cv_path_PERL" = "x"; then
5605   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl not found - Simultaneous-Use and checkrad may not work" >&5
5606 $as_echo "$as_me: WARNING: perl not found - Simultaneous-Use and checkrad may not work" >&2;}
5607 fi
5608 # Extract the first word of "snmpget", so it can be a program name with args.
5609 set dummy snmpget; ac_word=$2
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5611 $as_echo_n "checking for $ac_word... " >&6; }
5612 if ${ac_cv_path_SNMPGET+:} false; then :
5613   $as_echo_n "(cached) " >&6
5614 else
5615   case $SNMPGET in
5616   [\\/]* | ?:[\\/]*)
5617   ac_cv_path_SNMPGET="$SNMPGET" # Let the user override the test with a path.
5618   ;;
5619   *)
5620   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5621 for as_dir in $PATH
5622 do
5623   IFS=$as_save_IFS
5624   test -z "$as_dir" && as_dir=.
5625     for ac_exec_ext in '' $ac_executable_extensions; do
5626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5627     ac_cv_path_SNMPGET="$as_dir/$ac_word$ac_exec_ext"
5628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5629     break 2
5630   fi
5631 done
5632   done
5633 IFS=$as_save_IFS
5634
5635   ;;
5636 esac
5637 fi
5638 SNMPGET=$ac_cv_path_SNMPGET
5639 if test -n "$SNMPGET"; then
5640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SNMPGET" >&5
5641 $as_echo "$SNMPGET" >&6; }
5642 else
5643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5644 $as_echo "no" >&6; }
5645 fi
5646
5647
5648 if test "x$ac_cv_path_SNMPGET" = "x"; then
5649   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: snmpget not found - Simultaneous-Use and checkrad may not work" >&5
5650 $as_echo "$as_me: WARNING: snmpget not found - Simultaneous-Use and checkrad may not work" >&2;}
5651 fi
5652
5653 # Extract the first word of "snmpwalk", so it can be a program name with args.
5654 set dummy snmpwalk; ac_word=$2
5655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5656 $as_echo_n "checking for $ac_word... " >&6; }
5657 if ${ac_cv_path_SNMPWALK+:} false; then :
5658   $as_echo_n "(cached) " >&6
5659 else
5660   case $SNMPWALK in
5661   [\\/]* | ?:[\\/]*)
5662   ac_cv_path_SNMPWALK="$SNMPWALK" # Let the user override the test with a path.
5663   ;;
5664   *)
5665   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5666 for as_dir in $PATH
5667 do
5668   IFS=$as_save_IFS
5669   test -z "$as_dir" && as_dir=.
5670     for ac_exec_ext in '' $ac_executable_extensions; do
5671   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5672     ac_cv_path_SNMPWALK="$as_dir/$ac_word$ac_exec_ext"
5673     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5674     break 2
5675   fi
5676 done
5677   done
5678 IFS=$as_save_IFS
5679
5680   ;;
5681 esac
5682 fi
5683 SNMPWALK=$ac_cv_path_SNMPWALK
5684 if test -n "$SNMPWALK"; then
5685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SNMPWALK" >&5
5686 $as_echo "$SNMPWALK" >&6; }
5687 else
5688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5689 $as_echo "no" >&6; }
5690 fi
5691
5692
5693 if test "x$ac_cv_path_SNMPWALK" = "x"; then
5694   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: snmpwalk not found - Simultaneous-Use and checkrad may not work" >&5
5695 $as_echo "$as_me: WARNING: snmpwalk not found - Simultaneous-Use and checkrad may not work" >&2;}
5696 fi
5697
5698 # Extract the first word of "rusers", so it can be a program name with args.
5699 set dummy rusers; ac_word=$2
5700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5701 $as_echo_n "checking for $ac_word... " >&6; }
5702 if ${ac_cv_path_RUSERS+:} false; then :
5703   $as_echo_n "(cached) " >&6
5704 else
5705   case $RUSERS in
5706   [\\/]* | ?:[\\/]*)
5707   ac_cv_path_RUSERS="$RUSERS" # Let the user override the test with a path.
5708   ;;
5709   *)
5710   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5711 for as_dir in $PATH
5712 do
5713   IFS=$as_save_IFS
5714   test -z "$as_dir" && as_dir=.
5715     for ac_exec_ext in '' $ac_executable_extensions; do
5716   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5717     ac_cv_path_RUSERS="$as_dir/$ac_word$ac_exec_ext"
5718     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5719     break 2
5720   fi
5721 done
5722   done
5723 IFS=$as_save_IFS
5724
5725   test -z "$ac_cv_path_RUSERS" && ac_cv_path_RUSERS="/usr/bin/rusers"
5726   ;;
5727 esac
5728 fi
5729 RUSERS=$ac_cv_path_RUSERS
5730 if test -n "$RUSERS"; then
5731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUSERS" >&5
5732 $as_echo "$RUSERS" >&6; }
5733 else
5734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5735 $as_echo "no" >&6; }
5736 fi
5737
5738
5739
5740 missing_dir=`cd $ac_aux_dir && pwd`
5741 # expand $ac_aux_dir to an absolute path
5742 am_aux_dir=`cd $ac_aux_dir && pwd`
5743
5744 if test x"${MISSING+set}" != xset; then
5745   case $am_aux_dir in
5746   *\ * | *\     *)
5747     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
5748   *)
5749     MISSING="\${SHELL} $am_aux_dir/missing" ;;
5750   esac
5751 fi
5752 # Use eval to expand $SHELL
5753 if eval "$MISSING --run true"; then
5754   am_missing_run="$MISSING --run "
5755 else
5756   am_missing_run=
5757   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
5758 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
5759 fi
5760
5761
5762 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
5763
5764
5765 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
5766
5767
5768 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
5769
5770
5771 # Extract the first word of "locate", so it can be a program name with args.
5772 set dummy locate; ac_word=$2
5773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5774 $as_echo_n "checking for $ac_word... " >&6; }
5775 if ${ac_cv_path_LOCATE+:} false; then :
5776   $as_echo_n "(cached) " >&6
5777 else
5778   case $LOCATE in
5779   [\\/]* | ?:[\\/]*)
5780   ac_cv_path_LOCATE="$LOCATE" # Let the user override the test with a path.
5781   ;;
5782   *)
5783   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5784 for as_dir in $PATH
5785 do
5786   IFS=$as_save_IFS
5787   test -z "$as_dir" && as_dir=.
5788     for ac_exec_ext in '' $ac_executable_extensions; do
5789   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5790     ac_cv_path_LOCATE="$as_dir/$ac_word$ac_exec_ext"
5791     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5792     break 2
5793   fi
5794 done
5795   done
5796 IFS=$as_save_IFS
5797
5798   ;;
5799 esac
5800 fi
5801 LOCATE=$ac_cv_path_LOCATE
5802 if test -n "$LOCATE"; then
5803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOCATE" >&5
5804 $as_echo "$LOCATE" >&6; }
5805 else
5806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5807 $as_echo "no" >&6; }
5808 fi
5809
5810
5811 # Extract the first word of "dirname", so it can be a program name with args.
5812 set dummy dirname; ac_word=$2
5813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5814 $as_echo_n "checking for $ac_word... " >&6; }
5815 if ${ac_cv_path_DIRNAME+:} false; then :
5816   $as_echo_n "(cached) " >&6
5817 else
5818   case $DIRNAME in
5819   [\\/]* | ?:[\\/]*)
5820   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
5821   ;;
5822   *)
5823   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5824 for as_dir in $PATH
5825 do
5826   IFS=$as_save_IFS
5827   test -z "$as_dir" && as_dir=.
5828     for ac_exec_ext in '' $ac_executable_extensions; do
5829   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5830     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
5831     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5832     break 2
5833   fi
5834 done
5835   done
5836 IFS=$as_save_IFS
5837
5838   ;;
5839 esac
5840 fi
5841 DIRNAME=$ac_cv_path_DIRNAME
5842 if test -n "$DIRNAME"; then
5843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
5844 $as_echo "$DIRNAME" >&6; }
5845 else
5846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5847 $as_echo "no" >&6; }
5848 fi
5849
5850
5851 # Extract the first word of "grep", so it can be a program name with args.
5852 set dummy grep; ac_word=$2
5853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5854 $as_echo_n "checking for $ac_word... " >&6; }
5855 if ${ac_cv_path_GREP+:} false; then :
5856   $as_echo_n "(cached) " >&6
5857 else
5858   case $GREP in
5859   [\\/]* | ?:[\\/]*)
5860   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
5861   ;;
5862   *)
5863   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5864 for as_dir in $PATH
5865 do
5866   IFS=$as_save_IFS
5867   test -z "$as_dir" && as_dir=.
5868     for ac_exec_ext in '' $ac_executable_extensions; do
5869   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5870     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
5871     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5872     break 2
5873   fi
5874 done
5875   done
5876 IFS=$as_save_IFS
5877
5878   ;;
5879 esac
5880 fi
5881 GREP=$ac_cv_path_GREP
5882 if test -n "$GREP"; then
5883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
5884 $as_echo "$GREP" >&6; }
5885 else
5886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5887 $as_echo "no" >&6; }
5888 fi
5889
5890
5891
5892
5893 talloc_lib_dir=
5894
5895 # Check whether --with-talloc-lib-dir was given.
5896 if test "${with_talloc_lib_dir+set}" = set; then :
5897   withval=$with_talloc_lib_dir; case "$withval" in
5898     no)
5899       as_fn_error $? "Need talloc-lib-dir" "$LINENO" 5
5900       ;;
5901     yes)
5902       ;;
5903     *)
5904       talloc_lib_dir="$withval"
5905       ;;
5906   esac
5907 fi
5908
5909
5910 talloc_include_dir=
5911
5912 # Check whether --with-talloc-include-dir was given.
5913 if test "${with_talloc_include_dir+set}" = set; then :
5914   withval=$with_talloc_include_dir; case "$withval" in
5915     no)
5916       as_fn_error $? "Need talloc-include-dir" "$LINENO" 5
5917       ;;
5918     yes)
5919       ;;
5920     *)
5921       talloc_include_dir="$withval"
5922       ;;
5923   esac
5924 fi
5925
5926
5927 smart_try_dir="$talloc_lib_dir"
5928
5929
5930 sm_lib_safe=`echo "talloc" | sed 'y%./+-%__p_%'`
5931 sm_func_safe=`echo "_talloc" | sed 'y%./+-%__p_%'`
5932
5933 old_LIBS="$LIBS"
5934 old_CPPFLAGS="$CPPFLAGS"
5935 smart_lib=
5936 smart_ldflags=
5937 smart_lib_dir=
5938
5939 if test "x$smart_try_dir" != "x"; then
5940   for try in $smart_try_dir; do
5941     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc in $try" >&5
5942 $as_echo_n "checking for _talloc in -ltalloc in $try... " >&6; }
5943     LIBS="-ltalloc $old_LIBS"
5944     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
5945     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5946 /* end confdefs.h.  */
5947 extern char _talloc();
5948 int
5949 main ()
5950 {
5951 _talloc()
5952   ;
5953   return 0;
5954 }
5955 _ACEOF
5956 if ac_fn_c_try_link "$LINENO"; then :
5957
5958                  smart_lib="-ltalloc"
5959                  smart_ldflags="-L$try -Wl,-rpath,$try"
5960                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5961 $as_echo "yes" >&6; }
5962                  break
5963
5964 else
5965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5966 $as_echo "no" >&6; }
5967 fi
5968 rm -f core conftest.err conftest.$ac_objext \
5969     conftest$ac_exeext conftest.$ac_ext
5970   done
5971   LIBS="$old_LIBS"
5972   CPPFLAGS="$old_CPPFLAGS"
5973 fi
5974
5975 if test "x$smart_lib" = "x"; then
5976   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc" >&5
5977 $as_echo_n "checking for _talloc in -ltalloc... " >&6; }
5978   LIBS="-ltalloc $old_LIBS"
5979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5980 /* end confdefs.h.  */
5981 extern char _talloc();
5982 int
5983 main ()
5984 {
5985 _talloc()
5986   ;
5987   return 0;
5988 }
5989 _ACEOF
5990 if ac_fn_c_try_link "$LINENO"; then :
5991
5992                 smart_lib="-ltalloc"
5993                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5994 $as_echo "yes" >&6; }
5995
5996 else
5997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5998 $as_echo "no" >&6; }
5999 fi
6000 rm -f core conftest.err conftest.$ac_objext \
6001     conftest$ac_exeext conftest.$ac_ext
6002   LIBS="$old_LIBS"
6003 fi
6004
6005 if test "x$smart_lib" = "x"; then
6006
6007
6008 if test "x$LOCATE" != "x"; then
6009         DIRS=
6010   file=libtalloc${libltdl_cv_shlibext}
6011
6012   for x in `${LOCATE} $file 2>/dev/null`; do
6013                                         base=`echo $x | sed "s%/${file}%%"`
6014     if test "x$x" = "x$base"; then
6015       continue;
6016     fi
6017
6018     dir=`${DIRNAME} $x 2>/dev/null`
6019                 exclude=`echo ${dir} | ${GREP} /home`
6020     if test "x$exclude" != "x"; then
6021       continue
6022     fi
6023
6024                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6025     if test "x$already" = "x"; then
6026       DIRS="$DIRS $dir"
6027     fi
6028   done
6029 fi
6030
6031 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6032
6033
6034
6035 if test "x$LOCATE" != "x"; then
6036         DIRS=
6037   file=libtalloc.a
6038
6039   for x in `${LOCATE} $file 2>/dev/null`; do
6040                                         base=`echo $x | sed "s%/${file}%%"`
6041     if test "x$x" = "x$base"; then
6042       continue;
6043     fi
6044
6045     dir=`${DIRNAME} $x 2>/dev/null`
6046                 exclude=`echo ${dir} | ${GREP} /home`
6047     if test "x$exclude" != "x"; then
6048       continue
6049     fi
6050
6051                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6052     if test "x$already" = "x"; then
6053       DIRS="$DIRS $dir"
6054     fi
6055   done
6056 fi
6057
6058 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6059
6060
6061   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
6062     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc in $try" >&5
6063 $as_echo_n "checking for _talloc in -ltalloc in $try... " >&6; }
6064     LIBS="-ltalloc $old_LIBS"
6065     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6066     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6067 /* end confdefs.h.  */
6068 extern char _talloc();
6069 int
6070 main ()
6071 {
6072 _talloc()
6073   ;
6074   return 0;
6075 }
6076 _ACEOF
6077 if ac_fn_c_try_link "$LINENO"; then :
6078
6079                   smart_lib="-ltalloc"
6080                   smart_ldflags="-L$try -Wl,-rpath,$try"
6081                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6082 $as_echo "yes" >&6; }
6083                   break
6084
6085 else
6086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6087 $as_echo "no" >&6; }
6088 fi
6089 rm -f core conftest.err conftest.$ac_objext \
6090     conftest$ac_exeext conftest.$ac_ext
6091   done
6092   LIBS="$old_LIBS"
6093   CPPFLAGS="$old_CPPFLAGS"
6094 fi
6095
6096 if test "x$smart_lib" != "x"; then
6097   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
6098   LIBS="$smart_ldflags $smart_lib $old_LIBS"
6099   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
6100 fi
6101
6102 if test "x$ac_cv_lib_talloc__talloc" != "xyes"; then
6103   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: talloc library not found. Use --with-talloc-lib-dir=<path>." >&5
6104 $as_echo "$as_me: WARNING: talloc library not found. Use --with-talloc-lib-dir=<path>." >&2;}
6105   as_fn_error $? "FreeRADIUS requires libtalloc" "$LINENO" 5
6106 fi
6107
6108 TALLOC_LIBS="${smart_lib}"
6109 TALLOC_LDFLAGS="${smart_ldflags}"
6110
6111
6112 LIBS="$old_LIBS"
6113
6114 old_CFLAGS=$CFLAGS
6115 if test "x$WITH_THREADS" = "xyes"; then
6116   if test $ac_cv_prog_suncc = "yes"; then
6117     CFLAGS="$CFLAGS -mt"
6118   fi
6119
6120   for ac_header in pthread.h
6121 do :
6122   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
6123 if test "x$ac_cv_header_pthread_h" = xyes; then :
6124   cat >>confdefs.h <<_ACEOF
6125 #define HAVE_PTHREAD_H 1
6126 _ACEOF
6127
6128 else
6129
6130       WITH_THREADS="no"
6131       fail=pthread.h
6132
6133 fi
6134
6135 done
6136
6137
6138                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
6139 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
6140 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
6141   $as_echo_n "(cached) " >&6
6142 else
6143   ac_check_lib_save_LIBS=$LIBS
6144 LIBS="-lpthread  $LIBS"
6145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6146 /* end confdefs.h.  */
6147
6148 /* Override any GCC internal prototype to avoid an error.
6149    Use char because int might match the return type of a GCC
6150    builtin and then its argument prototype would still apply.  */
6151 #ifdef __cplusplus
6152 extern "C"
6153 #endif
6154 char pthread_create ();
6155 int
6156 main ()
6157 {
6158 return pthread_create ();
6159   ;
6160   return 0;
6161 }
6162 _ACEOF
6163 if ac_fn_c_try_link "$LINENO"; then :
6164   ac_cv_lib_pthread_pthread_create=yes
6165 else
6166   ac_cv_lib_pthread_pthread_create=no
6167 fi
6168 rm -f core conftest.err conftest.$ac_objext \
6169     conftest$ac_exeext conftest.$ac_ext
6170 LIBS=$ac_check_lib_save_LIBS
6171 fi
6172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
6173 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
6174 if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
6175
6176       CFLAGS="$CFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
6177       LIBS="-lpthread $LIBS"
6178
6179 else
6180
6181                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
6182 $as_echo_n "checking for pthread_create in -lc_r... " >&6; }
6183 if ${ac_cv_lib_c_r_pthread_create+:} false; then :
6184   $as_echo_n "(cached) " >&6
6185 else
6186   ac_check_lib_save_LIBS=$LIBS
6187 LIBS="-lc_r  $LIBS"
6188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6189 /* end confdefs.h.  */
6190
6191 /* Override any GCC internal prototype to avoid an error.
6192    Use char because int might match the return type of a GCC
6193    builtin and then its argument prototype would still apply.  */
6194 #ifdef __cplusplus
6195 extern "C"
6196 #endif
6197 char pthread_create ();
6198 int
6199 main ()
6200 {
6201 return pthread_create ();
6202   ;
6203   return 0;
6204 }
6205 _ACEOF
6206 if ac_fn_c_try_link "$LINENO"; then :
6207   ac_cv_lib_c_r_pthread_create=yes
6208 else
6209   ac_cv_lib_c_r_pthread_create=no
6210 fi
6211 rm -f core conftest.err conftest.$ac_objext \
6212     conftest$ac_exeext conftest.$ac_ext
6213 LIBS=$ac_check_lib_save_LIBS
6214 fi
6215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
6216 $as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
6217 if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
6218    CFLAGS="$CFLAGS -pthread -D_THREAD_SAFE"
6219 else
6220
6221           WITH_THREADS="no"
6222           fail=-lpthread
6223
6224
6225 fi
6226
6227
6228
6229 fi
6230
6231
6232   if test "x$WITH_THREADS" != "xyes"; then
6233     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: silently not building with thread support." >&5
6234 $as_echo "$as_me: WARNING: silently not building with thread support." >&2;}
6235     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: FAILURE: thread support requires: $fail." >&5
6236 $as_echo "$as_me: WARNING: FAILURE: thread support requires: $fail." >&2;}
6237   else
6238
6239 $as_echo "#define WITH_THREADS 1" >>confdefs.h
6240
6241   fi
6242 fi
6243
6244 if test "x$WITH_THREADS" != "xyes"; then
6245   CFLAGS=$old_CFLAGS
6246   ac_cv_header_pthread_h="no"
6247   WITH_THREADS=no
6248 else
6249
6250   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
6251 $as_echo_n "checking for library containing sem_init... " >&6; }
6252 if ${ac_cv_search_sem_init+:} false; then :
6253   $as_echo_n "(cached) " >&6
6254 else
6255   ac_func_search_save_LIBS=$LIBS
6256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6257 /* end confdefs.h.  */
6258
6259 /* Override any GCC internal prototype to avoid an error.
6260    Use char because int might match the return type of a GCC
6261    builtin and then its argument prototype would still apply.  */
6262 #ifdef __cplusplus
6263 extern "C"
6264 #endif
6265 char sem_init ();
6266 int
6267 main ()
6268 {
6269 return sem_init ();
6270   ;
6271   return 0;
6272 }
6273 _ACEOF
6274 for ac_lib in '' pthread sem posix4 rt semaphore; do
6275   if test -z "$ac_lib"; then
6276     ac_res="none required"
6277   else
6278     ac_res=-l$ac_lib
6279     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6280   fi
6281   if ac_fn_c_try_link "$LINENO"; then :
6282   ac_cv_search_sem_init=$ac_res
6283 fi
6284 rm -f core conftest.err conftest.$ac_objext \
6285     conftest$ac_exeext
6286   if ${ac_cv_search_sem_init+:} false; then :
6287   break
6288 fi
6289 done
6290 if ${ac_cv_search_sem_init+:} false; then :
6291
6292 else
6293   ac_cv_search_sem_init=no
6294 fi
6295 rm conftest.$ac_ext
6296 LIBS=$ac_func_search_save_LIBS
6297 fi
6298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
6299 $as_echo "$ac_cv_search_sem_init" >&6; }
6300 ac_res=$ac_cv_search_sem_init
6301 if test "$ac_res" != no; then :
6302   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6303
6304 else
6305   as_fn_error $? "-lsem not found.  You may want to download it from ftp://ftp.to.gd-es.com/pub/BSDI/libsem.tar.bz2 or ftp://ftp.freeradius.org/pub/radius/contrib/libsem.tar.gz" "$LINENO" 5
6306
6307 fi
6308
6309 fi
6310
6311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
6312 $as_echo_n "checking for dlopen in -ldl... " >&6; }
6313 if ${ac_cv_lib_dl_dlopen+:} false; then :
6314   $as_echo_n "(cached) " >&6
6315 else
6316   ac_check_lib_save_LIBS=$LIBS
6317 LIBS="-ldl  $LIBS"
6318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6319 /* end confdefs.h.  */
6320
6321 /* Override any GCC internal prototype to avoid an error.
6322    Use char because int might match the return type of a GCC
6323    builtin and then its argument prototype would still apply.  */
6324 #ifdef __cplusplus
6325 extern "C"
6326 #endif
6327 char dlopen ();
6328 int
6329 main ()
6330 {
6331 return dlopen ();
6332   ;
6333   return 0;
6334 }
6335 _ACEOF
6336 if ac_fn_c_try_link "$LINENO"; then :
6337   ac_cv_lib_dl_dlopen=yes
6338 else
6339   ac_cv_lib_dl_dlopen=no
6340 fi
6341 rm -f core conftest.err conftest.$ac_objext \
6342     conftest$ac_exeext conftest.$ac_ext
6343 LIBS=$ac_check_lib_save_LIBS
6344 fi
6345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
6346 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
6347 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
6348   cat >>confdefs.h <<_ACEOF
6349 #define HAVE_LIBDL 1
6350 _ACEOF
6351
6352   LIBS="-ldl $LIBS"
6353
6354 fi
6355
6356
6357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getsockname in -lsocket" >&5
6358 $as_echo_n "checking for getsockname in -lsocket... " >&6; }
6359 if ${ac_cv_lib_socket_getsockname+:} false; then :
6360   $as_echo_n "(cached) " >&6
6361 else
6362   ac_check_lib_save_LIBS=$LIBS
6363 LIBS="-lsocket  $LIBS"
6364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6365 /* end confdefs.h.  */
6366
6367 /* Override any GCC internal prototype to avoid an error.
6368    Use char because int might match the return type of a GCC
6369    builtin and then its argument prototype would still apply.  */
6370 #ifdef __cplusplus
6371 extern "C"
6372 #endif
6373 char getsockname ();
6374 int
6375 main ()
6376 {
6377 return getsockname ();
6378   ;
6379   return 0;
6380 }
6381 _ACEOF
6382 if ac_fn_c_try_link "$LINENO"; then :
6383   ac_cv_lib_socket_getsockname=yes
6384 else
6385   ac_cv_lib_socket_getsockname=no
6386 fi
6387 rm -f core conftest.err conftest.$ac_objext \
6388     conftest$ac_exeext conftest.$ac_ext
6389 LIBS=$ac_check_lib_save_LIBS
6390 fi
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getsockname" >&5
6392 $as_echo "$ac_cv_lib_socket_getsockname" >&6; }
6393 if test "x$ac_cv_lib_socket_getsockname" = xyes; then :
6394   cat >>confdefs.h <<_ACEOF
6395 #define HAVE_LIBSOCKET 1
6396 _ACEOF
6397
6398   LIBS="-lsocket $LIBS"
6399
6400 fi
6401
6402
6403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
6404 $as_echo_n "checking for inet_aton in -lresolv... " >&6; }
6405 if ${ac_cv_lib_resolv_inet_aton+:} false; then :
6406   $as_echo_n "(cached) " >&6
6407 else
6408   ac_check_lib_save_LIBS=$LIBS
6409 LIBS="-lresolv  $LIBS"
6410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6411 /* end confdefs.h.  */
6412
6413 /* Override any GCC internal prototype to avoid an error.
6414    Use char because int might match the return type of a GCC
6415    builtin and then its argument prototype would still apply.  */
6416 #ifdef __cplusplus
6417 extern "C"
6418 #endif
6419 char inet_aton ();
6420 int
6421 main ()
6422 {
6423 return inet_aton ();
6424   ;
6425   return 0;
6426 }
6427 _ACEOF
6428 if ac_fn_c_try_link "$LINENO"; then :
6429   ac_cv_lib_resolv_inet_aton=yes
6430 else
6431   ac_cv_lib_resolv_inet_aton=no
6432 fi
6433 rm -f core conftest.err conftest.$ac_objext \
6434     conftest$ac_exeext conftest.$ac_ext
6435 LIBS=$ac_check_lib_save_LIBS
6436 fi
6437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
6438 $as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
6439 if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
6440   cat >>confdefs.h <<_ACEOF
6441 #define HAVE_LIBRESOLV 1
6442 _ACEOF
6443
6444   LIBS="-lresolv $LIBS"
6445
6446 fi
6447
6448
6449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnsl" >&5
6450 $as_echo_n "checking for inet_ntoa in -lnsl... " >&6; }
6451 if ${ac_cv_lib_nsl_inet_ntoa+:} false; then :
6452   $as_echo_n "(cached) " >&6
6453 else
6454   ac_check_lib_save_LIBS=$LIBS
6455 LIBS="-lnsl  $LIBS"
6456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6457 /* end confdefs.h.  */
6458
6459 /* Override any GCC internal prototype to avoid an error.
6460    Use char because int might match the return type of a GCC
6461    builtin and then its argument prototype would still apply.  */
6462 #ifdef __cplusplus
6463 extern "C"
6464 #endif
6465 char inet_ntoa ();
6466 int
6467 main ()
6468 {
6469 return inet_ntoa ();
6470   ;
6471   return 0;
6472 }
6473 _ACEOF
6474 if ac_fn_c_try_link "$LINENO"; then :
6475   ac_cv_lib_nsl_inet_ntoa=yes
6476 else
6477   ac_cv_lib_nsl_inet_ntoa=no
6478 fi
6479 rm -f core conftest.err conftest.$ac_objext \
6480     conftest$ac_exeext conftest.$ac_ext
6481 LIBS=$ac_check_lib_save_LIBS
6482 fi
6483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_inet_ntoa" >&5
6484 $as_echo "$ac_cv_lib_nsl_inet_ntoa" >&6; }
6485 if test "x$ac_cv_lib_nsl_inet_ntoa" = xyes; then :
6486   cat >>confdefs.h <<_ACEOF
6487 #define HAVE_LIBNSL 1
6488 _ACEOF
6489
6490   LIBS="-lnsl $LIBS"
6491
6492 fi
6493
6494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htonl in -lws2_32" >&5
6495 $as_echo_n "checking for htonl in -lws2_32... " >&6; }
6496 if ${ac_cv_lib_ws2_32_htonl+:} false; then :
6497   $as_echo_n "(cached) " >&6
6498 else
6499   ac_check_lib_save_LIBS=$LIBS
6500 LIBS="-lws2_32  $LIBS"
6501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6502 /* end confdefs.h.  */
6503
6504 /* Override any GCC internal prototype to avoid an error.
6505    Use char because int might match the return type of a GCC
6506    builtin and then its argument prototype would still apply.  */
6507 #ifdef __cplusplus
6508 extern "C"
6509 #endif
6510 char htonl ();
6511 int
6512 main ()
6513 {
6514 return htonl ();
6515   ;
6516   return 0;
6517 }
6518 _ACEOF
6519 if ac_fn_c_try_link "$LINENO"; then :
6520   ac_cv_lib_ws2_32_htonl=yes
6521 else
6522   ac_cv_lib_ws2_32_htonl=no
6523 fi
6524 rm -f core conftest.err conftest.$ac_objext \
6525     conftest$ac_exeext conftest.$ac_ext
6526 LIBS=$ac_check_lib_save_LIBS
6527 fi
6528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_htonl" >&5
6529 $as_echo "$ac_cv_lib_ws2_32_htonl" >&6; }
6530 if test "x$ac_cv_lib_ws2_32_htonl" = xyes; then :
6531   cat >>confdefs.h <<_ACEOF
6532 #define HAVE_LIBWS2_32 1
6533 _ACEOF
6534
6535   LIBS="-lws2_32 $LIBS"
6536
6537 fi
6538
6539
6540 pcap_lib_dir=
6541
6542 # Check whether --with-pcap-lib-dir was given.
6543 if test "${with_pcap_lib_dir+set}" = set; then :
6544   withval=$with_pcap_lib_dir; case "$withval" in
6545     no)
6546       as_fn_error $? "Need pcap-lib-dir" "$LINENO" 5
6547       ;;
6548     yes)
6549       ;;
6550     *)
6551       pcap_lib_dir="$withval"
6552       ;;
6553   esac
6554 fi
6555
6556
6557 pcap_include_dir=
6558
6559 # Check whether --with-pcap-include-dir was given.
6560 if test "${with_pcap_include_dir+set}" = set; then :
6561   withval=$with_pcap_include_dir; case "$withval" in
6562     no)
6563       as_fn_error $? "Need pcap-include-dir" "$LINENO" 5
6564       ;;
6565     yes)
6566       ;;
6567     *)
6568       pcap_include_dir="$withval"
6569       ;;
6570   esac
6571 fi
6572
6573
6574 smart_try_dir="$pcap_lib_dir"
6575
6576
6577 sm_lib_safe=`echo "pcap" | sed 'y%./+-%__p_%'`
6578 sm_func_safe=`echo "pcap_open_live" | sed 'y%./+-%__p_%'`
6579
6580 old_LIBS="$LIBS"
6581 old_CPPFLAGS="$CPPFLAGS"
6582 smart_lib=
6583 smart_ldflags=
6584 smart_lib_dir=
6585
6586 if test "x$smart_try_dir" != "x"; then
6587   for try in $smart_try_dir; do
6588     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap in $try" >&5
6589 $as_echo_n "checking for pcap_open_live in -lpcap in $try... " >&6; }
6590     LIBS="-lpcap $old_LIBS"
6591     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6592     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6593 /* end confdefs.h.  */
6594 extern char pcap_open_live();
6595 int
6596 main ()
6597 {
6598 pcap_open_live()
6599   ;
6600   return 0;
6601 }
6602 _ACEOF
6603 if ac_fn_c_try_link "$LINENO"; then :
6604
6605                  smart_lib="-lpcap"
6606                  smart_ldflags="-L$try -Wl,-rpath,$try"
6607                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6608 $as_echo "yes" >&6; }
6609                  break
6610
6611 else
6612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6613 $as_echo "no" >&6; }
6614 fi
6615 rm -f core conftest.err conftest.$ac_objext \
6616     conftest$ac_exeext conftest.$ac_ext
6617   done
6618   LIBS="$old_LIBS"
6619   CPPFLAGS="$old_CPPFLAGS"
6620 fi
6621
6622 if test "x$smart_lib" = "x"; then
6623   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap" >&5
6624 $as_echo_n "checking for pcap_open_live in -lpcap... " >&6; }
6625   LIBS="-lpcap $old_LIBS"
6626   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6627 /* end confdefs.h.  */
6628 extern char pcap_open_live();
6629 int
6630 main ()
6631 {
6632 pcap_open_live()
6633   ;
6634   return 0;
6635 }
6636 _ACEOF
6637 if ac_fn_c_try_link "$LINENO"; then :
6638
6639                 smart_lib="-lpcap"
6640                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6641 $as_echo "yes" >&6; }
6642
6643 else
6644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6645 $as_echo "no" >&6; }
6646 fi
6647 rm -f core conftest.err conftest.$ac_objext \
6648     conftest$ac_exeext conftest.$ac_ext
6649   LIBS="$old_LIBS"
6650 fi
6651
6652 if test "x$smart_lib" = "x"; then
6653
6654
6655 if test "x$LOCATE" != "x"; then
6656         DIRS=
6657   file=libpcap${libltdl_cv_shlibext}
6658
6659   for x in `${LOCATE} $file 2>/dev/null`; do
6660                                         base=`echo $x | sed "s%/${file}%%"`
6661     if test "x$x" = "x$base"; then
6662       continue;
6663     fi
6664
6665     dir=`${DIRNAME} $x 2>/dev/null`
6666                 exclude=`echo ${dir} | ${GREP} /home`
6667     if test "x$exclude" != "x"; then
6668       continue
6669     fi
6670
6671                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6672     if test "x$already" = "x"; then
6673       DIRS="$DIRS $dir"
6674     fi
6675   done
6676 fi
6677
6678 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6679
6680
6681
6682 if test "x$LOCATE" != "x"; then
6683         DIRS=
6684   file=libpcap.a
6685
6686   for x in `${LOCATE} $file 2>/dev/null`; do
6687                                         base=`echo $x | sed "s%/${file}%%"`
6688     if test "x$x" = "x$base"; then
6689       continue;
6690     fi
6691
6692     dir=`${DIRNAME} $x 2>/dev/null`
6693                 exclude=`echo ${dir} | ${GREP} /home`
6694     if test "x$exclude" != "x"; then
6695       continue
6696     fi
6697
6698                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6699     if test "x$already" = "x"; then
6700       DIRS="$DIRS $dir"
6701     fi
6702   done
6703 fi
6704
6705 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6706
6707
6708   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
6709     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap in $try" >&5
6710 $as_echo_n "checking for pcap_open_live in -lpcap in $try... " >&6; }
6711     LIBS="-lpcap $old_LIBS"
6712     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6713     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6714 /* end confdefs.h.  */
6715 extern char pcap_open_live();
6716 int
6717 main ()
6718 {
6719 pcap_open_live()
6720   ;
6721   return 0;
6722 }
6723 _ACEOF
6724 if ac_fn_c_try_link "$LINENO"; then :
6725
6726                   smart_lib="-lpcap"
6727                   smart_ldflags="-L$try -Wl,-rpath,$try"
6728                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6729 $as_echo "yes" >&6; }
6730                   break
6731
6732 else
6733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6734 $as_echo "no" >&6; }
6735 fi
6736 rm -f core conftest.err conftest.$ac_objext \
6737     conftest$ac_exeext conftest.$ac_ext
6738   done
6739   LIBS="$old_LIBS"
6740   CPPFLAGS="$old_CPPFLAGS"
6741 fi
6742
6743 if test "x$smart_lib" != "x"; then
6744   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
6745   LIBS="$smart_ldflags $smart_lib $old_LIBS"
6746   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
6747 fi
6748
6749 if test "x$ac_cv_lib_pcap_pcap_open_live" != "xyes"; then
6750   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pcap library not found, silently disabling the RADIUS sniffer, and ARP listener.  Use --with-pcap-lib-dir=<path>." >&5
6751 $as_echo "$as_me: WARNING: pcap library not found, silently disabling the RADIUS sniffer, and ARP listener.  Use --with-pcap-lib-dir=<path>." >&2;}
6752 else
6753
6754 $as_echo "#define HAVE_LIBPCAP 1" >>confdefs.h
6755
6756
6757   for ac_func in \
6758     pcap_fopen_offline \
6759     pcap_dump_fopen \
6760     pcap_create \
6761     pcap_activate
6762
6763 do :
6764   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6765 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6766 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6767   cat >>confdefs.h <<_ACEOF
6768 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6769 _ACEOF
6770
6771 fi
6772 done
6773
6774
6775   PCAP_LIBS="${smart_lib}"
6776   PCAP_LDFLAGS="${smart_ldflags}"
6777 fi
6778 LIBS="${old_LIBS}"
6779
6780 collectdclient_lib_dir=
6781
6782 # Check whether --with-collectdclient-lib-dir was given.
6783 if test "${with_collectdclient_lib_dir+set}" = set; then :
6784   withval=$with_collectdclient_lib_dir; case "$withval" in
6785     no)
6786       as_fn_error $? "Need collectdclient-lib-dir" "$LINENO" 5
6787       ;;
6788     yes)
6789       ;;
6790     *)
6791       collectdclient_lib_dir="$withval"
6792       ;;
6793   esac
6794 fi
6795
6796
6797 collectdclient_include_dir=
6798
6799 # Check whether --with-collectdclient-include-dir was given.
6800 if test "${with_collectdclient_include_dir+set}" = set; then :
6801   withval=$with_collectdclient_include_dir; case "$withval" in
6802     no)
6803       as_fn_error $? "Need collectdclient-include-dir" "$LINENO" 5
6804       ;;
6805     yes)
6806       ;;
6807     *)
6808       collectdclient_include_dir="$withval"
6809       ;;
6810   esac
6811 fi
6812
6813
6814 smart_try_dir="$collectdclient_lib_dir"
6815
6816
6817 sm_lib_safe=`echo "collectdclient" | sed 'y%./+-%__p_%'`
6818 sm_func_safe=`echo "lcc_connect" | sed 'y%./+-%__p_%'`
6819
6820 old_LIBS="$LIBS"
6821 old_CPPFLAGS="$CPPFLAGS"
6822 smart_lib=
6823 smart_ldflags=
6824 smart_lib_dir=
6825
6826 if test "x$smart_try_dir" != "x"; then
6827   for try in $smart_try_dir; do
6828     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient in $try" >&5
6829 $as_echo_n "checking for lcc_connect in -lcollectdclient in $try... " >&6; }
6830     LIBS="-lcollectdclient $old_LIBS"
6831     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6832     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6833 /* end confdefs.h.  */
6834 extern char lcc_connect();
6835 int
6836 main ()
6837 {
6838 lcc_connect()
6839   ;
6840   return 0;
6841 }
6842 _ACEOF
6843 if ac_fn_c_try_link "$LINENO"; then :
6844
6845                  smart_lib="-lcollectdclient"
6846                  smart_ldflags="-L$try -Wl,-rpath,$try"
6847                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6848 $as_echo "yes" >&6; }
6849                  break
6850
6851 else
6852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6853 $as_echo "no" >&6; }
6854 fi
6855 rm -f core conftest.err conftest.$ac_objext \
6856     conftest$ac_exeext conftest.$ac_ext
6857   done
6858   LIBS="$old_LIBS"
6859   CPPFLAGS="$old_CPPFLAGS"
6860 fi
6861
6862 if test "x$smart_lib" = "x"; then
6863   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient" >&5
6864 $as_echo_n "checking for lcc_connect in -lcollectdclient... " >&6; }
6865   LIBS="-lcollectdclient $old_LIBS"
6866   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6867 /* end confdefs.h.  */
6868 extern char lcc_connect();
6869 int
6870 main ()
6871 {
6872 lcc_connect()
6873   ;
6874   return 0;
6875 }
6876 _ACEOF
6877 if ac_fn_c_try_link "$LINENO"; then :
6878
6879                 smart_lib="-lcollectdclient"
6880                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6881 $as_echo "yes" >&6; }
6882
6883 else
6884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6885 $as_echo "no" >&6; }
6886 fi
6887 rm -f core conftest.err conftest.$ac_objext \
6888     conftest$ac_exeext conftest.$ac_ext
6889   LIBS="$old_LIBS"
6890 fi
6891
6892 if test "x$smart_lib" = "x"; then
6893
6894
6895 if test "x$LOCATE" != "x"; then
6896         DIRS=
6897   file=libcollectdclient${libltdl_cv_shlibext}
6898
6899   for x in `${LOCATE} $file 2>/dev/null`; do
6900                                         base=`echo $x | sed "s%/${file}%%"`
6901     if test "x$x" = "x$base"; then
6902       continue;
6903     fi
6904
6905     dir=`${DIRNAME} $x 2>/dev/null`
6906                 exclude=`echo ${dir} | ${GREP} /home`
6907     if test "x$exclude" != "x"; then
6908       continue
6909     fi
6910
6911                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6912     if test "x$already" = "x"; then
6913       DIRS="$DIRS $dir"
6914     fi
6915   done
6916 fi
6917
6918 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6919
6920
6921
6922 if test "x$LOCATE" != "x"; then
6923         DIRS=
6924   file=libcollectdclient.a
6925
6926   for x in `${LOCATE} $file 2>/dev/null`; do
6927                                         base=`echo $x | sed "s%/${file}%%"`
6928     if test "x$x" = "x$base"; then
6929       continue;
6930     fi
6931
6932     dir=`${DIRNAME} $x 2>/dev/null`
6933                 exclude=`echo ${dir} | ${GREP} /home`
6934     if test "x$exclude" != "x"; then
6935       continue
6936     fi
6937
6938                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6939     if test "x$already" = "x"; then
6940       DIRS="$DIRS $dir"
6941     fi
6942   done
6943 fi
6944
6945 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6946
6947
6948   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
6949     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient in $try" >&5
6950 $as_echo_n "checking for lcc_connect in -lcollectdclient in $try... " >&6; }
6951     LIBS="-lcollectdclient $old_LIBS"
6952     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6953     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6954 /* end confdefs.h.  */
6955 extern char lcc_connect();
6956 int
6957 main ()
6958 {
6959 lcc_connect()
6960   ;
6961   return 0;
6962 }
6963 _ACEOF
6964 if ac_fn_c_try_link "$LINENO"; then :
6965
6966                   smart_lib="-lcollectdclient"
6967                   smart_ldflags="-L$try -Wl,-rpath,$try"
6968                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6969 $as_echo "yes" >&6; }
6970                   break
6971
6972 else
6973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6974 $as_echo "no" >&6; }
6975 fi
6976 rm -f core conftest.err conftest.$ac_objext \
6977     conftest$ac_exeext conftest.$ac_ext
6978   done
6979   LIBS="$old_LIBS"
6980   CPPFLAGS="$old_CPPFLAGS"
6981 fi
6982
6983 if test "x$smart_lib" != "x"; then
6984   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
6985   LIBS="$smart_ldflags $smart_lib $old_LIBS"
6986   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
6987 fi
6988
6989 if test "x$ac_cv_lib_collectdclient_lcc_connect" != "xyes"; then
6990   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: collectdclient library not found. Use --with-collectdclient-lib-dir=<path>." >&5
6991 $as_echo "$as_me: WARNING: collectdclient library not found. Use --with-collectdclient-lib-dir=<path>." >&2;}
6992 else
6993   COLLECTDC_LIBS="${smart_lib}"
6994   COLLECTDC_LDFLAGS="${smart_ldflags}"
6995 fi
6996 LIBS="${old_LIBS}"
6997
6998 cap_lib_dir=
6999
7000 # Check whether --with-cap-lib-dir was given.
7001 if test "${with_cap_lib_dir+set}" = set; then :
7002   withval=$with_cap_lib_dir; case "$withval" in
7003     no)
7004       as_fn_error $? "Need cap-lib-dir" "$LINENO" 5
7005       ;;
7006     yes)
7007       ;;
7008     *)
7009       cap_lib_dir="$withval"
7010       ;;
7011   esac
7012 fi
7013
7014
7015 cap_include_dir=
7016
7017 # Check whether --with-cap-include-dir was given.
7018 if test "${with_cap_include_dir+set}" = set; then :
7019   withval=$with_cap_include_dir; case "$withval" in
7020     no)
7021       as_fn_error $? "Need cap-include-dir" "$LINENO" 5
7022       ;;
7023     yes)
7024       ;;
7025     *)
7026       cap_include_dir="$withval"
7027       ;;
7028   esac
7029 fi
7030
7031
7032 smart_try_dir="$cap_lib_dir"
7033
7034
7035 sm_lib_safe=`echo "cap" | sed 'y%./+-%__p_%'`
7036 sm_func_safe=`echo "cap_get_proc" | sed 'y%./+-%__p_%'`
7037
7038 old_LIBS="$LIBS"
7039 old_CPPFLAGS="$CPPFLAGS"
7040 smart_lib=
7041 smart_ldflags=
7042 smart_lib_dir=
7043
7044 if test "x$smart_try_dir" != "x"; then
7045   for try in $smart_try_dir; do
7046     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap in $try" >&5
7047 $as_echo_n "checking for cap_get_proc in -lcap in $try... " >&6; }
7048     LIBS="-lcap $old_LIBS"
7049     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
7050     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7051 /* end confdefs.h.  */
7052 extern char cap_get_proc();
7053 int
7054 main ()
7055 {
7056 cap_get_proc()
7057   ;
7058   return 0;
7059 }
7060 _ACEOF
7061 if ac_fn_c_try_link "$LINENO"; then :
7062
7063                  smart_lib="-lcap"
7064                  smart_ldflags="-L$try -Wl,-rpath,$try"
7065                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7066 $as_echo "yes" >&6; }
7067                  break
7068
7069 else
7070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7071 $as_echo "no" >&6; }
7072 fi
7073 rm -f core conftest.err conftest.$ac_objext \
7074     conftest$ac_exeext conftest.$ac_ext
7075   done
7076   LIBS="$old_LIBS"
7077   CPPFLAGS="$old_CPPFLAGS"
7078 fi
7079
7080 if test "x$smart_lib" = "x"; then
7081   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap" >&5
7082 $as_echo_n "checking for cap_get_proc in -lcap... " >&6; }
7083   LIBS="-lcap $old_LIBS"
7084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7085 /* end confdefs.h.  */
7086 extern char cap_get_proc();
7087 int
7088 main ()
7089 {
7090 cap_get_proc()
7091   ;
7092   return 0;
7093 }
7094 _ACEOF
7095 if ac_fn_c_try_link "$LINENO"; then :
7096
7097                 smart_lib="-lcap"
7098                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7099 $as_echo "yes" >&6; }
7100
7101 else
7102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7103 $as_echo "no" >&6; }
7104 fi
7105 rm -f core conftest.err conftest.$ac_objext \
7106     conftest$ac_exeext conftest.$ac_ext
7107   LIBS="$old_LIBS"
7108 fi
7109
7110 if test "x$smart_lib" = "x"; then
7111
7112
7113 if test "x$LOCATE" != "x"; then
7114         DIRS=
7115   file=libcap${libltdl_cv_shlibext}
7116
7117   for x in `${LOCATE} $file 2>/dev/null`; do
7118                                         base=`echo $x | sed "s%/${file}%%"`
7119     if test "x$x" = "x$base"; then
7120       continue;
7121     fi
7122
7123     dir=`${DIRNAME} $x 2>/dev/null`
7124                 exclude=`echo ${dir} | ${GREP} /home`
7125     if test "x$exclude" != "x"; then
7126       continue
7127     fi
7128
7129                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
7130     if test "x$already" = "x"; then
7131       DIRS="$DIRS $dir"
7132     fi
7133   done
7134 fi
7135
7136 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
7137
7138
7139
7140 if test "x$LOCATE" != "x"; then
7141         DIRS=
7142   file=libcap.a
7143
7144   for x in `${LOCATE} $file 2>/dev/null`; do
7145                                         base=`echo $x | sed "s%/${file}%%"`
7146     if test "x$x" = "x$base"; then
7147       continue;
7148     fi
7149
7150     dir=`${DIRNAME} $x 2>/dev/null`
7151                 exclude=`echo ${dir} | ${GREP} /home`
7152     if test "x$exclude" != "x"; then
7153       continue
7154     fi
7155
7156                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
7157     if test "x$already" = "x"; then
7158       DIRS="$DIRS $dir"
7159     fi
7160   done
7161 fi
7162
7163 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
7164
7165
7166   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
7167     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap in $try" >&5
7168 $as_echo_n "checking for cap_get_proc in -lcap in $try... " >&6; }
7169     LIBS="-lcap $old_LIBS"
7170     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
7171     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7172 /* end confdefs.h.  */
7173 extern char cap_get_proc();
7174 int
7175 main ()
7176 {
7177 cap_get_proc()
7178   ;
7179   return 0;
7180 }
7181 _ACEOF
7182 if ac_fn_c_try_link "$LINENO"; then :
7183
7184                   smart_lib="-lcap"
7185                   smart_ldflags="-L$try -Wl,-rpath,$try"
7186                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7187 $as_echo "yes" >&6; }
7188                   break
7189
7190 else
7191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7192 $as_echo "no" >&6; }
7193 fi
7194 rm -f core conftest.err conftest.$ac_objext \
7195     conftest$ac_exeext conftest.$ac_ext
7196   done
7197   LIBS="$old_LIBS"
7198   CPPFLAGS="$old_CPPFLAGS"
7199 fi
7200
7201 if test "x$smart_lib" != "x"; then
7202   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
7203   LIBS="$smart_ldflags $smart_lib $old_LIBS"
7204   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
7205 fi
7206
7207 if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then
7208   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>." >&5
7209 $as_echo "$as_me: WARNING: cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>." >&2;}
7210 else
7211
7212 $as_echo "#define HAVE_LIBCAP 1" >>confdefs.h
7213
7214   HAVE_LIBCAP=1
7215 fi
7216
7217
7218   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a readline compatible library" >&5
7219 $as_echo_n "checking for a readline compatible library... " >&6; }
7220 if ${vl_cv_lib_readline+:} false; then :
7221   $as_echo_n "(cached) " >&6
7222 else
7223
7224     ORIG_LIBS="$LIBS"
7225     for readline_lib in readline edit editline; do
7226       for termcap_lib in "" termcap curses ncurses; do
7227         if test -z "$termcap_lib"; then
7228           TRY_LIB="-l$readline_lib"
7229         else
7230           TRY_LIB="-l$readline_lib -l$termcap_lib"
7231         fi
7232         LIBS="$ORIG_LIBS $TRY_LIB"
7233         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7234 /* end confdefs.h.  */
7235
7236 /* Override any GCC internal prototype to avoid an error.
7237    Use char because int might match the return type of a GCC
7238    builtin and then its argument prototype would still apply.  */
7239 #ifdef __cplusplus
7240 extern "C"
7241 #endif
7242 char readline ();
7243 int
7244 main ()
7245 {
7246 return readline ();
7247   ;
7248   return 0;
7249 }
7250 _ACEOF
7251 if ac_fn_c_try_link "$LINENO"; then :
7252   vl_cv_lib_readline="$TRY_LIB"
7253 fi
7254 rm -f core conftest.err conftest.$ac_objext \
7255     conftest$ac_exeext conftest.$ac_ext
7256         if test -n "$vl_cv_lib_readline"; then
7257           break
7258         fi
7259       done
7260       if test -n "$vl_cv_lib_readline"; then
7261         break
7262       fi
7263     done
7264     if test -z "$vl_cv_lib_readline"; then
7265       vl_cv_lib_readline="no"
7266       LIBS="$ORIG_LIBS"
7267     fi
7268
7269 fi
7270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vl_cv_lib_readline" >&5
7271 $as_echo "$vl_cv_lib_readline" >&6; }
7272
7273   if test "$vl_cv_lib_readline" != "no"; then
7274     LIBREADLINE="$vl_cv_lib_readline"
7275
7276 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
7277
7278     for ac_header in readline.h readline/readline.h
7279 do :
7280   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7281 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7282 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7283   cat >>confdefs.h <<_ACEOF
7284 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7285 _ACEOF
7286
7287 fi
7288
7289 done
7290
7291     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
7292 $as_echo_n "checking whether readline supports history... " >&6; }
7293 if ${vl_cv_lib_readline_history+:} false; then :
7294   $as_echo_n "(cached) " >&6
7295 else
7296
7297       vl_cv_lib_readline_history="no"
7298       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7299 /* end confdefs.h.  */
7300
7301 /* Override any GCC internal prototype to avoid an error.
7302    Use char because int might match the return type of a GCC
7303    builtin and then its argument prototype would still apply.  */
7304 #ifdef __cplusplus
7305 extern "C"
7306 #endif
7307 char add_history ();
7308 int
7309 main ()
7310 {
7311 return add_history ();
7312   ;
7313   return 0;
7314 }
7315 _ACEOF
7316 if ac_fn_c_try_link "$LINENO"; then :
7317   vl_cv_lib_readline_history="yes"
7318 fi
7319 rm -f core conftest.err conftest.$ac_objext \
7320     conftest$ac_exeext conftest.$ac_ext
7321
7322 fi
7323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vl_cv_lib_readline_history" >&5
7324 $as_echo "$vl_cv_lib_readline_history" >&6; }
7325     if test "$vl_cv_lib_readline_history" = "yes"; then
7326
7327 $as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
7328
7329       for ac_header in history.h readline/history.h
7330 do :
7331   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7332 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7333 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7334   cat >>confdefs.h <<_ACEOF
7335 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7336 _ACEOF
7337
7338 fi
7339
7340 done
7341
7342     fi
7343   fi
7344
7345
7346
7347
7348 smart_try_dir="$talloc_include_dir"
7349
7350
7351 ac_safe=`echo "talloc.h" | sed 'y%./+-%__pm%'`
7352 old_CPPFLAGS="$CPPFLAGS"
7353 smart_include=
7354 smart_include_dir="/usr/local/include /opt/include"
7355
7356 _smart_try_dir=
7357 _smart_include_dir=
7358
7359 for _prefix in $smart_prefix ""; do
7360   for _dir in $smart_try_dir; do
7361     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
7362   done
7363
7364   for _dir in $smart_include_dir; do
7365     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
7366   done
7367 done
7368
7369 if test "x$_smart_try_dir" != "x"; then
7370   for try in $_smart_try_dir; do
7371     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h in $try" >&5
7372 $as_echo_n "checking for talloc.h in $try... " >&6; }
7373     CPPFLAGS="-isystem $try $old_CPPFLAGS"
7374     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7375 /* end confdefs.h.  */
7376
7377                     #include <talloc.h>
7378 int
7379 main ()
7380 {
7381 int a = 1;
7382   ;
7383   return 0;
7384 }
7385 _ACEOF
7386 if ac_fn_c_try_compile "$LINENO"; then :
7387
7388                      smart_include="-isystem $try"
7389                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7390 $as_echo "yes" >&6; }
7391                      break
7392
7393 else
7394
7395                      smart_include=
7396                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7397 $as_echo "no" >&6; }
7398
7399 fi
7400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7401   done
7402   CPPFLAGS="$old_CPPFLAGS"
7403 fi
7404
7405 if test "x$smart_include" = "x"; then
7406   for _prefix in $smart_prefix; do
7407     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/talloc.h" >&5
7408 $as_echo_n "checking for ${_prefix}/talloc.h... " >&6; }
7409
7410     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7411 /* end confdefs.h.  */
7412
7413                     #include <talloc.h>
7414 int
7415 main ()
7416 {
7417 int a = 1;
7418   ;
7419   return 0;
7420 }
7421 _ACEOF
7422 if ac_fn_c_try_compile "$LINENO"; then :
7423
7424                      smart_include="-isystem ${_prefix}/"
7425                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7426 $as_echo "yes" >&6; }
7427                      break
7428
7429 else
7430
7431                      smart_include=
7432                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7433 $as_echo "no" >&6; }
7434
7435 fi
7436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7437   done
7438 fi
7439
7440 if test "x$smart_include" = "x"; then
7441     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h" >&5
7442 $as_echo_n "checking for talloc.h... " >&6; }
7443
7444     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7445 /* end confdefs.h.  */
7446
7447                     #include <talloc.h>
7448 int
7449 main ()
7450 {
7451 int a = 1;
7452   ;
7453   return 0;
7454 }
7455 _ACEOF
7456 if ac_fn_c_try_compile "$LINENO"; then :
7457
7458                      smart_include=" "
7459                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7460 $as_echo "yes" >&6; }
7461                      break
7462
7463 else
7464
7465                      smart_include=
7466                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7467 $as_echo "no" >&6; }
7468
7469 fi
7470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7471 fi
7472
7473 if test "x$smart_include" = "x"; then
7474
7475   for prefix in $smart_prefix; do
7476
7477
7478 if test "x$LOCATE" != "x"; then
7479         DIRS=
7480   file="${_prefix}/${1}"
7481
7482   for x in `${LOCATE} $file 2>/dev/null`; do
7483                                         base=`echo $x | sed "s%/${file}%%"`
7484     if test "x$x" = "x$base"; then
7485       continue;
7486     fi
7487
7488     dir=`${DIRNAME} $x 2>/dev/null`
7489                 exclude=`echo ${dir} | ${GREP} /home`
7490     if test "x$exclude" != "x"; then
7491       continue
7492     fi
7493
7494                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
7495     if test "x$already" = "x"; then
7496       DIRS="$DIRS $dir"
7497     fi
7498   done
7499 fi
7500
7501 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
7502
7503   done
7504
7505
7506 if test "x$LOCATE" != "x"; then
7507         DIRS=
7508   file=talloc.h
7509
7510   for x in `${LOCATE} $file 2>/dev/null`; do
7511                                         base=`echo $x | sed "s%/${file}%%"`
7512     if test "x$x" = "x$base"; then
7513       continue;
7514     fi
7515
7516     dir=`${DIRNAME} $x 2>/dev/null`
7517                 exclude=`echo ${dir} | ${GREP} /home`
7518     if test "x$exclude" != "x"; then
7519       continue
7520     fi
7521
7522                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
7523     if test "x$already" = "x"; then
7524       DIRS="$DIRS $dir"
7525     fi
7526   done
7527 fi
7528
7529 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
7530
7531
7532   for try in $_smart_include_dir; do
7533     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h in $try" >&5
7534 $as_echo_n "checking for talloc.h in $try... " >&6; }
7535     CPPFLAGS="-isystem $try $old_CPPFLAGS"
7536     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7537 /* end confdefs.h.  */
7538
7539                     #include <talloc.h>
7540 int
7541 main ()
7542 {
7543 int a = 1;
7544   ;
7545   return 0;
7546 }
7547 _ACEOF
7548 if ac_fn_c_try_compile "$LINENO"; then :
7549
7550                      smart_include="-isystem $try"
7551                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7552 $as_echo "yes" >&6; }
7553                      break
7554
7555 else
7556
7557                      smart_include=
7558                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7559 $as_echo "no" >&6; }
7560
7561 fi
7562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7563   done
7564   CPPFLAGS="$old_CPPFLAGS"
7565 fi
7566
7567 if test "x$smart_include" != "x"; then
7568   eval "ac_cv_header_$ac_safe=yes"
7569   CPPFLAGS="$smart_include $old_CPPFLAGS"
7570   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
7571 fi
7572
7573 smart_prefix=
7574
7575 if test "x$ac_cv_header_talloc_h" != "xyes"; then
7576   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: talloc headers not found. Use --with-talloc-include-dir=<path>." >&5
7577 $as_echo "$as_me: WARNING: talloc headers not found. Use --with-talloc-include-dir=<path>." >&2;}
7578   as_fn_error $? "FreeRADIUS requires libtalloc" "$LINENO" 5
7579 fi
7580
7581 case "$host" in
7582   *-interix*)
7583     CFLAGS="$CFLAGS -D_ALL_SOURCE"
7584     ;;
7585   *-darwin*)
7586     CFLAGS="$CFLAGS -DDARWIN"
7587     LIBS="-framework DirectoryService $LIBS"
7588
7589 $as_echo "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
7590
7591     ;;
7592 esac
7593
7594 ac_header_dirent=no
7595 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
7596   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7598 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
7599 if eval \${$as_ac_Header+:} false; then :
7600   $as_echo_n "(cached) " >&6
7601 else
7602   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7603 /* end confdefs.h.  */
7604 #include <sys/types.h>
7605 #include <$ac_hdr>
7606
7607 int
7608 main ()
7609 {
7610 if ((DIR *) 0)
7611 return 0;
7612   ;
7613   return 0;
7614 }
7615 _ACEOF
7616 if ac_fn_c_try_compile "$LINENO"; then :
7617   eval "$as_ac_Header=yes"
7618 else
7619   eval "$as_ac_Header=no"
7620 fi
7621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7622 fi
7623 eval ac_res=\$$as_ac_Header
7624                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7625 $as_echo "$ac_res" >&6; }
7626 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7627   cat >>confdefs.h <<_ACEOF
7628 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
7629 _ACEOF
7630
7631 ac_header_dirent=$ac_hdr; break
7632 fi
7633
7634 done
7635 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7636 if test $ac_header_dirent = dirent.h; then
7637   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7638 $as_echo_n "checking for library containing opendir... " >&6; }
7639 if ${ac_cv_search_opendir+:} false; then :
7640   $as_echo_n "(cached) " >&6
7641 else
7642   ac_func_search_save_LIBS=$LIBS
7643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7644 /* end confdefs.h.  */
7645
7646 /* Override any GCC internal prototype to avoid an error.
7647    Use char because int might match the return type of a GCC
7648    builtin and then its argument prototype would still apply.  */
7649 #ifdef __cplusplus
7650 extern "C"
7651 #endif
7652 char opendir ();
7653 int
7654 main ()
7655 {
7656 return opendir ();
7657   ;
7658   return 0;
7659 }
7660 _ACEOF
7661 for ac_lib in '' dir; do
7662   if test -z "$ac_lib"; then
7663     ac_res="none required"
7664   else
7665     ac_res=-l$ac_lib
7666     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7667   fi
7668   if ac_fn_c_try_link "$LINENO"; then :
7669   ac_cv_search_opendir=$ac_res
7670 fi
7671 rm -f core conftest.err conftest.$ac_objext \
7672     conftest$ac_exeext
7673   if ${ac_cv_search_opendir+:} false; then :
7674   break
7675 fi
7676 done
7677 if ${ac_cv_search_opendir+:} false; then :
7678
7679 else
7680   ac_cv_search_opendir=no
7681 fi
7682 rm conftest.$ac_ext
7683 LIBS=$ac_func_search_save_LIBS
7684 fi
7685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7686 $as_echo "$ac_cv_search_opendir" >&6; }
7687 ac_res=$ac_cv_search_opendir
7688 if test "$ac_res" != no; then :
7689   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7690
7691 fi
7692
7693 else
7694   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7695 $as_echo_n "checking for library containing opendir... " >&6; }
7696 if ${ac_cv_search_opendir+:} false; then :
7697   $as_echo_n "(cached) " >&6
7698 else
7699   ac_func_search_save_LIBS=$LIBS
7700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7701 /* end confdefs.h.  */
7702
7703 /* Override any GCC internal prototype to avoid an error.
7704    Use char because int might match the return type of a GCC
7705    builtin and then its argument prototype would still apply.  */
7706 #ifdef __cplusplus
7707 extern "C"
7708 #endif
7709 char opendir ();
7710 int
7711 main ()
7712 {
7713 return opendir ();
7714   ;
7715   return 0;
7716 }
7717 _ACEOF
7718 for ac_lib in '' x; do
7719   if test -z "$ac_lib"; then
7720     ac_res="none required"
7721   else
7722     ac_res=-l$ac_lib
7723     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7724   fi
7725   if ac_fn_c_try_link "$LINENO"; then :
7726   ac_cv_search_opendir=$ac_res
7727 fi
7728 rm -f core conftest.err conftest.$ac_objext \
7729     conftest$ac_exeext
7730   if ${ac_cv_search_opendir+:} false; then :
7731   break
7732 fi
7733 done
7734 if ${ac_cv_search_opendir+:} false; then :
7735
7736 else
7737   ac_cv_search_opendir=no
7738 fi
7739 rm conftest.$ac_ext
7740 LIBS=$ac_func_search_save_LIBS
7741 fi
7742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7743 $as_echo "$ac_cv_search_opendir" >&6; }
7744 ac_res=$ac_cv_search_opendir
7745 if test "$ac_res" != no; then :
7746   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7747
7748 fi
7749
7750 fi
7751
7752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7753 $as_echo_n "checking for ANSI C header files... " >&6; }
7754 if ${ac_cv_header_stdc+:} false; then :
7755   $as_echo_n "(cached) " >&6
7756 else
7757   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7758 /* end confdefs.h.  */
7759 #include <stdlib.h>
7760 #include <stdarg.h>
7761 #include <string.h>
7762 #include <float.h>
7763
7764 int
7765 main ()
7766 {
7767
7768   ;
7769   return 0;
7770 }
7771 _ACEOF
7772 if ac_fn_c_try_compile "$LINENO"; then :
7773   ac_cv_header_stdc=yes
7774 else
7775   ac_cv_header_stdc=no
7776 fi
7777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7778
7779 if test $ac_cv_header_stdc = yes; then
7780   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7781   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7782 /* end confdefs.h.  */
7783 #include <string.h>
7784
7785 _ACEOF
7786 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7787   $EGREP "memchr" >/dev/null 2>&1; then :
7788
7789 else
7790   ac_cv_header_stdc=no
7791 fi
7792 rm -f conftest*
7793
7794 fi
7795
7796 if test $ac_cv_header_stdc = yes; then
7797   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7798   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7799 /* end confdefs.h.  */
7800 #include <stdlib.h>
7801
7802 _ACEOF
7803 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7804   $EGREP "free" >/dev/null 2>&1; then :
7805
7806 else
7807   ac_cv_header_stdc=no
7808 fi
7809 rm -f conftest*
7810
7811 fi
7812
7813 if test $ac_cv_header_stdc = yes; then
7814   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7815   if test "$cross_compiling" = yes; then :
7816   :
7817 else
7818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7819 /* end confdefs.h.  */
7820 #include <ctype.h>
7821 #include <stdlib.h>
7822 #if ((' ' & 0x0FF) == 0x020)
7823 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7824 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7825 #else
7826 # define ISLOWER(c) \
7827                    (('a' <= (c) && (c) <= 'i') \
7828                      || ('j' <= (c) && (c) <= 'r') \
7829                      || ('s' <= (c) && (c) <= 'z'))
7830 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7831 #endif
7832
7833 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7834 int
7835 main ()
7836 {
7837   int i;
7838   for (i = 0; i < 256; i++)
7839     if (XOR (islower (i), ISLOWER (i))
7840         || toupper (i) != TOUPPER (i))
7841       return 2;
7842   return 0;
7843 }
7844 _ACEOF
7845 if ac_fn_c_try_run "$LINENO"; then :
7846
7847 else
7848   ac_cv_header_stdc=no
7849 fi
7850 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7851   conftest.$ac_objext conftest.beam conftest.$ac_ext
7852 fi
7853
7854 fi
7855 fi
7856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7857 $as_echo "$ac_cv_header_stdc" >&6; }
7858 if test $ac_cv_header_stdc = yes; then
7859
7860 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7861
7862 fi
7863
7864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
7865 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
7866 if ${ac_cv_header_time+:} false; then :
7867   $as_echo_n "(cached) " >&6
7868 else
7869   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7870 /* end confdefs.h.  */
7871 #include <sys/types.h>
7872 #include <sys/time.h>
7873 #include <time.h>
7874
7875 int
7876 main ()
7877 {
7878 if ((struct tm *) 0)
7879 return 0;
7880   ;
7881   return 0;
7882 }
7883 _ACEOF
7884 if ac_fn_c_try_compile "$LINENO"; then :
7885   ac_cv_header_time=yes
7886 else
7887   ac_cv_header_time=no
7888 fi
7889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7890 fi
7891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
7892 $as_echo "$ac_cv_header_time" >&6; }
7893 if test $ac_cv_header_time = yes; then
7894
7895 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
7896
7897 fi
7898
7899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
7900 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
7901 if ${ac_cv_header_sys_wait_h+:} false; then :
7902   $as_echo_n "(cached) " >&6
7903 else
7904   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7905 /* end confdefs.h.  */
7906 #include <sys/types.h>
7907 #include <sys/wait.h>
7908 #ifndef WEXITSTATUS
7909 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
7910 #endif
7911 #ifndef WIFEXITED
7912 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7913 #endif
7914
7915 int
7916 main ()
7917 {
7918   int s;
7919   wait (&s);
7920   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7921   ;
7922   return 0;
7923 }
7924 _ACEOF
7925 if ac_fn_c_try_compile "$LINENO"; then :
7926   ac_cv_header_sys_wait_h=yes
7927 else
7928   ac_cv_header_sys_wait_h=no
7929 fi
7930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7931 fi
7932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
7933 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
7934 if test $ac_cv_header_sys_wait_h = yes; then
7935
7936 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7937
7938 fi
7939
7940
7941 for ac_header in \
7942   dlfcn.h \
7943   unistd.h \
7944   crypt.h \
7945   errno.h \
7946   resource.h \
7947   sys/resource.h \
7948   getopt.h \
7949   malloc.h \
7950   utmp.h \
7951   utmpx.h \
7952   signal.h \
7953   sys/select.h \
7954   syslog.h \
7955   inttypes.h \
7956   stdint.h \
7957   stdbool.h \
7958   stdio.h \
7959   netdb.h \
7960   semaphore.h \
7961   arpa/inet.h \
7962   netinet/in.h \
7963   sys/types.h \
7964   sys/socket.h \
7965   winsock.h \
7966   utime.h \
7967   sys/time.h \
7968   sys/wait.h \
7969   sys/security.h \
7970   fcntl.h \
7971   sys/fcntl.h \
7972   sys/prctl.h \
7973   sys/ptrace.h \
7974   sys/un.h \
7975   glob.h \
7976   prot.h \
7977   pwd.h \
7978   grp.h \
7979   stddef.h \
7980   fnmatch.h \
7981   sia.h \
7982   siad.h \
7983   features.h \
7984   limits.h \
7985   sys/event.h
7986
7987 do :
7988   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7989 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7990 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7991   cat >>confdefs.h <<_ACEOF
7992 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7993 _ACEOF
7994
7995 fi
7996
7997 done
7998
7999
8000 for ac_header in net/if.h
8001 do :
8002   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
8003     #ifdef HAVE_SYS_SOCKET_H
8004     #  include <sys/socket.h>
8005     #endif
8006
8007
8008 "
8009 if test "x$ac_cv_header_net_if_h" = xyes; then :
8010   cat >>confdefs.h <<_ACEOF
8011 #define HAVE_NET_IF_H 1
8012 _ACEOF
8013
8014 fi
8015
8016 done
8017
8018
8019 if test "x$ac_cv_header_sys_security_h" = "xyes" && test "x$ac_cv_header_prot_h" = "xyes"
8020 then
8021
8022 $as_echo "#define OSFC2 /**/" >>confdefs.h
8023
8024 fi
8025
8026 if test "x$ac_cv_header_sia_h" = "xyes" && test "x$ac_cv_header_siad_h" = "xyes"
8027 then
8028
8029 $as_echo "#define OSFSIA /**/" >>confdefs.h
8030
8031 fi
8032
8033 if test "x$WITH_OPENSSL" = xyes; then
8034   OLD_LIBS="$LIBS"
8035
8036         CFLAGS="$CFLAGS -DOPENSSL_NO_KRB5"
8037
8038         smart_try_dir="$openssl_lib_dir"
8039
8040
8041 sm_lib_safe=`echo "crypto" | sed 'y%./+-%__p_%'`
8042 sm_func_safe=`echo "DH_new" | sed 'y%./+-%__p_%'`
8043
8044 old_LIBS="$LIBS"
8045 old_CPPFLAGS="$CPPFLAGS"
8046 smart_lib=
8047 smart_ldflags=
8048 smart_lib_dir=
8049
8050 if test "x$smart_try_dir" != "x"; then
8051   for try in $smart_try_dir; do
8052     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto in $try" >&5
8053 $as_echo_n "checking for DH_new in -lcrypto in $try... " >&6; }
8054     LIBS="-lcrypto $old_LIBS"
8055     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
8056     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8057 /* end confdefs.h.  */
8058 extern char DH_new();
8059 int
8060 main ()
8061 {
8062 DH_new()
8063   ;
8064   return 0;
8065 }
8066 _ACEOF
8067 if ac_fn_c_try_link "$LINENO"; then :
8068
8069                  smart_lib="-lcrypto"
8070                  smart_ldflags="-L$try -Wl,-rpath,$try"
8071                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8072 $as_echo "yes" >&6; }
8073                  break
8074
8075 else
8076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8077 $as_echo "no" >&6; }
8078 fi
8079 rm -f core conftest.err conftest.$ac_objext \
8080     conftest$ac_exeext conftest.$ac_ext
8081   done
8082   LIBS="$old_LIBS"
8083   CPPFLAGS="$old_CPPFLAGS"
8084 fi
8085
8086 if test "x$smart_lib" = "x"; then
8087   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto" >&5
8088 $as_echo_n "checking for DH_new in -lcrypto... " >&6; }
8089   LIBS="-lcrypto $old_LIBS"
8090   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8091 /* end confdefs.h.  */
8092 extern char DH_new();
8093 int
8094 main ()
8095 {
8096 DH_new()
8097   ;
8098   return 0;
8099 }
8100 _ACEOF
8101 if ac_fn_c_try_link "$LINENO"; then :
8102
8103                 smart_lib="-lcrypto"
8104                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8105 $as_echo "yes" >&6; }
8106
8107 else
8108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8109 $as_echo "no" >&6; }
8110 fi
8111 rm -f core conftest.err conftest.$ac_objext \
8112     conftest$ac_exeext conftest.$ac_ext
8113   LIBS="$old_LIBS"
8114 fi
8115
8116 if test "x$smart_lib" = "x"; then
8117
8118
8119 if test "x$LOCATE" != "x"; then
8120         DIRS=
8121   file=libcrypto${libltdl_cv_shlibext}
8122
8123   for x in `${LOCATE} $file 2>/dev/null`; do
8124                                         base=`echo $x | sed "s%/${file}%%"`
8125     if test "x$x" = "x$base"; then
8126       continue;
8127     fi
8128
8129     dir=`${DIRNAME} $x 2>/dev/null`
8130                 exclude=`echo ${dir} | ${GREP} /home`
8131     if test "x$exclude" != "x"; then
8132       continue
8133     fi
8134
8135                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
8136     if test "x$already" = "x"; then
8137       DIRS="$DIRS $dir"
8138     fi
8139   done
8140 fi
8141
8142 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
8143
8144
8145
8146 if test "x$LOCATE" != "x"; then
8147         DIRS=
8148   file=libcrypto.a
8149
8150   for x in `${LOCATE} $file 2>/dev/null`; do
8151                                         base=`echo $x | sed "s%/${file}%%"`
8152     if test "x$x" = "x$base"; then
8153       continue;
8154     fi
8155
8156     dir=`${DIRNAME} $x 2>/dev/null`
8157                 exclude=`echo ${dir} | ${GREP} /home`
8158     if test "x$exclude" != "x"; then
8159       continue
8160     fi
8161
8162                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
8163     if test "x$already" = "x"; then
8164       DIRS="$DIRS $dir"
8165     fi
8166   done
8167 fi
8168
8169 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
8170
8171
8172   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
8173     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto in $try" >&5
8174 $as_echo_n "checking for DH_new in -lcrypto in $try... " >&6; }
8175     LIBS="-lcrypto $old_LIBS"
8176     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
8177     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8178 /* end confdefs.h.  */
8179 extern char DH_new();
8180 int
8181 main ()
8182 {
8183 DH_new()
8184   ;
8185   return 0;
8186 }
8187 _ACEOF
8188 if ac_fn_c_try_link "$LINENO"; then :
8189
8190                   smart_lib="-lcrypto"
8191                   smart_ldflags="-L$try -Wl,-rpath,$try"
8192                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8193 $as_echo "yes" >&6; }
8194                   break
8195
8196 else
8197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8198 $as_echo "no" >&6; }
8199 fi
8200 rm -f core conftest.err conftest.$ac_objext \
8201     conftest$ac_exeext conftest.$ac_ext
8202   done
8203   LIBS="$old_LIBS"
8204   CPPFLAGS="$old_CPPFLAGS"
8205 fi
8206
8207 if test "x$smart_lib" != "x"; then
8208   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
8209   LIBS="$smart_ldflags $smart_lib $old_LIBS"
8210   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
8211 fi
8212
8213   if test "x$ac_cv_lib_crypto_DH_new" = "xyes"; then
8214
8215 $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
8216
8217     OPENSSL_LIBS="$smart_lib"
8218     OPENSSL_LDFLAGS="$smart_ldflags"
8219
8220
8221
8222 sm_lib_safe=`echo "ssl" | sed 'y%./+-%__p_%'`
8223 sm_func_safe=`echo "SSL_new" | sed 'y%./+-%__p_%'`
8224
8225 old_LIBS="$LIBS"
8226 old_CPPFLAGS="$CPPFLAGS"
8227 smart_lib=
8228 smart_ldflags=
8229 smart_lib_dir=
8230
8231 if test "x$smart_try_dir" != "x"; then
8232   for try in $smart_try_dir; do
8233     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl in $try" >&5
8234 $as_echo_n "checking for SSL_new in -lssl in $try... " >&6; }
8235     LIBS="-lssl $old_LIBS"
8236     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
8237     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8238 /* end confdefs.h.  */
8239 extern char SSL_new();
8240 int
8241 main ()
8242 {
8243 SSL_new()
8244   ;
8245   return 0;
8246 }
8247 _ACEOF
8248 if ac_fn_c_try_link "$LINENO"; then :
8249
8250                  smart_lib="-lssl"
8251                  smart_ldflags="-L$try -Wl,-rpath,$try"
8252                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8253 $as_echo "yes" >&6; }
8254                  break
8255
8256 else
8257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8258 $as_echo "no" >&6; }
8259 fi
8260 rm -f core conftest.err conftest.$ac_objext \
8261     conftest$ac_exeext conftest.$ac_ext
8262   done
8263   LIBS="$old_LIBS"
8264   CPPFLAGS="$old_CPPFLAGS"
8265 fi
8266
8267 if test "x$smart_lib" = "x"; then
8268   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
8269 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
8270   LIBS="-lssl $old_LIBS"
8271   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8272 /* end confdefs.h.  */
8273 extern char SSL_new();
8274 int
8275 main ()
8276 {
8277 SSL_new()
8278   ;
8279   return 0;
8280 }
8281 _ACEOF
8282 if ac_fn_c_try_link "$LINENO"; then :
8283
8284                 smart_lib="-lssl"
8285                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8286 $as_echo "yes" >&6; }
8287
8288 else
8289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8290 $as_echo "no" >&6; }
8291 fi
8292 rm -f core conftest.err conftest.$ac_objext \
8293     conftest$ac_exeext conftest.$ac_ext
8294   LIBS="$old_LIBS"
8295 fi
8296
8297 if test "x$smart_lib" = "x"; then
8298
8299
8300 if test "x$LOCATE" != "x"; then
8301         DIRS=
8302   file=libssl${libltdl_cv_shlibext}
8303
8304   for x in `${LOCATE} $file 2>/dev/null`; do
8305                                         base=`echo $x | sed "s%/${file}%%"`
8306     if test "x$x" = "x$base"; then
8307       continue;
8308     fi
8309
8310     dir=`${DIRNAME} $x 2>/dev/null`
8311                 exclude=`echo ${dir} | ${GREP} /home`
8312     if test "x$exclude" != "x"; then
8313       continue
8314     fi
8315
8316                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
8317     if test "x$already" = "x"; then
8318       DIRS="$DIRS $dir"
8319     fi
8320   done
8321 fi
8322
8323 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
8324
8325
8326
8327 if test "x$LOCATE" != "x"; then
8328         DIRS=
8329   file=libssl.a
8330
8331   for x in `${LOCATE} $file 2>/dev/null`; do
8332                                         base=`echo $x | sed "s%/${file}%%"`
8333     if test "x$x" = "x$base"; then
8334       continue;
8335     fi
8336
8337     dir=`${DIRNAME} $x 2>/dev/null`
8338                 exclude=`echo ${dir} | ${GREP} /home`
8339     if test "x$exclude" != "x"; then
8340       continue
8341     fi
8342
8343                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
8344     if test "x$already" = "x"; then
8345       DIRS="$DIRS $dir"
8346     fi
8347   done
8348 fi
8349
8350 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
8351
8352
8353   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
8354     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl in $try" >&5
8355 $as_echo_n "checking for SSL_new in -lssl in $try... " >&6; }
8356     LIBS="-lssl $old_LIBS"
8357     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
8358     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8359 /* end confdefs.h.  */
8360 extern char SSL_new();
8361 int
8362 main ()
8363 {
8364 SSL_new()
8365   ;
8366   return 0;
8367 }
8368 _ACEOF
8369 if ac_fn_c_try_link "$LINENO"; then :
8370
8371                   smart_lib="-lssl"
8372                   smart_ldflags="-L$try -Wl,-rpath,$try"
8373                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8374 $as_echo "yes" >&6; }
8375                   break
8376
8377 else
8378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8379 $as_echo "no" >&6; }
8380 fi
8381 rm -f core conftest.err conftest.$ac_objext \
8382     conftest$ac_exeext conftest.$ac_ext
8383   done
8384   LIBS="$old_LIBS"
8385   CPPFLAGS="$old_CPPFLAGS"
8386 fi
8387
8388 if test "x$smart_lib" != "x"; then
8389   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
8390   LIBS="$smart_ldflags $smart_lib $old_LIBS"
8391   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
8392 fi
8393
8394     if test "x$ac_cv_lib_ssl_SSL_new" != "xyes"; then
8395       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8396 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8397 as_fn_error $? "failed linking to libssl. Use --with-openssl-lib-dir=<path>, or --with-openssl=no (builds without OpenSSL)
8398 See \`config.log' for more details" "$LINENO" 5; }
8399     else
8400
8401 $as_echo "#define HAVE_LIBSSL 1" >>confdefs.h
8402
8403       OPENSSL_LIBS="$OPENSSL_LIBS $smart_lib"
8404
8405       if test "$OPENSSL_LDFLAGS" != "$smart_ldflags"; then
8406         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8407 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8408 as_fn_error $? "\"inconsistent LDFLAGS between -lssl '$smart_ldflags' and -lcrypto '$OPENSSL_LDFLAGS'\"
8409 See \`config.log' for more details" "$LINENO" 5; }
8410       fi
8411     fi
8412   else
8413     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8414 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8415 as_fn_error $? "failed linking to libcrypto. Use --with-openssl-lib-dir=<path>, or --with-openssl=no (builds without OpenSSL)
8416 See \`config.log' for more details" "$LINENO" 5; }
8417   fi
8418
8419   smart_try_dir="$openssl_include_dir"
8420
8421
8422 ac_safe=`echo "openssl/ssl.h" | sed 'y%./+-%__pm%'`
8423 old_CPPFLAGS="$CPPFLAGS"
8424 smart_include=
8425 smart_include_dir="/usr/local/include /opt/include"
8426
8427 _smart_try_dir=
8428 _smart_include_dir=
8429
8430 for _prefix in $smart_prefix ""; do
8431   for _dir in $smart_try_dir; do
8432     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
8433   done
8434
8435   for _dir in $smart_include_dir; do
8436     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
8437   done
8438 done
8439
8440 if test "x$_smart_try_dir" != "x"; then
8441   for try in $_smart_try_dir; do
8442     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $try" >&5
8443 $as_echo_n "checking for openssl/ssl.h in $try... " >&6; }
8444     CPPFLAGS="-isystem $try $old_CPPFLAGS"
8445     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8446 /* end confdefs.h.  */
8447
8448                     #include <openssl/ssl.h>
8449 int
8450 main ()
8451 {
8452 int a = 1;
8453   ;
8454   return 0;
8455 }
8456 _ACEOF
8457 if ac_fn_c_try_compile "$LINENO"; then :
8458
8459                      smart_include="-isystem $try"
8460                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8461 $as_echo "yes" >&6; }
8462                      break
8463
8464 else
8465
8466                      smart_include=
8467                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8468 $as_echo "no" >&6; }
8469
8470 fi
8471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8472   done
8473   CPPFLAGS="$old_CPPFLAGS"
8474 fi
8475
8476 if test "x$smart_include" = "x"; then
8477   for _prefix in $smart_prefix; do
8478     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/openssl/ssl.h" >&5
8479 $as_echo_n "checking for ${_prefix}/openssl/ssl.h... " >&6; }
8480
8481     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8482 /* end confdefs.h.  */
8483
8484                     #include <openssl/ssl.h>
8485 int
8486 main ()
8487 {
8488 int a = 1;
8489   ;
8490   return 0;
8491 }
8492 _ACEOF
8493 if ac_fn_c_try_compile "$LINENO"; then :
8494
8495                      smart_include="-isystem ${_prefix}/"
8496                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8497 $as_echo "yes" >&6; }
8498                      break
8499
8500 else
8501
8502                      smart_include=
8503                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8504 $as_echo "no" >&6; }
8505
8506 fi
8507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8508   done
8509 fi
8510
8511 if test "x$smart_include" = "x"; then
8512     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h" >&5
8513 $as_echo_n "checking for openssl/ssl.h... " >&6; }
8514
8515     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8516 /* end confdefs.h.  */
8517
8518                     #include <openssl/ssl.h>
8519 int
8520 main ()
8521 {
8522 int a = 1;
8523   ;
8524   return 0;
8525 }
8526 _ACEOF
8527 if ac_fn_c_try_compile "$LINENO"; then :
8528
8529                      smart_include=" "
8530                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8531 $as_echo "yes" >&6; }
8532                      break
8533
8534 else
8535
8536                      smart_include=
8537                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8538 $as_echo "no" >&6; }
8539
8540 fi
8541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8542 fi
8543
8544 if test "x$smart_include" = "x"; then
8545
8546   for prefix in $smart_prefix; do
8547
8548
8549 if test "x$LOCATE" != "x"; then
8550         DIRS=
8551   file="${_prefix}/${1}"
8552
8553   for x in `${LOCATE} $file 2>/dev/null`; do
8554                                         base=`echo $x | sed "s%/${file}%%"`
8555     if test "x$x" = "x$base"; then
8556       continue;
8557     fi
8558
8559     dir=`${DIRNAME} $x 2>/dev/null`
8560                 exclude=`echo ${dir} | ${GREP} /home`
8561     if test "x$exclude" != "x"; then
8562       continue
8563     fi
8564
8565                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
8566     if test "x$already" = "x"; then
8567       DIRS="$DIRS $dir"
8568     fi
8569   done
8570 fi
8571
8572 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
8573
8574   done
8575
8576
8577 if test "x$LOCATE" != "x"; then
8578         DIRS=
8579   file=openssl/ssl.h
8580
8581   for x in `${LOCATE} $file 2>/dev/null`; do
8582                                         base=`echo $x | sed "s%/${file}%%"`
8583     if test "x$x" = "x$base"; then
8584       continue;
8585     fi
8586
8587     dir=`${DIRNAME} $x 2>/dev/null`
8588                 exclude=`echo ${dir} | ${GREP} /home`
8589     if test "x$exclude" != "x"; then
8590       continue
8591     fi
8592
8593                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
8594     if test "x$already" = "x"; then
8595       DIRS="$DIRS $dir"
8596     fi
8597   done
8598 fi
8599
8600 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
8601
8602
8603   for try in $_smart_include_dir; do
8604     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $try" >&5
8605 $as_echo_n "checking for openssl/ssl.h in $try... " >&6; }
8606     CPPFLAGS="-isystem $try $old_CPPFLAGS"
8607     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8608 /* end confdefs.h.  */
8609
8610                     #include <openssl/ssl.h>
8611 int
8612 main ()
8613 {
8614 int a = 1;
8615   ;
8616   return 0;
8617 }
8618 _ACEOF
8619 if ac_fn_c_try_compile "$LINENO"; then :
8620
8621                      smart_include="-isystem $try"
8622                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8623 $as_echo "yes" >&6; }
8624                      break
8625
8626 else
8627
8628                      smart_include=
8629                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8630 $as_echo "no" >&6; }
8631
8632 fi
8633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8634   done
8635   CPPFLAGS="$old_CPPFLAGS"
8636 fi
8637
8638 if test "x$smart_include" != "x"; then
8639   eval "ac_cv_header_$ac_safe=yes"
8640   CPPFLAGS="$smart_include $old_CPPFLAGS"
8641   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
8642 fi
8643
8644 smart_prefix=
8645
8646   if test "x$ac_cv_header_openssl_ssl_h" = "xyes"; then
8647
8648 $as_echo "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
8649
8650
8651     for ac_header in \
8652       openssl/crypto.h \
8653       openssl/err.h \
8654       openssl/evp.h \
8655       openssl/md5.h \
8656       openssl/md4.h \
8657       openssl/sha.h \
8658       openssl/ocsp.h \
8659       openssl/engine.h
8660 do :
8661   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8662 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8663 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8664   cat >>confdefs.h <<_ACEOF
8665 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8666 _ACEOF
8667   OPENSSL_CPPFLAGS="$smart_include"
8668 else
8669
8670         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8671 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8672 as_fn_error $? "failed locating OpenSSL headers. Use --with-openssl-include-dir=<path>, or --with-openssl=no (builds without OpenSSL)
8673 See \`config.log' for more details" "$LINENO" 5; }
8674
8675
8676 fi
8677
8678 done
8679
8680
8681     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL version >= 0.9.7" >&5
8682 $as_echo_n "checking for OpenSSL version >= 0.9.7... " >&6; }
8683     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8684 /* end confdefs.h.  */
8685 #include <openssl/crypto.h>
8686        #if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
8687        yes
8688        #endif
8689
8690 _ACEOF
8691 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8692   $EGREP "yes" >/dev/null 2>&1; then :
8693
8694         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8695 $as_echo "yes" >&6; }
8696
8697 else
8698
8699         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8700 $as_echo "no" >&6; }
8701         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8702 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8703 as_fn_error $? "OpenSSL version too old
8704 See \`config.log' for more details" "$LINENO" 5; }
8705
8706
8707 fi
8708 rm -f conftest*
8709
8710
8711                         old_CPPFLAGS="$CPPFLAGS"
8712     CPPFLAGS="$OPENSSL_CPPFLAGS $CPPFLAGS"
8713
8714                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library and header version consistency" >&5
8715 $as_echo_n "checking OpenSSL library and header version consistency... " >&6; }
8716     if test "$cross_compiling" = yes; then :
8717   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8718 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8719 as_fn_error $? "cannot run test program while cross compiling
8720 See \`config.log' for more details" "$LINENO" 5; }
8721 else
8722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8723 /* end confdefs.h.  */
8724
8725           #include <stdio.h>
8726           #include <openssl/opensslv.h>
8727           #include <openssl/crypto.h>
8728
8729 int
8730 main ()
8731 {
8732
8733           printf("library: %lx header: %lx... ", (unsigned long) SSLeay(), (unsigned long) OPENSSL_VERSION_NUMBER);
8734           if (SSLeay() == OPENSSL_VERSION_NUMBER) {
8735             return 0;
8736           } else {
8737             return 1;
8738           }
8739
8740
8741   ;
8742   return 0;
8743 }
8744 _ACEOF
8745 if ac_fn_c_try_run "$LINENO"; then :
8746
8747         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8748 $as_echo "yes" >&6; }
8749
8750 else
8751
8752         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8753 $as_echo "no" >&6; }
8754         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8755 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8756 as_fn_error $? "OpenSSL library version does not match header version
8757 See \`config.log' for more details" "$LINENO" 5; }
8758
8759
8760 fi
8761 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8762   conftest.$ac_objext conftest.beam conftest.$ac_ext
8763 fi
8764
8765     CPPFLAGS="$old_CPPFLAGS"
8766   fi
8767
8768   LIBS="$OLD_LIBS"
8769
8770
8771
8772   export OPENSSL_LIBS OPENSSL_LDFLAGS OPENSSL_CPPFLAGS
8773 fi
8774
8775 if test "x$PCAP_LIBS" = x; then
8776   { $as_echo "$as_me:${as_lineno-$LINENO}: skipping test for pcap.h." >&5
8777 $as_echo "$as_me: skipping test for pcap.h." >&6;}
8778 else
8779         smart_try_dir="$pcap_include_dir"
8780
8781
8782 ac_safe=`echo "pcap.h" | sed 'y%./+-%__pm%'`
8783 old_CPPFLAGS="$CPPFLAGS"
8784 smart_include=
8785 smart_include_dir="/usr/local/include /opt/include"
8786
8787 _smart_try_dir=
8788 _smart_include_dir=
8789
8790 for _prefix in $smart_prefix ""; do
8791   for _dir in $smart_try_dir; do
8792     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
8793   done
8794
8795   for _dir in $smart_include_dir; do
8796     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
8797   done
8798 done
8799
8800 if test "x$_smart_try_dir" != "x"; then
8801   for try in $_smart_try_dir; do
8802     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h in $try" >&5
8803 $as_echo_n "checking for pcap.h in $try... " >&6; }
8804     CPPFLAGS="-isystem $try $old_CPPFLAGS"
8805     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8806 /* end confdefs.h.  */
8807
8808                     #include <pcap.h>
8809 int
8810 main ()
8811 {
8812 int a = 1;
8813   ;
8814   return 0;
8815 }
8816 _ACEOF
8817 if ac_fn_c_try_compile "$LINENO"; then :
8818
8819                      smart_include="-isystem $try"
8820                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8821 $as_echo "yes" >&6; }
8822                      break
8823
8824 else
8825
8826                      smart_include=
8827                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8828 $as_echo "no" >&6; }
8829
8830 fi
8831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8832   done
8833   CPPFLAGS="$old_CPPFLAGS"
8834 fi
8835
8836 if test "x$smart_include" = "x"; then
8837   for _prefix in $smart_prefix; do
8838     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/pcap.h" >&5
8839 $as_echo_n "checking for ${_prefix}/pcap.h... " >&6; }
8840
8841     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8842 /* end confdefs.h.  */
8843
8844                     #include <pcap.h>
8845 int
8846 main ()
8847 {
8848 int a = 1;
8849   ;
8850   return 0;
8851 }
8852 _ACEOF
8853 if ac_fn_c_try_compile "$LINENO"; then :
8854
8855                      smart_include="-isystem ${_prefix}/"
8856                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8857 $as_echo "yes" >&6; }
8858                      break
8859
8860 else
8861
8862                      smart_include=
8863                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8864 $as_echo "no" >&6; }
8865
8866 fi
8867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8868   done
8869 fi
8870
8871 if test "x$smart_include" = "x"; then
8872     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h" >&5
8873 $as_echo_n "checking for pcap.h... " >&6; }
8874
8875     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8876 /* end confdefs.h.  */
8877
8878                     #include <pcap.h>
8879 int
8880 main ()
8881 {
8882 int a = 1;
8883   ;
8884   return 0;
8885 }
8886 _ACEOF
8887 if ac_fn_c_try_compile "$LINENO"; then :
8888
8889                      smart_include=" "
8890                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8891 $as_echo "yes" >&6; }
8892                      break
8893
8894 else
8895
8896                      smart_include=
8897                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8898 $as_echo "no" >&6; }
8899
8900 fi
8901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8902 fi
8903
8904 if test "x$smart_include" = "x"; then
8905
8906   for prefix in $smart_prefix; do
8907
8908
8909 if test "x$LOCATE" != "x"; then
8910         DIRS=
8911   file="${_prefix}/${1}"
8912
8913   for x in `${LOCATE} $file 2>/dev/null`; do
8914                                         base=`echo $x | sed "s%/${file}%%"`
8915     if test "x$x" = "x$base"; then
8916       continue;
8917     fi
8918
8919     dir=`${DIRNAME} $x 2>/dev/null`
8920                 exclude=`echo ${dir} | ${GREP} /home`
8921     if test "x$exclude" != "x"; then
8922       continue
8923     fi
8924
8925                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
8926     if test "x$already" = "x"; then
8927       DIRS="$DIRS $dir"
8928     fi
8929   done
8930 fi
8931
8932 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
8933
8934   done
8935
8936
8937 if test "x$LOCATE" != "x"; then
8938         DIRS=
8939   file=pcap.h
8940
8941   for x in `${LOCATE} $file 2>/dev/null`; do
8942                                         base=`echo $x | sed "s%/${file}%%"`
8943     if test "x$x" = "x$base"; then
8944       continue;
8945     fi
8946
8947     dir=`${DIRNAME} $x 2>/dev/null`
8948                 exclude=`echo ${dir} | ${GREP} /home`
8949     if test "x$exclude" != "x"; then
8950       continue
8951     fi
8952
8953                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
8954     if test "x$already" = "x"; then
8955       DIRS="$DIRS $dir"
8956     fi
8957   done
8958 fi
8959
8960 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
8961
8962
8963   for try in $_smart_include_dir; do
8964     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h in $try" >&5
8965 $as_echo_n "checking for pcap.h in $try... " >&6; }
8966     CPPFLAGS="-isystem $try $old_CPPFLAGS"
8967     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8968 /* end confdefs.h.  */
8969
8970                     #include <pcap.h>
8971 int
8972 main ()
8973 {
8974 int a = 1;
8975   ;
8976   return 0;
8977 }
8978 _ACEOF
8979 if ac_fn_c_try_compile "$LINENO"; then :
8980
8981                      smart_include="-isystem $try"
8982                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8983 $as_echo "yes" >&6; }
8984                      break
8985
8986 else
8987
8988                      smart_include=
8989                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8990 $as_echo "no" >&6; }
8991
8992 fi
8993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8994   done
8995   CPPFLAGS="$old_CPPFLAGS"
8996 fi
8997
8998 if test "x$smart_include" != "x"; then
8999   eval "ac_cv_header_$ac_safe=yes"
9000   CPPFLAGS="$smart_include $old_CPPFLAGS"
9001   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
9002 fi
9003
9004 smart_prefix=
9005
9006   if test "x$ac_cv_header_pcap_h" == "xyes"; then
9007
9008 $as_echo "#define HAVE_PCAP_H 1" >>confdefs.h
9009
9010
9011
9012   else
9013     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pcap headers not found, silently disabling the RADIUS sniffer, and ARP listener. Use --with-pcap-include-dir=<path>." >&5
9014 $as_echo "$as_me: WARNING: pcap headers not found, silently disabling the RADIUS sniffer, and ARP listener. Use --with-pcap-include-dir=<path>." >&2;}
9015   fi
9016 fi
9017
9018 if test "x$COLLECTDC_LIBS" = x; then
9019   { $as_echo "$as_me:${as_lineno-$LINENO}: skipping test for collectd/client.h." >&5
9020 $as_echo "$as_me: skipping test for collectd/client.h." >&6;}
9021 else
9022         smart_try_dir="$collectdclient_include_dir"
9023
9024
9025 ac_safe=`echo "collectd/client.h" | sed 'y%./+-%__pm%'`
9026 old_CPPFLAGS="$CPPFLAGS"
9027 smart_include=
9028 smart_include_dir="/usr/local/include /opt/include"
9029
9030 _smart_try_dir=
9031 _smart_include_dir=
9032
9033 for _prefix in $smart_prefix ""; do
9034   for _dir in $smart_try_dir; do
9035     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
9036   done
9037
9038   for _dir in $smart_include_dir; do
9039     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
9040   done
9041 done
9042
9043 if test "x$_smart_try_dir" != "x"; then
9044   for try in $_smart_try_dir; do
9045     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h in $try" >&5
9046 $as_echo_n "checking for collectd/client.h in $try... " >&6; }
9047     CPPFLAGS="-isystem $try $old_CPPFLAGS"
9048     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9049 /* end confdefs.h.  */
9050
9051                     #include <collectd/client.h>
9052 int
9053 main ()
9054 {
9055 int a = 1;
9056   ;
9057   return 0;
9058 }
9059 _ACEOF
9060 if ac_fn_c_try_compile "$LINENO"; then :
9061
9062                      smart_include="-isystem $try"
9063                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9064 $as_echo "yes" >&6; }
9065                      break
9066
9067 else
9068
9069                      smart_include=
9070                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9071 $as_echo "no" >&6; }
9072
9073 fi
9074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9075   done
9076   CPPFLAGS="$old_CPPFLAGS"
9077 fi
9078
9079 if test "x$smart_include" = "x"; then
9080   for _prefix in $smart_prefix; do
9081     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/collectd/client.h" >&5
9082 $as_echo_n "checking for ${_prefix}/collectd/client.h... " >&6; }
9083
9084     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9085 /* end confdefs.h.  */
9086
9087                     #include <collectd/client.h>
9088 int
9089 main ()
9090 {
9091 int a = 1;
9092   ;
9093   return 0;
9094 }
9095 _ACEOF
9096 if ac_fn_c_try_compile "$LINENO"; then :
9097
9098                      smart_include="-isystem ${_prefix}/"
9099                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9100 $as_echo "yes" >&6; }
9101                      break
9102
9103 else
9104
9105                      smart_include=
9106                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9107 $as_echo "no" >&6; }
9108
9109 fi
9110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9111   done
9112 fi
9113
9114 if test "x$smart_include" = "x"; then
9115     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h" >&5
9116 $as_echo_n "checking for collectd/client.h... " >&6; }
9117
9118     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9119 /* end confdefs.h.  */
9120
9121                     #include <collectd/client.h>
9122 int
9123 main ()
9124 {
9125 int a = 1;
9126   ;
9127   return 0;
9128 }
9129 _ACEOF
9130 if ac_fn_c_try_compile "$LINENO"; then :
9131
9132                      smart_include=" "
9133                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9134 $as_echo "yes" >&6; }
9135                      break
9136
9137 else
9138
9139                      smart_include=
9140                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9141 $as_echo "no" >&6; }
9142
9143 fi
9144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9145 fi
9146
9147 if test "x$smart_include" = "x"; then
9148
9149   for prefix in $smart_prefix; do
9150
9151
9152 if test "x$LOCATE" != "x"; then
9153         DIRS=
9154   file="${_prefix}/${1}"
9155
9156   for x in `${LOCATE} $file 2>/dev/null`; do
9157                                         base=`echo $x | sed "s%/${file}%%"`
9158     if test "x$x" = "x$base"; then
9159       continue;
9160     fi
9161
9162     dir=`${DIRNAME} $x 2>/dev/null`
9163                 exclude=`echo ${dir} | ${GREP} /home`
9164     if test "x$exclude" != "x"; then
9165       continue
9166     fi
9167
9168                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
9169     if test "x$already" = "x"; then
9170       DIRS="$DIRS $dir"
9171     fi
9172   done
9173 fi
9174
9175 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
9176
9177   done
9178
9179
9180 if test "x$LOCATE" != "x"; then
9181         DIRS=
9182   file=collectd/client.h
9183
9184   for x in `${LOCATE} $file 2>/dev/null`; do
9185                                         base=`echo $x | sed "s%/${file}%%"`
9186     if test "x$x" = "x$base"; then
9187       continue;
9188     fi
9189
9190     dir=`${DIRNAME} $x 2>/dev/null`
9191                 exclude=`echo ${dir} | ${GREP} /home`
9192     if test "x$exclude" != "x"; then
9193       continue
9194     fi
9195
9196                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
9197     if test "x$already" = "x"; then
9198       DIRS="$DIRS $dir"
9199     fi
9200   done
9201 fi
9202
9203 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
9204
9205
9206   for try in $_smart_include_dir; do
9207     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h in $try" >&5
9208 $as_echo_n "checking for collectd/client.h in $try... " >&6; }
9209     CPPFLAGS="-isystem $try $old_CPPFLAGS"
9210     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9211 /* end confdefs.h.  */
9212
9213                     #include <collectd/client.h>
9214 int
9215 main ()
9216 {
9217 int a = 1;
9218   ;
9219   return 0;
9220 }
9221 _ACEOF
9222 if ac_fn_c_try_compile "$LINENO"; then :
9223
9224                      smart_include="-isystem $try"
9225                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9226 $as_echo "yes" >&6; }
9227                      break
9228
9229 else
9230
9231                      smart_include=
9232                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9233 $as_echo "no" >&6; }
9234
9235 fi
9236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9237   done
9238   CPPFLAGS="$old_CPPFLAGS"
9239 fi
9240
9241 if test "x$smart_include" != "x"; then
9242   eval "ac_cv_header_$ac_safe=yes"
9243   CPPFLAGS="$smart_include $old_CPPFLAGS"
9244   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
9245 fi
9246
9247 smart_prefix=
9248
9249   if test "x$ac_cv_header_collectd_client_h" == "xyes"; then
9250
9251 $as_echo "#define HAVE_COLLECTDC_H 1" >>confdefs.h
9252
9253
9254
9255   else
9256     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: collectdclient headers not found. Use --with-collectdclient-include-dir=<path>." >&5
9257 $as_echo "$as_me: WARNING: collectdclient headers not found. Use --with-collectdclient-include-dir=<path>." >&2;}
9258   fi
9259 fi
9260
9261 if test "x$HAVE_LIBCAP" = x; then
9262   { $as_echo "$as_me:${as_lineno-$LINENO}: skipping test for cap.h." >&5
9263 $as_echo "$as_me: skipping test for cap.h." >&6;}
9264 else
9265         smart_try_dir="$cap_include_dir"
9266
9267
9268 ac_safe=`echo "sys/capability.h" | sed 'y%./+-%__pm%'`
9269 old_CPPFLAGS="$CPPFLAGS"
9270 smart_include=
9271 smart_include_dir="/usr/local/include /opt/include"
9272
9273 _smart_try_dir=
9274 _smart_include_dir=
9275
9276 for _prefix in $smart_prefix ""; do
9277   for _dir in $smart_try_dir; do
9278     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
9279   done
9280
9281   for _dir in $smart_include_dir; do
9282     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
9283   done
9284 done
9285
9286 if test "x$_smart_try_dir" != "x"; then
9287   for try in $_smart_try_dir; do
9288     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h in $try" >&5
9289 $as_echo_n "checking for sys/capability.h in $try... " >&6; }
9290     CPPFLAGS="-isystem $try $old_CPPFLAGS"
9291     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9292 /* end confdefs.h.  */
9293
9294                     #include <sys/capability.h>
9295 int
9296 main ()
9297 {
9298 int a = 1;
9299   ;
9300   return 0;
9301 }
9302 _ACEOF
9303 if ac_fn_c_try_compile "$LINENO"; then :
9304
9305                      smart_include="-isystem $try"
9306                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9307 $as_echo "yes" >&6; }
9308                      break
9309
9310 else
9311
9312                      smart_include=
9313                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9314 $as_echo "no" >&6; }
9315
9316 fi
9317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9318   done
9319   CPPFLAGS="$old_CPPFLAGS"
9320 fi
9321
9322 if test "x$smart_include" = "x"; then
9323   for _prefix in $smart_prefix; do
9324     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/sys/capability.h" >&5
9325 $as_echo_n "checking for ${_prefix}/sys/capability.h... " >&6; }
9326
9327     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9328 /* end confdefs.h.  */
9329
9330                     #include <sys/capability.h>
9331 int
9332 main ()
9333 {
9334 int a = 1;
9335   ;
9336   return 0;
9337 }
9338 _ACEOF
9339 if ac_fn_c_try_compile "$LINENO"; then :
9340
9341                      smart_include="-isystem ${_prefix}/"
9342                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9343 $as_echo "yes" >&6; }
9344                      break
9345
9346 else
9347
9348                      smart_include=
9349                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9350 $as_echo "no" >&6; }
9351
9352 fi
9353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9354   done
9355 fi
9356
9357 if test "x$smart_include" = "x"; then
9358     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h" >&5
9359 $as_echo_n "checking for sys/capability.h... " >&6; }
9360
9361     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9362 /* end confdefs.h.  */
9363
9364                     #include <sys/capability.h>
9365 int
9366 main ()
9367 {
9368 int a = 1;
9369   ;
9370   return 0;
9371 }
9372 _ACEOF
9373 if ac_fn_c_try_compile "$LINENO"; then :
9374
9375                      smart_include=" "
9376                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9377 $as_echo "yes" >&6; }
9378                      break
9379
9380 else
9381
9382                      smart_include=
9383                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9384 $as_echo "no" >&6; }
9385
9386 fi
9387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9388 fi
9389
9390 if test "x$smart_include" = "x"; then
9391
9392   for prefix in $smart_prefix; do
9393
9394
9395 if test "x$LOCATE" != "x"; then
9396         DIRS=
9397   file="${_prefix}/${1}"
9398
9399   for x in `${LOCATE} $file 2>/dev/null`; do
9400                                         base=`echo $x | sed "s%/${file}%%"`
9401     if test "x$x" = "x$base"; then
9402       continue;
9403     fi
9404
9405     dir=`${DIRNAME} $x 2>/dev/null`
9406                 exclude=`echo ${dir} | ${GREP} /home`
9407     if test "x$exclude" != "x"; then
9408       continue
9409     fi
9410
9411                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
9412     if test "x$already" = "x"; then
9413       DIRS="$DIRS $dir"
9414     fi
9415   done
9416 fi
9417
9418 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
9419
9420   done
9421
9422
9423 if test "x$LOCATE" != "x"; then
9424         DIRS=
9425   file=sys/capability.h
9426
9427   for x in `${LOCATE} $file 2>/dev/null`; do
9428                                         base=`echo $x | sed "s%/${file}%%"`
9429     if test "x$x" = "x$base"; then
9430       continue;
9431     fi
9432
9433     dir=`${DIRNAME} $x 2>/dev/null`
9434                 exclude=`echo ${dir} | ${GREP} /home`
9435     if test "x$exclude" != "x"; then
9436       continue
9437     fi
9438
9439                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
9440     if test "x$already" = "x"; then
9441       DIRS="$DIRS $dir"
9442     fi
9443   done
9444 fi
9445
9446 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
9447
9448
9449   for try in $_smart_include_dir; do
9450     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h in $try" >&5
9451 $as_echo_n "checking for sys/capability.h in $try... " >&6; }
9452     CPPFLAGS="-isystem $try $old_CPPFLAGS"
9453     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9454 /* end confdefs.h.  */
9455
9456                     #include <sys/capability.h>
9457 int
9458 main ()
9459 {
9460 int a = 1;
9461   ;
9462   return 0;
9463 }
9464 _ACEOF
9465 if ac_fn_c_try_compile "$LINENO"; then :
9466
9467                      smart_include="-isystem $try"
9468                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9469 $as_echo "yes" >&6; }
9470                      break
9471
9472 else
9473
9474                      smart_include=
9475                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9476 $as_echo "no" >&6; }
9477
9478 fi
9479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9480   done
9481   CPPFLAGS="$old_CPPFLAGS"
9482 fi
9483
9484 if test "x$smart_include" != "x"; then
9485   eval "ac_cv_header_$ac_safe=yes"
9486   CPPFLAGS="$smart_include $old_CPPFLAGS"
9487   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
9488 fi
9489
9490 smart_prefix=
9491
9492   if test "x$ac_cv_header_sys_capability_h" == "xyes"; then
9493
9494 $as_echo "#define HAVE_CAPABILITY_H 1" >>confdefs.h
9495
9496   else
9497     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cap headers not found, will not perform debugger checks. Use --with-cap-include-dir=<path>." >&5
9498 $as_echo "$as_me: WARNING: cap headers not found, will not perform debugger checks. Use --with-cap-include-dir=<path>." >&2;}
9499   fi
9500 fi
9501
9502
9503 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
9504 if test "x$ac_cv_type_off_t" = xyes; then :
9505
9506 else
9507
9508 cat >>confdefs.h <<_ACEOF
9509 #define off_t long int
9510 _ACEOF
9511
9512 fi
9513
9514 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9515 if test "x$ac_cv_type_pid_t" = xyes; then :
9516
9517 else
9518
9519 cat >>confdefs.h <<_ACEOF
9520 #define pid_t int
9521 _ACEOF
9522
9523 fi
9524
9525 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
9526 if test "x$ac_cv_type_size_t" = xyes; then :
9527
9528 else
9529
9530 cat >>confdefs.h <<_ACEOF
9531 #define size_t unsigned int
9532 _ACEOF
9533
9534 fi
9535
9536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
9537 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
9538 if ${ac_cv_type_uid_t+:} false; then :
9539   $as_echo_n "(cached) " >&6
9540 else
9541   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9542 /* end confdefs.h.  */
9543 #include <sys/types.h>
9544
9545 _ACEOF
9546 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9547   $EGREP "uid_t" >/dev/null 2>&1; then :
9548   ac_cv_type_uid_t=yes
9549 else
9550   ac_cv_type_uid_t=no
9551 fi
9552 rm -f conftest*
9553
9554 fi
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
9556 $as_echo "$ac_cv_type_uid_t" >&6; }
9557 if test $ac_cv_type_uid_t = no; then
9558
9559 $as_echo "#define uid_t int" >>confdefs.h
9560
9561
9562 $as_echo "#define gid_t int" >>confdefs.h
9563
9564 fi
9565
9566
9567
9568   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
9569 $as_echo_n "checking for socklen_t... " >&6; }
9570 if ${ac_cv_type_socklen_t+:} false; then :
9571   $as_echo_n "(cached) " >&6
9572 else
9573    ac_cv_type_socklen_t=no
9574       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9575 /* end confdefs.h.  */
9576 #ifdef HAVE_SYS_TYPES_H
9577     #  include <sys/types.h>
9578     #endif
9579
9580     #ifdef HAVE_SYS_SOCKET_H
9581     #  include <sys/socket.h>
9582     #endif
9583
9584 int
9585 main ()
9586 {
9587 socklen_t foo
9588   ;
9589   return 0;
9590 }
9591 _ACEOF
9592 if ac_fn_c_try_compile "$LINENO"; then :
9593   ac_cv_type_socklen_t=yes
9594 fi
9595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9596
9597
9598 fi
9599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_socklen_t" >&5
9600 $as_echo "$ac_cv_type_socklen_t" >&6; }
9601
9602   if test "$ac_cv_type_socklen_t" != "yes"; then
9603
9604 $as_echo "#define socklen_t int" >>confdefs.h
9605
9606   fi
9607
9608
9609
9610   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint8_t" >&5
9611 $as_echo_n "checking for uint8_t... " >&6; }
9612 if ${ac_cv_type_uint8_t+:} false; then :
9613   $as_echo_n "(cached) " >&6
9614 else
9615    ac_cv_type_uint8_t=no
9616       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9617 /* end confdefs.h.  */
9618 #ifdef HAVE_INTTYPES_H
9619     #  include <inttypes.h>
9620     #endif
9621
9622     #ifdef HAVE_STDINT_H
9623     #  include <stdint.h>
9624     #endif
9625
9626 int
9627 main ()
9628 {
9629 uint8_t foo
9630   ;
9631   return 0;
9632 }
9633 _ACEOF
9634 if ac_fn_c_try_compile "$LINENO"; then :
9635   ac_cv_type_uint8_t=yes
9636 fi
9637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9638
9639
9640 fi
9641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint8_t" >&5
9642 $as_echo "$ac_cv_type_uint8_t" >&6; }
9643
9644   if test "$ac_cv_type_uint8_t" != "yes"; then
9645
9646 $as_echo "#define uint8_t unsigned char" >>confdefs.h
9647
9648   fi
9649
9650
9651
9652   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint16_t" >&5
9653 $as_echo_n "checking for uint16_t... " >&6; }
9654 if ${ac_cv_type_uint16_t+:} false; then :
9655   $as_echo_n "(cached) " >&6
9656 else
9657    ac_cv_type_uint16_t=no
9658       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9659 /* end confdefs.h.  */
9660 #ifdef HAVE_INTTYPES_H
9661     #  include <inttypes.h>
9662     #endif
9663
9664     #ifdef HAVE_STDINT_H
9665     #  include <stdint.h>
9666     #endif
9667
9668 int
9669 main ()
9670 {
9671 uint16_t foo
9672   ;
9673   return 0;
9674 }
9675 _ACEOF
9676 if ac_fn_c_try_compile "$LINENO"; then :
9677   ac_cv_type_uint16_t=yes
9678 fi
9679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9680
9681
9682 fi
9683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint16_t" >&5
9684 $as_echo "$ac_cv_type_uint16_t" >&6; }
9685
9686   if test "$ac_cv_type_uint16_t" != "yes"; then
9687
9688 $as_echo "#define uint16_t unsigned short" >>confdefs.h
9689
9690   fi
9691
9692
9693
9694   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint32_t" >&5
9695 $as_echo_n "checking for uint32_t... " >&6; }
9696 if ${ac_cv_type_uint32_t+:} false; then :
9697   $as_echo_n "(cached) " >&6
9698 else
9699    ac_cv_type_uint32_t=no
9700       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9701 /* end confdefs.h.  */
9702 #ifdef HAVE_INTTYPES_H
9703     #  include <inttypes.h>
9704     #endif
9705
9706     #ifdef HAVE_STDINT_H
9707     #  include <stdint.h>
9708     #endif
9709
9710 int
9711 main ()
9712 {
9713 uint32_t foo
9714   ;
9715   return 0;
9716 }
9717 _ACEOF
9718 if ac_fn_c_try_compile "$LINENO"; then :
9719   ac_cv_type_uint32_t=yes
9720 fi
9721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9722
9723
9724 fi
9725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint32_t" >&5
9726 $as_echo "$ac_cv_type_uint32_t" >&6; }
9727
9728   if test "$ac_cv_type_uint32_t" != "yes"; then
9729
9730 $as_echo "#define uint32_t unsigned int" >>confdefs.h
9731
9732   fi
9733
9734
9735
9736   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint64_t" >&5
9737 $as_echo_n "checking for uint64_t... " >&6; }
9738 if ${ac_cv_type_uint64_t+:} false; then :
9739   $as_echo_n "(cached) " >&6
9740 else
9741    ac_cv_type_uint64_t=no
9742       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9743 /* end confdefs.h.  */
9744 #ifdef HAVE_INTTYPES_H
9745     #  include <inttypes.h>
9746     #endif
9747
9748     #ifdef HAVE_STDINT_H
9749     #  include <stdint.h>
9750     #endif
9751
9752 int
9753 main ()
9754 {
9755 uint64_t foo
9756   ;
9757   return 0;
9758 }
9759 _ACEOF
9760 if ac_fn_c_try_compile "$LINENO"; then :
9761   ac_cv_type_uint64_t=yes
9762 fi
9763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9764
9765
9766 fi
9767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint64_t" >&5
9768 $as_echo "$ac_cv_type_uint64_t" >&6; }
9769
9770   if test "$ac_cv_type_uint64_t" != "yes"; then
9771
9772 $as_echo "#define uint64_t unsigned long long" >>confdefs.h
9773
9774   fi
9775
9776
9777 ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
9778 if test "x$ac_cv_type___uint128_t" = xyes; then :
9779
9780 $as_echo "#define HAVE___UINT128_T 1" >>confdefs.h
9781
9782 fi
9783
9784
9785 ac_fn_c_check_type "$LINENO" "uint128_t" "ac_cv_type_uint128_t" "
9786     #ifdef HAVE_INTTYPES_H
9787     #  include <inttypes.h>
9788     #endif
9789
9790     #ifdef HAVE_STDINT_H
9791     #  include <stdint.h>
9792     #endif
9793
9794
9795 "
9796 if test "x$ac_cv_type_uint128_t" = xyes; then :
9797
9798 $as_echo "#define HAVE_UINT128_T 1" >>confdefs.h
9799
9800 fi
9801
9802
9803 ac_fn_c_check_type "$LINENO" "struct in6_addr" "ac_cv_type_struct_in6_addr" "
9804     #ifdef HAVE_NETINET_IN_H
9805     #  include <netinet/in.h>
9806     #endif
9807
9808
9809 "
9810 if test "x$ac_cv_type_struct_in6_addr" = xyes; then :
9811
9812 $as_echo "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h
9813
9814 fi
9815
9816
9817 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
9818     #ifdef HAVE_NETINET_IN_H
9819     #  include <netinet/in.h>
9820     #endif
9821
9822     #ifdef HAVE_SYS_SOCKET_H
9823     #  include <sys/socket.h>
9824     #endif
9825
9826 "
9827 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
9828
9829 $as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
9830
9831 fi
9832
9833
9834 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "
9835     #ifdef HAVE_NETINET_IN_H
9836     #  include <netinet/in.h>
9837     #endif
9838
9839 "
9840 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
9841
9842 $as_echo "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h
9843
9844 fi
9845
9846
9847 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "
9848     #ifdef HAVE_SYS_TYPES_H
9849     #  include <sys/types.h>
9850     #endif
9851
9852     #ifdef HAVE_SYS_SOCKET_H
9853     #  include <sys/socket.h>
9854     #endif
9855
9856     #ifdef HAVE_NETDB_H
9857     #  include <netdb.h>
9858     #endif
9859
9860
9861 "
9862 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
9863
9864 $as_echo "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h
9865
9866 fi
9867
9868
9869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sig_t is defined" >&5
9870 $as_echo_n "checking if sig_t is defined... " >&6; }
9871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9872 /* end confdefs.h.  */
9873
9874       #ifdef HAVE_SIGNAL_H
9875       #  include <signal.h>
9876       #endif
9877
9878 int
9879 main ()
9880 {
9881
9882       sig_t func;
9883       return 0;
9884
9885
9886   ;
9887   return 0;
9888 }
9889 _ACEOF
9890 if ac_fn_c_try_link "$LINENO"; then :
9891
9892       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9893 $as_echo "yes" >&6; }
9894
9895 $as_echo "#define HAVE_SIG_T 1" >>confdefs.h
9896
9897
9898 else
9899
9900       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9901 $as_echo "no" >&6; }
9902
9903
9904 fi
9905 rm -f core conftest.err conftest.$ac_objext \
9906     conftest$ac_exeext conftest.$ac_ext
9907
9908 for ac_func in \
9909   getopt_long \
9910   fcntl \
9911   strsignal \
9912   sigaction \
9913   sigprocmask \
9914   pthread_sigmask \
9915   snprintf \
9916   vsnprintf \
9917   setsid \
9918   strncasecmp \
9919   strcasecmp \
9920   localtime_r \
9921   ctime_r \
9922   gmtime_r \
9923   strsep \
9924   inet_aton \
9925   inet_pton \
9926   inet_ntop \
9927   mallopt \
9928   setlinebuf \
9929   setvbuf \
9930   getusershell \
9931   initgroups \
9932   getaddrinfo \
9933   getnameinfo \
9934   closefrom \
9935   gettimeofday \
9936   getpeereid \
9937   setuid \
9938   setresuid \
9939   getresuid \
9940   strlcat \
9941   strlcpy \
9942   kqueue
9943
9944 do :
9945   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9946 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9947 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9948   cat >>confdefs.h <<_ACEOF
9949 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9950 _ACEOF
9951
9952 fi
9953 done
9954
9955
9956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9957 $as_echo_n "checking return type of signal handlers... " >&6; }
9958 if ${ac_cv_type_signal+:} false; then :
9959   $as_echo_n "(cached) " >&6
9960 else
9961   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9962 /* end confdefs.h.  */
9963 #include <sys/types.h>
9964 #include <signal.h>
9965
9966 int
9967 main ()
9968 {
9969 return *(signal (0, 0)) (0) == 1;
9970   ;
9971   return 0;
9972 }
9973 _ACEOF
9974 if ac_fn_c_try_compile "$LINENO"; then :
9975   ac_cv_type_signal=int
9976 else
9977   ac_cv_type_signal=void
9978 fi
9979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9980 fi
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9982 $as_echo "$ac_cv_type_signal" >&6; }
9983
9984 cat >>confdefs.h <<_ACEOF
9985 #define RETSIGTYPE $ac_cv_type_signal
9986 _ACEOF
9987
9988
9989
9990 if test "x$ac_cv_header_utmpx_h" = "xyes"; then
9991
9992   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_xtime in struct utmpx" >&5
9993 $as_echo_n "checking for ut_xtime in struct utmpx... " >&6; }
9994
9995
9996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9997 /* end confdefs.h.  */
9998
9999 #include <utmpx.h>
10000 #ifdef HAVE_STDDEF_H
10001 #include <stddef.h>
10002 #endif
10003 #ifndef offsetof
10004 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
10005 #endif
10006
10007 int
10008 main ()
10009 {
10010  int foo = offsetof(struct utmpx, ut_xtime)
10011   ;
10012   return 0;
10013 }
10014 _ACEOF
10015 if ac_fn_c_try_compile "$LINENO"; then :
10016   has_element=" "
10017 else
10018   has_element=
10019 fi
10020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10021
10022   ac_safe_type=`echo "struct utmpx" | sed 'y% %_%'`
10023   if test "x$has_element" != "x"; then
10024     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10025 $as_echo "yes" >&6; }
10026     eval "ac_cv_type_${ac_safe_type}_has_ut_xtime=yes"
10027   else
10028     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10029 $as_echo "no" >&6; }
10030     eval "ac_cv_type_${ac_safe_type}_has_ut_xtime="
10031  fi
10032
10033  if test "x$ac_cv_type_struct_utmpx_has_ut_xtime" = "x"; then
10034
10035 $as_echo "#define ut_xtime ut_tv.tv_sec" >>confdefs.h
10036
10037  fi
10038 fi
10039
10040
10041   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipi_addr in struct in_pktinfo" >&5
10042 $as_echo_n "checking for ipi_addr in struct in_pktinfo... " >&6; }
10043
10044
10045   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10046 /* end confdefs.h.  */
10047
10048 #include <netinet/in.h>
10049 #ifdef HAVE_STDDEF_H
10050 #include <stddef.h>
10051 #endif
10052 #ifndef offsetof
10053 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
10054 #endif
10055
10056 int
10057 main ()
10058 {
10059  int foo = offsetof(struct in_pktinfo, ipi_addr)
10060   ;
10061   return 0;
10062 }
10063 _ACEOF
10064 if ac_fn_c_try_compile "$LINENO"; then :
10065   has_element=" "
10066 else
10067   has_element=
10068 fi
10069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10070
10071   ac_safe_type=`echo "struct in_pktinfo" | sed 'y% %_%'`
10072   if test "x$has_element" != "x"; then
10073     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10074 $as_echo "yes" >&6; }
10075     eval "ac_cv_type_${ac_safe_type}_has_ipi_addr=yes"
10076   else
10077     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10078 $as_echo "no" >&6; }
10079     eval "ac_cv_type_${ac_safe_type}_has_ipi_addr="
10080  fi
10081
10082 if test "x$ac_cv_type_struct_in_pktinfo_has_ipi_addr" = "xyes"; then
10083
10084 $as_echo "#define HAVE_IP_PKTINFO /**/" >>confdefs.h
10085
10086 fi
10087
10088
10089   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipi6_addr in struct in6_pktinfo" >&5
10090 $as_echo_n "checking for ipi6_addr in struct in6_pktinfo... " >&6; }
10091
10092
10093   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10094 /* end confdefs.h.  */
10095
10096 #include <netinet/in.h>
10097 #ifdef HAVE_STDDEF_H
10098 #include <stddef.h>
10099 #endif
10100 #ifndef offsetof
10101 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
10102 #endif
10103
10104 int
10105 main ()
10106 {
10107  int foo = offsetof(struct in6_pktinfo, ipi6_addr)
10108   ;
10109   return 0;
10110 }
10111 _ACEOF
10112 if ac_fn_c_try_compile "$LINENO"; then :
10113   has_element=" "
10114 else
10115   has_element=
10116 fi
10117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10118
10119   ac_safe_type=`echo "struct in6_pktinfo" | sed 'y% %_%'`
10120   if test "x$has_element" != "x"; then
10121     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10122 $as_echo "yes" >&6; }
10123     eval "ac_cv_type_${ac_safe_type}_has_ipi6_addr=yes"
10124   else
10125     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10126 $as_echo "no" >&6; }
10127     eval "ac_cv_type_${ac_safe_type}_has_ipi6_addr="
10128  fi
10129
10130 if test "x$ac_cv_type_struct_in6_pktinfo_has_ipi6_addr" = "xyes"; then
10131
10132 $as_echo "#define HAVE_IN6_PKTINFO /**/" >>confdefs.h
10133
10134 fi
10135
10136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if htonll is defined" >&5
10137 $as_echo_n "checking if htonll is defined... " >&6; }
10138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10139 /* end confdefs.h.  */
10140
10141       #include <sys/types.h>
10142       #include <netinet/in.h>
10143
10144 int
10145 main ()
10146 {
10147
10148       return htonll(0);
10149
10150
10151   ;
10152   return 0;
10153 }
10154 _ACEOF
10155 if ac_fn_c_try_link "$LINENO"; then :
10156
10157       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10158 $as_echo "yes" >&6; }
10159
10160 $as_echo "#define HAVE_HTONLL 1" >>confdefs.h
10161
10162
10163 else
10164
10165       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10166 $as_echo "no" >&6; }
10167
10168
10169 fi
10170 rm -f core conftest.err conftest.$ac_objext \
10171     conftest$ac_exeext conftest.$ac_ext
10172
10173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if htonlll is defined" >&5
10174 $as_echo_n "checking if htonlll is defined... " >&6; }
10175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10176 /* end confdefs.h.  */
10177
10178       #include <sys/types.h>
10179       #include <netinet/in.h>
10180
10181 int
10182 main ()
10183 {
10184
10185       return htonlll(0);
10186
10187
10188   ;
10189   return 0;
10190 }
10191 _ACEOF
10192 if ac_fn_c_try_link "$LINENO"; then :
10193
10194       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10195 $as_echo "yes" >&6; }
10196
10197 $as_echo "#define HAVE_HTONLLL 1" >>confdefs.h
10198
10199
10200 else
10201
10202       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10203 $as_echo "no" >&6; }
10204
10205
10206 fi
10207 rm -f core conftest.err conftest.$ac_objext \
10208     conftest$ac_exeext conftest.$ac_ext
10209
10210
10211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10212 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10213 if ${ac_cv_c_const+:} false; then :
10214   $as_echo_n "(cached) " >&6
10215 else
10216   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10217 /* end confdefs.h.  */
10218
10219 int
10220 main ()
10221 {
10222
10223 #ifndef __cplusplus
10224   /* Ultrix mips cc rejects this sort of thing.  */
10225   typedef int charset[2];
10226   const charset cs = { 0, 0 };
10227   /* SunOS 4.1.1 cc rejects this.  */
10228   char const *const *pcpcc;
10229   char **ppc;
10230   /* NEC SVR4.0.2 mips cc rejects this.  */
10231   struct point {int x, y;};
10232   static struct point const zero = {0,0};
10233   /* AIX XL C 1.02.0.0 rejects this.
10234      It does not let you subtract one const X* pointer from another in
10235      an arm of an if-expression whose if-part is not a constant
10236      expression */
10237   const char *g = "string";
10238   pcpcc = &g + (g ? g-g : 0);
10239   /* HPUX 7.0 cc rejects these. */
10240   ++pcpcc;
10241   ppc = (char**) pcpcc;
10242   pcpcc = (char const *const *) ppc;
10243   { /* SCO 3.2v4 cc rejects this sort of thing.  */
10244     char tx;
10245     char *t = &tx;
10246     char const *s = 0 ? (char *) 0 : (char const *) 0;
10247
10248     *t++ = 0;
10249     if (s) return 0;
10250   }
10251   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10252     int x[] = {25, 17};
10253     const int *foo = &x[0];
10254     ++foo;
10255   }
10256   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10257     typedef const int *iptr;
10258     iptr p = 0;
10259     ++p;
10260   }
10261   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
10262        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10263     struct s { int j; const int *ap[3]; } bx;
10264     struct s *b = &bx; b->j = 5;
10265   }
10266   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10267     const int foo = 10;
10268     if (!foo) return 0;
10269   }
10270   return !cs[0] && !zero.x;
10271 #endif
10272
10273   ;
10274   return 0;
10275 }
10276 _ACEOF
10277 if ac_fn_c_try_compile "$LINENO"; then :
10278   ac_cv_c_const=yes
10279 else
10280   ac_cv_c_const=no
10281 fi
10282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10283 fi
10284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
10285 $as_echo "$ac_cv_c_const" >&6; }
10286 if test $ac_cv_c_const = no; then
10287
10288 $as_echo "#define const /**/" >>confdefs.h
10289
10290 fi
10291
10292
10293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of OS" >&5
10294 $as_echo_n "checking type of OS... " >&6; }
10295 OS=`uname -s`
10296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OS" >&5
10297 $as_echo "$OS" >&6; }
10298 if test "$OS" = "OS/2"; then
10299   LIBPREFIX=
10300 else
10301   LIBPREFIX=lib
10302 fi
10303
10304
10305 if test "x$developer" = "xyes"; then
10306   { $as_echo "$as_me:${as_lineno-$LINENO}: Setting additional developer CFLAGS" >&5
10307 $as_echo "$as_me: Setting additional developer CFLAGS" >&6;}
10308
10309
10310   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Wdocumentation\"" >&5
10311 $as_echo_n "checking for the compiler flag \"-Wdocumentation\"... " >&6; }
10312 if ${ax_cv_cc_wdocumentation_flag+:} false; then :
10313   $as_echo_n "(cached) " >&6
10314 else
10315
10316
10317     CFLAGS_SAVED=$CFLAGS
10318     CFLAGS="$CFLAGS -Werror -Wdocumentation"
10319
10320     ac_ext=c
10321 ac_cpp='$CPP $CPPFLAGS'
10322 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10323 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10324 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10325
10326     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10327 /* end confdefs.h.  */
10328
10329 int
10330 main ()
10331 {
10332 return 0;
10333   ;
10334   return 0;
10335 }
10336 _ACEOF
10337 if ac_fn_c_try_compile "$LINENO"; then :
10338   ax_cv_cc_wdocumentation_flag="yes"
10339 else
10340   ax_cv_cc_wdocumentation_flag="no"
10341 fi
10342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10343     ac_ext=c
10344 ac_cpp='$CPP $CPPFLAGS'
10345 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10346 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10347 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10348
10349
10350     CFLAGS="$CFLAGS_SAVED"
10351
10352 fi
10353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_wdocumentation_flag" >&5
10354 $as_echo "$ax_cv_cc_wdocumentation_flag" >&6; }
10355
10356   if test "x$ax_cv_cc_wdocumentation_flag" = "xyes"; then
10357     devflags="-Wdocumentation"
10358   fi
10359
10360
10361   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Weverything\"" >&5
10362 $as_echo_n "checking for the compiler flag \"-Weverything\"... " >&6; }
10363 if ${ax_cv_cc_weverything_flag+:} false; then :
10364   $as_echo_n "(cached) " >&6
10365 else
10366
10367
10368     CFLAGS_SAVED=$CFLAGS
10369     CFLAGS="$CFLAGS -Werror -Weverything -Wno-unused-macros -Wno-unreachable-code-return"
10370
10371     ac_ext=c
10372 ac_cpp='$CPP $CPPFLAGS'
10373 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10374 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10375 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10376
10377     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10378 /* end confdefs.h.  */
10379
10380 int
10381 main ()
10382 {
10383 return 0;
10384   ;
10385   return 0;
10386 }
10387 _ACEOF
10388 if ac_fn_c_try_compile "$LINENO"; then :
10389   ax_cv_cc_weverything_flag="yes"
10390 else
10391   ax_cv_cc_weverything_flag="no"
10392 fi
10393 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10394     ac_ext=c
10395 ac_cpp='$CPP $CPPFLAGS'
10396 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10397 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10398 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10399
10400
10401     CFLAGS="$CFLAGS_SAVED"
10402
10403 fi
10404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_weverything_flag" >&5
10405 $as_echo "$ax_cv_cc_weverything_flag" >&6; }
10406
10407   if test "x$ax_cv_cc_weverything_flag" = "xyes"; then
10408     devflags="$devflags -Weverything -Wformat=2 -Wno-padded -Wno-gnu-zero-variadic-macro-arguments -Wno-shorten-64-to-32 -Wno-sign-conversion -Wno-conversion -Wno-switch-enum -Wno-gnu-statement-expression -Wno-extended-offsetof -Wno-cast-align -Wno-documentation-unknown-command -Wno-covered-switch-default -Wno-packed -DWITH_VERIFY_PTR=1"
10409   else
10410     if test "x$GCC" = "xyes"; then
10411       devflags="$devflags -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -W -Wredundant-decls -Wundef -Wformat-y2k -Wno-format-extra-args -Wno-format-zero-length -Wno-cast-align -Wformat-nonliteral -Wformat-security -Wformat=2 -DWITH_VERIFY_PTR=1"
10412       INSTALLSTRIP=""
10413     fi
10414   fi
10415
10416   { $as_echo "$as_me:${as_lineno-$LINENO}: Developer CFLAGS are \"$devflags\"" >&5
10417 $as_echo "$as_me: Developer CFLAGS are \"$devflags\"" >&6;}
10418
10419   CFLAGS="$CFLAGS $devflags"
10420         if test "x$EXPERIMENTAL" != "xno"; then
10421     { $as_echo "$as_me:${as_lineno-$LINENO}: is developer build, enabling experimental modules implicitly, disable with --without-experimental-modules" >&5
10422 $as_echo "$as_me: is developer build, enabling experimental modules implicitly, disable with --without-experimental-modules" >&6;}
10423     EXPERIMENTAL=yes
10424   fi
10425 else
10426   devflags=""
10427   CFLAGS="$CFLAGS -DNDEBUG"
10428   INSTALLSTRIP=""
10429 fi
10430
10431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building with -DNDEBUG" >&5
10432 $as_echo_n "checking if building with -DNDEBUG... " >&6; }
10433 if echo "$CFLAGS" | grep '\-DNDEBUG' > /dev/null; then
10434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10435 $as_echo "yes" >&6; }
10436
10437 $as_echo "#define WITH_NDEBUG 1" >>confdefs.h
10438
10439 else
10440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10441 $as_echo "no" >&6; }
10442 fi
10443
10444 export EXPERIMENTAL
10445
10446 if test -d $srcdir/.git -a "x$GIT" = "xyes"; then
10447   RADIUSD_VERSION_COMMIT=`git log --pretty=format:'%h' -n 1`
10448
10449 cat >>confdefs.h <<_ACEOF
10450 #define RADIUSD_VERSION_COMMIT ${RADIUSD_VERSION_COMMIT}
10451 _ACEOF
10452
10453 fi
10454
10455
10456   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support in compiler" >&5
10457 $as_echo_n "checking for __thread support in compiler... " >&6; }
10458   if test "$cross_compiling" = yes; then :
10459   have_tls=no
10460 else
10461   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10462 /* end confdefs.h.  */
10463
10464         static __thread int val;
10465         int main(int argc, char **argv) {
10466           val = 0;
10467           return val;
10468         }
10469
10470
10471 _ACEOF
10472 if ac_fn_c_try_run "$LINENO"; then :
10473   have_tls=yes
10474 else
10475   have_tls=no
10476 fi
10477 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10478   conftest.$ac_objext conftest.beam conftest.$ac_ext
10479 fi
10480
10481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5
10482 $as_echo "$have_tls" >&6; }
10483   if test "x$have_tls" = "xyes"; then
10484
10485 $as_echo "#define TLS_STORAGE_CLASS __thread" >>confdefs.h
10486
10487   fi
10488
10489   if test "x$have_tls" = "xno"; then
10490     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __declspec(thread) support in compiler" >&5
10491 $as_echo_n "checking for __declspec(thread) support in compiler... " >&6; }
10492     if test "$cross_compiling" = yes; then :
10493   have_tls=no
10494 else
10495   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10496 /* end confdefs.h.  */
10497
10498           static _Thread_local int val;
10499           int main(int argc, char **argv) {
10500             val = 0;
10501             return val;
10502           }
10503
10504
10505 _ACEOF
10506 if ac_fn_c_try_run "$LINENO"; then :
10507   have_tls=yes
10508 else
10509   have_tls=no
10510 fi
10511 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10512   conftest.$ac_objext conftest.beam conftest.$ac_ext
10513 fi
10514
10515     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5
10516 $as_echo "$have_tls" >&6; }
10517     if test "x$have_tls" = "xyes"; then
10518
10519 $as_echo "#define TLS_STORAGE_CLASS __declspec(thread)" >>confdefs.h
10520
10521     fi
10522   fi
10523   if test "x$have_tls" = "xno"; then
10524     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Thread_local support in compiler" >&5
10525 $as_echo_n "checking for _Thread_local support in compiler... " >&6; }
10526     if test "$cross_compiling" = yes; then :
10527   have_tls=no
10528 else
10529   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10530 /* end confdefs.h.  */
10531
10532           static _Thread_local int val;
10533           int main(int argc, char **argv) {
10534             val = 0;
10535             return val;
10536           }
10537
10538
10539 _ACEOF
10540 if ac_fn_c_try_run "$LINENO"; then :
10541   have_tls=yes
10542 else
10543   have_tls=no
10544 fi
10545 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10546   conftest.$ac_objext conftest.beam conftest.$ac_ext
10547 fi
10548
10549     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5
10550 $as_echo "$have_tls" >&6; }
10551     if test "x$have_tls" = "xyes"; then
10552
10553 $as_echo "#define TLS_STORAGE_CLASS _Thread_local" >>confdefs.h
10554
10555     fi
10556   fi
10557
10558
10559   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_choose_expr support in compiler" >&5
10560 $as_echo_n "checking for __builtin_choose_expr support in compiler... " >&6; }
10561   if test "$cross_compiling" = yes; then :
10562   have_builtin_choose_expr=no
10563 else
10564   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10565 /* end confdefs.h.  */
10566
10567         int main(int argc, char **argv) {
10568           return __builtin_choose_expr(0, 1, 0);
10569         }
10570
10571
10572 _ACEOF
10573 if ac_fn_c_try_run "$LINENO"; then :
10574   have_builtin_choose_expr=yes
10575 else
10576   have_builtin_choose_expr=no
10577 fi
10578 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10579   conftest.$ac_objext conftest.beam conftest.$ac_ext
10580 fi
10581
10582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_choose_expr" >&5
10583 $as_echo "$have_builtin_choose_expr" >&6; }
10584   if test "x$have_builtin_choose_expr" = "xyes"; then
10585
10586 $as_echo "#define HAVE_BUILTIN_CHOOSE_EXPR 1" >>confdefs.h
10587
10588   fi
10589
10590
10591   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p support in compiler" >&5
10592 $as_echo_n "checking for __builtin_types_compatible_p support in compiler... " >&6; }
10593   if test "$cross_compiling" = yes; then :
10594   have_builtin_types_compatible_p=no
10595 else
10596   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10597 /* end confdefs.h.  */
10598
10599         int main(int argc, char **argv) {
10600           return !(__builtin_types_compatible_p(char *, char *));
10601         }
10602
10603
10604 _ACEOF
10605 if ac_fn_c_try_run "$LINENO"; then :
10606   have_builtin_types_compatible_p=yes
10607 else
10608   have_builtin_types_compatible_p=no
10609 fi
10610 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10611   conftest.$ac_objext conftest.beam conftest.$ac_ext
10612 fi
10613
10614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_types_compatible_p" >&5
10615 $as_echo "$have_builtin_types_compatible_p" >&6; }
10616   if test "x$have_builtin_types_compatible_p" = "xyes"; then
10617
10618 $as_echo "#define HAVE_BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
10619
10620   fi
10621
10622
10623   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64 support in compiler" >&5
10624 $as_echo_n "checking for __builtin_bswap64 support in compiler... " >&6; }
10625   if test "$cross_compiling" = yes; then :
10626   have_builtin_bswap64=no
10627 else
10628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10629 /* end confdefs.h.  */
10630
10631         int main(int argc, char **argv) {
10632           return (__builtin_bswap64(0));
10633         }
10634
10635
10636 _ACEOF
10637 if ac_fn_c_try_run "$LINENO"; then :
10638   have_builtin_bswap64=yes
10639 else
10640   have_builtin_bswap64=no
10641 fi
10642 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10643   conftest.$ac_objext conftest.beam conftest.$ac_ext
10644 fi
10645
10646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_bswap64" >&5
10647 $as_echo "$have_builtin_bswap64" >&6; }
10648   if test "x$have_builtin_bswap64" = "xyes"; then
10649
10650 $as_echo "#define HAVE_BUILTIN_BSWAP_64 1" >>confdefs.h
10651
10652   fi
10653
10654
10655
10656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc_set_memlimit in -ltalloc" >&5
10657 $as_echo_n "checking for talloc_set_memlimit in -ltalloc... " >&6; }
10658 if ${ac_cv_lib_talloc_talloc_set_memlimit+:} false; then :
10659   $as_echo_n "(cached) " >&6
10660 else
10661   ac_check_lib_save_LIBS=$LIBS
10662 LIBS="-ltalloc  $LIBS"
10663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10664 /* end confdefs.h.  */
10665
10666 /* Override any GCC internal prototype to avoid an error.
10667    Use char because int might match the return type of a GCC
10668    builtin and then its argument prototype would still apply.  */
10669 #ifdef __cplusplus
10670 extern "C"
10671 #endif
10672 char talloc_set_memlimit ();
10673 int
10674 main ()
10675 {
10676 return talloc_set_memlimit ();
10677   ;
10678   return 0;
10679 }
10680 _ACEOF
10681 if ac_fn_c_try_link "$LINENO"; then :
10682   ac_cv_lib_talloc_talloc_set_memlimit=yes
10683 else
10684   ac_cv_lib_talloc_talloc_set_memlimit=no
10685 fi
10686 rm -f core conftest.err conftest.$ac_objext \
10687     conftest$ac_exeext conftest.$ac_ext
10688 LIBS=$ac_check_lib_save_LIBS
10689 fi
10690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_talloc_talloc_set_memlimit" >&5
10691 $as_echo "$ac_cv_lib_talloc_talloc_set_memlimit" >&6; }
10692 if test "x$ac_cv_lib_talloc_talloc_set_memlimit" = xyes; then :
10693
10694
10695 $as_echo "#define HAVE_TALLOC_SET_MEMLIMIT 1" >>confdefs.h
10696
10697
10698
10699 fi
10700
10701
10702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
10703 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
10704 if ${ac_cv_lib_crypt_crypt+:} false; then :
10705   $as_echo_n "(cached) " >&6
10706 else
10707   ac_check_lib_save_LIBS=$LIBS
10708 LIBS="-lcrypt  $LIBS"
10709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10710 /* end confdefs.h.  */
10711
10712 /* Override any GCC internal prototype to avoid an error.
10713    Use char because int might match the return type of a GCC
10714    builtin and then its argument prototype would still apply.  */
10715 #ifdef __cplusplus
10716 extern "C"
10717 #endif
10718 char crypt ();
10719 int
10720 main ()
10721 {
10722 return crypt ();
10723   ;
10724   return 0;
10725 }
10726 _ACEOF
10727 if ac_fn_c_try_link "$LINENO"; then :
10728   ac_cv_lib_crypt_crypt=yes
10729 else
10730   ac_cv_lib_crypt_crypt=no
10731 fi
10732 rm -f core conftest.err conftest.$ac_objext \
10733     conftest$ac_exeext conftest.$ac_ext
10734 LIBS=$ac_check_lib_save_LIBS
10735 fi
10736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
10737 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
10738 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
10739   CRYPTLIB="-lcrypt"
10740
10741 fi
10742
10743
10744 if test "$CRYPTLIB" != ""; then
10745
10746 $as_echo "#define HAVE_CRYPT /**/" >>confdefs.h
10747
10748 else
10749   ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
10750 if test "x$ac_cv_func_crypt" = xyes; then :
10751
10752 $as_echo "#define HAVE_CRYPT /**/" >>confdefs.h
10753
10754 fi
10755
10756 fi
10757
10758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setkey in -lcipher" >&5
10759 $as_echo_n "checking for setkey in -lcipher... " >&6; }
10760 if ${ac_cv_lib_cipher_setkey+:} false; then :
10761   $as_echo_n "(cached) " >&6
10762 else
10763   ac_check_lib_save_LIBS=$LIBS
10764 LIBS="-lcipher  $LIBS"
10765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10766 /* end confdefs.h.  */
10767
10768 /* Override any GCC internal prototype to avoid an error.
10769    Use char because int might match the return type of a GCC
10770    builtin and then its argument prototype would still apply.  */
10771 #ifdef __cplusplus
10772 extern "C"
10773 #endif
10774 char setkey ();
10775 int
10776 main ()
10777 {
10778 return setkey ();
10779   ;
10780   return 0;
10781 }
10782 _ACEOF
10783 if ac_fn_c_try_link "$LINENO"; then :
10784   ac_cv_lib_cipher_setkey=yes
10785 else
10786   ac_cv_lib_cipher_setkey=no
10787 fi
10788 rm -f core conftest.err conftest.$ac_objext \
10789     conftest$ac_exeext conftest.$ac_ext
10790 LIBS=$ac_check_lib_save_LIBS
10791 fi
10792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cipher_setkey" >&5
10793 $as_echo "$ac_cv_lib_cipher_setkey" >&6; }
10794 if test "x$ac_cv_lib_cipher_setkey" = xyes; then :
10795   CRYPTLIB="${CRYPTLIB} -lcipher"
10796
10797 fi
10798
10799
10800
10801 execinfo_lib_dir=
10802
10803 # Check whether --with-execinfo-lib-dir was given.
10804 if test "${with_execinfo_lib_dir+set}" = set; then :
10805   withval=$with_execinfo_lib_dir;  case "$withval" in
10806     no)
10807         as_fn_error $? "Need execinfo-lib-dir" "$LINENO" 5
10808         ;;
10809     yes)
10810         ;;
10811     *)
10812         execinfo_lib_dir="$withval"
10813         ;;
10814   esac
10815
10816 fi
10817
10818
10819 execinfo_include_dir=
10820
10821 # Check whether --with-execinfo-include-dir was given.
10822 if test "${with_execinfo_include_dir+set}" = set; then :
10823   withval=$with_execinfo_include_dir;  case "$withval" in
10824     no)
10825         as_fn_error $? "Need execinfo-include-dir" "$LINENO" 5
10826         ;;
10827     yes)
10828         ;;
10829     *)
10830         execinfo_include_dir="$withval"
10831         ;;
10832   esac
10833
10834 fi
10835
10836
10837 smart_try_dir=$execinfo_include_dir
10838
10839
10840 ac_safe=`echo "execinfo.h" | sed 'y%./+-%__pm%'`
10841 old_CPPFLAGS="$CPPFLAGS"
10842 smart_include=
10843 smart_include_dir="/usr/local/include /opt/include"
10844
10845 _smart_try_dir=
10846 _smart_include_dir=
10847
10848 for _prefix in $smart_prefix ""; do
10849   for _dir in $smart_try_dir; do
10850     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
10851   done
10852
10853   for _dir in $smart_include_dir; do
10854     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
10855   done
10856 done
10857
10858 if test "x$_smart_try_dir" != "x"; then
10859   for try in $_smart_try_dir; do
10860     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h in $try" >&5
10861 $as_echo_n "checking for execinfo.h in $try... " >&6; }
10862     CPPFLAGS="-isystem $try $old_CPPFLAGS"
10863     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10864 /* end confdefs.h.  */
10865
10866                     #include <execinfo.h>
10867 int
10868 main ()
10869 {
10870 int a = 1;
10871   ;
10872   return 0;
10873 }
10874 _ACEOF
10875 if ac_fn_c_try_compile "$LINENO"; then :
10876
10877                      smart_include="-isystem $try"
10878                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10879 $as_echo "yes" >&6; }
10880                      break
10881
10882 else
10883
10884                      smart_include=
10885                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10886 $as_echo "no" >&6; }
10887
10888 fi
10889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10890   done
10891   CPPFLAGS="$old_CPPFLAGS"
10892 fi
10893
10894 if test "x$smart_include" = "x"; then
10895   for _prefix in $smart_prefix; do
10896     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/execinfo.h" >&5
10897 $as_echo_n "checking for ${_prefix}/execinfo.h... " >&6; }
10898
10899     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10900 /* end confdefs.h.  */
10901
10902                     #include <execinfo.h>
10903 int
10904 main ()
10905 {
10906 int a = 1;
10907   ;
10908   return 0;
10909 }
10910 _ACEOF
10911 if ac_fn_c_try_compile "$LINENO"; then :
10912
10913                      smart_include="-isystem ${_prefix}/"
10914                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10915 $as_echo "yes" >&6; }
10916                      break
10917
10918 else
10919
10920                      smart_include=
10921                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10922 $as_echo "no" >&6; }
10923
10924 fi
10925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10926   done
10927 fi
10928
10929 if test "x$smart_include" = "x"; then
10930     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h" >&5
10931 $as_echo_n "checking for execinfo.h... " >&6; }
10932
10933     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10934 /* end confdefs.h.  */
10935
10936                     #include <execinfo.h>
10937 int
10938 main ()
10939 {
10940 int a = 1;
10941   ;
10942   return 0;
10943 }
10944 _ACEOF
10945 if ac_fn_c_try_compile "$LINENO"; then :
10946
10947                      smart_include=" "
10948                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10949 $as_echo "yes" >&6; }
10950                      break
10951
10952 else
10953
10954                      smart_include=
10955                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10956 $as_echo "no" >&6; }
10957
10958 fi
10959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10960 fi
10961
10962 if test "x$smart_include" = "x"; then
10963
10964   for prefix in $smart_prefix; do
10965
10966
10967 if test "x$LOCATE" != "x"; then
10968         DIRS=
10969   file="${_prefix}/${1}"
10970
10971   for x in `${LOCATE} $file 2>/dev/null`; do
10972                                         base=`echo $x | sed "s%/${file}%%"`
10973     if test "x$x" = "x$base"; then
10974       continue;
10975     fi
10976
10977     dir=`${DIRNAME} $x 2>/dev/null`
10978                 exclude=`echo ${dir} | ${GREP} /home`
10979     if test "x$exclude" != "x"; then
10980       continue
10981     fi
10982
10983                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
10984     if test "x$already" = "x"; then
10985       DIRS="$DIRS $dir"
10986     fi
10987   done
10988 fi
10989
10990 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
10991
10992   done
10993
10994
10995 if test "x$LOCATE" != "x"; then
10996         DIRS=
10997   file=execinfo.h
10998
10999   for x in `${LOCATE} $file 2>/dev/null`; do
11000                                         base=`echo $x | sed "s%/${file}%%"`
11001     if test "x$x" = "x$base"; then
11002       continue;
11003     fi
11004
11005     dir=`${DIRNAME} $x 2>/dev/null`
11006                 exclude=`echo ${dir} | ${GREP} /home`
11007     if test "x$exclude" != "x"; then
11008       continue
11009     fi
11010
11011                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
11012     if test "x$already" = "x"; then
11013       DIRS="$DIRS $dir"
11014     fi
11015   done
11016 fi
11017
11018 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
11019
11020
11021   for try in $_smart_include_dir; do
11022     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h in $try" >&5
11023 $as_echo_n "checking for execinfo.h in $try... " >&6; }
11024     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11025     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11026 /* end confdefs.h.  */
11027
11028                     #include <execinfo.h>
11029 int
11030 main ()
11031 {
11032 int a = 1;
11033   ;
11034   return 0;
11035 }
11036 _ACEOF
11037 if ac_fn_c_try_compile "$LINENO"; then :
11038
11039                      smart_include="-isystem $try"
11040                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11041 $as_echo "yes" >&6; }
11042                      break
11043
11044 else
11045
11046                      smart_include=
11047                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11048 $as_echo "no" >&6; }
11049
11050 fi
11051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11052   done
11053   CPPFLAGS="$old_CPPFLAGS"
11054 fi
11055
11056 if test "x$smart_include" != "x"; then
11057   eval "ac_cv_header_$ac_safe=yes"
11058   CPPFLAGS="$smart_include $old_CPPFLAGS"
11059   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
11060 fi
11061
11062 smart_prefix=
11063
11064 if test "x$ac_cv_header_execinfo_h" = "xyes"; then
11065   smart_try_dir=$execinfo_lib_dir
11066
11067
11068 sm_lib_safe=`echo "execinfo" | sed 'y%./+-%__p_%'`
11069 sm_func_safe=`echo "backtrace_symbols" | sed 'y%./+-%__p_%'`
11070
11071 old_LIBS="$LIBS"
11072 old_CPPFLAGS="$CPPFLAGS"
11073 smart_lib=
11074 smart_ldflags=
11075 smart_lib_dir=
11076
11077 if test "x$smart_try_dir" != "x"; then
11078   for try in $smart_try_dir; do
11079     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo in $try" >&5
11080 $as_echo_n "checking for backtrace_symbols in -lexecinfo in $try... " >&6; }
11081     LIBS="-lexecinfo $old_LIBS"
11082     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
11083     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11084 /* end confdefs.h.  */
11085 extern char backtrace_symbols();
11086 int
11087 main ()
11088 {
11089 backtrace_symbols()
11090   ;
11091   return 0;
11092 }
11093 _ACEOF
11094 if ac_fn_c_try_link "$LINENO"; then :
11095
11096                  smart_lib="-lexecinfo"
11097                  smart_ldflags="-L$try -Wl,-rpath,$try"
11098                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11099 $as_echo "yes" >&6; }
11100                  break
11101
11102 else
11103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11104 $as_echo "no" >&6; }
11105 fi
11106 rm -f core conftest.err conftest.$ac_objext \
11107     conftest$ac_exeext conftest.$ac_ext
11108   done
11109   LIBS="$old_LIBS"
11110   CPPFLAGS="$old_CPPFLAGS"
11111 fi
11112
11113 if test "x$smart_lib" = "x"; then
11114   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo" >&5
11115 $as_echo_n "checking for backtrace_symbols in -lexecinfo... " >&6; }
11116   LIBS="-lexecinfo $old_LIBS"
11117   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11118 /* end confdefs.h.  */
11119 extern char backtrace_symbols();
11120 int
11121 main ()
11122 {
11123 backtrace_symbols()
11124   ;
11125   return 0;
11126 }
11127 _ACEOF
11128 if ac_fn_c_try_link "$LINENO"; then :
11129
11130                 smart_lib="-lexecinfo"
11131                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11132 $as_echo "yes" >&6; }
11133
11134 else
11135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11136 $as_echo "no" >&6; }
11137 fi
11138 rm -f core conftest.err conftest.$ac_objext \
11139     conftest$ac_exeext conftest.$ac_ext
11140   LIBS="$old_LIBS"
11141 fi
11142
11143 if test "x$smart_lib" = "x"; then
11144
11145
11146 if test "x$LOCATE" != "x"; then
11147         DIRS=
11148   file=libexecinfo${libltdl_cv_shlibext}
11149
11150   for x in `${LOCATE} $file 2>/dev/null`; do
11151                                         base=`echo $x | sed "s%/${file}%%"`
11152     if test "x$x" = "x$base"; then
11153       continue;
11154     fi
11155
11156     dir=`${DIRNAME} $x 2>/dev/null`
11157                 exclude=`echo ${dir} | ${GREP} /home`
11158     if test "x$exclude" != "x"; then
11159       continue
11160     fi
11161
11162                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
11163     if test "x$already" = "x"; then
11164       DIRS="$DIRS $dir"
11165     fi
11166   done
11167 fi
11168
11169 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
11170
11171
11172
11173 if test "x$LOCATE" != "x"; then
11174         DIRS=
11175   file=libexecinfo.a
11176
11177   for x in `${LOCATE} $file 2>/dev/null`; do
11178                                         base=`echo $x | sed "s%/${file}%%"`
11179     if test "x$x" = "x$base"; then
11180       continue;
11181     fi
11182
11183     dir=`${DIRNAME} $x 2>/dev/null`
11184                 exclude=`echo ${dir} | ${GREP} /home`
11185     if test "x$exclude" != "x"; then
11186       continue
11187     fi
11188
11189                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
11190     if test "x$already" = "x"; then
11191       DIRS="$DIRS $dir"
11192     fi
11193   done
11194 fi
11195
11196 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
11197
11198
11199   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
11200     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo in $try" >&5
11201 $as_echo_n "checking for backtrace_symbols in -lexecinfo in $try... " >&6; }
11202     LIBS="-lexecinfo $old_LIBS"
11203     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
11204     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11205 /* end confdefs.h.  */
11206 extern char backtrace_symbols();
11207 int
11208 main ()
11209 {
11210 backtrace_symbols()
11211   ;
11212   return 0;
11213 }
11214 _ACEOF
11215 if ac_fn_c_try_link "$LINENO"; then :
11216
11217                   smart_lib="-lexecinfo"
11218                   smart_ldflags="-L$try -Wl,-rpath,$try"
11219                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11220 $as_echo "yes" >&6; }
11221                   break
11222
11223 else
11224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11225 $as_echo "no" >&6; }
11226 fi
11227 rm -f core conftest.err conftest.$ac_objext \
11228     conftest$ac_exeext conftest.$ac_ext
11229   done
11230   LIBS="$old_LIBS"
11231   CPPFLAGS="$old_CPPFLAGS"
11232 fi
11233
11234 if test "x$smart_lib" != "x"; then
11235   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
11236   LIBS="$smart_ldflags $smart_lib $old_LIBS"
11237   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
11238 fi
11239
11240   if test "x$ac_cv_lib_execinfo_backtrace_symbols" != "xyes"; then
11241         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if execinfo provided as part of libc" >&5
11242 $as_echo_n "checking if execinfo provided as part of libc... " >&6; }
11243     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11244 /* end confdefs.h.  */
11245
11246         #include <execinfo.h>
11247
11248 int
11249 main ()
11250 {
11251
11252         void *sym[1];
11253         backtrace_symbols(&sym, sizeof(sym))
11254   ;
11255   return 0;
11256 }
11257 _ACEOF
11258 if ac_fn_c_try_link "$LINENO"; then :
11259
11260         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11261 $as_echo "yes" >&6; }
11262         ac_cv_lib_execinfo_backtrace_symbols="yes"
11263
11264 else
11265
11266         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11267 $as_echo "no" >&6; }
11268
11269
11270 fi
11271 rm -f core conftest.err conftest.$ac_objext \
11272     conftest$ac_exeext conftest.$ac_ext
11273   fi
11274
11275   if test "x$ac_cv_lib_execinfo_backtrace_symbols" = "xyes"; then
11276
11277 $as_echo "#define HAVE_EXECINFO 1" >>confdefs.h
11278
11279   fi
11280 fi
11281
11282 PCRE=yes
11283
11284 # Check whether --with-pcre was given.
11285 if test "${with_pcre+set}" = set; then :
11286   withval=$with_pcre;  case "$withval" in
11287     no)
11288     PCRE=no
11289         ;;
11290     yes)
11291     PCRE=yes
11292         ;;
11293   esac
11294
11295 fi
11296
11297
11298 pcre_lib_dir=
11299
11300 # Check whether --with-pcre-lib-dir was given.
11301 if test "${with_pcre_lib_dir+set}" = set; then :
11302   withval=$with_pcre_lib_dir;  case "$withval" in
11303     no)
11304         as_fn_error $? "Need pcre-lib-dir" "$LINENO" 5
11305         ;;
11306     yes)
11307         ;;
11308     *)
11309         pcre_lib_dir="$withval"
11310         ;;
11311   esac
11312
11313 fi
11314
11315
11316 pcre_include_dir=
11317
11318 # Check whether --with-pcre-include-dir was given.
11319 if test "${with_pcre_include_dir+set}" = set; then :
11320   withval=$with_pcre_include_dir;  case "$withval" in
11321     no)
11322         as_fn_error $? "Need pcre-include-dir" "$LINENO" 5
11323         ;;
11324     yes)
11325         ;;
11326     *)
11327         pcre_include_dir="$withval"
11328         ;;
11329   esac
11330
11331 fi
11332
11333
11334 REGEX=
11335
11336 # Check whether --with-regex was given.
11337 if test "${with_regex+set}" = set; then :
11338   withval=$with_regex;  case "$withval" in
11339     no)
11340         REGEX=no
11341         ;;
11342     *)
11343         ;;
11344   esac
11345
11346 fi
11347
11348
11349 if test "x$REGEX" != "xno" && test "x$PCRE" != "xno"; then
11350   smart_try_dir=$pcre_include_dir
11351
11352
11353 ac_safe=`echo "pcre.h" | sed 'y%./+-%__pm%'`
11354 old_CPPFLAGS="$CPPFLAGS"
11355 smart_include=
11356 smart_include_dir="/usr/local/include /opt/include"
11357
11358 _smart_try_dir=
11359 _smart_include_dir=
11360
11361 for _prefix in $smart_prefix ""; do
11362   for _dir in $smart_try_dir; do
11363     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
11364   done
11365
11366   for _dir in $smart_include_dir; do
11367     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
11368   done
11369 done
11370
11371 if test "x$_smart_try_dir" != "x"; then
11372   for try in $_smart_try_dir; do
11373     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre.h in $try" >&5
11374 $as_echo_n "checking for pcre.h in $try... " >&6; }
11375     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11376     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11377 /* end confdefs.h.  */
11378
11379                     #include <pcre.h>
11380 int
11381 main ()
11382 {
11383 int a = 1;
11384   ;
11385   return 0;
11386 }
11387 _ACEOF
11388 if ac_fn_c_try_compile "$LINENO"; then :
11389
11390                      smart_include="-isystem $try"
11391                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11392 $as_echo "yes" >&6; }
11393                      break
11394
11395 else
11396
11397                      smart_include=
11398                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11399 $as_echo "no" >&6; }
11400
11401 fi
11402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11403   done
11404   CPPFLAGS="$old_CPPFLAGS"
11405 fi
11406
11407 if test "x$smart_include" = "x"; then
11408   for _prefix in $smart_prefix; do
11409     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/pcre.h" >&5
11410 $as_echo_n "checking for ${_prefix}/pcre.h... " >&6; }
11411
11412     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11413 /* end confdefs.h.  */
11414
11415                     #include <pcre.h>
11416 int
11417 main ()
11418 {
11419 int a = 1;
11420   ;
11421   return 0;
11422 }
11423 _ACEOF
11424 if ac_fn_c_try_compile "$LINENO"; then :
11425
11426                      smart_include="-isystem ${_prefix}/"
11427                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11428 $as_echo "yes" >&6; }
11429                      break
11430
11431 else
11432
11433                      smart_include=
11434                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11435 $as_echo "no" >&6; }
11436
11437 fi
11438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11439   done
11440 fi
11441
11442 if test "x$smart_include" = "x"; then
11443     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre.h" >&5
11444 $as_echo_n "checking for pcre.h... " >&6; }
11445
11446     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11447 /* end confdefs.h.  */
11448
11449                     #include <pcre.h>
11450 int
11451 main ()
11452 {
11453 int a = 1;
11454   ;
11455   return 0;
11456 }
11457 _ACEOF
11458 if ac_fn_c_try_compile "$LINENO"; then :
11459
11460                      smart_include=" "
11461                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11462 $as_echo "yes" >&6; }
11463                      break
11464
11465 else
11466
11467                      smart_include=
11468                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11469 $as_echo "no" >&6; }
11470
11471 fi
11472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11473 fi
11474
11475 if test "x$smart_include" = "x"; then
11476
11477   for prefix in $smart_prefix; do
11478
11479
11480 if test "x$LOCATE" != "x"; then
11481         DIRS=
11482   file="${_prefix}/${1}"
11483
11484   for x in `${LOCATE} $file 2>/dev/null`; do
11485                                         base=`echo $x | sed "s%/${file}%%"`
11486     if test "x$x" = "x$base"; then
11487       continue;
11488     fi
11489
11490     dir=`${DIRNAME} $x 2>/dev/null`
11491                 exclude=`echo ${dir} | ${GREP} /home`
11492     if test "x$exclude" != "x"; then
11493       continue
11494     fi
11495
11496                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
11497     if test "x$already" = "x"; then
11498       DIRS="$DIRS $dir"
11499     fi
11500   done
11501 fi
11502
11503 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
11504
11505   done
11506
11507
11508 if test "x$LOCATE" != "x"; then
11509         DIRS=
11510   file=pcre.h
11511
11512   for x in `${LOCATE} $file 2>/dev/null`; do
11513                                         base=`echo $x | sed "s%/${file}%%"`
11514     if test "x$x" = "x$base"; then
11515       continue;
11516     fi
11517
11518     dir=`${DIRNAME} $x 2>/dev/null`
11519                 exclude=`echo ${dir} | ${GREP} /home`
11520     if test "x$exclude" != "x"; then
11521       continue
11522     fi
11523
11524                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
11525     if test "x$already" = "x"; then
11526       DIRS="$DIRS $dir"
11527     fi
11528   done
11529 fi
11530
11531 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
11532
11533
11534   for try in $_smart_include_dir; do
11535     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre.h in $try" >&5
11536 $as_echo_n "checking for pcre.h in $try... " >&6; }
11537     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11538     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11539 /* end confdefs.h.  */
11540
11541                     #include <pcre.h>
11542 int
11543 main ()
11544 {
11545 int a = 1;
11546   ;
11547   return 0;
11548 }
11549 _ACEOF
11550 if ac_fn_c_try_compile "$LINENO"; then :
11551
11552                      smart_include="-isystem $try"
11553                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11554 $as_echo "yes" >&6; }
11555                      break
11556
11557 else
11558
11559                      smart_include=
11560                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11561 $as_echo "no" >&6; }
11562
11563 fi
11564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11565   done
11566   CPPFLAGS="$old_CPPFLAGS"
11567 fi
11568
11569 if test "x$smart_include" != "x"; then
11570   eval "ac_cv_header_$ac_safe=yes"
11571   CPPFLAGS="$smart_include $old_CPPFLAGS"
11572   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
11573 fi
11574
11575 smart_prefix=
11576
11577   if test "x$ac_cv_header_pcre_h" = "xyes"; then
11578     smart_try_dir=$pcre_lib_dir
11579
11580
11581 sm_lib_safe=`echo "pcre" | sed 'y%./+-%__p_%'`
11582 sm_func_safe=`echo "pcre_compile" | sed 'y%./+-%__p_%'`
11583
11584 old_LIBS="$LIBS"
11585 old_CPPFLAGS="$CPPFLAGS"
11586 smart_lib=
11587 smart_ldflags=
11588 smart_lib_dir=
11589
11590 if test "x$smart_try_dir" != "x"; then
11591   for try in $smart_try_dir; do
11592     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre in $try" >&5
11593 $as_echo_n "checking for pcre_compile in -lpcre in $try... " >&6; }
11594     LIBS="-lpcre $old_LIBS"
11595     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
11596     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11597 /* end confdefs.h.  */
11598 extern char pcre_compile();
11599 int
11600 main ()
11601 {
11602 pcre_compile()
11603   ;
11604   return 0;
11605 }
11606 _ACEOF
11607 if ac_fn_c_try_link "$LINENO"; then :
11608
11609                  smart_lib="-lpcre"
11610                  smart_ldflags="-L$try -Wl,-rpath,$try"
11611                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11612 $as_echo "yes" >&6; }
11613                  break
11614
11615 else
11616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11617 $as_echo "no" >&6; }
11618 fi
11619 rm -f core conftest.err conftest.$ac_objext \
11620     conftest$ac_exeext conftest.$ac_ext
11621   done
11622   LIBS="$old_LIBS"
11623   CPPFLAGS="$old_CPPFLAGS"
11624 fi
11625
11626 if test "x$smart_lib" = "x"; then
11627   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre" >&5
11628 $as_echo_n "checking for pcre_compile in -lpcre... " >&6; }
11629   LIBS="-lpcre $old_LIBS"
11630   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11631 /* end confdefs.h.  */
11632 extern char pcre_compile();
11633 int
11634 main ()
11635 {
11636 pcre_compile()
11637   ;
11638   return 0;
11639 }
11640 _ACEOF
11641 if ac_fn_c_try_link "$LINENO"; then :
11642
11643                 smart_lib="-lpcre"
11644                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11645 $as_echo "yes" >&6; }
11646
11647 else
11648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11649 $as_echo "no" >&6; }
11650 fi
11651 rm -f core conftest.err conftest.$ac_objext \
11652     conftest$ac_exeext conftest.$ac_ext
11653   LIBS="$old_LIBS"
11654 fi
11655
11656 if test "x$smart_lib" = "x"; then
11657
11658
11659 if test "x$LOCATE" != "x"; then
11660         DIRS=
11661   file=libpcre${libltdl_cv_shlibext}
11662
11663   for x in `${LOCATE} $file 2>/dev/null`; do
11664                                         base=`echo $x | sed "s%/${file}%%"`
11665     if test "x$x" = "x$base"; then
11666       continue;
11667     fi
11668
11669     dir=`${DIRNAME} $x 2>/dev/null`
11670                 exclude=`echo ${dir} | ${GREP} /home`
11671     if test "x$exclude" != "x"; then
11672       continue
11673     fi
11674
11675                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
11676     if test "x$already" = "x"; then
11677       DIRS="$DIRS $dir"
11678     fi
11679   done
11680 fi
11681
11682 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
11683
11684
11685
11686 if test "x$LOCATE" != "x"; then
11687         DIRS=
11688   file=libpcre.a
11689
11690   for x in `${LOCATE} $file 2>/dev/null`; do
11691                                         base=`echo $x | sed "s%/${file}%%"`
11692     if test "x$x" = "x$base"; then
11693       continue;
11694     fi
11695
11696     dir=`${DIRNAME} $x 2>/dev/null`
11697                 exclude=`echo ${dir} | ${GREP} /home`
11698     if test "x$exclude" != "x"; then
11699       continue
11700     fi
11701
11702                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
11703     if test "x$already" = "x"; then
11704       DIRS="$DIRS $dir"
11705     fi
11706   done
11707 fi
11708
11709 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
11710
11711
11712   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
11713     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre in $try" >&5
11714 $as_echo_n "checking for pcre_compile in -lpcre in $try... " >&6; }
11715     LIBS="-lpcre $old_LIBS"
11716     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
11717     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11718 /* end confdefs.h.  */
11719 extern char pcre_compile();
11720 int
11721 main ()
11722 {
11723 pcre_compile()
11724   ;
11725   return 0;
11726 }
11727 _ACEOF
11728 if ac_fn_c_try_link "$LINENO"; then :
11729
11730                   smart_lib="-lpcre"
11731                   smart_ldflags="-L$try -Wl,-rpath,$try"
11732                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11733 $as_echo "yes" >&6; }
11734                   break
11735
11736 else
11737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11738 $as_echo "no" >&6; }
11739 fi
11740 rm -f core conftest.err conftest.$ac_objext \
11741     conftest$ac_exeext conftest.$ac_ext
11742   done
11743   LIBS="$old_LIBS"
11744   CPPFLAGS="$old_CPPFLAGS"
11745 fi
11746
11747 if test "x$smart_lib" != "x"; then
11748   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
11749   LIBS="$smart_ldflags $smart_lib $old_LIBS"
11750   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
11751 fi
11752
11753     if test "x$ac_cv_lib_pcre_pcre_compile" = "xyes"; then
11754       REGEX=yes
11755
11756 $as_echo "#define HAVE_PCRE 1" >>confdefs.h
11757
11758
11759 $as_echo "#define HAVE_BINSAFE_REGEX 1" >>confdefs.h
11760
11761     fi
11762   fi
11763 fi
11764
11765 if test "x$REGEX" = "x"; then
11766   smart_try_dir=
11767
11768
11769 ac_safe=`echo "regex.h" | sed 'y%./+-%__pm%'`
11770 old_CPPFLAGS="$CPPFLAGS"
11771 smart_include=
11772 smart_include_dir="/usr/local/include /opt/include"
11773
11774 _smart_try_dir=
11775 _smart_include_dir=
11776
11777 for _prefix in $smart_prefix ""; do
11778   for _dir in $smart_try_dir; do
11779     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
11780   done
11781
11782   for _dir in $smart_include_dir; do
11783     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
11784   done
11785 done
11786
11787 if test "x$_smart_try_dir" != "x"; then
11788   for try in $_smart_try_dir; do
11789     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h in $try" >&5
11790 $as_echo_n "checking for regex.h in $try... " >&6; }
11791     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11792     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11793 /* end confdefs.h.  */
11794
11795                     #include <regex.h>
11796 int
11797 main ()
11798 {
11799 int a = 1;
11800   ;
11801   return 0;
11802 }
11803 _ACEOF
11804 if ac_fn_c_try_compile "$LINENO"; then :
11805
11806                      smart_include="-isystem $try"
11807                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11808 $as_echo "yes" >&6; }
11809                      break
11810
11811 else
11812
11813                      smart_include=
11814                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11815 $as_echo "no" >&6; }
11816
11817 fi
11818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11819   done
11820   CPPFLAGS="$old_CPPFLAGS"
11821 fi
11822
11823 if test "x$smart_include" = "x"; then
11824   for _prefix in $smart_prefix; do
11825     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/regex.h" >&5
11826 $as_echo_n "checking for ${_prefix}/regex.h... " >&6; }
11827
11828     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11829 /* end confdefs.h.  */
11830
11831                     #include <regex.h>
11832 int
11833 main ()
11834 {
11835 int a = 1;
11836   ;
11837   return 0;
11838 }
11839 _ACEOF
11840 if ac_fn_c_try_compile "$LINENO"; then :
11841
11842                      smart_include="-isystem ${_prefix}/"
11843                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11844 $as_echo "yes" >&6; }
11845                      break
11846
11847 else
11848
11849                      smart_include=
11850                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11851 $as_echo "no" >&6; }
11852
11853 fi
11854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11855   done
11856 fi
11857
11858 if test "x$smart_include" = "x"; then
11859     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h" >&5
11860 $as_echo_n "checking for regex.h... " >&6; }
11861
11862     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11863 /* end confdefs.h.  */
11864
11865                     #include <regex.h>
11866 int
11867 main ()
11868 {
11869 int a = 1;
11870   ;
11871   return 0;
11872 }
11873 _ACEOF
11874 if ac_fn_c_try_compile "$LINENO"; then :
11875
11876                      smart_include=" "
11877                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11878 $as_echo "yes" >&6; }
11879                      break
11880
11881 else
11882
11883                      smart_include=
11884                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11885 $as_echo "no" >&6; }
11886
11887 fi
11888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11889 fi
11890
11891 if test "x$smart_include" = "x"; then
11892
11893   for prefix in $smart_prefix; do
11894
11895
11896 if test "x$LOCATE" != "x"; then
11897         DIRS=
11898   file="${_prefix}/${1}"
11899
11900   for x in `${LOCATE} $file 2>/dev/null`; do
11901                                         base=`echo $x | sed "s%/${file}%%"`
11902     if test "x$x" = "x$base"; then
11903       continue;
11904     fi
11905
11906     dir=`${DIRNAME} $x 2>/dev/null`
11907                 exclude=`echo ${dir} | ${GREP} /home`
11908     if test "x$exclude" != "x"; then
11909       continue
11910     fi
11911
11912                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
11913     if test "x$already" = "x"; then
11914       DIRS="$DIRS $dir"
11915     fi
11916   done
11917 fi
11918
11919 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
11920
11921   done
11922
11923
11924 if test "x$LOCATE" != "x"; then
11925         DIRS=
11926   file=regex.h
11927
11928   for x in `${LOCATE} $file 2>/dev/null`; do
11929                                         base=`echo $x | sed "s%/${file}%%"`
11930     if test "x$x" = "x$base"; then
11931       continue;
11932     fi
11933
11934     dir=`${DIRNAME} $x 2>/dev/null`
11935                 exclude=`echo ${dir} | ${GREP} /home`
11936     if test "x$exclude" != "x"; then
11937       continue
11938     fi
11939
11940                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
11941     if test "x$already" = "x"; then
11942       DIRS="$DIRS $dir"
11943     fi
11944   done
11945 fi
11946
11947 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
11948
11949
11950   for try in $_smart_include_dir; do
11951     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h in $try" >&5
11952 $as_echo_n "checking for regex.h in $try... " >&6; }
11953     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11954     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11955 /* end confdefs.h.  */
11956
11957                     #include <regex.h>
11958 int
11959 main ()
11960 {
11961 int a = 1;
11962   ;
11963   return 0;
11964 }
11965 _ACEOF
11966 if ac_fn_c_try_compile "$LINENO"; then :
11967
11968                      smart_include="-isystem $try"
11969                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11970 $as_echo "yes" >&6; }
11971                      break
11972
11973 else
11974
11975                      smart_include=
11976                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11977 $as_echo "no" >&6; }
11978
11979 fi
11980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11981   done
11982   CPPFLAGS="$old_CPPFLAGS"
11983 fi
11984
11985 if test "x$smart_include" != "x"; then
11986   eval "ac_cv_header_$ac_safe=yes"
11987   CPPFLAGS="$smart_include $old_CPPFLAGS"
11988   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
11989 fi
11990
11991 smart_prefix=
11992
11993   if test "x$ac_cv_header_regex_h" = "xyes"; then
11994     REGEX=yes
11995     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extended regular expressions" >&5
11996 $as_echo_n "checking for extended regular expressions... " >&6; }
11997     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11998 /* end confdefs.h.  */
11999
12000         #include <regex.h>
12001         #ifdef REG_EXTENDED
12002         yes
12003         #endif
12004
12005 _ACEOF
12006 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12007   $EGREP "yes" >/dev/null 2>&1; then :
12008
12009         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12010 $as_echo "yes" >&6; }
12011
12012 $as_echo "#define HAVE_REG_EXTENDED 1" >>confdefs.h
12013
12014
12015 else
12016
12017         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12018 $as_echo "no" >&6; }
12019
12020
12021 fi
12022 rm -f conftest*
12023
12024
12025                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regcomp in -lregex" >&5
12026 $as_echo_n "checking for regcomp in -lregex... " >&6; }
12027 if ${ac_cv_lib_regex_regcomp+:} false; then :
12028   $as_echo_n "(cached) " >&6
12029 else
12030   ac_check_lib_save_LIBS=$LIBS
12031 LIBS="-lregex  $LIBS"
12032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12033 /* end confdefs.h.  */
12034
12035 /* Override any GCC internal prototype to avoid an error.
12036    Use char because int might match the return type of a GCC
12037    builtin and then its argument prototype would still apply.  */
12038 #ifdef __cplusplus
12039 extern "C"
12040 #endif
12041 char regcomp ();
12042 int
12043 main ()
12044 {
12045 return regcomp ();
12046   ;
12047   return 0;
12048 }
12049 _ACEOF
12050 if ac_fn_c_try_link "$LINENO"; then :
12051   ac_cv_lib_regex_regcomp=yes
12052 else
12053   ac_cv_lib_regex_regcomp=no
12054 fi
12055 rm -f core conftest.err conftest.$ac_objext \
12056     conftest$ac_exeext conftest.$ac_ext
12057 LIBS=$ac_check_lib_save_LIBS
12058 fi
12059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_regex_regcomp" >&5
12060 $as_echo "$ac_cv_lib_regex_regcomp" >&6; }
12061 if test "x$ac_cv_lib_regex_regcomp" = xyes; then :
12062
12063         LIBS="-lregex $LIBS"
12064
12065
12066 fi
12067
12068
12069                     for ac_func in \
12070       regncomp \
12071       regnexec
12072
12073 do :
12074   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12075 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12076 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12077   cat >>confdefs.h <<_ACEOF
12078 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12079 _ACEOF
12080
12081 fi
12082 done
12083
12084     if test x"$ac_cv_func_regncomp" = x"yes" && test  x"$ac_cv_func_regnexec" = x"yes"; then
12085
12086 $as_echo "#define HAVE_BINSAFE_REGEX 1" >>confdefs.h
12087
12088     fi
12089   fi
12090 fi
12091
12092 if test "x$REGEX" = "xyes"; then
12093
12094 $as_echo "#define HAVE_REGEX 1" >>confdefs.h
12095
12096 fi
12097
12098
12099 $as_echo "#define GNUSTYLE 1" >>confdefs.h
12100
12101
12102
12103 $as_echo "#define SYSVSTYLE 2" >>confdefs.h
12104
12105
12106
12107 $as_echo "#define BSDSTYLE 3" >>confdefs.h
12108
12109
12110 gethostbyaddrrstyle=""
12111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyaddr_r() syntax" >&5
12112 $as_echo_n "checking gethostbyaddr_r() syntax... " >&6; }
12113 case "$host" in
12114   *-freebsd*)
12115                             ac_fn_c_check_decl "$LINENO" "gethostbyaddr_r" "ac_cv_have_decl_gethostbyaddr_r" "
12116         #ifdef HAVE_NETDB_H
12117         #include <netdb.h>
12118         #endif
12119
12120 "
12121 if test "x$ac_cv_have_decl_gethostbyaddr_r" = xyes; then :
12122   ac_have_decl=1
12123 else
12124   ac_have_decl=0
12125 fi
12126
12127 cat >>confdefs.h <<_ACEOF
12128 #define HAVE_DECL_GETHOSTBYADDR_R $ac_have_decl
12129 _ACEOF
12130 if test $ac_have_decl = 1; then :
12131
12132 else
12133
12134
12135 $as_echo "#define GETHOSTBYADDRRSTYLE BSDSTYLE" >>confdefs.h
12136
12137         gethostbyaddrrstyle=BSD
12138         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: FreeBSD overridden to BSD-style" >&5
12139 $as_echo "$as_me: WARNING: FreeBSD overridden to BSD-style" >&2;}
12140
12141 fi
12142
12143     ;;
12144 esac
12145
12146 if test "x$gethostbyaddrrstyle" = "x"; then
12147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12148 /* end confdefs.h.  */
12149
12150       #include <stdio.h>
12151       #include <netdb.h>
12152
12153 int
12154 main ()
12155 {
12156  gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL, NULL)
12157   ;
12158   return 0;
12159 }
12160 _ACEOF
12161 if ac_fn_c_try_link "$LINENO"; then :
12162
12163
12164 $as_echo "#define GETHOSTBYADDRRSTYLE GNUSTYLE" >>confdefs.h
12165
12166       gethostbyaddrrstyle=GNU
12167
12168
12169 fi
12170 rm -f core conftest.err conftest.$ac_objext \
12171     conftest$ac_exeext conftest.$ac_ext
12172 fi
12173
12174 if test "x$gethostbyaddrrstyle" = "x"; then
12175   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12176 /* end confdefs.h.  */
12177
12178       #include <stdio.h>
12179       #include <netdb.h>
12180
12181 int
12182 main ()
12183 {
12184  gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL)
12185   ;
12186   return 0;
12187 }
12188 _ACEOF
12189 if ac_fn_c_try_link "$LINENO"; then :
12190
12191
12192 $as_echo "#define GETHOSTBYADDRRSTYLE SYSVSTYLE" >>confdefs.h
12193
12194       gethostbyaddrrstyle=SYSV
12195
12196
12197 fi
12198 rm -f core conftest.err conftest.$ac_objext \
12199     conftest$ac_exeext conftest.$ac_ext
12200 fi
12201
12202
12203 if test "x$gethostbyaddrrstyle" = "x"; then
12204   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12205 /* end confdefs.h.  */
12206
12207       #include <stdio.h>
12208       #include <netdb.h>
12209
12210 int
12211 main ()
12212 {
12213  gethostbyaddr(NULL, 0, 0)
12214   ;
12215   return 0;
12216 }
12217 _ACEOF
12218 if ac_fn_c_try_link "$LINENO"; then :
12219
12220
12221 $as_echo "#define GETHOSTBYADDRRSTYLE BSDSTYLE" >>confdefs.h
12222
12223       gethostbyaddrrstyle=BSD
12224
12225
12226 fi
12227 rm -f core conftest.err conftest.$ac_objext \
12228     conftest$ac_exeext conftest.$ac_ext
12229 fi
12230
12231 if test "x$gethostbyaddrrstyle" = "x"; then
12232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none!  It must not exist, here." >&5
12233 $as_echo "none!  It must not exist, here." >&6; }
12234 else
12235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${gethostbyaddrrstyle}-style" >&5
12236 $as_echo "${gethostbyaddrrstyle}-style" >&6; }
12237 fi
12238
12239 if test "x$gethostbyaddrrstyle" = "xBSD"; then
12240   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** " >&5
12241 $as_echo "$as_me: WARNING:  ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** " >&2;}
12242 fi
12243
12244 gethostbynamerstyle=""
12245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r() syntax" >&5
12246 $as_echo_n "checking gethostbyname_r() syntax... " >&6; }
12247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12248 /* end confdefs.h.  */
12249
12250     #include <stdio.h>
12251     #include <netdb.h>
12252
12253 int
12254 main ()
12255 {
12256  gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL)
12257   ;
12258   return 0;
12259 }
12260 _ACEOF
12261 if ac_fn_c_try_link "$LINENO"; then :
12262
12263
12264 $as_echo "#define GETHOSTBYNAMERSTYLE GNUSTYLE" >>confdefs.h
12265
12266     gethostbynamerstyle=GNU
12267
12268
12269 fi
12270 rm -f core conftest.err conftest.$ac_objext \
12271     conftest$ac_exeext conftest.$ac_ext
12272
12273 if test "x$gethostbynamerstyle" = "x"; then
12274   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12275 /* end confdefs.h.  */
12276
12277       #include <stdio.h>
12278       #include <netdb.h>
12279
12280 int
12281 main ()
12282 {
12283  gethostbyname_r(NULL, NULL, NULL, 0, NULL)
12284   ;
12285   return 0;
12286 }
12287 _ACEOF
12288 if ac_fn_c_try_link "$LINENO"; then :
12289
12290
12291 $as_echo "#define GETHOSTBYNAMERSTYLE SYSVSTYLE" >>confdefs.h
12292
12293       gethostbynamerstyle=SYSV
12294
12295
12296 fi
12297 rm -f core conftest.err conftest.$ac_objext \
12298     conftest$ac_exeext conftest.$ac_ext
12299 fi
12300
12301 if test "x$gethostbynamerstyle" = "x"; then
12302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12303 /* end confdefs.h.  */
12304
12305       #include <stdio.h>
12306       #include <netdb.h>
12307
12308 int
12309 main ()
12310 {
12311  gethostbyname(NULL)
12312   ;
12313   return 0;
12314 }
12315 _ACEOF
12316 if ac_fn_c_try_link "$LINENO"; then :
12317
12318
12319 $as_echo "#define GETHOSTBYNAMERSTYLE BSDSTYLE" >>confdefs.h
12320
12321       gethostbynamerstyle=BSD
12322
12323
12324 fi
12325 rm -f core conftest.err conftest.$ac_objext \
12326     conftest$ac_exeext conftest.$ac_ext
12327 fi
12328
12329 if test "x$gethostbynamerstyle" = "x"; then
12330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none!  It must not exist, here." >&5
12331 $as_echo "none!  It must not exist, here." >&6; }
12332 else
12333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${gethostbynamerstyle}-style" >&5
12334 $as_echo "${gethostbynamerstyle}-style" >&6; }
12335 fi
12336
12337 if test "x$gethostbynamerstyle" = "xBSD"; then
12338   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  ****** BSD-style gethostbyname might NOT be thread-safe! ****** " >&5
12339 $as_echo "$as_me: WARNING:  ****** BSD-style gethostbyname might NOT be thread-safe! ****** " >&2;}
12340 fi
12341
12342 if test "x$ac_cv_header_pwd_h" = "xyes"; then
12343   { $as_echo "$as_me:${as_lineno-$LINENO}: checking getpwnam_r" >&5
12344 $as_echo_n "checking getpwnam_r... " >&6; }
12345   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12346 /* end confdefs.h.  */
12347
12348       #include <stdlib.h>
12349       #include <sys/types.h>
12350       #include <pwd.h>
12351
12352 int
12353 main ()
12354 {
12355  getpwnam_r(NULL, NULL, NULL, 0, NULL)
12356   ;
12357   return 0;
12358 }
12359 _ACEOF
12360 if ac_fn_c_try_link "$LINENO"; then :
12361
12362       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12363 $as_echo "yes" >&6; }
12364
12365 $as_echo "#define HAVE_GETPWNAM_R 1" >>confdefs.h
12366
12367
12368 else
12369
12370         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12371 $as_echo "no" >&6; }
12372
12373
12374 fi
12375 rm -f core conftest.err conftest.$ac_objext \
12376     conftest$ac_exeext conftest.$ac_ext
12377 fi
12378
12379 if test "x$ac_cv_header_grp_h" = "xyes"; then
12380   { $as_echo "$as_me:${as_lineno-$LINENO}: checking getgrnam_r" >&5
12381 $as_echo_n "checking getgrnam_r... " >&6; }
12382   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12383 /* end confdefs.h.  */
12384
12385       #include <stdlib.h>
12386       #include <sys/types.h>
12387       #include <grp.h>
12388
12389 int
12390 main ()
12391 {
12392  getgrnam_r(NULL, NULL, NULL, 0, NULL)
12393   ;
12394   return 0;
12395 }
12396 _ACEOF
12397 if ac_fn_c_try_link "$LINENO"; then :
12398
12399       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12400 $as_echo "yes" >&6; }
12401
12402 $as_echo "#define HAVE_GETGRNAM_R 1" >>confdefs.h
12403
12404
12405 else
12406
12407         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12408 $as_echo "no" >&6; }
12409
12410
12411 fi
12412 rm -f core conftest.err conftest.$ac_objext \
12413     conftest$ac_exeext conftest.$ac_ext
12414 fi
12415
12416
12417
12418 $as_echo "#define POSIXSTYLE 1" >>confdefs.h
12419
12420
12421 $as_echo "#define SOLARISSTYLE 2" >>confdefs.h
12422
12423 ctimerstyle=""
12424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ctime_r() syntax" >&5
12425 $as_echo_n "checking ctime_r() syntax... " >&6; }
12426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12427 /* end confdefs.h.  */
12428
12429     #include <time.h>
12430
12431 int
12432 main ()
12433 {
12434  ctime_r(NULL, NULL, 0)
12435   ;
12436   return 0;
12437 }
12438 _ACEOF
12439 if ac_fn_c_try_link "$LINENO"; then :
12440
12441
12442 $as_echo "#define CTIMERSTYLE SOLARISSTYLE" >>confdefs.h
12443
12444     ctimerstyle="SOLARIS"
12445
12446
12447 fi
12448 rm -f core conftest.err conftest.$ac_objext \
12449     conftest$ac_exeext conftest.$ac_ext
12450
12451 if test "x$ctimerstyle" = "x"; then
12452   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12453 /* end confdefs.h.  */
12454
12455       #include <time.h>
12456
12457 int
12458 main ()
12459 {
12460  ctime_r(NULL, NULL)
12461   ;
12462   return 0;
12463 }
12464 _ACEOF
12465 if ac_fn_c_try_link "$LINENO"; then :
12466
12467
12468 $as_echo "#define CTIMERSTYLE POSIXSTYLE" >>confdefs.h
12469
12470       ctimerstyle="POSIX"
12471
12472
12473 fi
12474 rm -f core conftest.err conftest.$ac_objext \
12475     conftest$ac_exeext conftest.$ac_ext
12476 fi
12477
12478 if test "x$ctimerstyle" = "x"; then
12479     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none!  It must not exist, here." >&5
12480 $as_echo "none!  It must not exist, here." >&6; }
12481 else
12482     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ctimerstyle}-style" >&5
12483 $as_echo "${ctimerstyle}-style" >&6; }
12484 fi
12485
12486 HOSTINFO=$host
12487
12488
12489
12490 top_builddir=`pwd`
12491 export top_builddir
12492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: top_builddir=$top_builddir" >&5
12493 $as_echo "top_builddir=$top_builddir" >&6; }
12494
12495
12496
12497
12498 if test "x$EXPERIMENTAL" = "xyes"; then
12499   for foo in `ls -1 "${srcdir}"/src/modules | grep rlm_`; do
12500     MODULES="$MODULES $foo"
12501   done
12502 else
12503             for foo in `cat "${srcdir}"/src/modules/stable`; do
12504       MODULES="$MODULES $foo"
12505    done
12506 fi
12507
12508 mysubdirs=""
12509 for bar in $MODULES; do
12510   if test -f "${srcdir}"/src/modules/$bar/configure; then
12511     mysubdirs="$mysubdirs src/modules/$bar"
12512   fi
12513 done
12514
12515
12516
12517 subdirs="$subdirs $mysubdirs"
12518
12519
12520
12521 if test "x$werror" == "xyes"; then
12522   CFLAGS="-Werror $CFLAGS"
12523 fi
12524
12525 ac_config_commands="$ac_config_commands stamp-h"
12526
12527 ac_config_commands="$ac_config_commands build-radpaths-h"
12528
12529 ac_config_commands="$ac_config_commands main-chmod"
12530
12531 ac_config_commands="$ac_config_commands scripts-chmod"
12532
12533
12534
12535
12536
12537
12538 USE_STATIC_LIBS="yes"
12539
12540
12541
12542
12543   unset ac_cv_env_LIBS_set
12544   unset ac_cv_env_LIBS_value
12545
12546   ac_config_files="$ac_config_files ./Make.inc ./src/include/build-radpaths-h ./src/main/radsniff.mk ./src/main/checkrad ./src/main/radlast ./src/main/radtest ./scripts/rc.radiusd ./scripts/cron/radiusd.cron.daily ./scripts/cron/radiusd.cron.monthly ./scripts/cryptpasswd ./raddb/radrelay.conf ./raddb/radiusd.conf"
12547
12548 cat >confcache <<\_ACEOF
12549 # This file is a shell script that caches the results of configure
12550 # tests run on this system so they can be shared between configure
12551 # scripts and configure runs, see configure's option --config-cache.
12552 # It is not useful on other systems.  If it contains results you don't
12553 # want to keep, you may remove or edit it.
12554 #
12555 # config.status only pays attention to the cache file if you give it
12556 # the --recheck option to rerun configure.
12557 #
12558 # `ac_cv_env_foo' variables (set or unset) will be overridden when
12559 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12560 # following values.
12561
12562 _ACEOF
12563
12564 # The following way of writing the cache mishandles newlines in values,
12565 # but we know of no workaround that is simple, portable, and efficient.
12566 # So, we kill variables containing newlines.
12567 # Ultrix sh set writes to stderr and can't be redirected directly,
12568 # and sets the high bit in the cache file unless we assign to the vars.
12569 (
12570   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
12571     eval ac_val=\$$ac_var
12572     case $ac_val in #(
12573     *${as_nl}*)
12574       case $ac_var in #(
12575       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
12576 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
12577       esac
12578       case $ac_var in #(
12579       _ | IFS | as_nl) ;; #(
12580       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
12581       *) { eval $ac_var=; unset $ac_var;} ;;
12582       esac ;;
12583     esac
12584   done
12585
12586   (set) 2>&1 |
12587     case $as_nl`(ac_space=' '; set) 2>&1` in #(
12588     *${as_nl}ac_space=\ *)
12589       # `set' does not quote correctly, so add quotes: double-quote
12590       # substitution turns \\\\ into \\, and sed turns \\ into \.
12591       sed -n \
12592         "s/'/'\\\\''/g;
12593           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12594       ;; #(
12595     *)
12596       # `set' quotes correctly as required by POSIX, so do not add quotes.
12597       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
12598       ;;
12599     esac |
12600     sort
12601 ) |
12602   sed '
12603      /^ac_cv_env_/b end
12604      t clear
12605      :clear
12606      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12607      t end
12608      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12609      :end' >>confcache
12610 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
12611   if test -w "$cache_file"; then
12612     if test "x$cache_file" != "x/dev/null"; then
12613       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
12614 $as_echo "$as_me: updating cache $cache_file" >&6;}
12615       if test ! -f "$cache_file" || test -h "$cache_file"; then
12616         cat confcache >"$cache_file"
12617       else
12618         case $cache_file in #(
12619         */* | ?:*)
12620           mv -f confcache "$cache_file"$$ &&
12621           mv -f "$cache_file"$$ "$cache_file" ;; #(
12622         *)
12623           mv -f confcache "$cache_file" ;;
12624         esac
12625       fi
12626     fi
12627   else
12628     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
12629 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
12630   fi
12631 fi
12632 rm -f confcache
12633
12634 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12635 # Let make expand exec_prefix.
12636 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12637
12638 DEFS=-DHAVE_CONFIG_H
12639
12640 ac_libobjs=
12641 ac_ltlibobjs=
12642 U=
12643 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
12644   # 1. Remove the extension, and $U if already installed.
12645   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
12646   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
12647   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
12648   #    will be set to the directory where LIBOBJS objects are built.
12649   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
12650   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
12651 done
12652 LIBOBJS=$ac_libobjs
12653
12654 LTLIBOBJS=$ac_ltlibobjs
12655
12656
12657
12658
12659 : "${CONFIG_STATUS=./config.status}"
12660 ac_write_fail=0
12661 ac_clean_files_save=$ac_clean_files
12662 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12663 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
12664 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
12665 as_write_fail=0
12666 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
12667 #! $SHELL
12668 # Generated by $as_me.
12669 # Run this file to recreate the current configuration.
12670 # Compiler output produced by configure, useful for debugging
12671 # configure, is in config.log if it exists.
12672
12673 debug=false
12674 ac_cs_recheck=false
12675 ac_cs_silent=false
12676
12677 SHELL=\${CONFIG_SHELL-$SHELL}
12678 export SHELL
12679 _ASEOF
12680 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
12681 ## -------------------- ##
12682 ## M4sh Initialization. ##
12683 ## -------------------- ##
12684
12685 # Be more Bourne compatible
12686 DUALCASE=1; export DUALCASE # for MKS sh
12687 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
12688   emulate sh
12689   NULLCMD=:
12690   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
12691   # is contrary to our usage.  Disable this feature.
12692   alias -g '${1+"$@"}'='"$@"'
12693   setopt NO_GLOB_SUBST
12694 else
12695   case `(set -o) 2>/dev/null` in #(
12696   *posix*) :
12697     set -o posix ;; #(
12698   *) :
12699      ;;
12700 esac
12701 fi
12702
12703
12704 as_nl='
12705 '
12706 export as_nl
12707 # Printing a long string crashes Solaris 7 /usr/bin/printf.
12708 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
12709 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
12710 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
12711 # Prefer a ksh shell builtin over an external printf program on Solaris,
12712 # but without wasting forks for bash or zsh.
12713 if test -z "$BASH_VERSION$ZSH_VERSION" \
12714     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
12715   as_echo='print -r --'
12716   as_echo_n='print -rn --'
12717 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
12718   as_echo='printf %s\n'
12719   as_echo_n='printf %s'
12720 else
12721   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
12722     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
12723     as_echo_n='/usr/ucb/echo -n'
12724   else
12725     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
12726     as_echo_n_body='eval
12727       arg=$1;
12728       case $arg in #(
12729       *"$as_nl"*)
12730         expr "X$arg" : "X\\(.*\\)$as_nl";
12731         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
12732       esac;
12733       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
12734     '
12735     export as_echo_n_body
12736     as_echo_n='sh -c $as_echo_n_body as_echo'
12737   fi
12738   export as_echo_body
12739   as_echo='sh -c $as_echo_body as_echo'
12740 fi
12741
12742 # The user is always right.
12743 if test "${PATH_SEPARATOR+set}" != set; then
12744   PATH_SEPARATOR=:
12745   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
12746     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
12747       PATH_SEPARATOR=';'
12748   }
12749 fi
12750
12751
12752 # IFS
12753 # We need space, tab and new line, in precisely that order.  Quoting is
12754 # there to prevent editors from complaining about space-tab.
12755 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
12756 # splitting by setting IFS to empty value.)
12757 IFS=" ""        $as_nl"
12758
12759 # Find who we are.  Look in the path if we contain no directory separator.
12760 as_myself=
12761 case $0 in #((
12762   *[\\/]* ) as_myself=$0 ;;
12763   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12764 for as_dir in $PATH
12765 do
12766   IFS=$as_save_IFS
12767   test -z "$as_dir" && as_dir=.
12768     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
12769   done
12770 IFS=$as_save_IFS
12771
12772      ;;
12773 esac
12774 # We did not find ourselves, most probably we were run as `sh COMMAND'
12775 # in which case we are not to be found in the path.
12776 if test "x$as_myself" = x; then
12777   as_myself=$0
12778 fi
12779 if test ! -f "$as_myself"; then
12780   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
12781   exit 1
12782 fi
12783
12784 # Unset variables that we do not need and which cause bugs (e.g. in
12785 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
12786 # suppresses any "Segmentation fault" message there.  '((' could
12787 # trigger a bug in pdksh 5.2.14.
12788 for as_var in BASH_ENV ENV MAIL MAILPATH
12789 do eval test x\${$as_var+set} = xset \
12790   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
12791 done
12792 PS1='$ '
12793 PS2='> '
12794 PS4='+ '
12795
12796 # NLS nuisances.
12797 LC_ALL=C
12798 export LC_ALL
12799 LANGUAGE=C
12800 export LANGUAGE
12801
12802 # CDPATH.
12803 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
12804
12805
12806 # as_fn_error STATUS ERROR [LINENO LOG_FD]
12807 # ----------------------------------------
12808 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
12809 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
12810 # script with STATUS, using 1 if that was 0.
12811 as_fn_error ()
12812 {
12813   as_status=$1; test $as_status -eq 0 && as_status=1
12814   if test "$4"; then
12815     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
12816     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
12817   fi
12818   $as_echo "$as_me: error: $2" >&2
12819   as_fn_exit $as_status
12820 } # as_fn_error
12821
12822
12823 # as_fn_set_status STATUS
12824 # -----------------------
12825 # Set $? to STATUS, without forking.
12826 as_fn_set_status ()
12827 {
12828   return $1
12829 } # as_fn_set_status
12830
12831 # as_fn_exit STATUS
12832 # -----------------
12833 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
12834 as_fn_exit ()
12835 {
12836   set +e
12837   as_fn_set_status $1
12838   exit $1
12839 } # as_fn_exit
12840
12841 # as_fn_unset VAR
12842 # ---------------
12843 # Portably unset VAR.
12844 as_fn_unset ()
12845 {
12846   { eval $1=; unset $1;}
12847 }
12848 as_unset=as_fn_unset
12849 # as_fn_append VAR VALUE
12850 # ----------------------
12851 # Append the text in VALUE to the end of the definition contained in VAR. Take
12852 # advantage of any shell optimizations that allow amortized linear growth over
12853 # repeated appends, instead of the typical quadratic growth present in naive
12854 # implementations.
12855 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
12856   eval 'as_fn_append ()
12857   {
12858     eval $1+=\$2
12859   }'
12860 else
12861   as_fn_append ()
12862   {
12863     eval $1=\$$1\$2
12864   }
12865 fi # as_fn_append
12866
12867 # as_fn_arith ARG...
12868 # ------------------
12869 # Perform arithmetic evaluation on the ARGs, and store the result in the
12870 # global $as_val. Take advantage of shells that can avoid forks. The arguments
12871 # must be portable across $(()) and expr.
12872 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
12873   eval 'as_fn_arith ()
12874   {
12875     as_val=$(( $* ))
12876   }'
12877 else
12878   as_fn_arith ()
12879   {
12880     as_val=`expr "$@" || test $? -eq 1`
12881   }
12882 fi # as_fn_arith
12883
12884
12885 if expr a : '\(a\)' >/dev/null 2>&1 &&
12886    test "X`expr 00001 : '.*\(...\)'`" = X001; then
12887   as_expr=expr
12888 else
12889   as_expr=false
12890 fi
12891
12892 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
12893   as_basename=basename
12894 else
12895   as_basename=false
12896 fi
12897
12898 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
12899   as_dirname=dirname
12900 else
12901   as_dirname=false
12902 fi
12903
12904 as_me=`$as_basename -- "$0" ||
12905 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
12906          X"$0" : 'X\(//\)$' \| \
12907          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
12908 $as_echo X/"$0" |
12909     sed '/^.*\/\([^/][^/]*\)\/*$/{
12910             s//\1/
12911             q
12912           }
12913           /^X\/\(\/\/\)$/{
12914             s//\1/
12915             q
12916           }
12917           /^X\/\(\/\).*/{
12918             s//\1/
12919             q
12920           }
12921           s/.*/./; q'`
12922
12923 # Avoid depending upon Character Ranges.
12924 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12925 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
12926 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
12927 as_cr_digits='0123456789'
12928 as_cr_alnum=$as_cr_Letters$as_cr_digits
12929
12930 ECHO_C= ECHO_N= ECHO_T=
12931 case `echo -n x` in #(((((
12932 -n*)
12933   case `echo 'xy\c'` in
12934   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
12935   xy)  ECHO_C='\c';;
12936   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
12937        ECHO_T=' ';;
12938   esac;;
12939 *)
12940   ECHO_N='-n';;
12941 esac
12942
12943 rm -f conf$$ conf$$.exe conf$$.file
12944 if test -d conf$$.dir; then
12945   rm -f conf$$.dir/conf$$.file
12946 else
12947   rm -f conf$$.dir
12948   mkdir conf$$.dir 2>/dev/null
12949 fi
12950 if (echo >conf$$.file) 2>/dev/null; then
12951   if ln -s conf$$.file conf$$ 2>/dev/null; then
12952     as_ln_s='ln -s'
12953     # ... but there are two gotchas:
12954     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
12955     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
12956     # In both cases, we have to default to `cp -pR'.
12957     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
12958       as_ln_s='cp -pR'
12959   elif ln conf$$.file conf$$ 2>/dev/null; then
12960     as_ln_s=ln
12961   else
12962     as_ln_s='cp -pR'
12963   fi
12964 else
12965   as_ln_s='cp -pR'
12966 fi
12967 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
12968 rmdir conf$$.dir 2>/dev/null
12969
12970
12971 # as_fn_mkdir_p
12972 # -------------
12973 # Create "$as_dir" as a directory, including parents if necessary.
12974 as_fn_mkdir_p ()
12975 {
12976
12977   case $as_dir in #(
12978   -*) as_dir=./$as_dir;;
12979   esac
12980   test -d "$as_dir" || eval $as_mkdir_p || {
12981     as_dirs=
12982     while :; do
12983       case $as_dir in #(
12984       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
12985       *) as_qdir=$as_dir;;
12986       esac
12987       as_dirs="'$as_qdir' $as_dirs"
12988       as_dir=`$as_dirname -- "$as_dir" ||
12989 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12990          X"$as_dir" : 'X\(//\)[^/]' \| \
12991          X"$as_dir" : 'X\(//\)$' \| \
12992          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
12993 $as_echo X"$as_dir" |
12994     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12995             s//\1/
12996             q
12997           }
12998           /^X\(\/\/\)[^/].*/{
12999             s//\1/
13000             q
13001           }
13002           /^X\(\/\/\)$/{
13003             s//\1/
13004             q
13005           }
13006           /^X\(\/\).*/{
13007             s//\1/
13008             q
13009           }
13010           s/.*/./; q'`
13011       test -d "$as_dir" && break
13012     done
13013     test -z "$as_dirs" || eval "mkdir $as_dirs"
13014   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
13015
13016
13017 } # as_fn_mkdir_p
13018 if mkdir -p . 2>/dev/null; then
13019   as_mkdir_p='mkdir -p "$as_dir"'
13020 else
13021   test -d ./-p && rmdir ./-p
13022   as_mkdir_p=false
13023 fi
13024
13025
13026 # as_fn_executable_p FILE
13027 # -----------------------
13028 # Test if FILE is an executable regular file.
13029 as_fn_executable_p ()
13030 {
13031   test -f "$1" && test -x "$1"
13032 } # as_fn_executable_p
13033 as_test_x='test -x'
13034 as_executable_p=as_fn_executable_p
13035
13036 # Sed expression to map a string onto a valid CPP name.
13037 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
13038
13039 # Sed expression to map a string onto a valid variable name.
13040 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
13041
13042
13043 exec 6>&1
13044 ## ----------------------------------- ##
13045 ## Main body of $CONFIG_STATUS script. ##
13046 ## ----------------------------------- ##
13047 _ASEOF
13048 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
13049
13050 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13051 # Save the log message, to keep $0 and so on meaningful, and to
13052 # report actual input values of CONFIG_FILES etc. instead of their
13053 # values after options handling.
13054 ac_log="
13055 This file was extended by freeradius $as_me $Id$, which was
13056 generated by GNU Autoconf 2.69.  Invocation command line was
13057
13058   CONFIG_FILES    = $CONFIG_FILES
13059   CONFIG_HEADERS  = $CONFIG_HEADERS
13060   CONFIG_LINKS    = $CONFIG_LINKS
13061   CONFIG_COMMANDS = $CONFIG_COMMANDS
13062   $ $0 $@
13063
13064 on `(hostname || uname -n) 2>/dev/null | sed 1q`
13065 "
13066
13067 _ACEOF
13068
13069 case $ac_config_files in *"
13070 "*) set x $ac_config_files; shift; ac_config_files=$*;;
13071 esac
13072
13073 case $ac_config_headers in *"
13074 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
13075 esac
13076
13077
13078 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13079 # Files that config.status was made for.
13080 config_files="$ac_config_files"
13081 config_headers="$ac_config_headers"
13082 config_commands="$ac_config_commands"
13083
13084 _ACEOF
13085
13086 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13087 ac_cs_usage="\
13088 \`$as_me' instantiates files and other configuration actions
13089 from templates according to the current configuration.  Unless the files
13090 and actions are specified as TAGs, all are instantiated by default.
13091
13092 Usage: $0 [OPTION]... [TAG]...
13093
13094   -h, --help       print this help, then exit
13095   -V, --version    print version number and configuration settings, then exit
13096       --config     print configuration, then exit
13097   -q, --quiet, --silent
13098                    do not print progress messages
13099   -d, --debug      don't remove temporary files
13100       --recheck    update $as_me by reconfiguring in the same conditions
13101       --file=FILE[:TEMPLATE]
13102                    instantiate the configuration file FILE
13103       --header=FILE[:TEMPLATE]
13104                    instantiate the configuration header FILE
13105
13106 Configuration files:
13107 $config_files
13108
13109 Configuration headers:
13110 $config_headers
13111
13112 Configuration commands:
13113 $config_commands
13114
13115 Report bugs to <http://bugs.freeradius.org>.
13116 freeradius home page: <http://www.freeradius.org>."
13117
13118 _ACEOF
13119 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13120 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
13121 ac_cs_version="\\
13122 freeradius config.status $Id$
13123 configured by $0, generated by GNU Autoconf 2.69,
13124   with options \\"\$ac_cs_config\\"
13125
13126 Copyright (C) 2012 Free Software Foundation, Inc.
13127 This config.status script is free software; the Free Software Foundation
13128 gives unlimited permission to copy, distribute and modify it."
13129
13130 ac_pwd='$ac_pwd'
13131 srcdir='$srcdir'
13132 test -n "\$AWK" || AWK=awk
13133 _ACEOF
13134
13135 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13136 # The default lists apply if the user does not specify any file.
13137 ac_need_defaults=:
13138 while test $# != 0
13139 do
13140   case $1 in
13141   --*=?*)
13142     ac_option=`expr "X$1" : 'X\([^=]*\)='`
13143     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
13144     ac_shift=:
13145     ;;
13146   --*=)
13147     ac_option=`expr "X$1" : 'X\([^=]*\)='`
13148     ac_optarg=
13149     ac_shift=:
13150     ;;
13151   *)
13152     ac_option=$1
13153     ac_optarg=$2
13154     ac_shift=shift
13155     ;;
13156   esac
13157
13158   case $ac_option in
13159   # Handling of the options.
13160   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13161     ac_cs_recheck=: ;;
13162   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
13163     $as_echo "$ac_cs_version"; exit ;;
13164   --config | --confi | --conf | --con | --co | --c )
13165     $as_echo "$ac_cs_config"; exit ;;
13166   --debug | --debu | --deb | --de | --d | -d )
13167     debug=: ;;
13168   --file | --fil | --fi | --f )
13169     $ac_shift
13170     case $ac_optarg in
13171     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
13172     '') as_fn_error $? "missing file argument" ;;
13173     esac
13174     as_fn_append CONFIG_FILES " '$ac_optarg'"
13175     ac_need_defaults=false;;
13176   --header | --heade | --head | --hea )
13177     $ac_shift
13178     case $ac_optarg in
13179     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
13180     esac
13181     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
13182     ac_need_defaults=false;;
13183   --he | --h)
13184     # Conflict between --help and --header
13185     as_fn_error $? "ambiguous option: \`$1'
13186 Try \`$0 --help' for more information.";;
13187   --help | --hel | -h )
13188     $as_echo "$ac_cs_usage"; exit ;;
13189   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
13190   | -silent | --silent | --silen | --sile | --sil | --si | --s)
13191     ac_cs_silent=: ;;
13192
13193   # This is an error.
13194   -*) as_fn_error $? "unrecognized option: \`$1'
13195 Try \`$0 --help' for more information." ;;
13196
13197   *) as_fn_append ac_config_targets " $1"
13198      ac_need_defaults=false ;;
13199
13200   esac
13201   shift
13202 done
13203
13204 ac_configure_extra_args=
13205
13206 if $ac_cs_silent; then
13207   exec 6>/dev/null
13208   ac_configure_extra_args="$ac_configure_extra_args --silent"
13209 fi
13210
13211 _ACEOF
13212 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13213 if \$ac_cs_recheck; then
13214   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
13215   shift
13216   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
13217   CONFIG_SHELL='$SHELL'
13218   export CONFIG_SHELL
13219   exec "\$@"
13220 fi
13221
13222 _ACEOF
13223 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13224 exec 5>>config.log
13225 {
13226   echo
13227   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
13228 ## Running $as_me. ##
13229 _ASBOX
13230   $as_echo "$ac_log"
13231 } >&5
13232
13233 _ACEOF
13234 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13235 _ACEOF
13236
13237 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13238
13239 # Handling of arguments.
13240 for ac_config_target in $ac_config_targets
13241 do
13242   case $ac_config_target in
13243     "src/include/autoconf.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/autoconf.h" ;;
13244     "stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;;
13245     "build-radpaths-h") CONFIG_COMMANDS="$CONFIG_COMMANDS build-radpaths-h" ;;
13246     "main-chmod") CONFIG_COMMANDS="$CONFIG_COMMANDS main-chmod" ;;
13247     "scripts-chmod") CONFIG_COMMANDS="$CONFIG_COMMANDS scripts-chmod" ;;
13248     "./Make.inc") CONFIG_FILES="$CONFIG_FILES ./Make.inc" ;;
13249     "./src/include/build-radpaths-h") CONFIG_FILES="$CONFIG_FILES ./src/include/build-radpaths-h" ;;
13250     "./src/main/radsniff.mk") CONFIG_FILES="$CONFIG_FILES ./src/main/radsniff.mk" ;;
13251     "./src/main/checkrad") CONFIG_FILES="$CONFIG_FILES ./src/main/checkrad" ;;
13252     "./src/main/radlast") CONFIG_FILES="$CONFIG_FILES ./src/main/radlast" ;;
13253     "./src/main/radtest") CONFIG_FILES="$CONFIG_FILES ./src/main/radtest" ;;
13254     "./scripts/rc.radiusd") CONFIG_FILES="$CONFIG_FILES ./scripts/rc.radiusd" ;;
13255     "./scripts/cron/radiusd.cron.daily") CONFIG_FILES="$CONFIG_FILES ./scripts/cron/radiusd.cron.daily" ;;
13256     "./scripts/cron/radiusd.cron.monthly") CONFIG_FILES="$CONFIG_FILES ./scripts/cron/radiusd.cron.monthly" ;;
13257     "./scripts/cryptpasswd") CONFIG_FILES="$CONFIG_FILES ./scripts/cryptpasswd" ;;
13258     "./raddb/radrelay.conf") CONFIG_FILES="$CONFIG_FILES ./raddb/radrelay.conf" ;;
13259     "./raddb/radiusd.conf") CONFIG_FILES="$CONFIG_FILES ./raddb/radiusd.conf" ;;
13260
13261   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
13262   esac
13263 done
13264
13265
13266 # If the user did not use the arguments to specify the items to instantiate,
13267 # then the envvar interface is used.  Set only those that are not.
13268 # We use the long form for the default assignment because of an extremely
13269 # bizarre bug on SunOS 4.1.3.
13270 if $ac_need_defaults; then
13271   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
13272   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
13273   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
13274 fi
13275
13276 # Have a temporary directory for convenience.  Make it in the build tree
13277 # simply because there is no reason against having it here, and in addition,
13278 # creating and moving files from /tmp can sometimes cause problems.
13279 # Hook for its removal unless debugging.
13280 # Note that there is a small window in which the directory will not be cleaned:
13281 # after its creation but before its name has been assigned to `$tmp'.
13282 $debug ||
13283 {
13284   tmp= ac_tmp=
13285   trap 'exit_status=$?
13286   : "${ac_tmp:=$tmp}"
13287   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
13288 ' 0
13289   trap 'as_fn_exit 1' 1 2 13 15
13290 }
13291 # Create a (secure) tmp directory for tmp files.
13292
13293 {
13294   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
13295   test -d "$tmp"
13296 }  ||
13297 {
13298   tmp=./conf$$-$RANDOM
13299   (umask 077 && mkdir "$tmp")
13300 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
13301 ac_tmp=$tmp
13302
13303 # Set up the scripts for CONFIG_FILES section.
13304 # No need to generate them if there are no CONFIG_FILES.
13305 # This happens for instance with `./config.status config.h'.
13306 if test -n "$CONFIG_FILES"; then
13307
13308
13309 ac_cr=`echo X | tr X '\015'`
13310 # On cygwin, bash can eat \r inside `` if the user requested igncr.
13311 # But we know of no other shell where ac_cr would be empty at this
13312 # point, so we can use a bashism as a fallback.
13313 if test "x$ac_cr" = x; then
13314   eval ac_cr=\$\'\\r\'
13315 fi
13316 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
13317 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
13318   ac_cs_awk_cr='\\r'
13319 else
13320   ac_cs_awk_cr=$ac_cr
13321 fi
13322
13323 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
13324 _ACEOF
13325
13326
13327 {
13328   echo "cat >conf$$subs.awk <<_ACEOF" &&
13329   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
13330   echo "_ACEOF"
13331 } >conf$$subs.sh ||
13332   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13333 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
13334 ac_delim='%!_!# '
13335 for ac_last_try in false false false false false :; do
13336   . ./conf$$subs.sh ||
13337     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13338
13339   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
13340   if test $ac_delim_n = $ac_delim_num; then
13341     break
13342   elif $ac_last_try; then
13343     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13344   else
13345     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
13346   fi
13347 done
13348 rm -f conf$$subs.sh
13349
13350 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13351 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
13352 _ACEOF
13353 sed -n '
13354 h
13355 s/^/S["/; s/!.*/"]=/
13356 p
13357 g
13358 s/^[^!]*!//
13359 :repl
13360 t repl
13361 s/'"$ac_delim"'$//
13362 t delim
13363 :nl
13364 h
13365 s/\(.\{148\}\)..*/\1/
13366 t more1
13367 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
13368 p
13369 n
13370 b repl
13371 :more1
13372 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
13373 p
13374 g
13375 s/.\{148\}//
13376 t nl
13377 :delim
13378 h
13379 s/\(.\{148\}\)..*/\1/
13380 t more2
13381 s/["\\]/\\&/g; s/^/"/; s/$/"/
13382 p
13383 b
13384 :more2
13385 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
13386 p
13387 g
13388 s/.\{148\}//
13389 t delim
13390 ' <conf$$subs.awk | sed '
13391 /^[^""]/{
13392   N
13393   s/\n//
13394 }
13395 ' >>$CONFIG_STATUS || ac_write_fail=1
13396 rm -f conf$$subs.awk
13397 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13398 _ACAWK
13399 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
13400   for (key in S) S_is_set[key] = 1
13401   FS = "\a"
13402
13403 }
13404 {
13405   line = $ 0
13406   nfields = split(line, field, "@")
13407   substed = 0
13408   len = length(field[1])
13409   for (i = 2; i < nfields; i++) {
13410     key = field[i]
13411     keylen = length(key)
13412     if (S_is_set[key]) {
13413       value = S[key]
13414       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
13415       len += length(value) + length(field[++i])
13416       substed = 1
13417     } else
13418       len += 1 + keylen
13419   }
13420
13421   print line
13422 }
13423
13424 _ACAWK
13425 _ACEOF
13426 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13427 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
13428   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
13429 else
13430   cat
13431 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
13432   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
13433 _ACEOF
13434
13435 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
13436 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
13437 # trailing colons and then remove the whole line if VPATH becomes empty
13438 # (actually we leave an empty line to preserve line numbers).
13439 if test "x$srcdir" = x.; then
13440   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
13441 h
13442 s///
13443 s/^/:/
13444 s/[      ]*$/:/
13445 s/:\$(srcdir):/:/g
13446 s/:\${srcdir}:/:/g
13447 s/:@srcdir@:/:/g
13448 s/^:*//
13449 s/:*$//
13450 x
13451 s/\(=[   ]*\).*/\1/
13452 G
13453 s/\n//
13454 s/^[^=]*=[       ]*$//
13455 }'
13456 fi
13457
13458 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13459 fi # test -n "$CONFIG_FILES"
13460
13461 # Set up the scripts for CONFIG_HEADERS section.
13462 # No need to generate them if there are no CONFIG_HEADERS.
13463 # This happens for instance with `./config.status Makefile'.
13464 if test -n "$CONFIG_HEADERS"; then
13465 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
13466 BEGIN {
13467 _ACEOF
13468
13469 # Transform confdefs.h into an awk script `defines.awk', embedded as
13470 # here-document in config.status, that substitutes the proper values into
13471 # config.h.in to produce config.h.
13472
13473 # Create a delimiter string that does not exist in confdefs.h, to ease
13474 # handling of long lines.
13475 ac_delim='%!_!# '
13476 for ac_last_try in false false :; do
13477   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
13478   if test -z "$ac_tt"; then
13479     break
13480   elif $ac_last_try; then
13481     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
13482   else
13483     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
13484   fi
13485 done
13486
13487 # For the awk script, D is an array of macro values keyed by name,
13488 # likewise P contains macro parameters if any.  Preserve backslash
13489 # newline sequences.
13490
13491 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
13492 sed -n '
13493 s/.\{148\}/&'"$ac_delim"'/g
13494 t rset
13495 :rset
13496 s/^[     ]*#[    ]*define[       ][      ]*/ /
13497 t def
13498 d
13499 :def
13500 s/\\$//
13501 t bsnl
13502 s/["\\]/\\&/g
13503 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
13504 D["\1"]=" \3"/p
13505 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
13506 d
13507 :bsnl
13508 s/["\\]/\\&/g
13509 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
13510 D["\1"]=" \3\\\\\\n"\\/p
13511 t cont
13512 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
13513 t cont
13514 d
13515 :cont
13516 n
13517 s/.\{148\}/&'"$ac_delim"'/g
13518 t clear
13519 :clear
13520 s/\\$//
13521 t bsnlc
13522 s/["\\]/\\&/g; s/^/"/; s/$/"/p
13523 d
13524 :bsnlc
13525 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
13526 b cont
13527 ' <confdefs.h | sed '
13528 s/'"$ac_delim"'/"\\\
13529 "/g' >>$CONFIG_STATUS || ac_write_fail=1
13530
13531 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13532   for (key in D) D_is_set[key] = 1
13533   FS = "\a"
13534 }
13535 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
13536   line = \$ 0
13537   split(line, arg, " ")
13538   if (arg[1] == "#") {
13539     defundef = arg[2]
13540     mac1 = arg[3]
13541   } else {
13542     defundef = substr(arg[1], 2)
13543     mac1 = arg[2]
13544   }
13545   split(mac1, mac2, "(") #)
13546   macro = mac2[1]
13547   prefix = substr(line, 1, index(line, defundef) - 1)
13548   if (D_is_set[macro]) {
13549     # Preserve the white space surrounding the "#".
13550     print prefix "define", macro P[macro] D[macro]
13551     next
13552   } else {
13553     # Replace #undef with comments.  This is necessary, for example,
13554     # in the case of _POSIX_SOURCE, which is predefined and required
13555     # on some systems where configure will not decide to define it.
13556     if (defundef == "undef") {
13557       print "/*", prefix defundef, macro, "*/"
13558       next
13559     }
13560   }
13561 }
13562 { print }
13563 _ACAWK
13564 _ACEOF
13565 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13566   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
13567 fi # test -n "$CONFIG_HEADERS"
13568
13569
13570 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
13571 shift
13572 for ac_tag
13573 do
13574   case $ac_tag in
13575   :[FHLC]) ac_mode=$ac_tag; continue;;
13576   esac
13577   case $ac_mode$ac_tag in
13578   :[FHL]*:*);;
13579   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
13580   :[FH]-) ac_tag=-:-;;
13581   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
13582   esac
13583   ac_save_IFS=$IFS
13584   IFS=:
13585   set x $ac_tag
13586   IFS=$ac_save_IFS
13587   shift
13588   ac_file=$1
13589   shift
13590
13591   case $ac_mode in
13592   :L) ac_source=$1;;
13593   :[FH])
13594     ac_file_inputs=
13595     for ac_f
13596     do
13597       case $ac_f in
13598       -) ac_f="$ac_tmp/stdin";;
13599       *) # Look for the file first in the build tree, then in the source tree
13600          # (if the path is not absolute).  The absolute path cannot be DOS-style,
13601          # because $ac_f cannot contain `:'.
13602          test -f "$ac_f" ||
13603            case $ac_f in
13604            [\\/$]*) false;;
13605            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
13606            esac ||
13607            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
13608       esac
13609       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
13610       as_fn_append ac_file_inputs " '$ac_f'"
13611     done
13612
13613     # Let's still pretend it is `configure' which instantiates (i.e., don't
13614     # use $as_me), people would be surprised to read:
13615     #    /* config.h.  Generated by config.status.  */
13616     configure_input='Generated from '`
13617           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
13618         `' by configure.'
13619     if test x"$ac_file" != x-; then
13620       configure_input="$ac_file.  $configure_input"
13621       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
13622 $as_echo "$as_me: creating $ac_file" >&6;}
13623     fi
13624     # Neutralize special characters interpreted by sed in replacement strings.
13625     case $configure_input in #(
13626     *\&* | *\|* | *\\* )
13627        ac_sed_conf_input=`$as_echo "$configure_input" |
13628        sed 's/[\\\\&|]/\\\\&/g'`;; #(
13629     *) ac_sed_conf_input=$configure_input;;
13630     esac
13631
13632     case $ac_tag in
13633     *:-:* | *:-) cat >"$ac_tmp/stdin" \
13634       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
13635     esac
13636     ;;
13637   esac
13638
13639   ac_dir=`$as_dirname -- "$ac_file" ||
13640 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13641          X"$ac_file" : 'X\(//\)[^/]' \| \
13642          X"$ac_file" : 'X\(//\)$' \| \
13643          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
13644 $as_echo X"$ac_file" |
13645     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13646             s//\1/
13647             q
13648           }
13649           /^X\(\/\/\)[^/].*/{
13650             s//\1/
13651             q
13652           }
13653           /^X\(\/\/\)$/{
13654             s//\1/
13655             q
13656           }
13657           /^X\(\/\).*/{
13658             s//\1/
13659             q
13660           }
13661           s/.*/./; q'`
13662   as_dir="$ac_dir"; as_fn_mkdir_p
13663   ac_builddir=.
13664
13665 case "$ac_dir" in
13666 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
13667 *)
13668   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
13669   # A ".." for each directory in $ac_dir_suffix.
13670   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
13671   case $ac_top_builddir_sub in
13672   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
13673   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
13674   esac ;;
13675 esac
13676 ac_abs_top_builddir=$ac_pwd
13677 ac_abs_builddir=$ac_pwd$ac_dir_suffix
13678 # for backward compatibility:
13679 ac_top_builddir=$ac_top_build_prefix
13680
13681 case $srcdir in
13682   .)  # We are building in place.
13683     ac_srcdir=.
13684     ac_top_srcdir=$ac_top_builddir_sub
13685     ac_abs_top_srcdir=$ac_pwd ;;
13686   [\\/]* | ?:[\\/]* )  # Absolute name.
13687     ac_srcdir=$srcdir$ac_dir_suffix;
13688     ac_top_srcdir=$srcdir
13689     ac_abs_top_srcdir=$srcdir ;;
13690   *) # Relative name.
13691     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
13692     ac_top_srcdir=$ac_top_build_prefix$srcdir
13693     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
13694 esac
13695 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
13696
13697
13698   case $ac_mode in
13699   :F)
13700   #
13701   # CONFIG_FILE
13702   #
13703
13704 _ACEOF
13705
13706 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13707 # If the template does not know about datarootdir, expand it.
13708 # FIXME: This hack should be removed a few years after 2.60.
13709 ac_datarootdir_hack=; ac_datarootdir_seen=
13710 ac_sed_dataroot='
13711 /datarootdir/ {
13712   p
13713   q
13714 }
13715 /@datadir@/p
13716 /@docdir@/p
13717 /@infodir@/p
13718 /@localedir@/p
13719 /@mandir@/p'
13720 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
13721 *datarootdir*) ac_datarootdir_seen=yes;;
13722 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
13723   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
13724 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
13725 _ACEOF
13726 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13727   ac_datarootdir_hack='
13728   s&@datadir@&$datadir&g
13729   s&@docdir@&$docdir&g
13730   s&@infodir@&$infodir&g
13731   s&@localedir@&$localedir&g
13732   s&@mandir@&$mandir&g
13733   s&\\\${datarootdir}&$datarootdir&g' ;;
13734 esac
13735 _ACEOF
13736
13737 # Neutralize VPATH when `$srcdir' = `.'.
13738 # Shell code in configure.ac might set extrasub.
13739 # FIXME: do we really want to maintain this feature?
13740 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13741 ac_sed_extra="$ac_vpsub
13742 $extrasub
13743 _ACEOF
13744 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13745 :t
13746 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13747 s|@configure_input@|$ac_sed_conf_input|;t t
13748 s&@top_builddir@&$ac_top_builddir_sub&;t t
13749 s&@top_build_prefix@&$ac_top_build_prefix&;t t
13750 s&@srcdir@&$ac_srcdir&;t t
13751 s&@abs_srcdir@&$ac_abs_srcdir&;t t
13752 s&@top_srcdir@&$ac_top_srcdir&;t t
13753 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
13754 s&@builddir@&$ac_builddir&;t t
13755 s&@abs_builddir@&$ac_abs_builddir&;t t
13756 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
13757 $ac_datarootdir_hack
13758 "
13759 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
13760   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13761
13762 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
13763   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
13764   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
13765       "$ac_tmp/out"`; test -z "$ac_out"; } &&
13766   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13767 which seems to be undefined.  Please make sure it is defined" >&5
13768 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13769 which seems to be undefined.  Please make sure it is defined" >&2;}
13770
13771   rm -f "$ac_tmp/stdin"
13772   case $ac_file in
13773   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
13774   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
13775   esac \
13776   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13777  ;;
13778   :H)
13779   #
13780   # CONFIG_HEADER
13781   #
13782   if test x"$ac_file" != x-; then
13783     {
13784       $as_echo "/* $configure_input  */" \
13785       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
13786     } >"$ac_tmp/config.h" \
13787       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13788     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
13789       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
13790 $as_echo "$as_me: $ac_file is unchanged" >&6;}
13791     else
13792       rm -f "$ac_file"
13793       mv "$ac_tmp/config.h" "$ac_file" \
13794         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13795     fi
13796   else
13797     $as_echo "/* $configure_input  */" \
13798       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
13799       || as_fn_error $? "could not create -" "$LINENO" 5
13800   fi
13801  ;;
13802
13803   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
13804 $as_echo "$as_me: executing $ac_file commands" >&6;}
13805  ;;
13806   esac
13807
13808
13809   case $ac_file$ac_mode in
13810     "stamp-h":C) echo timestamp > src/include/stamp-h ;;
13811     "build-radpaths-h":C) (cd ./src/include && /bin/sh ./build-radpaths-h) ;;
13812     "main-chmod":C) (cd ./src/main && chmod +x checkrad radlast radtest) ;;
13813     "scripts-chmod":C) (cd ./scripts && chmod +x rc.radiusd cron/radiusd.cron.daily cron/radiusd.cron.monthly cryptpasswd) ;;
13814
13815   esac
13816 done # for ac_tag
13817
13818
13819 as_fn_exit 0
13820 _ACEOF
13821 ac_clean_files=$ac_clean_files_save
13822
13823 test $ac_write_fail = 0 ||
13824   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
13825
13826
13827 # configure is writing to config.log, and then calls config.status.
13828 # config.status does its own redirection, appending to config.log.
13829 # Unfortunately, on DOS this fails, as config.log is still kept open
13830 # by configure, so config.status won't be able to write to it; its
13831 # output is simply discarded.  So we exec the FD to /dev/null,
13832 # effectively closing config.log, so it can be properly (re)opened and
13833 # appended to by config.status.  When coming back to configure, we
13834 # need to make the FD available again.
13835 if test "$no_create" != yes; then
13836   ac_cs_success=:
13837   ac_config_status_args=
13838   test "$silent" = yes &&
13839     ac_config_status_args="$ac_config_status_args --quiet"
13840   exec 5>/dev/null
13841   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
13842   exec 5>>config.log
13843   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13844   # would make configure fail if this is the last instruction.
13845   $ac_cs_success || as_fn_exit 1
13846 fi
13847
13848 #
13849 # CONFIG_SUBDIRS section.
13850 #
13851 if test "$no_recursion" != yes; then
13852
13853   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
13854   # so they do not pile up.
13855   ac_sub_configure_args=
13856   ac_prev=
13857   eval "set x $ac_configure_args"
13858   shift
13859   for ac_arg
13860   do
13861     if test -n "$ac_prev"; then
13862       ac_prev=
13863       continue
13864     fi
13865     case $ac_arg in
13866     -cache-file | --cache-file | --cache-fil | --cache-fi \
13867     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
13868       ac_prev=cache_file ;;
13869     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
13870     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
13871     | --c=*)
13872       ;;
13873     --config-cache | -C)
13874       ;;
13875     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
13876       ac_prev=srcdir ;;
13877     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
13878       ;;
13879     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
13880       ac_prev=prefix ;;
13881     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
13882       ;;
13883     --disable-option-checking)
13884       ;;
13885     *)
13886       case $ac_arg in
13887       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
13888       esac
13889       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
13890     esac
13891   done
13892
13893   # Always prepend --prefix to ensure using the same prefix
13894   # in subdir configurations.
13895   ac_arg="--prefix=$prefix"
13896   case $ac_arg in
13897   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
13898   esac
13899   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
13900
13901   # Pass --silent
13902   if test "$silent" = yes; then
13903     ac_sub_configure_args="--silent $ac_sub_configure_args"
13904   fi
13905
13906   # Always prepend --disable-option-checking to silence warnings, since
13907   # different subdirs can have different --enable and --with options.
13908   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
13909
13910   ac_popdir=`pwd`
13911   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
13912
13913     # Do not complain, so a configure script can configure whichever
13914     # parts of a large source tree are present.
13915     test -d "$srcdir/$ac_dir" || continue
13916
13917     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
13918     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
13919     $as_echo "$ac_msg" >&6
13920     as_dir="$ac_dir"; as_fn_mkdir_p
13921     ac_builddir=.
13922
13923 case "$ac_dir" in
13924 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
13925 *)
13926   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
13927   # A ".." for each directory in $ac_dir_suffix.
13928   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
13929   case $ac_top_builddir_sub in
13930   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
13931   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
13932   esac ;;
13933 esac
13934 ac_abs_top_builddir=$ac_pwd
13935 ac_abs_builddir=$ac_pwd$ac_dir_suffix
13936 # for backward compatibility:
13937 ac_top_builddir=$ac_top_build_prefix
13938
13939 case $srcdir in
13940   .)  # We are building in place.
13941     ac_srcdir=.
13942     ac_top_srcdir=$ac_top_builddir_sub
13943     ac_abs_top_srcdir=$ac_pwd ;;
13944   [\\/]* | ?:[\\/]* )  # Absolute name.
13945     ac_srcdir=$srcdir$ac_dir_suffix;
13946     ac_top_srcdir=$srcdir
13947     ac_abs_top_srcdir=$srcdir ;;
13948   *) # Relative name.
13949     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
13950     ac_top_srcdir=$ac_top_build_prefix$srcdir
13951     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
13952 esac
13953 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
13954
13955
13956     cd "$ac_dir"
13957
13958     # Check for guested configure; otherwise get Cygnus style configure.
13959     if test -f "$ac_srcdir/configure.gnu"; then
13960       ac_sub_configure=$ac_srcdir/configure.gnu
13961     elif test -f "$ac_srcdir/configure"; then
13962       ac_sub_configure=$ac_srcdir/configure
13963     elif test -f "$ac_srcdir/configure.in"; then
13964       # This should be Cygnus configure.
13965       ac_sub_configure=$ac_aux_dir/configure
13966     else
13967       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
13968 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
13969       ac_sub_configure=
13970     fi
13971
13972     # The recursion is here.
13973     if test -n "$ac_sub_configure"; then
13974       # Make the cache file name correct relative to the subdirectory.
13975       case $cache_file in
13976       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
13977       *) # Relative name.
13978         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
13979       esac
13980
13981       { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
13982 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
13983       # The eval makes quoting arguments work.
13984       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
13985            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
13986         as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
13987     fi
13988
13989     cd "$ac_popdir"
13990   done
13991 fi
13992 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
13993   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
13994 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
13995 fi
13996
13997