RPM spec file: add missing files + bug bix
[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 RADIUSD_MAJOR_VERSION=`cat VERSION | sed 's/\..*//'`
2421 RADIUSD_MINOR_VERSION=`cat VERSION | sed 's/^[^\.]*\.//' | sed 's/\..*$//'`
2422 RADIUSD_INCRM_VERSION=`cat VERSION | sed 's/^.*\..*\.//' | sed 's/[\.-].*$//'`
2423
2424 RADIUSD_VERSION=`echo | awk -v major="$RADIUSD_MAJOR_VERSION" \
2425 -v minor="$RADIUSD_MINOR_VERSION" \
2426 -v incrm="$RADIUSD_INCRM_VERSION" \
2427 '{ printf "%02i%02i%02i", major, minor, incrm }'`
2428
2429 RADIUSD_VERSION_STRING=`cat VERSION`
2430
2431
2432
2433
2434 cat >>confdefs.h <<_ACEOF
2435 #define RADIUSD_VERSION ${RADIUSD_VERSION}
2436 _ACEOF
2437
2438
2439 cat >>confdefs.h <<_ACEOF
2440 #define RADIUSD_VERSION_STRING "${RADIUSD_VERSION_STRING}"
2441 _ACEOF
2442
2443
2444
2445 # Check whether --enable-developer was given.
2446 if test "${enable_developer+set}" = set; then :
2447   enableval=$enable_developer;  case "$enableval" in
2448   no)
2449     developer=no
2450     ;;
2451   *)
2452     developer=yes
2453   esac
2454
2455 fi
2456
2457
2458 if test -d $srcdir/.git; then
2459   if test "x$developer" != "xno"; then
2460     { $as_echo "$as_me:${as_lineno-$LINENO}: found .git directory, enabling developer build implicitly, disable with --disable-developer" >&5
2461 $as_echo "$as_me: found .git directory, enabling developer build implicitly, disable with --disable-developer" >&6;}
2462     developer="yes"
2463   fi
2464 fi
2465
2466 if test "x$developer" = "xyes"; then
2467   : ${CFLAGS=-g3}
2468 fi
2469
2470
2471 ac_aux_dir=
2472 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2473   if test -f "$ac_dir/install-sh"; then
2474     ac_aux_dir=$ac_dir
2475     ac_install_sh="$ac_aux_dir/install-sh -c"
2476     break
2477   elif test -f "$ac_dir/install.sh"; then
2478     ac_aux_dir=$ac_dir
2479     ac_install_sh="$ac_aux_dir/install.sh -c"
2480     break
2481   elif test -f "$ac_dir/shtool"; then
2482     ac_aux_dir=$ac_dir
2483     ac_install_sh="$ac_aux_dir/shtool install -c"
2484     break
2485   fi
2486 done
2487 if test -z "$ac_aux_dir"; then
2488   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2489 fi
2490
2491 # These three variables are undocumented and unsupported,
2492 # and are intended to be withdrawn in a future Autoconf release.
2493 # They can cause serious problems if a builder's source tree is in a directory
2494 # whose full name contains unusual characters.
2495 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2496 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2497 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2498
2499
2500 # Make sure we can run config.sub.
2501 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2502   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2503
2504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2505 $as_echo_n "checking build system type... " >&6; }
2506 if ${ac_cv_build+:} false; then :
2507   $as_echo_n "(cached) " >&6
2508 else
2509   ac_build_alias=$build_alias
2510 test "x$ac_build_alias" = x &&
2511   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2512 test "x$ac_build_alias" = x &&
2513   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2514 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2515   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2516
2517 fi
2518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2519 $as_echo "$ac_cv_build" >&6; }
2520 case $ac_cv_build in
2521 *-*-*) ;;
2522 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2523 esac
2524 build=$ac_cv_build
2525 ac_save_IFS=$IFS; IFS='-'
2526 set x $ac_cv_build
2527 shift
2528 build_cpu=$1
2529 build_vendor=$2
2530 shift; shift
2531 # Remember, the first character of IFS is used to create $*,
2532 # except with old shells:
2533 build_os=$*
2534 IFS=$ac_save_IFS
2535 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2536
2537
2538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2539 $as_echo_n "checking host system type... " >&6; }
2540 if ${ac_cv_host+:} false; then :
2541   $as_echo_n "(cached) " >&6
2542 else
2543   if test "x$host_alias" = x; then
2544   ac_cv_host=$ac_cv_build
2545 else
2546   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2547     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2548 fi
2549
2550 fi
2551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2552 $as_echo "$ac_cv_host" >&6; }
2553 case $ac_cv_host in
2554 *-*-*) ;;
2555 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2556 esac
2557 host=$ac_cv_host
2558 ac_save_IFS=$IFS; IFS='-'
2559 set x $ac_cv_host
2560 shift
2561 host_cpu=$1
2562 host_vendor=$2
2563 shift; shift
2564 # Remember, the first character of IFS is used to create $*,
2565 # except with old shells:
2566 host_os=$*
2567 IFS=$ac_save_IFS
2568 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2569
2570
2571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2572 $as_echo_n "checking target system type... " >&6; }
2573 if ${ac_cv_target+:} false; then :
2574   $as_echo_n "(cached) " >&6
2575 else
2576   if test "x$target_alias" = x; then
2577   ac_cv_target=$ac_cv_host
2578 else
2579   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2580     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2581 fi
2582
2583 fi
2584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2585 $as_echo "$ac_cv_target" >&6; }
2586 case $ac_cv_target in
2587 *-*-*) ;;
2588 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
2589 esac
2590 target=$ac_cv_target
2591 ac_save_IFS=$IFS; IFS='-'
2592 set x $ac_cv_target
2593 shift
2594 target_cpu=$1
2595 target_vendor=$2
2596 shift; shift
2597 # Remember, the first character of IFS is used to create $*,
2598 # except with old shells:
2599 target_os=$*
2600 IFS=$ac_save_IFS
2601 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2602
2603
2604 # The aliases save the names the user supplied, while $host etc.
2605 # will get canonicalized.
2606 test -n "$target_alias" &&
2607   test "$program_prefix$program_suffix$program_transform_name" = \
2608     NONENONEs,x,x, &&
2609   program_prefix=${target_alias}-
2610
2611
2612 ac_ext=c
2613 ac_cpp='$CPP $CPPFLAGS'
2614 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2615 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2616 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2617 if test -n "$ac_tool_prefix"; then
2618   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2619 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2621 $as_echo_n "checking for $ac_word... " >&6; }
2622 if ${ac_cv_prog_CC+:} false; then :
2623   $as_echo_n "(cached) " >&6
2624 else
2625   if test -n "$CC"; then
2626   ac_cv_prog_CC="$CC" # Let the user override the test.
2627 else
2628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2629 for as_dir in $PATH
2630 do
2631   IFS=$as_save_IFS
2632   test -z "$as_dir" && as_dir=.
2633     for ac_exec_ext in '' $ac_executable_extensions; do
2634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2635     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2637     break 2
2638   fi
2639 done
2640   done
2641 IFS=$as_save_IFS
2642
2643 fi
2644 fi
2645 CC=$ac_cv_prog_CC
2646 if test -n "$CC"; then
2647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2648 $as_echo "$CC" >&6; }
2649 else
2650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2651 $as_echo "no" >&6; }
2652 fi
2653
2654
2655 fi
2656 if test -z "$ac_cv_prog_CC"; then
2657   ac_ct_CC=$CC
2658   # Extract the first word of "gcc", so it can be a program name with args.
2659 set dummy gcc; ac_word=$2
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2661 $as_echo_n "checking for $ac_word... " >&6; }
2662 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2663   $as_echo_n "(cached) " >&6
2664 else
2665   if test -n "$ac_ct_CC"; then
2666   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2667 else
2668 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2669 for as_dir in $PATH
2670 do
2671   IFS=$as_save_IFS
2672   test -z "$as_dir" && as_dir=.
2673     for ac_exec_ext in '' $ac_executable_extensions; do
2674   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2675     ac_cv_prog_ac_ct_CC="gcc"
2676     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2677     break 2
2678   fi
2679 done
2680   done
2681 IFS=$as_save_IFS
2682
2683 fi
2684 fi
2685 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2686 if test -n "$ac_ct_CC"; then
2687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2688 $as_echo "$ac_ct_CC" >&6; }
2689 else
2690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2691 $as_echo "no" >&6; }
2692 fi
2693
2694   if test "x$ac_ct_CC" = x; then
2695     CC=""
2696   else
2697     case $cross_compiling:$ac_tool_warned in
2698 yes:)
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2700 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2701 ac_tool_warned=yes ;;
2702 esac
2703     CC=$ac_ct_CC
2704   fi
2705 else
2706   CC="$ac_cv_prog_CC"
2707 fi
2708
2709 if test -z "$CC"; then
2710           if test -n "$ac_tool_prefix"; then
2711     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2712 set dummy ${ac_tool_prefix}cc; ac_word=$2
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2714 $as_echo_n "checking for $ac_word... " >&6; }
2715 if ${ac_cv_prog_CC+:} false; then :
2716   $as_echo_n "(cached) " >&6
2717 else
2718   if test -n "$CC"; then
2719   ac_cv_prog_CC="$CC" # Let the user override the test.
2720 else
2721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2722 for as_dir in $PATH
2723 do
2724   IFS=$as_save_IFS
2725   test -z "$as_dir" && as_dir=.
2726     for ac_exec_ext in '' $ac_executable_extensions; do
2727   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2728     ac_cv_prog_CC="${ac_tool_prefix}cc"
2729     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2730     break 2
2731   fi
2732 done
2733   done
2734 IFS=$as_save_IFS
2735
2736 fi
2737 fi
2738 CC=$ac_cv_prog_CC
2739 if test -n "$CC"; then
2740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2741 $as_echo "$CC" >&6; }
2742 else
2743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2744 $as_echo "no" >&6; }
2745 fi
2746
2747
2748   fi
2749 fi
2750 if test -z "$CC"; then
2751   # Extract the first word of "cc", so it can be a program name with args.
2752 set dummy cc; ac_word=$2
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2754 $as_echo_n "checking for $ac_word... " >&6; }
2755 if ${ac_cv_prog_CC+:} false; then :
2756   $as_echo_n "(cached) " >&6
2757 else
2758   if test -n "$CC"; then
2759   ac_cv_prog_CC="$CC" # Let the user override the test.
2760 else
2761   ac_prog_rejected=no
2762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2763 for as_dir in $PATH
2764 do
2765   IFS=$as_save_IFS
2766   test -z "$as_dir" && as_dir=.
2767     for ac_exec_ext in '' $ac_executable_extensions; do
2768   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2769     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2770        ac_prog_rejected=yes
2771        continue
2772      fi
2773     ac_cv_prog_CC="cc"
2774     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2775     break 2
2776   fi
2777 done
2778   done
2779 IFS=$as_save_IFS
2780
2781 if test $ac_prog_rejected = yes; then
2782   # We found a bogon in the path, so make sure we never use it.
2783   set dummy $ac_cv_prog_CC
2784   shift
2785   if test $# != 0; then
2786     # We chose a different compiler from the bogus one.
2787     # However, it has the same basename, so the bogon will be chosen
2788     # first if we set CC to just the basename; use the full file name.
2789     shift
2790     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2791   fi
2792 fi
2793 fi
2794 fi
2795 CC=$ac_cv_prog_CC
2796 if test -n "$CC"; then
2797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2798 $as_echo "$CC" >&6; }
2799 else
2800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2801 $as_echo "no" >&6; }
2802 fi
2803
2804
2805 fi
2806 if test -z "$CC"; then
2807   if test -n "$ac_tool_prefix"; then
2808   for ac_prog in cl.exe
2809   do
2810     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2811 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2813 $as_echo_n "checking for $ac_word... " >&6; }
2814 if ${ac_cv_prog_CC+:} false; then :
2815   $as_echo_n "(cached) " >&6
2816 else
2817   if test -n "$CC"; then
2818   ac_cv_prog_CC="$CC" # Let the user override the test.
2819 else
2820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2821 for as_dir in $PATH
2822 do
2823   IFS=$as_save_IFS
2824   test -z "$as_dir" && as_dir=.
2825     for ac_exec_ext in '' $ac_executable_extensions; do
2826   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2827     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2828     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2829     break 2
2830   fi
2831 done
2832   done
2833 IFS=$as_save_IFS
2834
2835 fi
2836 fi
2837 CC=$ac_cv_prog_CC
2838 if test -n "$CC"; then
2839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2840 $as_echo "$CC" >&6; }
2841 else
2842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2843 $as_echo "no" >&6; }
2844 fi
2845
2846
2847     test -n "$CC" && break
2848   done
2849 fi
2850 if test -z "$CC"; then
2851   ac_ct_CC=$CC
2852   for ac_prog in cl.exe
2853 do
2854   # Extract the first word of "$ac_prog", so it can be a program name with args.
2855 set dummy $ac_prog; ac_word=$2
2856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2857 $as_echo_n "checking for $ac_word... " >&6; }
2858 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2859   $as_echo_n "(cached) " >&6
2860 else
2861   if test -n "$ac_ct_CC"; then
2862   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2863 else
2864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2865 for as_dir in $PATH
2866 do
2867   IFS=$as_save_IFS
2868   test -z "$as_dir" && as_dir=.
2869     for ac_exec_ext in '' $ac_executable_extensions; do
2870   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2871     ac_cv_prog_ac_ct_CC="$ac_prog"
2872     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2873     break 2
2874   fi
2875 done
2876   done
2877 IFS=$as_save_IFS
2878
2879 fi
2880 fi
2881 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2882 if test -n "$ac_ct_CC"; then
2883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2884 $as_echo "$ac_ct_CC" >&6; }
2885 else
2886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2887 $as_echo "no" >&6; }
2888 fi
2889
2890
2891   test -n "$ac_ct_CC" && break
2892 done
2893
2894   if test "x$ac_ct_CC" = x; then
2895     CC=""
2896   else
2897     case $cross_compiling:$ac_tool_warned in
2898 yes:)
2899 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2900 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2901 ac_tool_warned=yes ;;
2902 esac
2903     CC=$ac_ct_CC
2904   fi
2905 fi
2906
2907 fi
2908
2909
2910 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2911 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2912 as_fn_error $? "no acceptable C compiler found in \$PATH
2913 See \`config.log' for more details" "$LINENO" 5; }
2914
2915 # Provide some information about the compiler.
2916 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2917 set X $ac_compile
2918 ac_compiler=$2
2919 for ac_option in --version -v -V -qversion; do
2920   { { ac_try="$ac_compiler $ac_option >&5"
2921 case "(($ac_try" in
2922   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2923   *) ac_try_echo=$ac_try;;
2924 esac
2925 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2926 $as_echo "$ac_try_echo"; } >&5
2927   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2928   ac_status=$?
2929   if test -s conftest.err; then
2930     sed '10a\
2931 ... rest of stderr output deleted ...
2932          10q' conftest.err >conftest.er1
2933     cat conftest.er1 >&5
2934   fi
2935   rm -f conftest.er1 conftest.err
2936   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2937   test $ac_status = 0; }
2938 done
2939
2940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2941 /* end confdefs.h.  */
2942
2943 int
2944 main ()
2945 {
2946
2947   ;
2948   return 0;
2949 }
2950 _ACEOF
2951 ac_clean_files_save=$ac_clean_files
2952 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2953 # Try to create an executable without -o first, disregard a.out.
2954 # It will help us diagnose broken compilers, and finding out an intuition
2955 # of exeext.
2956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2957 $as_echo_n "checking whether the C compiler works... " >&6; }
2958 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2959
2960 # The possible output files:
2961 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2962
2963 ac_rmfiles=
2964 for ac_file in $ac_files
2965 do
2966   case $ac_file in
2967     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2968     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2969   esac
2970 done
2971 rm -f $ac_rmfiles
2972
2973 if { { ac_try="$ac_link_default"
2974 case "(($ac_try" in
2975   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2976   *) ac_try_echo=$ac_try;;
2977 esac
2978 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2979 $as_echo "$ac_try_echo"; } >&5
2980   (eval "$ac_link_default") 2>&5
2981   ac_status=$?
2982   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2983   test $ac_status = 0; }; then :
2984   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2985 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2986 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2987 # so that the user can short-circuit this test for compilers unknown to
2988 # Autoconf.
2989 for ac_file in $ac_files ''
2990 do
2991   test -f "$ac_file" || continue
2992   case $ac_file in
2993     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2994         ;;
2995     [ab].out )
2996         # We found the default executable, but exeext='' is most
2997         # certainly right.
2998         break;;
2999     *.* )
3000         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3001         then :; else
3002            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3003         fi
3004         # We set ac_cv_exeext here because the later test for it is not
3005         # safe: cross compilers may not add the suffix if given an `-o'
3006         # argument, so we may need to know it at that point already.
3007         # Even if this section looks crufty: it has the advantage of
3008         # actually working.
3009         break;;
3010     * )
3011         break;;
3012   esac
3013 done
3014 test "$ac_cv_exeext" = no && ac_cv_exeext=
3015
3016 else
3017   ac_file=''
3018 fi
3019 if test -z "$ac_file"; then :
3020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3021 $as_echo "no" >&6; }
3022 $as_echo "$as_me: failed program was:" >&5
3023 sed 's/^/| /' conftest.$ac_ext >&5
3024
3025 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3026 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3027 as_fn_error 77 "C compiler cannot create executables
3028 See \`config.log' for more details" "$LINENO" 5; }
3029 else
3030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3031 $as_echo "yes" >&6; }
3032 fi
3033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3034 $as_echo_n "checking for C compiler default output file name... " >&6; }
3035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3036 $as_echo "$ac_file" >&6; }
3037 ac_exeext=$ac_cv_exeext
3038
3039 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3040 ac_clean_files=$ac_clean_files_save
3041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3042 $as_echo_n "checking for suffix of executables... " >&6; }
3043 if { { ac_try="$ac_link"
3044 case "(($ac_try" in
3045   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3046   *) ac_try_echo=$ac_try;;
3047 esac
3048 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3049 $as_echo "$ac_try_echo"; } >&5
3050   (eval "$ac_link") 2>&5
3051   ac_status=$?
3052   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3053   test $ac_status = 0; }; then :
3054   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3055 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3056 # work properly (i.e., refer to `conftest.exe'), while it won't with
3057 # `rm'.
3058 for ac_file in conftest.exe conftest conftest.*; do
3059   test -f "$ac_file" || continue
3060   case $ac_file in
3061     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3062     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3063           break;;
3064     * ) break;;
3065   esac
3066 done
3067 else
3068   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3069 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3070 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3071 See \`config.log' for more details" "$LINENO" 5; }
3072 fi
3073 rm -f conftest conftest$ac_cv_exeext
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3075 $as_echo "$ac_cv_exeext" >&6; }
3076
3077 rm -f conftest.$ac_ext
3078 EXEEXT=$ac_cv_exeext
3079 ac_exeext=$EXEEXT
3080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3081 /* end confdefs.h.  */
3082 #include <stdio.h>
3083 int
3084 main ()
3085 {
3086 FILE *f = fopen ("conftest.out", "w");
3087  return ferror (f) || fclose (f) != 0;
3088
3089   ;
3090   return 0;
3091 }
3092 _ACEOF
3093 ac_clean_files="$ac_clean_files conftest.out"
3094 # Check that the compiler produces executables we can run.  If not, either
3095 # the compiler is broken, or we cross compile.
3096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3097 $as_echo_n "checking whether we are cross compiling... " >&6; }
3098 if test "$cross_compiling" != yes; then
3099   { { ac_try="$ac_link"
3100 case "(($ac_try" in
3101   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3102   *) ac_try_echo=$ac_try;;
3103 esac
3104 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3105 $as_echo "$ac_try_echo"; } >&5
3106   (eval "$ac_link") 2>&5
3107   ac_status=$?
3108   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3109   test $ac_status = 0; }
3110   if { ac_try='./conftest$ac_cv_exeext'
3111   { { case "(($ac_try" in
3112   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3113   *) ac_try_echo=$ac_try;;
3114 esac
3115 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3116 $as_echo "$ac_try_echo"; } >&5
3117   (eval "$ac_try") 2>&5
3118   ac_status=$?
3119   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3120   test $ac_status = 0; }; }; then
3121     cross_compiling=no
3122   else
3123     if test "$cross_compiling" = maybe; then
3124         cross_compiling=yes
3125     else
3126         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3127 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3128 as_fn_error $? "cannot run C compiled programs.
3129 If you meant to cross compile, use \`--host'.
3130 See \`config.log' for more details" "$LINENO" 5; }
3131     fi
3132   fi
3133 fi
3134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3135 $as_echo "$cross_compiling" >&6; }
3136
3137 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3138 ac_clean_files=$ac_clean_files_save
3139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3140 $as_echo_n "checking for suffix of object files... " >&6; }
3141 if ${ac_cv_objext+:} false; then :
3142   $as_echo_n "(cached) " >&6
3143 else
3144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3145 /* end confdefs.h.  */
3146
3147 int
3148 main ()
3149 {
3150
3151   ;
3152   return 0;
3153 }
3154 _ACEOF
3155 rm -f conftest.o conftest.obj
3156 if { { ac_try="$ac_compile"
3157 case "(($ac_try" in
3158   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3159   *) ac_try_echo=$ac_try;;
3160 esac
3161 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3162 $as_echo "$ac_try_echo"; } >&5
3163   (eval "$ac_compile") 2>&5
3164   ac_status=$?
3165   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3166   test $ac_status = 0; }; then :
3167   for ac_file in conftest.o conftest.obj conftest.*; do
3168   test -f "$ac_file" || continue;
3169   case $ac_file in
3170     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3171     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3172        break;;
3173   esac
3174 done
3175 else
3176   $as_echo "$as_me: failed program was:" >&5
3177 sed 's/^/| /' conftest.$ac_ext >&5
3178
3179 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3180 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3181 as_fn_error $? "cannot compute suffix of object files: cannot compile
3182 See \`config.log' for more details" "$LINENO" 5; }
3183 fi
3184 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3185 fi
3186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3187 $as_echo "$ac_cv_objext" >&6; }
3188 OBJEXT=$ac_cv_objext
3189 ac_objext=$OBJEXT
3190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3191 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3192 if ${ac_cv_c_compiler_gnu+:} false; then :
3193   $as_echo_n "(cached) " >&6
3194 else
3195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3196 /* end confdefs.h.  */
3197
3198 int
3199 main ()
3200 {
3201 #ifndef __GNUC__
3202        choke me
3203 #endif
3204
3205   ;
3206   return 0;
3207 }
3208 _ACEOF
3209 if ac_fn_c_try_compile "$LINENO"; then :
3210   ac_compiler_gnu=yes
3211 else
3212   ac_compiler_gnu=no
3213 fi
3214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3215 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3216
3217 fi
3218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3219 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3220 if test $ac_compiler_gnu = yes; then
3221   GCC=yes
3222 else
3223   GCC=
3224 fi
3225 ac_test_CFLAGS=${CFLAGS+set}
3226 ac_save_CFLAGS=$CFLAGS
3227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3228 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3229 if ${ac_cv_prog_cc_g+:} false; then :
3230   $as_echo_n "(cached) " >&6
3231 else
3232   ac_save_c_werror_flag=$ac_c_werror_flag
3233    ac_c_werror_flag=yes
3234    ac_cv_prog_cc_g=no
3235    CFLAGS="-g"
3236    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3237 /* end confdefs.h.  */
3238
3239 int
3240 main ()
3241 {
3242
3243   ;
3244   return 0;
3245 }
3246 _ACEOF
3247 if ac_fn_c_try_compile "$LINENO"; then :
3248   ac_cv_prog_cc_g=yes
3249 else
3250   CFLAGS=""
3251       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3252 /* end confdefs.h.  */
3253
3254 int
3255 main ()
3256 {
3257
3258   ;
3259   return 0;
3260 }
3261 _ACEOF
3262 if ac_fn_c_try_compile "$LINENO"; then :
3263
3264 else
3265   ac_c_werror_flag=$ac_save_c_werror_flag
3266          CFLAGS="-g"
3267          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3268 /* end confdefs.h.  */
3269
3270 int
3271 main ()
3272 {
3273
3274   ;
3275   return 0;
3276 }
3277 _ACEOF
3278 if ac_fn_c_try_compile "$LINENO"; then :
3279   ac_cv_prog_cc_g=yes
3280 fi
3281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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    ac_c_werror_flag=$ac_save_c_werror_flag
3287 fi
3288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3289 $as_echo "$ac_cv_prog_cc_g" >&6; }
3290 if test "$ac_test_CFLAGS" = set; then
3291   CFLAGS=$ac_save_CFLAGS
3292 elif test $ac_cv_prog_cc_g = yes; then
3293   if test "$GCC" = yes; then
3294     CFLAGS="-g -O2"
3295   else
3296     CFLAGS="-g"
3297   fi
3298 else
3299   if test "$GCC" = yes; then
3300     CFLAGS="-O2"
3301   else
3302     CFLAGS=
3303   fi
3304 fi
3305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3306 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3307 if ${ac_cv_prog_cc_c89+:} false; then :
3308   $as_echo_n "(cached) " >&6
3309 else
3310   ac_cv_prog_cc_c89=no
3311 ac_save_CC=$CC
3312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3313 /* end confdefs.h.  */
3314 #include <stdarg.h>
3315 #include <stdio.h>
3316 struct stat;
3317 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3318 struct buf { int x; };
3319 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3320 static char *e (p, i)
3321      char **p;
3322      int i;
3323 {
3324   return p[i];
3325 }
3326 static char *f (char * (*g) (char **, int), char **p, ...)
3327 {
3328   char *s;
3329   va_list v;
3330   va_start (v,p);
3331   s = g (p, va_arg (v,int));
3332   va_end (v);
3333   return s;
3334 }
3335
3336 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3337    function prototypes and stuff, but not '\xHH' hex character constants.
3338    These don't provoke an error unfortunately, instead are silently treated
3339    as 'x'.  The following induces an error, until -std is added to get
3340    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3341    array size at least.  It's necessary to write '\x00'==0 to get something
3342    that's true only with -std.  */
3343 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3344
3345 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3346    inside strings and character constants.  */
3347 #define FOO(x) 'x'
3348 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3349
3350 int test (int i, double x);
3351 struct s1 {int (*f) (int a);};
3352 struct s2 {int (*f) (double a);};
3353 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3354 int argc;
3355 char **argv;
3356 int
3357 main ()
3358 {
3359 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3360   ;
3361   return 0;
3362 }
3363 _ACEOF
3364 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3365         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3366 do
3367   CC="$ac_save_CC $ac_arg"
3368   if ac_fn_c_try_compile "$LINENO"; then :
3369   ac_cv_prog_cc_c89=$ac_arg
3370 fi
3371 rm -f core conftest.err conftest.$ac_objext
3372   test "x$ac_cv_prog_cc_c89" != "xno" && break
3373 done
3374 rm -f conftest.$ac_ext
3375 CC=$ac_save_CC
3376
3377 fi
3378 # AC_CACHE_VAL
3379 case "x$ac_cv_prog_cc_c89" in
3380   x)
3381     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3382 $as_echo "none needed" >&6; } ;;
3383   xno)
3384     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3385 $as_echo "unsupported" >&6; } ;;
3386   *)
3387     CC="$CC $ac_cv_prog_cc_c89"
3388     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3389 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3390 esac
3391 if test "x$ac_cv_prog_cc_c89" != xno; then :
3392
3393 fi
3394
3395 ac_ext=c
3396 ac_cpp='$CPP $CPPFLAGS'
3397 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3398 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3399 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3400
3401 ac_ext=cpp
3402 ac_cpp='$CXXCPP $CPPFLAGS'
3403 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3404 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3405 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3406 if test -z "$CXX"; then
3407   if test -n "$CCC"; then
3408     CXX=$CCC
3409   else
3410     if test -n "$ac_tool_prefix"; then
3411   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3412   do
3413     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3414 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3416 $as_echo_n "checking for $ac_word... " >&6; }
3417 if ${ac_cv_prog_CXX+:} false; then :
3418   $as_echo_n "(cached) " >&6
3419 else
3420   if test -n "$CXX"; then
3421   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3422 else
3423 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3424 for as_dir in $PATH
3425 do
3426   IFS=$as_save_IFS
3427   test -z "$as_dir" && as_dir=.
3428     for ac_exec_ext in '' $ac_executable_extensions; do
3429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3430     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3432     break 2
3433   fi
3434 done
3435   done
3436 IFS=$as_save_IFS
3437
3438 fi
3439 fi
3440 CXX=$ac_cv_prog_CXX
3441 if test -n "$CXX"; then
3442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3443 $as_echo "$CXX" >&6; }
3444 else
3445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3446 $as_echo "no" >&6; }
3447 fi
3448
3449
3450     test -n "$CXX" && break
3451   done
3452 fi
3453 if test -z "$CXX"; then
3454   ac_ct_CXX=$CXX
3455   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3456 do
3457   # Extract the first word of "$ac_prog", so it can be a program name with args.
3458 set dummy $ac_prog; ac_word=$2
3459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3460 $as_echo_n "checking for $ac_word... " >&6; }
3461 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3462   $as_echo_n "(cached) " >&6
3463 else
3464   if test -n "$ac_ct_CXX"; then
3465   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3466 else
3467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3468 for as_dir in $PATH
3469 do
3470   IFS=$as_save_IFS
3471   test -z "$as_dir" && as_dir=.
3472     for ac_exec_ext in '' $ac_executable_extensions; do
3473   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3474     ac_cv_prog_ac_ct_CXX="$ac_prog"
3475     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3476     break 2
3477   fi
3478 done
3479   done
3480 IFS=$as_save_IFS
3481
3482 fi
3483 fi
3484 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3485 if test -n "$ac_ct_CXX"; then
3486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3487 $as_echo "$ac_ct_CXX" >&6; }
3488 else
3489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3490 $as_echo "no" >&6; }
3491 fi
3492
3493
3494   test -n "$ac_ct_CXX" && break
3495 done
3496
3497   if test "x$ac_ct_CXX" = x; then
3498     CXX="g++"
3499   else
3500     case $cross_compiling:$ac_tool_warned in
3501 yes:)
3502 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3503 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3504 ac_tool_warned=yes ;;
3505 esac
3506     CXX=$ac_ct_CXX
3507   fi
3508 fi
3509
3510   fi
3511 fi
3512 # Provide some information about the compiler.
3513 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3514 set X $ac_compile
3515 ac_compiler=$2
3516 for ac_option in --version -v -V -qversion; do
3517   { { ac_try="$ac_compiler $ac_option >&5"
3518 case "(($ac_try" in
3519   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3520   *) ac_try_echo=$ac_try;;
3521 esac
3522 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3523 $as_echo "$ac_try_echo"; } >&5
3524   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3525   ac_status=$?
3526   if test -s conftest.err; then
3527     sed '10a\
3528 ... rest of stderr output deleted ...
3529          10q' conftest.err >conftest.er1
3530     cat conftest.er1 >&5
3531   fi
3532   rm -f conftest.er1 conftest.err
3533   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3534   test $ac_status = 0; }
3535 done
3536
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3538 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3539 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3540   $as_echo_n "(cached) " >&6
3541 else
3542   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3543 /* end confdefs.h.  */
3544
3545 int
3546 main ()
3547 {
3548 #ifndef __GNUC__
3549        choke me
3550 #endif
3551
3552   ;
3553   return 0;
3554 }
3555 _ACEOF
3556 if ac_fn_cxx_try_compile "$LINENO"; then :
3557   ac_compiler_gnu=yes
3558 else
3559   ac_compiler_gnu=no
3560 fi
3561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3562 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3563
3564 fi
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3566 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3567 if test $ac_compiler_gnu = yes; then
3568   GXX=yes
3569 else
3570   GXX=
3571 fi
3572 ac_test_CXXFLAGS=${CXXFLAGS+set}
3573 ac_save_CXXFLAGS=$CXXFLAGS
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3575 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3576 if ${ac_cv_prog_cxx_g+:} false; then :
3577   $as_echo_n "(cached) " >&6
3578 else
3579   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3580    ac_cxx_werror_flag=yes
3581    ac_cv_prog_cxx_g=no
3582    CXXFLAGS="-g"
3583    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3584 /* end confdefs.h.  */
3585
3586 int
3587 main ()
3588 {
3589
3590   ;
3591   return 0;
3592 }
3593 _ACEOF
3594 if ac_fn_cxx_try_compile "$LINENO"; then :
3595   ac_cv_prog_cxx_g=yes
3596 else
3597   CXXFLAGS=""
3598       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3599 /* end confdefs.h.  */
3600
3601 int
3602 main ()
3603 {
3604
3605   ;
3606   return 0;
3607 }
3608 _ACEOF
3609 if ac_fn_cxx_try_compile "$LINENO"; then :
3610
3611 else
3612   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3613          CXXFLAGS="-g"
3614          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3615 /* end confdefs.h.  */
3616
3617 int
3618 main ()
3619 {
3620
3621   ;
3622   return 0;
3623 }
3624 _ACEOF
3625 if ac_fn_cxx_try_compile "$LINENO"; then :
3626   ac_cv_prog_cxx_g=yes
3627 fi
3628 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3634 fi
3635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3636 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3637 if test "$ac_test_CXXFLAGS" = set; then
3638   CXXFLAGS=$ac_save_CXXFLAGS
3639 elif test $ac_cv_prog_cxx_g = yes; then
3640   if test "$GXX" = yes; then
3641     CXXFLAGS="-g -O2"
3642   else
3643     CXXFLAGS="-g"
3644   fi
3645 else
3646   if test "$GXX" = yes; then
3647     CXXFLAGS="-O2"
3648   else
3649     CXXFLAGS=
3650   fi
3651 fi
3652 ac_ext=c
3653 ac_cpp='$CPP $CPPFLAGS'
3654 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3655 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3656 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3657
3658
3659
3660 ac_ext=c
3661 ac_cpp='$CPP $CPPFLAGS'
3662 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3663 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3664 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3666 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3667 # On Suns, sometimes $CPP names a directory.
3668 if test -n "$CPP" && test -d "$CPP"; then
3669   CPP=
3670 fi
3671 if test -z "$CPP"; then
3672   if ${ac_cv_prog_CPP+:} false; then :
3673   $as_echo_n "(cached) " >&6
3674 else
3675       # Double quotes because CPP needs to be expanded
3676     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3677     do
3678       ac_preproc_ok=false
3679 for ac_c_preproc_warn_flag in '' yes
3680 do
3681   # Use a header file that comes with gcc, so configuring glibc
3682   # with a fresh cross-compiler works.
3683   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3684   # <limits.h> exists even on freestanding compilers.
3685   # On the NeXT, cc -E runs the code through the compiler's parser,
3686   # not just through cpp. "Syntax error" is here to catch this case.
3687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3688 /* end confdefs.h.  */
3689 #ifdef __STDC__
3690 # include <limits.h>
3691 #else
3692 # include <assert.h>
3693 #endif
3694                      Syntax error
3695 _ACEOF
3696 if ac_fn_c_try_cpp "$LINENO"; then :
3697
3698 else
3699   # Broken: fails on valid input.
3700 continue
3701 fi
3702 rm -f conftest.err conftest.i conftest.$ac_ext
3703
3704   # OK, works on sane cases.  Now check whether nonexistent headers
3705   # can be detected and how.
3706   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3707 /* end confdefs.h.  */
3708 #include <ac_nonexistent.h>
3709 _ACEOF
3710 if ac_fn_c_try_cpp "$LINENO"; then :
3711   # Broken: success on invalid input.
3712 continue
3713 else
3714   # Passes both tests.
3715 ac_preproc_ok=:
3716 break
3717 fi
3718 rm -f conftest.err conftest.i conftest.$ac_ext
3719
3720 done
3721 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3722 rm -f conftest.i conftest.err conftest.$ac_ext
3723 if $ac_preproc_ok; then :
3724   break
3725 fi
3726
3727     done
3728     ac_cv_prog_CPP=$CPP
3729
3730 fi
3731   CPP=$ac_cv_prog_CPP
3732 else
3733   ac_cv_prog_CPP=$CPP
3734 fi
3735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3736 $as_echo "$CPP" >&6; }
3737 ac_preproc_ok=false
3738 for ac_c_preproc_warn_flag in '' yes
3739 do
3740   # Use a header file that comes with gcc, so configuring glibc
3741   # with a fresh cross-compiler works.
3742   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3743   # <limits.h> exists even on freestanding compilers.
3744   # On the NeXT, cc -E runs the code through the compiler's parser,
3745   # not just through cpp. "Syntax error" is here to catch this case.
3746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3747 /* end confdefs.h.  */
3748 #ifdef __STDC__
3749 # include <limits.h>
3750 #else
3751 # include <assert.h>
3752 #endif
3753                      Syntax error
3754 _ACEOF
3755 if ac_fn_c_try_cpp "$LINENO"; then :
3756
3757 else
3758   # Broken: fails on valid input.
3759 continue
3760 fi
3761 rm -f conftest.err conftest.i conftest.$ac_ext
3762
3763   # OK, works on sane cases.  Now check whether nonexistent headers
3764   # can be detected and how.
3765   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3766 /* end confdefs.h.  */
3767 #include <ac_nonexistent.h>
3768 _ACEOF
3769 if ac_fn_c_try_cpp "$LINENO"; then :
3770   # Broken: success on invalid input.
3771 continue
3772 else
3773   # Passes both tests.
3774 ac_preproc_ok=:
3775 break
3776 fi
3777 rm -f conftest.err conftest.i conftest.$ac_ext
3778
3779 done
3780 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3781 rm -f conftest.i conftest.err conftest.$ac_ext
3782 if $ac_preproc_ok; then :
3783
3784 else
3785   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3786 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3787 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3788 See \`config.log' for more details" "$LINENO" 5; }
3789 fi
3790
3791 ac_ext=c
3792 ac_cpp='$CPP $CPPFLAGS'
3793 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3794 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3795 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3796
3797
3798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3799 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3800 if ${ac_cv_path_GREP+:} false; then :
3801   $as_echo_n "(cached) " >&6
3802 else
3803   if test -z "$GREP"; then
3804   ac_path_GREP_found=false
3805   # Loop through the user's path and test for each of PROGNAME-LIST
3806   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3807 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3808 do
3809   IFS=$as_save_IFS
3810   test -z "$as_dir" && as_dir=.
3811     for ac_prog in grep ggrep; do
3812     for ac_exec_ext in '' $ac_executable_extensions; do
3813       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3814       as_fn_executable_p "$ac_path_GREP" || continue
3815 # Check for GNU ac_path_GREP and select it if it is found.
3816   # Check for GNU $ac_path_GREP
3817 case `"$ac_path_GREP" --version 2>&1` in
3818 *GNU*)
3819   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3820 *)
3821   ac_count=0
3822   $as_echo_n 0123456789 >"conftest.in"
3823   while :
3824   do
3825     cat "conftest.in" "conftest.in" >"conftest.tmp"
3826     mv "conftest.tmp" "conftest.in"
3827     cp "conftest.in" "conftest.nl"
3828     $as_echo 'GREP' >> "conftest.nl"
3829     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3830     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3831     as_fn_arith $ac_count + 1 && ac_count=$as_val
3832     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3833       # Best one so far, save it but keep looking for a better one
3834       ac_cv_path_GREP="$ac_path_GREP"
3835       ac_path_GREP_max=$ac_count
3836     fi
3837     # 10*(2^10) chars as input seems more than enough
3838     test $ac_count -gt 10 && break
3839   done
3840   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3841 esac
3842
3843       $ac_path_GREP_found && break 3
3844     done
3845   done
3846   done
3847 IFS=$as_save_IFS
3848   if test -z "$ac_cv_path_GREP"; then
3849     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3850   fi
3851 else
3852   ac_cv_path_GREP=$GREP
3853 fi
3854
3855 fi
3856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3857 $as_echo "$ac_cv_path_GREP" >&6; }
3858  GREP="$ac_cv_path_GREP"
3859
3860
3861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3862 $as_echo_n "checking for egrep... " >&6; }
3863 if ${ac_cv_path_EGREP+:} false; then :
3864   $as_echo_n "(cached) " >&6
3865 else
3866   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3867    then ac_cv_path_EGREP="$GREP -E"
3868    else
3869      if test -z "$EGREP"; then
3870   ac_path_EGREP_found=false
3871   # Loop through the user's path and test for each of PROGNAME-LIST
3872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3873 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3874 do
3875   IFS=$as_save_IFS
3876   test -z "$as_dir" && as_dir=.
3877     for ac_prog in egrep; do
3878     for ac_exec_ext in '' $ac_executable_extensions; do
3879       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3880       as_fn_executable_p "$ac_path_EGREP" || continue
3881 # Check for GNU ac_path_EGREP and select it if it is found.
3882   # Check for GNU $ac_path_EGREP
3883 case `"$ac_path_EGREP" --version 2>&1` in
3884 *GNU*)
3885   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3886 *)
3887   ac_count=0
3888   $as_echo_n 0123456789 >"conftest.in"
3889   while :
3890   do
3891     cat "conftest.in" "conftest.in" >"conftest.tmp"
3892     mv "conftest.tmp" "conftest.in"
3893     cp "conftest.in" "conftest.nl"
3894     $as_echo 'EGREP' >> "conftest.nl"
3895     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3896     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3897     as_fn_arith $ac_count + 1 && ac_count=$as_val
3898     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3899       # Best one so far, save it but keep looking for a better one
3900       ac_cv_path_EGREP="$ac_path_EGREP"
3901       ac_path_EGREP_max=$ac_count
3902     fi
3903     # 10*(2^10) chars as input seems more than enough
3904     test $ac_count -gt 10 && break
3905   done
3906   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3907 esac
3908
3909       $ac_path_EGREP_found && break 3
3910     done
3911   done
3912   done
3913 IFS=$as_save_IFS
3914   if test -z "$ac_cv_path_EGREP"; then
3915     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3916   fi
3917 else
3918   ac_cv_path_EGREP=$EGREP
3919 fi
3920
3921    fi
3922 fi
3923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3924 $as_echo "$ac_cv_path_EGREP" >&6; }
3925  EGREP="$ac_cv_path_EGREP"
3926
3927
3928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3929 $as_echo_n "checking for ANSI C header files... " >&6; }
3930 if ${ac_cv_header_stdc+:} false; then :
3931   $as_echo_n "(cached) " >&6
3932 else
3933   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3934 /* end confdefs.h.  */
3935 #include <stdlib.h>
3936 #include <stdarg.h>
3937 #include <string.h>
3938 #include <float.h>
3939
3940 int
3941 main ()
3942 {
3943
3944   ;
3945   return 0;
3946 }
3947 _ACEOF
3948 if ac_fn_c_try_compile "$LINENO"; then :
3949   ac_cv_header_stdc=yes
3950 else
3951   ac_cv_header_stdc=no
3952 fi
3953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3954
3955 if test $ac_cv_header_stdc = yes; then
3956   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3957   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3958 /* end confdefs.h.  */
3959 #include <string.h>
3960
3961 _ACEOF
3962 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3963   $EGREP "memchr" >/dev/null 2>&1; then :
3964
3965 else
3966   ac_cv_header_stdc=no
3967 fi
3968 rm -f conftest*
3969
3970 fi
3971
3972 if test $ac_cv_header_stdc = yes; then
3973   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3975 /* end confdefs.h.  */
3976 #include <stdlib.h>
3977
3978 _ACEOF
3979 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3980   $EGREP "free" >/dev/null 2>&1; then :
3981
3982 else
3983   ac_cv_header_stdc=no
3984 fi
3985 rm -f conftest*
3986
3987 fi
3988
3989 if test $ac_cv_header_stdc = yes; then
3990   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3991   if test "$cross_compiling" = yes; then :
3992   :
3993 else
3994   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3995 /* end confdefs.h.  */
3996 #include <ctype.h>
3997 #include <stdlib.h>
3998 #if ((' ' & 0x0FF) == 0x020)
3999 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4000 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4001 #else
4002 # define ISLOWER(c) \
4003                    (('a' <= (c) && (c) <= 'i') \
4004                      || ('j' <= (c) && (c) <= 'r') \
4005                      || ('s' <= (c) && (c) <= 'z'))
4006 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4007 #endif
4008
4009 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4010 int
4011 main ()
4012 {
4013   int i;
4014   for (i = 0; i < 256; i++)
4015     if (XOR (islower (i), ISLOWER (i))
4016         || toupper (i) != TOUPPER (i))
4017       return 2;
4018   return 0;
4019 }
4020 _ACEOF
4021 if ac_fn_c_try_run "$LINENO"; then :
4022
4023 else
4024   ac_cv_header_stdc=no
4025 fi
4026 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4027   conftest.$ac_objext conftest.beam conftest.$ac_ext
4028 fi
4029
4030 fi
4031 fi
4032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4033 $as_echo "$ac_cv_header_stdc" >&6; }
4034 if test $ac_cv_header_stdc = yes; then
4035
4036 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4037
4038 fi
4039
4040 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4041 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4042                   inttypes.h stdint.h unistd.h
4043 do :
4044   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4045 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4046 "
4047 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4048   cat >>confdefs.h <<_ACEOF
4049 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4050 _ACEOF
4051
4052 fi
4053
4054 done
4055
4056
4057
4058   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4059 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4060   MINIX=yes
4061 else
4062   MINIX=
4063 fi
4064
4065
4066   if test "$MINIX" = yes; then
4067
4068 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4069
4070
4071 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4072
4073
4074 $as_echo "#define _MINIX 1" >>confdefs.h
4075
4076   fi
4077
4078
4079   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4080 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4081 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4082   $as_echo_n "(cached) " >&6
4083 else
4084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4085 /* end confdefs.h.  */
4086
4087 #         define __EXTENSIONS__ 1
4088           $ac_includes_default
4089 int
4090 main ()
4091 {
4092
4093   ;
4094   return 0;
4095 }
4096 _ACEOF
4097 if ac_fn_c_try_compile "$LINENO"; then :
4098   ac_cv_safe_to_define___extensions__=yes
4099 else
4100   ac_cv_safe_to_define___extensions__=no
4101 fi
4102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4103 fi
4104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4105 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4106   test $ac_cv_safe_to_define___extensions__ = yes &&
4107     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4108
4109   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4110
4111   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4112
4113   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4114
4115   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4116
4117
4118
4119
4120 if test $ac_cv_c_compiler_gnu = yes; then
4121     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
4122 $as_echo_n "checking whether $CC needs -traditional... " >&6; }
4123 if ${ac_cv_prog_gcc_traditional+:} false; then :
4124   $as_echo_n "(cached) " >&6
4125 else
4126     ac_pattern="Autoconf.*'x'"
4127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4128 /* end confdefs.h.  */
4129 #include <sgtty.h>
4130 Autoconf TIOCGETP
4131 _ACEOF
4132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4133   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
4134   ac_cv_prog_gcc_traditional=yes
4135 else
4136   ac_cv_prog_gcc_traditional=no
4137 fi
4138 rm -f conftest*
4139
4140
4141   if test $ac_cv_prog_gcc_traditional = no; then
4142     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4143 /* end confdefs.h.  */
4144 #include <termio.h>
4145 Autoconf TCGETA
4146 _ACEOF
4147 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4148   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
4149   ac_cv_prog_gcc_traditional=yes
4150 fi
4151 rm -f conftest*
4152
4153   fi
4154 fi
4155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
4156 $as_echo "$ac_cv_prog_gcc_traditional" >&6; }
4157   if test $ac_cv_prog_gcc_traditional = yes; then
4158     CC="$CC -traditional"
4159   fi
4160 fi
4161
4162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using SUNPro C" >&5
4163 $as_echo_n "checking whether we are using SUNPro C... " >&6; }
4164 if ${ac_cv_prog_suncc+:} false; then :
4165   $as_echo_n "(cached) " >&6
4166 else
4167   cat > conftest.c <<EOF
4168 #ifdef __SUNPRO_C
4169   yes;
4170 #endif
4171 EOF
4172 if { ac_try='${CC-cc} -E conftest.c'
4173   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
4174   (eval $ac_try) 2>&5
4175   ac_status=$?
4176   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4177   test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
4178   ac_cv_prog_suncc=yes
4179 else
4180   ac_cv_prog_suncc=no
4181 fi
4182 fi
4183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_suncc" >&5
4184 $as_echo "$ac_cv_prog_suncc" >&6; }
4185 if test -n "$ac_tool_prefix"; then
4186   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4187 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4189 $as_echo_n "checking for $ac_word... " >&6; }
4190 if ${ac_cv_prog_RANLIB+:} false; then :
4191   $as_echo_n "(cached) " >&6
4192 else
4193   if test -n "$RANLIB"; then
4194   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4195 else
4196 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4197 for as_dir in $PATH
4198 do
4199   IFS=$as_save_IFS
4200   test -z "$as_dir" && as_dir=.
4201     for ac_exec_ext in '' $ac_executable_extensions; do
4202   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4203     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4205     break 2
4206   fi
4207 done
4208   done
4209 IFS=$as_save_IFS
4210
4211 fi
4212 fi
4213 RANLIB=$ac_cv_prog_RANLIB
4214 if test -n "$RANLIB"; then
4215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4216 $as_echo "$RANLIB" >&6; }
4217 else
4218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4219 $as_echo "no" >&6; }
4220 fi
4221
4222
4223 fi
4224 if test -z "$ac_cv_prog_RANLIB"; then
4225   ac_ct_RANLIB=$RANLIB
4226   # Extract the first word of "ranlib", so it can be a program name with args.
4227 set dummy ranlib; ac_word=$2
4228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4229 $as_echo_n "checking for $ac_word... " >&6; }
4230 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4231   $as_echo_n "(cached) " >&6
4232 else
4233   if test -n "$ac_ct_RANLIB"; then
4234   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4235 else
4236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4237 for as_dir in $PATH
4238 do
4239   IFS=$as_save_IFS
4240   test -z "$as_dir" && as_dir=.
4241     for ac_exec_ext in '' $ac_executable_extensions; do
4242   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4243     ac_cv_prog_ac_ct_RANLIB="ranlib"
4244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4245     break 2
4246   fi
4247 done
4248   done
4249 IFS=$as_save_IFS
4250
4251 fi
4252 fi
4253 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4254 if test -n "$ac_ct_RANLIB"; then
4255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4256 $as_echo "$ac_ct_RANLIB" >&6; }
4257 else
4258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4259 $as_echo "no" >&6; }
4260 fi
4261
4262   if test "x$ac_ct_RANLIB" = x; then
4263     RANLIB=":"
4264   else
4265     case $cross_compiling:$ac_tool_warned in
4266 yes:)
4267 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4268 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4269 ac_tool_warned=yes ;;
4270 esac
4271     RANLIB=$ac_ct_RANLIB
4272   fi
4273 else
4274   RANLIB="$ac_cv_prog_RANLIB"
4275 fi
4276
4277
4278
4279   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is clang" >&5
4280 $as_echo_n "checking if compiler is clang... " >&6; }
4281 if ${ax_cv_cc_clang+:} false; then :
4282   $as_echo_n "(cached) " >&6
4283 else
4284
4285
4286   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4287 /* end confdefs.h.  */
4288
4289 int
4290 main ()
4291 {
4292
4293     #ifndef __clang__
4294          not clang
4295     #endif
4296
4297   ;
4298   return 0;
4299 }
4300 _ACEOF
4301 if ac_fn_c_try_compile "$LINENO"; then :
4302   ax_cv_cc_clang=yes
4303 else
4304   ax_cv_cc_clang=no
4305 fi
4306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4307
4308 fi
4309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_clang" >&5
4310 $as_echo "$ax_cv_cc_clang" >&6; }
4311
4312 if test "x$ax_cv_cc_clang" = "xyes"; then
4313   clang_path="$CC"
4314
4315 else
4316   clang_path=""
4317
4318 fi
4319
4320
4321 if test "x$GCC" = "xyes"; then
4322   CFLAGS="$CFLAGS -Wall -std=c99 -D_GNU_SOURCE"
4323 fi
4324
4325
4326   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Qunused-arguments\"" >&5
4327 $as_echo_n "checking for the compiler flag \"-Qunused-arguments\"... " >&6; }
4328 if ${ax_cv_cc_qunused_arguments_flag+:} false; then :
4329   $as_echo_n "(cached) " >&6
4330 else
4331
4332
4333     CFLAGS_SAVED=$CFLAGS
4334     CFLAGS="$CFLAGS -Werror -Qunused-arguments -foobar"
4335
4336     ac_ext=c
4337 ac_cpp='$CPP $CPPFLAGS'
4338 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4339 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4340 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4341
4342     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4343 /* end confdefs.h.  */
4344
4345 int
4346 main ()
4347 {
4348 return 0;
4349   ;
4350   return 0;
4351 }
4352 _ACEOF
4353 if ac_fn_c_try_compile "$LINENO"; then :
4354   ax_cv_cc_qunused_arguments_flag="yes"
4355 else
4356   ax_cv_cc_qunused_arguments_flag="no"
4357 fi
4358 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4359     ac_ext=c
4360 ac_cpp='$CPP $CPPFLAGS'
4361 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4362 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4363 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4364
4365
4366     CFLAGS="$CFLAGS_SAVED"
4367
4368 fi
4369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_qunused_arguments_flag" >&5
4370 $as_echo "$ax_cv_cc_qunused_arguments_flag" >&6; }
4371
4372 if test "x$ax_cv_cc_qunused_arguments_flag" = "xyes"; then
4373   CFLAGS="$CFLAGS -Qunused-arguments"
4374   LDFLAGS="$LDFLAGS -Qunused-arguments"
4375 fi
4376
4377 # Check whether --enable-largefile was given.
4378 if test "${enable_largefile+set}" = set; then :
4379   enableval=$enable_largefile;
4380 fi
4381
4382 if test "$enable_largefile" != no; then
4383
4384   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4385 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4386 if ${ac_cv_sys_largefile_CC+:} false; then :
4387   $as_echo_n "(cached) " >&6
4388 else
4389   ac_cv_sys_largefile_CC=no
4390      if test "$GCC" != yes; then
4391        ac_save_CC=$CC
4392        while :; do
4393          # IRIX 6.2 and later do not support large files by default,
4394          # so use the C compiler's -n32 option if that helps.
4395          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4396 /* end confdefs.h.  */
4397 #include <sys/types.h>
4398  /* Check that off_t can represent 2**63 - 1 correctly.
4399     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4400     since some C++ compilers masquerading as C compilers
4401     incorrectly reject 9223372036854775807.  */
4402 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4403   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4404                        && LARGE_OFF_T % 2147483647 == 1)
4405                       ? 1 : -1];
4406 int
4407 main ()
4408 {
4409
4410   ;
4411   return 0;
4412 }
4413 _ACEOF
4414          if ac_fn_c_try_compile "$LINENO"; then :
4415   break
4416 fi
4417 rm -f core conftest.err conftest.$ac_objext
4418          CC="$CC -n32"
4419          if ac_fn_c_try_compile "$LINENO"; then :
4420   ac_cv_sys_largefile_CC=' -n32'; break
4421 fi
4422 rm -f core conftest.err conftest.$ac_objext
4423          break
4424        done
4425        CC=$ac_save_CC
4426        rm -f conftest.$ac_ext
4427     fi
4428 fi
4429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4430 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4431   if test "$ac_cv_sys_largefile_CC" != no; then
4432     CC=$CC$ac_cv_sys_largefile_CC
4433   fi
4434
4435   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4436 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4437 if ${ac_cv_sys_file_offset_bits+:} false; then :
4438   $as_echo_n "(cached) " >&6
4439 else
4440   while :; do
4441   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4442 /* end confdefs.h.  */
4443 #include <sys/types.h>
4444  /* Check that off_t can represent 2**63 - 1 correctly.
4445     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4446     since some C++ compilers masquerading as C compilers
4447     incorrectly reject 9223372036854775807.  */
4448 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4449   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4450                        && LARGE_OFF_T % 2147483647 == 1)
4451                       ? 1 : -1];
4452 int
4453 main ()
4454 {
4455
4456   ;
4457   return 0;
4458 }
4459 _ACEOF
4460 if ac_fn_c_try_compile "$LINENO"; then :
4461   ac_cv_sys_file_offset_bits=no; break
4462 fi
4463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4464   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4465 /* end confdefs.h.  */
4466 #define _FILE_OFFSET_BITS 64
4467 #include <sys/types.h>
4468  /* Check that off_t can represent 2**63 - 1 correctly.
4469     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4470     since some C++ compilers masquerading as C compilers
4471     incorrectly reject 9223372036854775807.  */
4472 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4473   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4474                        && LARGE_OFF_T % 2147483647 == 1)
4475                       ? 1 : -1];
4476 int
4477 main ()
4478 {
4479
4480   ;
4481   return 0;
4482 }
4483 _ACEOF
4484 if ac_fn_c_try_compile "$LINENO"; then :
4485   ac_cv_sys_file_offset_bits=64; break
4486 fi
4487 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4488   ac_cv_sys_file_offset_bits=unknown
4489   break
4490 done
4491 fi
4492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4493 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4494 case $ac_cv_sys_file_offset_bits in #(
4495   no | unknown) ;;
4496   *)
4497 cat >>confdefs.h <<_ACEOF
4498 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4499 _ACEOF
4500 ;;
4501 esac
4502 rm -rf conftest*
4503   if test $ac_cv_sys_file_offset_bits = unknown; then
4504     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4505 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4506 if ${ac_cv_sys_large_files+:} false; then :
4507   $as_echo_n "(cached) " >&6
4508 else
4509   while :; do
4510   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4511 /* end confdefs.h.  */
4512 #include <sys/types.h>
4513  /* Check that off_t can represent 2**63 - 1 correctly.
4514     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4515     since some C++ compilers masquerading as C compilers
4516     incorrectly reject 9223372036854775807.  */
4517 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4518   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4519                        && LARGE_OFF_T % 2147483647 == 1)
4520                       ? 1 : -1];
4521 int
4522 main ()
4523 {
4524
4525   ;
4526   return 0;
4527 }
4528 _ACEOF
4529 if ac_fn_c_try_compile "$LINENO"; then :
4530   ac_cv_sys_large_files=no; break
4531 fi
4532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4533   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4534 /* end confdefs.h.  */
4535 #define _LARGE_FILES 1
4536 #include <sys/types.h>
4537  /* Check that off_t can represent 2**63 - 1 correctly.
4538     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4539     since some C++ compilers masquerading as C compilers
4540     incorrectly reject 9223372036854775807.  */
4541 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4542   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4543                        && LARGE_OFF_T % 2147483647 == 1)
4544                       ? 1 : -1];
4545 int
4546 main ()
4547 {
4548
4549   ;
4550   return 0;
4551 }
4552 _ACEOF
4553 if ac_fn_c_try_compile "$LINENO"; then :
4554   ac_cv_sys_large_files=1; break
4555 fi
4556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4557   ac_cv_sys_large_files=unknown
4558   break
4559 done
4560 fi
4561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4562 $as_echo "$ac_cv_sys_large_files" >&6; }
4563 case $ac_cv_sys_large_files in #(
4564   no | unknown) ;;
4565   *)
4566 cat >>confdefs.h <<_ACEOF
4567 #define _LARGE_FILES $ac_cv_sys_large_files
4568 _ACEOF
4569 ;;
4570 esac
4571 rm -rf conftest*
4572   fi
4573
4574
4575 fi
4576
4577
4578  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
4579 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
4580 if ${ac_cv_c_bigendian+:} false; then :
4581   $as_echo_n "(cached) " >&6
4582 else
4583   ac_cv_c_bigendian=unknown
4584     # See if we're dealing with a universal compiler.
4585     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4586 /* end confdefs.h.  */
4587 #ifndef __APPLE_CC__
4588                not a universal capable compiler
4589              #endif
4590              typedef int dummy;
4591
4592 _ACEOF
4593 if ac_fn_c_try_compile "$LINENO"; then :
4594
4595         # Check for potential -arch flags.  It is not universal unless
4596         # there are at least two -arch flags with different values.
4597         ac_arch=
4598         ac_prev=
4599         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
4600          if test -n "$ac_prev"; then
4601            case $ac_word in
4602              i?86 | x86_64 | ppc | ppc64)
4603                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
4604                  ac_arch=$ac_word
4605                else
4606                  ac_cv_c_bigendian=universal
4607                  break
4608                fi
4609                ;;
4610            esac
4611            ac_prev=
4612          elif test "x$ac_word" = "x-arch"; then
4613            ac_prev=arch
4614          fi
4615        done
4616 fi
4617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4618     if test $ac_cv_c_bigendian = unknown; then
4619       # See if sys/param.h defines the BYTE_ORDER macro.
4620       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4621 /* end confdefs.h.  */
4622 #include <sys/types.h>
4623              #include <sys/param.h>
4624
4625 int
4626 main ()
4627 {
4628 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
4629                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
4630                      && LITTLE_ENDIAN)
4631               bogus endian macros
4632              #endif
4633
4634   ;
4635   return 0;
4636 }
4637 _ACEOF
4638 if ac_fn_c_try_compile "$LINENO"; then :
4639   # It does; now see whether it defined to BIG_ENDIAN or not.
4640          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4641 /* end confdefs.h.  */
4642 #include <sys/types.h>
4643                 #include <sys/param.h>
4644
4645 int
4646 main ()
4647 {
4648 #if BYTE_ORDER != BIG_ENDIAN
4649                  not big endian
4650                 #endif
4651
4652   ;
4653   return 0;
4654 }
4655 _ACEOF
4656 if ac_fn_c_try_compile "$LINENO"; then :
4657   ac_cv_c_bigendian=yes
4658 else
4659   ac_cv_c_bigendian=no
4660 fi
4661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4662 fi
4663 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4664     fi
4665     if test $ac_cv_c_bigendian = unknown; then
4666       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
4667       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4668 /* end confdefs.h.  */
4669 #include <limits.h>
4670
4671 int
4672 main ()
4673 {
4674 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
4675               bogus endian macros
4676              #endif
4677
4678   ;
4679   return 0;
4680 }
4681 _ACEOF
4682 if ac_fn_c_try_compile "$LINENO"; then :
4683   # It does; now see whether it defined to _BIG_ENDIAN or not.
4684          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4685 /* end confdefs.h.  */
4686 #include <limits.h>
4687
4688 int
4689 main ()
4690 {
4691 #ifndef _BIG_ENDIAN
4692                  not big endian
4693                 #endif
4694
4695   ;
4696   return 0;
4697 }
4698 _ACEOF
4699 if ac_fn_c_try_compile "$LINENO"; then :
4700   ac_cv_c_bigendian=yes
4701 else
4702   ac_cv_c_bigendian=no
4703 fi
4704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4705 fi
4706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4707     fi
4708     if test $ac_cv_c_bigendian = unknown; then
4709       # Compile a test program.
4710       if test "$cross_compiling" = yes; then :
4711   # Try to guess by grepping values from an object file.
4712          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4713 /* end confdefs.h.  */
4714 short int ascii_mm[] =
4715                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4716                 short int ascii_ii[] =
4717                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4718                 int use_ascii (int i) {
4719                   return ascii_mm[i] + ascii_ii[i];
4720                 }
4721                 short int ebcdic_ii[] =
4722                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4723                 short int ebcdic_mm[] =
4724                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4725                 int use_ebcdic (int i) {
4726                   return ebcdic_mm[i] + ebcdic_ii[i];
4727                 }
4728                 extern int foo;
4729
4730 int
4731 main ()
4732 {
4733 return use_ascii (foo) == use_ebcdic (foo);
4734   ;
4735   return 0;
4736 }
4737 _ACEOF
4738 if ac_fn_c_try_compile "$LINENO"; then :
4739   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
4740               ac_cv_c_bigendian=yes
4741             fi
4742             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4743               if test "$ac_cv_c_bigendian" = unknown; then
4744                 ac_cv_c_bigendian=no
4745               else
4746                 # finding both strings is unlikely to happen, but who knows?
4747                 ac_cv_c_bigendian=unknown
4748               fi
4749             fi
4750 fi
4751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4752 else
4753   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4754 /* end confdefs.h.  */
4755 $ac_includes_default
4756 int
4757 main ()
4758 {
4759
4760              /* Are we little or big endian?  From Harbison&Steele.  */
4761              union
4762              {
4763                long int l;
4764                char c[sizeof (long int)];
4765              } u;
4766              u.l = 1;
4767              return u.c[sizeof (long int) - 1] == 1;
4768
4769   ;
4770   return 0;
4771 }
4772 _ACEOF
4773 if ac_fn_c_try_run "$LINENO"; then :
4774   ac_cv_c_bigendian=no
4775 else
4776   ac_cv_c_bigendian=yes
4777 fi
4778 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4779   conftest.$ac_objext conftest.beam conftest.$ac_ext
4780 fi
4781
4782     fi
4783 fi
4784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
4785 $as_echo "$ac_cv_c_bigendian" >&6; }
4786  case $ac_cv_c_bigendian in #(
4787    yes)
4788
4789 $as_echo "#define RADIUS_BIG_ENDIAN 1" >>confdefs.h
4790 ;; #(
4791    no)
4792
4793 $as_echo "#define RADIUS_LITTLE_ENDIAN 1" >>confdefs.h
4794
4795  ;; #(
4796    universal)
4797
4798 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
4799
4800      ;; #(
4801    *)
4802      as_fn_error $? "unknown endianness
4803  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
4804  esac
4805
4806
4807 # Extract the first word of "gmake", so it can be a program name with args.
4808 set dummy gmake; ac_word=$2
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4810 $as_echo_n "checking for $ac_word... " >&6; }
4811 if ${ac_cv_prog_GMAKE+:} false; then :
4812   $as_echo_n "(cached) " >&6
4813 else
4814   if test -n "$GMAKE"; then
4815   ac_cv_prog_GMAKE="$GMAKE" # Let the user override the test.
4816 else
4817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4818 for as_dir in $PATH
4819 do
4820   IFS=$as_save_IFS
4821   test -z "$as_dir" && as_dir=.
4822     for ac_exec_ext in '' $ac_executable_extensions; do
4823   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4824     ac_cv_prog_GMAKE="yes"
4825     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4826     break 2
4827   fi
4828 done
4829   done
4830 IFS=$as_save_IFS
4831
4832   test -z "$ac_cv_prog_GMAKE" && ac_cv_prog_GMAKE="no"
4833 fi
4834 fi
4835 GMAKE=$ac_cv_prog_GMAKE
4836 if test -n "$GMAKE"; then
4837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMAKE" >&5
4838 $as_echo "$GMAKE" >&6; }
4839 else
4840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4841 $as_echo "no" >&6; }
4842 fi
4843
4844
4845 if test $GMAKE = no; then
4846   # Extract the first word of "make", so it can be a program name with args.
4847 set dummy make; ac_word=$2
4848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4849 $as_echo_n "checking for $ac_word... " >&6; }
4850 if ${ac_cv_path_MAKE+:} false; then :
4851   $as_echo_n "(cached) " >&6
4852 else
4853   case $MAKE in
4854   [\\/]* | ?:[\\/]*)
4855   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
4856   ;;
4857   *)
4858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4859 for as_dir in $PATH
4860 do
4861   IFS=$as_save_IFS
4862   test -z "$as_dir" && as_dir=.
4863     for ac_exec_ext in '' $ac_executable_extensions; do
4864   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4865     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
4866     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4867     break 2
4868   fi
4869 done
4870   done
4871 IFS=$as_save_IFS
4872
4873   test -z "$ac_cv_path_MAKE" && ac_cv_path_MAKE="/usr/local/bin/make"
4874   ;;
4875 esac
4876 fi
4877 MAKE=$ac_cv_path_MAKE
4878 if test -n "$MAKE"; then
4879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4880 $as_echo "$MAKE" >&6; }
4881 else
4882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4883 $as_echo "no" >&6; }
4884 fi
4885
4886
4887 else
4888   # Extract the first word of "gmake", so it can be a program name with args.
4889 set dummy gmake; ac_word=$2
4890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4891 $as_echo_n "checking for $ac_word... " >&6; }
4892 if ${ac_cv_path_MAKE+:} false; then :
4893   $as_echo_n "(cached) " >&6
4894 else
4895   case $MAKE in
4896   [\\/]* | ?:[\\/]*)
4897   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
4898   ;;
4899   *)
4900   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4901 for as_dir in $PATH
4902 do
4903   IFS=$as_save_IFS
4904   test -z "$as_dir" && as_dir=.
4905     for ac_exec_ext in '' $ac_executable_extensions; do
4906   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4907     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
4908     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4909     break 2
4910   fi
4911 done
4912   done
4913 IFS=$as_save_IFS
4914
4915   test -z "$ac_cv_path_MAKE" && ac_cv_path_MAKE="/usr/local/gnu/bin/make"
4916   ;;
4917 esac
4918 fi
4919 MAKE=$ac_cv_path_MAKE
4920 if test -n "$MAKE"; then
4921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4922 $as_echo "$MAKE" >&6; }
4923 else
4924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4925 $as_echo "no" >&6; }
4926 fi
4927
4928
4929 fi
4930 makever=`$ac_cv_path_MAKE --version 2>&1 | grep "GNU Make"`
4931 if test -z "$makever"; then
4932   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
4933 fi
4934
4935
4936   { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of system cores" >&5
4937 $as_echo_n "checking number of system cores... " >&6; }
4938 if ${ax_cv_system_cores+:} false; then :
4939   $as_echo_n "(cached) " >&6
4940 else
4941
4942       ac_ext=c
4943 ac_cpp='$CPP $CPPFLAGS'
4944 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4945 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4946 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4947
4948       if test "$cross_compiling" = yes; then :
4949   ax_cv_system_cores=
4950
4951 else
4952   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4953 /* end confdefs.h.  */
4954
4955           #include <stdio.h>
4956           #include <stdint.h>
4957           #ifdef _WIN32
4958           #  include <windows.h>
4959           #elif MACOS
4960           #  include <sys/param.h>
4961           #  include <sys/sysctl.h>
4962           #else
4963           #  include <unistd.h>
4964           #endif
4965
4966           int main (int argc, char *argv[])
4967           {
4968             uint32_t count;
4969
4970             #ifdef WIN32
4971             SYSTEM_INFO sysinfo;
4972             GetSystemInfo(&sysinfo);
4973
4974             count = sysinfo.dwNumberOfProcessors;
4975
4976             #elif MACOS
4977             int nm[2];
4978             size_t len = 4;
4979
4980             nm[0] = CTL_HW;
4981             nm[1] = HW_AVAILCPU;
4982             sysctl(nm, 2, &count, &len, NULL, 0);
4983
4984             if(count < 1) {
4985               nm[1] = HW_NCPU;
4986               sysctl(nm, 2, &count, &len, NULL, 0);
4987               if(count < 1) {
4988                 count = 1;
4989               }
4990             }
4991
4992             #else
4993             count = sysconf(_SC_NPROCESSORS_ONLN);
4994             #endif
4995
4996             return count;
4997           }
4998
4999 _ACEOF
5000 if ac_fn_c_try_run "$LINENO"; then :
5001   ax_cv_system_cores=$?
5002 else
5003   ax_cv_system_cores=$?
5004 fi
5005 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5006   conftest.$ac_objext conftest.beam conftest.$ac_ext
5007 fi
5008
5009     ac_ext=c
5010 ac_cpp='$CPP $CPPFLAGS'
5011 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5012 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5013 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5014
5015
5016 fi
5017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_system_cores" >&5
5018 $as_echo "$ax_cv_system_cores" >&6; }
5019
5020
5021
5022
5023 # Extract the first word of "git", so it can be a program name with args.
5024 set dummy git; ac_word=$2
5025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5026 $as_echo_n "checking for $ac_word... " >&6; }
5027 if ${ac_cv_prog_GIT+:} false; then :
5028   $as_echo_n "(cached) " >&6
5029 else
5030   if test -n "$GIT"; then
5031   ac_cv_prog_GIT="$GIT" # Let the user override the test.
5032 else
5033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5034 for as_dir in $PATH
5035 do
5036   IFS=$as_save_IFS
5037   test -z "$as_dir" && as_dir=.
5038     for ac_exec_ext in '' $ac_executable_extensions; do
5039   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5040     ac_cv_prog_GIT="yes"
5041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5042     break 2
5043   fi
5044 done
5045   done
5046 IFS=$as_save_IFS
5047
5048   test -z "$ac_cv_prog_GIT" && ac_cv_prog_GIT="no"
5049 fi
5050 fi
5051 GIT=$ac_cv_prog_GIT
5052 if test -n "$GIT"; then
5053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5
5054 $as_echo "$GIT" >&6; }
5055 else
5056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5057 $as_echo "no" >&6; }
5058 fi
5059
5060
5061
5062
5063 # Check whether --enable-strict-dependencies was given.
5064 if test "${enable_strict_dependencies+set}" = set; then :
5065   enableval=$enable_strict_dependencies;
5066 fi
5067
5068
5069 # Check whether --enable-werror was given.
5070 if test "${enable_werror+set}" = set; then :
5071   enableval=$enable_werror;  case "$enableval" in
5072     no)
5073       werror=no
5074     ;;
5075     *)
5076       werror=yes
5077   esac
5078
5079 fi
5080
5081
5082 docdir='${datadir}/doc/freeradius'
5083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking docdir" >&5
5084 $as_echo_n "checking docdir... " >&6; }
5085
5086 # Check whether --with-docdir was given.
5087 if test "${with_docdir+set}" = set; then :
5088   withval=$with_docdir;  case "$withval" in
5089   no)
5090     docdir=no
5091     ;;
5092   yes)
5093     ;;
5094   [\\/$]* | ?:[\\/]* )
5095     docdir="$withval"
5096     ;;
5097   *)
5098     as_fn_error $? "expected an absolute directory name for --with-docdir: $withval" "$LINENO" 5
5099     ;;
5100   esac
5101
5102 fi
5103
5104
5105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $docdir" >&5
5106 $as_echo "$docdir" >&6; }
5107 if test "x$docdir" = xno; then
5108   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Documentation files will NOT be installed." >&5
5109 $as_echo "$as_me: WARNING: Documentation files will NOT be installed." >&2;}
5110 fi
5111
5112 logdir='${localstatedir}/log/radius'
5113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking logdir" >&5
5114 $as_echo_n "checking logdir... " >&6; }
5115
5116 # Check whether --with-logdir was given.
5117 if test "${with_logdir+set}" = set; then :
5118   withval=$with_logdir;  case "$withval" in
5119   no)
5120     as_fn_error $? "Need logdir" "$LINENO" 5
5121     ;;
5122   yes)
5123     ;;
5124   [\\/$]* | ?:[\\/]* )
5125     logdir="$withval"
5126     ;;
5127   *)
5128     as_fn_error $? "expected an absolute directory name for --with-logdir: $withval" "$LINENO" 5
5129     ;;
5130   esac
5131
5132 fi
5133
5134
5135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $logdir" >&5
5136 $as_echo "$logdir" >&6; }
5137
5138 radacctdir='${logdir}/radacct'
5139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking radacctdir" >&5
5140 $as_echo_n "checking radacctdir... " >&6; }
5141
5142 # Check whether --with-radacctdir was given.
5143 if test "${with_radacctdir+set}" = set; then :
5144   withval=$with_radacctdir;  case "$withval" in
5145   no)
5146     as_fn_error $? "Need radacctdir" "$LINENO" 5
5147     ;;
5148   yes)
5149     ;;
5150   [\\/$]* | ?:[\\/]* )
5151     radacctdir="$withval"
5152     ;;
5153   *)
5154     as_fn_error $? "expected an absolute directory name for --with-radacctdir: $withval" "$LINENO" 5
5155     ;;
5156   esac
5157
5158 fi
5159
5160
5161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $radacctdir" >&5
5162 $as_echo "$radacctdir" >&6; }
5163
5164 raddbdir='${sysconfdir}/raddb'
5165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking raddbdir" >&5
5166 $as_echo_n "checking raddbdir... " >&6; }
5167
5168 # Check whether --with-raddbdir was given.
5169 if test "${with_raddbdir+set}" = set; then :
5170   withval=$with_raddbdir;  case "$withval" in
5171   no)
5172     as_fn_error $? "Need raddbdir" "$LINENO" 5
5173     ;;
5174   yes)
5175     ;;
5176   [\\/$]* | ?:[\\/]* )
5177     raddbdir="$withval"
5178     ;;
5179   *)
5180     as_fn_error $? "expected an absolute directory name for --with-raddbdir: $withval" "$LINENO" 5
5181     ;;
5182   esac
5183
5184 fi
5185
5186
5187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $raddbdir" >&5
5188 $as_echo "$raddbdir" >&6; }
5189
5190 dictdir='${datarootdir}/freeradius'
5191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dictdir" >&5
5192 $as_echo_n "checking dictdir... " >&6; }
5193
5194 # Check whether --with-dictdir was given.
5195 if test "${with_dictdir+set}" = set; then :
5196   withval=$with_dictdir;  case "$withval" in
5197   no)
5198     as_fn_error $? "Need dictdir" "$LINENO" 5
5199     ;;
5200   yes)
5201     ;;
5202   [\\/$]* | ?:[\\/]* )
5203     dictdir="$withval"
5204     ;;
5205   *)
5206     as_fn_error $? "expected an absolute directory name for --with-dictdir: $withval" "$LINENO" 5
5207     ;;
5208   esac
5209
5210 fi
5211
5212
5213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dictdir" >&5
5214 $as_echo "$dictdir" >&6; }
5215
5216 modconfdir='${raddbdir}/mods-config'
5217
5218
5219 WITH_ASCEND_BINARY=yes
5220
5221 # Check whether --with-ascend-binary was given.
5222 if test "${with_ascend_binary+set}" = set; then :
5223   withval=$with_ascend_binary;  case "$withval" in
5224   yes)
5225     ;;
5226   *)
5227     WITH_ASCEND_BINARY=no
5228   esac
5229
5230 fi
5231
5232 if test "x$WITH_ASCEND_BINARY" = "xyes"; then
5233
5234 $as_echo "#define WITH_ASCEND_BINARY 1" >>confdefs.h
5235
5236 fi
5237
5238 WITH_THREADS=yes
5239
5240 # Check whether --with-threads was given.
5241 if test "${with_threads+set}" = set; then :
5242   withval=$with_threads;  case "$withval" in
5243   yes)
5244     ;;
5245   *)
5246     WITH_THREADS=no
5247   esac
5248
5249 fi
5250
5251
5252 WITH_TCP=yes
5253
5254 # Check whether --with-tcp was given.
5255 if test "${with_tcp+set}" = set; then :
5256   withval=$with_tcp;  case "$withval" in
5257   yes)
5258     ;;
5259   *)
5260     WITH_TCP=no
5261   esac
5262
5263 fi
5264
5265 if test "x$WITH_TCP" = "xyes"; then
5266
5267 $as_echo "#define WITH_TCP 1" >>confdefs.h
5268
5269 fi
5270
5271 WITH_VMPS=yes
5272
5273 # Check whether --with-vmps was given.
5274 if test "${with_vmps+set}" = set; then :
5275   withval=$with_vmps;  case "$withval" in
5276   yes)
5277     ;;
5278   *)
5279     WITH_VMPS=no
5280   esac
5281
5282 fi
5283
5284 if test "x$WITH_VMPS" = "xyes"; then
5285
5286 $as_echo "#define WITH_VMPS 1" >>confdefs.h
5287
5288 fi
5289
5290 WITH_DHCP=yes
5291
5292 # Check whether --with-dhcp was given.
5293 if test "${with_dhcp+set}" = set; then :
5294   withval=$with_dhcp;  case "$withval" in
5295   yes)
5296     ;;
5297   *)
5298     WITH_DHCP=no
5299   esac
5300
5301 fi
5302
5303 if test "x$WITH_DHCP" = "xyes"; then
5304
5305 $as_echo "#define WITH_DHCP 1" >>confdefs.h
5306
5307 fi
5308
5309 STATIC_MODULES=
5310
5311 # Check whether --with-static_modules was given.
5312 if test "${with_static_modules+set}" = set; then :
5313   withval=$with_static_modules;
5314   for i in $withval; do
5315     STATIC_MODULES="$STATIC_MODULES -dlpreopen ../modules/rlm_$i/rlm_$i.la"
5316   done
5317
5318 fi
5319
5320
5321 USE_SHARED_LIBS=yes
5322
5323 # Check whether --with-shared-libs was given.
5324 if test "${with_shared_libs+set}" = set; then :
5325   withval=$with_shared_libs;  case "$withval" in
5326   no)
5327     USE_SHARED_LIBS=no
5328     ;;
5329   *)
5330   esac
5331
5332 fi
5333
5334
5335 MODULES=
5336
5337 # Check whether --with-modules was given.
5338 if test "${with_modules+set}" = set; then :
5339   withval=$with_modules;
5340  for i in $withval; do
5341    MODULES="$MODULES $i"
5342  done
5343
5344 fi
5345
5346
5347 EXPERIMENTAL=
5348
5349 # Check whether --with-experimental-modules was given.
5350 if test "${with_experimental_modules+set}" = set; then :
5351   withval=$with_experimental_modules;  case "$withval" in
5352   yes)
5353     EXPERIMENTAL=yes
5354     ;;
5355   no)
5356     EXPERIMENTAL=no
5357     ;;
5358   *)
5359   esac
5360
5361 fi
5362
5363
5364 WITH_UDPFROMTO=yes
5365
5366 # Check whether --with-udpfromto was given.
5367 if test "${with_udpfromto+set}" = set; then :
5368   withval=$with_udpfromto;  case "$withval" in
5369   yes)
5370     WITH_UDPFROMTO=yes
5371     ;;
5372   *)
5373     WITH_UDPFROMTO=no
5374   esac
5375
5376 fi
5377
5378
5379 if test "x$WITH_UDPFROMTO" = "xyes"; then
5380
5381 $as_echo "#define WITH_UDPFROMTO /**/" >>confdefs.h
5382
5383 fi
5384
5385
5386
5387 # Check whether --with-rlm-FOO-lib-dir was given.
5388 if test "${with_rlm_FOO_lib_dir+set}" = set; then :
5389   withval=$with_rlm_FOO_lib_dir;  case "$withval" in
5390   *)
5391     ;;
5392   esac
5393
5394 fi
5395
5396
5397
5398 # Check whether --with-rlm-FOO-include-dir was given.
5399 if test "${with_rlm_FOO_include_dir+set}" = set; then :
5400   withval=$with_rlm_FOO_include_dir;  case "$withval" in
5401   *)
5402     ;;
5403   esac
5404
5405 fi
5406
5407
5408 WITH_OPENSSL=yes
5409
5410 # Check whether --with-openssl was given.
5411 if test "${with_openssl+set}" = set; then :
5412   withval=$with_openssl;  case "$withval" in
5413   no)
5414     WITH_OPENSSL=no
5415     ;;
5416   *)
5417     WITH_OPENSSL=yes
5418     ;;
5419   esac
5420
5421 fi
5422
5423
5424 openssl_lib_dir=
5425
5426 # Check whether --with-openssl-lib-dir was given.
5427 if test "${with_openssl_lib_dir+set}" = set; then :
5428   withval=$with_openssl_lib_dir;  case "$withval" in
5429   *) openssl_lib_dir="$withval"
5430     ;;
5431   esac
5432
5433 fi
5434
5435
5436 openssl_include_dir=
5437
5438 # Check whether --with-openssl-include-dir was given.
5439 if test "${with_openssl_include_dir+set}" = set; then :
5440   withval=$with_openssl_include_dir;  case "$withval" in
5441   *) openssl_include_dir="$withval"
5442     ;;
5443   esac
5444
5445 fi
5446
5447
5448 # Check whether --enable-openssl-version-check was given.
5449 if test "${enable_openssl_version_check+set}" = set; then :
5450   enableval=$enable_openssl_version_check;
5451 fi
5452
5453 if test "x$enable_openssl_version_check" != "xno"; then
5454
5455 $as_echo "#define ENABLE_OPENSSL_VERSION_CHECK 1" >>confdefs.h
5456
5457   openssl_version_check_config="\
5458         #
5459         #  allow_vulnerable_openssl: Allow the server to start with
5460         #  versions of OpenSSL known to have critical vulnerabilities.
5461         #
5462         #  This check is based on the version number reported by libssl
5463         #  and may not reflect patches applied to libssl by
5464         #  distribution maintainers.
5465         #
5466         allow_vulnerable_openssl = no"
5467 else
5468   openssl_version_check_config=
5469 fi
5470
5471
5472
5473
5474 CHECKRAD=checkrad
5475 # Extract the first word of "perl", so it can be a program name with args.
5476 set dummy perl; ac_word=$2
5477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5478 $as_echo_n "checking for $ac_word... " >&6; }
5479 if ${ac_cv_path_PERL+:} false; then :
5480   $as_echo_n "(cached) " >&6
5481 else
5482   case $PERL in
5483   [\\/]* | ?:[\\/]*)
5484   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5485   ;;
5486   *)
5487   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5488 for as_dir in $PATH
5489 do
5490   IFS=$as_save_IFS
5491   test -z "$as_dir" && as_dir=.
5492     for ac_exec_ext in '' $ac_executable_extensions; do
5493   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5494     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5495     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5496     break 2
5497   fi
5498 done
5499   done
5500 IFS=$as_save_IFS
5501
5502   test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="/usr/local/bin/perl"
5503   ;;
5504 esac
5505 fi
5506 PERL=$ac_cv_path_PERL
5507 if test -n "$PERL"; then
5508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
5509 $as_echo "$PERL" >&6; }
5510 else
5511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5512 $as_echo "no" >&6; }
5513 fi
5514
5515
5516 if test "x$ac_cv_path_PERL" = "x"; then
5517   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl not found - Simultaneous-Use and checkrad may not work" >&5
5518 $as_echo "$as_me: WARNING: perl not found - Simultaneous-Use and checkrad may not work" >&2;}
5519 fi
5520 # Extract the first word of "snmpget", so it can be a program name with args.
5521 set dummy snmpget; ac_word=$2
5522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5523 $as_echo_n "checking for $ac_word... " >&6; }
5524 if ${ac_cv_path_SNMPGET+:} false; then :
5525   $as_echo_n "(cached) " >&6
5526 else
5527   case $SNMPGET in
5528   [\\/]* | ?:[\\/]*)
5529   ac_cv_path_SNMPGET="$SNMPGET" # Let the user override the test with a path.
5530   ;;
5531   *)
5532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5533 for as_dir in $PATH
5534 do
5535   IFS=$as_save_IFS
5536   test -z "$as_dir" && as_dir=.
5537     for ac_exec_ext in '' $ac_executable_extensions; do
5538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5539     ac_cv_path_SNMPGET="$as_dir/$ac_word$ac_exec_ext"
5540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5541     break 2
5542   fi
5543 done
5544   done
5545 IFS=$as_save_IFS
5546
5547   ;;
5548 esac
5549 fi
5550 SNMPGET=$ac_cv_path_SNMPGET
5551 if test -n "$SNMPGET"; then
5552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SNMPGET" >&5
5553 $as_echo "$SNMPGET" >&6; }
5554 else
5555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5556 $as_echo "no" >&6; }
5557 fi
5558
5559
5560 if test "x$ac_cv_path_SNMPGET" = "x"; then
5561   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: snmpget not found - Simultaneous-Use and checkrad may not work" >&5
5562 $as_echo "$as_me: WARNING: snmpget not found - Simultaneous-Use and checkrad may not work" >&2;}
5563 fi
5564
5565 # Extract the first word of "snmpwalk", so it can be a program name with args.
5566 set dummy snmpwalk; ac_word=$2
5567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5568 $as_echo_n "checking for $ac_word... " >&6; }
5569 if ${ac_cv_path_SNMPWALK+:} false; then :
5570   $as_echo_n "(cached) " >&6
5571 else
5572   case $SNMPWALK in
5573   [\\/]* | ?:[\\/]*)
5574   ac_cv_path_SNMPWALK="$SNMPWALK" # Let the user override the test with a path.
5575   ;;
5576   *)
5577   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5578 for as_dir in $PATH
5579 do
5580   IFS=$as_save_IFS
5581   test -z "$as_dir" && as_dir=.
5582     for ac_exec_ext in '' $ac_executable_extensions; do
5583   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5584     ac_cv_path_SNMPWALK="$as_dir/$ac_word$ac_exec_ext"
5585     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5586     break 2
5587   fi
5588 done
5589   done
5590 IFS=$as_save_IFS
5591
5592   ;;
5593 esac
5594 fi
5595 SNMPWALK=$ac_cv_path_SNMPWALK
5596 if test -n "$SNMPWALK"; then
5597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SNMPWALK" >&5
5598 $as_echo "$SNMPWALK" >&6; }
5599 else
5600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5601 $as_echo "no" >&6; }
5602 fi
5603
5604
5605 if test "x$ac_cv_path_SNMPWALK" = "x"; then
5606   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: snmpwalk not found - Simultaneous-Use and checkrad may not work" >&5
5607 $as_echo "$as_me: WARNING: snmpwalk not found - Simultaneous-Use and checkrad may not work" >&2;}
5608 fi
5609
5610 # Extract the first word of "rusers", so it can be a program name with args.
5611 set dummy rusers; ac_word=$2
5612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5613 $as_echo_n "checking for $ac_word... " >&6; }
5614 if ${ac_cv_path_RUSERS+:} false; then :
5615   $as_echo_n "(cached) " >&6
5616 else
5617   case $RUSERS in
5618   [\\/]* | ?:[\\/]*)
5619   ac_cv_path_RUSERS="$RUSERS" # Let the user override the test with a path.
5620   ;;
5621   *)
5622   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5623 for as_dir in $PATH
5624 do
5625   IFS=$as_save_IFS
5626   test -z "$as_dir" && as_dir=.
5627     for ac_exec_ext in '' $ac_executable_extensions; do
5628   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5629     ac_cv_path_RUSERS="$as_dir/$ac_word$ac_exec_ext"
5630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5631     break 2
5632   fi
5633 done
5634   done
5635 IFS=$as_save_IFS
5636
5637   test -z "$ac_cv_path_RUSERS" && ac_cv_path_RUSERS="/usr/bin/rusers"
5638   ;;
5639 esac
5640 fi
5641 RUSERS=$ac_cv_path_RUSERS
5642 if test -n "$RUSERS"; then
5643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUSERS" >&5
5644 $as_echo "$RUSERS" >&6; }
5645 else
5646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5647 $as_echo "no" >&6; }
5648 fi
5649
5650
5651
5652 missing_dir=`cd $ac_aux_dir && pwd`
5653 # expand $ac_aux_dir to an absolute path
5654 am_aux_dir=`cd $ac_aux_dir && pwd`
5655
5656 if test x"${MISSING+set}" != xset; then
5657   case $am_aux_dir in
5658   *\ * | *\     *)
5659     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
5660   *)
5661     MISSING="\${SHELL} $am_aux_dir/missing" ;;
5662   esac
5663 fi
5664 # Use eval to expand $SHELL
5665 if eval "$MISSING --run true"; then
5666   am_missing_run="$MISSING --run "
5667 else
5668   am_missing_run=
5669   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
5670 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
5671 fi
5672
5673
5674 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
5675
5676
5677 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
5678
5679
5680 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
5681
5682
5683 # Extract the first word of "locate", so it can be a program name with args.
5684 set dummy locate; ac_word=$2
5685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5686 $as_echo_n "checking for $ac_word... " >&6; }
5687 if ${ac_cv_path_LOCATE+:} false; then :
5688   $as_echo_n "(cached) " >&6
5689 else
5690   case $LOCATE in
5691   [\\/]* | ?:[\\/]*)
5692   ac_cv_path_LOCATE="$LOCATE" # Let the user override the test with a path.
5693   ;;
5694   *)
5695   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5696 for as_dir in $PATH
5697 do
5698   IFS=$as_save_IFS
5699   test -z "$as_dir" && as_dir=.
5700     for ac_exec_ext in '' $ac_executable_extensions; do
5701   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5702     ac_cv_path_LOCATE="$as_dir/$ac_word$ac_exec_ext"
5703     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5704     break 2
5705   fi
5706 done
5707   done
5708 IFS=$as_save_IFS
5709
5710   ;;
5711 esac
5712 fi
5713 LOCATE=$ac_cv_path_LOCATE
5714 if test -n "$LOCATE"; then
5715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOCATE" >&5
5716 $as_echo "$LOCATE" >&6; }
5717 else
5718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5719 $as_echo "no" >&6; }
5720 fi
5721
5722
5723 # Extract the first word of "dirname", so it can be a program name with args.
5724 set dummy dirname; ac_word=$2
5725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5726 $as_echo_n "checking for $ac_word... " >&6; }
5727 if ${ac_cv_path_DIRNAME+:} false; then :
5728   $as_echo_n "(cached) " >&6
5729 else
5730   case $DIRNAME in
5731   [\\/]* | ?:[\\/]*)
5732   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
5733   ;;
5734   *)
5735   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5736 for as_dir in $PATH
5737 do
5738   IFS=$as_save_IFS
5739   test -z "$as_dir" && as_dir=.
5740     for ac_exec_ext in '' $ac_executable_extensions; do
5741   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5742     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
5743     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5744     break 2
5745   fi
5746 done
5747   done
5748 IFS=$as_save_IFS
5749
5750   ;;
5751 esac
5752 fi
5753 DIRNAME=$ac_cv_path_DIRNAME
5754 if test -n "$DIRNAME"; then
5755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
5756 $as_echo "$DIRNAME" >&6; }
5757 else
5758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5759 $as_echo "no" >&6; }
5760 fi
5761
5762
5763 # Extract the first word of "grep", so it can be a program name with args.
5764 set dummy grep; ac_word=$2
5765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5766 $as_echo_n "checking for $ac_word... " >&6; }
5767 if ${ac_cv_path_GREP+:} false; then :
5768   $as_echo_n "(cached) " >&6
5769 else
5770   case $GREP in
5771   [\\/]* | ?:[\\/]*)
5772   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
5773   ;;
5774   *)
5775   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5776 for as_dir in $PATH
5777 do
5778   IFS=$as_save_IFS
5779   test -z "$as_dir" && as_dir=.
5780     for ac_exec_ext in '' $ac_executable_extensions; do
5781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5782     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
5783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5784     break 2
5785   fi
5786 done
5787   done
5788 IFS=$as_save_IFS
5789
5790   ;;
5791 esac
5792 fi
5793 GREP=$ac_cv_path_GREP
5794 if test -n "$GREP"; then
5795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
5796 $as_echo "$GREP" >&6; }
5797 else
5798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5799 $as_echo "no" >&6; }
5800 fi
5801
5802
5803
5804
5805 talloc_lib_dir=
5806
5807 # Check whether --with-talloc-lib-dir was given.
5808 if test "${with_talloc_lib_dir+set}" = set; then :
5809   withval=$with_talloc_lib_dir; case "$withval" in
5810     no)
5811       as_fn_error $? "Need talloc-lib-dir" "$LINENO" 5
5812       ;;
5813     yes)
5814       ;;
5815     *)
5816       talloc_lib_dir="$withval"
5817       ;;
5818   esac
5819 fi
5820
5821
5822 talloc_include_dir=
5823
5824 # Check whether --with-talloc-include-dir was given.
5825 if test "${with_talloc_include_dir+set}" = set; then :
5826   withval=$with_talloc_include_dir; case "$withval" in
5827     no)
5828       as_fn_error $? "Need talloc-include-dir" "$LINENO" 5
5829       ;;
5830     yes)
5831       ;;
5832     *)
5833       talloc_include_dir="$withval"
5834       ;;
5835   esac
5836 fi
5837
5838
5839 smart_try_dir="$talloc_lib_dir"
5840
5841
5842 sm_lib_safe=`echo "talloc" | sed 'y%./+-%__p_%'`
5843 sm_func_safe=`echo "_talloc" | sed 'y%./+-%__p_%'`
5844
5845 old_LIBS="$LIBS"
5846 old_CPPFLAGS="$CPPFLAGS"
5847 smart_lib=
5848 smart_ldflags=
5849 smart_lib_dir=
5850
5851 if test "x$smart_try_dir" != "x"; then
5852   for try in $smart_try_dir; do
5853     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc in $try" >&5
5854 $as_echo_n "checking for _talloc in -ltalloc in $try... " >&6; }
5855     LIBS="-ltalloc $old_LIBS"
5856     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
5857     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5858 /* end confdefs.h.  */
5859 extern char _talloc();
5860 int
5861 main ()
5862 {
5863 _talloc()
5864   ;
5865   return 0;
5866 }
5867 _ACEOF
5868 if ac_fn_c_try_link "$LINENO"; then :
5869
5870                  smart_lib="-ltalloc"
5871                  smart_ldflags="-L$try -Wl,-rpath,$try"
5872                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5873 $as_echo "yes" >&6; }
5874                  break
5875
5876 else
5877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5878 $as_echo "no" >&6; }
5879 fi
5880 rm -f core conftest.err conftest.$ac_objext \
5881     conftest$ac_exeext conftest.$ac_ext
5882   done
5883   LIBS="$old_LIBS"
5884   CPPFLAGS="$old_CPPFLAGS"
5885 fi
5886
5887 if test "x$smart_lib" = "x"; then
5888   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc" >&5
5889 $as_echo_n "checking for _talloc in -ltalloc... " >&6; }
5890   LIBS="-ltalloc $old_LIBS"
5891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5892 /* end confdefs.h.  */
5893 extern char _talloc();
5894 int
5895 main ()
5896 {
5897 _talloc()
5898   ;
5899   return 0;
5900 }
5901 _ACEOF
5902 if ac_fn_c_try_link "$LINENO"; then :
5903
5904                 smart_lib="-ltalloc"
5905                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5906 $as_echo "yes" >&6; }
5907
5908 else
5909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5910 $as_echo "no" >&6; }
5911 fi
5912 rm -f core conftest.err conftest.$ac_objext \
5913     conftest$ac_exeext conftest.$ac_ext
5914   LIBS="$old_LIBS"
5915 fi
5916
5917 if test "x$smart_lib" = "x"; then
5918
5919
5920 if test "x$LOCATE" != "x"; then
5921         DIRS=
5922   file=libtalloc${libltdl_cv_shlibext}
5923
5924   for x in `${LOCATE} $file 2>/dev/null`; do
5925                                         base=`echo $x | sed "s%/${file}%%"`
5926     if test "x$x" = "x$base"; then
5927       continue;
5928     fi
5929
5930     dir=`${DIRNAME} $x 2>/dev/null`
5931                 exclude=`echo ${dir} | ${GREP} /home`
5932     if test "x$exclude" != "x"; then
5933       continue
5934     fi
5935
5936                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
5937     if test "x$already" = "x"; then
5938       DIRS="$DIRS $dir"
5939     fi
5940   done
5941 fi
5942
5943 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
5944
5945
5946
5947 if test "x$LOCATE" != "x"; then
5948         DIRS=
5949   file=libtalloc.a
5950
5951   for x in `${LOCATE} $file 2>/dev/null`; do
5952                                         base=`echo $x | sed "s%/${file}%%"`
5953     if test "x$x" = "x$base"; then
5954       continue;
5955     fi
5956
5957     dir=`${DIRNAME} $x 2>/dev/null`
5958                 exclude=`echo ${dir} | ${GREP} /home`
5959     if test "x$exclude" != "x"; then
5960       continue
5961     fi
5962
5963                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
5964     if test "x$already" = "x"; then
5965       DIRS="$DIRS $dir"
5966     fi
5967   done
5968 fi
5969
5970 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
5971
5972
5973   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
5974     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc in $try" >&5
5975 $as_echo_n "checking for _talloc in -ltalloc in $try... " >&6; }
5976     LIBS="-ltalloc $old_LIBS"
5977     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
5978     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5979 /* end confdefs.h.  */
5980 extern char _talloc();
5981 int
5982 main ()
5983 {
5984 _talloc()
5985   ;
5986   return 0;
5987 }
5988 _ACEOF
5989 if ac_fn_c_try_link "$LINENO"; then :
5990
5991                   smart_lib="-ltalloc"
5992                   smart_ldflags="-L$try -Wl,-rpath,$try"
5993                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5994 $as_echo "yes" >&6; }
5995                   break
5996
5997 else
5998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5999 $as_echo "no" >&6; }
6000 fi
6001 rm -f core conftest.err conftest.$ac_objext \
6002     conftest$ac_exeext conftest.$ac_ext
6003   done
6004   LIBS="$old_LIBS"
6005   CPPFLAGS="$old_CPPFLAGS"
6006 fi
6007
6008 if test "x$smart_lib" != "x"; then
6009   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
6010   LIBS="$smart_ldflags $smart_lib $old_LIBS"
6011   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
6012 fi
6013
6014 if test "x$ac_cv_lib_talloc__talloc" != "xyes"; then
6015   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: talloc library not found. Use --with-talloc-lib-dir=<path>." >&5
6016 $as_echo "$as_me: WARNING: talloc library not found. Use --with-talloc-lib-dir=<path>." >&2;}
6017   as_fn_error $? "FreeRADIUS requires libtalloc" "$LINENO" 5
6018 fi
6019
6020 TALLOC_LIBS="${smart_lib}"
6021 TALLOC_LDFLAGS="${smart_ldflags}"
6022
6023
6024 LIBS="$old_LIBS"
6025
6026 old_CFLAGS=$CFLAGS
6027 if test "x$WITH_THREADS" = "xyes"; then
6028   if test $ac_cv_prog_suncc = "yes"; then
6029     CFLAGS="$CFLAGS -mt"
6030   fi
6031
6032   for ac_header in pthread.h
6033 do :
6034   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
6035 if test "x$ac_cv_header_pthread_h" = xyes; then :
6036   cat >>confdefs.h <<_ACEOF
6037 #define HAVE_PTHREAD_H 1
6038 _ACEOF
6039
6040 else
6041
6042       WITH_THREADS="no"
6043       fail=pthread.h
6044
6045 fi
6046
6047 done
6048
6049
6050                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
6051 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
6052 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
6053   $as_echo_n "(cached) " >&6
6054 else
6055   ac_check_lib_save_LIBS=$LIBS
6056 LIBS="-lpthread  $LIBS"
6057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6058 /* end confdefs.h.  */
6059
6060 /* Override any GCC internal prototype to avoid an error.
6061    Use char because int might match the return type of a GCC
6062    builtin and then its argument prototype would still apply.  */
6063 #ifdef __cplusplus
6064 extern "C"
6065 #endif
6066 char pthread_create ();
6067 int
6068 main ()
6069 {
6070 return pthread_create ();
6071   ;
6072   return 0;
6073 }
6074 _ACEOF
6075 if ac_fn_c_try_link "$LINENO"; then :
6076   ac_cv_lib_pthread_pthread_create=yes
6077 else
6078   ac_cv_lib_pthread_pthread_create=no
6079 fi
6080 rm -f core conftest.err conftest.$ac_objext \
6081     conftest$ac_exeext conftest.$ac_ext
6082 LIBS=$ac_check_lib_save_LIBS
6083 fi
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
6085 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
6086 if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
6087
6088       CFLAGS="$CFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
6089       LIBS="-lpthread $LIBS"
6090
6091 else
6092
6093                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
6094 $as_echo_n "checking for pthread_create in -lc_r... " >&6; }
6095 if ${ac_cv_lib_c_r_pthread_create+:} false; then :
6096   $as_echo_n "(cached) " >&6
6097 else
6098   ac_check_lib_save_LIBS=$LIBS
6099 LIBS="-lc_r  $LIBS"
6100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6101 /* end confdefs.h.  */
6102
6103 /* Override any GCC internal prototype to avoid an error.
6104    Use char because int might match the return type of a GCC
6105    builtin and then its argument prototype would still apply.  */
6106 #ifdef __cplusplus
6107 extern "C"
6108 #endif
6109 char pthread_create ();
6110 int
6111 main ()
6112 {
6113 return pthread_create ();
6114   ;
6115   return 0;
6116 }
6117 _ACEOF
6118 if ac_fn_c_try_link "$LINENO"; then :
6119   ac_cv_lib_c_r_pthread_create=yes
6120 else
6121   ac_cv_lib_c_r_pthread_create=no
6122 fi
6123 rm -f core conftest.err conftest.$ac_objext \
6124     conftest$ac_exeext conftest.$ac_ext
6125 LIBS=$ac_check_lib_save_LIBS
6126 fi
6127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
6128 $as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
6129 if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
6130    CFLAGS="$CFLAGS -pthread -D_THREAD_SAFE"
6131 else
6132
6133           WITH_THREADS="no"
6134           fail=-lpthread
6135
6136
6137 fi
6138
6139
6140
6141 fi
6142
6143
6144   if test "x$WITH_THREADS" != "xyes"; then
6145     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: silently not building with thread support." >&5
6146 $as_echo "$as_me: WARNING: silently not building with thread support." >&2;}
6147     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: FAILURE: thread support requires: $fail." >&5
6148 $as_echo "$as_me: WARNING: FAILURE: thread support requires: $fail." >&2;}
6149   else
6150
6151 $as_echo "#define WITH_THREADS 1" >>confdefs.h
6152
6153   fi
6154 fi
6155
6156 if test "x$WITH_THREADS" != "xyes"; then
6157   CFLAGS=$old_CFLAGS
6158   ac_cv_header_pthread_h="no"
6159   WITH_THREADS=no
6160 else
6161
6162   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
6163 $as_echo_n "checking for library containing sem_init... " >&6; }
6164 if ${ac_cv_search_sem_init+:} false; then :
6165   $as_echo_n "(cached) " >&6
6166 else
6167   ac_func_search_save_LIBS=$LIBS
6168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6169 /* end confdefs.h.  */
6170
6171 /* Override any GCC internal prototype to avoid an error.
6172    Use char because int might match the return type of a GCC
6173    builtin and then its argument prototype would still apply.  */
6174 #ifdef __cplusplus
6175 extern "C"
6176 #endif
6177 char sem_init ();
6178 int
6179 main ()
6180 {
6181 return sem_init ();
6182   ;
6183   return 0;
6184 }
6185 _ACEOF
6186 for ac_lib in '' pthread sem posix4 rt semaphore; do
6187   if test -z "$ac_lib"; then
6188     ac_res="none required"
6189   else
6190     ac_res=-l$ac_lib
6191     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6192   fi
6193   if ac_fn_c_try_link "$LINENO"; then :
6194   ac_cv_search_sem_init=$ac_res
6195 fi
6196 rm -f core conftest.err conftest.$ac_objext \
6197     conftest$ac_exeext
6198   if ${ac_cv_search_sem_init+:} false; then :
6199   break
6200 fi
6201 done
6202 if ${ac_cv_search_sem_init+:} false; then :
6203
6204 else
6205   ac_cv_search_sem_init=no
6206 fi
6207 rm conftest.$ac_ext
6208 LIBS=$ac_func_search_save_LIBS
6209 fi
6210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
6211 $as_echo "$ac_cv_search_sem_init" >&6; }
6212 ac_res=$ac_cv_search_sem_init
6213 if test "$ac_res" != no; then :
6214   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6215
6216 else
6217   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
6218
6219 fi
6220
6221 fi
6222
6223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
6224 $as_echo_n "checking for dlopen in -ldl... " >&6; }
6225 if ${ac_cv_lib_dl_dlopen+:} false; then :
6226   $as_echo_n "(cached) " >&6
6227 else
6228   ac_check_lib_save_LIBS=$LIBS
6229 LIBS="-ldl  $LIBS"
6230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6231 /* end confdefs.h.  */
6232
6233 /* Override any GCC internal prototype to avoid an error.
6234    Use char because int might match the return type of a GCC
6235    builtin and then its argument prototype would still apply.  */
6236 #ifdef __cplusplus
6237 extern "C"
6238 #endif
6239 char dlopen ();
6240 int
6241 main ()
6242 {
6243 return dlopen ();
6244   ;
6245   return 0;
6246 }
6247 _ACEOF
6248 if ac_fn_c_try_link "$LINENO"; then :
6249   ac_cv_lib_dl_dlopen=yes
6250 else
6251   ac_cv_lib_dl_dlopen=no
6252 fi
6253 rm -f core conftest.err conftest.$ac_objext \
6254     conftest$ac_exeext conftest.$ac_ext
6255 LIBS=$ac_check_lib_save_LIBS
6256 fi
6257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
6258 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
6259 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
6260   cat >>confdefs.h <<_ACEOF
6261 #define HAVE_LIBDL 1
6262 _ACEOF
6263
6264   LIBS="-ldl $LIBS"
6265
6266 fi
6267
6268
6269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getsockname in -lsocket" >&5
6270 $as_echo_n "checking for getsockname in -lsocket... " >&6; }
6271 if ${ac_cv_lib_socket_getsockname+:} false; then :
6272   $as_echo_n "(cached) " >&6
6273 else
6274   ac_check_lib_save_LIBS=$LIBS
6275 LIBS="-lsocket  $LIBS"
6276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6277 /* end confdefs.h.  */
6278
6279 /* Override any GCC internal prototype to avoid an error.
6280    Use char because int might match the return type of a GCC
6281    builtin and then its argument prototype would still apply.  */
6282 #ifdef __cplusplus
6283 extern "C"
6284 #endif
6285 char getsockname ();
6286 int
6287 main ()
6288 {
6289 return getsockname ();
6290   ;
6291   return 0;
6292 }
6293 _ACEOF
6294 if ac_fn_c_try_link "$LINENO"; then :
6295   ac_cv_lib_socket_getsockname=yes
6296 else
6297   ac_cv_lib_socket_getsockname=no
6298 fi
6299 rm -f core conftest.err conftest.$ac_objext \
6300     conftest$ac_exeext conftest.$ac_ext
6301 LIBS=$ac_check_lib_save_LIBS
6302 fi
6303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getsockname" >&5
6304 $as_echo "$ac_cv_lib_socket_getsockname" >&6; }
6305 if test "x$ac_cv_lib_socket_getsockname" = xyes; then :
6306   cat >>confdefs.h <<_ACEOF
6307 #define HAVE_LIBSOCKET 1
6308 _ACEOF
6309
6310   LIBS="-lsocket $LIBS"
6311
6312 fi
6313
6314
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
6316 $as_echo_n "checking for inet_aton in -lresolv... " >&6; }
6317 if ${ac_cv_lib_resolv_inet_aton+:} false; then :
6318   $as_echo_n "(cached) " >&6
6319 else
6320   ac_check_lib_save_LIBS=$LIBS
6321 LIBS="-lresolv  $LIBS"
6322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6323 /* end confdefs.h.  */
6324
6325 /* Override any GCC internal prototype to avoid an error.
6326    Use char because int might match the return type of a GCC
6327    builtin and then its argument prototype would still apply.  */
6328 #ifdef __cplusplus
6329 extern "C"
6330 #endif
6331 char inet_aton ();
6332 int
6333 main ()
6334 {
6335 return inet_aton ();
6336   ;
6337   return 0;
6338 }
6339 _ACEOF
6340 if ac_fn_c_try_link "$LINENO"; then :
6341   ac_cv_lib_resolv_inet_aton=yes
6342 else
6343   ac_cv_lib_resolv_inet_aton=no
6344 fi
6345 rm -f core conftest.err conftest.$ac_objext \
6346     conftest$ac_exeext conftest.$ac_ext
6347 LIBS=$ac_check_lib_save_LIBS
6348 fi
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
6350 $as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
6351 if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
6352   cat >>confdefs.h <<_ACEOF
6353 #define HAVE_LIBRESOLV 1
6354 _ACEOF
6355
6356   LIBS="-lresolv $LIBS"
6357
6358 fi
6359
6360
6361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnsl" >&5
6362 $as_echo_n "checking for inet_ntoa in -lnsl... " >&6; }
6363 if ${ac_cv_lib_nsl_inet_ntoa+:} false; then :
6364   $as_echo_n "(cached) " >&6
6365 else
6366   ac_check_lib_save_LIBS=$LIBS
6367 LIBS="-lnsl  $LIBS"
6368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6369 /* end confdefs.h.  */
6370
6371 /* Override any GCC internal prototype to avoid an error.
6372    Use char because int might match the return type of a GCC
6373    builtin and then its argument prototype would still apply.  */
6374 #ifdef __cplusplus
6375 extern "C"
6376 #endif
6377 char inet_ntoa ();
6378 int
6379 main ()
6380 {
6381 return inet_ntoa ();
6382   ;
6383   return 0;
6384 }
6385 _ACEOF
6386 if ac_fn_c_try_link "$LINENO"; then :
6387   ac_cv_lib_nsl_inet_ntoa=yes
6388 else
6389   ac_cv_lib_nsl_inet_ntoa=no
6390 fi
6391 rm -f core conftest.err conftest.$ac_objext \
6392     conftest$ac_exeext conftest.$ac_ext
6393 LIBS=$ac_check_lib_save_LIBS
6394 fi
6395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_inet_ntoa" >&5
6396 $as_echo "$ac_cv_lib_nsl_inet_ntoa" >&6; }
6397 if test "x$ac_cv_lib_nsl_inet_ntoa" = xyes; then :
6398   cat >>confdefs.h <<_ACEOF
6399 #define HAVE_LIBNSL 1
6400 _ACEOF
6401
6402   LIBS="-lnsl $LIBS"
6403
6404 fi
6405
6406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htonl in -lws2_32" >&5
6407 $as_echo_n "checking for htonl in -lws2_32... " >&6; }
6408 if ${ac_cv_lib_ws2_32_htonl+:} false; then :
6409   $as_echo_n "(cached) " >&6
6410 else
6411   ac_check_lib_save_LIBS=$LIBS
6412 LIBS="-lws2_32  $LIBS"
6413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6414 /* end confdefs.h.  */
6415
6416 /* Override any GCC internal prototype to avoid an error.
6417    Use char because int might match the return type of a GCC
6418    builtin and then its argument prototype would still apply.  */
6419 #ifdef __cplusplus
6420 extern "C"
6421 #endif
6422 char htonl ();
6423 int
6424 main ()
6425 {
6426 return htonl ();
6427   ;
6428   return 0;
6429 }
6430 _ACEOF
6431 if ac_fn_c_try_link "$LINENO"; then :
6432   ac_cv_lib_ws2_32_htonl=yes
6433 else
6434   ac_cv_lib_ws2_32_htonl=no
6435 fi
6436 rm -f core conftest.err conftest.$ac_objext \
6437     conftest$ac_exeext conftest.$ac_ext
6438 LIBS=$ac_check_lib_save_LIBS
6439 fi
6440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_htonl" >&5
6441 $as_echo "$ac_cv_lib_ws2_32_htonl" >&6; }
6442 if test "x$ac_cv_lib_ws2_32_htonl" = xyes; then :
6443   cat >>confdefs.h <<_ACEOF
6444 #define HAVE_LIBWS2_32 1
6445 _ACEOF
6446
6447   LIBS="-lws2_32 $LIBS"
6448
6449 fi
6450
6451
6452 pcap_lib_dir=
6453
6454 # Check whether --with-pcap-lib-dir was given.
6455 if test "${with_pcap_lib_dir+set}" = set; then :
6456   withval=$with_pcap_lib_dir; case "$withval" in
6457     no)
6458       as_fn_error $? "Need pcap-lib-dir" "$LINENO" 5
6459       ;;
6460     yes)
6461       ;;
6462     *)
6463       pcap_lib_dir="$withval"
6464       ;;
6465   esac
6466 fi
6467
6468
6469 pcap_include_dir=
6470
6471 # Check whether --with-pcap-include-dir was given.
6472 if test "${with_pcap_include_dir+set}" = set; then :
6473   withval=$with_pcap_include_dir; case "$withval" in
6474     no)
6475       as_fn_error $? "Need pcap-include-dir" "$LINENO" 5
6476       ;;
6477     yes)
6478       ;;
6479     *)
6480       pcap_include_dir="$withval"
6481       ;;
6482   esac
6483 fi
6484
6485
6486 smart_try_dir="$pcap_lib_dir"
6487
6488
6489 sm_lib_safe=`echo "pcap" | sed 'y%./+-%__p_%'`
6490 sm_func_safe=`echo "pcap_open_live" | sed 'y%./+-%__p_%'`
6491
6492 old_LIBS="$LIBS"
6493 old_CPPFLAGS="$CPPFLAGS"
6494 smart_lib=
6495 smart_ldflags=
6496 smart_lib_dir=
6497
6498 if test "x$smart_try_dir" != "x"; then
6499   for try in $smart_try_dir; do
6500     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap in $try" >&5
6501 $as_echo_n "checking for pcap_open_live in -lpcap in $try... " >&6; }
6502     LIBS="-lpcap $old_LIBS"
6503     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6504     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6505 /* end confdefs.h.  */
6506 extern char pcap_open_live();
6507 int
6508 main ()
6509 {
6510 pcap_open_live()
6511   ;
6512   return 0;
6513 }
6514 _ACEOF
6515 if ac_fn_c_try_link "$LINENO"; then :
6516
6517                  smart_lib="-lpcap"
6518                  smart_ldflags="-L$try -Wl,-rpath,$try"
6519                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6520 $as_echo "yes" >&6; }
6521                  break
6522
6523 else
6524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6525 $as_echo "no" >&6; }
6526 fi
6527 rm -f core conftest.err conftest.$ac_objext \
6528     conftest$ac_exeext conftest.$ac_ext
6529   done
6530   LIBS="$old_LIBS"
6531   CPPFLAGS="$old_CPPFLAGS"
6532 fi
6533
6534 if test "x$smart_lib" = "x"; then
6535   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap" >&5
6536 $as_echo_n "checking for pcap_open_live in -lpcap... " >&6; }
6537   LIBS="-lpcap $old_LIBS"
6538   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6539 /* end confdefs.h.  */
6540 extern char pcap_open_live();
6541 int
6542 main ()
6543 {
6544 pcap_open_live()
6545   ;
6546   return 0;
6547 }
6548 _ACEOF
6549 if ac_fn_c_try_link "$LINENO"; then :
6550
6551                 smart_lib="-lpcap"
6552                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6553 $as_echo "yes" >&6; }
6554
6555 else
6556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6557 $as_echo "no" >&6; }
6558 fi
6559 rm -f core conftest.err conftest.$ac_objext \
6560     conftest$ac_exeext conftest.$ac_ext
6561   LIBS="$old_LIBS"
6562 fi
6563
6564 if test "x$smart_lib" = "x"; then
6565
6566
6567 if test "x$LOCATE" != "x"; then
6568         DIRS=
6569   file=libpcap${libltdl_cv_shlibext}
6570
6571   for x in `${LOCATE} $file 2>/dev/null`; do
6572                                         base=`echo $x | sed "s%/${file}%%"`
6573     if test "x$x" = "x$base"; then
6574       continue;
6575     fi
6576
6577     dir=`${DIRNAME} $x 2>/dev/null`
6578                 exclude=`echo ${dir} | ${GREP} /home`
6579     if test "x$exclude" != "x"; then
6580       continue
6581     fi
6582
6583                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6584     if test "x$already" = "x"; then
6585       DIRS="$DIRS $dir"
6586     fi
6587   done
6588 fi
6589
6590 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6591
6592
6593
6594 if test "x$LOCATE" != "x"; then
6595         DIRS=
6596   file=libpcap.a
6597
6598   for x in `${LOCATE} $file 2>/dev/null`; do
6599                                         base=`echo $x | sed "s%/${file}%%"`
6600     if test "x$x" = "x$base"; then
6601       continue;
6602     fi
6603
6604     dir=`${DIRNAME} $x 2>/dev/null`
6605                 exclude=`echo ${dir} | ${GREP} /home`
6606     if test "x$exclude" != "x"; then
6607       continue
6608     fi
6609
6610                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6611     if test "x$already" = "x"; then
6612       DIRS="$DIRS $dir"
6613     fi
6614   done
6615 fi
6616
6617 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6618
6619
6620   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
6621     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap in $try" >&5
6622 $as_echo_n "checking for pcap_open_live in -lpcap in $try... " >&6; }
6623     LIBS="-lpcap $old_LIBS"
6624     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6625     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6626 /* end confdefs.h.  */
6627 extern char pcap_open_live();
6628 int
6629 main ()
6630 {
6631 pcap_open_live()
6632   ;
6633   return 0;
6634 }
6635 _ACEOF
6636 if ac_fn_c_try_link "$LINENO"; then :
6637
6638                   smart_lib="-lpcap"
6639                   smart_ldflags="-L$try -Wl,-rpath,$try"
6640                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6641 $as_echo "yes" >&6; }
6642                   break
6643
6644 else
6645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6646 $as_echo "no" >&6; }
6647 fi
6648 rm -f core conftest.err conftest.$ac_objext \
6649     conftest$ac_exeext conftest.$ac_ext
6650   done
6651   LIBS="$old_LIBS"
6652   CPPFLAGS="$old_CPPFLAGS"
6653 fi
6654
6655 if test "x$smart_lib" != "x"; then
6656   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
6657   LIBS="$smart_ldflags $smart_lib $old_LIBS"
6658   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
6659 fi
6660
6661 if test "x$ac_cv_lib_pcap_pcap_open_live" != "xyes"; then
6662   { $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
6663 $as_echo "$as_me: WARNING: pcap library not found, silently disabling the RADIUS sniffer, and ARP listener.  Use --with-pcap-lib-dir=<path>." >&2;}
6664 else
6665
6666 $as_echo "#define HAVE_LIBPCAP 1" >>confdefs.h
6667
6668
6669   for ac_func in \
6670     pcap_fopen_offline \
6671     pcap_dump_fopen \
6672     pcap_create \
6673     pcap_activate
6674
6675 do :
6676   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6677 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6678 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6679   cat >>confdefs.h <<_ACEOF
6680 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6681 _ACEOF
6682
6683 fi
6684 done
6685
6686
6687   PCAP_LIBS="${smart_lib}"
6688   PCAP_LDFLAGS="${smart_ldflags}"
6689 fi
6690 LIBS="${old_LIBS}"
6691
6692 collectdclient_lib_dir=
6693
6694 # Check whether --with-collectdclient-lib-dir was given.
6695 if test "${with_collectdclient_lib_dir+set}" = set; then :
6696   withval=$with_collectdclient_lib_dir; case "$withval" in
6697     no)
6698       as_fn_error $? "Need collectdclient-lib-dir" "$LINENO" 5
6699       ;;
6700     yes)
6701       ;;
6702     *)
6703       collectdclient_lib_dir="$withval"
6704       ;;
6705   esac
6706 fi
6707
6708
6709 collectdclient_include_dir=
6710
6711 # Check whether --with-collectdclient-include-dir was given.
6712 if test "${with_collectdclient_include_dir+set}" = set; then :
6713   withval=$with_collectdclient_include_dir; case "$withval" in
6714     no)
6715       as_fn_error $? "Need collectdclient-include-dir" "$LINENO" 5
6716       ;;
6717     yes)
6718       ;;
6719     *)
6720       collectdclient_include_dir="$withval"
6721       ;;
6722   esac
6723 fi
6724
6725
6726 smart_try_dir="$collectdclient_lib_dir"
6727
6728
6729 sm_lib_safe=`echo "collectdclient" | sed 'y%./+-%__p_%'`
6730 sm_func_safe=`echo "lcc_connect" | sed 'y%./+-%__p_%'`
6731
6732 old_LIBS="$LIBS"
6733 old_CPPFLAGS="$CPPFLAGS"
6734 smart_lib=
6735 smart_ldflags=
6736 smart_lib_dir=
6737
6738 if test "x$smart_try_dir" != "x"; then
6739   for try in $smart_try_dir; do
6740     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient in $try" >&5
6741 $as_echo_n "checking for lcc_connect in -lcollectdclient in $try... " >&6; }
6742     LIBS="-lcollectdclient $old_LIBS"
6743     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6744     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6745 /* end confdefs.h.  */
6746 extern char lcc_connect();
6747 int
6748 main ()
6749 {
6750 lcc_connect()
6751   ;
6752   return 0;
6753 }
6754 _ACEOF
6755 if ac_fn_c_try_link "$LINENO"; then :
6756
6757                  smart_lib="-lcollectdclient"
6758                  smart_ldflags="-L$try -Wl,-rpath,$try"
6759                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6760 $as_echo "yes" >&6; }
6761                  break
6762
6763 else
6764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6765 $as_echo "no" >&6; }
6766 fi
6767 rm -f core conftest.err conftest.$ac_objext \
6768     conftest$ac_exeext conftest.$ac_ext
6769   done
6770   LIBS="$old_LIBS"
6771   CPPFLAGS="$old_CPPFLAGS"
6772 fi
6773
6774 if test "x$smart_lib" = "x"; then
6775   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient" >&5
6776 $as_echo_n "checking for lcc_connect in -lcollectdclient... " >&6; }
6777   LIBS="-lcollectdclient $old_LIBS"
6778   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6779 /* end confdefs.h.  */
6780 extern char lcc_connect();
6781 int
6782 main ()
6783 {
6784 lcc_connect()
6785   ;
6786   return 0;
6787 }
6788 _ACEOF
6789 if ac_fn_c_try_link "$LINENO"; then :
6790
6791                 smart_lib="-lcollectdclient"
6792                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6793 $as_echo "yes" >&6; }
6794
6795 else
6796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6797 $as_echo "no" >&6; }
6798 fi
6799 rm -f core conftest.err conftest.$ac_objext \
6800     conftest$ac_exeext conftest.$ac_ext
6801   LIBS="$old_LIBS"
6802 fi
6803
6804 if test "x$smart_lib" = "x"; then
6805
6806
6807 if test "x$LOCATE" != "x"; then
6808         DIRS=
6809   file=libcollectdclient${libltdl_cv_shlibext}
6810
6811   for x in `${LOCATE} $file 2>/dev/null`; do
6812                                         base=`echo $x | sed "s%/${file}%%"`
6813     if test "x$x" = "x$base"; then
6814       continue;
6815     fi
6816
6817     dir=`${DIRNAME} $x 2>/dev/null`
6818                 exclude=`echo ${dir} | ${GREP} /home`
6819     if test "x$exclude" != "x"; then
6820       continue
6821     fi
6822
6823                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6824     if test "x$already" = "x"; then
6825       DIRS="$DIRS $dir"
6826     fi
6827   done
6828 fi
6829
6830 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6831
6832
6833
6834 if test "x$LOCATE" != "x"; then
6835         DIRS=
6836   file=libcollectdclient.a
6837
6838   for x in `${LOCATE} $file 2>/dev/null`; do
6839                                         base=`echo $x | sed "s%/${file}%%"`
6840     if test "x$x" = "x$base"; then
6841       continue;
6842     fi
6843
6844     dir=`${DIRNAME} $x 2>/dev/null`
6845                 exclude=`echo ${dir} | ${GREP} /home`
6846     if test "x$exclude" != "x"; then
6847       continue
6848     fi
6849
6850                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6851     if test "x$already" = "x"; then
6852       DIRS="$DIRS $dir"
6853     fi
6854   done
6855 fi
6856
6857 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6858
6859
6860   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
6861     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient in $try" >&5
6862 $as_echo_n "checking for lcc_connect in -lcollectdclient in $try... " >&6; }
6863     LIBS="-lcollectdclient $old_LIBS"
6864     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6865     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6866 /* end confdefs.h.  */
6867 extern char lcc_connect();
6868 int
6869 main ()
6870 {
6871 lcc_connect()
6872   ;
6873   return 0;
6874 }
6875 _ACEOF
6876 if ac_fn_c_try_link "$LINENO"; then :
6877
6878                   smart_lib="-lcollectdclient"
6879                   smart_ldflags="-L$try -Wl,-rpath,$try"
6880                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6881 $as_echo "yes" >&6; }
6882                   break
6883
6884 else
6885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6886 $as_echo "no" >&6; }
6887 fi
6888 rm -f core conftest.err conftest.$ac_objext \
6889     conftest$ac_exeext conftest.$ac_ext
6890   done
6891   LIBS="$old_LIBS"
6892   CPPFLAGS="$old_CPPFLAGS"
6893 fi
6894
6895 if test "x$smart_lib" != "x"; then
6896   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
6897   LIBS="$smart_ldflags $smart_lib $old_LIBS"
6898   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
6899 fi
6900
6901 if test "x$ac_cv_lib_collectdclient_lcc_connect" != "xyes"; then
6902   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: collectdclient library not found. Use --with-collectdclient-lib-dir=<path>." >&5
6903 $as_echo "$as_me: WARNING: collectdclient library not found. Use --with-collectdclient-lib-dir=<path>." >&2;}
6904 else
6905   COLLECTDC_LIBS="${smart_lib}"
6906   COLLECTDC_LDFLAGS="${smart_ldflags}"
6907 fi
6908 LIBS="${old_LIBS}"
6909
6910 cap_lib_dir=
6911
6912 # Check whether --with-cap-lib-dir was given.
6913 if test "${with_cap_lib_dir+set}" = set; then :
6914   withval=$with_cap_lib_dir; case "$withval" in
6915     no)
6916       as_fn_error $? "Need cap-lib-dir" "$LINENO" 5
6917       ;;
6918     yes)
6919       ;;
6920     *)
6921       cap_lib_dir="$withval"
6922       ;;
6923   esac
6924 fi
6925
6926
6927 cap_include_dir=
6928
6929 # Check whether --with-cap-include-dir was given.
6930 if test "${with_cap_include_dir+set}" = set; then :
6931   withval=$with_cap_include_dir; case "$withval" in
6932     no)
6933       as_fn_error $? "Need cap-include-dir" "$LINENO" 5
6934       ;;
6935     yes)
6936       ;;
6937     *)
6938       cap_include_dir="$withval"
6939       ;;
6940   esac
6941 fi
6942
6943
6944 smart_try_dir="$cap_lib_dir"
6945
6946
6947 sm_lib_safe=`echo "cap" | sed 'y%./+-%__p_%'`
6948 sm_func_safe=`echo "cap_get_proc" | sed 'y%./+-%__p_%'`
6949
6950 old_LIBS="$LIBS"
6951 old_CPPFLAGS="$CPPFLAGS"
6952 smart_lib=
6953 smart_ldflags=
6954 smart_lib_dir=
6955
6956 if test "x$smart_try_dir" != "x"; then
6957   for try in $smart_try_dir; do
6958     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap in $try" >&5
6959 $as_echo_n "checking for cap_get_proc in -lcap in $try... " >&6; }
6960     LIBS="-lcap $old_LIBS"
6961     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6962     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6963 /* end confdefs.h.  */
6964 extern char cap_get_proc();
6965 int
6966 main ()
6967 {
6968 cap_get_proc()
6969   ;
6970   return 0;
6971 }
6972 _ACEOF
6973 if ac_fn_c_try_link "$LINENO"; then :
6974
6975                  smart_lib="-lcap"
6976                  smart_ldflags="-L$try -Wl,-rpath,$try"
6977                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6978 $as_echo "yes" >&6; }
6979                  break
6980
6981 else
6982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6983 $as_echo "no" >&6; }
6984 fi
6985 rm -f core conftest.err conftest.$ac_objext \
6986     conftest$ac_exeext conftest.$ac_ext
6987   done
6988   LIBS="$old_LIBS"
6989   CPPFLAGS="$old_CPPFLAGS"
6990 fi
6991
6992 if test "x$smart_lib" = "x"; then
6993   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap" >&5
6994 $as_echo_n "checking for cap_get_proc in -lcap... " >&6; }
6995   LIBS="-lcap $old_LIBS"
6996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6997 /* end confdefs.h.  */
6998 extern char cap_get_proc();
6999 int
7000 main ()
7001 {
7002 cap_get_proc()
7003   ;
7004   return 0;
7005 }
7006 _ACEOF
7007 if ac_fn_c_try_link "$LINENO"; then :
7008
7009                 smart_lib="-lcap"
7010                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7011 $as_echo "yes" >&6; }
7012
7013 else
7014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7015 $as_echo "no" >&6; }
7016 fi
7017 rm -f core conftest.err conftest.$ac_objext \
7018     conftest$ac_exeext conftest.$ac_ext
7019   LIBS="$old_LIBS"
7020 fi
7021
7022 if test "x$smart_lib" = "x"; then
7023
7024
7025 if test "x$LOCATE" != "x"; then
7026         DIRS=
7027   file=libcap${libltdl_cv_shlibext}
7028
7029   for x in `${LOCATE} $file 2>/dev/null`; do
7030                                         base=`echo $x | sed "s%/${file}%%"`
7031     if test "x$x" = "x$base"; then
7032       continue;
7033     fi
7034
7035     dir=`${DIRNAME} $x 2>/dev/null`
7036                 exclude=`echo ${dir} | ${GREP} /home`
7037     if test "x$exclude" != "x"; then
7038       continue
7039     fi
7040
7041                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
7042     if test "x$already" = "x"; then
7043       DIRS="$DIRS $dir"
7044     fi
7045   done
7046 fi
7047
7048 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
7049
7050
7051
7052 if test "x$LOCATE" != "x"; then
7053         DIRS=
7054   file=libcap.a
7055
7056   for x in `${LOCATE} $file 2>/dev/null`; do
7057                                         base=`echo $x | sed "s%/${file}%%"`
7058     if test "x$x" = "x$base"; then
7059       continue;
7060     fi
7061
7062     dir=`${DIRNAME} $x 2>/dev/null`
7063                 exclude=`echo ${dir} | ${GREP} /home`
7064     if test "x$exclude" != "x"; then
7065       continue
7066     fi
7067
7068                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
7069     if test "x$already" = "x"; then
7070       DIRS="$DIRS $dir"
7071     fi
7072   done
7073 fi
7074
7075 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
7076
7077
7078   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
7079     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap in $try" >&5
7080 $as_echo_n "checking for cap_get_proc in -lcap in $try... " >&6; }
7081     LIBS="-lcap $old_LIBS"
7082     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
7083     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7084 /* end confdefs.h.  */
7085 extern char cap_get_proc();
7086 int
7087 main ()
7088 {
7089 cap_get_proc()
7090   ;
7091   return 0;
7092 }
7093 _ACEOF
7094 if ac_fn_c_try_link "$LINENO"; then :
7095
7096                   smart_lib="-lcap"
7097                   smart_ldflags="-L$try -Wl,-rpath,$try"
7098                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7099 $as_echo "yes" >&6; }
7100                   break
7101
7102 else
7103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7104 $as_echo "no" >&6; }
7105 fi
7106 rm -f core conftest.err conftest.$ac_objext \
7107     conftest$ac_exeext conftest.$ac_ext
7108   done
7109   LIBS="$old_LIBS"
7110   CPPFLAGS="$old_CPPFLAGS"
7111 fi
7112
7113 if test "x$smart_lib" != "x"; then
7114   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
7115   LIBS="$smart_ldflags $smart_lib $old_LIBS"
7116   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
7117 fi
7118
7119 if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then
7120   { $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
7121 $as_echo "$as_me: WARNING: cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>." >&2;}
7122 else
7123
7124 $as_echo "#define HAVE_LIBCAP 1" >>confdefs.h
7125
7126   HAVE_LIBCAP=1
7127 fi
7128
7129
7130   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a readline compatible library" >&5
7131 $as_echo_n "checking for a readline compatible library... " >&6; }
7132 if ${vl_cv_lib_readline+:} false; then :
7133   $as_echo_n "(cached) " >&6
7134 else
7135
7136     ORIG_LIBS="$LIBS"
7137     for readline_lib in readline edit editline; do
7138       for termcap_lib in "" termcap curses ncurses; do
7139         if test -z "$termcap_lib"; then
7140           TRY_LIB="-l$readline_lib"
7141         else
7142           TRY_LIB="-l$readline_lib -l$termcap_lib"
7143         fi
7144         LIBS="$ORIG_LIBS $TRY_LIB"
7145         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7146 /* end confdefs.h.  */
7147
7148 /* Override any GCC internal prototype to avoid an error.
7149    Use char because int might match the return type of a GCC
7150    builtin and then its argument prototype would still apply.  */
7151 #ifdef __cplusplus
7152 extern "C"
7153 #endif
7154 char readline ();
7155 int
7156 main ()
7157 {
7158 return readline ();
7159   ;
7160   return 0;
7161 }
7162 _ACEOF
7163 if ac_fn_c_try_link "$LINENO"; then :
7164   vl_cv_lib_readline="$TRY_LIB"
7165 fi
7166 rm -f core conftest.err conftest.$ac_objext \
7167     conftest$ac_exeext conftest.$ac_ext
7168         if test -n "$vl_cv_lib_readline"; then
7169           break
7170         fi
7171       done
7172       if test -n "$vl_cv_lib_readline"; then
7173         break
7174       fi
7175     done
7176     if test -z "$vl_cv_lib_readline"; then
7177       vl_cv_lib_readline="no"
7178       LIBS="$ORIG_LIBS"
7179     fi
7180
7181 fi
7182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vl_cv_lib_readline" >&5
7183 $as_echo "$vl_cv_lib_readline" >&6; }
7184
7185   if test "$vl_cv_lib_readline" != "no"; then
7186     LIBREADLINE="$vl_cv_lib_readline"
7187
7188 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
7189
7190     for ac_header in readline.h readline/readline.h
7191 do :
7192   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7193 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7194 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7195   cat >>confdefs.h <<_ACEOF
7196 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7197 _ACEOF
7198
7199 fi
7200
7201 done
7202
7203     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
7204 $as_echo_n "checking whether readline supports history... " >&6; }
7205 if ${vl_cv_lib_readline_history+:} false; then :
7206   $as_echo_n "(cached) " >&6
7207 else
7208
7209       vl_cv_lib_readline_history="no"
7210       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7211 /* end confdefs.h.  */
7212
7213 /* Override any GCC internal prototype to avoid an error.
7214    Use char because int might match the return type of a GCC
7215    builtin and then its argument prototype would still apply.  */
7216 #ifdef __cplusplus
7217 extern "C"
7218 #endif
7219 char add_history ();
7220 int
7221 main ()
7222 {
7223 return add_history ();
7224   ;
7225   return 0;
7226 }
7227 _ACEOF
7228 if ac_fn_c_try_link "$LINENO"; then :
7229   vl_cv_lib_readline_history="yes"
7230 fi
7231 rm -f core conftest.err conftest.$ac_objext \
7232     conftest$ac_exeext conftest.$ac_ext
7233
7234 fi
7235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vl_cv_lib_readline_history" >&5
7236 $as_echo "$vl_cv_lib_readline_history" >&6; }
7237     if test "$vl_cv_lib_readline_history" = "yes"; then
7238
7239 $as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
7240
7241       for ac_header in history.h readline/history.h
7242 do :
7243   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7244 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7245 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7246   cat >>confdefs.h <<_ACEOF
7247 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7248 _ACEOF
7249
7250 fi
7251
7252 done
7253
7254     fi
7255   fi
7256
7257
7258
7259
7260 smart_try_dir="$talloc_include_dir"
7261
7262
7263 ac_safe=`echo "talloc.h" | sed 'y%./+-%__pm%'`
7264 old_CPPFLAGS="$CPPFLAGS"
7265 smart_include=
7266 smart_include_dir="/usr/local/include /opt/include"
7267
7268 _smart_try_dir=
7269 _smart_include_dir=
7270
7271 for _prefix in $smart_prefix ""; do
7272   for _dir in $smart_try_dir; do
7273     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
7274   done
7275
7276   for _dir in $smart_include_dir; do
7277     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
7278   done
7279 done
7280
7281 if test "x$_smart_try_dir" != "x"; then
7282   for try in $_smart_try_dir; do
7283     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h in $try" >&5
7284 $as_echo_n "checking for talloc.h in $try... " >&6; }
7285     CPPFLAGS="-isystem $try $old_CPPFLAGS"
7286     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7287 /* end confdefs.h.  */
7288
7289                     #include <talloc.h>
7290 int
7291 main ()
7292 {
7293 int a = 1;
7294   ;
7295   return 0;
7296 }
7297 _ACEOF
7298 if ac_fn_c_try_compile "$LINENO"; then :
7299
7300                      smart_include="-isystem $try"
7301                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7302 $as_echo "yes" >&6; }
7303                      break
7304
7305 else
7306
7307                      smart_include=
7308                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7309 $as_echo "no" >&6; }
7310
7311 fi
7312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7313   done
7314   CPPFLAGS="$old_CPPFLAGS"
7315 fi
7316
7317 if test "x$smart_include" = "x"; then
7318   for _prefix in $smart_prefix; do
7319     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/talloc.h" >&5
7320 $as_echo_n "checking for ${_prefix}/talloc.h... " >&6; }
7321
7322     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7323 /* end confdefs.h.  */
7324
7325                     #include <talloc.h>
7326 int
7327 main ()
7328 {
7329 int a = 1;
7330   ;
7331   return 0;
7332 }
7333 _ACEOF
7334 if ac_fn_c_try_compile "$LINENO"; then :
7335
7336                      smart_include="-isystem ${_prefix}/"
7337                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7338 $as_echo "yes" >&6; }
7339                      break
7340
7341 else
7342
7343                      smart_include=
7344                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7345 $as_echo "no" >&6; }
7346
7347 fi
7348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7349   done
7350 fi
7351
7352 if test "x$smart_include" = "x"; then
7353     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h" >&5
7354 $as_echo_n "checking for talloc.h... " >&6; }
7355
7356     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7357 /* end confdefs.h.  */
7358
7359                     #include <talloc.h>
7360 int
7361 main ()
7362 {
7363 int a = 1;
7364   ;
7365   return 0;
7366 }
7367 _ACEOF
7368 if ac_fn_c_try_compile "$LINENO"; then :
7369
7370                      smart_include=" "
7371                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7372 $as_echo "yes" >&6; }
7373                      break
7374
7375 else
7376
7377                      smart_include=
7378                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7379 $as_echo "no" >&6; }
7380
7381 fi
7382 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7383 fi
7384
7385 if test "x$smart_include" = "x"; then
7386
7387   for prefix in $smart_prefix; do
7388
7389
7390 if test "x$LOCATE" != "x"; then
7391         DIRS=
7392   file="${_prefix}/${1}"
7393
7394   for x in `${LOCATE} $file 2>/dev/null`; do
7395                                         base=`echo $x | sed "s%/${file}%%"`
7396     if test "x$x" = "x$base"; then
7397       continue;
7398     fi
7399
7400     dir=`${DIRNAME} $x 2>/dev/null`
7401                 exclude=`echo ${dir} | ${GREP} /home`
7402     if test "x$exclude" != "x"; then
7403       continue
7404     fi
7405
7406                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
7407     if test "x$already" = "x"; then
7408       DIRS="$DIRS $dir"
7409     fi
7410   done
7411 fi
7412
7413 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
7414
7415   done
7416
7417
7418 if test "x$LOCATE" != "x"; then
7419         DIRS=
7420   file=talloc.h
7421
7422   for x in `${LOCATE} $file 2>/dev/null`; do
7423                                         base=`echo $x | sed "s%/${file}%%"`
7424     if test "x$x" = "x$base"; then
7425       continue;
7426     fi
7427
7428     dir=`${DIRNAME} $x 2>/dev/null`
7429                 exclude=`echo ${dir} | ${GREP} /home`
7430     if test "x$exclude" != "x"; then
7431       continue
7432     fi
7433
7434                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
7435     if test "x$already" = "x"; then
7436       DIRS="$DIRS $dir"
7437     fi
7438   done
7439 fi
7440
7441 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
7442
7443
7444   for try in $_smart_include_dir; do
7445     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h in $try" >&5
7446 $as_echo_n "checking for talloc.h in $try... " >&6; }
7447     CPPFLAGS="-isystem $try $old_CPPFLAGS"
7448     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7449 /* end confdefs.h.  */
7450
7451                     #include <talloc.h>
7452 int
7453 main ()
7454 {
7455 int a = 1;
7456   ;
7457   return 0;
7458 }
7459 _ACEOF
7460 if ac_fn_c_try_compile "$LINENO"; then :
7461
7462                      smart_include="-isystem $try"
7463                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7464 $as_echo "yes" >&6; }
7465                      break
7466
7467 else
7468
7469                      smart_include=
7470                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7471 $as_echo "no" >&6; }
7472
7473 fi
7474 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7475   done
7476   CPPFLAGS="$old_CPPFLAGS"
7477 fi
7478
7479 if test "x$smart_include" != "x"; then
7480   eval "ac_cv_header_$ac_safe=yes"
7481   CPPFLAGS="$smart_include $old_CPPFLAGS"
7482   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
7483 fi
7484
7485 smart_prefix=
7486
7487 if test "x$ac_cv_header_talloc_h" != "xyes"; then
7488   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: talloc headers not found. Use --with-talloc-include-dir=<path>." >&5
7489 $as_echo "$as_me: WARNING: talloc headers not found. Use --with-talloc-include-dir=<path>." >&2;}
7490   as_fn_error $? "FreeRADIUS requires libtalloc" "$LINENO" 5
7491 fi
7492
7493 case "$host" in
7494   *-interix*)
7495     CFLAGS="$CFLAGS -D_ALL_SOURCE"
7496     ;;
7497   *-darwin*)
7498     CFLAGS="$CFLAGS -DDARWIN"
7499     LIBS="-framework DirectoryService $LIBS"
7500
7501 $as_echo "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
7502
7503     ;;
7504 esac
7505
7506 ac_header_dirent=no
7507 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
7508   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7510 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
7511 if eval \${$as_ac_Header+:} false; then :
7512   $as_echo_n "(cached) " >&6
7513 else
7514   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7515 /* end confdefs.h.  */
7516 #include <sys/types.h>
7517 #include <$ac_hdr>
7518
7519 int
7520 main ()
7521 {
7522 if ((DIR *) 0)
7523 return 0;
7524   ;
7525   return 0;
7526 }
7527 _ACEOF
7528 if ac_fn_c_try_compile "$LINENO"; then :
7529   eval "$as_ac_Header=yes"
7530 else
7531   eval "$as_ac_Header=no"
7532 fi
7533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7534 fi
7535 eval ac_res=\$$as_ac_Header
7536                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7537 $as_echo "$ac_res" >&6; }
7538 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7539   cat >>confdefs.h <<_ACEOF
7540 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
7541 _ACEOF
7542
7543 ac_header_dirent=$ac_hdr; break
7544 fi
7545
7546 done
7547 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7548 if test $ac_header_dirent = dirent.h; then
7549   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7550 $as_echo_n "checking for library containing opendir... " >&6; }
7551 if ${ac_cv_search_opendir+:} false; then :
7552   $as_echo_n "(cached) " >&6
7553 else
7554   ac_func_search_save_LIBS=$LIBS
7555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7556 /* end confdefs.h.  */
7557
7558 /* Override any GCC internal prototype to avoid an error.
7559    Use char because int might match the return type of a GCC
7560    builtin and then its argument prototype would still apply.  */
7561 #ifdef __cplusplus
7562 extern "C"
7563 #endif
7564 char opendir ();
7565 int
7566 main ()
7567 {
7568 return opendir ();
7569   ;
7570   return 0;
7571 }
7572 _ACEOF
7573 for ac_lib in '' dir; do
7574   if test -z "$ac_lib"; then
7575     ac_res="none required"
7576   else
7577     ac_res=-l$ac_lib
7578     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7579   fi
7580   if ac_fn_c_try_link "$LINENO"; then :
7581   ac_cv_search_opendir=$ac_res
7582 fi
7583 rm -f core conftest.err conftest.$ac_objext \
7584     conftest$ac_exeext
7585   if ${ac_cv_search_opendir+:} false; then :
7586   break
7587 fi
7588 done
7589 if ${ac_cv_search_opendir+:} false; then :
7590
7591 else
7592   ac_cv_search_opendir=no
7593 fi
7594 rm conftest.$ac_ext
7595 LIBS=$ac_func_search_save_LIBS
7596 fi
7597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7598 $as_echo "$ac_cv_search_opendir" >&6; }
7599 ac_res=$ac_cv_search_opendir
7600 if test "$ac_res" != no; then :
7601   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7602
7603 fi
7604
7605 else
7606   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7607 $as_echo_n "checking for library containing opendir... " >&6; }
7608 if ${ac_cv_search_opendir+:} false; then :
7609   $as_echo_n "(cached) " >&6
7610 else
7611   ac_func_search_save_LIBS=$LIBS
7612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7613 /* end confdefs.h.  */
7614
7615 /* Override any GCC internal prototype to avoid an error.
7616    Use char because int might match the return type of a GCC
7617    builtin and then its argument prototype would still apply.  */
7618 #ifdef __cplusplus
7619 extern "C"
7620 #endif
7621 char opendir ();
7622 int
7623 main ()
7624 {
7625 return opendir ();
7626   ;
7627   return 0;
7628 }
7629 _ACEOF
7630 for ac_lib in '' x; do
7631   if test -z "$ac_lib"; then
7632     ac_res="none required"
7633   else
7634     ac_res=-l$ac_lib
7635     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7636   fi
7637   if ac_fn_c_try_link "$LINENO"; then :
7638   ac_cv_search_opendir=$ac_res
7639 fi
7640 rm -f core conftest.err conftest.$ac_objext \
7641     conftest$ac_exeext
7642   if ${ac_cv_search_opendir+:} false; then :
7643   break
7644 fi
7645 done
7646 if ${ac_cv_search_opendir+:} false; then :
7647
7648 else
7649   ac_cv_search_opendir=no
7650 fi
7651 rm conftest.$ac_ext
7652 LIBS=$ac_func_search_save_LIBS
7653 fi
7654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7655 $as_echo "$ac_cv_search_opendir" >&6; }
7656 ac_res=$ac_cv_search_opendir
7657 if test "$ac_res" != no; then :
7658   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7659
7660 fi
7661
7662 fi
7663
7664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7665 $as_echo_n "checking for ANSI C header files... " >&6; }
7666 if ${ac_cv_header_stdc+:} false; then :
7667   $as_echo_n "(cached) " >&6
7668 else
7669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7670 /* end confdefs.h.  */
7671 #include <stdlib.h>
7672 #include <stdarg.h>
7673 #include <string.h>
7674 #include <float.h>
7675
7676 int
7677 main ()
7678 {
7679
7680   ;
7681   return 0;
7682 }
7683 _ACEOF
7684 if ac_fn_c_try_compile "$LINENO"; then :
7685   ac_cv_header_stdc=yes
7686 else
7687   ac_cv_header_stdc=no
7688 fi
7689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7690
7691 if test $ac_cv_header_stdc = yes; then
7692   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7693   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7694 /* end confdefs.h.  */
7695 #include <string.h>
7696
7697 _ACEOF
7698 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7699   $EGREP "memchr" >/dev/null 2>&1; then :
7700
7701 else
7702   ac_cv_header_stdc=no
7703 fi
7704 rm -f conftest*
7705
7706 fi
7707
7708 if test $ac_cv_header_stdc = yes; then
7709   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7710   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7711 /* end confdefs.h.  */
7712 #include <stdlib.h>
7713
7714 _ACEOF
7715 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7716   $EGREP "free" >/dev/null 2>&1; then :
7717
7718 else
7719   ac_cv_header_stdc=no
7720 fi
7721 rm -f conftest*
7722
7723 fi
7724
7725 if test $ac_cv_header_stdc = yes; then
7726   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7727   if test "$cross_compiling" = yes; then :
7728   :
7729 else
7730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7731 /* end confdefs.h.  */
7732 #include <ctype.h>
7733 #include <stdlib.h>
7734 #if ((' ' & 0x0FF) == 0x020)
7735 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7736 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7737 #else
7738 # define ISLOWER(c) \
7739                    (('a' <= (c) && (c) <= 'i') \
7740                      || ('j' <= (c) && (c) <= 'r') \
7741                      || ('s' <= (c) && (c) <= 'z'))
7742 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7743 #endif
7744
7745 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7746 int
7747 main ()
7748 {
7749   int i;
7750   for (i = 0; i < 256; i++)
7751     if (XOR (islower (i), ISLOWER (i))
7752         || toupper (i) != TOUPPER (i))
7753       return 2;
7754   return 0;
7755 }
7756 _ACEOF
7757 if ac_fn_c_try_run "$LINENO"; then :
7758
7759 else
7760   ac_cv_header_stdc=no
7761 fi
7762 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7763   conftest.$ac_objext conftest.beam conftest.$ac_ext
7764 fi
7765
7766 fi
7767 fi
7768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7769 $as_echo "$ac_cv_header_stdc" >&6; }
7770 if test $ac_cv_header_stdc = yes; then
7771
7772 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7773
7774 fi
7775
7776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
7777 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
7778 if ${ac_cv_header_time+:} false; then :
7779   $as_echo_n "(cached) " >&6
7780 else
7781   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7782 /* end confdefs.h.  */
7783 #include <sys/types.h>
7784 #include <sys/time.h>
7785 #include <time.h>
7786
7787 int
7788 main ()
7789 {
7790 if ((struct tm *) 0)
7791 return 0;
7792   ;
7793   return 0;
7794 }
7795 _ACEOF
7796 if ac_fn_c_try_compile "$LINENO"; then :
7797   ac_cv_header_time=yes
7798 else
7799   ac_cv_header_time=no
7800 fi
7801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7802 fi
7803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
7804 $as_echo "$ac_cv_header_time" >&6; }
7805 if test $ac_cv_header_time = yes; then
7806
7807 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
7808
7809 fi
7810
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
7812 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
7813 if ${ac_cv_header_sys_wait_h+:} false; then :
7814   $as_echo_n "(cached) " >&6
7815 else
7816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7817 /* end confdefs.h.  */
7818 #include <sys/types.h>
7819 #include <sys/wait.h>
7820 #ifndef WEXITSTATUS
7821 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
7822 #endif
7823 #ifndef WIFEXITED
7824 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7825 #endif
7826
7827 int
7828 main ()
7829 {
7830   int s;
7831   wait (&s);
7832   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7833   ;
7834   return 0;
7835 }
7836 _ACEOF
7837 if ac_fn_c_try_compile "$LINENO"; then :
7838   ac_cv_header_sys_wait_h=yes
7839 else
7840   ac_cv_header_sys_wait_h=no
7841 fi
7842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7843 fi
7844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
7845 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
7846 if test $ac_cv_header_sys_wait_h = yes; then
7847
7848 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7849
7850 fi
7851
7852
7853 for ac_header in \
7854   dlfcn.h \
7855   unistd.h \
7856   crypt.h \
7857   errno.h \
7858   resource.h \
7859   sys/resource.h \
7860   getopt.h \
7861   malloc.h \
7862   utmp.h \
7863   utmpx.h \
7864   signal.h \
7865   sys/select.h \
7866   syslog.h \
7867   inttypes.h \
7868   stdint.h \
7869   stdbool.h \
7870   stdio.h \
7871   netdb.h \
7872   semaphore.h \
7873   arpa/inet.h \
7874   netinet/in.h \
7875   sys/types.h \
7876   sys/socket.h \
7877   winsock.h \
7878   utime.h \
7879   sys/time.h \
7880   sys/wait.h \
7881   sys/security.h \
7882   fcntl.h \
7883   sys/fcntl.h \
7884   sys/prctl.h \
7885   sys/ptrace.h \
7886   sys/un.h \
7887   glob.h \
7888   prot.h \
7889   pwd.h \
7890   grp.h \
7891   stddef.h \
7892   fnmatch.h \
7893   sia.h \
7894   siad.h \
7895   features.h \
7896   limits.h \
7897   sys/event.h
7898
7899 do :
7900   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7901 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7902 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7903   cat >>confdefs.h <<_ACEOF
7904 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7905 _ACEOF
7906
7907 fi
7908
7909 done
7910
7911
7912 for ac_header in net/if.h
7913 do :
7914   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
7915     #ifdef HAVE_SYS_SOCKET_H
7916     #  include <sys/socket.h>
7917     #endif
7918
7919
7920 "
7921 if test "x$ac_cv_header_net_if_h" = xyes; then :
7922   cat >>confdefs.h <<_ACEOF
7923 #define HAVE_NET_IF_H 1
7924 _ACEOF
7925
7926 fi
7927
7928 done
7929
7930
7931 if test "x$ac_cv_header_sys_security_h" = "xyes" && test "x$ac_cv_header_prot_h" = "xyes"
7932 then
7933
7934 $as_echo "#define OSFC2 /**/" >>confdefs.h
7935
7936 fi
7937
7938 if test "x$ac_cv_header_sia_h" = "xyes" && test "x$ac_cv_header_siad_h" = "xyes"
7939 then
7940
7941 $as_echo "#define OSFSIA /**/" >>confdefs.h
7942
7943 fi
7944
7945 if test "x$WITH_OPENSSL" = xyes; then
7946   OLD_LIBS="$LIBS"
7947
7948         CFLAGS="$CFLAGS -DOPENSSL_NO_KRB5"
7949
7950         smart_try_dir="$openssl_lib_dir"
7951
7952
7953 sm_lib_safe=`echo "crypto" | sed 'y%./+-%__p_%'`
7954 sm_func_safe=`echo "DH_new" | sed 'y%./+-%__p_%'`
7955
7956 old_LIBS="$LIBS"
7957 old_CPPFLAGS="$CPPFLAGS"
7958 smart_lib=
7959 smart_ldflags=
7960 smart_lib_dir=
7961
7962 if test "x$smart_try_dir" != "x"; then
7963   for try in $smart_try_dir; do
7964     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto in $try" >&5
7965 $as_echo_n "checking for DH_new in -lcrypto in $try... " >&6; }
7966     LIBS="-lcrypto $old_LIBS"
7967     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
7968     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7969 /* end confdefs.h.  */
7970 extern char DH_new();
7971 int
7972 main ()
7973 {
7974 DH_new()
7975   ;
7976   return 0;
7977 }
7978 _ACEOF
7979 if ac_fn_c_try_link "$LINENO"; then :
7980
7981                  smart_lib="-lcrypto"
7982                  smart_ldflags="-L$try -Wl,-rpath,$try"
7983                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7984 $as_echo "yes" >&6; }
7985                  break
7986
7987 else
7988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7989 $as_echo "no" >&6; }
7990 fi
7991 rm -f core conftest.err conftest.$ac_objext \
7992     conftest$ac_exeext conftest.$ac_ext
7993   done
7994   LIBS="$old_LIBS"
7995   CPPFLAGS="$old_CPPFLAGS"
7996 fi
7997
7998 if test "x$smart_lib" = "x"; then
7999   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto" >&5
8000 $as_echo_n "checking for DH_new in -lcrypto... " >&6; }
8001   LIBS="-lcrypto $old_LIBS"
8002   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8003 /* end confdefs.h.  */
8004 extern char DH_new();
8005 int
8006 main ()
8007 {
8008 DH_new()
8009   ;
8010   return 0;
8011 }
8012 _ACEOF
8013 if ac_fn_c_try_link "$LINENO"; then :
8014
8015                 smart_lib="-lcrypto"
8016                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8017 $as_echo "yes" >&6; }
8018
8019 else
8020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8021 $as_echo "no" >&6; }
8022 fi
8023 rm -f core conftest.err conftest.$ac_objext \
8024     conftest$ac_exeext conftest.$ac_ext
8025   LIBS="$old_LIBS"
8026 fi
8027
8028 if test "x$smart_lib" = "x"; then
8029
8030
8031 if test "x$LOCATE" != "x"; then
8032         DIRS=
8033   file=libcrypto${libltdl_cv_shlibext}
8034
8035   for x in `${LOCATE} $file 2>/dev/null`; do
8036                                         base=`echo $x | sed "s%/${file}%%"`
8037     if test "x$x" = "x$base"; then
8038       continue;
8039     fi
8040
8041     dir=`${DIRNAME} $x 2>/dev/null`
8042                 exclude=`echo ${dir} | ${GREP} /home`
8043     if test "x$exclude" != "x"; then
8044       continue
8045     fi
8046
8047                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
8048     if test "x$already" = "x"; then
8049       DIRS="$DIRS $dir"
8050     fi
8051   done
8052 fi
8053
8054 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
8055
8056
8057
8058 if test "x$LOCATE" != "x"; then
8059         DIRS=
8060   file=libcrypto.a
8061
8062   for x in `${LOCATE} $file 2>/dev/null`; do
8063                                         base=`echo $x | sed "s%/${file}%%"`
8064     if test "x$x" = "x$base"; then
8065       continue;
8066     fi
8067
8068     dir=`${DIRNAME} $x 2>/dev/null`
8069                 exclude=`echo ${dir} | ${GREP} /home`
8070     if test "x$exclude" != "x"; then
8071       continue
8072     fi
8073
8074                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
8075     if test "x$already" = "x"; then
8076       DIRS="$DIRS $dir"
8077     fi
8078   done
8079 fi
8080
8081 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
8082
8083
8084   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
8085     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto in $try" >&5
8086 $as_echo_n "checking for DH_new in -lcrypto in $try... " >&6; }
8087     LIBS="-lcrypto $old_LIBS"
8088     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
8089     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8090 /* end confdefs.h.  */
8091 extern char DH_new();
8092 int
8093 main ()
8094 {
8095 DH_new()
8096   ;
8097   return 0;
8098 }
8099 _ACEOF
8100 if ac_fn_c_try_link "$LINENO"; then :
8101
8102                   smart_lib="-lcrypto"
8103                   smart_ldflags="-L$try -Wl,-rpath,$try"
8104                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8105 $as_echo "yes" >&6; }
8106                   break
8107
8108 else
8109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8110 $as_echo "no" >&6; }
8111 fi
8112 rm -f core conftest.err conftest.$ac_objext \
8113     conftest$ac_exeext conftest.$ac_ext
8114   done
8115   LIBS="$old_LIBS"
8116   CPPFLAGS="$old_CPPFLAGS"
8117 fi
8118
8119 if test "x$smart_lib" != "x"; then
8120   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
8121   LIBS="$smart_ldflags $smart_lib $old_LIBS"
8122   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
8123 fi
8124
8125   if test "x$ac_cv_lib_crypto_DH_new" = "xyes"; then
8126
8127 $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
8128
8129     OPENSSL_LIBS="$smart_lib"
8130     OPENSSL_LDFLAGS="$smart_ldflags"
8131
8132
8133
8134 sm_lib_safe=`echo "ssl" | sed 'y%./+-%__p_%'`
8135 sm_func_safe=`echo "SSL_new" | sed 'y%./+-%__p_%'`
8136
8137 old_LIBS="$LIBS"
8138 old_CPPFLAGS="$CPPFLAGS"
8139 smart_lib=
8140 smart_ldflags=
8141 smart_lib_dir=
8142
8143 if test "x$smart_try_dir" != "x"; then
8144   for try in $smart_try_dir; do
8145     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl in $try" >&5
8146 $as_echo_n "checking for SSL_new in -lssl in $try... " >&6; }
8147     LIBS="-lssl $old_LIBS"
8148     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
8149     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8150 /* end confdefs.h.  */
8151 extern char SSL_new();
8152 int
8153 main ()
8154 {
8155 SSL_new()
8156   ;
8157   return 0;
8158 }
8159 _ACEOF
8160 if ac_fn_c_try_link "$LINENO"; then :
8161
8162                  smart_lib="-lssl"
8163                  smart_ldflags="-L$try -Wl,-rpath,$try"
8164                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8165 $as_echo "yes" >&6; }
8166                  break
8167
8168 else
8169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8170 $as_echo "no" >&6; }
8171 fi
8172 rm -f core conftest.err conftest.$ac_objext \
8173     conftest$ac_exeext conftest.$ac_ext
8174   done
8175   LIBS="$old_LIBS"
8176   CPPFLAGS="$old_CPPFLAGS"
8177 fi
8178
8179 if test "x$smart_lib" = "x"; then
8180   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
8181 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
8182   LIBS="-lssl $old_LIBS"
8183   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8184 /* end confdefs.h.  */
8185 extern char SSL_new();
8186 int
8187 main ()
8188 {
8189 SSL_new()
8190   ;
8191   return 0;
8192 }
8193 _ACEOF
8194 if ac_fn_c_try_link "$LINENO"; then :
8195
8196                 smart_lib="-lssl"
8197                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8198 $as_echo "yes" >&6; }
8199
8200 else
8201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8202 $as_echo "no" >&6; }
8203 fi
8204 rm -f core conftest.err conftest.$ac_objext \
8205     conftest$ac_exeext conftest.$ac_ext
8206   LIBS="$old_LIBS"
8207 fi
8208
8209 if test "x$smart_lib" = "x"; then
8210
8211
8212 if test "x$LOCATE" != "x"; then
8213         DIRS=
8214   file=libssl${libltdl_cv_shlibext}
8215
8216   for x in `${LOCATE} $file 2>/dev/null`; do
8217                                         base=`echo $x | sed "s%/${file}%%"`
8218     if test "x$x" = "x$base"; then
8219       continue;
8220     fi
8221
8222     dir=`${DIRNAME} $x 2>/dev/null`
8223                 exclude=`echo ${dir} | ${GREP} /home`
8224     if test "x$exclude" != "x"; then
8225       continue
8226     fi
8227
8228                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
8229     if test "x$already" = "x"; then
8230       DIRS="$DIRS $dir"
8231     fi
8232   done
8233 fi
8234
8235 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
8236
8237
8238
8239 if test "x$LOCATE" != "x"; then
8240         DIRS=
8241   file=libssl.a
8242
8243   for x in `${LOCATE} $file 2>/dev/null`; do
8244                                         base=`echo $x | sed "s%/${file}%%"`
8245     if test "x$x" = "x$base"; then
8246       continue;
8247     fi
8248
8249     dir=`${DIRNAME} $x 2>/dev/null`
8250                 exclude=`echo ${dir} | ${GREP} /home`
8251     if test "x$exclude" != "x"; then
8252       continue
8253     fi
8254
8255                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
8256     if test "x$already" = "x"; then
8257       DIRS="$DIRS $dir"
8258     fi
8259   done
8260 fi
8261
8262 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
8263
8264
8265   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
8266     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl in $try" >&5
8267 $as_echo_n "checking for SSL_new in -lssl in $try... " >&6; }
8268     LIBS="-lssl $old_LIBS"
8269     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
8270     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8271 /* end confdefs.h.  */
8272 extern char SSL_new();
8273 int
8274 main ()
8275 {
8276 SSL_new()
8277   ;
8278   return 0;
8279 }
8280 _ACEOF
8281 if ac_fn_c_try_link "$LINENO"; then :
8282
8283                   smart_lib="-lssl"
8284                   smart_ldflags="-L$try -Wl,-rpath,$try"
8285                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8286 $as_echo "yes" >&6; }
8287                   break
8288
8289 else
8290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8291 $as_echo "no" >&6; }
8292 fi
8293 rm -f core conftest.err conftest.$ac_objext \
8294     conftest$ac_exeext conftest.$ac_ext
8295   done
8296   LIBS="$old_LIBS"
8297   CPPFLAGS="$old_CPPFLAGS"
8298 fi
8299
8300 if test "x$smart_lib" != "x"; then
8301   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
8302   LIBS="$smart_ldflags $smart_lib $old_LIBS"
8303   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
8304 fi
8305
8306     if test "x$ac_cv_lib_ssl_SSL_new" != "xyes"; then
8307       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8308 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8309 as_fn_error $? "failed linking to libssl. Use --with-openssl-lib-dir=<path>, or --with-openssl=no (builds without OpenSSL)
8310 See \`config.log' for more details" "$LINENO" 5; }
8311     else
8312
8313 $as_echo "#define HAVE_LIBSSL 1" >>confdefs.h
8314
8315       OPENSSL_LIBS="$OPENSSL_LIBS $smart_lib"
8316
8317       if test "$OPENSSL_LDFLAGS" != "$smart_ldflags"; then
8318         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8319 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8320 as_fn_error $? "\"inconsistent LDFLAGS between -lssl '$smart_ldflags' and -lcrypto '$OPENSSL_LDFLAGS'\"
8321 See \`config.log' for more details" "$LINENO" 5; }
8322       fi
8323     fi
8324   else
8325     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8326 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8327 as_fn_error $? "failed linking to libcrypto. Use --with-openssl-lib-dir=<path>, or --with-openssl=no (builds without OpenSSL)
8328 See \`config.log' for more details" "$LINENO" 5; }
8329   fi
8330
8331   smart_try_dir="$openssl_include_dir"
8332
8333
8334 ac_safe=`echo "openssl/ssl.h" | sed 'y%./+-%__pm%'`
8335 old_CPPFLAGS="$CPPFLAGS"
8336 smart_include=
8337 smart_include_dir="/usr/local/include /opt/include"
8338
8339 _smart_try_dir=
8340 _smart_include_dir=
8341
8342 for _prefix in $smart_prefix ""; do
8343   for _dir in $smart_try_dir; do
8344     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
8345   done
8346
8347   for _dir in $smart_include_dir; do
8348     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
8349   done
8350 done
8351
8352 if test "x$_smart_try_dir" != "x"; then
8353   for try in $_smart_try_dir; do
8354     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $try" >&5
8355 $as_echo_n "checking for openssl/ssl.h in $try... " >&6; }
8356     CPPFLAGS="-isystem $try $old_CPPFLAGS"
8357     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8358 /* end confdefs.h.  */
8359
8360                     #include <openssl/ssl.h>
8361 int
8362 main ()
8363 {
8364 int a = 1;
8365   ;
8366   return 0;
8367 }
8368 _ACEOF
8369 if ac_fn_c_try_compile "$LINENO"; then :
8370
8371                      smart_include="-isystem $try"
8372                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8373 $as_echo "yes" >&6; }
8374                      break
8375
8376 else
8377
8378                      smart_include=
8379                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8380 $as_echo "no" >&6; }
8381
8382 fi
8383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8384   done
8385   CPPFLAGS="$old_CPPFLAGS"
8386 fi
8387
8388 if test "x$smart_include" = "x"; then
8389   for _prefix in $smart_prefix; do
8390     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/openssl/ssl.h" >&5
8391 $as_echo_n "checking for ${_prefix}/openssl/ssl.h... " >&6; }
8392
8393     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8394 /* end confdefs.h.  */
8395
8396                     #include <openssl/ssl.h>
8397 int
8398 main ()
8399 {
8400 int a = 1;
8401   ;
8402   return 0;
8403 }
8404 _ACEOF
8405 if ac_fn_c_try_compile "$LINENO"; then :
8406
8407                      smart_include="-isystem ${_prefix}/"
8408                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8409 $as_echo "yes" >&6; }
8410                      break
8411
8412 else
8413
8414                      smart_include=
8415                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8416 $as_echo "no" >&6; }
8417
8418 fi
8419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8420   done
8421 fi
8422
8423 if test "x$smart_include" = "x"; then
8424     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h" >&5
8425 $as_echo_n "checking for openssl/ssl.h... " >&6; }
8426
8427     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8428 /* end confdefs.h.  */
8429
8430                     #include <openssl/ssl.h>
8431 int
8432 main ()
8433 {
8434 int a = 1;
8435   ;
8436   return 0;
8437 }
8438 _ACEOF
8439 if ac_fn_c_try_compile "$LINENO"; then :
8440
8441                      smart_include=" "
8442                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8443 $as_echo "yes" >&6; }
8444                      break
8445
8446 else
8447
8448                      smart_include=
8449                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8450 $as_echo "no" >&6; }
8451
8452 fi
8453 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8454 fi
8455
8456 if test "x$smart_include" = "x"; then
8457
8458   for prefix in $smart_prefix; do
8459
8460
8461 if test "x$LOCATE" != "x"; then
8462         DIRS=
8463   file="${_prefix}/${1}"
8464
8465   for x in `${LOCATE} $file 2>/dev/null`; do
8466                                         base=`echo $x | sed "s%/${file}%%"`
8467     if test "x$x" = "x$base"; then
8468       continue;
8469     fi
8470
8471     dir=`${DIRNAME} $x 2>/dev/null`
8472                 exclude=`echo ${dir} | ${GREP} /home`
8473     if test "x$exclude" != "x"; then
8474       continue
8475     fi
8476
8477                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
8478     if test "x$already" = "x"; then
8479       DIRS="$DIRS $dir"
8480     fi
8481   done
8482 fi
8483
8484 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
8485
8486   done
8487
8488
8489 if test "x$LOCATE" != "x"; then
8490         DIRS=
8491   file=openssl/ssl.h
8492
8493   for x in `${LOCATE} $file 2>/dev/null`; do
8494                                         base=`echo $x | sed "s%/${file}%%"`
8495     if test "x$x" = "x$base"; then
8496       continue;
8497     fi
8498
8499     dir=`${DIRNAME} $x 2>/dev/null`
8500                 exclude=`echo ${dir} | ${GREP} /home`
8501     if test "x$exclude" != "x"; then
8502       continue
8503     fi
8504
8505                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
8506     if test "x$already" = "x"; then
8507       DIRS="$DIRS $dir"
8508     fi
8509   done
8510 fi
8511
8512 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
8513
8514
8515   for try in $_smart_include_dir; do
8516     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $try" >&5
8517 $as_echo_n "checking for openssl/ssl.h in $try... " >&6; }
8518     CPPFLAGS="-isystem $try $old_CPPFLAGS"
8519     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8520 /* end confdefs.h.  */
8521
8522                     #include <openssl/ssl.h>
8523 int
8524 main ()
8525 {
8526 int a = 1;
8527   ;
8528   return 0;
8529 }
8530 _ACEOF
8531 if ac_fn_c_try_compile "$LINENO"; then :
8532
8533                      smart_include="-isystem $try"
8534                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8535 $as_echo "yes" >&6; }
8536                      break
8537
8538 else
8539
8540                      smart_include=
8541                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8542 $as_echo "no" >&6; }
8543
8544 fi
8545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8546   done
8547   CPPFLAGS="$old_CPPFLAGS"
8548 fi
8549
8550 if test "x$smart_include" != "x"; then
8551   eval "ac_cv_header_$ac_safe=yes"
8552   CPPFLAGS="$smart_include $old_CPPFLAGS"
8553   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
8554 fi
8555
8556 smart_prefix=
8557
8558   if test "x$ac_cv_header_openssl_ssl_h" = "xyes"; then
8559
8560 $as_echo "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
8561
8562
8563     for ac_header in \
8564       openssl/crypto.h \
8565       openssl/err.h \
8566       openssl/evp.h \
8567       openssl/md5.h \
8568       openssl/md4.h \
8569       openssl/sha.h \
8570       openssl/ocsp.h \
8571       openssl/engine.h
8572 do :
8573   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8574 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8575 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8576   cat >>confdefs.h <<_ACEOF
8577 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8578 _ACEOF
8579   OPENSSL_CPPFLAGS="$smart_include"
8580 else
8581
8582         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8583 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8584 as_fn_error $? "failed locating OpenSSL headers. Use --with-openssl-include-dir=<path>, or --with-openssl=no (builds without OpenSSL)
8585 See \`config.log' for more details" "$LINENO" 5; }
8586
8587
8588 fi
8589
8590 done
8591
8592
8593     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL version >= 0.9.7" >&5
8594 $as_echo_n "checking for OpenSSL version >= 0.9.7... " >&6; }
8595     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8596 /* end confdefs.h.  */
8597 #include <openssl/crypto.h>
8598        #if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
8599        yes
8600        #endif
8601
8602 _ACEOF
8603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8604   $EGREP "yes" >/dev/null 2>&1; then :
8605
8606         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8607 $as_echo "yes" >&6; }
8608
8609 else
8610
8611         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8612 $as_echo "no" >&6; }
8613         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8614 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8615 as_fn_error $? "OpenSSL version too old
8616 See \`config.log' for more details" "$LINENO" 5; }
8617
8618
8619 fi
8620 rm -f conftest*
8621
8622
8623                         old_CPPFLAGS="$CPPFLAGS"
8624     CPPFLAGS="$OPENSSL_CPPFLAGS $CPPFLAGS"
8625
8626                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library and header version consistency" >&5
8627 $as_echo_n "checking OpenSSL library and header version consistency... " >&6; }
8628     if test "$cross_compiling" = yes; then :
8629   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8630 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8631 as_fn_error $? "cannot run test program while cross compiling
8632 See \`config.log' for more details" "$LINENO" 5; }
8633 else
8634   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8635 /* end confdefs.h.  */
8636
8637           #include <stdio.h>
8638           #include <openssl/opensslv.h>
8639           #include <openssl/crypto.h>
8640
8641 int
8642 main ()
8643 {
8644
8645           printf("library: %lx header: %lx... ", (unsigned long) SSLeay(), (unsigned long) OPENSSL_VERSION_NUMBER);
8646           if (SSLeay() == OPENSSL_VERSION_NUMBER) {
8647             return 0;
8648           } else {
8649             return 1;
8650           }
8651
8652
8653   ;
8654   return 0;
8655 }
8656 _ACEOF
8657 if ac_fn_c_try_run "$LINENO"; then :
8658
8659         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8660 $as_echo "yes" >&6; }
8661
8662 else
8663
8664         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8665 $as_echo "no" >&6; }
8666         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8667 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8668 as_fn_error $? "OpenSSL library version does not match header version
8669 See \`config.log' for more details" "$LINENO" 5; }
8670
8671
8672 fi
8673 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8674   conftest.$ac_objext conftest.beam conftest.$ac_ext
8675 fi
8676
8677     CPPFLAGS="$old_CPPFLAGS"
8678   fi
8679
8680   LIBS="$OLD_LIBS"
8681
8682
8683
8684   export OPENSSL_LIBS OPENSSL_LDFLAGS OPENSSL_CPPFLAGS
8685 fi
8686
8687 if test "x$PCAP_LIBS" = x; then
8688   { $as_echo "$as_me:${as_lineno-$LINENO}: skipping test for pcap.h." >&5
8689 $as_echo "$as_me: skipping test for pcap.h." >&6;}
8690 else
8691         smart_try_dir="$pcap_include_dir"
8692
8693
8694 ac_safe=`echo "pcap.h" | sed 'y%./+-%__pm%'`
8695 old_CPPFLAGS="$CPPFLAGS"
8696 smart_include=
8697 smart_include_dir="/usr/local/include /opt/include"
8698
8699 _smart_try_dir=
8700 _smart_include_dir=
8701
8702 for _prefix in $smart_prefix ""; do
8703   for _dir in $smart_try_dir; do
8704     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
8705   done
8706
8707   for _dir in $smart_include_dir; do
8708     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
8709   done
8710 done
8711
8712 if test "x$_smart_try_dir" != "x"; then
8713   for try in $_smart_try_dir; do
8714     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h in $try" >&5
8715 $as_echo_n "checking for pcap.h in $try... " >&6; }
8716     CPPFLAGS="-isystem $try $old_CPPFLAGS"
8717     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8718 /* end confdefs.h.  */
8719
8720                     #include <pcap.h>
8721 int
8722 main ()
8723 {
8724 int a = 1;
8725   ;
8726   return 0;
8727 }
8728 _ACEOF
8729 if ac_fn_c_try_compile "$LINENO"; then :
8730
8731                      smart_include="-isystem $try"
8732                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8733 $as_echo "yes" >&6; }
8734                      break
8735
8736 else
8737
8738                      smart_include=
8739                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8740 $as_echo "no" >&6; }
8741
8742 fi
8743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8744   done
8745   CPPFLAGS="$old_CPPFLAGS"
8746 fi
8747
8748 if test "x$smart_include" = "x"; then
8749   for _prefix in $smart_prefix; do
8750     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/pcap.h" >&5
8751 $as_echo_n "checking for ${_prefix}/pcap.h... " >&6; }
8752
8753     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8754 /* end confdefs.h.  */
8755
8756                     #include <pcap.h>
8757 int
8758 main ()
8759 {
8760 int a = 1;
8761   ;
8762   return 0;
8763 }
8764 _ACEOF
8765 if ac_fn_c_try_compile "$LINENO"; then :
8766
8767                      smart_include="-isystem ${_prefix}/"
8768                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8769 $as_echo "yes" >&6; }
8770                      break
8771
8772 else
8773
8774                      smart_include=
8775                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8776 $as_echo "no" >&6; }
8777
8778 fi
8779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8780   done
8781 fi
8782
8783 if test "x$smart_include" = "x"; then
8784     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h" >&5
8785 $as_echo_n "checking for pcap.h... " >&6; }
8786
8787     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8788 /* end confdefs.h.  */
8789
8790                     #include <pcap.h>
8791 int
8792 main ()
8793 {
8794 int a = 1;
8795   ;
8796   return 0;
8797 }
8798 _ACEOF
8799 if ac_fn_c_try_compile "$LINENO"; then :
8800
8801                      smart_include=" "
8802                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8803 $as_echo "yes" >&6; }
8804                      break
8805
8806 else
8807
8808                      smart_include=
8809                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8810 $as_echo "no" >&6; }
8811
8812 fi
8813 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8814 fi
8815
8816 if test "x$smart_include" = "x"; then
8817
8818   for prefix in $smart_prefix; do
8819
8820
8821 if test "x$LOCATE" != "x"; then
8822         DIRS=
8823   file="${_prefix}/${1}"
8824
8825   for x in `${LOCATE} $file 2>/dev/null`; do
8826                                         base=`echo $x | sed "s%/${file}%%"`
8827     if test "x$x" = "x$base"; then
8828       continue;
8829     fi
8830
8831     dir=`${DIRNAME} $x 2>/dev/null`
8832                 exclude=`echo ${dir} | ${GREP} /home`
8833     if test "x$exclude" != "x"; then
8834       continue
8835     fi
8836
8837                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
8838     if test "x$already" = "x"; then
8839       DIRS="$DIRS $dir"
8840     fi
8841   done
8842 fi
8843
8844 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
8845
8846   done
8847
8848
8849 if test "x$LOCATE" != "x"; then
8850         DIRS=
8851   file=pcap.h
8852
8853   for x in `${LOCATE} $file 2>/dev/null`; do
8854                                         base=`echo $x | sed "s%/${file}%%"`
8855     if test "x$x" = "x$base"; then
8856       continue;
8857     fi
8858
8859     dir=`${DIRNAME} $x 2>/dev/null`
8860                 exclude=`echo ${dir} | ${GREP} /home`
8861     if test "x$exclude" != "x"; then
8862       continue
8863     fi
8864
8865                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
8866     if test "x$already" = "x"; then
8867       DIRS="$DIRS $dir"
8868     fi
8869   done
8870 fi
8871
8872 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
8873
8874
8875   for try in $_smart_include_dir; do
8876     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h in $try" >&5
8877 $as_echo_n "checking for pcap.h in $try... " >&6; }
8878     CPPFLAGS="-isystem $try $old_CPPFLAGS"
8879     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8880 /* end confdefs.h.  */
8881
8882                     #include <pcap.h>
8883 int
8884 main ()
8885 {
8886 int a = 1;
8887   ;
8888   return 0;
8889 }
8890 _ACEOF
8891 if ac_fn_c_try_compile "$LINENO"; then :
8892
8893                      smart_include="-isystem $try"
8894                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8895 $as_echo "yes" >&6; }
8896                      break
8897
8898 else
8899
8900                      smart_include=
8901                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8902 $as_echo "no" >&6; }
8903
8904 fi
8905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8906   done
8907   CPPFLAGS="$old_CPPFLAGS"
8908 fi
8909
8910 if test "x$smart_include" != "x"; then
8911   eval "ac_cv_header_$ac_safe=yes"
8912   CPPFLAGS="$smart_include $old_CPPFLAGS"
8913   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
8914 fi
8915
8916 smart_prefix=
8917
8918   if test "x$ac_cv_header_pcap_h" == "xyes"; then
8919
8920 $as_echo "#define HAVE_PCAP_H 1" >>confdefs.h
8921
8922
8923
8924   else
8925     { $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
8926 $as_echo "$as_me: WARNING: pcap headers not found, silently disabling the RADIUS sniffer, and ARP listener. Use --with-pcap-include-dir=<path>." >&2;}
8927   fi
8928 fi
8929
8930 if test "x$COLLECTDC_LIBS" = x; then
8931   { $as_echo "$as_me:${as_lineno-$LINENO}: skipping test for collectd/client.h." >&5
8932 $as_echo "$as_me: skipping test for collectd/client.h." >&6;}
8933 else
8934         smart_try_dir="$collectdclient_include_dir"
8935
8936
8937 ac_safe=`echo "collectd/client.h" | sed 'y%./+-%__pm%'`
8938 old_CPPFLAGS="$CPPFLAGS"
8939 smart_include=
8940 smart_include_dir="/usr/local/include /opt/include"
8941
8942 _smart_try_dir=
8943 _smart_include_dir=
8944
8945 for _prefix in $smart_prefix ""; do
8946   for _dir in $smart_try_dir; do
8947     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
8948   done
8949
8950   for _dir in $smart_include_dir; do
8951     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
8952   done
8953 done
8954
8955 if test "x$_smart_try_dir" != "x"; then
8956   for try in $_smart_try_dir; do
8957     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h in $try" >&5
8958 $as_echo_n "checking for collectd/client.h in $try... " >&6; }
8959     CPPFLAGS="-isystem $try $old_CPPFLAGS"
8960     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8961 /* end confdefs.h.  */
8962
8963                     #include <collectd/client.h>
8964 int
8965 main ()
8966 {
8967 int a = 1;
8968   ;
8969   return 0;
8970 }
8971 _ACEOF
8972 if ac_fn_c_try_compile "$LINENO"; then :
8973
8974                      smart_include="-isystem $try"
8975                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8976 $as_echo "yes" >&6; }
8977                      break
8978
8979 else
8980
8981                      smart_include=
8982                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8983 $as_echo "no" >&6; }
8984
8985 fi
8986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8987   done
8988   CPPFLAGS="$old_CPPFLAGS"
8989 fi
8990
8991 if test "x$smart_include" = "x"; then
8992   for _prefix in $smart_prefix; do
8993     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/collectd/client.h" >&5
8994 $as_echo_n "checking for ${_prefix}/collectd/client.h... " >&6; }
8995
8996     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8997 /* end confdefs.h.  */
8998
8999                     #include <collectd/client.h>
9000 int
9001 main ()
9002 {
9003 int a = 1;
9004   ;
9005   return 0;
9006 }
9007 _ACEOF
9008 if ac_fn_c_try_compile "$LINENO"; then :
9009
9010                      smart_include="-isystem ${_prefix}/"
9011                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9012 $as_echo "yes" >&6; }
9013                      break
9014
9015 else
9016
9017                      smart_include=
9018                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9019 $as_echo "no" >&6; }
9020
9021 fi
9022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9023   done
9024 fi
9025
9026 if test "x$smart_include" = "x"; then
9027     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h" >&5
9028 $as_echo_n "checking for collectd/client.h... " >&6; }
9029
9030     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9031 /* end confdefs.h.  */
9032
9033                     #include <collectd/client.h>
9034 int
9035 main ()
9036 {
9037 int a = 1;
9038   ;
9039   return 0;
9040 }
9041 _ACEOF
9042 if ac_fn_c_try_compile "$LINENO"; then :
9043
9044                      smart_include=" "
9045                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9046 $as_echo "yes" >&6; }
9047                      break
9048
9049 else
9050
9051                      smart_include=
9052                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9053 $as_echo "no" >&6; }
9054
9055 fi
9056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9057 fi
9058
9059 if test "x$smart_include" = "x"; then
9060
9061   for prefix in $smart_prefix; do
9062
9063
9064 if test "x$LOCATE" != "x"; then
9065         DIRS=
9066   file="${_prefix}/${1}"
9067
9068   for x in `${LOCATE} $file 2>/dev/null`; do
9069                                         base=`echo $x | sed "s%/${file}%%"`
9070     if test "x$x" = "x$base"; then
9071       continue;
9072     fi
9073
9074     dir=`${DIRNAME} $x 2>/dev/null`
9075                 exclude=`echo ${dir} | ${GREP} /home`
9076     if test "x$exclude" != "x"; then
9077       continue
9078     fi
9079
9080                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
9081     if test "x$already" = "x"; then
9082       DIRS="$DIRS $dir"
9083     fi
9084   done
9085 fi
9086
9087 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
9088
9089   done
9090
9091
9092 if test "x$LOCATE" != "x"; then
9093         DIRS=
9094   file=collectd/client.h
9095
9096   for x in `${LOCATE} $file 2>/dev/null`; do
9097                                         base=`echo $x | sed "s%/${file}%%"`
9098     if test "x$x" = "x$base"; then
9099       continue;
9100     fi
9101
9102     dir=`${DIRNAME} $x 2>/dev/null`
9103                 exclude=`echo ${dir} | ${GREP} /home`
9104     if test "x$exclude" != "x"; then
9105       continue
9106     fi
9107
9108                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
9109     if test "x$already" = "x"; then
9110       DIRS="$DIRS $dir"
9111     fi
9112   done
9113 fi
9114
9115 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
9116
9117
9118   for try in $_smart_include_dir; do
9119     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h in $try" >&5
9120 $as_echo_n "checking for collectd/client.h in $try... " >&6; }
9121     CPPFLAGS="-isystem $try $old_CPPFLAGS"
9122     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9123 /* end confdefs.h.  */
9124
9125                     #include <collectd/client.h>
9126 int
9127 main ()
9128 {
9129 int a = 1;
9130   ;
9131   return 0;
9132 }
9133 _ACEOF
9134 if ac_fn_c_try_compile "$LINENO"; then :
9135
9136                      smart_include="-isystem $try"
9137                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9138 $as_echo "yes" >&6; }
9139                      break
9140
9141 else
9142
9143                      smart_include=
9144                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9145 $as_echo "no" >&6; }
9146
9147 fi
9148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9149   done
9150   CPPFLAGS="$old_CPPFLAGS"
9151 fi
9152
9153 if test "x$smart_include" != "x"; then
9154   eval "ac_cv_header_$ac_safe=yes"
9155   CPPFLAGS="$smart_include $old_CPPFLAGS"
9156   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
9157 fi
9158
9159 smart_prefix=
9160
9161   if test "x$ac_cv_header_collectd_client_h" == "xyes"; then
9162
9163 $as_echo "#define HAVE_COLLECTDC_H 1" >>confdefs.h
9164
9165
9166
9167   else
9168     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: collectdclient headers not found. Use --with-collectdclient-include-dir=<path>." >&5
9169 $as_echo "$as_me: WARNING: collectdclient headers not found. Use --with-collectdclient-include-dir=<path>." >&2;}
9170   fi
9171 fi
9172
9173 if test "x$HAVE_LIBCAP" = x; then
9174   { $as_echo "$as_me:${as_lineno-$LINENO}: skipping test for cap.h." >&5
9175 $as_echo "$as_me: skipping test for cap.h." >&6;}
9176 else
9177         smart_try_dir="$cap_include_dir"
9178
9179
9180 ac_safe=`echo "sys/capability.h" | sed 'y%./+-%__pm%'`
9181 old_CPPFLAGS="$CPPFLAGS"
9182 smart_include=
9183 smart_include_dir="/usr/local/include /opt/include"
9184
9185 _smart_try_dir=
9186 _smart_include_dir=
9187
9188 for _prefix in $smart_prefix ""; do
9189   for _dir in $smart_try_dir; do
9190     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
9191   done
9192
9193   for _dir in $smart_include_dir; do
9194     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
9195   done
9196 done
9197
9198 if test "x$_smart_try_dir" != "x"; then
9199   for try in $_smart_try_dir; do
9200     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h in $try" >&5
9201 $as_echo_n "checking for sys/capability.h in $try... " >&6; }
9202     CPPFLAGS="-isystem $try $old_CPPFLAGS"
9203     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9204 /* end confdefs.h.  */
9205
9206                     #include <sys/capability.h>
9207 int
9208 main ()
9209 {
9210 int a = 1;
9211   ;
9212   return 0;
9213 }
9214 _ACEOF
9215 if ac_fn_c_try_compile "$LINENO"; then :
9216
9217                      smart_include="-isystem $try"
9218                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9219 $as_echo "yes" >&6; }
9220                      break
9221
9222 else
9223
9224                      smart_include=
9225                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9226 $as_echo "no" >&6; }
9227
9228 fi
9229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9230   done
9231   CPPFLAGS="$old_CPPFLAGS"
9232 fi
9233
9234 if test "x$smart_include" = "x"; then
9235   for _prefix in $smart_prefix; do
9236     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/sys/capability.h" >&5
9237 $as_echo_n "checking for ${_prefix}/sys/capability.h... " >&6; }
9238
9239     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9240 /* end confdefs.h.  */
9241
9242                     #include <sys/capability.h>
9243 int
9244 main ()
9245 {
9246 int a = 1;
9247   ;
9248   return 0;
9249 }
9250 _ACEOF
9251 if ac_fn_c_try_compile "$LINENO"; then :
9252
9253                      smart_include="-isystem ${_prefix}/"
9254                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9255 $as_echo "yes" >&6; }
9256                      break
9257
9258 else
9259
9260                      smart_include=
9261                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9262 $as_echo "no" >&6; }
9263
9264 fi
9265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9266   done
9267 fi
9268
9269 if test "x$smart_include" = "x"; then
9270     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h" >&5
9271 $as_echo_n "checking for sys/capability.h... " >&6; }
9272
9273     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9274 /* end confdefs.h.  */
9275
9276                     #include <sys/capability.h>
9277 int
9278 main ()
9279 {
9280 int a = 1;
9281   ;
9282   return 0;
9283 }
9284 _ACEOF
9285 if ac_fn_c_try_compile "$LINENO"; then :
9286
9287                      smart_include=" "
9288                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9289 $as_echo "yes" >&6; }
9290                      break
9291
9292 else
9293
9294                      smart_include=
9295                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9296 $as_echo "no" >&6; }
9297
9298 fi
9299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9300 fi
9301
9302 if test "x$smart_include" = "x"; then
9303
9304   for prefix in $smart_prefix; do
9305
9306
9307 if test "x$LOCATE" != "x"; then
9308         DIRS=
9309   file="${_prefix}/${1}"
9310
9311   for x in `${LOCATE} $file 2>/dev/null`; do
9312                                         base=`echo $x | sed "s%/${file}%%"`
9313     if test "x$x" = "x$base"; then
9314       continue;
9315     fi
9316
9317     dir=`${DIRNAME} $x 2>/dev/null`
9318                 exclude=`echo ${dir} | ${GREP} /home`
9319     if test "x$exclude" != "x"; then
9320       continue
9321     fi
9322
9323                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
9324     if test "x$already" = "x"; then
9325       DIRS="$DIRS $dir"
9326     fi
9327   done
9328 fi
9329
9330 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
9331
9332   done
9333
9334
9335 if test "x$LOCATE" != "x"; then
9336         DIRS=
9337   file=sys/capability.h
9338
9339   for x in `${LOCATE} $file 2>/dev/null`; do
9340                                         base=`echo $x | sed "s%/${file}%%"`
9341     if test "x$x" = "x$base"; then
9342       continue;
9343     fi
9344
9345     dir=`${DIRNAME} $x 2>/dev/null`
9346                 exclude=`echo ${dir} | ${GREP} /home`
9347     if test "x$exclude" != "x"; then
9348       continue
9349     fi
9350
9351                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
9352     if test "x$already" = "x"; then
9353       DIRS="$DIRS $dir"
9354     fi
9355   done
9356 fi
9357
9358 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
9359
9360
9361   for try in $_smart_include_dir; do
9362     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h in $try" >&5
9363 $as_echo_n "checking for sys/capability.h in $try... " >&6; }
9364     CPPFLAGS="-isystem $try $old_CPPFLAGS"
9365     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9366 /* end confdefs.h.  */
9367
9368                     #include <sys/capability.h>
9369 int
9370 main ()
9371 {
9372 int a = 1;
9373   ;
9374   return 0;
9375 }
9376 _ACEOF
9377 if ac_fn_c_try_compile "$LINENO"; then :
9378
9379                      smart_include="-isystem $try"
9380                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9381 $as_echo "yes" >&6; }
9382                      break
9383
9384 else
9385
9386                      smart_include=
9387                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9388 $as_echo "no" >&6; }
9389
9390 fi
9391 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9392   done
9393   CPPFLAGS="$old_CPPFLAGS"
9394 fi
9395
9396 if test "x$smart_include" != "x"; then
9397   eval "ac_cv_header_$ac_safe=yes"
9398   CPPFLAGS="$smart_include $old_CPPFLAGS"
9399   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
9400 fi
9401
9402 smart_prefix=
9403
9404   if test "x$ac_cv_header_sys_capability_h" == "xyes"; then
9405
9406 $as_echo "#define HAVE_CAPABILITY_H 1" >>confdefs.h
9407
9408   else
9409     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cap headers not found, will not perform debugger checks. Use --with-cap-include-dir=<path>." >&5
9410 $as_echo "$as_me: WARNING: cap headers not found, will not perform debugger checks. Use --with-cap-include-dir=<path>." >&2;}
9411   fi
9412 fi
9413
9414
9415 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
9416 if test "x$ac_cv_type_off_t" = xyes; then :
9417
9418 else
9419
9420 cat >>confdefs.h <<_ACEOF
9421 #define off_t long int
9422 _ACEOF
9423
9424 fi
9425
9426 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9427 if test "x$ac_cv_type_pid_t" = xyes; then :
9428
9429 else
9430
9431 cat >>confdefs.h <<_ACEOF
9432 #define pid_t int
9433 _ACEOF
9434
9435 fi
9436
9437 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
9438 if test "x$ac_cv_type_size_t" = xyes; then :
9439
9440 else
9441
9442 cat >>confdefs.h <<_ACEOF
9443 #define size_t unsigned int
9444 _ACEOF
9445
9446 fi
9447
9448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
9449 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
9450 if ${ac_cv_type_uid_t+:} false; then :
9451   $as_echo_n "(cached) " >&6
9452 else
9453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9454 /* end confdefs.h.  */
9455 #include <sys/types.h>
9456
9457 _ACEOF
9458 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9459   $EGREP "uid_t" >/dev/null 2>&1; then :
9460   ac_cv_type_uid_t=yes
9461 else
9462   ac_cv_type_uid_t=no
9463 fi
9464 rm -f conftest*
9465
9466 fi
9467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
9468 $as_echo "$ac_cv_type_uid_t" >&6; }
9469 if test $ac_cv_type_uid_t = no; then
9470
9471 $as_echo "#define uid_t int" >>confdefs.h
9472
9473
9474 $as_echo "#define gid_t int" >>confdefs.h
9475
9476 fi
9477
9478
9479
9480   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
9481 $as_echo_n "checking for socklen_t... " >&6; }
9482 if ${ac_cv_type_socklen_t+:} false; then :
9483   $as_echo_n "(cached) " >&6
9484 else
9485    ac_cv_type_socklen_t=no
9486       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9487 /* end confdefs.h.  */
9488 #ifdef HAVE_SYS_TYPES_H
9489     #  include <sys/types.h>
9490     #endif
9491
9492     #ifdef HAVE_SYS_SOCKET_H
9493     #  include <sys/socket.h>
9494     #endif
9495
9496 int
9497 main ()
9498 {
9499 socklen_t foo
9500   ;
9501   return 0;
9502 }
9503 _ACEOF
9504 if ac_fn_c_try_compile "$LINENO"; then :
9505   ac_cv_type_socklen_t=yes
9506 fi
9507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9508
9509
9510 fi
9511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_socklen_t" >&5
9512 $as_echo "$ac_cv_type_socklen_t" >&6; }
9513
9514   if test "$ac_cv_type_socklen_t" != "yes"; then
9515
9516 $as_echo "#define socklen_t int" >>confdefs.h
9517
9518   fi
9519
9520
9521
9522   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint8_t" >&5
9523 $as_echo_n "checking for uint8_t... " >&6; }
9524 if ${ac_cv_type_uint8_t+:} false; then :
9525   $as_echo_n "(cached) " >&6
9526 else
9527    ac_cv_type_uint8_t=no
9528       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9529 /* end confdefs.h.  */
9530 #ifdef HAVE_INTTYPES_H
9531     #  include <inttypes.h>
9532     #endif
9533
9534     #ifdef HAVE_STDINT_H
9535     #  include <stdint.h>
9536     #endif
9537
9538 int
9539 main ()
9540 {
9541 uint8_t foo
9542   ;
9543   return 0;
9544 }
9545 _ACEOF
9546 if ac_fn_c_try_compile "$LINENO"; then :
9547   ac_cv_type_uint8_t=yes
9548 fi
9549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9550
9551
9552 fi
9553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint8_t" >&5
9554 $as_echo "$ac_cv_type_uint8_t" >&6; }
9555
9556   if test "$ac_cv_type_uint8_t" != "yes"; then
9557
9558 $as_echo "#define uint8_t unsigned char" >>confdefs.h
9559
9560   fi
9561
9562
9563
9564   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint16_t" >&5
9565 $as_echo_n "checking for uint16_t... " >&6; }
9566 if ${ac_cv_type_uint16_t+:} false; then :
9567   $as_echo_n "(cached) " >&6
9568 else
9569    ac_cv_type_uint16_t=no
9570       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9571 /* end confdefs.h.  */
9572 #ifdef HAVE_INTTYPES_H
9573     #  include <inttypes.h>
9574     #endif
9575
9576     #ifdef HAVE_STDINT_H
9577     #  include <stdint.h>
9578     #endif
9579
9580 int
9581 main ()
9582 {
9583 uint16_t foo
9584   ;
9585   return 0;
9586 }
9587 _ACEOF
9588 if ac_fn_c_try_compile "$LINENO"; then :
9589   ac_cv_type_uint16_t=yes
9590 fi
9591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9592
9593
9594 fi
9595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint16_t" >&5
9596 $as_echo "$ac_cv_type_uint16_t" >&6; }
9597
9598   if test "$ac_cv_type_uint16_t" != "yes"; then
9599
9600 $as_echo "#define uint16_t unsigned short" >>confdefs.h
9601
9602   fi
9603
9604
9605
9606   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint32_t" >&5
9607 $as_echo_n "checking for uint32_t... " >&6; }
9608 if ${ac_cv_type_uint32_t+:} false; then :
9609   $as_echo_n "(cached) " >&6
9610 else
9611    ac_cv_type_uint32_t=no
9612       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9613 /* end confdefs.h.  */
9614 #ifdef HAVE_INTTYPES_H
9615     #  include <inttypes.h>
9616     #endif
9617
9618     #ifdef HAVE_STDINT_H
9619     #  include <stdint.h>
9620     #endif
9621
9622 int
9623 main ()
9624 {
9625 uint32_t foo
9626   ;
9627   return 0;
9628 }
9629 _ACEOF
9630 if ac_fn_c_try_compile "$LINENO"; then :
9631   ac_cv_type_uint32_t=yes
9632 fi
9633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9634
9635
9636 fi
9637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint32_t" >&5
9638 $as_echo "$ac_cv_type_uint32_t" >&6; }
9639
9640   if test "$ac_cv_type_uint32_t" != "yes"; then
9641
9642 $as_echo "#define uint32_t unsigned int" >>confdefs.h
9643
9644   fi
9645
9646
9647
9648   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint64_t" >&5
9649 $as_echo_n "checking for uint64_t... " >&6; }
9650 if ${ac_cv_type_uint64_t+:} false; then :
9651   $as_echo_n "(cached) " >&6
9652 else
9653    ac_cv_type_uint64_t=no
9654       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9655 /* end confdefs.h.  */
9656 #ifdef HAVE_INTTYPES_H
9657     #  include <inttypes.h>
9658     #endif
9659
9660     #ifdef HAVE_STDINT_H
9661     #  include <stdint.h>
9662     #endif
9663
9664 int
9665 main ()
9666 {
9667 uint64_t foo
9668   ;
9669   return 0;
9670 }
9671 _ACEOF
9672 if ac_fn_c_try_compile "$LINENO"; then :
9673   ac_cv_type_uint64_t=yes
9674 fi
9675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9676
9677
9678 fi
9679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint64_t" >&5
9680 $as_echo "$ac_cv_type_uint64_t" >&6; }
9681
9682   if test "$ac_cv_type_uint64_t" != "yes"; then
9683
9684 $as_echo "#define uint64_t unsigned long long" >>confdefs.h
9685
9686   fi
9687
9688
9689 ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
9690 if test "x$ac_cv_type___uint128_t" = xyes; then :
9691
9692 $as_echo "#define HAVE___UINT128_T 1" >>confdefs.h
9693
9694 fi
9695
9696
9697 ac_fn_c_check_type "$LINENO" "uint128_t" "ac_cv_type_uint128_t" "
9698     #ifdef HAVE_INTTYPES_H
9699     #  include <inttypes.h>
9700     #endif
9701
9702     #ifdef HAVE_STDINT_H
9703     #  include <stdint.h>
9704     #endif
9705
9706
9707 "
9708 if test "x$ac_cv_type_uint128_t" = xyes; then :
9709
9710 $as_echo "#define HAVE_UINT128_T 1" >>confdefs.h
9711
9712 fi
9713
9714
9715 ac_fn_c_check_type "$LINENO" "struct in6_addr" "ac_cv_type_struct_in6_addr" "
9716     #ifdef HAVE_NETINET_IN_H
9717     #  include <netinet/in.h>
9718     #endif
9719
9720
9721 "
9722 if test "x$ac_cv_type_struct_in6_addr" = xyes; then :
9723
9724 $as_echo "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h
9725
9726 fi
9727
9728
9729 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
9730     #ifdef HAVE_NETINET_IN_H
9731     #  include <netinet/in.h>
9732     #endif
9733
9734     #ifdef HAVE_SYS_SOCKET_H
9735     #  include <sys/socket.h>
9736     #endif
9737
9738 "
9739 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
9740
9741 $as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
9742
9743 fi
9744
9745
9746 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "
9747     #ifdef HAVE_NETINET_IN_H
9748     #  include <netinet/in.h>
9749     #endif
9750
9751 "
9752 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
9753
9754 $as_echo "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h
9755
9756 fi
9757
9758
9759 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "
9760     #ifdef HAVE_SYS_TYPES_H
9761     #  include <sys/types.h>
9762     #endif
9763
9764     #ifdef HAVE_SYS_SOCKET_H
9765     #  include <sys/socket.h>
9766     #endif
9767
9768     #ifdef HAVE_NETDB_H
9769     #  include <netdb.h>
9770     #endif
9771
9772
9773 "
9774 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
9775
9776 $as_echo "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h
9777
9778 fi
9779
9780
9781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sig_t is defined" >&5
9782 $as_echo_n "checking if sig_t is defined... " >&6; }
9783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9784 /* end confdefs.h.  */
9785
9786       #ifdef HAVE_SIGNAL_H
9787       #  include <signal.h>
9788       #endif
9789
9790 int
9791 main ()
9792 {
9793
9794       sig_t func;
9795       return 0;
9796
9797
9798   ;
9799   return 0;
9800 }
9801 _ACEOF
9802 if ac_fn_c_try_link "$LINENO"; then :
9803
9804       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9805 $as_echo "yes" >&6; }
9806
9807 $as_echo "#define HAVE_SIG_T 1" >>confdefs.h
9808
9809
9810 else
9811
9812       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9813 $as_echo "no" >&6; }
9814
9815
9816 fi
9817 rm -f core conftest.err conftest.$ac_objext \
9818     conftest$ac_exeext conftest.$ac_ext
9819
9820 for ac_func in \
9821   getopt_long \
9822   fcntl \
9823   strsignal \
9824   sigaction \
9825   sigprocmask \
9826   pthread_sigmask \
9827   snprintf \
9828   vsnprintf \
9829   setsid \
9830   strncasecmp \
9831   strcasecmp \
9832   localtime_r \
9833   ctime_r \
9834   gmtime_r \
9835   strsep \
9836   inet_aton \
9837   inet_pton \
9838   inet_ntop \
9839   mallopt \
9840   setlinebuf \
9841   setvbuf \
9842   getusershell \
9843   initgroups \
9844   getaddrinfo \
9845   getnameinfo \
9846   closefrom \
9847   gettimeofday \
9848   getpeereid \
9849   setuid \
9850   setresuid \
9851   getresuid \
9852   strlcat \
9853   strlcpy \
9854   kqueue
9855
9856 do :
9857   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9858 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9859 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9860   cat >>confdefs.h <<_ACEOF
9861 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9862 _ACEOF
9863
9864 fi
9865 done
9866
9867
9868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9869 $as_echo_n "checking return type of signal handlers... " >&6; }
9870 if ${ac_cv_type_signal+:} false; then :
9871   $as_echo_n "(cached) " >&6
9872 else
9873   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9874 /* end confdefs.h.  */
9875 #include <sys/types.h>
9876 #include <signal.h>
9877
9878 int
9879 main ()
9880 {
9881 return *(signal (0, 0)) (0) == 1;
9882   ;
9883   return 0;
9884 }
9885 _ACEOF
9886 if ac_fn_c_try_compile "$LINENO"; then :
9887   ac_cv_type_signal=int
9888 else
9889   ac_cv_type_signal=void
9890 fi
9891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9892 fi
9893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9894 $as_echo "$ac_cv_type_signal" >&6; }
9895
9896 cat >>confdefs.h <<_ACEOF
9897 #define RETSIGTYPE $ac_cv_type_signal
9898 _ACEOF
9899
9900
9901
9902 if test "x$ac_cv_header_utmpx_h" = "xyes"; then
9903
9904   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_xtime in struct utmpx" >&5
9905 $as_echo_n "checking for ut_xtime in struct utmpx... " >&6; }
9906
9907
9908   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9909 /* end confdefs.h.  */
9910
9911 #include <utmpx.h>
9912 #ifdef HAVE_STDDEF_H
9913 #include <stddef.h>
9914 #endif
9915 #ifndef offsetof
9916 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
9917 #endif
9918
9919 int
9920 main ()
9921 {
9922  int foo = offsetof(struct utmpx, ut_xtime)
9923   ;
9924   return 0;
9925 }
9926 _ACEOF
9927 if ac_fn_c_try_compile "$LINENO"; then :
9928   has_element=" "
9929 else
9930   has_element=
9931 fi
9932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9933
9934   ac_safe_type=`echo "struct utmpx" | sed 'y% %_%'`
9935   if test "x$has_element" != "x"; then
9936     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9937 $as_echo "yes" >&6; }
9938     eval "ac_cv_type_${ac_safe_type}_has_ut_xtime=yes"
9939   else
9940     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9941 $as_echo "no" >&6; }
9942     eval "ac_cv_type_${ac_safe_type}_has_ut_xtime="
9943  fi
9944
9945  if test "x$ac_cv_type_struct_utmpx_has_ut_xtime" = "x"; then
9946
9947 $as_echo "#define ut_xtime ut_tv.tv_sec" >>confdefs.h
9948
9949  fi
9950 fi
9951
9952
9953   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipi_addr in struct in_pktinfo" >&5
9954 $as_echo_n "checking for ipi_addr in struct in_pktinfo... " >&6; }
9955
9956
9957   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9958 /* end confdefs.h.  */
9959
9960 #include <netinet/in.h>
9961 #ifdef HAVE_STDDEF_H
9962 #include <stddef.h>
9963 #endif
9964 #ifndef offsetof
9965 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
9966 #endif
9967
9968 int
9969 main ()
9970 {
9971  int foo = offsetof(struct in_pktinfo, ipi_addr)
9972   ;
9973   return 0;
9974 }
9975 _ACEOF
9976 if ac_fn_c_try_compile "$LINENO"; then :
9977   has_element=" "
9978 else
9979   has_element=
9980 fi
9981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9982
9983   ac_safe_type=`echo "struct in_pktinfo" | sed 'y% %_%'`
9984   if test "x$has_element" != "x"; then
9985     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9986 $as_echo "yes" >&6; }
9987     eval "ac_cv_type_${ac_safe_type}_has_ipi_addr=yes"
9988   else
9989     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9990 $as_echo "no" >&6; }
9991     eval "ac_cv_type_${ac_safe_type}_has_ipi_addr="
9992  fi
9993
9994 if test "x$ac_cv_type_struct_in_pktinfo_has_ipi_addr" = "xyes"; then
9995
9996 $as_echo "#define HAVE_IP_PKTINFO /**/" >>confdefs.h
9997
9998 fi
9999
10000
10001   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipi6_addr in struct in6_pktinfo" >&5
10002 $as_echo_n "checking for ipi6_addr in struct in6_pktinfo... " >&6; }
10003
10004
10005   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10006 /* end confdefs.h.  */
10007
10008 #include <netinet/in.h>
10009 #ifdef HAVE_STDDEF_H
10010 #include <stddef.h>
10011 #endif
10012 #ifndef offsetof
10013 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
10014 #endif
10015
10016 int
10017 main ()
10018 {
10019  int foo = offsetof(struct in6_pktinfo, ipi6_addr)
10020   ;
10021   return 0;
10022 }
10023 _ACEOF
10024 if ac_fn_c_try_compile "$LINENO"; then :
10025   has_element=" "
10026 else
10027   has_element=
10028 fi
10029 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10030
10031   ac_safe_type=`echo "struct in6_pktinfo" | sed 'y% %_%'`
10032   if test "x$has_element" != "x"; then
10033     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10034 $as_echo "yes" >&6; }
10035     eval "ac_cv_type_${ac_safe_type}_has_ipi6_addr=yes"
10036   else
10037     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10038 $as_echo "no" >&6; }
10039     eval "ac_cv_type_${ac_safe_type}_has_ipi6_addr="
10040  fi
10041
10042 if test "x$ac_cv_type_struct_in6_pktinfo_has_ipi6_addr" = "xyes"; then
10043
10044 $as_echo "#define HAVE_IN6_PKTINFO /**/" >>confdefs.h
10045
10046 fi
10047
10048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if htonll is defined" >&5
10049 $as_echo_n "checking if htonll is defined... " >&6; }
10050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10051 /* end confdefs.h.  */
10052
10053       #include <sys/types.h>
10054       #include <netinet/in.h>
10055
10056 int
10057 main ()
10058 {
10059
10060       return htonll(0);
10061
10062
10063   ;
10064   return 0;
10065 }
10066 _ACEOF
10067 if ac_fn_c_try_link "$LINENO"; then :
10068
10069       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10070 $as_echo "yes" >&6; }
10071
10072 $as_echo "#define HAVE_HTONLL 1" >>confdefs.h
10073
10074
10075 else
10076
10077       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10078 $as_echo "no" >&6; }
10079
10080
10081 fi
10082 rm -f core conftest.err conftest.$ac_objext \
10083     conftest$ac_exeext conftest.$ac_ext
10084
10085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if htonlll is defined" >&5
10086 $as_echo_n "checking if htonlll is defined... " >&6; }
10087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10088 /* end confdefs.h.  */
10089
10090       #include <sys/types.h>
10091       #include <netinet/in.h>
10092
10093 int
10094 main ()
10095 {
10096
10097       return htonlll(0);
10098
10099
10100   ;
10101   return 0;
10102 }
10103 _ACEOF
10104 if ac_fn_c_try_link "$LINENO"; then :
10105
10106       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10107 $as_echo "yes" >&6; }
10108
10109 $as_echo "#define HAVE_HTONLLL 1" >>confdefs.h
10110
10111
10112 else
10113
10114       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10115 $as_echo "no" >&6; }
10116
10117
10118 fi
10119 rm -f core conftest.err conftest.$ac_objext \
10120     conftest$ac_exeext conftest.$ac_ext
10121
10122
10123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10124 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10125 if ${ac_cv_c_const+:} false; then :
10126   $as_echo_n "(cached) " >&6
10127 else
10128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10129 /* end confdefs.h.  */
10130
10131 int
10132 main ()
10133 {
10134
10135 #ifndef __cplusplus
10136   /* Ultrix mips cc rejects this sort of thing.  */
10137   typedef int charset[2];
10138   const charset cs = { 0, 0 };
10139   /* SunOS 4.1.1 cc rejects this.  */
10140   char const *const *pcpcc;
10141   char **ppc;
10142   /* NEC SVR4.0.2 mips cc rejects this.  */
10143   struct point {int x, y;};
10144   static struct point const zero = {0,0};
10145   /* AIX XL C 1.02.0.0 rejects this.
10146      It does not let you subtract one const X* pointer from another in
10147      an arm of an if-expression whose if-part is not a constant
10148      expression */
10149   const char *g = "string";
10150   pcpcc = &g + (g ? g-g : 0);
10151   /* HPUX 7.0 cc rejects these. */
10152   ++pcpcc;
10153   ppc = (char**) pcpcc;
10154   pcpcc = (char const *const *) ppc;
10155   { /* SCO 3.2v4 cc rejects this sort of thing.  */
10156     char tx;
10157     char *t = &tx;
10158     char const *s = 0 ? (char *) 0 : (char const *) 0;
10159
10160     *t++ = 0;
10161     if (s) return 0;
10162   }
10163   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10164     int x[] = {25, 17};
10165     const int *foo = &x[0];
10166     ++foo;
10167   }
10168   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10169     typedef const int *iptr;
10170     iptr p = 0;
10171     ++p;
10172   }
10173   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
10174        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10175     struct s { int j; const int *ap[3]; } bx;
10176     struct s *b = &bx; b->j = 5;
10177   }
10178   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10179     const int foo = 10;
10180     if (!foo) return 0;
10181   }
10182   return !cs[0] && !zero.x;
10183 #endif
10184
10185   ;
10186   return 0;
10187 }
10188 _ACEOF
10189 if ac_fn_c_try_compile "$LINENO"; then :
10190   ac_cv_c_const=yes
10191 else
10192   ac_cv_c_const=no
10193 fi
10194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10195 fi
10196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
10197 $as_echo "$ac_cv_c_const" >&6; }
10198 if test $ac_cv_c_const = no; then
10199
10200 $as_echo "#define const /**/" >>confdefs.h
10201
10202 fi
10203
10204
10205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of OS" >&5
10206 $as_echo_n "checking type of OS... " >&6; }
10207 OS=`uname -s`
10208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OS" >&5
10209 $as_echo "$OS" >&6; }
10210 if test "$OS" = "OS/2"; then
10211   LIBPREFIX=
10212 else
10213   LIBPREFIX=lib
10214 fi
10215
10216
10217 if test "x$developer" = "xyes"; then
10218   { $as_echo "$as_me:${as_lineno-$LINENO}: Setting additional developer CFLAGS" >&5
10219 $as_echo "$as_me: Setting additional developer CFLAGS" >&6;}
10220
10221
10222   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Wdocumentation\"" >&5
10223 $as_echo_n "checking for the compiler flag \"-Wdocumentation\"... " >&6; }
10224 if ${ax_cv_cc_wdocumentation_flag+:} false; then :
10225   $as_echo_n "(cached) " >&6
10226 else
10227
10228
10229     CFLAGS_SAVED=$CFLAGS
10230     CFLAGS="$CFLAGS -Werror -Wdocumentation"
10231
10232     ac_ext=c
10233 ac_cpp='$CPP $CPPFLAGS'
10234 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10235 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10236 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10237
10238     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10239 /* end confdefs.h.  */
10240
10241 int
10242 main ()
10243 {
10244 return 0;
10245   ;
10246   return 0;
10247 }
10248 _ACEOF
10249 if ac_fn_c_try_compile "$LINENO"; then :
10250   ax_cv_cc_wdocumentation_flag="yes"
10251 else
10252   ax_cv_cc_wdocumentation_flag="no"
10253 fi
10254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10255     ac_ext=c
10256 ac_cpp='$CPP $CPPFLAGS'
10257 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10258 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10259 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10260
10261
10262     CFLAGS="$CFLAGS_SAVED"
10263
10264 fi
10265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_wdocumentation_flag" >&5
10266 $as_echo "$ax_cv_cc_wdocumentation_flag" >&6; }
10267
10268   if test "x$ax_cv_cc_wdocumentation_flag" = "xyes"; then
10269     devflags="-Wdocumentation"
10270   fi
10271
10272
10273   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Weverything\"" >&5
10274 $as_echo_n "checking for the compiler flag \"-Weverything\"... " >&6; }
10275 if ${ax_cv_cc_weverything_flag+:} false; then :
10276   $as_echo_n "(cached) " >&6
10277 else
10278
10279
10280     CFLAGS_SAVED=$CFLAGS
10281     CFLAGS="$CFLAGS -Werror -Weverything -Wno-unused-macros -Wno-unreachable-code-return"
10282
10283     ac_ext=c
10284 ac_cpp='$CPP $CPPFLAGS'
10285 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10286 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10287 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10288
10289     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10290 /* end confdefs.h.  */
10291
10292 int
10293 main ()
10294 {
10295 return 0;
10296   ;
10297   return 0;
10298 }
10299 _ACEOF
10300 if ac_fn_c_try_compile "$LINENO"; then :
10301   ax_cv_cc_weverything_flag="yes"
10302 else
10303   ax_cv_cc_weverything_flag="no"
10304 fi
10305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10306     ac_ext=c
10307 ac_cpp='$CPP $CPPFLAGS'
10308 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10309 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10310 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10311
10312
10313     CFLAGS="$CFLAGS_SAVED"
10314
10315 fi
10316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_weverything_flag" >&5
10317 $as_echo "$ax_cv_cc_weverything_flag" >&6; }
10318
10319   if test "x$ax_cv_cc_weverything_flag" = "xyes"; then
10320     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"
10321   else
10322     if test "x$GCC" = "xyes"; then
10323       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"
10324       INSTALLSTRIP=""
10325     fi
10326   fi
10327
10328   { $as_echo "$as_me:${as_lineno-$LINENO}: Developer CFLAGS are \"$devflags\"" >&5
10329 $as_echo "$as_me: Developer CFLAGS are \"$devflags\"" >&6;}
10330
10331   CFLAGS="$CFLAGS $devflags"
10332         if test "x$EXPERIMENTAL" != "xno"; then
10333     { $as_echo "$as_me:${as_lineno-$LINENO}: is developer build, enabling experimental modules implicitly, disable with --without-experimental-modules" >&5
10334 $as_echo "$as_me: is developer build, enabling experimental modules implicitly, disable with --without-experimental-modules" >&6;}
10335     EXPERIMENTAL=yes
10336   fi
10337 else
10338   devflags=""
10339   CFLAGS="$CFLAGS -DNDEBUG"
10340   INSTALLSTRIP=""
10341 fi
10342
10343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building with -DNDEBUG" >&5
10344 $as_echo_n "checking if building with -DNDEBUG... " >&6; }
10345 if echo "$CFLAGS" | grep '\-DNDEBUG' > /dev/null; then
10346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10347 $as_echo "yes" >&6; }
10348
10349 $as_echo "#define WITH_NDEBUG 1" >>confdefs.h
10350
10351 else
10352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10353 $as_echo "no" >&6; }
10354 fi
10355
10356 export EXPERIMENTAL
10357
10358 if test -d $srcdir/.git -a "x$GIT" = "xyes"; then
10359   RADIUSD_VERSION_COMMIT=`git log --pretty=format:'%h' -n 1`
10360
10361 cat >>confdefs.h <<_ACEOF
10362 #define RADIUSD_VERSION_COMMIT ${RADIUSD_VERSION_COMMIT}
10363 _ACEOF
10364
10365 fi
10366
10367
10368   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support in compiler" >&5
10369 $as_echo_n "checking for __thread support in compiler... " >&6; }
10370   if test "$cross_compiling" = yes; then :
10371   have_tls=no
10372 else
10373   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10374 /* end confdefs.h.  */
10375
10376         static __thread int val;
10377         int main(int argc, char **argv) {
10378           val = 0;
10379           return val;
10380         }
10381
10382
10383 _ACEOF
10384 if ac_fn_c_try_run "$LINENO"; then :
10385   have_tls=yes
10386 else
10387   have_tls=no
10388 fi
10389 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10390   conftest.$ac_objext conftest.beam conftest.$ac_ext
10391 fi
10392
10393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5
10394 $as_echo "$have_tls" >&6; }
10395   if test "x$have_tls" = "xyes"; then
10396
10397 $as_echo "#define TLS_STORAGE_CLASS __thread" >>confdefs.h
10398
10399   fi
10400
10401   if test "x$have_tls" = "xno"; then
10402     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __declspec(thread) support in compiler" >&5
10403 $as_echo_n "checking for __declspec(thread) support in compiler... " >&6; }
10404     if test "$cross_compiling" = yes; then :
10405   have_tls=no
10406 else
10407   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10408 /* end confdefs.h.  */
10409
10410           static _Thread_local int val;
10411           int main(int argc, char **argv) {
10412             val = 0;
10413             return val;
10414           }
10415
10416
10417 _ACEOF
10418 if ac_fn_c_try_run "$LINENO"; then :
10419   have_tls=yes
10420 else
10421   have_tls=no
10422 fi
10423 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10424   conftest.$ac_objext conftest.beam conftest.$ac_ext
10425 fi
10426
10427     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5
10428 $as_echo "$have_tls" >&6; }
10429     if test "x$have_tls" = "xyes"; then
10430
10431 $as_echo "#define TLS_STORAGE_CLASS __declspec(thread)" >>confdefs.h
10432
10433     fi
10434   fi
10435   if test "x$have_tls" = "xno"; then
10436     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Thread_local support in compiler" >&5
10437 $as_echo_n "checking for _Thread_local support in compiler... " >&6; }
10438     if test "$cross_compiling" = yes; then :
10439   have_tls=no
10440 else
10441   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10442 /* end confdefs.h.  */
10443
10444           static _Thread_local int val;
10445           int main(int argc, char **argv) {
10446             val = 0;
10447             return val;
10448           }
10449
10450
10451 _ACEOF
10452 if ac_fn_c_try_run "$LINENO"; then :
10453   have_tls=yes
10454 else
10455   have_tls=no
10456 fi
10457 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10458   conftest.$ac_objext conftest.beam conftest.$ac_ext
10459 fi
10460
10461     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5
10462 $as_echo "$have_tls" >&6; }
10463     if test "x$have_tls" = "xyes"; then
10464
10465 $as_echo "#define TLS_STORAGE_CLASS _Thread_local" >>confdefs.h
10466
10467     fi
10468   fi
10469
10470
10471   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_choose_expr support in compiler" >&5
10472 $as_echo_n "checking for __builtin_choose_expr support in compiler... " >&6; }
10473   if test "$cross_compiling" = yes; then :
10474   have_builtin_choose_expr=no
10475 else
10476   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10477 /* end confdefs.h.  */
10478
10479         int main(int argc, char **argv) {
10480           return __builtin_choose_expr(0, 1, 0);
10481         }
10482
10483
10484 _ACEOF
10485 if ac_fn_c_try_run "$LINENO"; then :
10486   have_builtin_choose_expr=yes
10487 else
10488   have_builtin_choose_expr=no
10489 fi
10490 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10491   conftest.$ac_objext conftest.beam conftest.$ac_ext
10492 fi
10493
10494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_choose_expr" >&5
10495 $as_echo "$have_builtin_choose_expr" >&6; }
10496   if test "x$have_builtin_choose_expr" = "xyes"; then
10497
10498 $as_echo "#define HAVE_BUILTIN_CHOOSE_EXPR 1" >>confdefs.h
10499
10500   fi
10501
10502
10503   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p support in compiler" >&5
10504 $as_echo_n "checking for __builtin_types_compatible_p support in compiler... " >&6; }
10505   if test "$cross_compiling" = yes; then :
10506   have_builtin_types_compatible_p=no
10507 else
10508   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10509 /* end confdefs.h.  */
10510
10511         int main(int argc, char **argv) {
10512           return !(__builtin_types_compatible_p(char *, char *));
10513         }
10514
10515
10516 _ACEOF
10517 if ac_fn_c_try_run "$LINENO"; then :
10518   have_builtin_types_compatible_p=yes
10519 else
10520   have_builtin_types_compatible_p=no
10521 fi
10522 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10523   conftest.$ac_objext conftest.beam conftest.$ac_ext
10524 fi
10525
10526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_types_compatible_p" >&5
10527 $as_echo "$have_builtin_types_compatible_p" >&6; }
10528   if test "x$have_builtin_types_compatible_p" = "xyes"; then
10529
10530 $as_echo "#define HAVE_BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
10531
10532   fi
10533
10534
10535   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64 support in compiler" >&5
10536 $as_echo_n "checking for __builtin_bswap64 support in compiler... " >&6; }
10537   if test "$cross_compiling" = yes; then :
10538   have_builtin_bswap64=no
10539 else
10540   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10541 /* end confdefs.h.  */
10542
10543         int main(int argc, char **argv) {
10544           return (__builtin_bswap64(0));
10545         }
10546
10547
10548 _ACEOF
10549 if ac_fn_c_try_run "$LINENO"; then :
10550   have_builtin_bswap64=yes
10551 else
10552   have_builtin_bswap64=no
10553 fi
10554 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10555   conftest.$ac_objext conftest.beam conftest.$ac_ext
10556 fi
10557
10558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_bswap64" >&5
10559 $as_echo "$have_builtin_bswap64" >&6; }
10560   if test "x$have_builtin_bswap64" = "xyes"; then
10561
10562 $as_echo "#define HAVE_BUILTIN_BSWAP_64 1" >>confdefs.h
10563
10564   fi
10565
10566
10567
10568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc_set_memlimit in -ltalloc" >&5
10569 $as_echo_n "checking for talloc_set_memlimit in -ltalloc... " >&6; }
10570 if ${ac_cv_lib_talloc_talloc_set_memlimit+:} false; then :
10571   $as_echo_n "(cached) " >&6
10572 else
10573   ac_check_lib_save_LIBS=$LIBS
10574 LIBS="-ltalloc  $LIBS"
10575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10576 /* end confdefs.h.  */
10577
10578 /* Override any GCC internal prototype to avoid an error.
10579    Use char because int might match the return type of a GCC
10580    builtin and then its argument prototype would still apply.  */
10581 #ifdef __cplusplus
10582 extern "C"
10583 #endif
10584 char talloc_set_memlimit ();
10585 int
10586 main ()
10587 {
10588 return talloc_set_memlimit ();
10589   ;
10590   return 0;
10591 }
10592 _ACEOF
10593 if ac_fn_c_try_link "$LINENO"; then :
10594   ac_cv_lib_talloc_talloc_set_memlimit=yes
10595 else
10596   ac_cv_lib_talloc_talloc_set_memlimit=no
10597 fi
10598 rm -f core conftest.err conftest.$ac_objext \
10599     conftest$ac_exeext conftest.$ac_ext
10600 LIBS=$ac_check_lib_save_LIBS
10601 fi
10602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_talloc_talloc_set_memlimit" >&5
10603 $as_echo "$ac_cv_lib_talloc_talloc_set_memlimit" >&6; }
10604 if test "x$ac_cv_lib_talloc_talloc_set_memlimit" = xyes; then :
10605
10606
10607 $as_echo "#define HAVE_TALLOC_SET_MEMLIMIT 1" >>confdefs.h
10608
10609
10610
10611 fi
10612
10613
10614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
10615 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
10616 if ${ac_cv_lib_crypt_crypt+:} false; then :
10617   $as_echo_n "(cached) " >&6
10618 else
10619   ac_check_lib_save_LIBS=$LIBS
10620 LIBS="-lcrypt  $LIBS"
10621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10622 /* end confdefs.h.  */
10623
10624 /* Override any GCC internal prototype to avoid an error.
10625    Use char because int might match the return type of a GCC
10626    builtin and then its argument prototype would still apply.  */
10627 #ifdef __cplusplus
10628 extern "C"
10629 #endif
10630 char crypt ();
10631 int
10632 main ()
10633 {
10634 return crypt ();
10635   ;
10636   return 0;
10637 }
10638 _ACEOF
10639 if ac_fn_c_try_link "$LINENO"; then :
10640   ac_cv_lib_crypt_crypt=yes
10641 else
10642   ac_cv_lib_crypt_crypt=no
10643 fi
10644 rm -f core conftest.err conftest.$ac_objext \
10645     conftest$ac_exeext conftest.$ac_ext
10646 LIBS=$ac_check_lib_save_LIBS
10647 fi
10648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
10649 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
10650 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
10651   CRYPTLIB="-lcrypt"
10652
10653 fi
10654
10655
10656 if test "$CRYPTLIB" != ""; then
10657
10658 $as_echo "#define HAVE_CRYPT /**/" >>confdefs.h
10659
10660 else
10661   ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
10662 if test "x$ac_cv_func_crypt" = xyes; then :
10663
10664 $as_echo "#define HAVE_CRYPT /**/" >>confdefs.h
10665
10666 fi
10667
10668 fi
10669
10670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setkey in -lcipher" >&5
10671 $as_echo_n "checking for setkey in -lcipher... " >&6; }
10672 if ${ac_cv_lib_cipher_setkey+:} false; then :
10673   $as_echo_n "(cached) " >&6
10674 else
10675   ac_check_lib_save_LIBS=$LIBS
10676 LIBS="-lcipher  $LIBS"
10677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10678 /* end confdefs.h.  */
10679
10680 /* Override any GCC internal prototype to avoid an error.
10681    Use char because int might match the return type of a GCC
10682    builtin and then its argument prototype would still apply.  */
10683 #ifdef __cplusplus
10684 extern "C"
10685 #endif
10686 char setkey ();
10687 int
10688 main ()
10689 {
10690 return setkey ();
10691   ;
10692   return 0;
10693 }
10694 _ACEOF
10695 if ac_fn_c_try_link "$LINENO"; then :
10696   ac_cv_lib_cipher_setkey=yes
10697 else
10698   ac_cv_lib_cipher_setkey=no
10699 fi
10700 rm -f core conftest.err conftest.$ac_objext \
10701     conftest$ac_exeext conftest.$ac_ext
10702 LIBS=$ac_check_lib_save_LIBS
10703 fi
10704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cipher_setkey" >&5
10705 $as_echo "$ac_cv_lib_cipher_setkey" >&6; }
10706 if test "x$ac_cv_lib_cipher_setkey" = xyes; then :
10707   CRYPTLIB="${CRYPTLIB} -lcipher"
10708
10709 fi
10710
10711
10712
10713 execinfo_lib_dir=
10714
10715 # Check whether --with-execinfo-lib-dir was given.
10716 if test "${with_execinfo_lib_dir+set}" = set; then :
10717   withval=$with_execinfo_lib_dir;  case "$withval" in
10718     no)
10719         as_fn_error $? "Need execinfo-lib-dir" "$LINENO" 5
10720         ;;
10721     yes)
10722         ;;
10723     *)
10724         execinfo_lib_dir="$withval"
10725         ;;
10726   esac
10727
10728 fi
10729
10730
10731 execinfo_include_dir=
10732
10733 # Check whether --with-execinfo-include-dir was given.
10734 if test "${with_execinfo_include_dir+set}" = set; then :
10735   withval=$with_execinfo_include_dir;  case "$withval" in
10736     no)
10737         as_fn_error $? "Need execinfo-include-dir" "$LINENO" 5
10738         ;;
10739     yes)
10740         ;;
10741     *)
10742         execinfo_include_dir="$withval"
10743         ;;
10744   esac
10745
10746 fi
10747
10748
10749 smart_try_dir=$execinfo_include_dir
10750
10751
10752 ac_safe=`echo "execinfo.h" | sed 'y%./+-%__pm%'`
10753 old_CPPFLAGS="$CPPFLAGS"
10754 smart_include=
10755 smart_include_dir="/usr/local/include /opt/include"
10756
10757 _smart_try_dir=
10758 _smart_include_dir=
10759
10760 for _prefix in $smart_prefix ""; do
10761   for _dir in $smart_try_dir; do
10762     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
10763   done
10764
10765   for _dir in $smart_include_dir; do
10766     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
10767   done
10768 done
10769
10770 if test "x$_smart_try_dir" != "x"; then
10771   for try in $_smart_try_dir; do
10772     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h in $try" >&5
10773 $as_echo_n "checking for execinfo.h in $try... " >&6; }
10774     CPPFLAGS="-isystem $try $old_CPPFLAGS"
10775     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10776 /* end confdefs.h.  */
10777
10778                     #include <execinfo.h>
10779 int
10780 main ()
10781 {
10782 int a = 1;
10783   ;
10784   return 0;
10785 }
10786 _ACEOF
10787 if ac_fn_c_try_compile "$LINENO"; then :
10788
10789                      smart_include="-isystem $try"
10790                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10791 $as_echo "yes" >&6; }
10792                      break
10793
10794 else
10795
10796                      smart_include=
10797                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10798 $as_echo "no" >&6; }
10799
10800 fi
10801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10802   done
10803   CPPFLAGS="$old_CPPFLAGS"
10804 fi
10805
10806 if test "x$smart_include" = "x"; then
10807   for _prefix in $smart_prefix; do
10808     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/execinfo.h" >&5
10809 $as_echo_n "checking for ${_prefix}/execinfo.h... " >&6; }
10810
10811     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10812 /* end confdefs.h.  */
10813
10814                     #include <execinfo.h>
10815 int
10816 main ()
10817 {
10818 int a = 1;
10819   ;
10820   return 0;
10821 }
10822 _ACEOF
10823 if ac_fn_c_try_compile "$LINENO"; then :
10824
10825                      smart_include="-isystem ${_prefix}/"
10826                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10827 $as_echo "yes" >&6; }
10828                      break
10829
10830 else
10831
10832                      smart_include=
10833                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10834 $as_echo "no" >&6; }
10835
10836 fi
10837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10838   done
10839 fi
10840
10841 if test "x$smart_include" = "x"; then
10842     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h" >&5
10843 $as_echo_n "checking for execinfo.h... " >&6; }
10844
10845     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10846 /* end confdefs.h.  */
10847
10848                     #include <execinfo.h>
10849 int
10850 main ()
10851 {
10852 int a = 1;
10853   ;
10854   return 0;
10855 }
10856 _ACEOF
10857 if ac_fn_c_try_compile "$LINENO"; then :
10858
10859                      smart_include=" "
10860                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10861 $as_echo "yes" >&6; }
10862                      break
10863
10864 else
10865
10866                      smart_include=
10867                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10868 $as_echo "no" >&6; }
10869
10870 fi
10871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10872 fi
10873
10874 if test "x$smart_include" = "x"; then
10875
10876   for prefix in $smart_prefix; do
10877
10878
10879 if test "x$LOCATE" != "x"; then
10880         DIRS=
10881   file="${_prefix}/${1}"
10882
10883   for x in `${LOCATE} $file 2>/dev/null`; do
10884                                         base=`echo $x | sed "s%/${file}%%"`
10885     if test "x$x" = "x$base"; then
10886       continue;
10887     fi
10888
10889     dir=`${DIRNAME} $x 2>/dev/null`
10890                 exclude=`echo ${dir} | ${GREP} /home`
10891     if test "x$exclude" != "x"; then
10892       continue
10893     fi
10894
10895                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
10896     if test "x$already" = "x"; then
10897       DIRS="$DIRS $dir"
10898     fi
10899   done
10900 fi
10901
10902 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
10903
10904   done
10905
10906
10907 if test "x$LOCATE" != "x"; then
10908         DIRS=
10909   file=execinfo.h
10910
10911   for x in `${LOCATE} $file 2>/dev/null`; do
10912                                         base=`echo $x | sed "s%/${file}%%"`
10913     if test "x$x" = "x$base"; then
10914       continue;
10915     fi
10916
10917     dir=`${DIRNAME} $x 2>/dev/null`
10918                 exclude=`echo ${dir} | ${GREP} /home`
10919     if test "x$exclude" != "x"; then
10920       continue
10921     fi
10922
10923                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
10924     if test "x$already" = "x"; then
10925       DIRS="$DIRS $dir"
10926     fi
10927   done
10928 fi
10929
10930 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
10931
10932
10933   for try in $_smart_include_dir; do
10934     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h in $try" >&5
10935 $as_echo_n "checking for execinfo.h in $try... " >&6; }
10936     CPPFLAGS="-isystem $try $old_CPPFLAGS"
10937     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10938 /* end confdefs.h.  */
10939
10940                     #include <execinfo.h>
10941 int
10942 main ()
10943 {
10944 int a = 1;
10945   ;
10946   return 0;
10947 }
10948 _ACEOF
10949 if ac_fn_c_try_compile "$LINENO"; then :
10950
10951                      smart_include="-isystem $try"
10952                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10953 $as_echo "yes" >&6; }
10954                      break
10955
10956 else
10957
10958                      smart_include=
10959                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10960 $as_echo "no" >&6; }
10961
10962 fi
10963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10964   done
10965   CPPFLAGS="$old_CPPFLAGS"
10966 fi
10967
10968 if test "x$smart_include" != "x"; then
10969   eval "ac_cv_header_$ac_safe=yes"
10970   CPPFLAGS="$smart_include $old_CPPFLAGS"
10971   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
10972 fi
10973
10974 smart_prefix=
10975
10976 if test "x$ac_cv_header_execinfo_h" = "xyes"; then
10977   smart_try_dir=$execinfo_lib_dir
10978
10979
10980 sm_lib_safe=`echo "execinfo" | sed 'y%./+-%__p_%'`
10981 sm_func_safe=`echo "backtrace_symbols" | sed 'y%./+-%__p_%'`
10982
10983 old_LIBS="$LIBS"
10984 old_CPPFLAGS="$CPPFLAGS"
10985 smart_lib=
10986 smart_ldflags=
10987 smart_lib_dir=
10988
10989 if test "x$smart_try_dir" != "x"; then
10990   for try in $smart_try_dir; do
10991     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo in $try" >&5
10992 $as_echo_n "checking for backtrace_symbols in -lexecinfo in $try... " >&6; }
10993     LIBS="-lexecinfo $old_LIBS"
10994     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
10995     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10996 /* end confdefs.h.  */
10997 extern char backtrace_symbols();
10998 int
10999 main ()
11000 {
11001 backtrace_symbols()
11002   ;
11003   return 0;
11004 }
11005 _ACEOF
11006 if ac_fn_c_try_link "$LINENO"; then :
11007
11008                  smart_lib="-lexecinfo"
11009                  smart_ldflags="-L$try -Wl,-rpath,$try"
11010                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11011 $as_echo "yes" >&6; }
11012                  break
11013
11014 else
11015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11016 $as_echo "no" >&6; }
11017 fi
11018 rm -f core conftest.err conftest.$ac_objext \
11019     conftest$ac_exeext conftest.$ac_ext
11020   done
11021   LIBS="$old_LIBS"
11022   CPPFLAGS="$old_CPPFLAGS"
11023 fi
11024
11025 if test "x$smart_lib" = "x"; then
11026   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo" >&5
11027 $as_echo_n "checking for backtrace_symbols in -lexecinfo... " >&6; }
11028   LIBS="-lexecinfo $old_LIBS"
11029   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11030 /* end confdefs.h.  */
11031 extern char backtrace_symbols();
11032 int
11033 main ()
11034 {
11035 backtrace_symbols()
11036   ;
11037   return 0;
11038 }
11039 _ACEOF
11040 if ac_fn_c_try_link "$LINENO"; then :
11041
11042                 smart_lib="-lexecinfo"
11043                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11044 $as_echo "yes" >&6; }
11045
11046 else
11047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11048 $as_echo "no" >&6; }
11049 fi
11050 rm -f core conftest.err conftest.$ac_objext \
11051     conftest$ac_exeext conftest.$ac_ext
11052   LIBS="$old_LIBS"
11053 fi
11054
11055 if test "x$smart_lib" = "x"; then
11056
11057
11058 if test "x$LOCATE" != "x"; then
11059         DIRS=
11060   file=libexecinfo${libltdl_cv_shlibext}
11061
11062   for x in `${LOCATE} $file 2>/dev/null`; do
11063                                         base=`echo $x | sed "s%/${file}%%"`
11064     if test "x$x" = "x$base"; then
11065       continue;
11066     fi
11067
11068     dir=`${DIRNAME} $x 2>/dev/null`
11069                 exclude=`echo ${dir} | ${GREP} /home`
11070     if test "x$exclude" != "x"; then
11071       continue
11072     fi
11073
11074                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
11075     if test "x$already" = "x"; then
11076       DIRS="$DIRS $dir"
11077     fi
11078   done
11079 fi
11080
11081 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
11082
11083
11084
11085 if test "x$LOCATE" != "x"; then
11086         DIRS=
11087   file=libexecinfo.a
11088
11089   for x in `${LOCATE} $file 2>/dev/null`; do
11090                                         base=`echo $x | sed "s%/${file}%%"`
11091     if test "x$x" = "x$base"; then
11092       continue;
11093     fi
11094
11095     dir=`${DIRNAME} $x 2>/dev/null`
11096                 exclude=`echo ${dir} | ${GREP} /home`
11097     if test "x$exclude" != "x"; then
11098       continue
11099     fi
11100
11101                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
11102     if test "x$already" = "x"; then
11103       DIRS="$DIRS $dir"
11104     fi
11105   done
11106 fi
11107
11108 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
11109
11110
11111   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
11112     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo in $try" >&5
11113 $as_echo_n "checking for backtrace_symbols in -lexecinfo in $try... " >&6; }
11114     LIBS="-lexecinfo $old_LIBS"
11115     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
11116     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11117 /* end confdefs.h.  */
11118 extern char backtrace_symbols();
11119 int
11120 main ()
11121 {
11122 backtrace_symbols()
11123   ;
11124   return 0;
11125 }
11126 _ACEOF
11127 if ac_fn_c_try_link "$LINENO"; then :
11128
11129                   smart_lib="-lexecinfo"
11130                   smart_ldflags="-L$try -Wl,-rpath,$try"
11131                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11132 $as_echo "yes" >&6; }
11133                   break
11134
11135 else
11136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11137 $as_echo "no" >&6; }
11138 fi
11139 rm -f core conftest.err conftest.$ac_objext \
11140     conftest$ac_exeext conftest.$ac_ext
11141   done
11142   LIBS="$old_LIBS"
11143   CPPFLAGS="$old_CPPFLAGS"
11144 fi
11145
11146 if test "x$smart_lib" != "x"; then
11147   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
11148   LIBS="$smart_ldflags $smart_lib $old_LIBS"
11149   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
11150 fi
11151
11152   if test "x$ac_cv_lib_execinfo_backtrace_symbols" != "xyes"; then
11153         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if execinfo provided as part of libc" >&5
11154 $as_echo_n "checking if execinfo provided as part of libc... " >&6; }
11155     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11156 /* end confdefs.h.  */
11157
11158         #include <execinfo.h>
11159
11160 int
11161 main ()
11162 {
11163
11164         void *sym[1];
11165         backtrace_symbols(&sym, sizeof(sym))
11166   ;
11167   return 0;
11168 }
11169 _ACEOF
11170 if ac_fn_c_try_link "$LINENO"; then :
11171
11172         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11173 $as_echo "yes" >&6; }
11174         ac_cv_lib_execinfo_backtrace_symbols="yes"
11175
11176 else
11177
11178         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11179 $as_echo "no" >&6; }
11180
11181
11182 fi
11183 rm -f core conftest.err conftest.$ac_objext \
11184     conftest$ac_exeext conftest.$ac_ext
11185   fi
11186
11187   if test "x$ac_cv_lib_execinfo_backtrace_symbols" = "xyes"; then
11188
11189 $as_echo "#define HAVE_EXECINFO 1" >>confdefs.h
11190
11191   fi
11192 fi
11193
11194 PCRE=yes
11195
11196 # Check whether --with-pcre was given.
11197 if test "${with_pcre+set}" = set; then :
11198   withval=$with_pcre;  case "$withval" in
11199     no)
11200     PCRE=no
11201         ;;
11202     yes)
11203     PCRE=yes
11204         ;;
11205   esac
11206
11207 fi
11208
11209
11210 pcre_lib_dir=
11211
11212 # Check whether --with-pcre-lib-dir was given.
11213 if test "${with_pcre_lib_dir+set}" = set; then :
11214   withval=$with_pcre_lib_dir;  case "$withval" in
11215     no)
11216         as_fn_error $? "Need pcre-lib-dir" "$LINENO" 5
11217         ;;
11218     yes)
11219         ;;
11220     *)
11221         pcre_lib_dir="$withval"
11222         ;;
11223   esac
11224
11225 fi
11226
11227
11228 pcre_include_dir=
11229
11230 # Check whether --with-pcre-include-dir was given.
11231 if test "${with_pcre_include_dir+set}" = set; then :
11232   withval=$with_pcre_include_dir;  case "$withval" in
11233     no)
11234         as_fn_error $? "Need pcre-include-dir" "$LINENO" 5
11235         ;;
11236     yes)
11237         ;;
11238     *)
11239         pcre_include_dir="$withval"
11240         ;;
11241   esac
11242
11243 fi
11244
11245
11246 REGEX=
11247
11248 # Check whether --with-regex was given.
11249 if test "${with_regex+set}" = set; then :
11250   withval=$with_regex;  case "$withval" in
11251     no)
11252         REGEX=no
11253         ;;
11254     *)
11255         ;;
11256   esac
11257
11258 fi
11259
11260
11261 if test "x$REGEX" != "xno" && test "x$PCRE" != "xno"; then
11262   smart_try_dir=$pcre_include_dir
11263
11264
11265 ac_safe=`echo "pcre.h" | sed 'y%./+-%__pm%'`
11266 old_CPPFLAGS="$CPPFLAGS"
11267 smart_include=
11268 smart_include_dir="/usr/local/include /opt/include"
11269
11270 _smart_try_dir=
11271 _smart_include_dir=
11272
11273 for _prefix in $smart_prefix ""; do
11274   for _dir in $smart_try_dir; do
11275     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
11276   done
11277
11278   for _dir in $smart_include_dir; do
11279     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
11280   done
11281 done
11282
11283 if test "x$_smart_try_dir" != "x"; then
11284   for try in $_smart_try_dir; do
11285     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre.h in $try" >&5
11286 $as_echo_n "checking for pcre.h in $try... " >&6; }
11287     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11288     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11289 /* end confdefs.h.  */
11290
11291                     #include <pcre.h>
11292 int
11293 main ()
11294 {
11295 int a = 1;
11296   ;
11297   return 0;
11298 }
11299 _ACEOF
11300 if ac_fn_c_try_compile "$LINENO"; then :
11301
11302                      smart_include="-isystem $try"
11303                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11304 $as_echo "yes" >&6; }
11305                      break
11306
11307 else
11308
11309                      smart_include=
11310                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11311 $as_echo "no" >&6; }
11312
11313 fi
11314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11315   done
11316   CPPFLAGS="$old_CPPFLAGS"
11317 fi
11318
11319 if test "x$smart_include" = "x"; then
11320   for _prefix in $smart_prefix; do
11321     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/pcre.h" >&5
11322 $as_echo_n "checking for ${_prefix}/pcre.h... " >&6; }
11323
11324     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11325 /* end confdefs.h.  */
11326
11327                     #include <pcre.h>
11328 int
11329 main ()
11330 {
11331 int a = 1;
11332   ;
11333   return 0;
11334 }
11335 _ACEOF
11336 if ac_fn_c_try_compile "$LINENO"; then :
11337
11338                      smart_include="-isystem ${_prefix}/"
11339                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11340 $as_echo "yes" >&6; }
11341                      break
11342
11343 else
11344
11345                      smart_include=
11346                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11347 $as_echo "no" >&6; }
11348
11349 fi
11350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11351   done
11352 fi
11353
11354 if test "x$smart_include" = "x"; then
11355     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre.h" >&5
11356 $as_echo_n "checking for pcre.h... " >&6; }
11357
11358     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11359 /* end confdefs.h.  */
11360
11361                     #include <pcre.h>
11362 int
11363 main ()
11364 {
11365 int a = 1;
11366   ;
11367   return 0;
11368 }
11369 _ACEOF
11370 if ac_fn_c_try_compile "$LINENO"; then :
11371
11372                      smart_include=" "
11373                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11374 $as_echo "yes" >&6; }
11375                      break
11376
11377 else
11378
11379                      smart_include=
11380                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11381 $as_echo "no" >&6; }
11382
11383 fi
11384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11385 fi
11386
11387 if test "x$smart_include" = "x"; then
11388
11389   for prefix in $smart_prefix; do
11390
11391
11392 if test "x$LOCATE" != "x"; then
11393         DIRS=
11394   file="${_prefix}/${1}"
11395
11396   for x in `${LOCATE} $file 2>/dev/null`; do
11397                                         base=`echo $x | sed "s%/${file}%%"`
11398     if test "x$x" = "x$base"; then
11399       continue;
11400     fi
11401
11402     dir=`${DIRNAME} $x 2>/dev/null`
11403                 exclude=`echo ${dir} | ${GREP} /home`
11404     if test "x$exclude" != "x"; then
11405       continue
11406     fi
11407
11408                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
11409     if test "x$already" = "x"; then
11410       DIRS="$DIRS $dir"
11411     fi
11412   done
11413 fi
11414
11415 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
11416
11417   done
11418
11419
11420 if test "x$LOCATE" != "x"; then
11421         DIRS=
11422   file=pcre.h
11423
11424   for x in `${LOCATE} $file 2>/dev/null`; do
11425                                         base=`echo $x | sed "s%/${file}%%"`
11426     if test "x$x" = "x$base"; then
11427       continue;
11428     fi
11429
11430     dir=`${DIRNAME} $x 2>/dev/null`
11431                 exclude=`echo ${dir} | ${GREP} /home`
11432     if test "x$exclude" != "x"; then
11433       continue
11434     fi
11435
11436                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
11437     if test "x$already" = "x"; then
11438       DIRS="$DIRS $dir"
11439     fi
11440   done
11441 fi
11442
11443 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
11444
11445
11446   for try in $_smart_include_dir; do
11447     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre.h in $try" >&5
11448 $as_echo_n "checking for pcre.h in $try... " >&6; }
11449     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11450     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11451 /* end confdefs.h.  */
11452
11453                     #include <pcre.h>
11454 int
11455 main ()
11456 {
11457 int a = 1;
11458   ;
11459   return 0;
11460 }
11461 _ACEOF
11462 if ac_fn_c_try_compile "$LINENO"; then :
11463
11464                      smart_include="-isystem $try"
11465                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11466 $as_echo "yes" >&6; }
11467                      break
11468
11469 else
11470
11471                      smart_include=
11472                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11473 $as_echo "no" >&6; }
11474
11475 fi
11476 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11477   done
11478   CPPFLAGS="$old_CPPFLAGS"
11479 fi
11480
11481 if test "x$smart_include" != "x"; then
11482   eval "ac_cv_header_$ac_safe=yes"
11483   CPPFLAGS="$smart_include $old_CPPFLAGS"
11484   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
11485 fi
11486
11487 smart_prefix=
11488
11489   if test "x$ac_cv_header_pcre_h" = "xyes"; then
11490     smart_try_dir=$pcre_lib_dir
11491
11492
11493 sm_lib_safe=`echo "pcre" | sed 'y%./+-%__p_%'`
11494 sm_func_safe=`echo "pcre_compile" | sed 'y%./+-%__p_%'`
11495
11496 old_LIBS="$LIBS"
11497 old_CPPFLAGS="$CPPFLAGS"
11498 smart_lib=
11499 smart_ldflags=
11500 smart_lib_dir=
11501
11502 if test "x$smart_try_dir" != "x"; then
11503   for try in $smart_try_dir; do
11504     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre in $try" >&5
11505 $as_echo_n "checking for pcre_compile in -lpcre in $try... " >&6; }
11506     LIBS="-lpcre $old_LIBS"
11507     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
11508     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11509 /* end confdefs.h.  */
11510 extern char pcre_compile();
11511 int
11512 main ()
11513 {
11514 pcre_compile()
11515   ;
11516   return 0;
11517 }
11518 _ACEOF
11519 if ac_fn_c_try_link "$LINENO"; then :
11520
11521                  smart_lib="-lpcre"
11522                  smart_ldflags="-L$try -Wl,-rpath,$try"
11523                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11524 $as_echo "yes" >&6; }
11525                  break
11526
11527 else
11528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11529 $as_echo "no" >&6; }
11530 fi
11531 rm -f core conftest.err conftest.$ac_objext \
11532     conftest$ac_exeext conftest.$ac_ext
11533   done
11534   LIBS="$old_LIBS"
11535   CPPFLAGS="$old_CPPFLAGS"
11536 fi
11537
11538 if test "x$smart_lib" = "x"; then
11539   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre" >&5
11540 $as_echo_n "checking for pcre_compile in -lpcre... " >&6; }
11541   LIBS="-lpcre $old_LIBS"
11542   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11543 /* end confdefs.h.  */
11544 extern char pcre_compile();
11545 int
11546 main ()
11547 {
11548 pcre_compile()
11549   ;
11550   return 0;
11551 }
11552 _ACEOF
11553 if ac_fn_c_try_link "$LINENO"; then :
11554
11555                 smart_lib="-lpcre"
11556                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11557 $as_echo "yes" >&6; }
11558
11559 else
11560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11561 $as_echo "no" >&6; }
11562 fi
11563 rm -f core conftest.err conftest.$ac_objext \
11564     conftest$ac_exeext conftest.$ac_ext
11565   LIBS="$old_LIBS"
11566 fi
11567
11568 if test "x$smart_lib" = "x"; then
11569
11570
11571 if test "x$LOCATE" != "x"; then
11572         DIRS=
11573   file=libpcre${libltdl_cv_shlibext}
11574
11575   for x in `${LOCATE} $file 2>/dev/null`; do
11576                                         base=`echo $x | sed "s%/${file}%%"`
11577     if test "x$x" = "x$base"; then
11578       continue;
11579     fi
11580
11581     dir=`${DIRNAME} $x 2>/dev/null`
11582                 exclude=`echo ${dir} | ${GREP} /home`
11583     if test "x$exclude" != "x"; then
11584       continue
11585     fi
11586
11587                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
11588     if test "x$already" = "x"; then
11589       DIRS="$DIRS $dir"
11590     fi
11591   done
11592 fi
11593
11594 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
11595
11596
11597
11598 if test "x$LOCATE" != "x"; then
11599         DIRS=
11600   file=libpcre.a
11601
11602   for x in `${LOCATE} $file 2>/dev/null`; do
11603                                         base=`echo $x | sed "s%/${file}%%"`
11604     if test "x$x" = "x$base"; then
11605       continue;
11606     fi
11607
11608     dir=`${DIRNAME} $x 2>/dev/null`
11609                 exclude=`echo ${dir} | ${GREP} /home`
11610     if test "x$exclude" != "x"; then
11611       continue
11612     fi
11613
11614                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
11615     if test "x$already" = "x"; then
11616       DIRS="$DIRS $dir"
11617     fi
11618   done
11619 fi
11620
11621 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
11622
11623
11624   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
11625     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre in $try" >&5
11626 $as_echo_n "checking for pcre_compile in -lpcre in $try... " >&6; }
11627     LIBS="-lpcre $old_LIBS"
11628     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
11629     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11630 /* end confdefs.h.  */
11631 extern char pcre_compile();
11632 int
11633 main ()
11634 {
11635 pcre_compile()
11636   ;
11637   return 0;
11638 }
11639 _ACEOF
11640 if ac_fn_c_try_link "$LINENO"; then :
11641
11642                   smart_lib="-lpcre"
11643                   smart_ldflags="-L$try -Wl,-rpath,$try"
11644                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11645 $as_echo "yes" >&6; }
11646                   break
11647
11648 else
11649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11650 $as_echo "no" >&6; }
11651 fi
11652 rm -f core conftest.err conftest.$ac_objext \
11653     conftest$ac_exeext conftest.$ac_ext
11654   done
11655   LIBS="$old_LIBS"
11656   CPPFLAGS="$old_CPPFLAGS"
11657 fi
11658
11659 if test "x$smart_lib" != "x"; then
11660   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
11661   LIBS="$smart_ldflags $smart_lib $old_LIBS"
11662   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
11663 fi
11664
11665     if test "x$ac_cv_lib_pcre_pcre_compile" = "xyes"; then
11666       REGEX=yes
11667
11668 $as_echo "#define HAVE_PCRE 1" >>confdefs.h
11669
11670
11671 $as_echo "#define HAVE_BINSAFE_REGEX 1" >>confdefs.h
11672
11673     fi
11674   fi
11675 fi
11676
11677 if test "x$REGEX" = "x"; then
11678   smart_try_dir=
11679
11680
11681 ac_safe=`echo "regex.h" | sed 'y%./+-%__pm%'`
11682 old_CPPFLAGS="$CPPFLAGS"
11683 smart_include=
11684 smart_include_dir="/usr/local/include /opt/include"
11685
11686 _smart_try_dir=
11687 _smart_include_dir=
11688
11689 for _prefix in $smart_prefix ""; do
11690   for _dir in $smart_try_dir; do
11691     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
11692   done
11693
11694   for _dir in $smart_include_dir; do
11695     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
11696   done
11697 done
11698
11699 if test "x$_smart_try_dir" != "x"; then
11700   for try in $_smart_try_dir; do
11701     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h in $try" >&5
11702 $as_echo_n "checking for regex.h in $try... " >&6; }
11703     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11704     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11705 /* end confdefs.h.  */
11706
11707                     #include <regex.h>
11708 int
11709 main ()
11710 {
11711 int a = 1;
11712   ;
11713   return 0;
11714 }
11715 _ACEOF
11716 if ac_fn_c_try_compile "$LINENO"; then :
11717
11718                      smart_include="-isystem $try"
11719                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11720 $as_echo "yes" >&6; }
11721                      break
11722
11723 else
11724
11725                      smart_include=
11726                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11727 $as_echo "no" >&6; }
11728
11729 fi
11730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11731   done
11732   CPPFLAGS="$old_CPPFLAGS"
11733 fi
11734
11735 if test "x$smart_include" = "x"; then
11736   for _prefix in $smart_prefix; do
11737     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/regex.h" >&5
11738 $as_echo_n "checking for ${_prefix}/regex.h... " >&6; }
11739
11740     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11741 /* end confdefs.h.  */
11742
11743                     #include <regex.h>
11744 int
11745 main ()
11746 {
11747 int a = 1;
11748   ;
11749   return 0;
11750 }
11751 _ACEOF
11752 if ac_fn_c_try_compile "$LINENO"; then :
11753
11754                      smart_include="-isystem ${_prefix}/"
11755                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11756 $as_echo "yes" >&6; }
11757                      break
11758
11759 else
11760
11761                      smart_include=
11762                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11763 $as_echo "no" >&6; }
11764
11765 fi
11766 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11767   done
11768 fi
11769
11770 if test "x$smart_include" = "x"; then
11771     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h" >&5
11772 $as_echo_n "checking for regex.h... " >&6; }
11773
11774     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11775 /* end confdefs.h.  */
11776
11777                     #include <regex.h>
11778 int
11779 main ()
11780 {
11781 int a = 1;
11782   ;
11783   return 0;
11784 }
11785 _ACEOF
11786 if ac_fn_c_try_compile "$LINENO"; then :
11787
11788                      smart_include=" "
11789                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11790 $as_echo "yes" >&6; }
11791                      break
11792
11793 else
11794
11795                      smart_include=
11796                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11797 $as_echo "no" >&6; }
11798
11799 fi
11800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11801 fi
11802
11803 if test "x$smart_include" = "x"; then
11804
11805   for prefix in $smart_prefix; do
11806
11807
11808 if test "x$LOCATE" != "x"; then
11809         DIRS=
11810   file="${_prefix}/${1}"
11811
11812   for x in `${LOCATE} $file 2>/dev/null`; do
11813                                         base=`echo $x | sed "s%/${file}%%"`
11814     if test "x$x" = "x$base"; then
11815       continue;
11816     fi
11817
11818     dir=`${DIRNAME} $x 2>/dev/null`
11819                 exclude=`echo ${dir} | ${GREP} /home`
11820     if test "x$exclude" != "x"; then
11821       continue
11822     fi
11823
11824                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
11825     if test "x$already" = "x"; then
11826       DIRS="$DIRS $dir"
11827     fi
11828   done
11829 fi
11830
11831 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
11832
11833   done
11834
11835
11836 if test "x$LOCATE" != "x"; then
11837         DIRS=
11838   file=regex.h
11839
11840   for x in `${LOCATE} $file 2>/dev/null`; do
11841                                         base=`echo $x | sed "s%/${file}%%"`
11842     if test "x$x" = "x$base"; then
11843       continue;
11844     fi
11845
11846     dir=`${DIRNAME} $x 2>/dev/null`
11847                 exclude=`echo ${dir} | ${GREP} /home`
11848     if test "x$exclude" != "x"; then
11849       continue
11850     fi
11851
11852                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
11853     if test "x$already" = "x"; then
11854       DIRS="$DIRS $dir"
11855     fi
11856   done
11857 fi
11858
11859 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
11860
11861
11862   for try in $_smart_include_dir; do
11863     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h in $try" >&5
11864 $as_echo_n "checking for regex.h in $try... " >&6; }
11865     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11866     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11867 /* end confdefs.h.  */
11868
11869                     #include <regex.h>
11870 int
11871 main ()
11872 {
11873 int a = 1;
11874   ;
11875   return 0;
11876 }
11877 _ACEOF
11878 if ac_fn_c_try_compile "$LINENO"; then :
11879
11880                      smart_include="-isystem $try"
11881                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11882 $as_echo "yes" >&6; }
11883                      break
11884
11885 else
11886
11887                      smart_include=
11888                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11889 $as_echo "no" >&6; }
11890
11891 fi
11892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11893   done
11894   CPPFLAGS="$old_CPPFLAGS"
11895 fi
11896
11897 if test "x$smart_include" != "x"; then
11898   eval "ac_cv_header_$ac_safe=yes"
11899   CPPFLAGS="$smart_include $old_CPPFLAGS"
11900   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
11901 fi
11902
11903 smart_prefix=
11904
11905   if test "x$ac_cv_header_regex_h" = "xyes"; then
11906     REGEX=yes
11907     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extended regular expressions" >&5
11908 $as_echo_n "checking for extended regular expressions... " >&6; }
11909     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11910 /* end confdefs.h.  */
11911
11912         #include <regex.h>
11913         #ifdef REG_EXTENDED
11914         yes
11915         #endif
11916
11917 _ACEOF
11918 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11919   $EGREP "yes" >/dev/null 2>&1; then :
11920
11921         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11922 $as_echo "yes" >&6; }
11923
11924 $as_echo "#define HAVE_REG_EXTENDED 1" >>confdefs.h
11925
11926
11927 else
11928
11929         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11930 $as_echo "no" >&6; }
11931
11932
11933 fi
11934 rm -f conftest*
11935
11936
11937                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regcomp in -lregex" >&5
11938 $as_echo_n "checking for regcomp in -lregex... " >&6; }
11939 if ${ac_cv_lib_regex_regcomp+:} false; then :
11940   $as_echo_n "(cached) " >&6
11941 else
11942   ac_check_lib_save_LIBS=$LIBS
11943 LIBS="-lregex  $LIBS"
11944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11945 /* end confdefs.h.  */
11946
11947 /* Override any GCC internal prototype to avoid an error.
11948    Use char because int might match the return type of a GCC
11949    builtin and then its argument prototype would still apply.  */
11950 #ifdef __cplusplus
11951 extern "C"
11952 #endif
11953 char regcomp ();
11954 int
11955 main ()
11956 {
11957 return regcomp ();
11958   ;
11959   return 0;
11960 }
11961 _ACEOF
11962 if ac_fn_c_try_link "$LINENO"; then :
11963   ac_cv_lib_regex_regcomp=yes
11964 else
11965   ac_cv_lib_regex_regcomp=no
11966 fi
11967 rm -f core conftest.err conftest.$ac_objext \
11968     conftest$ac_exeext conftest.$ac_ext
11969 LIBS=$ac_check_lib_save_LIBS
11970 fi
11971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_regex_regcomp" >&5
11972 $as_echo "$ac_cv_lib_regex_regcomp" >&6; }
11973 if test "x$ac_cv_lib_regex_regcomp" = xyes; then :
11974
11975         LIBS="-lregex $LIBS"
11976
11977
11978 fi
11979
11980
11981                     for ac_func in \
11982       regncomp \
11983       regnexec
11984
11985 do :
11986   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11987 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11988 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11989   cat >>confdefs.h <<_ACEOF
11990 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11991 _ACEOF
11992
11993 fi
11994 done
11995
11996     if test x"$ac_cv_func_regncomp" = x"yes" && test  x"$ac_cv_func_regnexec" = x"yes"; then
11997
11998 $as_echo "#define HAVE_BINSAFE_REGEX 1" >>confdefs.h
11999
12000     fi
12001   fi
12002 fi
12003
12004 if test "x$REGEX" = "xyes"; then
12005
12006 $as_echo "#define HAVE_REGEX 1" >>confdefs.h
12007
12008 fi
12009
12010
12011 $as_echo "#define GNUSTYLE 1" >>confdefs.h
12012
12013
12014
12015 $as_echo "#define SYSVSTYLE 2" >>confdefs.h
12016
12017
12018
12019 $as_echo "#define BSDSTYLE 3" >>confdefs.h
12020
12021
12022 gethostbyaddrrstyle=""
12023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyaddr_r() syntax" >&5
12024 $as_echo_n "checking gethostbyaddr_r() syntax... " >&6; }
12025 case "$host" in
12026   *-freebsd*)
12027                             ac_fn_c_check_decl "$LINENO" "gethostbyaddr_r" "ac_cv_have_decl_gethostbyaddr_r" "
12028         #ifdef HAVE_NETDB_H
12029         #include <netdb.h>
12030         #endif
12031
12032 "
12033 if test "x$ac_cv_have_decl_gethostbyaddr_r" = xyes; then :
12034   ac_have_decl=1
12035 else
12036   ac_have_decl=0
12037 fi
12038
12039 cat >>confdefs.h <<_ACEOF
12040 #define HAVE_DECL_GETHOSTBYADDR_R $ac_have_decl
12041 _ACEOF
12042 if test $ac_have_decl = 1; then :
12043
12044 else
12045
12046
12047 $as_echo "#define GETHOSTBYADDRRSTYLE BSDSTYLE" >>confdefs.h
12048
12049         gethostbyaddrrstyle=BSD
12050         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: FreeBSD overridden to BSD-style" >&5
12051 $as_echo "$as_me: WARNING: FreeBSD overridden to BSD-style" >&2;}
12052
12053 fi
12054
12055     ;;
12056 esac
12057
12058 if test "x$gethostbyaddrrstyle" = "x"; then
12059   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12060 /* end confdefs.h.  */
12061
12062       #include <stdio.h>
12063       #include <netdb.h>
12064
12065 int
12066 main ()
12067 {
12068  gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL, NULL)
12069   ;
12070   return 0;
12071 }
12072 _ACEOF
12073 if ac_fn_c_try_link "$LINENO"; then :
12074
12075
12076 $as_echo "#define GETHOSTBYADDRRSTYLE GNUSTYLE" >>confdefs.h
12077
12078       gethostbyaddrrstyle=GNU
12079
12080
12081 fi
12082 rm -f core conftest.err conftest.$ac_objext \
12083     conftest$ac_exeext conftest.$ac_ext
12084 fi
12085
12086 if test "x$gethostbyaddrrstyle" = "x"; then
12087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12088 /* end confdefs.h.  */
12089
12090       #include <stdio.h>
12091       #include <netdb.h>
12092
12093 int
12094 main ()
12095 {
12096  gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL)
12097   ;
12098   return 0;
12099 }
12100 _ACEOF
12101 if ac_fn_c_try_link "$LINENO"; then :
12102
12103
12104 $as_echo "#define GETHOSTBYADDRRSTYLE SYSVSTYLE" >>confdefs.h
12105
12106       gethostbyaddrrstyle=SYSV
12107
12108
12109 fi
12110 rm -f core conftest.err conftest.$ac_objext \
12111     conftest$ac_exeext conftest.$ac_ext
12112 fi
12113
12114
12115 if test "x$gethostbyaddrrstyle" = "x"; then
12116   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12117 /* end confdefs.h.  */
12118
12119       #include <stdio.h>
12120       #include <netdb.h>
12121
12122 int
12123 main ()
12124 {
12125  gethostbyaddr(NULL, 0, 0)
12126   ;
12127   return 0;
12128 }
12129 _ACEOF
12130 if ac_fn_c_try_link "$LINENO"; then :
12131
12132
12133 $as_echo "#define GETHOSTBYADDRRSTYLE BSDSTYLE" >>confdefs.h
12134
12135       gethostbyaddrrstyle=BSD
12136
12137
12138 fi
12139 rm -f core conftest.err conftest.$ac_objext \
12140     conftest$ac_exeext conftest.$ac_ext
12141 fi
12142
12143 if test "x$gethostbyaddrrstyle" = "x"; then
12144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none!  It must not exist, here." >&5
12145 $as_echo "none!  It must not exist, here." >&6; }
12146 else
12147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${gethostbyaddrrstyle}-style" >&5
12148 $as_echo "${gethostbyaddrrstyle}-style" >&6; }
12149 fi
12150
12151 if test "x$gethostbyaddrrstyle" = "xBSD"; then
12152   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** " >&5
12153 $as_echo "$as_me: WARNING:  ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** " >&2;}
12154 fi
12155
12156 gethostbynamerstyle=""
12157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r() syntax" >&5
12158 $as_echo_n "checking gethostbyname_r() syntax... " >&6; }
12159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12160 /* end confdefs.h.  */
12161
12162     #include <stdio.h>
12163     #include <netdb.h>
12164
12165 int
12166 main ()
12167 {
12168  gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL)
12169   ;
12170   return 0;
12171 }
12172 _ACEOF
12173 if ac_fn_c_try_link "$LINENO"; then :
12174
12175
12176 $as_echo "#define GETHOSTBYNAMERSTYLE GNUSTYLE" >>confdefs.h
12177
12178     gethostbynamerstyle=GNU
12179
12180
12181 fi
12182 rm -f core conftest.err conftest.$ac_objext \
12183     conftest$ac_exeext conftest.$ac_ext
12184
12185 if test "x$gethostbynamerstyle" = "x"; then
12186   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12187 /* end confdefs.h.  */
12188
12189       #include <stdio.h>
12190       #include <netdb.h>
12191
12192 int
12193 main ()
12194 {
12195  gethostbyname_r(NULL, NULL, NULL, 0, NULL)
12196   ;
12197   return 0;
12198 }
12199 _ACEOF
12200 if ac_fn_c_try_link "$LINENO"; then :
12201
12202
12203 $as_echo "#define GETHOSTBYNAMERSTYLE SYSVSTYLE" >>confdefs.h
12204
12205       gethostbynamerstyle=SYSV
12206
12207
12208 fi
12209 rm -f core conftest.err conftest.$ac_objext \
12210     conftest$ac_exeext conftest.$ac_ext
12211 fi
12212
12213 if test "x$gethostbynamerstyle" = "x"; then
12214   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12215 /* end confdefs.h.  */
12216
12217       #include <stdio.h>
12218       #include <netdb.h>
12219
12220 int
12221 main ()
12222 {
12223  gethostbyname(NULL)
12224   ;
12225   return 0;
12226 }
12227 _ACEOF
12228 if ac_fn_c_try_link "$LINENO"; then :
12229
12230
12231 $as_echo "#define GETHOSTBYNAMERSTYLE BSDSTYLE" >>confdefs.h
12232
12233       gethostbynamerstyle=BSD
12234
12235
12236 fi
12237 rm -f core conftest.err conftest.$ac_objext \
12238     conftest$ac_exeext conftest.$ac_ext
12239 fi
12240
12241 if test "x$gethostbynamerstyle" = "x"; then
12242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none!  It must not exist, here." >&5
12243 $as_echo "none!  It must not exist, here." >&6; }
12244 else
12245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${gethostbynamerstyle}-style" >&5
12246 $as_echo "${gethostbynamerstyle}-style" >&6; }
12247 fi
12248
12249 if test "x$gethostbynamerstyle" = "xBSD"; then
12250   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  ****** BSD-style gethostbyname might NOT be thread-safe! ****** " >&5
12251 $as_echo "$as_me: WARNING:  ****** BSD-style gethostbyname might NOT be thread-safe! ****** " >&2;}
12252 fi
12253
12254 if test "x$ac_cv_header_pwd_h" = "xyes"; then
12255   { $as_echo "$as_me:${as_lineno-$LINENO}: checking getpwnam_r" >&5
12256 $as_echo_n "checking getpwnam_r... " >&6; }
12257   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12258 /* end confdefs.h.  */
12259
12260       #include <stdlib.h>
12261       #include <sys/types.h>
12262       #include <pwd.h>
12263
12264 int
12265 main ()
12266 {
12267  getpwnam_r(NULL, NULL, NULL, 0, NULL)
12268   ;
12269   return 0;
12270 }
12271 _ACEOF
12272 if ac_fn_c_try_link "$LINENO"; then :
12273
12274       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12275 $as_echo "yes" >&6; }
12276
12277 $as_echo "#define HAVE_GETPWNAM_R 1" >>confdefs.h
12278
12279
12280 else
12281
12282         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12283 $as_echo "no" >&6; }
12284
12285
12286 fi
12287 rm -f core conftest.err conftest.$ac_objext \
12288     conftest$ac_exeext conftest.$ac_ext
12289 fi
12290
12291 if test "x$ac_cv_header_grp_h" = "xyes"; then
12292   { $as_echo "$as_me:${as_lineno-$LINENO}: checking getgrnam_r" >&5
12293 $as_echo_n "checking getgrnam_r... " >&6; }
12294   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12295 /* end confdefs.h.  */
12296
12297       #include <stdlib.h>
12298       #include <sys/types.h>
12299       #include <grp.h>
12300
12301 int
12302 main ()
12303 {
12304  getgrnam_r(NULL, NULL, NULL, 0, NULL)
12305   ;
12306   return 0;
12307 }
12308 _ACEOF
12309 if ac_fn_c_try_link "$LINENO"; then :
12310
12311       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12312 $as_echo "yes" >&6; }
12313
12314 $as_echo "#define HAVE_GETGRNAM_R 1" >>confdefs.h
12315
12316
12317 else
12318
12319         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12320 $as_echo "no" >&6; }
12321
12322
12323 fi
12324 rm -f core conftest.err conftest.$ac_objext \
12325     conftest$ac_exeext conftest.$ac_ext
12326 fi
12327
12328
12329
12330 $as_echo "#define POSIXSTYLE 1" >>confdefs.h
12331
12332
12333 $as_echo "#define SOLARISSTYLE 2" >>confdefs.h
12334
12335 ctimerstyle=""
12336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ctime_r() syntax" >&5
12337 $as_echo_n "checking ctime_r() syntax... " >&6; }
12338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12339 /* end confdefs.h.  */
12340
12341     #include <time.h>
12342
12343 int
12344 main ()
12345 {
12346  ctime_r(NULL, NULL, 0)
12347   ;
12348   return 0;
12349 }
12350 _ACEOF
12351 if ac_fn_c_try_link "$LINENO"; then :
12352
12353
12354 $as_echo "#define CTIMERSTYLE SOLARISSTYLE" >>confdefs.h
12355
12356     ctimerstyle="SOLARIS"
12357
12358
12359 fi
12360 rm -f core conftest.err conftest.$ac_objext \
12361     conftest$ac_exeext conftest.$ac_ext
12362
12363 if test "x$ctimerstyle" = "x"; then
12364   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12365 /* end confdefs.h.  */
12366
12367       #include <time.h>
12368
12369 int
12370 main ()
12371 {
12372  ctime_r(NULL, NULL)
12373   ;
12374   return 0;
12375 }
12376 _ACEOF
12377 if ac_fn_c_try_link "$LINENO"; then :
12378
12379
12380 $as_echo "#define CTIMERSTYLE POSIXSTYLE" >>confdefs.h
12381
12382       ctimerstyle="POSIX"
12383
12384
12385 fi
12386 rm -f core conftest.err conftest.$ac_objext \
12387     conftest$ac_exeext conftest.$ac_ext
12388 fi
12389
12390 if test "x$ctimerstyle" = "x"; then
12391     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none!  It must not exist, here." >&5
12392 $as_echo "none!  It must not exist, here." >&6; }
12393 else
12394     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ctimerstyle}-style" >&5
12395 $as_echo "${ctimerstyle}-style" >&6; }
12396 fi
12397
12398 HOSTINFO=$host
12399
12400
12401
12402 top_builddir=`pwd`
12403 export top_builddir
12404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: top_builddir=$top_builddir" >&5
12405 $as_echo "top_builddir=$top_builddir" >&6; }
12406
12407
12408
12409
12410 if test "x$EXPERIMENTAL" = "xyes"; then
12411   for foo in `ls -1 "${srcdir}"/src/modules | grep rlm_`; do
12412     MODULES="$MODULES $foo"
12413   done
12414 else
12415             for foo in `cat "${srcdir}"/src/modules/stable`; do
12416       MODULES="$MODULES $foo"
12417    done
12418 fi
12419
12420 mysubdirs=""
12421 for bar in $MODULES; do
12422   if test -f "${srcdir}"/src/modules/$bar/configure; then
12423     mysubdirs="$mysubdirs src/modules/$bar"
12424   fi
12425 done
12426
12427
12428
12429 subdirs="$subdirs $mysubdirs"
12430
12431
12432
12433 if test "x$werror" == "xyes"; then
12434   CFLAGS="-Werror $CFLAGS"
12435 fi
12436
12437 ac_config_commands="$ac_config_commands stamp-h"
12438
12439 ac_config_commands="$ac_config_commands build-radpaths-h"
12440
12441 ac_config_commands="$ac_config_commands main-chmod"
12442
12443 ac_config_commands="$ac_config_commands scripts-chmod"
12444
12445
12446
12447
12448
12449
12450 USE_STATIC_LIBS="yes"
12451
12452
12453
12454
12455   unset ac_cv_env_LIBS_set
12456   unset ac_cv_env_LIBS_value
12457
12458   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"
12459
12460 cat >confcache <<\_ACEOF
12461 # This file is a shell script that caches the results of configure
12462 # tests run on this system so they can be shared between configure
12463 # scripts and configure runs, see configure's option --config-cache.
12464 # It is not useful on other systems.  If it contains results you don't
12465 # want to keep, you may remove or edit it.
12466 #
12467 # config.status only pays attention to the cache file if you give it
12468 # the --recheck option to rerun configure.
12469 #
12470 # `ac_cv_env_foo' variables (set or unset) will be overridden when
12471 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12472 # following values.
12473
12474 _ACEOF
12475
12476 # The following way of writing the cache mishandles newlines in values,
12477 # but we know of no workaround that is simple, portable, and efficient.
12478 # So, we kill variables containing newlines.
12479 # Ultrix sh set writes to stderr and can't be redirected directly,
12480 # and sets the high bit in the cache file unless we assign to the vars.
12481 (
12482   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
12483     eval ac_val=\$$ac_var
12484     case $ac_val in #(
12485     *${as_nl}*)
12486       case $ac_var in #(
12487       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
12488 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
12489       esac
12490       case $ac_var in #(
12491       _ | IFS | as_nl) ;; #(
12492       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
12493       *) { eval $ac_var=; unset $ac_var;} ;;
12494       esac ;;
12495     esac
12496   done
12497
12498   (set) 2>&1 |
12499     case $as_nl`(ac_space=' '; set) 2>&1` in #(
12500     *${as_nl}ac_space=\ *)
12501       # `set' does not quote correctly, so add quotes: double-quote
12502       # substitution turns \\\\ into \\, and sed turns \\ into \.
12503       sed -n \
12504         "s/'/'\\\\''/g;
12505           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12506       ;; #(
12507     *)
12508       # `set' quotes correctly as required by POSIX, so do not add quotes.
12509       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
12510       ;;
12511     esac |
12512     sort
12513 ) |
12514   sed '
12515      /^ac_cv_env_/b end
12516      t clear
12517      :clear
12518      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12519      t end
12520      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12521      :end' >>confcache
12522 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
12523   if test -w "$cache_file"; then
12524     if test "x$cache_file" != "x/dev/null"; then
12525       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
12526 $as_echo "$as_me: updating cache $cache_file" >&6;}
12527       if test ! -f "$cache_file" || test -h "$cache_file"; then
12528         cat confcache >"$cache_file"
12529       else
12530         case $cache_file in #(
12531         */* | ?:*)
12532           mv -f confcache "$cache_file"$$ &&
12533           mv -f "$cache_file"$$ "$cache_file" ;; #(
12534         *)
12535           mv -f confcache "$cache_file" ;;
12536         esac
12537       fi
12538     fi
12539   else
12540     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
12541 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
12542   fi
12543 fi
12544 rm -f confcache
12545
12546 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12547 # Let make expand exec_prefix.
12548 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12549
12550 DEFS=-DHAVE_CONFIG_H
12551
12552 ac_libobjs=
12553 ac_ltlibobjs=
12554 U=
12555 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
12556   # 1. Remove the extension, and $U if already installed.
12557   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
12558   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
12559   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
12560   #    will be set to the directory where LIBOBJS objects are built.
12561   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
12562   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
12563 done
12564 LIBOBJS=$ac_libobjs
12565
12566 LTLIBOBJS=$ac_ltlibobjs
12567
12568
12569
12570
12571 : "${CONFIG_STATUS=./config.status}"
12572 ac_write_fail=0
12573 ac_clean_files_save=$ac_clean_files
12574 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12575 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
12576 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
12577 as_write_fail=0
12578 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
12579 #! $SHELL
12580 # Generated by $as_me.
12581 # Run this file to recreate the current configuration.
12582 # Compiler output produced by configure, useful for debugging
12583 # configure, is in config.log if it exists.
12584
12585 debug=false
12586 ac_cs_recheck=false
12587 ac_cs_silent=false
12588
12589 SHELL=\${CONFIG_SHELL-$SHELL}
12590 export SHELL
12591 _ASEOF
12592 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
12593 ## -------------------- ##
12594 ## M4sh Initialization. ##
12595 ## -------------------- ##
12596
12597 # Be more Bourne compatible
12598 DUALCASE=1; export DUALCASE # for MKS sh
12599 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
12600   emulate sh
12601   NULLCMD=:
12602   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
12603   # is contrary to our usage.  Disable this feature.
12604   alias -g '${1+"$@"}'='"$@"'
12605   setopt NO_GLOB_SUBST
12606 else
12607   case `(set -o) 2>/dev/null` in #(
12608   *posix*) :
12609     set -o posix ;; #(
12610   *) :
12611      ;;
12612 esac
12613 fi
12614
12615
12616 as_nl='
12617 '
12618 export as_nl
12619 # Printing a long string crashes Solaris 7 /usr/bin/printf.
12620 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
12621 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
12622 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
12623 # Prefer a ksh shell builtin over an external printf program on Solaris,
12624 # but without wasting forks for bash or zsh.
12625 if test -z "$BASH_VERSION$ZSH_VERSION" \
12626     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
12627   as_echo='print -r --'
12628   as_echo_n='print -rn --'
12629 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
12630   as_echo='printf %s\n'
12631   as_echo_n='printf %s'
12632 else
12633   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
12634     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
12635     as_echo_n='/usr/ucb/echo -n'
12636   else
12637     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
12638     as_echo_n_body='eval
12639       arg=$1;
12640       case $arg in #(
12641       *"$as_nl"*)
12642         expr "X$arg" : "X\\(.*\\)$as_nl";
12643         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
12644       esac;
12645       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
12646     '
12647     export as_echo_n_body
12648     as_echo_n='sh -c $as_echo_n_body as_echo'
12649   fi
12650   export as_echo_body
12651   as_echo='sh -c $as_echo_body as_echo'
12652 fi
12653
12654 # The user is always right.
12655 if test "${PATH_SEPARATOR+set}" != set; then
12656   PATH_SEPARATOR=:
12657   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
12658     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
12659       PATH_SEPARATOR=';'
12660   }
12661 fi
12662
12663
12664 # IFS
12665 # We need space, tab and new line, in precisely that order.  Quoting is
12666 # there to prevent editors from complaining about space-tab.
12667 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
12668 # splitting by setting IFS to empty value.)
12669 IFS=" ""        $as_nl"
12670
12671 # Find who we are.  Look in the path if we contain no directory separator.
12672 as_myself=
12673 case $0 in #((
12674   *[\\/]* ) as_myself=$0 ;;
12675   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12676 for as_dir in $PATH
12677 do
12678   IFS=$as_save_IFS
12679   test -z "$as_dir" && as_dir=.
12680     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
12681   done
12682 IFS=$as_save_IFS
12683
12684      ;;
12685 esac
12686 # We did not find ourselves, most probably we were run as `sh COMMAND'
12687 # in which case we are not to be found in the path.
12688 if test "x$as_myself" = x; then
12689   as_myself=$0
12690 fi
12691 if test ! -f "$as_myself"; then
12692   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
12693   exit 1
12694 fi
12695
12696 # Unset variables that we do not need and which cause bugs (e.g. in
12697 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
12698 # suppresses any "Segmentation fault" message there.  '((' could
12699 # trigger a bug in pdksh 5.2.14.
12700 for as_var in BASH_ENV ENV MAIL MAILPATH
12701 do eval test x\${$as_var+set} = xset \
12702   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
12703 done
12704 PS1='$ '
12705 PS2='> '
12706 PS4='+ '
12707
12708 # NLS nuisances.
12709 LC_ALL=C
12710 export LC_ALL
12711 LANGUAGE=C
12712 export LANGUAGE
12713
12714 # CDPATH.
12715 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
12716
12717
12718 # as_fn_error STATUS ERROR [LINENO LOG_FD]
12719 # ----------------------------------------
12720 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
12721 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
12722 # script with STATUS, using 1 if that was 0.
12723 as_fn_error ()
12724 {
12725   as_status=$1; test $as_status -eq 0 && as_status=1
12726   if test "$4"; then
12727     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
12728     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
12729   fi
12730   $as_echo "$as_me: error: $2" >&2
12731   as_fn_exit $as_status
12732 } # as_fn_error
12733
12734
12735 # as_fn_set_status STATUS
12736 # -----------------------
12737 # Set $? to STATUS, without forking.
12738 as_fn_set_status ()
12739 {
12740   return $1
12741 } # as_fn_set_status
12742
12743 # as_fn_exit STATUS
12744 # -----------------
12745 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
12746 as_fn_exit ()
12747 {
12748   set +e
12749   as_fn_set_status $1
12750   exit $1
12751 } # as_fn_exit
12752
12753 # as_fn_unset VAR
12754 # ---------------
12755 # Portably unset VAR.
12756 as_fn_unset ()
12757 {
12758   { eval $1=; unset $1;}
12759 }
12760 as_unset=as_fn_unset
12761 # as_fn_append VAR VALUE
12762 # ----------------------
12763 # Append the text in VALUE to the end of the definition contained in VAR. Take
12764 # advantage of any shell optimizations that allow amortized linear growth over
12765 # repeated appends, instead of the typical quadratic growth present in naive
12766 # implementations.
12767 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
12768   eval 'as_fn_append ()
12769   {
12770     eval $1+=\$2
12771   }'
12772 else
12773   as_fn_append ()
12774   {
12775     eval $1=\$$1\$2
12776   }
12777 fi # as_fn_append
12778
12779 # as_fn_arith ARG...
12780 # ------------------
12781 # Perform arithmetic evaluation on the ARGs, and store the result in the
12782 # global $as_val. Take advantage of shells that can avoid forks. The arguments
12783 # must be portable across $(()) and expr.
12784 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
12785   eval 'as_fn_arith ()
12786   {
12787     as_val=$(( $* ))
12788   }'
12789 else
12790   as_fn_arith ()
12791   {
12792     as_val=`expr "$@" || test $? -eq 1`
12793   }
12794 fi # as_fn_arith
12795
12796
12797 if expr a : '\(a\)' >/dev/null 2>&1 &&
12798    test "X`expr 00001 : '.*\(...\)'`" = X001; then
12799   as_expr=expr
12800 else
12801   as_expr=false
12802 fi
12803
12804 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
12805   as_basename=basename
12806 else
12807   as_basename=false
12808 fi
12809
12810 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
12811   as_dirname=dirname
12812 else
12813   as_dirname=false
12814 fi
12815
12816 as_me=`$as_basename -- "$0" ||
12817 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
12818          X"$0" : 'X\(//\)$' \| \
12819          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
12820 $as_echo X/"$0" |
12821     sed '/^.*\/\([^/][^/]*\)\/*$/{
12822             s//\1/
12823             q
12824           }
12825           /^X\/\(\/\/\)$/{
12826             s//\1/
12827             q
12828           }
12829           /^X\/\(\/\).*/{
12830             s//\1/
12831             q
12832           }
12833           s/.*/./; q'`
12834
12835 # Avoid depending upon Character Ranges.
12836 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12837 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
12838 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
12839 as_cr_digits='0123456789'
12840 as_cr_alnum=$as_cr_Letters$as_cr_digits
12841
12842 ECHO_C= ECHO_N= ECHO_T=
12843 case `echo -n x` in #(((((
12844 -n*)
12845   case `echo 'xy\c'` in
12846   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
12847   xy)  ECHO_C='\c';;
12848   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
12849        ECHO_T=' ';;
12850   esac;;
12851 *)
12852   ECHO_N='-n';;
12853 esac
12854
12855 rm -f conf$$ conf$$.exe conf$$.file
12856 if test -d conf$$.dir; then
12857   rm -f conf$$.dir/conf$$.file
12858 else
12859   rm -f conf$$.dir
12860   mkdir conf$$.dir 2>/dev/null
12861 fi
12862 if (echo >conf$$.file) 2>/dev/null; then
12863   if ln -s conf$$.file conf$$ 2>/dev/null; then
12864     as_ln_s='ln -s'
12865     # ... but there are two gotchas:
12866     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
12867     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
12868     # In both cases, we have to default to `cp -pR'.
12869     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
12870       as_ln_s='cp -pR'
12871   elif ln conf$$.file conf$$ 2>/dev/null; then
12872     as_ln_s=ln
12873   else
12874     as_ln_s='cp -pR'
12875   fi
12876 else
12877   as_ln_s='cp -pR'
12878 fi
12879 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
12880 rmdir conf$$.dir 2>/dev/null
12881
12882
12883 # as_fn_mkdir_p
12884 # -------------
12885 # Create "$as_dir" as a directory, including parents if necessary.
12886 as_fn_mkdir_p ()
12887 {
12888
12889   case $as_dir in #(
12890   -*) as_dir=./$as_dir;;
12891   esac
12892   test -d "$as_dir" || eval $as_mkdir_p || {
12893     as_dirs=
12894     while :; do
12895       case $as_dir in #(
12896       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
12897       *) as_qdir=$as_dir;;
12898       esac
12899       as_dirs="'$as_qdir' $as_dirs"
12900       as_dir=`$as_dirname -- "$as_dir" ||
12901 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12902          X"$as_dir" : 'X\(//\)[^/]' \| \
12903          X"$as_dir" : 'X\(//\)$' \| \
12904          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
12905 $as_echo X"$as_dir" |
12906     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12907             s//\1/
12908             q
12909           }
12910           /^X\(\/\/\)[^/].*/{
12911             s//\1/
12912             q
12913           }
12914           /^X\(\/\/\)$/{
12915             s//\1/
12916             q
12917           }
12918           /^X\(\/\).*/{
12919             s//\1/
12920             q
12921           }
12922           s/.*/./; q'`
12923       test -d "$as_dir" && break
12924     done
12925     test -z "$as_dirs" || eval "mkdir $as_dirs"
12926   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
12927
12928
12929 } # as_fn_mkdir_p
12930 if mkdir -p . 2>/dev/null; then
12931   as_mkdir_p='mkdir -p "$as_dir"'
12932 else
12933   test -d ./-p && rmdir ./-p
12934   as_mkdir_p=false
12935 fi
12936
12937
12938 # as_fn_executable_p FILE
12939 # -----------------------
12940 # Test if FILE is an executable regular file.
12941 as_fn_executable_p ()
12942 {
12943   test -f "$1" && test -x "$1"
12944 } # as_fn_executable_p
12945 as_test_x='test -x'
12946 as_executable_p=as_fn_executable_p
12947
12948 # Sed expression to map a string onto a valid CPP name.
12949 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
12950
12951 # Sed expression to map a string onto a valid variable name.
12952 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
12953
12954
12955 exec 6>&1
12956 ## ----------------------------------- ##
12957 ## Main body of $CONFIG_STATUS script. ##
12958 ## ----------------------------------- ##
12959 _ASEOF
12960 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
12961
12962 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12963 # Save the log message, to keep $0 and so on meaningful, and to
12964 # report actual input values of CONFIG_FILES etc. instead of their
12965 # values after options handling.
12966 ac_log="
12967 This file was extended by freeradius $as_me $Id$, which was
12968 generated by GNU Autoconf 2.69.  Invocation command line was
12969
12970   CONFIG_FILES    = $CONFIG_FILES
12971   CONFIG_HEADERS  = $CONFIG_HEADERS
12972   CONFIG_LINKS    = $CONFIG_LINKS
12973   CONFIG_COMMANDS = $CONFIG_COMMANDS
12974   $ $0 $@
12975
12976 on `(hostname || uname -n) 2>/dev/null | sed 1q`
12977 "
12978
12979 _ACEOF
12980
12981 case $ac_config_files in *"
12982 "*) set x $ac_config_files; shift; ac_config_files=$*;;
12983 esac
12984
12985 case $ac_config_headers in *"
12986 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
12987 esac
12988
12989
12990 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12991 # Files that config.status was made for.
12992 config_files="$ac_config_files"
12993 config_headers="$ac_config_headers"
12994 config_commands="$ac_config_commands"
12995
12996 _ACEOF
12997
12998 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12999 ac_cs_usage="\
13000 \`$as_me' instantiates files and other configuration actions
13001 from templates according to the current configuration.  Unless the files
13002 and actions are specified as TAGs, all are instantiated by default.
13003
13004 Usage: $0 [OPTION]... [TAG]...
13005
13006   -h, --help       print this help, then exit
13007   -V, --version    print version number and configuration settings, then exit
13008       --config     print configuration, then exit
13009   -q, --quiet, --silent
13010                    do not print progress messages
13011   -d, --debug      don't remove temporary files
13012       --recheck    update $as_me by reconfiguring in the same conditions
13013       --file=FILE[:TEMPLATE]
13014                    instantiate the configuration file FILE
13015       --header=FILE[:TEMPLATE]
13016                    instantiate the configuration header FILE
13017
13018 Configuration files:
13019 $config_files
13020
13021 Configuration headers:
13022 $config_headers
13023
13024 Configuration commands:
13025 $config_commands
13026
13027 Report bugs to <http://bugs.freeradius.org>.
13028 freeradius home page: <http://www.freeradius.org>."
13029
13030 _ACEOF
13031 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13032 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
13033 ac_cs_version="\\
13034 freeradius config.status $Id$
13035 configured by $0, generated by GNU Autoconf 2.69,
13036   with options \\"\$ac_cs_config\\"
13037
13038 Copyright (C) 2012 Free Software Foundation, Inc.
13039 This config.status script is free software; the Free Software Foundation
13040 gives unlimited permission to copy, distribute and modify it."
13041
13042 ac_pwd='$ac_pwd'
13043 srcdir='$srcdir'
13044 test -n "\$AWK" || AWK=awk
13045 _ACEOF
13046
13047 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13048 # The default lists apply if the user does not specify any file.
13049 ac_need_defaults=:
13050 while test $# != 0
13051 do
13052   case $1 in
13053   --*=?*)
13054     ac_option=`expr "X$1" : 'X\([^=]*\)='`
13055     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
13056     ac_shift=:
13057     ;;
13058   --*=)
13059     ac_option=`expr "X$1" : 'X\([^=]*\)='`
13060     ac_optarg=
13061     ac_shift=:
13062     ;;
13063   *)
13064     ac_option=$1
13065     ac_optarg=$2
13066     ac_shift=shift
13067     ;;
13068   esac
13069
13070   case $ac_option in
13071   # Handling of the options.
13072   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13073     ac_cs_recheck=: ;;
13074   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
13075     $as_echo "$ac_cs_version"; exit ;;
13076   --config | --confi | --conf | --con | --co | --c )
13077     $as_echo "$ac_cs_config"; exit ;;
13078   --debug | --debu | --deb | --de | --d | -d )
13079     debug=: ;;
13080   --file | --fil | --fi | --f )
13081     $ac_shift
13082     case $ac_optarg in
13083     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
13084     '') as_fn_error $? "missing file argument" ;;
13085     esac
13086     as_fn_append CONFIG_FILES " '$ac_optarg'"
13087     ac_need_defaults=false;;
13088   --header | --heade | --head | --hea )
13089     $ac_shift
13090     case $ac_optarg in
13091     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
13092     esac
13093     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
13094     ac_need_defaults=false;;
13095   --he | --h)
13096     # Conflict between --help and --header
13097     as_fn_error $? "ambiguous option: \`$1'
13098 Try \`$0 --help' for more information.";;
13099   --help | --hel | -h )
13100     $as_echo "$ac_cs_usage"; exit ;;
13101   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
13102   | -silent | --silent | --silen | --sile | --sil | --si | --s)
13103     ac_cs_silent=: ;;
13104
13105   # This is an error.
13106   -*) as_fn_error $? "unrecognized option: \`$1'
13107 Try \`$0 --help' for more information." ;;
13108
13109   *) as_fn_append ac_config_targets " $1"
13110      ac_need_defaults=false ;;
13111
13112   esac
13113   shift
13114 done
13115
13116 ac_configure_extra_args=
13117
13118 if $ac_cs_silent; then
13119   exec 6>/dev/null
13120   ac_configure_extra_args="$ac_configure_extra_args --silent"
13121 fi
13122
13123 _ACEOF
13124 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13125 if \$ac_cs_recheck; then
13126   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
13127   shift
13128   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
13129   CONFIG_SHELL='$SHELL'
13130   export CONFIG_SHELL
13131   exec "\$@"
13132 fi
13133
13134 _ACEOF
13135 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13136 exec 5>>config.log
13137 {
13138   echo
13139   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
13140 ## Running $as_me. ##
13141 _ASBOX
13142   $as_echo "$ac_log"
13143 } >&5
13144
13145 _ACEOF
13146 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13147 _ACEOF
13148
13149 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13150
13151 # Handling of arguments.
13152 for ac_config_target in $ac_config_targets
13153 do
13154   case $ac_config_target in
13155     "src/include/autoconf.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/autoconf.h" ;;
13156     "stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;;
13157     "build-radpaths-h") CONFIG_COMMANDS="$CONFIG_COMMANDS build-radpaths-h" ;;
13158     "main-chmod") CONFIG_COMMANDS="$CONFIG_COMMANDS main-chmod" ;;
13159     "scripts-chmod") CONFIG_COMMANDS="$CONFIG_COMMANDS scripts-chmod" ;;
13160     "./Make.inc") CONFIG_FILES="$CONFIG_FILES ./Make.inc" ;;
13161     "./src/include/build-radpaths-h") CONFIG_FILES="$CONFIG_FILES ./src/include/build-radpaths-h" ;;
13162     "./src/main/radsniff.mk") CONFIG_FILES="$CONFIG_FILES ./src/main/radsniff.mk" ;;
13163     "./src/main/checkrad") CONFIG_FILES="$CONFIG_FILES ./src/main/checkrad" ;;
13164     "./src/main/radlast") CONFIG_FILES="$CONFIG_FILES ./src/main/radlast" ;;
13165     "./src/main/radtest") CONFIG_FILES="$CONFIG_FILES ./src/main/radtest" ;;
13166     "./scripts/rc.radiusd") CONFIG_FILES="$CONFIG_FILES ./scripts/rc.radiusd" ;;
13167     "./scripts/cron/radiusd.cron.daily") CONFIG_FILES="$CONFIG_FILES ./scripts/cron/radiusd.cron.daily" ;;
13168     "./scripts/cron/radiusd.cron.monthly") CONFIG_FILES="$CONFIG_FILES ./scripts/cron/radiusd.cron.monthly" ;;
13169     "./scripts/cryptpasswd") CONFIG_FILES="$CONFIG_FILES ./scripts/cryptpasswd" ;;
13170     "./raddb/radrelay.conf") CONFIG_FILES="$CONFIG_FILES ./raddb/radrelay.conf" ;;
13171     "./raddb/radiusd.conf") CONFIG_FILES="$CONFIG_FILES ./raddb/radiusd.conf" ;;
13172
13173   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
13174   esac
13175 done
13176
13177
13178 # If the user did not use the arguments to specify the items to instantiate,
13179 # then the envvar interface is used.  Set only those that are not.
13180 # We use the long form for the default assignment because of an extremely
13181 # bizarre bug on SunOS 4.1.3.
13182 if $ac_need_defaults; then
13183   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
13184   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
13185   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
13186 fi
13187
13188 # Have a temporary directory for convenience.  Make it in the build tree
13189 # simply because there is no reason against having it here, and in addition,
13190 # creating and moving files from /tmp can sometimes cause problems.
13191 # Hook for its removal unless debugging.
13192 # Note that there is a small window in which the directory will not be cleaned:
13193 # after its creation but before its name has been assigned to `$tmp'.
13194 $debug ||
13195 {
13196   tmp= ac_tmp=
13197   trap 'exit_status=$?
13198   : "${ac_tmp:=$tmp}"
13199   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
13200 ' 0
13201   trap 'as_fn_exit 1' 1 2 13 15
13202 }
13203 # Create a (secure) tmp directory for tmp files.
13204
13205 {
13206   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
13207   test -d "$tmp"
13208 }  ||
13209 {
13210   tmp=./conf$$-$RANDOM
13211   (umask 077 && mkdir "$tmp")
13212 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
13213 ac_tmp=$tmp
13214
13215 # Set up the scripts for CONFIG_FILES section.
13216 # No need to generate them if there are no CONFIG_FILES.
13217 # This happens for instance with `./config.status config.h'.
13218 if test -n "$CONFIG_FILES"; then
13219
13220
13221 ac_cr=`echo X | tr X '\015'`
13222 # On cygwin, bash can eat \r inside `` if the user requested igncr.
13223 # But we know of no other shell where ac_cr would be empty at this
13224 # point, so we can use a bashism as a fallback.
13225 if test "x$ac_cr" = x; then
13226   eval ac_cr=\$\'\\r\'
13227 fi
13228 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
13229 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
13230   ac_cs_awk_cr='\\r'
13231 else
13232   ac_cs_awk_cr=$ac_cr
13233 fi
13234
13235 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
13236 _ACEOF
13237
13238
13239 {
13240   echo "cat >conf$$subs.awk <<_ACEOF" &&
13241   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
13242   echo "_ACEOF"
13243 } >conf$$subs.sh ||
13244   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13245 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
13246 ac_delim='%!_!# '
13247 for ac_last_try in false false false false false :; do
13248   . ./conf$$subs.sh ||
13249     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13250
13251   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
13252   if test $ac_delim_n = $ac_delim_num; then
13253     break
13254   elif $ac_last_try; then
13255     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13256   else
13257     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
13258   fi
13259 done
13260 rm -f conf$$subs.sh
13261
13262 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13263 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
13264 _ACEOF
13265 sed -n '
13266 h
13267 s/^/S["/; s/!.*/"]=/
13268 p
13269 g
13270 s/^[^!]*!//
13271 :repl
13272 t repl
13273 s/'"$ac_delim"'$//
13274 t delim
13275 :nl
13276 h
13277 s/\(.\{148\}\)..*/\1/
13278 t more1
13279 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
13280 p
13281 n
13282 b repl
13283 :more1
13284 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
13285 p
13286 g
13287 s/.\{148\}//
13288 t nl
13289 :delim
13290 h
13291 s/\(.\{148\}\)..*/\1/
13292 t more2
13293 s/["\\]/\\&/g; s/^/"/; s/$/"/
13294 p
13295 b
13296 :more2
13297 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
13298 p
13299 g
13300 s/.\{148\}//
13301 t delim
13302 ' <conf$$subs.awk | sed '
13303 /^[^""]/{
13304   N
13305   s/\n//
13306 }
13307 ' >>$CONFIG_STATUS || ac_write_fail=1
13308 rm -f conf$$subs.awk
13309 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13310 _ACAWK
13311 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
13312   for (key in S) S_is_set[key] = 1
13313   FS = "\a"
13314
13315 }
13316 {
13317   line = $ 0
13318   nfields = split(line, field, "@")
13319   substed = 0
13320   len = length(field[1])
13321   for (i = 2; i < nfields; i++) {
13322     key = field[i]
13323     keylen = length(key)
13324     if (S_is_set[key]) {
13325       value = S[key]
13326       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
13327       len += length(value) + length(field[++i])
13328       substed = 1
13329     } else
13330       len += 1 + keylen
13331   }
13332
13333   print line
13334 }
13335
13336 _ACAWK
13337 _ACEOF
13338 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13339 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
13340   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
13341 else
13342   cat
13343 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
13344   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
13345 _ACEOF
13346
13347 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
13348 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
13349 # trailing colons and then remove the whole line if VPATH becomes empty
13350 # (actually we leave an empty line to preserve line numbers).
13351 if test "x$srcdir" = x.; then
13352   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
13353 h
13354 s///
13355 s/^/:/
13356 s/[      ]*$/:/
13357 s/:\$(srcdir):/:/g
13358 s/:\${srcdir}:/:/g
13359 s/:@srcdir@:/:/g
13360 s/^:*//
13361 s/:*$//
13362 x
13363 s/\(=[   ]*\).*/\1/
13364 G
13365 s/\n//
13366 s/^[^=]*=[       ]*$//
13367 }'
13368 fi
13369
13370 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13371 fi # test -n "$CONFIG_FILES"
13372
13373 # Set up the scripts for CONFIG_HEADERS section.
13374 # No need to generate them if there are no CONFIG_HEADERS.
13375 # This happens for instance with `./config.status Makefile'.
13376 if test -n "$CONFIG_HEADERS"; then
13377 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
13378 BEGIN {
13379 _ACEOF
13380
13381 # Transform confdefs.h into an awk script `defines.awk', embedded as
13382 # here-document in config.status, that substitutes the proper values into
13383 # config.h.in to produce config.h.
13384
13385 # Create a delimiter string that does not exist in confdefs.h, to ease
13386 # handling of long lines.
13387 ac_delim='%!_!# '
13388 for ac_last_try in false false :; do
13389   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
13390   if test -z "$ac_tt"; then
13391     break
13392   elif $ac_last_try; then
13393     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
13394   else
13395     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
13396   fi
13397 done
13398
13399 # For the awk script, D is an array of macro values keyed by name,
13400 # likewise P contains macro parameters if any.  Preserve backslash
13401 # newline sequences.
13402
13403 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
13404 sed -n '
13405 s/.\{148\}/&'"$ac_delim"'/g
13406 t rset
13407 :rset
13408 s/^[     ]*#[    ]*define[       ][      ]*/ /
13409 t def
13410 d
13411 :def
13412 s/\\$//
13413 t bsnl
13414 s/["\\]/\\&/g
13415 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
13416 D["\1"]=" \3"/p
13417 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
13418 d
13419 :bsnl
13420 s/["\\]/\\&/g
13421 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
13422 D["\1"]=" \3\\\\\\n"\\/p
13423 t cont
13424 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
13425 t cont
13426 d
13427 :cont
13428 n
13429 s/.\{148\}/&'"$ac_delim"'/g
13430 t clear
13431 :clear
13432 s/\\$//
13433 t bsnlc
13434 s/["\\]/\\&/g; s/^/"/; s/$/"/p
13435 d
13436 :bsnlc
13437 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
13438 b cont
13439 ' <confdefs.h | sed '
13440 s/'"$ac_delim"'/"\\\
13441 "/g' >>$CONFIG_STATUS || ac_write_fail=1
13442
13443 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13444   for (key in D) D_is_set[key] = 1
13445   FS = "\a"
13446 }
13447 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
13448   line = \$ 0
13449   split(line, arg, " ")
13450   if (arg[1] == "#") {
13451     defundef = arg[2]
13452     mac1 = arg[3]
13453   } else {
13454     defundef = substr(arg[1], 2)
13455     mac1 = arg[2]
13456   }
13457   split(mac1, mac2, "(") #)
13458   macro = mac2[1]
13459   prefix = substr(line, 1, index(line, defundef) - 1)
13460   if (D_is_set[macro]) {
13461     # Preserve the white space surrounding the "#".
13462     print prefix "define", macro P[macro] D[macro]
13463     next
13464   } else {
13465     # Replace #undef with comments.  This is necessary, for example,
13466     # in the case of _POSIX_SOURCE, which is predefined and required
13467     # on some systems where configure will not decide to define it.
13468     if (defundef == "undef") {
13469       print "/*", prefix defundef, macro, "*/"
13470       next
13471     }
13472   }
13473 }
13474 { print }
13475 _ACAWK
13476 _ACEOF
13477 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13478   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
13479 fi # test -n "$CONFIG_HEADERS"
13480
13481
13482 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
13483 shift
13484 for ac_tag
13485 do
13486   case $ac_tag in
13487   :[FHLC]) ac_mode=$ac_tag; continue;;
13488   esac
13489   case $ac_mode$ac_tag in
13490   :[FHL]*:*);;
13491   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
13492   :[FH]-) ac_tag=-:-;;
13493   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
13494   esac
13495   ac_save_IFS=$IFS
13496   IFS=:
13497   set x $ac_tag
13498   IFS=$ac_save_IFS
13499   shift
13500   ac_file=$1
13501   shift
13502
13503   case $ac_mode in
13504   :L) ac_source=$1;;
13505   :[FH])
13506     ac_file_inputs=
13507     for ac_f
13508     do
13509       case $ac_f in
13510       -) ac_f="$ac_tmp/stdin";;
13511       *) # Look for the file first in the build tree, then in the source tree
13512          # (if the path is not absolute).  The absolute path cannot be DOS-style,
13513          # because $ac_f cannot contain `:'.
13514          test -f "$ac_f" ||
13515            case $ac_f in
13516            [\\/$]*) false;;
13517            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
13518            esac ||
13519            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
13520       esac
13521       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
13522       as_fn_append ac_file_inputs " '$ac_f'"
13523     done
13524
13525     # Let's still pretend it is `configure' which instantiates (i.e., don't
13526     # use $as_me), people would be surprised to read:
13527     #    /* config.h.  Generated by config.status.  */
13528     configure_input='Generated from '`
13529           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
13530         `' by configure.'
13531     if test x"$ac_file" != x-; then
13532       configure_input="$ac_file.  $configure_input"
13533       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
13534 $as_echo "$as_me: creating $ac_file" >&6;}
13535     fi
13536     # Neutralize special characters interpreted by sed in replacement strings.
13537     case $configure_input in #(
13538     *\&* | *\|* | *\\* )
13539        ac_sed_conf_input=`$as_echo "$configure_input" |
13540        sed 's/[\\\\&|]/\\\\&/g'`;; #(
13541     *) ac_sed_conf_input=$configure_input;;
13542     esac
13543
13544     case $ac_tag in
13545     *:-:* | *:-) cat >"$ac_tmp/stdin" \
13546       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
13547     esac
13548     ;;
13549   esac
13550
13551   ac_dir=`$as_dirname -- "$ac_file" ||
13552 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13553          X"$ac_file" : 'X\(//\)[^/]' \| \
13554          X"$ac_file" : 'X\(//\)$' \| \
13555          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
13556 $as_echo X"$ac_file" |
13557     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13558             s//\1/
13559             q
13560           }
13561           /^X\(\/\/\)[^/].*/{
13562             s//\1/
13563             q
13564           }
13565           /^X\(\/\/\)$/{
13566             s//\1/
13567             q
13568           }
13569           /^X\(\/\).*/{
13570             s//\1/
13571             q
13572           }
13573           s/.*/./; q'`
13574   as_dir="$ac_dir"; as_fn_mkdir_p
13575   ac_builddir=.
13576
13577 case "$ac_dir" in
13578 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
13579 *)
13580   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
13581   # A ".." for each directory in $ac_dir_suffix.
13582   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
13583   case $ac_top_builddir_sub in
13584   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
13585   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
13586   esac ;;
13587 esac
13588 ac_abs_top_builddir=$ac_pwd
13589 ac_abs_builddir=$ac_pwd$ac_dir_suffix
13590 # for backward compatibility:
13591 ac_top_builddir=$ac_top_build_prefix
13592
13593 case $srcdir in
13594   .)  # We are building in place.
13595     ac_srcdir=.
13596     ac_top_srcdir=$ac_top_builddir_sub
13597     ac_abs_top_srcdir=$ac_pwd ;;
13598   [\\/]* | ?:[\\/]* )  # Absolute name.
13599     ac_srcdir=$srcdir$ac_dir_suffix;
13600     ac_top_srcdir=$srcdir
13601     ac_abs_top_srcdir=$srcdir ;;
13602   *) # Relative name.
13603     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
13604     ac_top_srcdir=$ac_top_build_prefix$srcdir
13605     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
13606 esac
13607 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
13608
13609
13610   case $ac_mode in
13611   :F)
13612   #
13613   # CONFIG_FILE
13614   #
13615
13616 _ACEOF
13617
13618 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13619 # If the template does not know about datarootdir, expand it.
13620 # FIXME: This hack should be removed a few years after 2.60.
13621 ac_datarootdir_hack=; ac_datarootdir_seen=
13622 ac_sed_dataroot='
13623 /datarootdir/ {
13624   p
13625   q
13626 }
13627 /@datadir@/p
13628 /@docdir@/p
13629 /@infodir@/p
13630 /@localedir@/p
13631 /@mandir@/p'
13632 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
13633 *datarootdir*) ac_datarootdir_seen=yes;;
13634 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
13635   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
13636 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
13637 _ACEOF
13638 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13639   ac_datarootdir_hack='
13640   s&@datadir@&$datadir&g
13641   s&@docdir@&$docdir&g
13642   s&@infodir@&$infodir&g
13643   s&@localedir@&$localedir&g
13644   s&@mandir@&$mandir&g
13645   s&\\\${datarootdir}&$datarootdir&g' ;;
13646 esac
13647 _ACEOF
13648
13649 # Neutralize VPATH when `$srcdir' = `.'.
13650 # Shell code in configure.ac might set extrasub.
13651 # FIXME: do we really want to maintain this feature?
13652 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13653 ac_sed_extra="$ac_vpsub
13654 $extrasub
13655 _ACEOF
13656 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13657 :t
13658 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13659 s|@configure_input@|$ac_sed_conf_input|;t t
13660 s&@top_builddir@&$ac_top_builddir_sub&;t t
13661 s&@top_build_prefix@&$ac_top_build_prefix&;t t
13662 s&@srcdir@&$ac_srcdir&;t t
13663 s&@abs_srcdir@&$ac_abs_srcdir&;t t
13664 s&@top_srcdir@&$ac_top_srcdir&;t t
13665 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
13666 s&@builddir@&$ac_builddir&;t t
13667 s&@abs_builddir@&$ac_abs_builddir&;t t
13668 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
13669 $ac_datarootdir_hack
13670 "
13671 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
13672   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13673
13674 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
13675   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
13676   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
13677       "$ac_tmp/out"`; test -z "$ac_out"; } &&
13678   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13679 which seems to be undefined.  Please make sure it is defined" >&5
13680 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13681 which seems to be undefined.  Please make sure it is defined" >&2;}
13682
13683   rm -f "$ac_tmp/stdin"
13684   case $ac_file in
13685   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
13686   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
13687   esac \
13688   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13689  ;;
13690   :H)
13691   #
13692   # CONFIG_HEADER
13693   #
13694   if test x"$ac_file" != x-; then
13695     {
13696       $as_echo "/* $configure_input  */" \
13697       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
13698     } >"$ac_tmp/config.h" \
13699       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13700     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
13701       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
13702 $as_echo "$as_me: $ac_file is unchanged" >&6;}
13703     else
13704       rm -f "$ac_file"
13705       mv "$ac_tmp/config.h" "$ac_file" \
13706         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13707     fi
13708   else
13709     $as_echo "/* $configure_input  */" \
13710       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
13711       || as_fn_error $? "could not create -" "$LINENO" 5
13712   fi
13713  ;;
13714
13715   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
13716 $as_echo "$as_me: executing $ac_file commands" >&6;}
13717  ;;
13718   esac
13719
13720
13721   case $ac_file$ac_mode in
13722     "stamp-h":C) echo timestamp > src/include/stamp-h ;;
13723     "build-radpaths-h":C) (cd ./src/include && /bin/sh ./build-radpaths-h) ;;
13724     "main-chmod":C) (cd ./src/main && chmod +x checkrad radlast radtest) ;;
13725     "scripts-chmod":C) (cd ./scripts && chmod +x rc.radiusd cron/radiusd.cron.daily cron/radiusd.cron.monthly cryptpasswd) ;;
13726
13727   esac
13728 done # for ac_tag
13729
13730
13731 as_fn_exit 0
13732 _ACEOF
13733 ac_clean_files=$ac_clean_files_save
13734
13735 test $ac_write_fail = 0 ||
13736   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
13737
13738
13739 # configure is writing to config.log, and then calls config.status.
13740 # config.status does its own redirection, appending to config.log.
13741 # Unfortunately, on DOS this fails, as config.log is still kept open
13742 # by configure, so config.status won't be able to write to it; its
13743 # output is simply discarded.  So we exec the FD to /dev/null,
13744 # effectively closing config.log, so it can be properly (re)opened and
13745 # appended to by config.status.  When coming back to configure, we
13746 # need to make the FD available again.
13747 if test "$no_create" != yes; then
13748   ac_cs_success=:
13749   ac_config_status_args=
13750   test "$silent" = yes &&
13751     ac_config_status_args="$ac_config_status_args --quiet"
13752   exec 5>/dev/null
13753   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
13754   exec 5>>config.log
13755   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13756   # would make configure fail if this is the last instruction.
13757   $ac_cs_success || as_fn_exit 1
13758 fi
13759
13760 #
13761 # CONFIG_SUBDIRS section.
13762 #
13763 if test "$no_recursion" != yes; then
13764
13765   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
13766   # so they do not pile up.
13767   ac_sub_configure_args=
13768   ac_prev=
13769   eval "set x $ac_configure_args"
13770   shift
13771   for ac_arg
13772   do
13773     if test -n "$ac_prev"; then
13774       ac_prev=
13775       continue
13776     fi
13777     case $ac_arg in
13778     -cache-file | --cache-file | --cache-fil | --cache-fi \
13779     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
13780       ac_prev=cache_file ;;
13781     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
13782     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
13783     | --c=*)
13784       ;;
13785     --config-cache | -C)
13786       ;;
13787     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
13788       ac_prev=srcdir ;;
13789     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
13790       ;;
13791     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
13792       ac_prev=prefix ;;
13793     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
13794       ;;
13795     --disable-option-checking)
13796       ;;
13797     *)
13798       case $ac_arg in
13799       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
13800       esac
13801       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
13802     esac
13803   done
13804
13805   # Always prepend --prefix to ensure using the same prefix
13806   # in subdir configurations.
13807   ac_arg="--prefix=$prefix"
13808   case $ac_arg in
13809   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
13810   esac
13811   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
13812
13813   # Pass --silent
13814   if test "$silent" = yes; then
13815     ac_sub_configure_args="--silent $ac_sub_configure_args"
13816   fi
13817
13818   # Always prepend --disable-option-checking to silence warnings, since
13819   # different subdirs can have different --enable and --with options.
13820   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
13821
13822   ac_popdir=`pwd`
13823   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
13824
13825     # Do not complain, so a configure script can configure whichever
13826     # parts of a large source tree are present.
13827     test -d "$srcdir/$ac_dir" || continue
13828
13829     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
13830     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
13831     $as_echo "$ac_msg" >&6
13832     as_dir="$ac_dir"; as_fn_mkdir_p
13833     ac_builddir=.
13834
13835 case "$ac_dir" in
13836 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
13837 *)
13838   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
13839   # A ".." for each directory in $ac_dir_suffix.
13840   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
13841   case $ac_top_builddir_sub in
13842   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
13843   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
13844   esac ;;
13845 esac
13846 ac_abs_top_builddir=$ac_pwd
13847 ac_abs_builddir=$ac_pwd$ac_dir_suffix
13848 # for backward compatibility:
13849 ac_top_builddir=$ac_top_build_prefix
13850
13851 case $srcdir in
13852   .)  # We are building in place.
13853     ac_srcdir=.
13854     ac_top_srcdir=$ac_top_builddir_sub
13855     ac_abs_top_srcdir=$ac_pwd ;;
13856   [\\/]* | ?:[\\/]* )  # Absolute name.
13857     ac_srcdir=$srcdir$ac_dir_suffix;
13858     ac_top_srcdir=$srcdir
13859     ac_abs_top_srcdir=$srcdir ;;
13860   *) # Relative name.
13861     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
13862     ac_top_srcdir=$ac_top_build_prefix$srcdir
13863     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
13864 esac
13865 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
13866
13867
13868     cd "$ac_dir"
13869
13870     # Check for guested configure; otherwise get Cygnus style configure.
13871     if test -f "$ac_srcdir/configure.gnu"; then
13872       ac_sub_configure=$ac_srcdir/configure.gnu
13873     elif test -f "$ac_srcdir/configure"; then
13874       ac_sub_configure=$ac_srcdir/configure
13875     elif test -f "$ac_srcdir/configure.in"; then
13876       # This should be Cygnus configure.
13877       ac_sub_configure=$ac_aux_dir/configure
13878     else
13879       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
13880 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
13881       ac_sub_configure=
13882     fi
13883
13884     # The recursion is here.
13885     if test -n "$ac_sub_configure"; then
13886       # Make the cache file name correct relative to the subdirectory.
13887       case $cache_file in
13888       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
13889       *) # Relative name.
13890         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
13891       esac
13892
13893       { $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
13894 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
13895       # The eval makes quoting arguments work.
13896       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
13897            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
13898         as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
13899     fi
13900
13901     cd "$ac_popdir"
13902   done
13903 fi
13904 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
13905   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
13906 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
13907 fi
13908
13909