Update module_interface.rst
[freeradius.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for freeradius $Id$.
4 #
5 # Report bugs to <http://bugs.freeradius.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
16
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20   emulate sh
21   NULLCMD=:
22   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23   # is contrary to our usage.  Disable this feature.
24   alias -g '${1+"$@"}'='"$@"'
25   setopt NO_GLOB_SUBST
26 else
27   case `(set -o) 2>/dev/null` in #(
28   *posix*) :
29     set -o posix ;; #(
30   *) :
31      ;;
32 esac
33 fi
34
35
36 as_nl='
37 '
38 export as_nl
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47   as_echo='print -r --'
48   as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50   as_echo='printf %s\n'
51   as_echo_n='printf %s'
52 else
53   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55     as_echo_n='/usr/ucb/echo -n'
56   else
57     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58     as_echo_n_body='eval
59       arg=$1;
60       case $arg in #(
61       *"$as_nl"*)
62         expr "X$arg" : "X\\(.*\\)$as_nl";
63         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64       esac;
65       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66     '
67     export as_echo_n_body
68     as_echo_n='sh -c $as_echo_n_body as_echo'
69   fi
70   export as_echo_body
71   as_echo='sh -c $as_echo_body as_echo'
72 fi
73
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
76   PATH_SEPARATOR=:
77   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79       PATH_SEPARATOR=';'
80   }
81 fi
82
83
84 # IFS
85 # We need space, tab and new line, in precisely that order.  Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
89 IFS=" ""        $as_nl"
90
91 # Find who we are.  Look in the path if we contain no directory separator.
92 as_myself=
93 case $0 in #((
94   *[\\/]* ) as_myself=$0 ;;
95   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96 for as_dir in $PATH
97 do
98   IFS=$as_save_IFS
99   test -z "$as_dir" && as_dir=.
100     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101   done
102 IFS=$as_save_IFS
103
104      ;;
105 esac
106 # We did not find ourselves, most probably we were run as `sh COMMAND'
107 # in which case we are not to be found in the path.
108 if test "x$as_myself" = x; then
109   as_myself=$0
110 fi
111 if test ! -f "$as_myself"; then
112   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113   exit 1
114 fi
115
116 # Unset variables that we do not need and which cause bugs (e.g. in
117 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118 # suppresses any "Segmentation fault" message there.  '((' could
119 # trigger a bug in pdksh 5.2.14.
120 for as_var in BASH_ENV ENV MAIL MAILPATH
121 do eval test x\${$as_var+set} = xset \
122   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123 done
124 PS1='$ '
125 PS2='> '
126 PS4='+ '
127
128 # NLS nuisances.
129 LC_ALL=C
130 export LC_ALL
131 LANGUAGE=C
132 export LANGUAGE
133
134 # CDPATH.
135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137 # Use a proper internal environment variable to ensure we don't fall
138   # into an infinite loop, continuously re-executing ourselves.
139   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140     _as_can_reexec=no; export _as_can_reexec;
141     # We cannot yet assume a decent shell, so we have to provide a
142 # neutralization value for shells without unset; and this also
143 # works around shells that cannot unset nonexistent variables.
144 # Preserve -v and -x to the replacement shell.
145 BASH_ENV=/dev/null
146 ENV=/dev/null
147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148 case $- in # ((((
149   *v*x* | *x*v* ) as_opts=-vx ;;
150   *v* ) as_opts=-v ;;
151   *x* ) as_opts=-x ;;
152   * ) as_opts= ;;
153 esac
154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155 # Admittedly, this is quite paranoid, since all the known shells bail
156 # out after a failed `exec'.
157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158 as_fn_exit 255
159   fi
160   # We don't want this to propagate to other subprocesses.
161           { _as_can_reexec=; unset _as_can_reexec;}
162 if test "x$CONFIG_SHELL" = x; then
163   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164   emulate sh
165   NULLCMD=:
166   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167   # is contrary to our usage.  Disable this feature.
168   alias -g '\${1+\"\$@\"}'='\"\$@\"'
169   setopt NO_GLOB_SUBST
170 else
171   case \`(set -o) 2>/dev/null\` in #(
172   *posix*) :
173     set -o posix ;; #(
174   *) :
175      ;;
176 esac
177 fi
178 "
179   as_required="as_fn_return () { (exit \$1); }
180 as_fn_success () { as_fn_return 0; }
181 as_fn_failure () { as_fn_return 1; }
182 as_fn_ret_success () { return 0; }
183 as_fn_ret_failure () { return 1; }
184
185 exitcode=0
186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192 else
193   exitcode=1; echo positional parameters were not saved.
194 fi
195 test x\$exitcode = x0 || exit 1
196 test -x / || exit 1"
197   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201 test \$(( 1 + 1 )) = 2 || exit 1"
202   if (eval "$as_required") 2>/dev/null; then :
203   as_have_required=yes
204 else
205   as_have_required=no
206 fi
207   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209 else
210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211 as_found=false
212 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213 do
214   IFS=$as_save_IFS
215   test -z "$as_dir" && as_dir=.
216   as_found=:
217   case $as_dir in #(
218          /*)
219            for as_base in sh bash ksh sh5; do
220              # Try only shells that exist, to save several forks.
221              as_shell=$as_dir/$as_base
222              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224   CONFIG_SHELL=$as_shell as_have_required=yes
225                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226   break 2
227 fi
228 fi
229            done;;
230        esac
231   as_found=false
232 done
233 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235   CONFIG_SHELL=$SHELL as_have_required=yes
236 fi; }
237 IFS=$as_save_IFS
238
239
240       if test "x$CONFIG_SHELL" != x; then :
241   export CONFIG_SHELL
242              # We cannot yet assume a decent shell, so we have to provide a
243 # neutralization value for shells without unset; and this also
244 # works around shells that cannot unset nonexistent variables.
245 # Preserve -v and -x to the replacement shell.
246 BASH_ENV=/dev/null
247 ENV=/dev/null
248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249 case $- in # ((((
250   *v*x* | *x*v* ) as_opts=-vx ;;
251   *v* ) as_opts=-v ;;
252   *x* ) as_opts=-x ;;
253   * ) as_opts= ;;
254 esac
255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256 # Admittedly, this is quite paranoid, since all the known shells bail
257 # out after a failed `exec'.
258 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259 exit 255
260 fi
261
262     if test x$as_have_required = xno; then :
263   $as_echo "$0: This script requires a shell more modern than all"
264   $as_echo "$0: the shells that I found on your system."
265   if test x${ZSH_VERSION+set} = xset ; then
266     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268   else
269     $as_echo "$0: Please tell bug-autoconf@gnu.org and
270 $0: http://bugs.freeradius.org about your system, including
271 $0: any error possibly output before this message. Then
272 $0: install a modern shell, or manually run the script
273 $0: under such a shell if you do have one."
274   fi
275   exit 1
276 fi
277 fi
278 fi
279 SHELL=${CONFIG_SHELL-/bin/sh}
280 export SHELL
281 # Unset more variables known to interfere with behavior of common tools.
282 CLICOLOR_FORCE= GREP_OPTIONS=
283 unset CLICOLOR_FORCE GREP_OPTIONS
284
285 ## --------------------- ##
286 ## M4sh Shell Functions. ##
287 ## --------------------- ##
288 # as_fn_unset VAR
289 # ---------------
290 # Portably unset VAR.
291 as_fn_unset ()
292 {
293   { eval $1=; unset $1;}
294 }
295 as_unset=as_fn_unset
296
297 # as_fn_set_status STATUS
298 # -----------------------
299 # Set $? to STATUS, without forking.
300 as_fn_set_status ()
301 {
302   return $1
303 } # as_fn_set_status
304
305 # as_fn_exit STATUS
306 # -----------------
307 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308 as_fn_exit ()
309 {
310   set +e
311   as_fn_set_status $1
312   exit $1
313 } # as_fn_exit
314
315 # as_fn_mkdir_p
316 # -------------
317 # Create "$as_dir" as a directory, including parents if necessary.
318 as_fn_mkdir_p ()
319 {
320
321   case $as_dir in #(
322   -*) as_dir=./$as_dir;;
323   esac
324   test -d "$as_dir" || eval $as_mkdir_p || {
325     as_dirs=
326     while :; do
327       case $as_dir in #(
328       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329       *) as_qdir=$as_dir;;
330       esac
331       as_dirs="'$as_qdir' $as_dirs"
332       as_dir=`$as_dirname -- "$as_dir" ||
333 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334          X"$as_dir" : 'X\(//\)[^/]' \| \
335          X"$as_dir" : 'X\(//\)$' \| \
336          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337 $as_echo X"$as_dir" |
338     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339             s//\1/
340             q
341           }
342           /^X\(\/\/\)[^/].*/{
343             s//\1/
344             q
345           }
346           /^X\(\/\/\)$/{
347             s//\1/
348             q
349           }
350           /^X\(\/\).*/{
351             s//\1/
352             q
353           }
354           s/.*/./; q'`
355       test -d "$as_dir" && break
356     done
357     test -z "$as_dirs" || eval "mkdir $as_dirs"
358   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361 } # as_fn_mkdir_p
362
363 # as_fn_executable_p FILE
364 # -----------------------
365 # Test if FILE is an executable regular file.
366 as_fn_executable_p ()
367 {
368   test -f "$1" && test -x "$1"
369 } # as_fn_executable_p
370 # as_fn_append VAR VALUE
371 # ----------------------
372 # Append the text in VALUE to the end of the definition contained in VAR. Take
373 # advantage of any shell optimizations that allow amortized linear growth over
374 # repeated appends, instead of the typical quadratic growth present in naive
375 # implementations.
376 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377   eval 'as_fn_append ()
378   {
379     eval $1+=\$2
380   }'
381 else
382   as_fn_append ()
383   {
384     eval $1=\$$1\$2
385   }
386 fi # as_fn_append
387
388 # as_fn_arith ARG...
389 # ------------------
390 # Perform arithmetic evaluation on the ARGs, and store the result in the
391 # global $as_val. Take advantage of shells that can avoid forks. The arguments
392 # must be portable across $(()) and expr.
393 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394   eval 'as_fn_arith ()
395   {
396     as_val=$(( $* ))
397   }'
398 else
399   as_fn_arith ()
400   {
401     as_val=`expr "$@" || test $? -eq 1`
402   }
403 fi # as_fn_arith
404
405
406 # as_fn_error STATUS ERROR [LINENO LOG_FD]
407 # ----------------------------------------
408 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410 # script with STATUS, using 1 if that was 0.
411 as_fn_error ()
412 {
413   as_status=$1; test $as_status -eq 0 && as_status=1
414   if test "$4"; then
415     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417   fi
418   $as_echo "$as_me: error: $2" >&2
419   as_fn_exit $as_status
420 } # as_fn_error
421
422 if expr a : '\(a\)' >/dev/null 2>&1 &&
423    test "X`expr 00001 : '.*\(...\)'`" = X001; then
424   as_expr=expr
425 else
426   as_expr=false
427 fi
428
429 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430   as_basename=basename
431 else
432   as_basename=false
433 fi
434
435 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436   as_dirname=dirname
437 else
438   as_dirname=false
439 fi
440
441 as_me=`$as_basename -- "$0" ||
442 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443          X"$0" : 'X\(//\)$' \| \
444          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445 $as_echo X/"$0" |
446     sed '/^.*\/\([^/][^/]*\)\/*$/{
447             s//\1/
448             q
449           }
450           /^X\/\(\/\/\)$/{
451             s//\1/
452             q
453           }
454           /^X\/\(\/\).*/{
455             s//\1/
456             q
457           }
458           s/.*/./; q'`
459
460 # Avoid depending upon Character Ranges.
461 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464 as_cr_digits='0123456789'
465 as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468   as_lineno_1=$LINENO as_lineno_1a=$LINENO
469   as_lineno_2=$LINENO as_lineno_2a=$LINENO
470   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473   sed -n '
474     p
475     /[$]LINENO/=
476   ' <$as_myself |
477     sed '
478       s/[$]LINENO.*/&-/
479       t lineno
480       b
481       :lineno
482       N
483       :loop
484       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485       t loop
486       s/-\n.*//
487     ' >$as_me.lineno &&
488   chmod +x "$as_me.lineno" ||
489     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492   # already done that, so ensure we don't try to do so again and fall
493   # in an infinite loop.  This has already happened in practice.
494   _as_can_reexec=no; export _as_can_reexec
495   # Don't try to exec as it changes $[0], causing all sort of problems
496   # (the dirname of $[0] is not the place where we might find the
497   # original and so on.  Autoconf is especially sensitive to this).
498   . "./$as_me.lineno"
499   # Exit status is that of the last command.
500   exit
501 }
502
503 ECHO_C= ECHO_N= ECHO_T=
504 case `echo -n x` in #(((((
505 -n*)
506   case `echo 'xy\c'` in
507   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
508   xy)  ECHO_C='\c';;
509   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510        ECHO_T=' ';;
511   esac;;
512 *)
513   ECHO_N='-n';;
514 esac
515
516 rm -f conf$$ conf$$.exe conf$$.file
517 if test -d conf$$.dir; then
518   rm -f conf$$.dir/conf$$.file
519 else
520   rm -f conf$$.dir
521   mkdir conf$$.dir 2>/dev/null
522 fi
523 if (echo >conf$$.file) 2>/dev/null; then
524   if ln -s conf$$.file conf$$ 2>/dev/null; then
525     as_ln_s='ln -s'
526     # ... but there are two gotchas:
527     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529     # In both cases, we have to default to `cp -pR'.
530     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531       as_ln_s='cp -pR'
532   elif ln conf$$.file conf$$ 2>/dev/null; then
533     as_ln_s=ln
534   else
535     as_ln_s='cp -pR'
536   fi
537 else
538   as_ln_s='cp -pR'
539 fi
540 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541 rmdir conf$$.dir 2>/dev/null
542
543 if mkdir -p . 2>/dev/null; then
544   as_mkdir_p='mkdir -p "$as_dir"'
545 else
546   test -d ./-p && rmdir ./-p
547   as_mkdir_p=false
548 fi
549
550 as_test_x='test -x'
551 as_executable_p=as_fn_executable_p
552
553 # Sed expression to map a string onto a valid CPP name.
554 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556 # Sed expression to map a string onto a valid variable name.
557 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560 test -n "$DJDIR" || exec 7<&0 </dev/null
561 exec 6>&1
562
563 # Name of the host.
564 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565 # so uname gets run too.
566 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568 #
569 # Initializations.
570 #
571 ac_default_prefix=/usr/local
572 ac_clean_files=
573 ac_config_libobj_dir=.
574 LIBOBJS=
575 cross_compiling=no
576 subdirs=
577 MFLAGS=
578 MAKEFLAGS=
579
580 # Identity of this package.
581 PACKAGE_NAME='freeradius'
582 PACKAGE_TARNAME='freeradius'
583 PACKAGE_VERSION='$Id$'
584 PACKAGE_STRING='freeradius $Id$'
585 PACKAGE_BUGREPORT='http://bugs.freeradius.org'
586 PACKAGE_URL='http://www.freeradius.org'
587
588 ac_unique_file="src/main/radiusd.c"
589 # Factoring default headers for most tests.
590 ac_includes_default="\
591 #include <stdio.h>
592 #ifdef HAVE_SYS_TYPES_H
593 # include <sys/types.h>
594 #endif
595 #ifdef HAVE_SYS_STAT_H
596 # include <sys/stat.h>
597 #endif
598 #ifdef STDC_HEADERS
599 # include <stdlib.h>
600 # include <stddef.h>
601 #else
602 # ifdef HAVE_STDLIB_H
603 #  include <stdlib.h>
604 # endif
605 #endif
606 #ifdef HAVE_STRING_H
607 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
608 #  include <memory.h>
609 # endif
610 # include <string.h>
611 #endif
612 #ifdef HAVE_STRINGS_H
613 # include <strings.h>
614 #endif
615 #ifdef HAVE_INTTYPES_H
616 # include <inttypes.h>
617 #endif
618 #ifdef HAVE_STDINT_H
619 # include <stdint.h>
620 #endif
621 #ifdef HAVE_UNISTD_H
622 # include <unistd.h>
623 #endif"
624
625 enable_option_checking=no
626 ac_subst_vars='LTLIBOBJS
627 LIBOBJS
628 STATIC_MODULES
629 USE_STATIC_LIBS
630 USE_SHARED_LIBS
631 INSTALLSTRIP
632 MODULES
633 subdirs
634 HOSTINFO
635 CRYPTLIB
636 LIBPREFIX
637 COLLECTDC_LDFLAGS
638 COLLECTDC_LIBS
639 PCAP_LDFLAGS
640 PCAP_LIBS
641 OPENSSL_CPPFLAGS
642 OPENSSL_LDFLAGS
643 OPENSSL_LIBS
644 LIBREADLINE
645 TALLOC_LDFLAGS
646 TALLOC_LIBS
647 DIRNAME
648 LOCATE
649 AUTOHEADER
650 AUTOCONF
651 ACLOCAL
652 RUSERS
653 SNMPWALK
654 SNMPGET
655 PERL
656 openssl_version_check_config
657 modconfdir
658 dictdir
659 raddbdir
660 radacctdir
661 logdir
662 GIT
663 FR_MAKEFLAGS
664 MAKE
665 GMAKE
666 clang_path
667 RANLIB
668 EGREP
669 GREP
670 CPP
671 ac_ct_CXX
672 CXXFLAGS
673 CXX
674 OBJEXT
675 EXEEXT
676 ac_ct_CC
677 CPPFLAGS
678 LDFLAGS
679 CFLAGS
680 CC
681 target_os
682 target_vendor
683 target_cpu
684 target
685 host_os
686 host_vendor
687 host_cpu
688 host
689 build_os
690 build_vendor
691 build_cpu
692 build
693 RADIUSD_VERSION_STRING
694 target_alias
695 host_alias
696 build_alias
697 LIBS
698 ECHO_T
699 ECHO_N
700 ECHO_C
701 DEFS
702 mandir
703 localedir
704 libdir
705 psdir
706 pdfdir
707 dvidir
708 htmldir
709 infodir
710 docdir
711 oldincludedir
712 includedir
713 localstatedir
714 sharedstatedir
715 sysconfdir
716 datadir
717 datarootdir
718 libexecdir
719 sbindir
720 bindir
721 program_transform_name
722 prefix
723 exec_prefix
724 PACKAGE_URL
725 PACKAGE_BUGREPORT
726 PACKAGE_STRING
727 PACKAGE_VERSION
728 PACKAGE_TARNAME
729 PACKAGE_NAME
730 PATH_SEPARATOR
731 SHELL'
732 ac_subst_files=''
733 ac_user_opts='
734 enable_option_checking
735 enable_developer
736 enable_largefile
737 enable_strict_dependencies
738 enable_werror
739 with_docdir
740 with_logdir
741 with_radacctdir
742 with_raddbdir
743 with_dictdir
744 with_ascend_binary
745 with_threads
746 with_tcp
747 with_vmps
748 with_dhcp
749 with_static_modules
750 with_shared_libs
751 with_modules
752 with_experimental_modules
753 with_udpfromto
754 with_rlm_FOO_lib_dir
755 with_rlm_FOO_include_dir
756 with_openssl
757 with_openssl_lib_dir
758 with_openssl_include_dir
759 enable_openssl_version_check
760 with_talloc_lib_dir
761 with_talloc_include_dir
762 with_pcap_lib_dir
763 with_pcap_include_dir
764 with_collectdclient_lib_dir
765 with_collectdclient_include_dir
766 with_cap_lib_dir
767 with_cap_include_dir
768 with_execinfo_lib_dir
769 with_execinfo_include_dir
770 with_pcre
771 with_pcre_lib_dir
772 with_pcre_include_dir
773 with_regex
774 '
775       ac_precious_vars='build_alias
776 host_alias
777 target_alias
778 CC
779 CFLAGS
780 LDFLAGS
781 LIBS
782 CPPFLAGS
783 CXX
784 CXXFLAGS
785 CCC
786 CPP'
787 ac_subdirs_all='$mysubdirs'
788
789 # Initialize some variables set by options.
790 ac_init_help=
791 ac_init_version=false
792 ac_unrecognized_opts=
793 ac_unrecognized_sep=
794 # The variables have the same names as the options, with
795 # dashes changed to underlines.
796 cache_file=/dev/null
797 exec_prefix=NONE
798 no_create=
799 no_recursion=
800 prefix=NONE
801 program_prefix=NONE
802 program_suffix=NONE
803 program_transform_name=s,x,x,
804 silent=
805 site=
806 srcdir=
807 verbose=
808 x_includes=NONE
809 x_libraries=NONE
810
811 # Installation directory options.
812 # These are left unexpanded so users can "make install exec_prefix=/foo"
813 # and all the variables that are supposed to be based on exec_prefix
814 # by default will actually change.
815 # Use braces instead of parens because sh, perl, etc. also accept them.
816 # (The list follows the same order as the GNU Coding Standards.)
817 bindir='${exec_prefix}/bin'
818 sbindir='${exec_prefix}/sbin'
819 libexecdir='${exec_prefix}/libexec'
820 datarootdir='${prefix}/share'
821 datadir='${datarootdir}'
822 sysconfdir='${prefix}/etc'
823 sharedstatedir='${prefix}/com'
824 localstatedir='${prefix}/var'
825 includedir='${prefix}/include'
826 oldincludedir='/usr/include'
827 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
828 infodir='${datarootdir}/info'
829 htmldir='${docdir}'
830 dvidir='${docdir}'
831 pdfdir='${docdir}'
832 psdir='${docdir}'
833 libdir='${exec_prefix}/lib'
834 localedir='${datarootdir}/locale'
835 mandir='${datarootdir}/man'
836
837 ac_prev=
838 ac_dashdash=
839 for ac_option
840 do
841   # If the previous option needs an argument, assign it.
842   if test -n "$ac_prev"; then
843     eval $ac_prev=\$ac_option
844     ac_prev=
845     continue
846   fi
847
848   case $ac_option in
849   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
850   *=)   ac_optarg= ;;
851   *)    ac_optarg=yes ;;
852   esac
853
854   # Accept the important Cygnus configure options, so we can diagnose typos.
855
856   case $ac_dashdash$ac_option in
857   --)
858     ac_dashdash=yes ;;
859
860   -bindir | --bindir | --bindi | --bind | --bin | --bi)
861     ac_prev=bindir ;;
862   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
863     bindir=$ac_optarg ;;
864
865   -build | --build | --buil | --bui | --bu)
866     ac_prev=build_alias ;;
867   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
868     build_alias=$ac_optarg ;;
869
870   -cache-file | --cache-file | --cache-fil | --cache-fi \
871   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
872     ac_prev=cache_file ;;
873   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
874   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
875     cache_file=$ac_optarg ;;
876
877   --config-cache | -C)
878     cache_file=config.cache ;;
879
880   -datadir | --datadir | --datadi | --datad)
881     ac_prev=datadir ;;
882   -datadir=* | --datadir=* | --datadi=* | --datad=*)
883     datadir=$ac_optarg ;;
884
885   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
886   | --dataroo | --dataro | --datar)
887     ac_prev=datarootdir ;;
888   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
889   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
890     datarootdir=$ac_optarg ;;
891
892   -disable-* | --disable-*)
893     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
894     # Reject names that are not valid shell variable names.
895     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
896       as_fn_error $? "invalid feature name: $ac_useropt"
897     ac_useropt_orig=$ac_useropt
898     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
899     case $ac_user_opts in
900       *"
901 "enable_$ac_useropt"
902 "*) ;;
903       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
904          ac_unrecognized_sep=', ';;
905     esac
906     eval enable_$ac_useropt=no ;;
907
908   -docdir | --docdir | --docdi | --doc | --do)
909     ac_prev=docdir ;;
910   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
911     docdir=$ac_optarg ;;
912
913   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
914     ac_prev=dvidir ;;
915   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
916     dvidir=$ac_optarg ;;
917
918   -enable-* | --enable-*)
919     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
920     # Reject names that are not valid shell variable names.
921     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
922       as_fn_error $? "invalid feature name: $ac_useropt"
923     ac_useropt_orig=$ac_useropt
924     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
925     case $ac_user_opts in
926       *"
927 "enable_$ac_useropt"
928 "*) ;;
929       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
930          ac_unrecognized_sep=', ';;
931     esac
932     eval enable_$ac_useropt=\$ac_optarg ;;
933
934   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
935   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
936   | --exec | --exe | --ex)
937     ac_prev=exec_prefix ;;
938   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
939   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
940   | --exec=* | --exe=* | --ex=*)
941     exec_prefix=$ac_optarg ;;
942
943   -gas | --gas | --ga | --g)
944     # Obsolete; use --with-gas.
945     with_gas=yes ;;
946
947   -help | --help | --hel | --he | -h)
948     ac_init_help=long ;;
949   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
950     ac_init_help=recursive ;;
951   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
952     ac_init_help=short ;;
953
954   -host | --host | --hos | --ho)
955     ac_prev=host_alias ;;
956   -host=* | --host=* | --hos=* | --ho=*)
957     host_alias=$ac_optarg ;;
958
959   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
960     ac_prev=htmldir ;;
961   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
962   | --ht=*)
963     htmldir=$ac_optarg ;;
964
965   -includedir | --includedir | --includedi | --included | --include \
966   | --includ | --inclu | --incl | --inc)
967     ac_prev=includedir ;;
968   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
969   | --includ=* | --inclu=* | --incl=* | --inc=*)
970     includedir=$ac_optarg ;;
971
972   -infodir | --infodir | --infodi | --infod | --info | --inf)
973     ac_prev=infodir ;;
974   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
975     infodir=$ac_optarg ;;
976
977   -libdir | --libdir | --libdi | --libd)
978     ac_prev=libdir ;;
979   -libdir=* | --libdir=* | --libdi=* | --libd=*)
980     libdir=$ac_optarg ;;
981
982   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
983   | --libexe | --libex | --libe)
984     ac_prev=libexecdir ;;
985   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
986   | --libexe=* | --libex=* | --libe=*)
987     libexecdir=$ac_optarg ;;
988
989   -localedir | --localedir | --localedi | --localed | --locale)
990     ac_prev=localedir ;;
991   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
992     localedir=$ac_optarg ;;
993
994   -localstatedir | --localstatedir | --localstatedi | --localstated \
995   | --localstate | --localstat | --localsta | --localst | --locals)
996     ac_prev=localstatedir ;;
997   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
998   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
999     localstatedir=$ac_optarg ;;
1000
1001   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1002     ac_prev=mandir ;;
1003   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1004     mandir=$ac_optarg ;;
1005
1006   -nfp | --nfp | --nf)
1007     # Obsolete; use --without-fp.
1008     with_fp=no ;;
1009
1010   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1011   | --no-cr | --no-c | -n)
1012     no_create=yes ;;
1013
1014   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1015   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1016     no_recursion=yes ;;
1017
1018   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1019   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1020   | --oldin | --oldi | --old | --ol | --o)
1021     ac_prev=oldincludedir ;;
1022   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1023   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1024   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1025     oldincludedir=$ac_optarg ;;
1026
1027   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1028     ac_prev=prefix ;;
1029   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1030     prefix=$ac_optarg ;;
1031
1032   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1033   | --program-pre | --program-pr | --program-p)
1034     ac_prev=program_prefix ;;
1035   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1036   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1037     program_prefix=$ac_optarg ;;
1038
1039   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1040   | --program-suf | --program-su | --program-s)
1041     ac_prev=program_suffix ;;
1042   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1043   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1044     program_suffix=$ac_optarg ;;
1045
1046   -program-transform-name | --program-transform-name \
1047   | --program-transform-nam | --program-transform-na \
1048   | --program-transform-n | --program-transform- \
1049   | --program-transform | --program-transfor \
1050   | --program-transfo | --program-transf \
1051   | --program-trans | --program-tran \
1052   | --progr-tra | --program-tr | --program-t)
1053     ac_prev=program_transform_name ;;
1054   -program-transform-name=* | --program-transform-name=* \
1055   | --program-transform-nam=* | --program-transform-na=* \
1056   | --program-transform-n=* | --program-transform-=* \
1057   | --program-transform=* | --program-transfor=* \
1058   | --program-transfo=* | --program-transf=* \
1059   | --program-trans=* | --program-tran=* \
1060   | --progr-tra=* | --program-tr=* | --program-t=*)
1061     program_transform_name=$ac_optarg ;;
1062
1063   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1064     ac_prev=pdfdir ;;
1065   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1066     pdfdir=$ac_optarg ;;
1067
1068   -psdir | --psdir | --psdi | --psd | --ps)
1069     ac_prev=psdir ;;
1070   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1071     psdir=$ac_optarg ;;
1072
1073   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1074   | -silent | --silent | --silen | --sile | --sil)
1075     silent=yes ;;
1076
1077   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1078     ac_prev=sbindir ;;
1079   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1080   | --sbi=* | --sb=*)
1081     sbindir=$ac_optarg ;;
1082
1083   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1084   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1085   | --sharedst | --shareds | --shared | --share | --shar \
1086   | --sha | --sh)
1087     ac_prev=sharedstatedir ;;
1088   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1089   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1090   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1091   | --sha=* | --sh=*)
1092     sharedstatedir=$ac_optarg ;;
1093
1094   -site | --site | --sit)
1095     ac_prev=site ;;
1096   -site=* | --site=* | --sit=*)
1097     site=$ac_optarg ;;
1098
1099   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1100     ac_prev=srcdir ;;
1101   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1102     srcdir=$ac_optarg ;;
1103
1104   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1105   | --syscon | --sysco | --sysc | --sys | --sy)
1106     ac_prev=sysconfdir ;;
1107   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1108   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1109     sysconfdir=$ac_optarg ;;
1110
1111   -target | --target | --targe | --targ | --tar | --ta | --t)
1112     ac_prev=target_alias ;;
1113   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1114     target_alias=$ac_optarg ;;
1115
1116   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1117     verbose=yes ;;
1118
1119   -version | --version | --versio | --versi | --vers | -V)
1120     ac_init_version=: ;;
1121
1122   -with-* | --with-*)
1123     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1124     # Reject names that are not valid shell variable names.
1125     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1126       as_fn_error $? "invalid package name: $ac_useropt"
1127     ac_useropt_orig=$ac_useropt
1128     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1129     case $ac_user_opts in
1130       *"
1131 "with_$ac_useropt"
1132 "*) ;;
1133       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1134          ac_unrecognized_sep=', ';;
1135     esac
1136     eval with_$ac_useropt=\$ac_optarg ;;
1137
1138   -without-* | --without-*)
1139     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1140     # Reject names that are not valid shell variable names.
1141     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1142       as_fn_error $? "invalid package name: $ac_useropt"
1143     ac_useropt_orig=$ac_useropt
1144     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1145     case $ac_user_opts in
1146       *"
1147 "with_$ac_useropt"
1148 "*) ;;
1149       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1150          ac_unrecognized_sep=', ';;
1151     esac
1152     eval with_$ac_useropt=no ;;
1153
1154   --x)
1155     # Obsolete; use --with-x.
1156     with_x=yes ;;
1157
1158   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1159   | --x-incl | --x-inc | --x-in | --x-i)
1160     ac_prev=x_includes ;;
1161   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1162   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1163     x_includes=$ac_optarg ;;
1164
1165   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1166   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1167     ac_prev=x_libraries ;;
1168   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1169   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1170     x_libraries=$ac_optarg ;;
1171
1172   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1173 Try \`$0 --help' for more information"
1174     ;;
1175
1176   *=*)
1177     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1178     # Reject names that are not valid shell variable names.
1179     case $ac_envvar in #(
1180       '' | [0-9]* | *[!_$as_cr_alnum]* )
1181       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1182     esac
1183     eval $ac_envvar=\$ac_optarg
1184     export $ac_envvar ;;
1185
1186   *)
1187     # FIXME: should be removed in autoconf 3.0.
1188     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1189     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1190       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1191     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1192     ;;
1193
1194   esac
1195 done
1196
1197 if test -n "$ac_prev"; then
1198   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1199   as_fn_error $? "missing argument to $ac_option"
1200 fi
1201
1202 if test -n "$ac_unrecognized_opts"; then
1203   case $enable_option_checking in
1204     no) ;;
1205     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1206     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1207   esac
1208 fi
1209
1210 # Check all directory arguments for consistency.
1211 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1212                 datadir sysconfdir sharedstatedir localstatedir includedir \
1213                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1214                 libdir localedir mandir
1215 do
1216   eval ac_val=\$$ac_var
1217   # Remove trailing slashes.
1218   case $ac_val in
1219     */ )
1220       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1221       eval $ac_var=\$ac_val;;
1222   esac
1223   # Be sure to have absolute directory names.
1224   case $ac_val in
1225     [\\/$]* | ?:[\\/]* )  continue;;
1226     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1227   esac
1228   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1229 done
1230
1231 # There might be people who depend on the old broken behavior: `$host'
1232 # used to hold the argument of --host etc.
1233 # FIXME: To remove some day.
1234 build=$build_alias
1235 host=$host_alias
1236 target=$target_alias
1237
1238 # FIXME: To remove some day.
1239 if test "x$host_alias" != x; then
1240   if test "x$build_alias" = x; then
1241     cross_compiling=maybe
1242   elif test "x$build_alias" != "x$host_alias"; then
1243     cross_compiling=yes
1244   fi
1245 fi
1246
1247 ac_tool_prefix=
1248 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1249
1250 test "$silent" = yes && exec 6>/dev/null
1251
1252
1253 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1254 ac_ls_di=`ls -di .` &&
1255 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1256   as_fn_error $? "working directory cannot be determined"
1257 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1258   as_fn_error $? "pwd does not report name of working directory"
1259
1260
1261 # Find the source files, if location was not specified.
1262 if test -z "$srcdir"; then
1263   ac_srcdir_defaulted=yes
1264   # Try the directory containing this script, then the parent directory.
1265   ac_confdir=`$as_dirname -- "$as_myself" ||
1266 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1267          X"$as_myself" : 'X\(//\)[^/]' \| \
1268          X"$as_myself" : 'X\(//\)$' \| \
1269          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1270 $as_echo X"$as_myself" |
1271     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1272             s//\1/
1273             q
1274           }
1275           /^X\(\/\/\)[^/].*/{
1276             s//\1/
1277             q
1278           }
1279           /^X\(\/\/\)$/{
1280             s//\1/
1281             q
1282           }
1283           /^X\(\/\).*/{
1284             s//\1/
1285             q
1286           }
1287           s/.*/./; q'`
1288   srcdir=$ac_confdir
1289   if test ! -r "$srcdir/$ac_unique_file"; then
1290     srcdir=..
1291   fi
1292 else
1293   ac_srcdir_defaulted=no
1294 fi
1295 if test ! -r "$srcdir/$ac_unique_file"; then
1296   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1297   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1298 fi
1299 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1300 ac_abs_confdir=`(
1301         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1302         pwd)`
1303 # When building in place, set srcdir=.
1304 if test "$ac_abs_confdir" = "$ac_pwd"; then
1305   srcdir=.
1306 fi
1307 # Remove unnecessary trailing slashes from srcdir.
1308 # Double slashes in file names in object file debugging info
1309 # mess up M-x gdb in Emacs.
1310 case $srcdir in
1311 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1312 esac
1313 for ac_var in $ac_precious_vars; do
1314   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1315   eval ac_env_${ac_var}_value=\$${ac_var}
1316   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1317   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1318 done
1319
1320 #
1321 # Report the --help message.
1322 #
1323 if test "$ac_init_help" = "long"; then
1324   # Omit some internal or obsolete options to make the list less imposing.
1325   # This message is too long to be a string in the A/UX 3.1 sh.
1326   cat <<_ACEOF
1327 \`configure' configures freeradius $Id$ to adapt to many kinds of systems.
1328
1329 Usage: $0 [OPTION]... [VAR=VALUE]...
1330
1331 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1332 VAR=VALUE.  See below for descriptions of some of the useful variables.
1333
1334 Defaults for the options are specified in brackets.
1335
1336 Configuration:
1337   -h, --help              display this help and exit
1338       --help=short        display options specific to this package
1339       --help=recursive    display the short help of all the included packages
1340   -V, --version           display version information and exit
1341   -q, --quiet, --silent   do not print \`checking ...' messages
1342       --cache-file=FILE   cache test results in FILE [disabled]
1343   -C, --config-cache      alias for \`--cache-file=config.cache'
1344   -n, --no-create         do not create output files
1345       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1346
1347 Installation directories:
1348   --prefix=PREFIX         install architecture-independent files in PREFIX
1349                           [$ac_default_prefix]
1350   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1351                           [PREFIX]
1352
1353 By default, \`make install' will install all the files in
1354 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1355 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1356 for instance \`--prefix=\$HOME'.
1357
1358 For better control, use the options below.
1359
1360 Fine tuning of the installation directories:
1361   --bindir=DIR            user executables [EPREFIX/bin]
1362   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1363   --libexecdir=DIR        program executables [EPREFIX/libexec]
1364   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1365   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1366   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1367   --libdir=DIR            object code libraries [EPREFIX/lib]
1368   --includedir=DIR        C header files [PREFIX/include]
1369   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1370   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1371   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1372   --infodir=DIR           info documentation [DATAROOTDIR/info]
1373   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1374   --mandir=DIR            man documentation [DATAROOTDIR/man]
1375   --docdir=DIR            documentation root [DATAROOTDIR/doc/freeradius]
1376   --htmldir=DIR           html documentation [DOCDIR]
1377   --dvidir=DIR            dvi documentation [DOCDIR]
1378   --pdfdir=DIR            pdf documentation [DOCDIR]
1379   --psdir=DIR             ps documentation [DOCDIR]
1380 _ACEOF
1381
1382   cat <<\_ACEOF
1383
1384 System types:
1385   --build=BUILD     configure for building on BUILD [guessed]
1386   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1387   --target=TARGET   configure for building compilers for TARGET [HOST]
1388 _ACEOF
1389 fi
1390
1391 if test -n "$ac_init_help"; then
1392   case $ac_init_help in
1393      short | recursive ) echo "Configuration of freeradius $Id$:";;
1394    esac
1395   cat <<\_ACEOF
1396
1397 Optional Features:
1398   --disable-option-checking  ignore unrecognized --enable/--with options
1399   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1400   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1401   --enable-developer      enables features of interest to developers.
1402   --disable-largefile     omit support for large files
1403   --enable-strict-dependencies  fail configure on lack of module dependancy.
1404   --enable-werror         causes the build to fail if any warnings are generated.
1405   --disable-openssl-version-check
1406                           disable vulnerable OpenSSL version check
1407
1408
1409 Optional Packages:
1410   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1411   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1412   --with-docdir=DIR       directory for documentation DATADIR/doc/freeradius
1413   --with-logdir=DIR       directory for logfiles LOCALSTATEDIR/log/radius
1414   --with-radacctdir=DIR   directory for detail files LOGDIR/radacct
1415   --with-raddbdir=DIR     directory for config files SYSCONFDIR/raddb
1416   --with-dictdir=DIR      directory for dictionary files DATAROOTDIR/freeradius
1417   --with-ascend-binary    include support for Ascend binary filter attributes (default=yes)
1418   --with-threads          use threads, if available.  (default=yes)
1419   --with-tcp              compile in TCP support. (default=yes)
1420   --with-vmps             compile in VMPS support. (default=yes)
1421   --with-dhcp             compile in DHCP support. (default=yes)
1422   --with-static-modules=QUOTED-MODULE-LIST
1423   --with-shared-libs      build dynamic libraries and link against them.
1424                           (default=yes)
1425   --with-modules=QUOTED-MODULE-LIST
1426   --with-experimental-modules
1427                           use experimental and unstable modules. (default=no,
1428                           unless --enable-developer=yes)
1429   --with-udpfromto        compile in UDPFROMTO support. (default=yes)
1430   --with-rlm-FOO-lib-dir=DIR
1431                           directory in which to look for library files used by
1432                           module FOO
1433   --with-rlm-FOO-include-dir=DIR
1434                           directory in which to look for include files used by
1435                           module FOO
1436   --with-openssl          use OpenSSL. (default=yes)
1437   --with-openssl-lib-dir=DIR
1438                           directory to look for OpenSSL library files
1439   --with-openssl-include-dir=DIR
1440                           directory to look for OpenSSL include files
1441   --with-talloc-lib-dir=DIR
1442                           directory in which to look for talloc library files
1443   --with-talloc-include-dir=DIR
1444                           directory in which to look for talloc include files
1445   --with-pcap-lib-dir=DIR directory in which to look for pcap library files
1446   --with-pcap-include-dir=DIR
1447                           directory in which to look for pcap include files
1448   --with-collectdclient-lib-dir=DIR
1449                           directory in which to look for collectdclient
1450                           library files
1451   --with-collectdclient-include-dir=DIR
1452                           directory in which to look for collectdclient
1453                           include files
1454   --with-cap-lib-dir=DIR  directory in which to look for cap library files
1455   --with-cap-include-dir=DIR
1456                           directory in which to look for cap include files
1457   --with-execinfo-lib-dir=DIR
1458                           directory in which to look for execinfo library
1459                           files
1460   --with-execinfo-include-dir=DIR
1461                           directory in which to look for execinfo include
1462                           files
1463   --with-pcre             use libpcre (if available). (default=yes)
1464   --with-pcre-lib-dir=DIR directory in which to look for pcre library files
1465   --with-pcre-include-dir=DIR
1466                           directory in which to look for pcre include files
1467   --with-regex            Whether to build with regular expressions
1468                           (default=yes)
1469
1470 Some influential environment variables:
1471   CC          C compiler command
1472   CFLAGS      C compiler flags
1473   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1474               nonstandard directory <lib dir>
1475   LIBS        libraries to pass to the linker, e.g. -l<library>
1476   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1477               you have headers in a nonstandard directory <include dir>
1478   CXX         C++ compiler command
1479   CXXFLAGS    C++ compiler flags
1480   CPP         C preprocessor
1481
1482 Use these variables to override the choices made by `configure' or to help
1483 it to find libraries and programs with nonstandard names/locations.
1484
1485 Report bugs to <http://bugs.freeradius.org>.
1486 freeradius home page: <http://www.freeradius.org>.
1487 _ACEOF
1488 ac_status=$?
1489 fi
1490
1491 if test "$ac_init_help" = "recursive"; then
1492   # If there are subdirs, report their specific --help.
1493   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1494     test -d "$ac_dir" ||
1495       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1496       continue
1497     ac_builddir=.
1498
1499 case "$ac_dir" in
1500 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1501 *)
1502   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1503   # A ".." for each directory in $ac_dir_suffix.
1504   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1505   case $ac_top_builddir_sub in
1506   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1507   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1508   esac ;;
1509 esac
1510 ac_abs_top_builddir=$ac_pwd
1511 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1512 # for backward compatibility:
1513 ac_top_builddir=$ac_top_build_prefix
1514
1515 case $srcdir in
1516   .)  # We are building in place.
1517     ac_srcdir=.
1518     ac_top_srcdir=$ac_top_builddir_sub
1519     ac_abs_top_srcdir=$ac_pwd ;;
1520   [\\/]* | ?:[\\/]* )  # Absolute name.
1521     ac_srcdir=$srcdir$ac_dir_suffix;
1522     ac_top_srcdir=$srcdir
1523     ac_abs_top_srcdir=$srcdir ;;
1524   *) # Relative name.
1525     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1526     ac_top_srcdir=$ac_top_build_prefix$srcdir
1527     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1528 esac
1529 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1530
1531     cd "$ac_dir" || { ac_status=$?; continue; }
1532     # Check for guested configure.
1533     if test -f "$ac_srcdir/configure.gnu"; then
1534       echo &&
1535       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1536     elif test -f "$ac_srcdir/configure"; then
1537       echo &&
1538       $SHELL "$ac_srcdir/configure" --help=recursive
1539     else
1540       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1541     fi || ac_status=$?
1542     cd "$ac_pwd" || { ac_status=$?; break; }
1543   done
1544 fi
1545
1546 test -n "$ac_init_help" && exit $ac_status
1547 if $ac_init_version; then
1548   cat <<\_ACEOF
1549 freeradius configure $Id$
1550 generated by GNU Autoconf 2.69
1551
1552 Copyright (C) 2012 Free Software Foundation, Inc.
1553 This configure script is free software; the Free Software Foundation
1554 gives unlimited permission to copy, distribute and modify it.
1555 _ACEOF
1556   exit
1557 fi
1558
1559 ## ------------------------ ##
1560 ## Autoconf initialization. ##
1561 ## ------------------------ ##
1562
1563 # ac_fn_c_try_compile LINENO
1564 # --------------------------
1565 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1566 ac_fn_c_try_compile ()
1567 {
1568   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1569   rm -f conftest.$ac_objext
1570   if { { ac_try="$ac_compile"
1571 case "(($ac_try" in
1572   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1573   *) ac_try_echo=$ac_try;;
1574 esac
1575 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1576 $as_echo "$ac_try_echo"; } >&5
1577   (eval "$ac_compile") 2>conftest.err
1578   ac_status=$?
1579   if test -s conftest.err; then
1580     grep -v '^ *+' conftest.err >conftest.er1
1581     cat conftest.er1 >&5
1582     mv -f conftest.er1 conftest.err
1583   fi
1584   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1585   test $ac_status = 0; } && {
1586          test -z "$ac_c_werror_flag" ||
1587          test ! -s conftest.err
1588        } && test -s conftest.$ac_objext; then :
1589   ac_retval=0
1590 else
1591   $as_echo "$as_me: failed program was:" >&5
1592 sed 's/^/| /' conftest.$ac_ext >&5
1593
1594         ac_retval=1
1595 fi
1596   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1597   as_fn_set_status $ac_retval
1598
1599 } # ac_fn_c_try_compile
1600
1601 # ac_fn_cxx_try_compile LINENO
1602 # ----------------------------
1603 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1604 ac_fn_cxx_try_compile ()
1605 {
1606   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1607   rm -f conftest.$ac_objext
1608   if { { ac_try="$ac_compile"
1609 case "(($ac_try" in
1610   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1611   *) ac_try_echo=$ac_try;;
1612 esac
1613 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1614 $as_echo "$ac_try_echo"; } >&5
1615   (eval "$ac_compile") 2>conftest.err
1616   ac_status=$?
1617   if test -s conftest.err; then
1618     grep -v '^ *+' conftest.err >conftest.er1
1619     cat conftest.er1 >&5
1620     mv -f conftest.er1 conftest.err
1621   fi
1622   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1623   test $ac_status = 0; } && {
1624          test -z "$ac_cxx_werror_flag" ||
1625          test ! -s conftest.err
1626        } && test -s conftest.$ac_objext; then :
1627   ac_retval=0
1628 else
1629   $as_echo "$as_me: failed program was:" >&5
1630 sed 's/^/| /' conftest.$ac_ext >&5
1631
1632         ac_retval=1
1633 fi
1634   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1635   as_fn_set_status $ac_retval
1636
1637 } # ac_fn_cxx_try_compile
1638
1639 # ac_fn_c_try_cpp LINENO
1640 # ----------------------
1641 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1642 ac_fn_c_try_cpp ()
1643 {
1644   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1645   if { { ac_try="$ac_cpp conftest.$ac_ext"
1646 case "(($ac_try" in
1647   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1648   *) ac_try_echo=$ac_try;;
1649 esac
1650 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1651 $as_echo "$ac_try_echo"; } >&5
1652   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1653   ac_status=$?
1654   if test -s conftest.err; then
1655     grep -v '^ *+' conftest.err >conftest.er1
1656     cat conftest.er1 >&5
1657     mv -f conftest.er1 conftest.err
1658   fi
1659   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1660   test $ac_status = 0; } > conftest.i && {
1661          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1662          test ! -s conftest.err
1663        }; then :
1664   ac_retval=0
1665 else
1666   $as_echo "$as_me: failed program was:" >&5
1667 sed 's/^/| /' conftest.$ac_ext >&5
1668
1669     ac_retval=1
1670 fi
1671   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1672   as_fn_set_status $ac_retval
1673
1674 } # ac_fn_c_try_cpp
1675
1676 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1677 # -------------------------------------------------------
1678 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1679 # the include files in INCLUDES and setting the cache variable VAR
1680 # accordingly.
1681 ac_fn_c_check_header_mongrel ()
1682 {
1683   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1684   if eval \${$3+:} false; then :
1685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1686 $as_echo_n "checking for $2... " >&6; }
1687 if eval \${$3+:} false; then :
1688   $as_echo_n "(cached) " >&6
1689 fi
1690 eval ac_res=\$$3
1691                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1692 $as_echo "$ac_res" >&6; }
1693 else
1694   # Is the header compilable?
1695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1696 $as_echo_n "checking $2 usability... " >&6; }
1697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1698 /* end confdefs.h.  */
1699 $4
1700 #include <$2>
1701 _ACEOF
1702 if ac_fn_c_try_compile "$LINENO"; then :
1703   ac_header_compiler=yes
1704 else
1705   ac_header_compiler=no
1706 fi
1707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1709 $as_echo "$ac_header_compiler" >&6; }
1710
1711 # Is the header present?
1712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1713 $as_echo_n "checking $2 presence... " >&6; }
1714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1715 /* end confdefs.h.  */
1716 #include <$2>
1717 _ACEOF
1718 if ac_fn_c_try_cpp "$LINENO"; then :
1719   ac_header_preproc=yes
1720 else
1721   ac_header_preproc=no
1722 fi
1723 rm -f conftest.err conftest.i conftest.$ac_ext
1724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1725 $as_echo "$ac_header_preproc" >&6; }
1726
1727 # So?  What about this header?
1728 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1729   yes:no: )
1730     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1731 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1732     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1733 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1734     ;;
1735   no:yes:* )
1736     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1737 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1738     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1739 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1740     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1741 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1742     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1743 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1744     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1745 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1746 ( $as_echo "## ----------------------------------------- ##
1747 ## Report this to http://bugs.freeradius.org ##
1748 ## ----------------------------------------- ##"
1749      ) | sed "s/^/$as_me: WARNING:     /" >&2
1750     ;;
1751 esac
1752   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1753 $as_echo_n "checking for $2... " >&6; }
1754 if eval \${$3+:} false; then :
1755   $as_echo_n "(cached) " >&6
1756 else
1757   eval "$3=\$ac_header_compiler"
1758 fi
1759 eval ac_res=\$$3
1760                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1761 $as_echo "$ac_res" >&6; }
1762 fi
1763   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1764
1765 } # ac_fn_c_check_header_mongrel
1766
1767 # ac_fn_c_try_run LINENO
1768 # ----------------------
1769 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1770 # that executables *can* be run.
1771 ac_fn_c_try_run ()
1772 {
1773   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1774   if { { ac_try="$ac_link"
1775 case "(($ac_try" in
1776   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1777   *) ac_try_echo=$ac_try;;
1778 esac
1779 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1780 $as_echo "$ac_try_echo"; } >&5
1781   (eval "$ac_link") 2>&5
1782   ac_status=$?
1783   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1784   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1785   { { case "(($ac_try" in
1786   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1787   *) ac_try_echo=$ac_try;;
1788 esac
1789 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1790 $as_echo "$ac_try_echo"; } >&5
1791   (eval "$ac_try") 2>&5
1792   ac_status=$?
1793   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1794   test $ac_status = 0; }; }; then :
1795   ac_retval=0
1796 else
1797   $as_echo "$as_me: program exited with status $ac_status" >&5
1798        $as_echo "$as_me: failed program was:" >&5
1799 sed 's/^/| /' conftest.$ac_ext >&5
1800
1801        ac_retval=$ac_status
1802 fi
1803   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1804   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1805   as_fn_set_status $ac_retval
1806
1807 } # ac_fn_c_try_run
1808
1809 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1810 # -------------------------------------------------------
1811 # Tests whether HEADER exists and can be compiled using the include files in
1812 # INCLUDES, setting the cache variable VAR accordingly.
1813 ac_fn_c_check_header_compile ()
1814 {
1815   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1816   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1817 $as_echo_n "checking for $2... " >&6; }
1818 if eval \${$3+:} false; then :
1819   $as_echo_n "(cached) " >&6
1820 else
1821   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1822 /* end confdefs.h.  */
1823 $4
1824 #include <$2>
1825 _ACEOF
1826 if ac_fn_c_try_compile "$LINENO"; then :
1827   eval "$3=yes"
1828 else
1829   eval "$3=no"
1830 fi
1831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1832 fi
1833 eval ac_res=\$$3
1834                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1835 $as_echo "$ac_res" >&6; }
1836   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1837
1838 } # ac_fn_c_check_header_compile
1839
1840 # ac_fn_c_try_link LINENO
1841 # -----------------------
1842 # Try to link conftest.$ac_ext, and return whether this succeeded.
1843 ac_fn_c_try_link ()
1844 {
1845   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1846   rm -f conftest.$ac_objext conftest$ac_exeext
1847   if { { ac_try="$ac_link"
1848 case "(($ac_try" in
1849   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1850   *) ac_try_echo=$ac_try;;
1851 esac
1852 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1853 $as_echo "$ac_try_echo"; } >&5
1854   (eval "$ac_link") 2>conftest.err
1855   ac_status=$?
1856   if test -s conftest.err; then
1857     grep -v '^ *+' conftest.err >conftest.er1
1858     cat conftest.er1 >&5
1859     mv -f conftest.er1 conftest.err
1860   fi
1861   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1862   test $ac_status = 0; } && {
1863          test -z "$ac_c_werror_flag" ||
1864          test ! -s conftest.err
1865        } && test -s conftest$ac_exeext && {
1866          test "$cross_compiling" = yes ||
1867          test -x conftest$ac_exeext
1868        }; then :
1869   ac_retval=0
1870 else
1871   $as_echo "$as_me: failed program was:" >&5
1872 sed 's/^/| /' conftest.$ac_ext >&5
1873
1874         ac_retval=1
1875 fi
1876   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1877   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1878   # interfere with the next link command; also delete a directory that is
1879   # left behind by Apple's compiler.  We do this before executing the actions.
1880   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1881   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1882   as_fn_set_status $ac_retval
1883
1884 } # ac_fn_c_try_link
1885
1886 # ac_fn_c_check_func LINENO FUNC VAR
1887 # ----------------------------------
1888 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1889 ac_fn_c_check_func ()
1890 {
1891   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1892   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1893 $as_echo_n "checking for $2... " >&6; }
1894 if eval \${$3+:} false; then :
1895   $as_echo_n "(cached) " >&6
1896 else
1897   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1898 /* end confdefs.h.  */
1899 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1900    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1901 #define $2 innocuous_$2
1902
1903 /* System header to define __stub macros and hopefully few prototypes,
1904     which can conflict with char $2 (); below.
1905     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1906     <limits.h> exists even on freestanding compilers.  */
1907
1908 #ifdef __STDC__
1909 # include <limits.h>
1910 #else
1911 # include <assert.h>
1912 #endif
1913
1914 #undef $2
1915
1916 /* Override any GCC internal prototype to avoid an error.
1917    Use char because int might match the return type of a GCC
1918    builtin and then its argument prototype would still apply.  */
1919 #ifdef __cplusplus
1920 extern "C"
1921 #endif
1922 char $2 ();
1923 /* The GNU C library defines this for functions which it implements
1924     to always fail with ENOSYS.  Some functions are actually named
1925     something starting with __ and the normal name is an alias.  */
1926 #if defined __stub_$2 || defined __stub___$2
1927 choke me
1928 #endif
1929
1930 int
1931 main ()
1932 {
1933 return $2 ();
1934   ;
1935   return 0;
1936 }
1937 _ACEOF
1938 if ac_fn_c_try_link "$LINENO"; then :
1939   eval "$3=yes"
1940 else
1941   eval "$3=no"
1942 fi
1943 rm -f core conftest.err conftest.$ac_objext \
1944     conftest$ac_exeext conftest.$ac_ext
1945 fi
1946 eval ac_res=\$$3
1947                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1948 $as_echo "$ac_res" >&6; }
1949   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1950
1951 } # ac_fn_c_check_func
1952
1953 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1954 # -------------------------------------------
1955 # Tests whether TYPE exists after having included INCLUDES, setting cache
1956 # variable VAR accordingly.
1957 ac_fn_c_check_type ()
1958 {
1959   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1960   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1961 $as_echo_n "checking for $2... " >&6; }
1962 if eval \${$3+:} false; then :
1963   $as_echo_n "(cached) " >&6
1964 else
1965   eval "$3=no"
1966   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1967 /* end confdefs.h.  */
1968 $4
1969 int
1970 main ()
1971 {
1972 if (sizeof ($2))
1973          return 0;
1974   ;
1975   return 0;
1976 }
1977 _ACEOF
1978 if ac_fn_c_try_compile "$LINENO"; then :
1979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1980 /* end confdefs.h.  */
1981 $4
1982 int
1983 main ()
1984 {
1985 if (sizeof (($2)))
1986             return 0;
1987   ;
1988   return 0;
1989 }
1990 _ACEOF
1991 if ac_fn_c_try_compile "$LINENO"; then :
1992
1993 else
1994   eval "$3=yes"
1995 fi
1996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1997 fi
1998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1999 fi
2000 eval ac_res=\$$3
2001                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2002 $as_echo "$ac_res" >&6; }
2003   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2004
2005 } # ac_fn_c_check_type
2006
2007 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2008 # ---------------------------------------------
2009 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2010 # accordingly.
2011 ac_fn_c_check_decl ()
2012 {
2013   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014   as_decl_name=`echo $2|sed 's/ *(.*//'`
2015   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2016   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2017 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2018 if eval \${$3+:} false; then :
2019   $as_echo_n "(cached) " >&6
2020 else
2021   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2022 /* end confdefs.h.  */
2023 $4
2024 int
2025 main ()
2026 {
2027 #ifndef $as_decl_name
2028 #ifdef __cplusplus
2029   (void) $as_decl_use;
2030 #else
2031   (void) $as_decl_name;
2032 #endif
2033 #endif
2034
2035   ;
2036   return 0;
2037 }
2038 _ACEOF
2039 if ac_fn_c_try_compile "$LINENO"; then :
2040   eval "$3=yes"
2041 else
2042   eval "$3=no"
2043 fi
2044 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2045 fi
2046 eval ac_res=\$$3
2047                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2048 $as_echo "$ac_res" >&6; }
2049   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2050
2051 } # ac_fn_c_check_decl
2052 cat >config.log <<_ACEOF
2053 This file contains any messages produced by compilers while
2054 running configure, to aid debugging if configure makes a mistake.
2055
2056 It was created by freeradius $as_me $Id$, which was
2057 generated by GNU Autoconf 2.69.  Invocation command line was
2058
2059   $ $0 $@
2060
2061 _ACEOF
2062 exec 5>>config.log
2063 {
2064 cat <<_ASUNAME
2065 ## --------- ##
2066 ## Platform. ##
2067 ## --------- ##
2068
2069 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2070 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2071 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2072 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2073 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2074
2075 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2076 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2077
2078 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2079 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2080 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2081 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2082 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2083 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2084 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2085
2086 _ASUNAME
2087
2088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2089 for as_dir in $PATH
2090 do
2091   IFS=$as_save_IFS
2092   test -z "$as_dir" && as_dir=.
2093     $as_echo "PATH: $as_dir"
2094   done
2095 IFS=$as_save_IFS
2096
2097 } >&5
2098
2099 cat >&5 <<_ACEOF
2100
2101
2102 ## ----------- ##
2103 ## Core tests. ##
2104 ## ----------- ##
2105
2106 _ACEOF
2107
2108
2109 # Keep a trace of the command line.
2110 # Strip out --no-create and --no-recursion so they do not pile up.
2111 # Strip out --silent because we don't want to record it for future runs.
2112 # Also quote any args containing shell meta-characters.
2113 # Make two passes to allow for proper duplicate-argument suppression.
2114 ac_configure_args=
2115 ac_configure_args0=
2116 ac_configure_args1=
2117 ac_must_keep_next=false
2118 for ac_pass in 1 2
2119 do
2120   for ac_arg
2121   do
2122     case $ac_arg in
2123     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2124     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2125     | -silent | --silent | --silen | --sile | --sil)
2126       continue ;;
2127     *\'*)
2128       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2129     esac
2130     case $ac_pass in
2131     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2132     2)
2133       as_fn_append ac_configure_args1 " '$ac_arg'"
2134       if test $ac_must_keep_next = true; then
2135         ac_must_keep_next=false # Got value, back to normal.
2136       else
2137         case $ac_arg in
2138           *=* | --config-cache | -C | -disable-* | --disable-* \
2139           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2140           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2141           | -with-* | --with-* | -without-* | --without-* | --x)
2142             case "$ac_configure_args0 " in
2143               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2144             esac
2145             ;;
2146           -* ) ac_must_keep_next=true ;;
2147         esac
2148       fi
2149       as_fn_append ac_configure_args " '$ac_arg'"
2150       ;;
2151     esac
2152   done
2153 done
2154 { ac_configure_args0=; unset ac_configure_args0;}
2155 { ac_configure_args1=; unset ac_configure_args1;}
2156
2157 # When interrupted or exit'd, cleanup temporary files, and complete
2158 # config.log.  We remove comments because anyway the quotes in there
2159 # would cause problems or look ugly.
2160 # WARNING: Use '\'' to represent an apostrophe within the trap.
2161 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2162 trap 'exit_status=$?
2163   # Save into config.log some information that might help in debugging.
2164   {
2165     echo
2166
2167     $as_echo "## ---------------- ##
2168 ## Cache variables. ##
2169 ## ---------------- ##"
2170     echo
2171     # The following way of writing the cache mishandles newlines in values,
2172 (
2173   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2174     eval ac_val=\$$ac_var
2175     case $ac_val in #(
2176     *${as_nl}*)
2177       case $ac_var in #(
2178       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2179 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2180       esac
2181       case $ac_var in #(
2182       _ | IFS | as_nl) ;; #(
2183       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2184       *) { eval $ac_var=; unset $ac_var;} ;;
2185       esac ;;
2186     esac
2187   done
2188   (set) 2>&1 |
2189     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2190     *${as_nl}ac_space=\ *)
2191       sed -n \
2192         "s/'\''/'\''\\\\'\'''\''/g;
2193           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2194       ;; #(
2195     *)
2196       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2197       ;;
2198     esac |
2199     sort
2200 )
2201     echo
2202
2203     $as_echo "## ----------------- ##
2204 ## Output variables. ##
2205 ## ----------------- ##"
2206     echo
2207     for ac_var in $ac_subst_vars
2208     do
2209       eval ac_val=\$$ac_var
2210       case $ac_val in
2211       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2212       esac
2213       $as_echo "$ac_var='\''$ac_val'\''"
2214     done | sort
2215     echo
2216
2217     if test -n "$ac_subst_files"; then
2218       $as_echo "## ------------------- ##
2219 ## File substitutions. ##
2220 ## ------------------- ##"
2221       echo
2222       for ac_var in $ac_subst_files
2223       do
2224         eval ac_val=\$$ac_var
2225         case $ac_val in
2226         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2227         esac
2228         $as_echo "$ac_var='\''$ac_val'\''"
2229       done | sort
2230       echo
2231     fi
2232
2233     if test -s confdefs.h; then
2234       $as_echo "## ----------- ##
2235 ## confdefs.h. ##
2236 ## ----------- ##"
2237       echo
2238       cat confdefs.h
2239       echo
2240     fi
2241     test "$ac_signal" != 0 &&
2242       $as_echo "$as_me: caught signal $ac_signal"
2243     $as_echo "$as_me: exit $exit_status"
2244   } >&5
2245   rm -f core *.core core.conftest.* &&
2246     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2247     exit $exit_status
2248 ' 0
2249 for ac_signal in 1 2 13 15; do
2250   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2251 done
2252 ac_signal=0
2253
2254 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2255 rm -f -r conftest* confdefs.h
2256
2257 $as_echo "/* confdefs.h */" > confdefs.h
2258
2259 # Predefined preprocessor variables.
2260
2261 cat >>confdefs.h <<_ACEOF
2262 #define PACKAGE_NAME "$PACKAGE_NAME"
2263 _ACEOF
2264
2265 cat >>confdefs.h <<_ACEOF
2266 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2267 _ACEOF
2268
2269 cat >>confdefs.h <<_ACEOF
2270 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2271 _ACEOF
2272
2273 cat >>confdefs.h <<_ACEOF
2274 #define PACKAGE_STRING "$PACKAGE_STRING"
2275 _ACEOF
2276
2277 cat >>confdefs.h <<_ACEOF
2278 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2279 _ACEOF
2280
2281 cat >>confdefs.h <<_ACEOF
2282 #define PACKAGE_URL "$PACKAGE_URL"
2283 _ACEOF
2284
2285
2286 # Let the site file select an alternate cache file if it wants to.
2287 # Prefer an explicitly selected file to automatically selected ones.
2288 ac_site_file1=NONE
2289 ac_site_file2=NONE
2290 if test -n "$CONFIG_SITE"; then
2291   # We do not want a PATH search for config.site.
2292   case $CONFIG_SITE in #((
2293     -*)  ac_site_file1=./$CONFIG_SITE;;
2294     */*) ac_site_file1=$CONFIG_SITE;;
2295     *)   ac_site_file1=./$CONFIG_SITE;;
2296   esac
2297 elif test "x$prefix" != xNONE; then
2298   ac_site_file1=$prefix/share/config.site
2299   ac_site_file2=$prefix/etc/config.site
2300 else
2301   ac_site_file1=$ac_default_prefix/share/config.site
2302   ac_site_file2=$ac_default_prefix/etc/config.site
2303 fi
2304 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2305 do
2306   test "x$ac_site_file" = xNONE && continue
2307   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2308     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2309 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2310     sed 's/^/| /' "$ac_site_file" >&5
2311     . "$ac_site_file" \
2312       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2313 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2314 as_fn_error $? "failed to load site script $ac_site_file
2315 See \`config.log' for more details" "$LINENO" 5; }
2316   fi
2317 done
2318
2319 if test -r "$cache_file"; then
2320   # Some versions of bash will fail to source /dev/null (special files
2321   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2322   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2323     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2324 $as_echo "$as_me: loading cache $cache_file" >&6;}
2325     case $cache_file in
2326       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2327       *)                      . "./$cache_file";;
2328     esac
2329   fi
2330 else
2331   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2332 $as_echo "$as_me: creating cache $cache_file" >&6;}
2333   >$cache_file
2334 fi
2335
2336 # Check that the precious variables saved in the cache have kept the same
2337 # value.
2338 ac_cache_corrupted=false
2339 for ac_var in $ac_precious_vars; do
2340   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2341   eval ac_new_set=\$ac_env_${ac_var}_set
2342   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2343   eval ac_new_val=\$ac_env_${ac_var}_value
2344   case $ac_old_set,$ac_new_set in
2345     set,)
2346       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2347 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2348       ac_cache_corrupted=: ;;
2349     ,set)
2350       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2351 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2352       ac_cache_corrupted=: ;;
2353     ,);;
2354     *)
2355       if test "x$ac_old_val" != "x$ac_new_val"; then
2356         # differences in whitespace do not lead to failure.
2357         ac_old_val_w=`echo x $ac_old_val`
2358         ac_new_val_w=`echo x $ac_new_val`
2359         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2360           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2361 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2362           ac_cache_corrupted=:
2363         else
2364           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2365 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2366           eval $ac_var=\$ac_old_val
2367         fi
2368         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2369 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2370         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2371 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2372       fi;;
2373   esac
2374   # Pass precious variables to config.status.
2375   if test "$ac_new_set" = set; then
2376     case $ac_new_val in
2377     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2378     *) ac_arg=$ac_var=$ac_new_val ;;
2379     esac
2380     case " $ac_configure_args " in
2381       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2382       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2383     esac
2384   fi
2385 done
2386 if $ac_cache_corrupted; then
2387   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2388 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2389   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2390 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2391   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2392 fi
2393 ## -------------------- ##
2394 ## Main body of script. ##
2395 ## -------------------- ##
2396
2397 ac_ext=c
2398 ac_cpp='$CPP $CPPFLAGS'
2399 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2400 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2401 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2402
2403
2404
2405 ac_config_headers="$ac_config_headers src/include/autoconf.h"
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422 RADIUSD_MAJOR_VERSION=`cat VERSION | sed 's/\..*//'`
2423 RADIUSD_MINOR_VERSION=`cat VERSION | sed 's/^[^\.]*\.//' | sed 's/\..*$//'`
2424 RADIUSD_INCRM_VERSION=`cat VERSION | sed 's/^.*\..*\.//' | sed 's/[\.-].*$//'`
2425
2426 RADIUSD_VERSION=`echo | awk -v major="$RADIUSD_MAJOR_VERSION" \
2427 -v minor="$RADIUSD_MINOR_VERSION" \
2428 -v incrm="$RADIUSD_INCRM_VERSION" \
2429 '{ printf "%02i%02i%02i", major, minor, incrm }'`
2430
2431 RADIUSD_VERSION_STRING=`cat VERSION`
2432
2433
2434
2435
2436 cat >>confdefs.h <<_ACEOF
2437 #define RADIUSD_VERSION ${RADIUSD_VERSION}
2438 _ACEOF
2439
2440
2441 cat >>confdefs.h <<_ACEOF
2442 #define RADIUSD_VERSION_STRING "${RADIUSD_VERSION_STRING}"
2443 _ACEOF
2444
2445
2446
2447 # Check whether --enable-developer was given.
2448 if test "${enable_developer+set}" = set; then :
2449   enableval=$enable_developer;  case "$enableval" in
2450   no)
2451     developer=no
2452     ;;
2453   *)
2454     developer=yes
2455   esac
2456
2457 fi
2458
2459
2460 if test -d $srcdir/.git; then
2461   if test "x$developer" != "xno"; then
2462     { $as_echo "$as_me:${as_lineno-$LINENO}: found .git directory, enabling developer build implicitly, disable with --disable-developer" >&5
2463 $as_echo "$as_me: found .git directory, enabling developer build implicitly, disable with --disable-developer" >&6;}
2464     developer="yes"
2465   fi
2466 fi
2467
2468 if test "x$developer" = "xyes"; then
2469   : ${CFLAGS=-g3}
2470 fi
2471
2472
2473 ac_aux_dir=
2474 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2475   if test -f "$ac_dir/install-sh"; then
2476     ac_aux_dir=$ac_dir
2477     ac_install_sh="$ac_aux_dir/install-sh -c"
2478     break
2479   elif test -f "$ac_dir/install.sh"; then
2480     ac_aux_dir=$ac_dir
2481     ac_install_sh="$ac_aux_dir/install.sh -c"
2482     break
2483   elif test -f "$ac_dir/shtool"; then
2484     ac_aux_dir=$ac_dir
2485     ac_install_sh="$ac_aux_dir/shtool install -c"
2486     break
2487   fi
2488 done
2489 if test -z "$ac_aux_dir"; then
2490   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2491 fi
2492
2493 # These three variables are undocumented and unsupported,
2494 # and are intended to be withdrawn in a future Autoconf release.
2495 # They can cause serious problems if a builder's source tree is in a directory
2496 # whose full name contains unusual characters.
2497 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2498 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2499 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2500
2501
2502 # Make sure we can run config.sub.
2503 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2504   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2505
2506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2507 $as_echo_n "checking build system type... " >&6; }
2508 if ${ac_cv_build+:} false; then :
2509   $as_echo_n "(cached) " >&6
2510 else
2511   ac_build_alias=$build_alias
2512 test "x$ac_build_alias" = x &&
2513   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2514 test "x$ac_build_alias" = x &&
2515   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2516 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2517   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2518
2519 fi
2520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2521 $as_echo "$ac_cv_build" >&6; }
2522 case $ac_cv_build in
2523 *-*-*) ;;
2524 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2525 esac
2526 build=$ac_cv_build
2527 ac_save_IFS=$IFS; IFS='-'
2528 set x $ac_cv_build
2529 shift
2530 build_cpu=$1
2531 build_vendor=$2
2532 shift; shift
2533 # Remember, the first character of IFS is used to create $*,
2534 # except with old shells:
2535 build_os=$*
2536 IFS=$ac_save_IFS
2537 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2538
2539
2540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2541 $as_echo_n "checking host system type... " >&6; }
2542 if ${ac_cv_host+:} false; then :
2543   $as_echo_n "(cached) " >&6
2544 else
2545   if test "x$host_alias" = x; then
2546   ac_cv_host=$ac_cv_build
2547 else
2548   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2549     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2550 fi
2551
2552 fi
2553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2554 $as_echo "$ac_cv_host" >&6; }
2555 case $ac_cv_host in
2556 *-*-*) ;;
2557 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2558 esac
2559 host=$ac_cv_host
2560 ac_save_IFS=$IFS; IFS='-'
2561 set x $ac_cv_host
2562 shift
2563 host_cpu=$1
2564 host_vendor=$2
2565 shift; shift
2566 # Remember, the first character of IFS is used to create $*,
2567 # except with old shells:
2568 host_os=$*
2569 IFS=$ac_save_IFS
2570 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2571
2572
2573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2574 $as_echo_n "checking target system type... " >&6; }
2575 if ${ac_cv_target+:} false; then :
2576   $as_echo_n "(cached) " >&6
2577 else
2578   if test "x$target_alias" = x; then
2579   ac_cv_target=$ac_cv_host
2580 else
2581   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2582     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2583 fi
2584
2585 fi
2586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2587 $as_echo "$ac_cv_target" >&6; }
2588 case $ac_cv_target in
2589 *-*-*) ;;
2590 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
2591 esac
2592 target=$ac_cv_target
2593 ac_save_IFS=$IFS; IFS='-'
2594 set x $ac_cv_target
2595 shift
2596 target_cpu=$1
2597 target_vendor=$2
2598 shift; shift
2599 # Remember, the first character of IFS is used to create $*,
2600 # except with old shells:
2601 target_os=$*
2602 IFS=$ac_save_IFS
2603 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2604
2605
2606 # The aliases save the names the user supplied, while $host etc.
2607 # will get canonicalized.
2608 test -n "$target_alias" &&
2609   test "$program_prefix$program_suffix$program_transform_name" = \
2610     NONENONEs,x,x, &&
2611   program_prefix=${target_alias}-
2612
2613
2614 ac_ext=c
2615 ac_cpp='$CPP $CPPFLAGS'
2616 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2617 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2618 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2619 if test -n "$ac_tool_prefix"; then
2620   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2621 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2623 $as_echo_n "checking for $ac_word... " >&6; }
2624 if ${ac_cv_prog_CC+:} false; then :
2625   $as_echo_n "(cached) " >&6
2626 else
2627   if test -n "$CC"; then
2628   ac_cv_prog_CC="$CC" # Let the user override the test.
2629 else
2630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2631 for as_dir in $PATH
2632 do
2633   IFS=$as_save_IFS
2634   test -z "$as_dir" && as_dir=.
2635     for ac_exec_ext in '' $ac_executable_extensions; do
2636   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2637     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2638     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2639     break 2
2640   fi
2641 done
2642   done
2643 IFS=$as_save_IFS
2644
2645 fi
2646 fi
2647 CC=$ac_cv_prog_CC
2648 if test -n "$CC"; then
2649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2650 $as_echo "$CC" >&6; }
2651 else
2652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2653 $as_echo "no" >&6; }
2654 fi
2655
2656
2657 fi
2658 if test -z "$ac_cv_prog_CC"; then
2659   ac_ct_CC=$CC
2660   # Extract the first word of "gcc", so it can be a program name with args.
2661 set dummy gcc; ac_word=$2
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2663 $as_echo_n "checking for $ac_word... " >&6; }
2664 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2665   $as_echo_n "(cached) " >&6
2666 else
2667   if test -n "$ac_ct_CC"; then
2668   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2669 else
2670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2671 for as_dir in $PATH
2672 do
2673   IFS=$as_save_IFS
2674   test -z "$as_dir" && as_dir=.
2675     for ac_exec_ext in '' $ac_executable_extensions; do
2676   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2677     ac_cv_prog_ac_ct_CC="gcc"
2678     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2679     break 2
2680   fi
2681 done
2682   done
2683 IFS=$as_save_IFS
2684
2685 fi
2686 fi
2687 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2688 if test -n "$ac_ct_CC"; then
2689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2690 $as_echo "$ac_ct_CC" >&6; }
2691 else
2692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2693 $as_echo "no" >&6; }
2694 fi
2695
2696   if test "x$ac_ct_CC" = x; then
2697     CC=""
2698   else
2699     case $cross_compiling:$ac_tool_warned in
2700 yes:)
2701 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2702 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2703 ac_tool_warned=yes ;;
2704 esac
2705     CC=$ac_ct_CC
2706   fi
2707 else
2708   CC="$ac_cv_prog_CC"
2709 fi
2710
2711 if test -z "$CC"; then
2712           if test -n "$ac_tool_prefix"; then
2713     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2714 set dummy ${ac_tool_prefix}cc; ac_word=$2
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2716 $as_echo_n "checking for $ac_word... " >&6; }
2717 if ${ac_cv_prog_CC+:} false; then :
2718   $as_echo_n "(cached) " >&6
2719 else
2720   if test -n "$CC"; then
2721   ac_cv_prog_CC="$CC" # Let the user override the test.
2722 else
2723 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2724 for as_dir in $PATH
2725 do
2726   IFS=$as_save_IFS
2727   test -z "$as_dir" && as_dir=.
2728     for ac_exec_ext in '' $ac_executable_extensions; do
2729   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2730     ac_cv_prog_CC="${ac_tool_prefix}cc"
2731     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2732     break 2
2733   fi
2734 done
2735   done
2736 IFS=$as_save_IFS
2737
2738 fi
2739 fi
2740 CC=$ac_cv_prog_CC
2741 if test -n "$CC"; then
2742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2743 $as_echo "$CC" >&6; }
2744 else
2745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2746 $as_echo "no" >&6; }
2747 fi
2748
2749
2750   fi
2751 fi
2752 if test -z "$CC"; then
2753   # Extract the first word of "cc", so it can be a program name with args.
2754 set dummy cc; ac_word=$2
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2756 $as_echo_n "checking for $ac_word... " >&6; }
2757 if ${ac_cv_prog_CC+:} false; then :
2758   $as_echo_n "(cached) " >&6
2759 else
2760   if test -n "$CC"; then
2761   ac_cv_prog_CC="$CC" # Let the user override the test.
2762 else
2763   ac_prog_rejected=no
2764 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2765 for as_dir in $PATH
2766 do
2767   IFS=$as_save_IFS
2768   test -z "$as_dir" && as_dir=.
2769     for ac_exec_ext in '' $ac_executable_extensions; do
2770   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2771     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2772        ac_prog_rejected=yes
2773        continue
2774      fi
2775     ac_cv_prog_CC="cc"
2776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2777     break 2
2778   fi
2779 done
2780   done
2781 IFS=$as_save_IFS
2782
2783 if test $ac_prog_rejected = yes; then
2784   # We found a bogon in the path, so make sure we never use it.
2785   set dummy $ac_cv_prog_CC
2786   shift
2787   if test $# != 0; then
2788     # We chose a different compiler from the bogus one.
2789     # However, it has the same basename, so the bogon will be chosen
2790     # first if we set CC to just the basename; use the full file name.
2791     shift
2792     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2793   fi
2794 fi
2795 fi
2796 fi
2797 CC=$ac_cv_prog_CC
2798 if test -n "$CC"; then
2799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2800 $as_echo "$CC" >&6; }
2801 else
2802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2803 $as_echo "no" >&6; }
2804 fi
2805
2806
2807 fi
2808 if test -z "$CC"; then
2809   if test -n "$ac_tool_prefix"; then
2810   for ac_prog in cl.exe
2811   do
2812     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2813 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2815 $as_echo_n "checking for $ac_word... " >&6; }
2816 if ${ac_cv_prog_CC+:} false; then :
2817   $as_echo_n "(cached) " >&6
2818 else
2819   if test -n "$CC"; then
2820   ac_cv_prog_CC="$CC" # Let the user override the test.
2821 else
2822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2823 for as_dir in $PATH
2824 do
2825   IFS=$as_save_IFS
2826   test -z "$as_dir" && as_dir=.
2827     for ac_exec_ext in '' $ac_executable_extensions; do
2828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2829     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2831     break 2
2832   fi
2833 done
2834   done
2835 IFS=$as_save_IFS
2836
2837 fi
2838 fi
2839 CC=$ac_cv_prog_CC
2840 if test -n "$CC"; then
2841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2842 $as_echo "$CC" >&6; }
2843 else
2844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2845 $as_echo "no" >&6; }
2846 fi
2847
2848
2849     test -n "$CC" && break
2850   done
2851 fi
2852 if test -z "$CC"; then
2853   ac_ct_CC=$CC
2854   for ac_prog in cl.exe
2855 do
2856   # Extract the first word of "$ac_prog", so it can be a program name with args.
2857 set dummy $ac_prog; ac_word=$2
2858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2859 $as_echo_n "checking for $ac_word... " >&6; }
2860 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2861   $as_echo_n "(cached) " >&6
2862 else
2863   if test -n "$ac_ct_CC"; then
2864   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2865 else
2866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2867 for as_dir in $PATH
2868 do
2869   IFS=$as_save_IFS
2870   test -z "$as_dir" && as_dir=.
2871     for ac_exec_ext in '' $ac_executable_extensions; do
2872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2873     ac_cv_prog_ac_ct_CC="$ac_prog"
2874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2875     break 2
2876   fi
2877 done
2878   done
2879 IFS=$as_save_IFS
2880
2881 fi
2882 fi
2883 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2884 if test -n "$ac_ct_CC"; then
2885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2886 $as_echo "$ac_ct_CC" >&6; }
2887 else
2888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2889 $as_echo "no" >&6; }
2890 fi
2891
2892
2893   test -n "$ac_ct_CC" && break
2894 done
2895
2896   if test "x$ac_ct_CC" = x; then
2897     CC=""
2898   else
2899     case $cross_compiling:$ac_tool_warned in
2900 yes:)
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2902 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2903 ac_tool_warned=yes ;;
2904 esac
2905     CC=$ac_ct_CC
2906   fi
2907 fi
2908
2909 fi
2910
2911
2912 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2913 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2914 as_fn_error $? "no acceptable C compiler found in \$PATH
2915 See \`config.log' for more details" "$LINENO" 5; }
2916
2917 # Provide some information about the compiler.
2918 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2919 set X $ac_compile
2920 ac_compiler=$2
2921 for ac_option in --version -v -V -qversion; do
2922   { { ac_try="$ac_compiler $ac_option >&5"
2923 case "(($ac_try" in
2924   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2925   *) ac_try_echo=$ac_try;;
2926 esac
2927 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2928 $as_echo "$ac_try_echo"; } >&5
2929   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2930   ac_status=$?
2931   if test -s conftest.err; then
2932     sed '10a\
2933 ... rest of stderr output deleted ...
2934          10q' conftest.err >conftest.er1
2935     cat conftest.er1 >&5
2936   fi
2937   rm -f conftest.er1 conftest.err
2938   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2939   test $ac_status = 0; }
2940 done
2941
2942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2943 /* end confdefs.h.  */
2944
2945 int
2946 main ()
2947 {
2948
2949   ;
2950   return 0;
2951 }
2952 _ACEOF
2953 ac_clean_files_save=$ac_clean_files
2954 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2955 # Try to create an executable without -o first, disregard a.out.
2956 # It will help us diagnose broken compilers, and finding out an intuition
2957 # of exeext.
2958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2959 $as_echo_n "checking whether the C compiler works... " >&6; }
2960 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2961
2962 # The possible output files:
2963 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2964
2965 ac_rmfiles=
2966 for ac_file in $ac_files
2967 do
2968   case $ac_file in
2969     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2970     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2971   esac
2972 done
2973 rm -f $ac_rmfiles
2974
2975 if { { ac_try="$ac_link_default"
2976 case "(($ac_try" in
2977   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2978   *) ac_try_echo=$ac_try;;
2979 esac
2980 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2981 $as_echo "$ac_try_echo"; } >&5
2982   (eval "$ac_link_default") 2>&5
2983   ac_status=$?
2984   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2985   test $ac_status = 0; }; then :
2986   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2987 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2988 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2989 # so that the user can short-circuit this test for compilers unknown to
2990 # Autoconf.
2991 for ac_file in $ac_files ''
2992 do
2993   test -f "$ac_file" || continue
2994   case $ac_file in
2995     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2996         ;;
2997     [ab].out )
2998         # We found the default executable, but exeext='' is most
2999         # certainly right.
3000         break;;
3001     *.* )
3002         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3003         then :; else
3004            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3005         fi
3006         # We set ac_cv_exeext here because the later test for it is not
3007         # safe: cross compilers may not add the suffix if given an `-o'
3008         # argument, so we may need to know it at that point already.
3009         # Even if this section looks crufty: it has the advantage of
3010         # actually working.
3011         break;;
3012     * )
3013         break;;
3014   esac
3015 done
3016 test "$ac_cv_exeext" = no && ac_cv_exeext=
3017
3018 else
3019   ac_file=''
3020 fi
3021 if test -z "$ac_file"; then :
3022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3023 $as_echo "no" >&6; }
3024 $as_echo "$as_me: failed program was:" >&5
3025 sed 's/^/| /' conftest.$ac_ext >&5
3026
3027 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3028 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3029 as_fn_error 77 "C compiler cannot create executables
3030 See \`config.log' for more details" "$LINENO" 5; }
3031 else
3032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3033 $as_echo "yes" >&6; }
3034 fi
3035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3036 $as_echo_n "checking for C compiler default output file name... " >&6; }
3037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3038 $as_echo "$ac_file" >&6; }
3039 ac_exeext=$ac_cv_exeext
3040
3041 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3042 ac_clean_files=$ac_clean_files_save
3043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3044 $as_echo_n "checking for suffix of executables... " >&6; }
3045 if { { ac_try="$ac_link"
3046 case "(($ac_try" in
3047   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3048   *) ac_try_echo=$ac_try;;
3049 esac
3050 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3051 $as_echo "$ac_try_echo"; } >&5
3052   (eval "$ac_link") 2>&5
3053   ac_status=$?
3054   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3055   test $ac_status = 0; }; then :
3056   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3057 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3058 # work properly (i.e., refer to `conftest.exe'), while it won't with
3059 # `rm'.
3060 for ac_file in conftest.exe conftest conftest.*; do
3061   test -f "$ac_file" || continue
3062   case $ac_file in
3063     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3064     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3065           break;;
3066     * ) break;;
3067   esac
3068 done
3069 else
3070   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3071 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3072 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3073 See \`config.log' for more details" "$LINENO" 5; }
3074 fi
3075 rm -f conftest conftest$ac_cv_exeext
3076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3077 $as_echo "$ac_cv_exeext" >&6; }
3078
3079 rm -f conftest.$ac_ext
3080 EXEEXT=$ac_cv_exeext
3081 ac_exeext=$EXEEXT
3082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3083 /* end confdefs.h.  */
3084 #include <stdio.h>
3085 int
3086 main ()
3087 {
3088 FILE *f = fopen ("conftest.out", "w");
3089  return ferror (f) || fclose (f) != 0;
3090
3091   ;
3092   return 0;
3093 }
3094 _ACEOF
3095 ac_clean_files="$ac_clean_files conftest.out"
3096 # Check that the compiler produces executables we can run.  If not, either
3097 # the compiler is broken, or we cross compile.
3098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3099 $as_echo_n "checking whether we are cross compiling... " >&6; }
3100 if test "$cross_compiling" != yes; then
3101   { { ac_try="$ac_link"
3102 case "(($ac_try" in
3103   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3104   *) ac_try_echo=$ac_try;;
3105 esac
3106 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3107 $as_echo "$ac_try_echo"; } >&5
3108   (eval "$ac_link") 2>&5
3109   ac_status=$?
3110   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3111   test $ac_status = 0; }
3112   if { ac_try='./conftest$ac_cv_exeext'
3113   { { case "(($ac_try" in
3114   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3115   *) ac_try_echo=$ac_try;;
3116 esac
3117 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3118 $as_echo "$ac_try_echo"; } >&5
3119   (eval "$ac_try") 2>&5
3120   ac_status=$?
3121   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3122   test $ac_status = 0; }; }; then
3123     cross_compiling=no
3124   else
3125     if test "$cross_compiling" = maybe; then
3126         cross_compiling=yes
3127     else
3128         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3129 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3130 as_fn_error $? "cannot run C compiled programs.
3131 If you meant to cross compile, use \`--host'.
3132 See \`config.log' for more details" "$LINENO" 5; }
3133     fi
3134   fi
3135 fi
3136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3137 $as_echo "$cross_compiling" >&6; }
3138
3139 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3140 ac_clean_files=$ac_clean_files_save
3141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3142 $as_echo_n "checking for suffix of object files... " >&6; }
3143 if ${ac_cv_objext+:} false; then :
3144   $as_echo_n "(cached) " >&6
3145 else
3146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3147 /* end confdefs.h.  */
3148
3149 int
3150 main ()
3151 {
3152
3153   ;
3154   return 0;
3155 }
3156 _ACEOF
3157 rm -f conftest.o conftest.obj
3158 if { { ac_try="$ac_compile"
3159 case "(($ac_try" in
3160   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3161   *) ac_try_echo=$ac_try;;
3162 esac
3163 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3164 $as_echo "$ac_try_echo"; } >&5
3165   (eval "$ac_compile") 2>&5
3166   ac_status=$?
3167   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3168   test $ac_status = 0; }; then :
3169   for ac_file in conftest.o conftest.obj conftest.*; do
3170   test -f "$ac_file" || continue;
3171   case $ac_file in
3172     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3173     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3174        break;;
3175   esac
3176 done
3177 else
3178   $as_echo "$as_me: failed program was:" >&5
3179 sed 's/^/| /' conftest.$ac_ext >&5
3180
3181 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3182 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3183 as_fn_error $? "cannot compute suffix of object files: cannot compile
3184 See \`config.log' for more details" "$LINENO" 5; }
3185 fi
3186 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3187 fi
3188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3189 $as_echo "$ac_cv_objext" >&6; }
3190 OBJEXT=$ac_cv_objext
3191 ac_objext=$OBJEXT
3192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3193 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3194 if ${ac_cv_c_compiler_gnu+:} false; then :
3195   $as_echo_n "(cached) " >&6
3196 else
3197   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3198 /* end confdefs.h.  */
3199
3200 int
3201 main ()
3202 {
3203 #ifndef __GNUC__
3204        choke me
3205 #endif
3206
3207   ;
3208   return 0;
3209 }
3210 _ACEOF
3211 if ac_fn_c_try_compile "$LINENO"; then :
3212   ac_compiler_gnu=yes
3213 else
3214   ac_compiler_gnu=no
3215 fi
3216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3217 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3218
3219 fi
3220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3221 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3222 if test $ac_compiler_gnu = yes; then
3223   GCC=yes
3224 else
3225   GCC=
3226 fi
3227 ac_test_CFLAGS=${CFLAGS+set}
3228 ac_save_CFLAGS=$CFLAGS
3229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3230 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3231 if ${ac_cv_prog_cc_g+:} false; then :
3232   $as_echo_n "(cached) " >&6
3233 else
3234   ac_save_c_werror_flag=$ac_c_werror_flag
3235    ac_c_werror_flag=yes
3236    ac_cv_prog_cc_g=no
3237    CFLAGS="-g"
3238    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3239 /* end confdefs.h.  */
3240
3241 int
3242 main ()
3243 {
3244
3245   ;
3246   return 0;
3247 }
3248 _ACEOF
3249 if ac_fn_c_try_compile "$LINENO"; then :
3250   ac_cv_prog_cc_g=yes
3251 else
3252   CFLAGS=""
3253       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3254 /* end confdefs.h.  */
3255
3256 int
3257 main ()
3258 {
3259
3260   ;
3261   return 0;
3262 }
3263 _ACEOF
3264 if ac_fn_c_try_compile "$LINENO"; then :
3265
3266 else
3267   ac_c_werror_flag=$ac_save_c_werror_flag
3268          CFLAGS="-g"
3269          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3270 /* end confdefs.h.  */
3271
3272 int
3273 main ()
3274 {
3275
3276   ;
3277   return 0;
3278 }
3279 _ACEOF
3280 if ac_fn_c_try_compile "$LINENO"; then :
3281   ac_cv_prog_cc_g=yes
3282 fi
3283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3284 fi
3285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3286 fi
3287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3288    ac_c_werror_flag=$ac_save_c_werror_flag
3289 fi
3290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3291 $as_echo "$ac_cv_prog_cc_g" >&6; }
3292 if test "$ac_test_CFLAGS" = set; then
3293   CFLAGS=$ac_save_CFLAGS
3294 elif test $ac_cv_prog_cc_g = yes; then
3295   if test "$GCC" = yes; then
3296     CFLAGS="-g -O2"
3297   else
3298     CFLAGS="-g"
3299   fi
3300 else
3301   if test "$GCC" = yes; then
3302     CFLAGS="-O2"
3303   else
3304     CFLAGS=
3305   fi
3306 fi
3307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3308 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3309 if ${ac_cv_prog_cc_c89+:} false; then :
3310   $as_echo_n "(cached) " >&6
3311 else
3312   ac_cv_prog_cc_c89=no
3313 ac_save_CC=$CC
3314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3315 /* end confdefs.h.  */
3316 #include <stdarg.h>
3317 #include <stdio.h>
3318 struct stat;
3319 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3320 struct buf { int x; };
3321 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3322 static char *e (p, i)
3323      char **p;
3324      int i;
3325 {
3326   return p[i];
3327 }
3328 static char *f (char * (*g) (char **, int), char **p, ...)
3329 {
3330   char *s;
3331   va_list v;
3332   va_start (v,p);
3333   s = g (p, va_arg (v,int));
3334   va_end (v);
3335   return s;
3336 }
3337
3338 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3339    function prototypes and stuff, but not '\xHH' hex character constants.
3340    These don't provoke an error unfortunately, instead are silently treated
3341    as 'x'.  The following induces an error, until -std is added to get
3342    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3343    array size at least.  It's necessary to write '\x00'==0 to get something
3344    that's true only with -std.  */
3345 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3346
3347 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3348    inside strings and character constants.  */
3349 #define FOO(x) 'x'
3350 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3351
3352 int test (int i, double x);
3353 struct s1 {int (*f) (int a);};
3354 struct s2 {int (*f) (double a);};
3355 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3356 int argc;
3357 char **argv;
3358 int
3359 main ()
3360 {
3361 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3362   ;
3363   return 0;
3364 }
3365 _ACEOF
3366 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3367         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3368 do
3369   CC="$ac_save_CC $ac_arg"
3370   if ac_fn_c_try_compile "$LINENO"; then :
3371   ac_cv_prog_cc_c89=$ac_arg
3372 fi
3373 rm -f core conftest.err conftest.$ac_objext
3374   test "x$ac_cv_prog_cc_c89" != "xno" && break
3375 done
3376 rm -f conftest.$ac_ext
3377 CC=$ac_save_CC
3378
3379 fi
3380 # AC_CACHE_VAL
3381 case "x$ac_cv_prog_cc_c89" in
3382   x)
3383     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3384 $as_echo "none needed" >&6; } ;;
3385   xno)
3386     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3387 $as_echo "unsupported" >&6; } ;;
3388   *)
3389     CC="$CC $ac_cv_prog_cc_c89"
3390     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3391 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3392 esac
3393 if test "x$ac_cv_prog_cc_c89" != xno; then :
3394
3395 fi
3396
3397 ac_ext=c
3398 ac_cpp='$CPP $CPPFLAGS'
3399 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3400 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3401 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3402
3403 ac_ext=cpp
3404 ac_cpp='$CXXCPP $CPPFLAGS'
3405 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3406 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3407 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3408 if test -z "$CXX"; then
3409   if test -n "$CCC"; then
3410     CXX=$CCC
3411   else
3412     if test -n "$ac_tool_prefix"; then
3413   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3414   do
3415     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3416 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3418 $as_echo_n "checking for $ac_word... " >&6; }
3419 if ${ac_cv_prog_CXX+:} false; then :
3420   $as_echo_n "(cached) " >&6
3421 else
3422   if test -n "$CXX"; then
3423   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3424 else
3425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3426 for as_dir in $PATH
3427 do
3428   IFS=$as_save_IFS
3429   test -z "$as_dir" && as_dir=.
3430     for ac_exec_ext in '' $ac_executable_extensions; do
3431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3432     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3434     break 2
3435   fi
3436 done
3437   done
3438 IFS=$as_save_IFS
3439
3440 fi
3441 fi
3442 CXX=$ac_cv_prog_CXX
3443 if test -n "$CXX"; then
3444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3445 $as_echo "$CXX" >&6; }
3446 else
3447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3448 $as_echo "no" >&6; }
3449 fi
3450
3451
3452     test -n "$CXX" && break
3453   done
3454 fi
3455 if test -z "$CXX"; then
3456   ac_ct_CXX=$CXX
3457   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3458 do
3459   # Extract the first word of "$ac_prog", so it can be a program name with args.
3460 set dummy $ac_prog; ac_word=$2
3461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3462 $as_echo_n "checking for $ac_word... " >&6; }
3463 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3464   $as_echo_n "(cached) " >&6
3465 else
3466   if test -n "$ac_ct_CXX"; then
3467   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3468 else
3469 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3470 for as_dir in $PATH
3471 do
3472   IFS=$as_save_IFS
3473   test -z "$as_dir" && as_dir=.
3474     for ac_exec_ext in '' $ac_executable_extensions; do
3475   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3476     ac_cv_prog_ac_ct_CXX="$ac_prog"
3477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3478     break 2
3479   fi
3480 done
3481   done
3482 IFS=$as_save_IFS
3483
3484 fi
3485 fi
3486 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3487 if test -n "$ac_ct_CXX"; then
3488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3489 $as_echo "$ac_ct_CXX" >&6; }
3490 else
3491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3492 $as_echo "no" >&6; }
3493 fi
3494
3495
3496   test -n "$ac_ct_CXX" && break
3497 done
3498
3499   if test "x$ac_ct_CXX" = x; then
3500     CXX="g++"
3501   else
3502     case $cross_compiling:$ac_tool_warned in
3503 yes:)
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3505 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3506 ac_tool_warned=yes ;;
3507 esac
3508     CXX=$ac_ct_CXX
3509   fi
3510 fi
3511
3512   fi
3513 fi
3514 # Provide some information about the compiler.
3515 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3516 set X $ac_compile
3517 ac_compiler=$2
3518 for ac_option in --version -v -V -qversion; do
3519   { { ac_try="$ac_compiler $ac_option >&5"
3520 case "(($ac_try" in
3521   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3522   *) ac_try_echo=$ac_try;;
3523 esac
3524 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3525 $as_echo "$ac_try_echo"; } >&5
3526   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3527   ac_status=$?
3528   if test -s conftest.err; then
3529     sed '10a\
3530 ... rest of stderr output deleted ...
3531          10q' conftest.err >conftest.er1
3532     cat conftest.er1 >&5
3533   fi
3534   rm -f conftest.er1 conftest.err
3535   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3536   test $ac_status = 0; }
3537 done
3538
3539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3540 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3541 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3542   $as_echo_n "(cached) " >&6
3543 else
3544   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3545 /* end confdefs.h.  */
3546
3547 int
3548 main ()
3549 {
3550 #ifndef __GNUC__
3551        choke me
3552 #endif
3553
3554   ;
3555   return 0;
3556 }
3557 _ACEOF
3558 if ac_fn_cxx_try_compile "$LINENO"; then :
3559   ac_compiler_gnu=yes
3560 else
3561   ac_compiler_gnu=no
3562 fi
3563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3564 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3565
3566 fi
3567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3568 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3569 if test $ac_compiler_gnu = yes; then
3570   GXX=yes
3571 else
3572   GXX=
3573 fi
3574 ac_test_CXXFLAGS=${CXXFLAGS+set}
3575 ac_save_CXXFLAGS=$CXXFLAGS
3576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3577 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3578 if ${ac_cv_prog_cxx_g+:} false; then :
3579   $as_echo_n "(cached) " >&6
3580 else
3581   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3582    ac_cxx_werror_flag=yes
3583    ac_cv_prog_cxx_g=no
3584    CXXFLAGS="-g"
3585    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3586 /* end confdefs.h.  */
3587
3588 int
3589 main ()
3590 {
3591
3592   ;
3593   return 0;
3594 }
3595 _ACEOF
3596 if ac_fn_cxx_try_compile "$LINENO"; then :
3597   ac_cv_prog_cxx_g=yes
3598 else
3599   CXXFLAGS=""
3600       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3601 /* end confdefs.h.  */
3602
3603 int
3604 main ()
3605 {
3606
3607   ;
3608   return 0;
3609 }
3610 _ACEOF
3611 if ac_fn_cxx_try_compile "$LINENO"; then :
3612
3613 else
3614   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3615          CXXFLAGS="-g"
3616          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3617 /* end confdefs.h.  */
3618
3619 int
3620 main ()
3621 {
3622
3623   ;
3624   return 0;
3625 }
3626 _ACEOF
3627 if ac_fn_cxx_try_compile "$LINENO"; then :
3628   ac_cv_prog_cxx_g=yes
3629 fi
3630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3631 fi
3632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3633 fi
3634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3635    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3636 fi
3637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3638 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3639 if test "$ac_test_CXXFLAGS" = set; then
3640   CXXFLAGS=$ac_save_CXXFLAGS
3641 elif test $ac_cv_prog_cxx_g = yes; then
3642   if test "$GXX" = yes; then
3643     CXXFLAGS="-g -O2"
3644   else
3645     CXXFLAGS="-g"
3646   fi
3647 else
3648   if test "$GXX" = yes; then
3649     CXXFLAGS="-O2"
3650   else
3651     CXXFLAGS=
3652   fi
3653 fi
3654 ac_ext=c
3655 ac_cpp='$CPP $CPPFLAGS'
3656 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3657 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3658 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3659
3660
3661
3662 ac_ext=c
3663 ac_cpp='$CPP $CPPFLAGS'
3664 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3665 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3666 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3668 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3669 # On Suns, sometimes $CPP names a directory.
3670 if test -n "$CPP" && test -d "$CPP"; then
3671   CPP=
3672 fi
3673 if test -z "$CPP"; then
3674   if ${ac_cv_prog_CPP+:} false; then :
3675   $as_echo_n "(cached) " >&6
3676 else
3677       # Double quotes because CPP needs to be expanded
3678     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3679     do
3680       ac_preproc_ok=false
3681 for ac_c_preproc_warn_flag in '' yes
3682 do
3683   # Use a header file that comes with gcc, so configuring glibc
3684   # with a fresh cross-compiler works.
3685   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3686   # <limits.h> exists even on freestanding compilers.
3687   # On the NeXT, cc -E runs the code through the compiler's parser,
3688   # not just through cpp. "Syntax error" is here to catch this case.
3689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3690 /* end confdefs.h.  */
3691 #ifdef __STDC__
3692 # include <limits.h>
3693 #else
3694 # include <assert.h>
3695 #endif
3696                      Syntax error
3697 _ACEOF
3698 if ac_fn_c_try_cpp "$LINENO"; then :
3699
3700 else
3701   # Broken: fails on valid input.
3702 continue
3703 fi
3704 rm -f conftest.err conftest.i conftest.$ac_ext
3705
3706   # OK, works on sane cases.  Now check whether nonexistent headers
3707   # can be detected and how.
3708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3709 /* end confdefs.h.  */
3710 #include <ac_nonexistent.h>
3711 _ACEOF
3712 if ac_fn_c_try_cpp "$LINENO"; then :
3713   # Broken: success on invalid input.
3714 continue
3715 else
3716   # Passes both tests.
3717 ac_preproc_ok=:
3718 break
3719 fi
3720 rm -f conftest.err conftest.i conftest.$ac_ext
3721
3722 done
3723 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3724 rm -f conftest.i conftest.err conftest.$ac_ext
3725 if $ac_preproc_ok; then :
3726   break
3727 fi
3728
3729     done
3730     ac_cv_prog_CPP=$CPP
3731
3732 fi
3733   CPP=$ac_cv_prog_CPP
3734 else
3735   ac_cv_prog_CPP=$CPP
3736 fi
3737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3738 $as_echo "$CPP" >&6; }
3739 ac_preproc_ok=false
3740 for ac_c_preproc_warn_flag in '' yes
3741 do
3742   # Use a header file that comes with gcc, so configuring glibc
3743   # with a fresh cross-compiler works.
3744   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3745   # <limits.h> exists even on freestanding compilers.
3746   # On the NeXT, cc -E runs the code through the compiler's parser,
3747   # not just through cpp. "Syntax error" is here to catch this case.
3748   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3749 /* end confdefs.h.  */
3750 #ifdef __STDC__
3751 # include <limits.h>
3752 #else
3753 # include <assert.h>
3754 #endif
3755                      Syntax error
3756 _ACEOF
3757 if ac_fn_c_try_cpp "$LINENO"; then :
3758
3759 else
3760   # Broken: fails on valid input.
3761 continue
3762 fi
3763 rm -f conftest.err conftest.i conftest.$ac_ext
3764
3765   # OK, works on sane cases.  Now check whether nonexistent headers
3766   # can be detected and how.
3767   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3768 /* end confdefs.h.  */
3769 #include <ac_nonexistent.h>
3770 _ACEOF
3771 if ac_fn_c_try_cpp "$LINENO"; then :
3772   # Broken: success on invalid input.
3773 continue
3774 else
3775   # Passes both tests.
3776 ac_preproc_ok=:
3777 break
3778 fi
3779 rm -f conftest.err conftest.i conftest.$ac_ext
3780
3781 done
3782 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3783 rm -f conftest.i conftest.err conftest.$ac_ext
3784 if $ac_preproc_ok; then :
3785
3786 else
3787   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3788 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3789 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3790 See \`config.log' for more details" "$LINENO" 5; }
3791 fi
3792
3793 ac_ext=c
3794 ac_cpp='$CPP $CPPFLAGS'
3795 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3796 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3797 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3798
3799
3800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3801 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3802 if ${ac_cv_path_GREP+:} false; then :
3803   $as_echo_n "(cached) " >&6
3804 else
3805   if test -z "$GREP"; then
3806   ac_path_GREP_found=false
3807   # Loop through the user's path and test for each of PROGNAME-LIST
3808   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3809 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3810 do
3811   IFS=$as_save_IFS
3812   test -z "$as_dir" && as_dir=.
3813     for ac_prog in grep ggrep; do
3814     for ac_exec_ext in '' $ac_executable_extensions; do
3815       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3816       as_fn_executable_p "$ac_path_GREP" || continue
3817 # Check for GNU ac_path_GREP and select it if it is found.
3818   # Check for GNU $ac_path_GREP
3819 case `"$ac_path_GREP" --version 2>&1` in
3820 *GNU*)
3821   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3822 *)
3823   ac_count=0
3824   $as_echo_n 0123456789 >"conftest.in"
3825   while :
3826   do
3827     cat "conftest.in" "conftest.in" >"conftest.tmp"
3828     mv "conftest.tmp" "conftest.in"
3829     cp "conftest.in" "conftest.nl"
3830     $as_echo 'GREP' >> "conftest.nl"
3831     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3832     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3833     as_fn_arith $ac_count + 1 && ac_count=$as_val
3834     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3835       # Best one so far, save it but keep looking for a better one
3836       ac_cv_path_GREP="$ac_path_GREP"
3837       ac_path_GREP_max=$ac_count
3838     fi
3839     # 10*(2^10) chars as input seems more than enough
3840     test $ac_count -gt 10 && break
3841   done
3842   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3843 esac
3844
3845       $ac_path_GREP_found && break 3
3846     done
3847   done
3848   done
3849 IFS=$as_save_IFS
3850   if test -z "$ac_cv_path_GREP"; then
3851     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3852   fi
3853 else
3854   ac_cv_path_GREP=$GREP
3855 fi
3856
3857 fi
3858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3859 $as_echo "$ac_cv_path_GREP" >&6; }
3860  GREP="$ac_cv_path_GREP"
3861
3862
3863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3864 $as_echo_n "checking for egrep... " >&6; }
3865 if ${ac_cv_path_EGREP+:} false; then :
3866   $as_echo_n "(cached) " >&6
3867 else
3868   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3869    then ac_cv_path_EGREP="$GREP -E"
3870    else
3871      if test -z "$EGREP"; then
3872   ac_path_EGREP_found=false
3873   # Loop through the user's path and test for each of PROGNAME-LIST
3874   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3875 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3876 do
3877   IFS=$as_save_IFS
3878   test -z "$as_dir" && as_dir=.
3879     for ac_prog in egrep; do
3880     for ac_exec_ext in '' $ac_executable_extensions; do
3881       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3882       as_fn_executable_p "$ac_path_EGREP" || continue
3883 # Check for GNU ac_path_EGREP and select it if it is found.
3884   # Check for GNU $ac_path_EGREP
3885 case `"$ac_path_EGREP" --version 2>&1` in
3886 *GNU*)
3887   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3888 *)
3889   ac_count=0
3890   $as_echo_n 0123456789 >"conftest.in"
3891   while :
3892   do
3893     cat "conftest.in" "conftest.in" >"conftest.tmp"
3894     mv "conftest.tmp" "conftest.in"
3895     cp "conftest.in" "conftest.nl"
3896     $as_echo 'EGREP' >> "conftest.nl"
3897     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3898     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3899     as_fn_arith $ac_count + 1 && ac_count=$as_val
3900     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3901       # Best one so far, save it but keep looking for a better one
3902       ac_cv_path_EGREP="$ac_path_EGREP"
3903       ac_path_EGREP_max=$ac_count
3904     fi
3905     # 10*(2^10) chars as input seems more than enough
3906     test $ac_count -gt 10 && break
3907   done
3908   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3909 esac
3910
3911       $ac_path_EGREP_found && break 3
3912     done
3913   done
3914   done
3915 IFS=$as_save_IFS
3916   if test -z "$ac_cv_path_EGREP"; then
3917     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3918   fi
3919 else
3920   ac_cv_path_EGREP=$EGREP
3921 fi
3922
3923    fi
3924 fi
3925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3926 $as_echo "$ac_cv_path_EGREP" >&6; }
3927  EGREP="$ac_cv_path_EGREP"
3928
3929
3930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3931 $as_echo_n "checking for ANSI C header files... " >&6; }
3932 if ${ac_cv_header_stdc+:} false; then :
3933   $as_echo_n "(cached) " >&6
3934 else
3935   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3936 /* end confdefs.h.  */
3937 #include <stdlib.h>
3938 #include <stdarg.h>
3939 #include <string.h>
3940 #include <float.h>
3941
3942 int
3943 main ()
3944 {
3945
3946   ;
3947   return 0;
3948 }
3949 _ACEOF
3950 if ac_fn_c_try_compile "$LINENO"; then :
3951   ac_cv_header_stdc=yes
3952 else
3953   ac_cv_header_stdc=no
3954 fi
3955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3956
3957 if test $ac_cv_header_stdc = yes; then
3958   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3959   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3960 /* end confdefs.h.  */
3961 #include <string.h>
3962
3963 _ACEOF
3964 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3965   $EGREP "memchr" >/dev/null 2>&1; then :
3966
3967 else
3968   ac_cv_header_stdc=no
3969 fi
3970 rm -f conftest*
3971
3972 fi
3973
3974 if test $ac_cv_header_stdc = yes; then
3975   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3976   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3977 /* end confdefs.h.  */
3978 #include <stdlib.h>
3979
3980 _ACEOF
3981 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3982   $EGREP "free" >/dev/null 2>&1; then :
3983
3984 else
3985   ac_cv_header_stdc=no
3986 fi
3987 rm -f conftest*
3988
3989 fi
3990
3991 if test $ac_cv_header_stdc = yes; then
3992   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3993   if test "$cross_compiling" = yes; then :
3994   :
3995 else
3996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3997 /* end confdefs.h.  */
3998 #include <ctype.h>
3999 #include <stdlib.h>
4000 #if ((' ' & 0x0FF) == 0x020)
4001 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4002 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4003 #else
4004 # define ISLOWER(c) \
4005                    (('a' <= (c) && (c) <= 'i') \
4006                      || ('j' <= (c) && (c) <= 'r') \
4007                      || ('s' <= (c) && (c) <= 'z'))
4008 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4009 #endif
4010
4011 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4012 int
4013 main ()
4014 {
4015   int i;
4016   for (i = 0; i < 256; i++)
4017     if (XOR (islower (i), ISLOWER (i))
4018         || toupper (i) != TOUPPER (i))
4019       return 2;
4020   return 0;
4021 }
4022 _ACEOF
4023 if ac_fn_c_try_run "$LINENO"; then :
4024
4025 else
4026   ac_cv_header_stdc=no
4027 fi
4028 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4029   conftest.$ac_objext conftest.beam conftest.$ac_ext
4030 fi
4031
4032 fi
4033 fi
4034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4035 $as_echo "$ac_cv_header_stdc" >&6; }
4036 if test $ac_cv_header_stdc = yes; then
4037
4038 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4039
4040 fi
4041
4042 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4043 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4044                   inttypes.h stdint.h unistd.h
4045 do :
4046   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4047 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4048 "
4049 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4050   cat >>confdefs.h <<_ACEOF
4051 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4052 _ACEOF
4053
4054 fi
4055
4056 done
4057
4058
4059
4060   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4061 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4062   MINIX=yes
4063 else
4064   MINIX=
4065 fi
4066
4067
4068   if test "$MINIX" = yes; then
4069
4070 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4071
4072
4073 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4074
4075
4076 $as_echo "#define _MINIX 1" >>confdefs.h
4077
4078   fi
4079
4080
4081   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4082 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4083 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4084   $as_echo_n "(cached) " >&6
4085 else
4086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4087 /* end confdefs.h.  */
4088
4089 #         define __EXTENSIONS__ 1
4090           $ac_includes_default
4091 int
4092 main ()
4093 {
4094
4095   ;
4096   return 0;
4097 }
4098 _ACEOF
4099 if ac_fn_c_try_compile "$LINENO"; then :
4100   ac_cv_safe_to_define___extensions__=yes
4101 else
4102   ac_cv_safe_to_define___extensions__=no
4103 fi
4104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4105 fi
4106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4107 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4108   test $ac_cv_safe_to_define___extensions__ = yes &&
4109     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4110
4111   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4112
4113   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4114
4115   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4116
4117   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4118
4119
4120
4121
4122 if test $ac_cv_c_compiler_gnu = yes; then
4123     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
4124 $as_echo_n "checking whether $CC needs -traditional... " >&6; }
4125 if ${ac_cv_prog_gcc_traditional+:} false; then :
4126   $as_echo_n "(cached) " >&6
4127 else
4128     ac_pattern="Autoconf.*'x'"
4129   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4130 /* end confdefs.h.  */
4131 #include <sgtty.h>
4132 Autoconf TIOCGETP
4133 _ACEOF
4134 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4135   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
4136   ac_cv_prog_gcc_traditional=yes
4137 else
4138   ac_cv_prog_gcc_traditional=no
4139 fi
4140 rm -f conftest*
4141
4142
4143   if test $ac_cv_prog_gcc_traditional = no; then
4144     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4145 /* end confdefs.h.  */
4146 #include <termio.h>
4147 Autoconf TCGETA
4148 _ACEOF
4149 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4150   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
4151   ac_cv_prog_gcc_traditional=yes
4152 fi
4153 rm -f conftest*
4154
4155   fi
4156 fi
4157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
4158 $as_echo "$ac_cv_prog_gcc_traditional" >&6; }
4159   if test $ac_cv_prog_gcc_traditional = yes; then
4160     CC="$CC -traditional"
4161   fi
4162 fi
4163
4164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using SUNPro C" >&5
4165 $as_echo_n "checking whether we are using SUNPro C... " >&6; }
4166 if ${ac_cv_prog_suncc+:} false; then :
4167   $as_echo_n "(cached) " >&6
4168 else
4169   cat > conftest.c <<EOF
4170 #ifdef __SUNPRO_C
4171   yes;
4172 #endif
4173 EOF
4174 if { ac_try='${CC-cc} -E conftest.c'
4175   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
4176   (eval $ac_try) 2>&5
4177   ac_status=$?
4178   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4179   test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
4180   ac_cv_prog_suncc=yes
4181 else
4182   ac_cv_prog_suncc=no
4183 fi
4184 fi
4185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_suncc" >&5
4186 $as_echo "$ac_cv_prog_suncc" >&6; }
4187 if test -n "$ac_tool_prefix"; then
4188   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4189 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4191 $as_echo_n "checking for $ac_word... " >&6; }
4192 if ${ac_cv_prog_RANLIB+:} false; then :
4193   $as_echo_n "(cached) " >&6
4194 else
4195   if test -n "$RANLIB"; then
4196   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4197 else
4198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4199 for as_dir in $PATH
4200 do
4201   IFS=$as_save_IFS
4202   test -z "$as_dir" && as_dir=.
4203     for ac_exec_ext in '' $ac_executable_extensions; do
4204   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4205     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4206     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4207     break 2
4208   fi
4209 done
4210   done
4211 IFS=$as_save_IFS
4212
4213 fi
4214 fi
4215 RANLIB=$ac_cv_prog_RANLIB
4216 if test -n "$RANLIB"; then
4217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4218 $as_echo "$RANLIB" >&6; }
4219 else
4220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4221 $as_echo "no" >&6; }
4222 fi
4223
4224
4225 fi
4226 if test -z "$ac_cv_prog_RANLIB"; then
4227   ac_ct_RANLIB=$RANLIB
4228   # Extract the first word of "ranlib", so it can be a program name with args.
4229 set dummy ranlib; ac_word=$2
4230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4231 $as_echo_n "checking for $ac_word... " >&6; }
4232 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4233   $as_echo_n "(cached) " >&6
4234 else
4235   if test -n "$ac_ct_RANLIB"; then
4236   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4237 else
4238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4239 for as_dir in $PATH
4240 do
4241   IFS=$as_save_IFS
4242   test -z "$as_dir" && as_dir=.
4243     for ac_exec_ext in '' $ac_executable_extensions; do
4244   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4245     ac_cv_prog_ac_ct_RANLIB="ranlib"
4246     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4247     break 2
4248   fi
4249 done
4250   done
4251 IFS=$as_save_IFS
4252
4253 fi
4254 fi
4255 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4256 if test -n "$ac_ct_RANLIB"; then
4257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4258 $as_echo "$ac_ct_RANLIB" >&6; }
4259 else
4260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4261 $as_echo "no" >&6; }
4262 fi
4263
4264   if test "x$ac_ct_RANLIB" = x; then
4265     RANLIB=":"
4266   else
4267     case $cross_compiling:$ac_tool_warned in
4268 yes:)
4269 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4270 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4271 ac_tool_warned=yes ;;
4272 esac
4273     RANLIB=$ac_ct_RANLIB
4274   fi
4275 else
4276   RANLIB="$ac_cv_prog_RANLIB"
4277 fi
4278
4279
4280
4281   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is clang" >&5
4282 $as_echo_n "checking if compiler is clang... " >&6; }
4283 if ${ax_cv_cc_clang+:} false; then :
4284   $as_echo_n "(cached) " >&6
4285 else
4286
4287
4288   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4289 /* end confdefs.h.  */
4290
4291 int
4292 main ()
4293 {
4294
4295     #ifndef __clang__
4296          not clang
4297     #endif
4298
4299   ;
4300   return 0;
4301 }
4302 _ACEOF
4303 if ac_fn_c_try_compile "$LINENO"; then :
4304   ax_cv_cc_clang=yes
4305 else
4306   ax_cv_cc_clang=no
4307 fi
4308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4309
4310 fi
4311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_clang" >&5
4312 $as_echo "$ax_cv_cc_clang" >&6; }
4313
4314 if test "x$ax_cv_cc_clang" = "xyes"; then
4315   clang_path="$CC"
4316
4317 else
4318   clang_path=""
4319
4320 fi
4321
4322
4323 if test "x$GCC" = "xyes"; then
4324   CFLAGS="$CFLAGS -Wall -std=c99 -D_GNU_SOURCE"
4325 fi
4326
4327
4328   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Qunused-arguments\"" >&5
4329 $as_echo_n "checking for the compiler flag \"-Qunused-arguments\"... " >&6; }
4330 if ${ax_cv_cc_qunused_arguments_flag+:} false; then :
4331   $as_echo_n "(cached) " >&6
4332 else
4333
4334
4335     CFLAGS_SAVED=$CFLAGS
4336     CFLAGS="$CFLAGS -Werror -Qunused-arguments -foobar"
4337
4338     ac_ext=c
4339 ac_cpp='$CPP $CPPFLAGS'
4340 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4341 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4342 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4343
4344     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4345 /* end confdefs.h.  */
4346
4347 int
4348 main ()
4349 {
4350 return 0;
4351   ;
4352   return 0;
4353 }
4354 _ACEOF
4355 if ac_fn_c_try_compile "$LINENO"; then :
4356   ax_cv_cc_qunused_arguments_flag="yes"
4357 else
4358   ax_cv_cc_qunused_arguments_flag="no"
4359 fi
4360 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4361     ac_ext=c
4362 ac_cpp='$CPP $CPPFLAGS'
4363 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4364 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4365 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4366
4367
4368     CFLAGS="$CFLAGS_SAVED"
4369
4370 fi
4371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_qunused_arguments_flag" >&5
4372 $as_echo "$ax_cv_cc_qunused_arguments_flag" >&6; }
4373
4374 if test "x$ax_cv_cc_qunused_arguments_flag" = "xyes"; then
4375   CFLAGS="$CFLAGS -Qunused-arguments"
4376   LDFLAGS="$LDFLAGS -Qunused-arguments"
4377 fi
4378
4379 # Check whether --enable-largefile was given.
4380 if test "${enable_largefile+set}" = set; then :
4381   enableval=$enable_largefile;
4382 fi
4383
4384 if test "$enable_largefile" != no; then
4385
4386   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4387 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4388 if ${ac_cv_sys_largefile_CC+:} false; then :
4389   $as_echo_n "(cached) " >&6
4390 else
4391   ac_cv_sys_largefile_CC=no
4392      if test "$GCC" != yes; then
4393        ac_save_CC=$CC
4394        while :; do
4395          # IRIX 6.2 and later do not support large files by default,
4396          # so use the C compiler's -n32 option if that helps.
4397          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4398 /* end confdefs.h.  */
4399 #include <sys/types.h>
4400  /* Check that off_t can represent 2**63 - 1 correctly.
4401     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4402     since some C++ compilers masquerading as C compilers
4403     incorrectly reject 9223372036854775807.  */
4404 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4405   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4406                        && LARGE_OFF_T % 2147483647 == 1)
4407                       ? 1 : -1];
4408 int
4409 main ()
4410 {
4411
4412   ;
4413   return 0;
4414 }
4415 _ACEOF
4416          if ac_fn_c_try_compile "$LINENO"; then :
4417   break
4418 fi
4419 rm -f core conftest.err conftest.$ac_objext
4420          CC="$CC -n32"
4421          if ac_fn_c_try_compile "$LINENO"; then :
4422   ac_cv_sys_largefile_CC=' -n32'; break
4423 fi
4424 rm -f core conftest.err conftest.$ac_objext
4425          break
4426        done
4427        CC=$ac_save_CC
4428        rm -f conftest.$ac_ext
4429     fi
4430 fi
4431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4432 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4433   if test "$ac_cv_sys_largefile_CC" != no; then
4434     CC=$CC$ac_cv_sys_largefile_CC
4435   fi
4436
4437   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4438 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4439 if ${ac_cv_sys_file_offset_bits+:} false; then :
4440   $as_echo_n "(cached) " >&6
4441 else
4442   while :; do
4443   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4444 /* end confdefs.h.  */
4445 #include <sys/types.h>
4446  /* Check that off_t can represent 2**63 - 1 correctly.
4447     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4448     since some C++ compilers masquerading as C compilers
4449     incorrectly reject 9223372036854775807.  */
4450 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4451   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4452                        && LARGE_OFF_T % 2147483647 == 1)
4453                       ? 1 : -1];
4454 int
4455 main ()
4456 {
4457
4458   ;
4459   return 0;
4460 }
4461 _ACEOF
4462 if ac_fn_c_try_compile "$LINENO"; then :
4463   ac_cv_sys_file_offset_bits=no; break
4464 fi
4465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4466   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4467 /* end confdefs.h.  */
4468 #define _FILE_OFFSET_BITS 64
4469 #include <sys/types.h>
4470  /* Check that off_t can represent 2**63 - 1 correctly.
4471     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4472     since some C++ compilers masquerading as C compilers
4473     incorrectly reject 9223372036854775807.  */
4474 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4475   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4476                        && LARGE_OFF_T % 2147483647 == 1)
4477                       ? 1 : -1];
4478 int
4479 main ()
4480 {
4481
4482   ;
4483   return 0;
4484 }
4485 _ACEOF
4486 if ac_fn_c_try_compile "$LINENO"; then :
4487   ac_cv_sys_file_offset_bits=64; break
4488 fi
4489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4490   ac_cv_sys_file_offset_bits=unknown
4491   break
4492 done
4493 fi
4494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4495 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4496 case $ac_cv_sys_file_offset_bits in #(
4497   no | unknown) ;;
4498   *)
4499 cat >>confdefs.h <<_ACEOF
4500 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4501 _ACEOF
4502 ;;
4503 esac
4504 rm -rf conftest*
4505   if test $ac_cv_sys_file_offset_bits = unknown; then
4506     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4507 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4508 if ${ac_cv_sys_large_files+:} false; then :
4509   $as_echo_n "(cached) " >&6
4510 else
4511   while :; do
4512   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4513 /* end confdefs.h.  */
4514 #include <sys/types.h>
4515  /* Check that off_t can represent 2**63 - 1 correctly.
4516     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4517     since some C++ compilers masquerading as C compilers
4518     incorrectly reject 9223372036854775807.  */
4519 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4520   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4521                        && LARGE_OFF_T % 2147483647 == 1)
4522                       ? 1 : -1];
4523 int
4524 main ()
4525 {
4526
4527   ;
4528   return 0;
4529 }
4530 _ACEOF
4531 if ac_fn_c_try_compile "$LINENO"; then :
4532   ac_cv_sys_large_files=no; break
4533 fi
4534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4535   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4536 /* end confdefs.h.  */
4537 #define _LARGE_FILES 1
4538 #include <sys/types.h>
4539  /* Check that off_t can represent 2**63 - 1 correctly.
4540     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4541     since some C++ compilers masquerading as C compilers
4542     incorrectly reject 9223372036854775807.  */
4543 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4544   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4545                        && LARGE_OFF_T % 2147483647 == 1)
4546                       ? 1 : -1];
4547 int
4548 main ()
4549 {
4550
4551   ;
4552   return 0;
4553 }
4554 _ACEOF
4555 if ac_fn_c_try_compile "$LINENO"; then :
4556   ac_cv_sys_large_files=1; break
4557 fi
4558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4559   ac_cv_sys_large_files=unknown
4560   break
4561 done
4562 fi
4563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4564 $as_echo "$ac_cv_sys_large_files" >&6; }
4565 case $ac_cv_sys_large_files in #(
4566   no | unknown) ;;
4567   *)
4568 cat >>confdefs.h <<_ACEOF
4569 #define _LARGE_FILES $ac_cv_sys_large_files
4570 _ACEOF
4571 ;;
4572 esac
4573 rm -rf conftest*
4574   fi
4575
4576
4577 fi
4578
4579
4580  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
4581 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
4582 if ${ac_cv_c_bigendian+:} false; then :
4583   $as_echo_n "(cached) " >&6
4584 else
4585   ac_cv_c_bigendian=unknown
4586     # See if we're dealing with a universal compiler.
4587     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4588 /* end confdefs.h.  */
4589 #ifndef __APPLE_CC__
4590                not a universal capable compiler
4591              #endif
4592              typedef int dummy;
4593
4594 _ACEOF
4595 if ac_fn_c_try_compile "$LINENO"; then :
4596
4597         # Check for potential -arch flags.  It is not universal unless
4598         # there are at least two -arch flags with different values.
4599         ac_arch=
4600         ac_prev=
4601         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
4602          if test -n "$ac_prev"; then
4603            case $ac_word in
4604              i?86 | x86_64 | ppc | ppc64)
4605                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
4606                  ac_arch=$ac_word
4607                else
4608                  ac_cv_c_bigendian=universal
4609                  break
4610                fi
4611                ;;
4612            esac
4613            ac_prev=
4614          elif test "x$ac_word" = "x-arch"; then
4615            ac_prev=arch
4616          fi
4617        done
4618 fi
4619 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4620     if test $ac_cv_c_bigendian = unknown; then
4621       # See if sys/param.h defines the BYTE_ORDER macro.
4622       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4623 /* end confdefs.h.  */
4624 #include <sys/types.h>
4625              #include <sys/param.h>
4626
4627 int
4628 main ()
4629 {
4630 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
4631                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
4632                      && LITTLE_ENDIAN)
4633               bogus endian macros
4634              #endif
4635
4636   ;
4637   return 0;
4638 }
4639 _ACEOF
4640 if ac_fn_c_try_compile "$LINENO"; then :
4641   # It does; now see whether it defined to BIG_ENDIAN or not.
4642          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4643 /* end confdefs.h.  */
4644 #include <sys/types.h>
4645                 #include <sys/param.h>
4646
4647 int
4648 main ()
4649 {
4650 #if BYTE_ORDER != BIG_ENDIAN
4651                  not big endian
4652                 #endif
4653
4654   ;
4655   return 0;
4656 }
4657 _ACEOF
4658 if ac_fn_c_try_compile "$LINENO"; then :
4659   ac_cv_c_bigendian=yes
4660 else
4661   ac_cv_c_bigendian=no
4662 fi
4663 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4664 fi
4665 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4666     fi
4667     if test $ac_cv_c_bigendian = unknown; then
4668       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
4669       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4670 /* end confdefs.h.  */
4671 #include <limits.h>
4672
4673 int
4674 main ()
4675 {
4676 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
4677               bogus endian macros
4678              #endif
4679
4680   ;
4681   return 0;
4682 }
4683 _ACEOF
4684 if ac_fn_c_try_compile "$LINENO"; then :
4685   # It does; now see whether it defined to _BIG_ENDIAN or not.
4686          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4687 /* end confdefs.h.  */
4688 #include <limits.h>
4689
4690 int
4691 main ()
4692 {
4693 #ifndef _BIG_ENDIAN
4694                  not big endian
4695                 #endif
4696
4697   ;
4698   return 0;
4699 }
4700 _ACEOF
4701 if ac_fn_c_try_compile "$LINENO"; then :
4702   ac_cv_c_bigendian=yes
4703 else
4704   ac_cv_c_bigendian=no
4705 fi
4706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4707 fi
4708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4709     fi
4710     if test $ac_cv_c_bigendian = unknown; then
4711       # Compile a test program.
4712       if test "$cross_compiling" = yes; then :
4713   # Try to guess by grepping values from an object file.
4714          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4715 /* end confdefs.h.  */
4716 short int ascii_mm[] =
4717                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4718                 short int ascii_ii[] =
4719                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4720                 int use_ascii (int i) {
4721                   return ascii_mm[i] + ascii_ii[i];
4722                 }
4723                 short int ebcdic_ii[] =
4724                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4725                 short int ebcdic_mm[] =
4726                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4727                 int use_ebcdic (int i) {
4728                   return ebcdic_mm[i] + ebcdic_ii[i];
4729                 }
4730                 extern int foo;
4731
4732 int
4733 main ()
4734 {
4735 return use_ascii (foo) == use_ebcdic (foo);
4736   ;
4737   return 0;
4738 }
4739 _ACEOF
4740 if ac_fn_c_try_compile "$LINENO"; then :
4741   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
4742               ac_cv_c_bigendian=yes
4743             fi
4744             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4745               if test "$ac_cv_c_bigendian" = unknown; then
4746                 ac_cv_c_bigendian=no
4747               else
4748                 # finding both strings is unlikely to happen, but who knows?
4749                 ac_cv_c_bigendian=unknown
4750               fi
4751             fi
4752 fi
4753 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4754 else
4755   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4756 /* end confdefs.h.  */
4757 $ac_includes_default
4758 int
4759 main ()
4760 {
4761
4762              /* Are we little or big endian?  From Harbison&Steele.  */
4763              union
4764              {
4765                long int l;
4766                char c[sizeof (long int)];
4767              } u;
4768              u.l = 1;
4769              return u.c[sizeof (long int) - 1] == 1;
4770
4771   ;
4772   return 0;
4773 }
4774 _ACEOF
4775 if ac_fn_c_try_run "$LINENO"; then :
4776   ac_cv_c_bigendian=no
4777 else
4778   ac_cv_c_bigendian=yes
4779 fi
4780 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4781   conftest.$ac_objext conftest.beam conftest.$ac_ext
4782 fi
4783
4784     fi
4785 fi
4786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
4787 $as_echo "$ac_cv_c_bigendian" >&6; }
4788  case $ac_cv_c_bigendian in #(
4789    yes)
4790
4791 $as_echo "#define FR_BIG_ENDIAN 1" >>confdefs.h
4792 ;; #(
4793    no)
4794
4795 $as_echo "#define FR_LITTLE_ENDIAN 1" >>confdefs.h
4796
4797  ;; #(
4798    universal)
4799
4800 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
4801
4802      ;; #(
4803    *)
4804      as_fn_error $? "unknown endianness
4805  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
4806  esac
4807
4808
4809 # Extract the first word of "gmake", so it can be a program name with args.
4810 set dummy gmake; ac_word=$2
4811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4812 $as_echo_n "checking for $ac_word... " >&6; }
4813 if ${ac_cv_prog_GMAKE+:} false; then :
4814   $as_echo_n "(cached) " >&6
4815 else
4816   if test -n "$GMAKE"; then
4817   ac_cv_prog_GMAKE="$GMAKE" # Let the user override the test.
4818 else
4819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4820 for as_dir in $PATH
4821 do
4822   IFS=$as_save_IFS
4823   test -z "$as_dir" && as_dir=.
4824     for ac_exec_ext in '' $ac_executable_extensions; do
4825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4826     ac_cv_prog_GMAKE="yes"
4827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4828     break 2
4829   fi
4830 done
4831   done
4832 IFS=$as_save_IFS
4833
4834   test -z "$ac_cv_prog_GMAKE" && ac_cv_prog_GMAKE="no"
4835 fi
4836 fi
4837 GMAKE=$ac_cv_prog_GMAKE
4838 if test -n "$GMAKE"; then
4839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMAKE" >&5
4840 $as_echo "$GMAKE" >&6; }
4841 else
4842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4843 $as_echo "no" >&6; }
4844 fi
4845
4846
4847 if test $GMAKE = no; then
4848   # Extract the first word of "make", so it can be a program name with args.
4849 set dummy make; ac_word=$2
4850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4851 $as_echo_n "checking for $ac_word... " >&6; }
4852 if ${ac_cv_path_MAKE+:} false; then :
4853   $as_echo_n "(cached) " >&6
4854 else
4855   case $MAKE in
4856   [\\/]* | ?:[\\/]*)
4857   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
4858   ;;
4859   *)
4860   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4861 for as_dir in $PATH
4862 do
4863   IFS=$as_save_IFS
4864   test -z "$as_dir" && as_dir=.
4865     for ac_exec_ext in '' $ac_executable_extensions; do
4866   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4867     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
4868     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4869     break 2
4870   fi
4871 done
4872   done
4873 IFS=$as_save_IFS
4874
4875   test -z "$ac_cv_path_MAKE" && ac_cv_path_MAKE="/usr/local/bin/make"
4876   ;;
4877 esac
4878 fi
4879 MAKE=$ac_cv_path_MAKE
4880 if test -n "$MAKE"; then
4881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4882 $as_echo "$MAKE" >&6; }
4883 else
4884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4885 $as_echo "no" >&6; }
4886 fi
4887
4888
4889 else
4890   # Extract the first word of "gmake", so it can be a program name with args.
4891 set dummy gmake; ac_word=$2
4892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4893 $as_echo_n "checking for $ac_word... " >&6; }
4894 if ${ac_cv_path_MAKE+:} false; then :
4895   $as_echo_n "(cached) " >&6
4896 else
4897   case $MAKE in
4898   [\\/]* | ?:[\\/]*)
4899   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
4900   ;;
4901   *)
4902   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4903 for as_dir in $PATH
4904 do
4905   IFS=$as_save_IFS
4906   test -z "$as_dir" && as_dir=.
4907     for ac_exec_ext in '' $ac_executable_extensions; do
4908   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4909     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
4910     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4911     break 2
4912   fi
4913 done
4914   done
4915 IFS=$as_save_IFS
4916
4917   test -z "$ac_cv_path_MAKE" && ac_cv_path_MAKE="/usr/local/gnu/bin/make"
4918   ;;
4919 esac
4920 fi
4921 MAKE=$ac_cv_path_MAKE
4922 if test -n "$MAKE"; then
4923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4924 $as_echo "$MAKE" >&6; }
4925 else
4926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4927 $as_echo "no" >&6; }
4928 fi
4929
4930
4931 fi
4932 makever=`$ac_cv_path_MAKE --version 2>&1 | grep "GNU Make"`
4933 if test -z "$makever"; then
4934   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
4935 fi
4936
4937
4938   { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of system cores" >&5
4939 $as_echo_n "checking number of system cores... " >&6; }
4940 if ${ax_cv_system_cores+:} false; then :
4941   $as_echo_n "(cached) " >&6
4942 else
4943
4944       ac_ext=c
4945 ac_cpp='$CPP $CPPFLAGS'
4946 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4947 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4948 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4949
4950       if test "$cross_compiling" = yes; then :
4951   ax_cv_system_cores=
4952
4953 else
4954   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4955 /* end confdefs.h.  */
4956
4957           #include <stdio.h>
4958           #include <stdint.h>
4959           #ifdef _WIN32
4960           #  include <windows.h>
4961           #elif MACOS
4962           #  include <sys/param.h>
4963           #  include <sys/sysctl.h>
4964           #else
4965           #  include <unistd.h>
4966           #endif
4967
4968           int main (int argc, char *argv[])
4969           {
4970             uint32_t count;
4971
4972             #ifdef WIN32
4973             SYSTEM_INFO sysinfo;
4974             GetSystemInfo(&sysinfo);
4975
4976             count = sysinfo.dwNumberOfProcessors;
4977
4978             #elif MACOS
4979             int nm[2];
4980             size_t len = 4;
4981
4982             nm[0] = CTL_HW;
4983             nm[1] = HW_AVAILCPU;
4984             sysctl(nm, 2, &count, &len, NULL, 0);
4985
4986             if(count < 1) {
4987               nm[1] = HW_NCPU;
4988               sysctl(nm, 2, &count, &len, NULL, 0);
4989               if(count < 1) {
4990                 count = 1;
4991               }
4992             }
4993
4994             #else
4995             count = sysconf(_SC_NPROCESSORS_ONLN);
4996             #endif
4997
4998             return count;
4999           }
5000
5001 _ACEOF
5002 if ac_fn_c_try_run "$LINENO"; then :
5003   ax_cv_system_cores=$?
5004 else
5005   ax_cv_system_cores=$?
5006 fi
5007 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5008   conftest.$ac_objext conftest.beam conftest.$ac_ext
5009 fi
5010
5011     ac_ext=c
5012 ac_cpp='$CPP $CPPFLAGS'
5013 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5014 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5015 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5016
5017
5018 fi
5019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_system_cores" >&5
5020 $as_echo "$ax_cv_system_cores" >&6; }
5021
5022
5023
5024
5025 # Extract the first word of "git", so it can be a program name with args.
5026 set dummy git; ac_word=$2
5027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5028 $as_echo_n "checking for $ac_word... " >&6; }
5029 if ${ac_cv_prog_GIT+:} false; then :
5030   $as_echo_n "(cached) " >&6
5031 else
5032   if test -n "$GIT"; then
5033   ac_cv_prog_GIT="$GIT" # Let the user override the test.
5034 else
5035 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5036 for as_dir in $PATH
5037 do
5038   IFS=$as_save_IFS
5039   test -z "$as_dir" && as_dir=.
5040     for ac_exec_ext in '' $ac_executable_extensions; do
5041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5042     ac_cv_prog_GIT="yes"
5043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5044     break 2
5045   fi
5046 done
5047   done
5048 IFS=$as_save_IFS
5049
5050   test -z "$ac_cv_prog_GIT" && ac_cv_prog_GIT="no"
5051 fi
5052 fi
5053 GIT=$ac_cv_prog_GIT
5054 if test -n "$GIT"; then
5055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5
5056 $as_echo "$GIT" >&6; }
5057 else
5058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5059 $as_echo "no" >&6; }
5060 fi
5061
5062
5063
5064
5065 # Check whether --enable-strict-dependencies was given.
5066 if test "${enable_strict_dependencies+set}" = set; then :
5067   enableval=$enable_strict_dependencies;
5068 fi
5069
5070
5071 # Check whether --enable-werror was given.
5072 if test "${enable_werror+set}" = set; then :
5073   enableval=$enable_werror;  case "$enableval" in
5074     no)
5075       werror=no
5076     ;;
5077     *)
5078       werror=yes
5079   esac
5080
5081 fi
5082
5083
5084 docdir='${datadir}/doc/freeradius'
5085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking docdir" >&5
5086 $as_echo_n "checking docdir... " >&6; }
5087
5088 # Check whether --with-docdir was given.
5089 if test "${with_docdir+set}" = set; then :
5090   withval=$with_docdir;  case "$withval" in
5091   no)
5092     docdir=no
5093     ;;
5094   yes)
5095     ;;
5096   [\\/$]* | ?:[\\/]* )
5097     docdir="$withval"
5098     ;;
5099   *)
5100     as_fn_error $? "expected an absolute directory name for --with-docdir: $withval" "$LINENO" 5
5101     ;;
5102   esac
5103
5104 fi
5105
5106
5107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $docdir" >&5
5108 $as_echo "$docdir" >&6; }
5109 if test "x$docdir" = xno; then
5110   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Documentation files will NOT be installed." >&5
5111 $as_echo "$as_me: WARNING: Documentation files will NOT be installed." >&2;}
5112 fi
5113
5114 logdir='${localstatedir}/log/radius'
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking logdir" >&5
5116 $as_echo_n "checking logdir... " >&6; }
5117
5118 # Check whether --with-logdir was given.
5119 if test "${with_logdir+set}" = set; then :
5120   withval=$with_logdir;  case "$withval" in
5121   no)
5122     as_fn_error $? "Need logdir" "$LINENO" 5
5123     ;;
5124   yes)
5125     ;;
5126   [\\/$]* | ?:[\\/]* )
5127     logdir="$withval"
5128     ;;
5129   *)
5130     as_fn_error $? "expected an absolute directory name for --with-logdir: $withval" "$LINENO" 5
5131     ;;
5132   esac
5133
5134 fi
5135
5136
5137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $logdir" >&5
5138 $as_echo "$logdir" >&6; }
5139
5140 radacctdir='${logdir}/radacct'
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking radacctdir" >&5
5142 $as_echo_n "checking radacctdir... " >&6; }
5143
5144 # Check whether --with-radacctdir was given.
5145 if test "${with_radacctdir+set}" = set; then :
5146   withval=$with_radacctdir;  case "$withval" in
5147   no)
5148     as_fn_error $? "Need radacctdir" "$LINENO" 5
5149     ;;
5150   yes)
5151     ;;
5152   [\\/$]* | ?:[\\/]* )
5153     radacctdir="$withval"
5154     ;;
5155   *)
5156     as_fn_error $? "expected an absolute directory name for --with-radacctdir: $withval" "$LINENO" 5
5157     ;;
5158   esac
5159
5160 fi
5161
5162
5163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $radacctdir" >&5
5164 $as_echo "$radacctdir" >&6; }
5165
5166 raddbdir='${sysconfdir}/raddb'
5167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking raddbdir" >&5
5168 $as_echo_n "checking raddbdir... " >&6; }
5169
5170 # Check whether --with-raddbdir was given.
5171 if test "${with_raddbdir+set}" = set; then :
5172   withval=$with_raddbdir;  case "$withval" in
5173   no)
5174     as_fn_error $? "Need raddbdir" "$LINENO" 5
5175     ;;
5176   yes)
5177     ;;
5178   [\\/$]* | ?:[\\/]* )
5179     raddbdir="$withval"
5180     ;;
5181   *)
5182     as_fn_error $? "expected an absolute directory name for --with-raddbdir: $withval" "$LINENO" 5
5183     ;;
5184   esac
5185
5186 fi
5187
5188
5189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $raddbdir" >&5
5190 $as_echo "$raddbdir" >&6; }
5191
5192 dictdir='${datarootdir}/freeradius'
5193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dictdir" >&5
5194 $as_echo_n "checking dictdir... " >&6; }
5195
5196 # Check whether --with-dictdir was given.
5197 if test "${with_dictdir+set}" = set; then :
5198   withval=$with_dictdir;  case "$withval" in
5199   no)
5200     as_fn_error $? "Need dictdir" "$LINENO" 5
5201     ;;
5202   yes)
5203     ;;
5204   [\\/$]* | ?:[\\/]* )
5205     dictdir="$withval"
5206     ;;
5207   *)
5208     as_fn_error $? "expected an absolute directory name for --with-dictdir: $withval" "$LINENO" 5
5209     ;;
5210   esac
5211
5212 fi
5213
5214
5215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dictdir" >&5
5216 $as_echo "$dictdir" >&6; }
5217
5218 modconfdir='${raddbdir}/mods-config'
5219
5220
5221 WITH_ASCEND_BINARY=yes
5222
5223 # Check whether --with-ascend-binary was given.
5224 if test "${with_ascend_binary+set}" = set; then :
5225   withval=$with_ascend_binary;  case "$withval" in
5226   yes)
5227     ;;
5228   *)
5229     WITH_ASCEND_BINARY=no
5230   esac
5231
5232 fi
5233
5234 if test "x$WITH_ASCEND_BINARY" = "xyes"; then
5235
5236 $as_echo "#define WITH_ASCEND_BINARY 1" >>confdefs.h
5237
5238 fi
5239
5240 WITH_THREADS=yes
5241
5242 # Check whether --with-threads was given.
5243 if test "${with_threads+set}" = set; then :
5244   withval=$with_threads;  case "$withval" in
5245   yes)
5246     ;;
5247   *)
5248     WITH_THREADS=no
5249   esac
5250
5251 fi
5252
5253
5254 WITH_TCP=yes
5255
5256 # Check whether --with-tcp was given.
5257 if test "${with_tcp+set}" = set; then :
5258   withval=$with_tcp;  case "$withval" in
5259   yes)
5260     ;;
5261   *)
5262     WITH_TCP=no
5263   esac
5264
5265 fi
5266
5267 if test "x$WITH_TCP" = "xyes"; then
5268
5269 $as_echo "#define WITH_TCP 1" >>confdefs.h
5270
5271 fi
5272
5273 WITH_VMPS=yes
5274
5275 # Check whether --with-vmps was given.
5276 if test "${with_vmps+set}" = set; then :
5277   withval=$with_vmps;  case "$withval" in
5278   yes)
5279     ;;
5280   *)
5281     WITH_VMPS=no
5282   esac
5283
5284 fi
5285
5286 if test "x$WITH_VMPS" = "xyes"; then
5287
5288 $as_echo "#define WITH_VMPS 1" >>confdefs.h
5289
5290 fi
5291
5292 WITH_DHCP=yes
5293
5294 # Check whether --with-dhcp was given.
5295 if test "${with_dhcp+set}" = set; then :
5296   withval=$with_dhcp;  case "$withval" in
5297   yes)
5298     ;;
5299   *)
5300     WITH_DHCP=no
5301   esac
5302
5303 fi
5304
5305 if test "x$WITH_DHCP" = "xyes"; then
5306
5307 $as_echo "#define WITH_DHCP 1" >>confdefs.h
5308
5309 fi
5310
5311 STATIC_MODULES=
5312
5313 # Check whether --with-static_modules was given.
5314 if test "${with_static_modules+set}" = set; then :
5315   withval=$with_static_modules;
5316   for i in $withval; do
5317     STATIC_MODULES="$STATIC_MODULES -dlpreopen ../modules/rlm_$i/rlm_$i.la"
5318   done
5319
5320 fi
5321
5322
5323 USE_SHARED_LIBS=yes
5324
5325 # Check whether --with-shared-libs was given.
5326 if test "${with_shared_libs+set}" = set; then :
5327   withval=$with_shared_libs;  case "$withval" in
5328   no)
5329     USE_SHARED_LIBS=no
5330     ;;
5331   *)
5332   esac
5333
5334 fi
5335
5336
5337 MODULES=
5338
5339 # Check whether --with-modules was given.
5340 if test "${with_modules+set}" = set; then :
5341   withval=$with_modules;
5342  for i in $withval; do
5343    MODULES="$MODULES $i"
5344  done
5345
5346 fi
5347
5348
5349 EXPERIMENTAL=
5350
5351 # Check whether --with-experimental-modules was given.
5352 if test "${with_experimental_modules+set}" = set; then :
5353   withval=$with_experimental_modules;  case "$withval" in
5354   yes)
5355     EXPERIMENTAL=yes
5356     ;;
5357   no)
5358     EXPERIMENTAL=no
5359     ;;
5360   *)
5361   esac
5362
5363 fi
5364
5365
5366 WITH_UDPFROMTO=yes
5367
5368 # Check whether --with-udpfromto was given.
5369 if test "${with_udpfromto+set}" = set; then :
5370   withval=$with_udpfromto;  case "$withval" in
5371   yes)
5372     WITH_UDPFROMTO=yes
5373     ;;
5374   *)
5375     WITH_UDPFROMTO=no
5376   esac
5377
5378 fi
5379
5380
5381 if test "x$WITH_UDPFROMTO" = "xyes"; then
5382
5383 $as_echo "#define WITH_UDPFROMTO /**/" >>confdefs.h
5384
5385 fi
5386
5387
5388
5389 # Check whether --with-rlm-FOO-lib-dir was given.
5390 if test "${with_rlm_FOO_lib_dir+set}" = set; then :
5391   withval=$with_rlm_FOO_lib_dir;  case "$withval" in
5392   *)
5393     ;;
5394   esac
5395
5396 fi
5397
5398
5399
5400 # Check whether --with-rlm-FOO-include-dir was given.
5401 if test "${with_rlm_FOO_include_dir+set}" = set; then :
5402   withval=$with_rlm_FOO_include_dir;  case "$withval" in
5403   *)
5404     ;;
5405   esac
5406
5407 fi
5408
5409
5410 WITH_OPENSSL=yes
5411
5412 # Check whether --with-openssl was given.
5413 if test "${with_openssl+set}" = set; then :
5414   withval=$with_openssl;  case "$withval" in
5415   no)
5416     WITH_OPENSSL=no
5417     ;;
5418   *)
5419     WITH_OPENSSL=yes
5420     ;;
5421   esac
5422
5423 fi
5424
5425
5426 openssl_lib_dir=
5427
5428 # Check whether --with-openssl-lib-dir was given.
5429 if test "${with_openssl_lib_dir+set}" = set; then :
5430   withval=$with_openssl_lib_dir;  case "$withval" in
5431   *) openssl_lib_dir="$withval"
5432     ;;
5433   esac
5434
5435 fi
5436
5437
5438 openssl_include_dir=
5439
5440 # Check whether --with-openssl-include-dir was given.
5441 if test "${with_openssl_include_dir+set}" = set; then :
5442   withval=$with_openssl_include_dir;  case "$withval" in
5443   *) openssl_include_dir="$withval"
5444     ;;
5445   esac
5446
5447 fi
5448
5449
5450 # Check whether --enable-openssl-version-check was given.
5451 if test "${enable_openssl_version_check+set}" = set; then :
5452   enableval=$enable_openssl_version_check;
5453 fi
5454
5455 if test "x$enable_openssl_version_check" != "xno"; then
5456
5457 $as_echo "#define ENABLE_OPENSSL_VERSION_CHECK 1" >>confdefs.h
5458
5459   openssl_version_check_config="\
5460         #
5461         #  allow_vulnerable_openssl: Allow the server to start with
5462         #  versions of OpenSSL known to have critical vulnerabilities.
5463         #
5464         #  This check is based on the version number reported by libssl
5465         #  and may not reflect patches applied to libssl by
5466         #  distribution maintainers.
5467         #
5468         allow_vulnerable_openssl = no"
5469 else
5470   openssl_version_check_config=
5471 fi
5472
5473
5474
5475
5476 CHECKRAD=checkrad
5477 # Extract the first word of "perl", so it can be a program name with args.
5478 set dummy perl; ac_word=$2
5479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5480 $as_echo_n "checking for $ac_word... " >&6; }
5481 if ${ac_cv_path_PERL+:} false; then :
5482   $as_echo_n "(cached) " >&6
5483 else
5484   case $PERL in
5485   [\\/]* | ?:[\\/]*)
5486   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5487   ;;
5488   *)
5489   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5490 for as_dir in $PATH
5491 do
5492   IFS=$as_save_IFS
5493   test -z "$as_dir" && as_dir=.
5494     for ac_exec_ext in '' $ac_executable_extensions; do
5495   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5496     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5497     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5498     break 2
5499   fi
5500 done
5501   done
5502 IFS=$as_save_IFS
5503
5504   test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="/usr/local/bin/perl"
5505   ;;
5506 esac
5507 fi
5508 PERL=$ac_cv_path_PERL
5509 if test -n "$PERL"; then
5510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
5511 $as_echo "$PERL" >&6; }
5512 else
5513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5514 $as_echo "no" >&6; }
5515 fi
5516
5517
5518 if test "x$ac_cv_path_PERL" = "x"; then
5519   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl not found - Simultaneous-Use and checkrad may not work" >&5
5520 $as_echo "$as_me: WARNING: perl not found - Simultaneous-Use and checkrad may not work" >&2;}
5521 fi
5522 # Extract the first word of "snmpget", so it can be a program name with args.
5523 set dummy snmpget; ac_word=$2
5524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5525 $as_echo_n "checking for $ac_word... " >&6; }
5526 if ${ac_cv_path_SNMPGET+:} false; then :
5527   $as_echo_n "(cached) " >&6
5528 else
5529   case $SNMPGET in
5530   [\\/]* | ?:[\\/]*)
5531   ac_cv_path_SNMPGET="$SNMPGET" # Let the user override the test with a path.
5532   ;;
5533   *)
5534   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5535 for as_dir in $PATH
5536 do
5537   IFS=$as_save_IFS
5538   test -z "$as_dir" && as_dir=.
5539     for ac_exec_ext in '' $ac_executable_extensions; do
5540   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5541     ac_cv_path_SNMPGET="$as_dir/$ac_word$ac_exec_ext"
5542     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5543     break 2
5544   fi
5545 done
5546   done
5547 IFS=$as_save_IFS
5548
5549   ;;
5550 esac
5551 fi
5552 SNMPGET=$ac_cv_path_SNMPGET
5553 if test -n "$SNMPGET"; then
5554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SNMPGET" >&5
5555 $as_echo "$SNMPGET" >&6; }
5556 else
5557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5558 $as_echo "no" >&6; }
5559 fi
5560
5561
5562 if test "x$ac_cv_path_SNMPGET" = "x"; then
5563   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: snmpget not found - Simultaneous-Use and checkrad may not work" >&5
5564 $as_echo "$as_me: WARNING: snmpget not found - Simultaneous-Use and checkrad may not work" >&2;}
5565 fi
5566
5567 # Extract the first word of "snmpwalk", so it can be a program name with args.
5568 set dummy snmpwalk; ac_word=$2
5569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5570 $as_echo_n "checking for $ac_word... " >&6; }
5571 if ${ac_cv_path_SNMPWALK+:} false; then :
5572   $as_echo_n "(cached) " >&6
5573 else
5574   case $SNMPWALK in
5575   [\\/]* | ?:[\\/]*)
5576   ac_cv_path_SNMPWALK="$SNMPWALK" # Let the user override the test with a path.
5577   ;;
5578   *)
5579   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5580 for as_dir in $PATH
5581 do
5582   IFS=$as_save_IFS
5583   test -z "$as_dir" && as_dir=.
5584     for ac_exec_ext in '' $ac_executable_extensions; do
5585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5586     ac_cv_path_SNMPWALK="$as_dir/$ac_word$ac_exec_ext"
5587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5588     break 2
5589   fi
5590 done
5591   done
5592 IFS=$as_save_IFS
5593
5594   ;;
5595 esac
5596 fi
5597 SNMPWALK=$ac_cv_path_SNMPWALK
5598 if test -n "$SNMPWALK"; then
5599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SNMPWALK" >&5
5600 $as_echo "$SNMPWALK" >&6; }
5601 else
5602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5603 $as_echo "no" >&6; }
5604 fi
5605
5606
5607 if test "x$ac_cv_path_SNMPWALK" = "x"; then
5608   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: snmpwalk not found - Simultaneous-Use and checkrad may not work" >&5
5609 $as_echo "$as_me: WARNING: snmpwalk not found - Simultaneous-Use and checkrad may not work" >&2;}
5610 fi
5611
5612 # Extract the first word of "rusers", so it can be a program name with args.
5613 set dummy rusers; ac_word=$2
5614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5615 $as_echo_n "checking for $ac_word... " >&6; }
5616 if ${ac_cv_path_RUSERS+:} false; then :
5617   $as_echo_n "(cached) " >&6
5618 else
5619   case $RUSERS in
5620   [\\/]* | ?:[\\/]*)
5621   ac_cv_path_RUSERS="$RUSERS" # Let the user override the test with a path.
5622   ;;
5623   *)
5624   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5625 for as_dir in $PATH
5626 do
5627   IFS=$as_save_IFS
5628   test -z "$as_dir" && as_dir=.
5629     for ac_exec_ext in '' $ac_executable_extensions; do
5630   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5631     ac_cv_path_RUSERS="$as_dir/$ac_word$ac_exec_ext"
5632     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5633     break 2
5634   fi
5635 done
5636   done
5637 IFS=$as_save_IFS
5638
5639   test -z "$ac_cv_path_RUSERS" && ac_cv_path_RUSERS="/usr/bin/rusers"
5640   ;;
5641 esac
5642 fi
5643 RUSERS=$ac_cv_path_RUSERS
5644 if test -n "$RUSERS"; then
5645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUSERS" >&5
5646 $as_echo "$RUSERS" >&6; }
5647 else
5648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5649 $as_echo "no" >&6; }
5650 fi
5651
5652
5653
5654 missing_dir=`cd $ac_aux_dir && pwd`
5655 # expand $ac_aux_dir to an absolute path
5656 am_aux_dir=`cd $ac_aux_dir && pwd`
5657
5658 if test x"${MISSING+set}" != xset; then
5659   case $am_aux_dir in
5660   *\ * | *\     *)
5661     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
5662   *)
5663     MISSING="\${SHELL} $am_aux_dir/missing" ;;
5664   esac
5665 fi
5666 # Use eval to expand $SHELL
5667 if eval "$MISSING --run true"; then
5668   am_missing_run="$MISSING --run "
5669 else
5670   am_missing_run=
5671   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
5672 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
5673 fi
5674
5675
5676 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
5677
5678
5679 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
5680
5681
5682 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
5683
5684
5685 # Extract the first word of "locate", so it can be a program name with args.
5686 set dummy locate; ac_word=$2
5687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5688 $as_echo_n "checking for $ac_word... " >&6; }
5689 if ${ac_cv_path_LOCATE+:} false; then :
5690   $as_echo_n "(cached) " >&6
5691 else
5692   case $LOCATE in
5693   [\\/]* | ?:[\\/]*)
5694   ac_cv_path_LOCATE="$LOCATE" # Let the user override the test with a path.
5695   ;;
5696   *)
5697   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5698 for as_dir in $PATH
5699 do
5700   IFS=$as_save_IFS
5701   test -z "$as_dir" && as_dir=.
5702     for ac_exec_ext in '' $ac_executable_extensions; do
5703   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5704     ac_cv_path_LOCATE="$as_dir/$ac_word$ac_exec_ext"
5705     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5706     break 2
5707   fi
5708 done
5709   done
5710 IFS=$as_save_IFS
5711
5712   ;;
5713 esac
5714 fi
5715 LOCATE=$ac_cv_path_LOCATE
5716 if test -n "$LOCATE"; then
5717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOCATE" >&5
5718 $as_echo "$LOCATE" >&6; }
5719 else
5720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5721 $as_echo "no" >&6; }
5722 fi
5723
5724
5725 # Extract the first word of "dirname", so it can be a program name with args.
5726 set dummy dirname; ac_word=$2
5727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5728 $as_echo_n "checking for $ac_word... " >&6; }
5729 if ${ac_cv_path_DIRNAME+:} false; then :
5730   $as_echo_n "(cached) " >&6
5731 else
5732   case $DIRNAME in
5733   [\\/]* | ?:[\\/]*)
5734   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
5735   ;;
5736   *)
5737   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5738 for as_dir in $PATH
5739 do
5740   IFS=$as_save_IFS
5741   test -z "$as_dir" && as_dir=.
5742     for ac_exec_ext in '' $ac_executable_extensions; do
5743   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5744     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
5745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5746     break 2
5747   fi
5748 done
5749   done
5750 IFS=$as_save_IFS
5751
5752   ;;
5753 esac
5754 fi
5755 DIRNAME=$ac_cv_path_DIRNAME
5756 if test -n "$DIRNAME"; then
5757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
5758 $as_echo "$DIRNAME" >&6; }
5759 else
5760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5761 $as_echo "no" >&6; }
5762 fi
5763
5764
5765 # Extract the first word of "grep", so it can be a program name with args.
5766 set dummy grep; ac_word=$2
5767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5768 $as_echo_n "checking for $ac_word... " >&6; }
5769 if ${ac_cv_path_GREP+:} false; then :
5770   $as_echo_n "(cached) " >&6
5771 else
5772   case $GREP in
5773   [\\/]* | ?:[\\/]*)
5774   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
5775   ;;
5776   *)
5777   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5778 for as_dir in $PATH
5779 do
5780   IFS=$as_save_IFS
5781   test -z "$as_dir" && as_dir=.
5782     for ac_exec_ext in '' $ac_executable_extensions; do
5783   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5784     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
5785     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5786     break 2
5787   fi
5788 done
5789   done
5790 IFS=$as_save_IFS
5791
5792   ;;
5793 esac
5794 fi
5795 GREP=$ac_cv_path_GREP
5796 if test -n "$GREP"; then
5797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
5798 $as_echo "$GREP" >&6; }
5799 else
5800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5801 $as_echo "no" >&6; }
5802 fi
5803
5804
5805
5806
5807 talloc_lib_dir=
5808
5809 # Check whether --with-talloc-lib-dir was given.
5810 if test "${with_talloc_lib_dir+set}" = set; then :
5811   withval=$with_talloc_lib_dir; case "$withval" in
5812     no)
5813       as_fn_error $? "Need talloc-lib-dir" "$LINENO" 5
5814       ;;
5815     yes)
5816       ;;
5817     *)
5818       talloc_lib_dir="$withval"
5819       ;;
5820   esac
5821 fi
5822
5823
5824 talloc_include_dir=
5825
5826 # Check whether --with-talloc-include-dir was given.
5827 if test "${with_talloc_include_dir+set}" = set; then :
5828   withval=$with_talloc_include_dir; case "$withval" in
5829     no)
5830       as_fn_error $? "Need talloc-include-dir" "$LINENO" 5
5831       ;;
5832     yes)
5833       ;;
5834     *)
5835       talloc_include_dir="$withval"
5836       ;;
5837   esac
5838 fi
5839
5840
5841 smart_try_dir="$talloc_lib_dir"
5842
5843
5844 sm_lib_safe=`echo "talloc" | sed 'y%./+-%__p_%'`
5845 sm_func_safe=`echo "_talloc" | sed 'y%./+-%__p_%'`
5846
5847 old_LIBS="$LIBS"
5848 old_CPPFLAGS="$CPPFLAGS"
5849 smart_lib=
5850 smart_ldflags=
5851 smart_lib_dir=
5852
5853 if test "x$smart_try_dir" != "x"; then
5854   for try in $smart_try_dir; do
5855     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc in $try" >&5
5856 $as_echo_n "checking for _talloc in -ltalloc in $try... " >&6; }
5857     LIBS="-ltalloc $old_LIBS"
5858     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
5859     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5860 /* end confdefs.h.  */
5861 extern char _talloc();
5862 int
5863 main ()
5864 {
5865 _talloc()
5866   ;
5867   return 0;
5868 }
5869 _ACEOF
5870 if ac_fn_c_try_link "$LINENO"; then :
5871
5872                  smart_lib="-ltalloc"
5873                  smart_ldflags="-L$try -Wl,-rpath,$try"
5874                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5875 $as_echo "yes" >&6; }
5876                  break
5877
5878 else
5879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5880 $as_echo "no" >&6; }
5881 fi
5882 rm -f core conftest.err conftest.$ac_objext \
5883     conftest$ac_exeext conftest.$ac_ext
5884   done
5885   LIBS="$old_LIBS"
5886   CPPFLAGS="$old_CPPFLAGS"
5887 fi
5888
5889 if test "x$smart_lib" = "x"; then
5890   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc" >&5
5891 $as_echo_n "checking for _talloc in -ltalloc... " >&6; }
5892   LIBS="-ltalloc $old_LIBS"
5893   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5894 /* end confdefs.h.  */
5895 extern char _talloc();
5896 int
5897 main ()
5898 {
5899 _talloc()
5900   ;
5901   return 0;
5902 }
5903 _ACEOF
5904 if ac_fn_c_try_link "$LINENO"; then :
5905
5906                 smart_lib="-ltalloc"
5907                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5908 $as_echo "yes" >&6; }
5909
5910 else
5911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5912 $as_echo "no" >&6; }
5913 fi
5914 rm -f core conftest.err conftest.$ac_objext \
5915     conftest$ac_exeext conftest.$ac_ext
5916   LIBS="$old_LIBS"
5917 fi
5918
5919 if test "x$smart_lib" = "x"; then
5920
5921
5922 if test "x$LOCATE" != "x"; then
5923         DIRS=
5924   file=libtalloc${libltdl_cv_shlibext}
5925
5926   for x in `${LOCATE} $file 2>/dev/null`; do
5927                                         base=`echo $x | sed "s%/${file}%%"`
5928     if test "x$x" = "x$base"; then
5929       continue;
5930     fi
5931
5932     dir=`${DIRNAME} $x 2>/dev/null`
5933                 exclude=`echo ${dir} | ${GREP} /home`
5934     if test "x$exclude" != "x"; then
5935       continue
5936     fi
5937
5938                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
5939     if test "x$already" = "x"; then
5940       DIRS="$DIRS $dir"
5941     fi
5942   done
5943 fi
5944
5945 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
5946
5947
5948
5949 if test "x$LOCATE" != "x"; then
5950         DIRS=
5951   file=libtalloc.a
5952
5953   for x in `${LOCATE} $file 2>/dev/null`; do
5954                                         base=`echo $x | sed "s%/${file}%%"`
5955     if test "x$x" = "x$base"; then
5956       continue;
5957     fi
5958
5959     dir=`${DIRNAME} $x 2>/dev/null`
5960                 exclude=`echo ${dir} | ${GREP} /home`
5961     if test "x$exclude" != "x"; then
5962       continue
5963     fi
5964
5965                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
5966     if test "x$already" = "x"; then
5967       DIRS="$DIRS $dir"
5968     fi
5969   done
5970 fi
5971
5972 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
5973
5974
5975   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
5976     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc in $try" >&5
5977 $as_echo_n "checking for _talloc in -ltalloc in $try... " >&6; }
5978     LIBS="-ltalloc $old_LIBS"
5979     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
5980     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5981 /* end confdefs.h.  */
5982 extern char _talloc();
5983 int
5984 main ()
5985 {
5986 _talloc()
5987   ;
5988   return 0;
5989 }
5990 _ACEOF
5991 if ac_fn_c_try_link "$LINENO"; then :
5992
5993                   smart_lib="-ltalloc"
5994                   smart_ldflags="-L$try -Wl,-rpath,$try"
5995                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5996 $as_echo "yes" >&6; }
5997                   break
5998
5999 else
6000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6001 $as_echo "no" >&6; }
6002 fi
6003 rm -f core conftest.err conftest.$ac_objext \
6004     conftest$ac_exeext conftest.$ac_ext
6005   done
6006   LIBS="$old_LIBS"
6007   CPPFLAGS="$old_CPPFLAGS"
6008 fi
6009
6010 if test "x$smart_lib" != "x"; then
6011   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
6012   LIBS="$smart_ldflags $smart_lib $old_LIBS"
6013   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
6014 fi
6015
6016 if test "x$ac_cv_lib_talloc__talloc" != "xyes"; then
6017   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: talloc library not found. Use --with-talloc-lib-dir=<path>." >&5
6018 $as_echo "$as_me: WARNING: talloc library not found. Use --with-talloc-lib-dir=<path>." >&2;}
6019   as_fn_error $? "FreeRADIUS requires libtalloc" "$LINENO" 5
6020 fi
6021
6022 TALLOC_LIBS="${smart_lib}"
6023 TALLOC_LDFLAGS="${smart_ldflags}"
6024
6025
6026 LIBS="$old_LIBS"
6027
6028 old_CFLAGS=$CFLAGS
6029 if test "x$WITH_THREADS" = "xyes"; then
6030   if test $ac_cv_prog_suncc = "yes"; then
6031     CFLAGS="$CFLAGS -mt"
6032   fi
6033
6034   for ac_header in pthread.h
6035 do :
6036   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
6037 if test "x$ac_cv_header_pthread_h" = xyes; then :
6038   cat >>confdefs.h <<_ACEOF
6039 #define HAVE_PTHREAD_H 1
6040 _ACEOF
6041
6042 else
6043
6044       WITH_THREADS="no"
6045       fail=pthread.h
6046
6047 fi
6048
6049 done
6050
6051
6052                 if test "x$WITH_THREADS" != "xno"; then
6053     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
6054 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
6055 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
6056   $as_echo_n "(cached) " >&6
6057 else
6058   ac_check_lib_save_LIBS=$LIBS
6059 LIBS="-lpthread  $LIBS"
6060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6061 /* end confdefs.h.  */
6062
6063 /* Override any GCC internal prototype to avoid an error.
6064    Use char because int might match the return type of a GCC
6065    builtin and then its argument prototype would still apply.  */
6066 #ifdef __cplusplus
6067 extern "C"
6068 #endif
6069 char pthread_create ();
6070 int
6071 main ()
6072 {
6073 return pthread_create ();
6074   ;
6075   return 0;
6076 }
6077 _ACEOF
6078 if ac_fn_c_try_link "$LINENO"; then :
6079   ac_cv_lib_pthread_pthread_create=yes
6080 else
6081   ac_cv_lib_pthread_pthread_create=no
6082 fi
6083 rm -f core conftest.err conftest.$ac_objext \
6084     conftest$ac_exeext conftest.$ac_ext
6085 LIBS=$ac_check_lib_save_LIBS
6086 fi
6087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
6088 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
6089 if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
6090
6091         HAVE_LPTHREAD='yes'
6092         CFLAGS="$CFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
6093         LIBS="-lpthread $LIBS"
6094
6095
6096   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-pthread\"" >&5
6097 $as_echo_n "checking for the compiler flag \"-pthread\"... " >&6; }
6098 if ${ax_cv_cc_pthread_flag+:} false; then :
6099   $as_echo_n "(cached) " >&6
6100 else
6101
6102
6103     CFLAGS_SAVED=$CFLAGS
6104     CFLAGS="$CFLAGS -Werror -pthread"
6105
6106     ac_ext=c
6107 ac_cpp='$CPP $CPPFLAGS'
6108 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6109 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6110 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6111
6112     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6113 /* end confdefs.h.  */
6114
6115 int
6116 main ()
6117 {
6118 return 0;
6119   ;
6120   return 0;
6121 }
6122 _ACEOF
6123 if ac_fn_c_try_compile "$LINENO"; then :
6124   ax_cv_cc_pthread_flag="yes"
6125 else
6126   ax_cv_cc_pthread_flag="no"
6127 fi
6128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6129     ac_ext=c
6130 ac_cpp='$CPP $CPPFLAGS'
6131 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6132 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6133 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6134
6135
6136     CFLAGS="$CFLAGS_SAVED"
6137
6138 fi
6139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_pthread_flag" >&5
6140 $as_echo "$ax_cv_cc_pthread_flag" >&6; }
6141
6142         if test "x$ax_cv_cc_pthread_flag" != 'xyes'; then
6143           CFLAGS="$CFLAGS -pthread"
6144         fi
6145
6146
6147 fi
6148
6149
6150                         if test "x$HAVE_LPTHREAD" != "xyes"; then
6151       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
6152 $as_echo_n "checking for pthread_create in -lc_r... " >&6; }
6153 if ${ac_cv_lib_c_r_pthread_create+:} false; then :
6154   $as_echo_n "(cached) " >&6
6155 else
6156   ac_check_lib_save_LIBS=$LIBS
6157 LIBS="-lc_r  $LIBS"
6158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6159 /* end confdefs.h.  */
6160
6161 /* Override any GCC internal prototype to avoid an error.
6162    Use char because int might match the return type of a GCC
6163    builtin and then its argument prototype would still apply.  */
6164 #ifdef __cplusplus
6165 extern "C"
6166 #endif
6167 char pthread_create ();
6168 int
6169 main ()
6170 {
6171 return pthread_create ();
6172   ;
6173   return 0;
6174 }
6175 _ACEOF
6176 if ac_fn_c_try_link "$LINENO"; then :
6177   ac_cv_lib_c_r_pthread_create=yes
6178 else
6179   ac_cv_lib_c_r_pthread_create=no
6180 fi
6181 rm -f core conftest.err conftest.$ac_objext \
6182     conftest$ac_exeext conftest.$ac_ext
6183 LIBS=$ac_check_lib_save_LIBS
6184 fi
6185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
6186 $as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
6187 if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
6188
6189           CFLAGS="$CFLAGS -D_THREAD_SAFE"
6190
6191
6192   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-pthread\"" >&5
6193 $as_echo_n "checking for the compiler flag \"-pthread\"... " >&6; }
6194 if ${ax_cv_cc_pthread_flag+:} false; then :
6195   $as_echo_n "(cached) " >&6
6196 else
6197
6198
6199     CFLAGS_SAVED=$CFLAGS
6200     CFLAGS="$CFLAGS -Werror -pthread"
6201
6202     ac_ext=c
6203 ac_cpp='$CPP $CPPFLAGS'
6204 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6205 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6206 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6207
6208     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6209 /* end confdefs.h.  */
6210
6211 int
6212 main ()
6213 {
6214 return 0;
6215   ;
6216   return 0;
6217 }
6218 _ACEOF
6219 if ac_fn_c_try_compile "$LINENO"; then :
6220   ax_cv_cc_pthread_flag="yes"
6221 else
6222   ax_cv_cc_pthread_flag="no"
6223 fi
6224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6225     ac_ext=c
6226 ac_cpp='$CPP $CPPFLAGS'
6227 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6228 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6229 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6230
6231
6232     CFLAGS="$CFLAGS_SAVED"
6233
6234 fi
6235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_pthread_flag" >&5
6236 $as_echo "$ax_cv_cc_pthread_flag" >&6; }
6237
6238           if test "x$ax_cv_cc_pthread_flag" != 'xyes'; then
6239             LIBS="-lc_r $LIBS"
6240           else
6241             CFLAGS="$CFLAGS -pthread"
6242           fi
6243
6244 else
6245    fail=-lc_r or -lpthread
6246
6247 fi
6248
6249     fi
6250   fi
6251
6252   if test "x$WITH_THREADS" != "xyes"; then
6253     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: silently not building with thread support." >&5
6254 $as_echo "$as_me: WARNING: silently not building with thread support." >&2;}
6255     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: FAILURE: thread support requires: $fail." >&5
6256 $as_echo "$as_me: WARNING: FAILURE: thread support requires: $fail." >&2;}
6257   else
6258
6259 $as_echo "#define WITH_THREADS 1" >>confdefs.h
6260
6261   fi
6262 fi
6263
6264 if test "x$WITH_THREADS" != "xyes"; then
6265   CFLAGS=$old_CFLAGS
6266   ac_cv_header_pthread_h="no"
6267   WITH_THREADS=no
6268 else
6269
6270   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
6271 $as_echo_n "checking for library containing sem_init... " >&6; }
6272 if ${ac_cv_search_sem_init+:} false; then :
6273   $as_echo_n "(cached) " >&6
6274 else
6275   ac_func_search_save_LIBS=$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 sem_init ();
6286 int
6287 main ()
6288 {
6289 return sem_init ();
6290   ;
6291   return 0;
6292 }
6293 _ACEOF
6294 for ac_lib in '' pthread sem posix4 rt semaphore; do
6295   if test -z "$ac_lib"; then
6296     ac_res="none required"
6297   else
6298     ac_res=-l$ac_lib
6299     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6300   fi
6301   if ac_fn_c_try_link "$LINENO"; then :
6302   ac_cv_search_sem_init=$ac_res
6303 fi
6304 rm -f core conftest.err conftest.$ac_objext \
6305     conftest$ac_exeext
6306   if ${ac_cv_search_sem_init+:} false; then :
6307   break
6308 fi
6309 done
6310 if ${ac_cv_search_sem_init+:} false; then :
6311
6312 else
6313   ac_cv_search_sem_init=no
6314 fi
6315 rm conftest.$ac_ext
6316 LIBS=$ac_func_search_save_LIBS
6317 fi
6318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
6319 $as_echo "$ac_cv_search_sem_init" >&6; }
6320 ac_res=$ac_cv_search_sem_init
6321 if test "$ac_res" != no; then :
6322   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6323
6324 else
6325   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
6326
6327 fi
6328
6329 fi
6330
6331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
6332 $as_echo_n "checking for dlopen in -ldl... " >&6; }
6333 if ${ac_cv_lib_dl_dlopen+:} false; then :
6334   $as_echo_n "(cached) " >&6
6335 else
6336   ac_check_lib_save_LIBS=$LIBS
6337 LIBS="-ldl  $LIBS"
6338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6339 /* end confdefs.h.  */
6340
6341 /* Override any GCC internal prototype to avoid an error.
6342    Use char because int might match the return type of a GCC
6343    builtin and then its argument prototype would still apply.  */
6344 #ifdef __cplusplus
6345 extern "C"
6346 #endif
6347 char dlopen ();
6348 int
6349 main ()
6350 {
6351 return dlopen ();
6352   ;
6353   return 0;
6354 }
6355 _ACEOF
6356 if ac_fn_c_try_link "$LINENO"; then :
6357   ac_cv_lib_dl_dlopen=yes
6358 else
6359   ac_cv_lib_dl_dlopen=no
6360 fi
6361 rm -f core conftest.err conftest.$ac_objext \
6362     conftest$ac_exeext conftest.$ac_ext
6363 LIBS=$ac_check_lib_save_LIBS
6364 fi
6365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
6366 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
6367 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
6368   cat >>confdefs.h <<_ACEOF
6369 #define HAVE_LIBDL 1
6370 _ACEOF
6371
6372   LIBS="-ldl $LIBS"
6373
6374 fi
6375
6376
6377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getsockname in -lsocket" >&5
6378 $as_echo_n "checking for getsockname in -lsocket... " >&6; }
6379 if ${ac_cv_lib_socket_getsockname+:} false; then :
6380   $as_echo_n "(cached) " >&6
6381 else
6382   ac_check_lib_save_LIBS=$LIBS
6383 LIBS="-lsocket  $LIBS"
6384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6385 /* end confdefs.h.  */
6386
6387 /* Override any GCC internal prototype to avoid an error.
6388    Use char because int might match the return type of a GCC
6389    builtin and then its argument prototype would still apply.  */
6390 #ifdef __cplusplus
6391 extern "C"
6392 #endif
6393 char getsockname ();
6394 int
6395 main ()
6396 {
6397 return getsockname ();
6398   ;
6399   return 0;
6400 }
6401 _ACEOF
6402 if ac_fn_c_try_link "$LINENO"; then :
6403   ac_cv_lib_socket_getsockname=yes
6404 else
6405   ac_cv_lib_socket_getsockname=no
6406 fi
6407 rm -f core conftest.err conftest.$ac_objext \
6408     conftest$ac_exeext conftest.$ac_ext
6409 LIBS=$ac_check_lib_save_LIBS
6410 fi
6411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getsockname" >&5
6412 $as_echo "$ac_cv_lib_socket_getsockname" >&6; }
6413 if test "x$ac_cv_lib_socket_getsockname" = xyes; then :
6414   cat >>confdefs.h <<_ACEOF
6415 #define HAVE_LIBSOCKET 1
6416 _ACEOF
6417
6418   LIBS="-lsocket $LIBS"
6419
6420 fi
6421
6422
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
6424 $as_echo_n "checking for inet_aton in -lresolv... " >&6; }
6425 if ${ac_cv_lib_resolv_inet_aton+:} false; then :
6426   $as_echo_n "(cached) " >&6
6427 else
6428   ac_check_lib_save_LIBS=$LIBS
6429 LIBS="-lresolv  $LIBS"
6430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6431 /* end confdefs.h.  */
6432
6433 /* Override any GCC internal prototype to avoid an error.
6434    Use char because int might match the return type of a GCC
6435    builtin and then its argument prototype would still apply.  */
6436 #ifdef __cplusplus
6437 extern "C"
6438 #endif
6439 char inet_aton ();
6440 int
6441 main ()
6442 {
6443 return inet_aton ();
6444   ;
6445   return 0;
6446 }
6447 _ACEOF
6448 if ac_fn_c_try_link "$LINENO"; then :
6449   ac_cv_lib_resolv_inet_aton=yes
6450 else
6451   ac_cv_lib_resolv_inet_aton=no
6452 fi
6453 rm -f core conftest.err conftest.$ac_objext \
6454     conftest$ac_exeext conftest.$ac_ext
6455 LIBS=$ac_check_lib_save_LIBS
6456 fi
6457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
6458 $as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
6459 if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
6460   cat >>confdefs.h <<_ACEOF
6461 #define HAVE_LIBRESOLV 1
6462 _ACEOF
6463
6464   LIBS="-lresolv $LIBS"
6465
6466 fi
6467
6468
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnsl" >&5
6470 $as_echo_n "checking for inet_ntoa in -lnsl... " >&6; }
6471 if ${ac_cv_lib_nsl_inet_ntoa+:} false; then :
6472   $as_echo_n "(cached) " >&6
6473 else
6474   ac_check_lib_save_LIBS=$LIBS
6475 LIBS="-lnsl  $LIBS"
6476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6477 /* end confdefs.h.  */
6478
6479 /* Override any GCC internal prototype to avoid an error.
6480    Use char because int might match the return type of a GCC
6481    builtin and then its argument prototype would still apply.  */
6482 #ifdef __cplusplus
6483 extern "C"
6484 #endif
6485 char inet_ntoa ();
6486 int
6487 main ()
6488 {
6489 return inet_ntoa ();
6490   ;
6491   return 0;
6492 }
6493 _ACEOF
6494 if ac_fn_c_try_link "$LINENO"; then :
6495   ac_cv_lib_nsl_inet_ntoa=yes
6496 else
6497   ac_cv_lib_nsl_inet_ntoa=no
6498 fi
6499 rm -f core conftest.err conftest.$ac_objext \
6500     conftest$ac_exeext conftest.$ac_ext
6501 LIBS=$ac_check_lib_save_LIBS
6502 fi
6503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_inet_ntoa" >&5
6504 $as_echo "$ac_cv_lib_nsl_inet_ntoa" >&6; }
6505 if test "x$ac_cv_lib_nsl_inet_ntoa" = xyes; then :
6506   cat >>confdefs.h <<_ACEOF
6507 #define HAVE_LIBNSL 1
6508 _ACEOF
6509
6510   LIBS="-lnsl $LIBS"
6511
6512 fi
6513
6514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htonl in -lws2_32" >&5
6515 $as_echo_n "checking for htonl in -lws2_32... " >&6; }
6516 if ${ac_cv_lib_ws2_32_htonl+:} false; then :
6517   $as_echo_n "(cached) " >&6
6518 else
6519   ac_check_lib_save_LIBS=$LIBS
6520 LIBS="-lws2_32  $LIBS"
6521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6522 /* end confdefs.h.  */
6523
6524 /* Override any GCC internal prototype to avoid an error.
6525    Use char because int might match the return type of a GCC
6526    builtin and then its argument prototype would still apply.  */
6527 #ifdef __cplusplus
6528 extern "C"
6529 #endif
6530 char htonl ();
6531 int
6532 main ()
6533 {
6534 return htonl ();
6535   ;
6536   return 0;
6537 }
6538 _ACEOF
6539 if ac_fn_c_try_link "$LINENO"; then :
6540   ac_cv_lib_ws2_32_htonl=yes
6541 else
6542   ac_cv_lib_ws2_32_htonl=no
6543 fi
6544 rm -f core conftest.err conftest.$ac_objext \
6545     conftest$ac_exeext conftest.$ac_ext
6546 LIBS=$ac_check_lib_save_LIBS
6547 fi
6548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_htonl" >&5
6549 $as_echo "$ac_cv_lib_ws2_32_htonl" >&6; }
6550 if test "x$ac_cv_lib_ws2_32_htonl" = xyes; then :
6551   cat >>confdefs.h <<_ACEOF
6552 #define HAVE_LIBWS2_32 1
6553 _ACEOF
6554
6555   LIBS="-lws2_32 $LIBS"
6556
6557 fi
6558
6559
6560 pcap_lib_dir=
6561
6562 # Check whether --with-pcap-lib-dir was given.
6563 if test "${with_pcap_lib_dir+set}" = set; then :
6564   withval=$with_pcap_lib_dir; case "$withval" in
6565     no)
6566       as_fn_error $? "Need pcap-lib-dir" "$LINENO" 5
6567       ;;
6568     yes)
6569       ;;
6570     *)
6571       pcap_lib_dir="$withval"
6572       ;;
6573   esac
6574 fi
6575
6576
6577 pcap_include_dir=
6578
6579 # Check whether --with-pcap-include-dir was given.
6580 if test "${with_pcap_include_dir+set}" = set; then :
6581   withval=$with_pcap_include_dir; case "$withval" in
6582     no)
6583       as_fn_error $? "Need pcap-include-dir" "$LINENO" 5
6584       ;;
6585     yes)
6586       ;;
6587     *)
6588       pcap_include_dir="$withval"
6589       ;;
6590   esac
6591 fi
6592
6593
6594 smart_try_dir="$pcap_lib_dir"
6595
6596
6597 sm_lib_safe=`echo "pcap" | sed 'y%./+-%__p_%'`
6598 sm_func_safe=`echo "pcap_open_live" | sed 'y%./+-%__p_%'`
6599
6600 old_LIBS="$LIBS"
6601 old_CPPFLAGS="$CPPFLAGS"
6602 smart_lib=
6603 smart_ldflags=
6604 smart_lib_dir=
6605
6606 if test "x$smart_try_dir" != "x"; then
6607   for try in $smart_try_dir; do
6608     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap in $try" >&5
6609 $as_echo_n "checking for pcap_open_live in -lpcap in $try... " >&6; }
6610     LIBS="-lpcap $old_LIBS"
6611     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6612     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6613 /* end confdefs.h.  */
6614 extern char pcap_open_live();
6615 int
6616 main ()
6617 {
6618 pcap_open_live()
6619   ;
6620   return 0;
6621 }
6622 _ACEOF
6623 if ac_fn_c_try_link "$LINENO"; then :
6624
6625                  smart_lib="-lpcap"
6626                  smart_ldflags="-L$try -Wl,-rpath,$try"
6627                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6628 $as_echo "yes" >&6; }
6629                  break
6630
6631 else
6632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6633 $as_echo "no" >&6; }
6634 fi
6635 rm -f core conftest.err conftest.$ac_objext \
6636     conftest$ac_exeext conftest.$ac_ext
6637   done
6638   LIBS="$old_LIBS"
6639   CPPFLAGS="$old_CPPFLAGS"
6640 fi
6641
6642 if test "x$smart_lib" = "x"; then
6643   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap" >&5
6644 $as_echo_n "checking for pcap_open_live in -lpcap... " >&6; }
6645   LIBS="-lpcap $old_LIBS"
6646   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6647 /* end confdefs.h.  */
6648 extern char pcap_open_live();
6649 int
6650 main ()
6651 {
6652 pcap_open_live()
6653   ;
6654   return 0;
6655 }
6656 _ACEOF
6657 if ac_fn_c_try_link "$LINENO"; then :
6658
6659                 smart_lib="-lpcap"
6660                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6661 $as_echo "yes" >&6; }
6662
6663 else
6664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6665 $as_echo "no" >&6; }
6666 fi
6667 rm -f core conftest.err conftest.$ac_objext \
6668     conftest$ac_exeext conftest.$ac_ext
6669   LIBS="$old_LIBS"
6670 fi
6671
6672 if test "x$smart_lib" = "x"; then
6673
6674
6675 if test "x$LOCATE" != "x"; then
6676         DIRS=
6677   file=libpcap${libltdl_cv_shlibext}
6678
6679   for x in `${LOCATE} $file 2>/dev/null`; do
6680                                         base=`echo $x | sed "s%/${file}%%"`
6681     if test "x$x" = "x$base"; then
6682       continue;
6683     fi
6684
6685     dir=`${DIRNAME} $x 2>/dev/null`
6686                 exclude=`echo ${dir} | ${GREP} /home`
6687     if test "x$exclude" != "x"; then
6688       continue
6689     fi
6690
6691                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6692     if test "x$already" = "x"; then
6693       DIRS="$DIRS $dir"
6694     fi
6695   done
6696 fi
6697
6698 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6699
6700
6701
6702 if test "x$LOCATE" != "x"; then
6703         DIRS=
6704   file=libpcap.a
6705
6706   for x in `${LOCATE} $file 2>/dev/null`; do
6707                                         base=`echo $x | sed "s%/${file}%%"`
6708     if test "x$x" = "x$base"; then
6709       continue;
6710     fi
6711
6712     dir=`${DIRNAME} $x 2>/dev/null`
6713                 exclude=`echo ${dir} | ${GREP} /home`
6714     if test "x$exclude" != "x"; then
6715       continue
6716     fi
6717
6718                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6719     if test "x$already" = "x"; then
6720       DIRS="$DIRS $dir"
6721     fi
6722   done
6723 fi
6724
6725 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6726
6727
6728   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
6729     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap in $try" >&5
6730 $as_echo_n "checking for pcap_open_live in -lpcap in $try... " >&6; }
6731     LIBS="-lpcap $old_LIBS"
6732     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6733     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6734 /* end confdefs.h.  */
6735 extern char pcap_open_live();
6736 int
6737 main ()
6738 {
6739 pcap_open_live()
6740   ;
6741   return 0;
6742 }
6743 _ACEOF
6744 if ac_fn_c_try_link "$LINENO"; then :
6745
6746                   smart_lib="-lpcap"
6747                   smart_ldflags="-L$try -Wl,-rpath,$try"
6748                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6749 $as_echo "yes" >&6; }
6750                   break
6751
6752 else
6753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6754 $as_echo "no" >&6; }
6755 fi
6756 rm -f core conftest.err conftest.$ac_objext \
6757     conftest$ac_exeext conftest.$ac_ext
6758   done
6759   LIBS="$old_LIBS"
6760   CPPFLAGS="$old_CPPFLAGS"
6761 fi
6762
6763 if test "x$smart_lib" != "x"; then
6764   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
6765   LIBS="$smart_ldflags $smart_lib $old_LIBS"
6766   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
6767 fi
6768
6769 if test "x$ac_cv_lib_pcap_pcap_open_live" != "xyes"; then
6770   { $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
6771 $as_echo "$as_me: WARNING: pcap library not found, silently disabling the RADIUS sniffer, and ARP listener.  Use --with-pcap-lib-dir=<path>." >&2;}
6772 else
6773
6774 $as_echo "#define HAVE_LIBPCAP 1" >>confdefs.h
6775
6776
6777   for ac_func in \
6778     pcap_fopen_offline \
6779     pcap_dump_fopen \
6780     pcap_create \
6781     pcap_activate
6782
6783 do :
6784   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6785 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6786 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6787   cat >>confdefs.h <<_ACEOF
6788 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6789 _ACEOF
6790
6791 fi
6792 done
6793
6794
6795   PCAP_LIBS="${smart_lib}"
6796   PCAP_LDFLAGS="${smart_ldflags}"
6797 fi
6798 LIBS="${old_LIBS}"
6799
6800 collectdclient_lib_dir=
6801
6802 # Check whether --with-collectdclient-lib-dir was given.
6803 if test "${with_collectdclient_lib_dir+set}" = set; then :
6804   withval=$with_collectdclient_lib_dir; case "$withval" in
6805     no)
6806       as_fn_error $? "Need collectdclient-lib-dir" "$LINENO" 5
6807       ;;
6808     yes)
6809       ;;
6810     *)
6811       collectdclient_lib_dir="$withval"
6812       ;;
6813   esac
6814 fi
6815
6816
6817 collectdclient_include_dir=
6818
6819 # Check whether --with-collectdclient-include-dir was given.
6820 if test "${with_collectdclient_include_dir+set}" = set; then :
6821   withval=$with_collectdclient_include_dir; case "$withval" in
6822     no)
6823       as_fn_error $? "Need collectdclient-include-dir" "$LINENO" 5
6824       ;;
6825     yes)
6826       ;;
6827     *)
6828       collectdclient_include_dir="$withval"
6829       ;;
6830   esac
6831 fi
6832
6833
6834 smart_try_dir="$collectdclient_lib_dir"
6835
6836
6837 sm_lib_safe=`echo "collectdclient" | sed 'y%./+-%__p_%'`
6838 sm_func_safe=`echo "lcc_connect" | sed 'y%./+-%__p_%'`
6839
6840 old_LIBS="$LIBS"
6841 old_CPPFLAGS="$CPPFLAGS"
6842 smart_lib=
6843 smart_ldflags=
6844 smart_lib_dir=
6845
6846 if test "x$smart_try_dir" != "x"; then
6847   for try in $smart_try_dir; do
6848     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient in $try" >&5
6849 $as_echo_n "checking for lcc_connect in -lcollectdclient in $try... " >&6; }
6850     LIBS="-lcollectdclient $old_LIBS"
6851     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6852     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6853 /* end confdefs.h.  */
6854 extern char lcc_connect();
6855 int
6856 main ()
6857 {
6858 lcc_connect()
6859   ;
6860   return 0;
6861 }
6862 _ACEOF
6863 if ac_fn_c_try_link "$LINENO"; then :
6864
6865                  smart_lib="-lcollectdclient"
6866                  smart_ldflags="-L$try -Wl,-rpath,$try"
6867                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6868 $as_echo "yes" >&6; }
6869                  break
6870
6871 else
6872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6873 $as_echo "no" >&6; }
6874 fi
6875 rm -f core conftest.err conftest.$ac_objext \
6876     conftest$ac_exeext conftest.$ac_ext
6877   done
6878   LIBS="$old_LIBS"
6879   CPPFLAGS="$old_CPPFLAGS"
6880 fi
6881
6882 if test "x$smart_lib" = "x"; then
6883   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient" >&5
6884 $as_echo_n "checking for lcc_connect in -lcollectdclient... " >&6; }
6885   LIBS="-lcollectdclient $old_LIBS"
6886   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6887 /* end confdefs.h.  */
6888 extern char lcc_connect();
6889 int
6890 main ()
6891 {
6892 lcc_connect()
6893   ;
6894   return 0;
6895 }
6896 _ACEOF
6897 if ac_fn_c_try_link "$LINENO"; then :
6898
6899                 smart_lib="-lcollectdclient"
6900                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6901 $as_echo "yes" >&6; }
6902
6903 else
6904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6905 $as_echo "no" >&6; }
6906 fi
6907 rm -f core conftest.err conftest.$ac_objext \
6908     conftest$ac_exeext conftest.$ac_ext
6909   LIBS="$old_LIBS"
6910 fi
6911
6912 if test "x$smart_lib" = "x"; then
6913
6914
6915 if test "x$LOCATE" != "x"; then
6916         DIRS=
6917   file=libcollectdclient${libltdl_cv_shlibext}
6918
6919   for x in `${LOCATE} $file 2>/dev/null`; do
6920                                         base=`echo $x | sed "s%/${file}%%"`
6921     if test "x$x" = "x$base"; then
6922       continue;
6923     fi
6924
6925     dir=`${DIRNAME} $x 2>/dev/null`
6926                 exclude=`echo ${dir} | ${GREP} /home`
6927     if test "x$exclude" != "x"; then
6928       continue
6929     fi
6930
6931                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6932     if test "x$already" = "x"; then
6933       DIRS="$DIRS $dir"
6934     fi
6935   done
6936 fi
6937
6938 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6939
6940
6941
6942 if test "x$LOCATE" != "x"; then
6943         DIRS=
6944   file=libcollectdclient.a
6945
6946   for x in `${LOCATE} $file 2>/dev/null`; do
6947                                         base=`echo $x | sed "s%/${file}%%"`
6948     if test "x$x" = "x$base"; then
6949       continue;
6950     fi
6951
6952     dir=`${DIRNAME} $x 2>/dev/null`
6953                 exclude=`echo ${dir} | ${GREP} /home`
6954     if test "x$exclude" != "x"; then
6955       continue
6956     fi
6957
6958                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6959     if test "x$already" = "x"; then
6960       DIRS="$DIRS $dir"
6961     fi
6962   done
6963 fi
6964
6965 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6966
6967
6968   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
6969     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient in $try" >&5
6970 $as_echo_n "checking for lcc_connect in -lcollectdclient in $try... " >&6; }
6971     LIBS="-lcollectdclient $old_LIBS"
6972     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6973     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6974 /* end confdefs.h.  */
6975 extern char lcc_connect();
6976 int
6977 main ()
6978 {
6979 lcc_connect()
6980   ;
6981   return 0;
6982 }
6983 _ACEOF
6984 if ac_fn_c_try_link "$LINENO"; then :
6985
6986                   smart_lib="-lcollectdclient"
6987                   smart_ldflags="-L$try -Wl,-rpath,$try"
6988                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6989 $as_echo "yes" >&6; }
6990                   break
6991
6992 else
6993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6994 $as_echo "no" >&6; }
6995 fi
6996 rm -f core conftest.err conftest.$ac_objext \
6997     conftest$ac_exeext conftest.$ac_ext
6998   done
6999   LIBS="$old_LIBS"
7000   CPPFLAGS="$old_CPPFLAGS"
7001 fi
7002
7003 if test "x$smart_lib" != "x"; then
7004   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
7005   LIBS="$smart_ldflags $smart_lib $old_LIBS"
7006   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
7007 fi
7008
7009 if test "x$ac_cv_lib_collectdclient_lcc_connect" != "xyes"; then
7010   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: collectdclient library not found. Use --with-collectdclient-lib-dir=<path>." >&5
7011 $as_echo "$as_me: WARNING: collectdclient library not found. Use --with-collectdclient-lib-dir=<path>." >&2;}
7012 else
7013   COLLECTDC_LIBS="${smart_lib}"
7014   COLLECTDC_LDFLAGS="${smart_ldflags}"
7015 fi
7016 LIBS="${old_LIBS}"
7017
7018 cap_lib_dir=
7019
7020 # Check whether --with-cap-lib-dir was given.
7021 if test "${with_cap_lib_dir+set}" = set; then :
7022   withval=$with_cap_lib_dir; case "$withval" in
7023     no)
7024       as_fn_error $? "Need cap-lib-dir" "$LINENO" 5
7025       ;;
7026     yes)
7027       ;;
7028     *)
7029       cap_lib_dir="$withval"
7030       ;;
7031   esac
7032 fi
7033
7034
7035 cap_include_dir=
7036
7037 # Check whether --with-cap-include-dir was given.
7038 if test "${with_cap_include_dir+set}" = set; then :
7039   withval=$with_cap_include_dir; case "$withval" in
7040     no)
7041       as_fn_error $? "Need cap-include-dir" "$LINENO" 5
7042       ;;
7043     yes)
7044       ;;
7045     *)
7046       cap_include_dir="$withval"
7047       ;;
7048   esac
7049 fi
7050
7051
7052 smart_try_dir="$cap_lib_dir"
7053
7054
7055 sm_lib_safe=`echo "cap" | sed 'y%./+-%__p_%'`
7056 sm_func_safe=`echo "cap_get_proc" | sed 'y%./+-%__p_%'`
7057
7058 old_LIBS="$LIBS"
7059 old_CPPFLAGS="$CPPFLAGS"
7060 smart_lib=
7061 smart_ldflags=
7062 smart_lib_dir=
7063
7064 if test "x$smart_try_dir" != "x"; then
7065   for try in $smart_try_dir; do
7066     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap in $try" >&5
7067 $as_echo_n "checking for cap_get_proc in -lcap in $try... " >&6; }
7068     LIBS="-lcap $old_LIBS"
7069     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
7070     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7071 /* end confdefs.h.  */
7072 extern char cap_get_proc();
7073 int
7074 main ()
7075 {
7076 cap_get_proc()
7077   ;
7078   return 0;
7079 }
7080 _ACEOF
7081 if ac_fn_c_try_link "$LINENO"; then :
7082
7083                  smart_lib="-lcap"
7084                  smart_ldflags="-L$try -Wl,-rpath,$try"
7085                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7086 $as_echo "yes" >&6; }
7087                  break
7088
7089 else
7090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7091 $as_echo "no" >&6; }
7092 fi
7093 rm -f core conftest.err conftest.$ac_objext \
7094     conftest$ac_exeext conftest.$ac_ext
7095   done
7096   LIBS="$old_LIBS"
7097   CPPFLAGS="$old_CPPFLAGS"
7098 fi
7099
7100 if test "x$smart_lib" = "x"; then
7101   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap" >&5
7102 $as_echo_n "checking for cap_get_proc in -lcap... " >&6; }
7103   LIBS="-lcap $old_LIBS"
7104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7105 /* end confdefs.h.  */
7106 extern char cap_get_proc();
7107 int
7108 main ()
7109 {
7110 cap_get_proc()
7111   ;
7112   return 0;
7113 }
7114 _ACEOF
7115 if ac_fn_c_try_link "$LINENO"; then :
7116
7117                 smart_lib="-lcap"
7118                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7119 $as_echo "yes" >&6; }
7120
7121 else
7122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7123 $as_echo "no" >&6; }
7124 fi
7125 rm -f core conftest.err conftest.$ac_objext \
7126     conftest$ac_exeext conftest.$ac_ext
7127   LIBS="$old_LIBS"
7128 fi
7129
7130 if test "x$smart_lib" = "x"; then
7131
7132
7133 if test "x$LOCATE" != "x"; then
7134         DIRS=
7135   file=libcap${libltdl_cv_shlibext}
7136
7137   for x in `${LOCATE} $file 2>/dev/null`; do
7138                                         base=`echo $x | sed "s%/${file}%%"`
7139     if test "x$x" = "x$base"; then
7140       continue;
7141     fi
7142
7143     dir=`${DIRNAME} $x 2>/dev/null`
7144                 exclude=`echo ${dir} | ${GREP} /home`
7145     if test "x$exclude" != "x"; then
7146       continue
7147     fi
7148
7149                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
7150     if test "x$already" = "x"; then
7151       DIRS="$DIRS $dir"
7152     fi
7153   done
7154 fi
7155
7156 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
7157
7158
7159
7160 if test "x$LOCATE" != "x"; then
7161         DIRS=
7162   file=libcap.a
7163
7164   for x in `${LOCATE} $file 2>/dev/null`; do
7165                                         base=`echo $x | sed "s%/${file}%%"`
7166     if test "x$x" = "x$base"; then
7167       continue;
7168     fi
7169
7170     dir=`${DIRNAME} $x 2>/dev/null`
7171                 exclude=`echo ${dir} | ${GREP} /home`
7172     if test "x$exclude" != "x"; then
7173       continue
7174     fi
7175
7176                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
7177     if test "x$already" = "x"; then
7178       DIRS="$DIRS $dir"
7179     fi
7180   done
7181 fi
7182
7183 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
7184
7185
7186   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
7187     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap in $try" >&5
7188 $as_echo_n "checking for cap_get_proc in -lcap in $try... " >&6; }
7189     LIBS="-lcap $old_LIBS"
7190     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
7191     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7192 /* end confdefs.h.  */
7193 extern char cap_get_proc();
7194 int
7195 main ()
7196 {
7197 cap_get_proc()
7198   ;
7199   return 0;
7200 }
7201 _ACEOF
7202 if ac_fn_c_try_link "$LINENO"; then :
7203
7204                   smart_lib="-lcap"
7205                   smart_ldflags="-L$try -Wl,-rpath,$try"
7206                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7207 $as_echo "yes" >&6; }
7208                   break
7209
7210 else
7211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7212 $as_echo "no" >&6; }
7213 fi
7214 rm -f core conftest.err conftest.$ac_objext \
7215     conftest$ac_exeext conftest.$ac_ext
7216   done
7217   LIBS="$old_LIBS"
7218   CPPFLAGS="$old_CPPFLAGS"
7219 fi
7220
7221 if test "x$smart_lib" != "x"; then
7222   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
7223   LIBS="$smart_ldflags $smart_lib $old_LIBS"
7224   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
7225 fi
7226
7227 if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then
7228   { $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
7229 $as_echo "$as_me: WARNING: cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>." >&2;}
7230 else
7231
7232 $as_echo "#define HAVE_LIBCAP 1" >>confdefs.h
7233
7234   HAVE_LIBCAP=1
7235 fi
7236
7237
7238   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a readline compatible library" >&5
7239 $as_echo_n "checking for a readline compatible library... " >&6; }
7240 if ${vl_cv_lib_readline+:} false; then :
7241   $as_echo_n "(cached) " >&6
7242 else
7243
7244     ORIG_LIBS="$LIBS"
7245     for readline_lib in readline edit editline; do
7246       for termcap_lib in "" termcap curses ncurses; do
7247         if test -z "$termcap_lib"; then
7248           TRY_LIB="-l$readline_lib"
7249         else
7250           TRY_LIB="-l$readline_lib -l$termcap_lib"
7251         fi
7252         LIBS="$ORIG_LIBS $TRY_LIB"
7253         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7254 /* end confdefs.h.  */
7255
7256 /* Override any GCC internal prototype to avoid an error.
7257    Use char because int might match the return type of a GCC
7258    builtin and then its argument prototype would still apply.  */
7259 #ifdef __cplusplus
7260 extern "C"
7261 #endif
7262 char readline ();
7263 int
7264 main ()
7265 {
7266 return readline ();
7267   ;
7268   return 0;
7269 }
7270 _ACEOF
7271 if ac_fn_c_try_link "$LINENO"; then :
7272   vl_cv_lib_readline="$TRY_LIB"
7273 fi
7274 rm -f core conftest.err conftest.$ac_objext \
7275     conftest$ac_exeext conftest.$ac_ext
7276         if test -n "$vl_cv_lib_readline"; then
7277           break
7278         fi
7279       done
7280       if test -n "$vl_cv_lib_readline"; then
7281         break
7282       fi
7283     done
7284     if test -z "$vl_cv_lib_readline"; then
7285       vl_cv_lib_readline="no"
7286       LIBS="$ORIG_LIBS"
7287     fi
7288
7289 fi
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vl_cv_lib_readline" >&5
7291 $as_echo "$vl_cv_lib_readline" >&6; }
7292
7293   if test "$vl_cv_lib_readline" != "no"; then
7294     LIBREADLINE="$vl_cv_lib_readline"
7295
7296 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
7297
7298     for ac_header in readline.h readline/readline.h
7299 do :
7300   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7301 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7302 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7303   cat >>confdefs.h <<_ACEOF
7304 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7305 _ACEOF
7306
7307 fi
7308
7309 done
7310
7311     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
7312 $as_echo_n "checking whether readline supports history... " >&6; }
7313 if ${vl_cv_lib_readline_history+:} false; then :
7314   $as_echo_n "(cached) " >&6
7315 else
7316
7317       vl_cv_lib_readline_history="no"
7318       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7319 /* end confdefs.h.  */
7320
7321 /* Override any GCC internal prototype to avoid an error.
7322    Use char because int might match the return type of a GCC
7323    builtin and then its argument prototype would still apply.  */
7324 #ifdef __cplusplus
7325 extern "C"
7326 #endif
7327 char add_history ();
7328 int
7329 main ()
7330 {
7331 return add_history ();
7332   ;
7333   return 0;
7334 }
7335 _ACEOF
7336 if ac_fn_c_try_link "$LINENO"; then :
7337   vl_cv_lib_readline_history="yes"
7338 fi
7339 rm -f core conftest.err conftest.$ac_objext \
7340     conftest$ac_exeext conftest.$ac_ext
7341
7342 fi
7343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vl_cv_lib_readline_history" >&5
7344 $as_echo "$vl_cv_lib_readline_history" >&6; }
7345     if test "$vl_cv_lib_readline_history" = "yes"; then
7346
7347 $as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
7348
7349       for ac_header in history.h readline/history.h
7350 do :
7351   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7352 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7353 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7354   cat >>confdefs.h <<_ACEOF
7355 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7356 _ACEOF
7357
7358 fi
7359
7360 done
7361
7362     fi
7363   fi
7364
7365
7366
7367
7368 smart_try_dir="$talloc_include_dir"
7369
7370
7371 ac_safe=`echo "talloc.h" | sed 'y%./+-%__pm%'`
7372 old_CPPFLAGS="$CPPFLAGS"
7373 smart_include=
7374 smart_include_dir="/usr/local/include /opt/include"
7375
7376 _smart_try_dir=
7377 _smart_include_dir=
7378
7379 for _prefix in $smart_prefix ""; do
7380   for _dir in $smart_try_dir; do
7381     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
7382   done
7383
7384   for _dir in $smart_include_dir; do
7385     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
7386   done
7387 done
7388
7389 if test "x$_smart_try_dir" != "x"; then
7390   for try in $_smart_try_dir; do
7391     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h in $try" >&5
7392 $as_echo_n "checking for talloc.h in $try... " >&6; }
7393     CPPFLAGS="-isystem $try $old_CPPFLAGS"
7394     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7395 /* end confdefs.h.  */
7396
7397                     #include <talloc.h>
7398 int
7399 main ()
7400 {
7401 int a = 1;
7402   ;
7403   return 0;
7404 }
7405 _ACEOF
7406 if ac_fn_c_try_compile "$LINENO"; then :
7407
7408                      smart_include="-isystem $try"
7409                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7410 $as_echo "yes" >&6; }
7411                      break
7412
7413 else
7414
7415                      smart_include=
7416                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7417 $as_echo "no" >&6; }
7418
7419 fi
7420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7421   done
7422   CPPFLAGS="$old_CPPFLAGS"
7423 fi
7424
7425 if test "x$smart_include" = "x"; then
7426   for _prefix in $smart_prefix; do
7427     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/talloc.h" >&5
7428 $as_echo_n "checking for ${_prefix}/talloc.h... " >&6; }
7429
7430     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7431 /* end confdefs.h.  */
7432
7433                     #include <talloc.h>
7434 int
7435 main ()
7436 {
7437 int a = 1;
7438   ;
7439   return 0;
7440 }
7441 _ACEOF
7442 if ac_fn_c_try_compile "$LINENO"; then :
7443
7444                      smart_include="-isystem ${_prefix}/"
7445                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7446 $as_echo "yes" >&6; }
7447                      break
7448
7449 else
7450
7451                      smart_include=
7452                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7453 $as_echo "no" >&6; }
7454
7455 fi
7456 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7457   done
7458 fi
7459
7460 if test "x$smart_include" = "x"; then
7461     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h" >&5
7462 $as_echo_n "checking for talloc.h... " >&6; }
7463
7464     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7465 /* end confdefs.h.  */
7466
7467                     #include <talloc.h>
7468 int
7469 main ()
7470 {
7471 int a = 1;
7472   ;
7473   return 0;
7474 }
7475 _ACEOF
7476 if ac_fn_c_try_compile "$LINENO"; then :
7477
7478                      smart_include=" "
7479                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7480 $as_echo "yes" >&6; }
7481                      break
7482
7483 else
7484
7485                      smart_include=
7486                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7487 $as_echo "no" >&6; }
7488
7489 fi
7490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7491 fi
7492
7493 if test "x$smart_include" = "x"; then
7494
7495   for prefix in $smart_prefix; do
7496
7497
7498 if test "x$LOCATE" != "x"; then
7499         DIRS=
7500   file="${_prefix}/${1}"
7501
7502   for x in `${LOCATE} $file 2>/dev/null`; do
7503                                         base=`echo $x | sed "s%/${file}%%"`
7504     if test "x$x" = "x$base"; then
7505       continue;
7506     fi
7507
7508     dir=`${DIRNAME} $x 2>/dev/null`
7509                 exclude=`echo ${dir} | ${GREP} /home`
7510     if test "x$exclude" != "x"; then
7511       continue
7512     fi
7513
7514                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
7515     if test "x$already" = "x"; then
7516       DIRS="$DIRS $dir"
7517     fi
7518   done
7519 fi
7520
7521 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
7522
7523   done
7524
7525
7526 if test "x$LOCATE" != "x"; then
7527         DIRS=
7528   file=talloc.h
7529
7530   for x in `${LOCATE} $file 2>/dev/null`; do
7531                                         base=`echo $x | sed "s%/${file}%%"`
7532     if test "x$x" = "x$base"; then
7533       continue;
7534     fi
7535
7536     dir=`${DIRNAME} $x 2>/dev/null`
7537                 exclude=`echo ${dir} | ${GREP} /home`
7538     if test "x$exclude" != "x"; then
7539       continue
7540     fi
7541
7542                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
7543     if test "x$already" = "x"; then
7544       DIRS="$DIRS $dir"
7545     fi
7546   done
7547 fi
7548
7549 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
7550
7551
7552   for try in $_smart_include_dir; do
7553     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h in $try" >&5
7554 $as_echo_n "checking for talloc.h in $try... " >&6; }
7555     CPPFLAGS="-isystem $try $old_CPPFLAGS"
7556     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7557 /* end confdefs.h.  */
7558
7559                     #include <talloc.h>
7560 int
7561 main ()
7562 {
7563 int a = 1;
7564   ;
7565   return 0;
7566 }
7567 _ACEOF
7568 if ac_fn_c_try_compile "$LINENO"; then :
7569
7570                      smart_include="-isystem $try"
7571                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7572 $as_echo "yes" >&6; }
7573                      break
7574
7575 else
7576
7577                      smart_include=
7578                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7579 $as_echo "no" >&6; }
7580
7581 fi
7582 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7583   done
7584   CPPFLAGS="$old_CPPFLAGS"
7585 fi
7586
7587 if test "x$smart_include" != "x"; then
7588   eval "ac_cv_header_$ac_safe=yes"
7589   CPPFLAGS="$smart_include $old_CPPFLAGS"
7590   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
7591 fi
7592
7593 smart_prefix=
7594
7595 if test "x$ac_cv_header_talloc_h" != "xyes"; then
7596   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: talloc headers not found. Use --with-talloc-include-dir=<path>." >&5
7597 $as_echo "$as_me: WARNING: talloc headers not found. Use --with-talloc-include-dir=<path>." >&2;}
7598   as_fn_error $? "FreeRADIUS requires libtalloc" "$LINENO" 5
7599 fi
7600
7601 case "$host" in
7602   *-interix*)
7603     CFLAGS="$CFLAGS -D_ALL_SOURCE"
7604     ;;
7605   *-darwin*)
7606     CFLAGS="$CFLAGS -DDARWIN"
7607     LIBS="-framework DirectoryService $LIBS"
7608
7609 $as_echo "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
7610
7611     ;;
7612 esac
7613
7614 ac_header_dirent=no
7615 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
7616   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7618 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
7619 if eval \${$as_ac_Header+:} false; then :
7620   $as_echo_n "(cached) " >&6
7621 else
7622   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7623 /* end confdefs.h.  */
7624 #include <sys/types.h>
7625 #include <$ac_hdr>
7626
7627 int
7628 main ()
7629 {
7630 if ((DIR *) 0)
7631 return 0;
7632   ;
7633   return 0;
7634 }
7635 _ACEOF
7636 if ac_fn_c_try_compile "$LINENO"; then :
7637   eval "$as_ac_Header=yes"
7638 else
7639   eval "$as_ac_Header=no"
7640 fi
7641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7642 fi
7643 eval ac_res=\$$as_ac_Header
7644                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7645 $as_echo "$ac_res" >&6; }
7646 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7647   cat >>confdefs.h <<_ACEOF
7648 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
7649 _ACEOF
7650
7651 ac_header_dirent=$ac_hdr; break
7652 fi
7653
7654 done
7655 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7656 if test $ac_header_dirent = dirent.h; then
7657   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7658 $as_echo_n "checking for library containing opendir... " >&6; }
7659 if ${ac_cv_search_opendir+:} false; then :
7660   $as_echo_n "(cached) " >&6
7661 else
7662   ac_func_search_save_LIBS=$LIBS
7663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7664 /* end confdefs.h.  */
7665
7666 /* Override any GCC internal prototype to avoid an error.
7667    Use char because int might match the return type of a GCC
7668    builtin and then its argument prototype would still apply.  */
7669 #ifdef __cplusplus
7670 extern "C"
7671 #endif
7672 char opendir ();
7673 int
7674 main ()
7675 {
7676 return opendir ();
7677   ;
7678   return 0;
7679 }
7680 _ACEOF
7681 for ac_lib in '' dir; do
7682   if test -z "$ac_lib"; then
7683     ac_res="none required"
7684   else
7685     ac_res=-l$ac_lib
7686     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7687   fi
7688   if ac_fn_c_try_link "$LINENO"; then :
7689   ac_cv_search_opendir=$ac_res
7690 fi
7691 rm -f core conftest.err conftest.$ac_objext \
7692     conftest$ac_exeext
7693   if ${ac_cv_search_opendir+:} false; then :
7694   break
7695 fi
7696 done
7697 if ${ac_cv_search_opendir+:} false; then :
7698
7699 else
7700   ac_cv_search_opendir=no
7701 fi
7702 rm conftest.$ac_ext
7703 LIBS=$ac_func_search_save_LIBS
7704 fi
7705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7706 $as_echo "$ac_cv_search_opendir" >&6; }
7707 ac_res=$ac_cv_search_opendir
7708 if test "$ac_res" != no; then :
7709   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7710
7711 fi
7712
7713 else
7714   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7715 $as_echo_n "checking for library containing opendir... " >&6; }
7716 if ${ac_cv_search_opendir+:} false; then :
7717   $as_echo_n "(cached) " >&6
7718 else
7719   ac_func_search_save_LIBS=$LIBS
7720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7721 /* end confdefs.h.  */
7722
7723 /* Override any GCC internal prototype to avoid an error.
7724    Use char because int might match the return type of a GCC
7725    builtin and then its argument prototype would still apply.  */
7726 #ifdef __cplusplus
7727 extern "C"
7728 #endif
7729 char opendir ();
7730 int
7731 main ()
7732 {
7733 return opendir ();
7734   ;
7735   return 0;
7736 }
7737 _ACEOF
7738 for ac_lib in '' x; do
7739   if test -z "$ac_lib"; then
7740     ac_res="none required"
7741   else
7742     ac_res=-l$ac_lib
7743     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7744   fi
7745   if ac_fn_c_try_link "$LINENO"; then :
7746   ac_cv_search_opendir=$ac_res
7747 fi
7748 rm -f core conftest.err conftest.$ac_objext \
7749     conftest$ac_exeext
7750   if ${ac_cv_search_opendir+:} false; then :
7751   break
7752 fi
7753 done
7754 if ${ac_cv_search_opendir+:} false; then :
7755
7756 else
7757   ac_cv_search_opendir=no
7758 fi
7759 rm conftest.$ac_ext
7760 LIBS=$ac_func_search_save_LIBS
7761 fi
7762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7763 $as_echo "$ac_cv_search_opendir" >&6; }
7764 ac_res=$ac_cv_search_opendir
7765 if test "$ac_res" != no; then :
7766   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7767
7768 fi
7769
7770 fi
7771
7772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7773 $as_echo_n "checking for ANSI C header files... " >&6; }
7774 if ${ac_cv_header_stdc+:} false; then :
7775   $as_echo_n "(cached) " >&6
7776 else
7777   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7778 /* end confdefs.h.  */
7779 #include <stdlib.h>
7780 #include <stdarg.h>
7781 #include <string.h>
7782 #include <float.h>
7783
7784 int
7785 main ()
7786 {
7787
7788   ;
7789   return 0;
7790 }
7791 _ACEOF
7792 if ac_fn_c_try_compile "$LINENO"; then :
7793   ac_cv_header_stdc=yes
7794 else
7795   ac_cv_header_stdc=no
7796 fi
7797 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7798
7799 if test $ac_cv_header_stdc = yes; then
7800   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7801   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7802 /* end confdefs.h.  */
7803 #include <string.h>
7804
7805 _ACEOF
7806 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7807   $EGREP "memchr" >/dev/null 2>&1; then :
7808
7809 else
7810   ac_cv_header_stdc=no
7811 fi
7812 rm -f conftest*
7813
7814 fi
7815
7816 if test $ac_cv_header_stdc = yes; then
7817   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7819 /* end confdefs.h.  */
7820 #include <stdlib.h>
7821
7822 _ACEOF
7823 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7824   $EGREP "free" >/dev/null 2>&1; then :
7825
7826 else
7827   ac_cv_header_stdc=no
7828 fi
7829 rm -f conftest*
7830
7831 fi
7832
7833 if test $ac_cv_header_stdc = yes; then
7834   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7835   if test "$cross_compiling" = yes; then :
7836   :
7837 else
7838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7839 /* end confdefs.h.  */
7840 #include <ctype.h>
7841 #include <stdlib.h>
7842 #if ((' ' & 0x0FF) == 0x020)
7843 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7844 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7845 #else
7846 # define ISLOWER(c) \
7847                    (('a' <= (c) && (c) <= 'i') \
7848                      || ('j' <= (c) && (c) <= 'r') \
7849                      || ('s' <= (c) && (c) <= 'z'))
7850 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7851 #endif
7852
7853 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7854 int
7855 main ()
7856 {
7857   int i;
7858   for (i = 0; i < 256; i++)
7859     if (XOR (islower (i), ISLOWER (i))
7860         || toupper (i) != TOUPPER (i))
7861       return 2;
7862   return 0;
7863 }
7864 _ACEOF
7865 if ac_fn_c_try_run "$LINENO"; then :
7866
7867 else
7868   ac_cv_header_stdc=no
7869 fi
7870 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7871   conftest.$ac_objext conftest.beam conftest.$ac_ext
7872 fi
7873
7874 fi
7875 fi
7876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7877 $as_echo "$ac_cv_header_stdc" >&6; }
7878 if test $ac_cv_header_stdc = yes; then
7879
7880 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7881
7882 fi
7883
7884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
7885 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
7886 if ${ac_cv_header_time+:} false; then :
7887   $as_echo_n "(cached) " >&6
7888 else
7889   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7890 /* end confdefs.h.  */
7891 #include <sys/types.h>
7892 #include <sys/time.h>
7893 #include <time.h>
7894
7895 int
7896 main ()
7897 {
7898 if ((struct tm *) 0)
7899 return 0;
7900   ;
7901   return 0;
7902 }
7903 _ACEOF
7904 if ac_fn_c_try_compile "$LINENO"; then :
7905   ac_cv_header_time=yes
7906 else
7907   ac_cv_header_time=no
7908 fi
7909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7910 fi
7911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
7912 $as_echo "$ac_cv_header_time" >&6; }
7913 if test $ac_cv_header_time = yes; then
7914
7915 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
7916
7917 fi
7918
7919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
7920 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
7921 if ${ac_cv_header_sys_wait_h+:} false; then :
7922   $as_echo_n "(cached) " >&6
7923 else
7924   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7925 /* end confdefs.h.  */
7926 #include <sys/types.h>
7927 #include <sys/wait.h>
7928 #ifndef WEXITSTATUS
7929 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
7930 #endif
7931 #ifndef WIFEXITED
7932 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7933 #endif
7934
7935 int
7936 main ()
7937 {
7938   int s;
7939   wait (&s);
7940   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7941   ;
7942   return 0;
7943 }
7944 _ACEOF
7945 if ac_fn_c_try_compile "$LINENO"; then :
7946   ac_cv_header_sys_wait_h=yes
7947 else
7948   ac_cv_header_sys_wait_h=no
7949 fi
7950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7951 fi
7952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
7953 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
7954 if test $ac_cv_header_sys_wait_h = yes; then
7955
7956 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7957
7958 fi
7959
7960
7961 for ac_header in \
7962   dlfcn.h \
7963   unistd.h \
7964   crypt.h \
7965   errno.h \
7966   resource.h \
7967   sys/resource.h \
7968   getopt.h \
7969   malloc.h \
7970   utmp.h \
7971   utmpx.h \
7972   signal.h \
7973   sys/select.h \
7974   syslog.h \
7975   inttypes.h \
7976   stdint.h \
7977   stdbool.h \
7978   stdio.h \
7979   netdb.h \
7980   semaphore.h \
7981   arpa/inet.h \
7982   netinet/in.h \
7983   sys/types.h \
7984   sys/socket.h \
7985   winsock.h \
7986   utime.h \
7987   sys/time.h \
7988   sys/wait.h \
7989   sys/security.h \
7990   fcntl.h \
7991   sys/fcntl.h \
7992   sys/prctl.h \
7993   sys/ptrace.h \
7994   sys/un.h \
7995   glob.h \
7996   prot.h \
7997   pwd.h \
7998   grp.h \
7999   stddef.h \
8000   fnmatch.h \
8001   sia.h \
8002   siad.h \
8003   features.h \
8004   limits.h \
8005   sys/event.h
8006
8007 do :
8008   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8009 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8010 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8011   cat >>confdefs.h <<_ACEOF
8012 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8013 _ACEOF
8014
8015 fi
8016
8017 done
8018
8019
8020 for ac_header in net/if.h
8021 do :
8022   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
8023     #ifdef HAVE_SYS_SOCKET_H
8024     #  include <sys/socket.h>
8025     #endif
8026
8027
8028 "
8029 if test "x$ac_cv_header_net_if_h" = xyes; then :
8030   cat >>confdefs.h <<_ACEOF
8031 #define HAVE_NET_IF_H 1
8032 _ACEOF
8033
8034 fi
8035
8036 done
8037
8038
8039 if test "x$ac_cv_header_sys_security_h" = "xyes" && test "x$ac_cv_header_prot_h" = "xyes"
8040 then
8041
8042 $as_echo "#define OSFC2 /**/" >>confdefs.h
8043
8044 fi
8045
8046 if test "x$ac_cv_header_sia_h" = "xyes" && test "x$ac_cv_header_siad_h" = "xyes"
8047 then
8048
8049 $as_echo "#define OSFSIA /**/" >>confdefs.h
8050
8051 fi
8052
8053 if test "x$WITH_OPENSSL" = xyes; then
8054   OLD_LIBS="$LIBS"
8055
8056         CFLAGS="$CFLAGS -DOPENSSL_NO_KRB5"
8057
8058         smart_try_dir="$openssl_lib_dir"
8059
8060
8061 sm_lib_safe=`echo "crypto" | sed 'y%./+-%__p_%'`
8062 sm_func_safe=`echo "DH_new" | sed 'y%./+-%__p_%'`
8063
8064 old_LIBS="$LIBS"
8065 old_CPPFLAGS="$CPPFLAGS"
8066 smart_lib=
8067 smart_ldflags=
8068 smart_lib_dir=
8069
8070 if test "x$smart_try_dir" != "x"; then
8071   for try in $smart_try_dir; do
8072     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto in $try" >&5
8073 $as_echo_n "checking for DH_new in -lcrypto in $try... " >&6; }
8074     LIBS="-lcrypto $old_LIBS"
8075     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
8076     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8077 /* end confdefs.h.  */
8078 extern char DH_new();
8079 int
8080 main ()
8081 {
8082 DH_new()
8083   ;
8084   return 0;
8085 }
8086 _ACEOF
8087 if ac_fn_c_try_link "$LINENO"; then :
8088
8089                  smart_lib="-lcrypto"
8090                  smart_ldflags="-L$try -Wl,-rpath,$try"
8091                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8092 $as_echo "yes" >&6; }
8093                  break
8094
8095 else
8096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8097 $as_echo "no" >&6; }
8098 fi
8099 rm -f core conftest.err conftest.$ac_objext \
8100     conftest$ac_exeext conftest.$ac_ext
8101   done
8102   LIBS="$old_LIBS"
8103   CPPFLAGS="$old_CPPFLAGS"
8104 fi
8105
8106 if test "x$smart_lib" = "x"; then
8107   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto" >&5
8108 $as_echo_n "checking for DH_new in -lcrypto... " >&6; }
8109   LIBS="-lcrypto $old_LIBS"
8110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8111 /* end confdefs.h.  */
8112 extern char DH_new();
8113 int
8114 main ()
8115 {
8116 DH_new()
8117   ;
8118   return 0;
8119 }
8120 _ACEOF
8121 if ac_fn_c_try_link "$LINENO"; then :
8122
8123                 smart_lib="-lcrypto"
8124                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8125 $as_echo "yes" >&6; }
8126
8127 else
8128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8129 $as_echo "no" >&6; }
8130 fi
8131 rm -f core conftest.err conftest.$ac_objext \
8132     conftest$ac_exeext conftest.$ac_ext
8133   LIBS="$old_LIBS"
8134 fi
8135
8136 if test "x$smart_lib" = "x"; then
8137
8138
8139 if test "x$LOCATE" != "x"; then
8140         DIRS=
8141   file=libcrypto${libltdl_cv_shlibext}
8142
8143   for x in `${LOCATE} $file 2>/dev/null`; do
8144                                         base=`echo $x | sed "s%/${file}%%"`
8145     if test "x$x" = "x$base"; then
8146       continue;
8147     fi
8148
8149     dir=`${DIRNAME} $x 2>/dev/null`
8150                 exclude=`echo ${dir} | ${GREP} /home`
8151     if test "x$exclude" != "x"; then
8152       continue
8153     fi
8154
8155                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
8156     if test "x$already" = "x"; then
8157       DIRS="$DIRS $dir"
8158     fi
8159   done
8160 fi
8161
8162 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
8163
8164
8165
8166 if test "x$LOCATE" != "x"; then
8167         DIRS=
8168   file=libcrypto.a
8169
8170   for x in `${LOCATE} $file 2>/dev/null`; do
8171                                         base=`echo $x | sed "s%/${file}%%"`
8172     if test "x$x" = "x$base"; then
8173       continue;
8174     fi
8175
8176     dir=`${DIRNAME} $x 2>/dev/null`
8177                 exclude=`echo ${dir} | ${GREP} /home`
8178     if test "x$exclude" != "x"; then
8179       continue
8180     fi
8181
8182                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
8183     if test "x$already" = "x"; then
8184       DIRS="$DIRS $dir"
8185     fi
8186   done
8187 fi
8188
8189 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
8190
8191
8192   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
8193     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto in $try" >&5
8194 $as_echo_n "checking for DH_new in -lcrypto in $try... " >&6; }
8195     LIBS="-lcrypto $old_LIBS"
8196     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
8197     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8198 /* end confdefs.h.  */
8199 extern char DH_new();
8200 int
8201 main ()
8202 {
8203 DH_new()
8204   ;
8205   return 0;
8206 }
8207 _ACEOF
8208 if ac_fn_c_try_link "$LINENO"; then :
8209
8210                   smart_lib="-lcrypto"
8211                   smart_ldflags="-L$try -Wl,-rpath,$try"
8212                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8213 $as_echo "yes" >&6; }
8214                   break
8215
8216 else
8217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8218 $as_echo "no" >&6; }
8219 fi
8220 rm -f core conftest.err conftest.$ac_objext \
8221     conftest$ac_exeext conftest.$ac_ext
8222   done
8223   LIBS="$old_LIBS"
8224   CPPFLAGS="$old_CPPFLAGS"
8225 fi
8226
8227 if test "x$smart_lib" != "x"; then
8228   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
8229   LIBS="$smart_ldflags $smart_lib $old_LIBS"
8230   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
8231 fi
8232
8233   if test "x$ac_cv_lib_crypto_DH_new" = "xyes"; then
8234
8235 $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
8236
8237     OPENSSL_LIBS="$smart_lib"
8238     OPENSSL_LDFLAGS="$smart_ldflags"
8239
8240
8241
8242 sm_lib_safe=`echo "ssl" | sed 'y%./+-%__p_%'`
8243 sm_func_safe=`echo "SSL_new" | sed 'y%./+-%__p_%'`
8244
8245 old_LIBS="$LIBS"
8246 old_CPPFLAGS="$CPPFLAGS"
8247 smart_lib=
8248 smart_ldflags=
8249 smart_lib_dir=
8250
8251 if test "x$smart_try_dir" != "x"; then
8252   for try in $smart_try_dir; do
8253     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl in $try" >&5
8254 $as_echo_n "checking for SSL_new in -lssl in $try... " >&6; }
8255     LIBS="-lssl $old_LIBS"
8256     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
8257     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8258 /* end confdefs.h.  */
8259 extern char SSL_new();
8260 int
8261 main ()
8262 {
8263 SSL_new()
8264   ;
8265   return 0;
8266 }
8267 _ACEOF
8268 if ac_fn_c_try_link "$LINENO"; then :
8269
8270                  smart_lib="-lssl"
8271                  smart_ldflags="-L$try -Wl,-rpath,$try"
8272                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8273 $as_echo "yes" >&6; }
8274                  break
8275
8276 else
8277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8278 $as_echo "no" >&6; }
8279 fi
8280 rm -f core conftest.err conftest.$ac_objext \
8281     conftest$ac_exeext conftest.$ac_ext
8282   done
8283   LIBS="$old_LIBS"
8284   CPPFLAGS="$old_CPPFLAGS"
8285 fi
8286
8287 if test "x$smart_lib" = "x"; then
8288   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
8289 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
8290   LIBS="-lssl $old_LIBS"
8291   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8292 /* end confdefs.h.  */
8293 extern char SSL_new();
8294 int
8295 main ()
8296 {
8297 SSL_new()
8298   ;
8299   return 0;
8300 }
8301 _ACEOF
8302 if ac_fn_c_try_link "$LINENO"; then :
8303
8304                 smart_lib="-lssl"
8305                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8306 $as_echo "yes" >&6; }
8307
8308 else
8309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8310 $as_echo "no" >&6; }
8311 fi
8312 rm -f core conftest.err conftest.$ac_objext \
8313     conftest$ac_exeext conftest.$ac_ext
8314   LIBS="$old_LIBS"
8315 fi
8316
8317 if test "x$smart_lib" = "x"; then
8318
8319
8320 if test "x$LOCATE" != "x"; then
8321         DIRS=
8322   file=libssl${libltdl_cv_shlibext}
8323
8324   for x in `${LOCATE} $file 2>/dev/null`; do
8325                                         base=`echo $x | sed "s%/${file}%%"`
8326     if test "x$x" = "x$base"; then
8327       continue;
8328     fi
8329
8330     dir=`${DIRNAME} $x 2>/dev/null`
8331                 exclude=`echo ${dir} | ${GREP} /home`
8332     if test "x$exclude" != "x"; then
8333       continue
8334     fi
8335
8336                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
8337     if test "x$already" = "x"; then
8338       DIRS="$DIRS $dir"
8339     fi
8340   done
8341 fi
8342
8343 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
8344
8345
8346
8347 if test "x$LOCATE" != "x"; then
8348         DIRS=
8349   file=libssl.a
8350
8351   for x in `${LOCATE} $file 2>/dev/null`; do
8352                                         base=`echo $x | sed "s%/${file}%%"`
8353     if test "x$x" = "x$base"; then
8354       continue;
8355     fi
8356
8357     dir=`${DIRNAME} $x 2>/dev/null`
8358                 exclude=`echo ${dir} | ${GREP} /home`
8359     if test "x$exclude" != "x"; then
8360       continue
8361     fi
8362
8363                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
8364     if test "x$already" = "x"; then
8365       DIRS="$DIRS $dir"
8366     fi
8367   done
8368 fi
8369
8370 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
8371
8372
8373   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
8374     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl in $try" >&5
8375 $as_echo_n "checking for SSL_new in -lssl in $try... " >&6; }
8376     LIBS="-lssl $old_LIBS"
8377     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
8378     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8379 /* end confdefs.h.  */
8380 extern char SSL_new();
8381 int
8382 main ()
8383 {
8384 SSL_new()
8385   ;
8386   return 0;
8387 }
8388 _ACEOF
8389 if ac_fn_c_try_link "$LINENO"; then :
8390
8391                   smart_lib="-lssl"
8392                   smart_ldflags="-L$try -Wl,-rpath,$try"
8393                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8394 $as_echo "yes" >&6; }
8395                   break
8396
8397 else
8398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8399 $as_echo "no" >&6; }
8400 fi
8401 rm -f core conftest.err conftest.$ac_objext \
8402     conftest$ac_exeext conftest.$ac_ext
8403   done
8404   LIBS="$old_LIBS"
8405   CPPFLAGS="$old_CPPFLAGS"
8406 fi
8407
8408 if test "x$smart_lib" != "x"; then
8409   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
8410   LIBS="$smart_ldflags $smart_lib $old_LIBS"
8411   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
8412 fi
8413
8414     if test "x$ac_cv_lib_ssl_SSL_new" != "xyes"; then
8415       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8416 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8417 as_fn_error $? "failed linking to libssl. Use --with-openssl-lib-dir=<path>, or --with-openssl=no (builds without OpenSSL)
8418 See \`config.log' for more details" "$LINENO" 5; }
8419     else
8420
8421 $as_echo "#define HAVE_LIBSSL 1" >>confdefs.h
8422
8423       OPENSSL_LIBS="$OPENSSL_LIBS $smart_lib"
8424
8425       if test "$OPENSSL_LDFLAGS" != "$smart_ldflags"; then
8426         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8427 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8428 as_fn_error $? "\"inconsistent LDFLAGS between -lssl '$smart_ldflags' and -lcrypto '$OPENSSL_LDFLAGS'\"
8429 See \`config.log' for more details" "$LINENO" 5; }
8430       fi
8431     fi
8432   else
8433     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8434 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8435 as_fn_error $? "failed linking to libcrypto. Use --with-openssl-lib-dir=<path>, or --with-openssl=no (builds without OpenSSL)
8436 See \`config.log' for more details" "$LINENO" 5; }
8437   fi
8438
8439   smart_try_dir="$openssl_include_dir"
8440
8441
8442 ac_safe=`echo "openssl/ssl.h" | sed 'y%./+-%__pm%'`
8443 old_CPPFLAGS="$CPPFLAGS"
8444 smart_include=
8445 smart_include_dir="/usr/local/include /opt/include"
8446
8447 _smart_try_dir=
8448 _smart_include_dir=
8449
8450 for _prefix in $smart_prefix ""; do
8451   for _dir in $smart_try_dir; do
8452     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
8453   done
8454
8455   for _dir in $smart_include_dir; do
8456     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
8457   done
8458 done
8459
8460 if test "x$_smart_try_dir" != "x"; then
8461   for try in $_smart_try_dir; do
8462     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $try" >&5
8463 $as_echo_n "checking for openssl/ssl.h in $try... " >&6; }
8464     CPPFLAGS="-isystem $try $old_CPPFLAGS"
8465     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8466 /* end confdefs.h.  */
8467
8468                     #include <openssl/ssl.h>
8469 int
8470 main ()
8471 {
8472 int a = 1;
8473   ;
8474   return 0;
8475 }
8476 _ACEOF
8477 if ac_fn_c_try_compile "$LINENO"; then :
8478
8479                      smart_include="-isystem $try"
8480                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8481 $as_echo "yes" >&6; }
8482                      break
8483
8484 else
8485
8486                      smart_include=
8487                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8488 $as_echo "no" >&6; }
8489
8490 fi
8491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8492   done
8493   CPPFLAGS="$old_CPPFLAGS"
8494 fi
8495
8496 if test "x$smart_include" = "x"; then
8497   for _prefix in $smart_prefix; do
8498     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/openssl/ssl.h" >&5
8499 $as_echo_n "checking for ${_prefix}/openssl/ssl.h... " >&6; }
8500
8501     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8502 /* end confdefs.h.  */
8503
8504                     #include <openssl/ssl.h>
8505 int
8506 main ()
8507 {
8508 int a = 1;
8509   ;
8510   return 0;
8511 }
8512 _ACEOF
8513 if ac_fn_c_try_compile "$LINENO"; then :
8514
8515                      smart_include="-isystem ${_prefix}/"
8516                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8517 $as_echo "yes" >&6; }
8518                      break
8519
8520 else
8521
8522                      smart_include=
8523                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8524 $as_echo "no" >&6; }
8525
8526 fi
8527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8528   done
8529 fi
8530
8531 if test "x$smart_include" = "x"; then
8532     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h" >&5
8533 $as_echo_n "checking for openssl/ssl.h... " >&6; }
8534
8535     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8536 /* end confdefs.h.  */
8537
8538                     #include <openssl/ssl.h>
8539 int
8540 main ()
8541 {
8542 int a = 1;
8543   ;
8544   return 0;
8545 }
8546 _ACEOF
8547 if ac_fn_c_try_compile "$LINENO"; then :
8548
8549                      smart_include=" "
8550                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8551 $as_echo "yes" >&6; }
8552                      break
8553
8554 else
8555
8556                      smart_include=
8557                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8558 $as_echo "no" >&6; }
8559
8560 fi
8561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8562 fi
8563
8564 if test "x$smart_include" = "x"; then
8565
8566   for prefix in $smart_prefix; do
8567
8568
8569 if test "x$LOCATE" != "x"; then
8570         DIRS=
8571   file="${_prefix}/${1}"
8572
8573   for x in `${LOCATE} $file 2>/dev/null`; do
8574                                         base=`echo $x | sed "s%/${file}%%"`
8575     if test "x$x" = "x$base"; then
8576       continue;
8577     fi
8578
8579     dir=`${DIRNAME} $x 2>/dev/null`
8580                 exclude=`echo ${dir} | ${GREP} /home`
8581     if test "x$exclude" != "x"; then
8582       continue
8583     fi
8584
8585                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
8586     if test "x$already" = "x"; then
8587       DIRS="$DIRS $dir"
8588     fi
8589   done
8590 fi
8591
8592 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
8593
8594   done
8595
8596
8597 if test "x$LOCATE" != "x"; then
8598         DIRS=
8599   file=openssl/ssl.h
8600
8601   for x in `${LOCATE} $file 2>/dev/null`; do
8602                                         base=`echo $x | sed "s%/${file}%%"`
8603     if test "x$x" = "x$base"; then
8604       continue;
8605     fi
8606
8607     dir=`${DIRNAME} $x 2>/dev/null`
8608                 exclude=`echo ${dir} | ${GREP} /home`
8609     if test "x$exclude" != "x"; then
8610       continue
8611     fi
8612
8613                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
8614     if test "x$already" = "x"; then
8615       DIRS="$DIRS $dir"
8616     fi
8617   done
8618 fi
8619
8620 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
8621
8622
8623   for try in $_smart_include_dir; do
8624     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $try" >&5
8625 $as_echo_n "checking for openssl/ssl.h in $try... " >&6; }
8626     CPPFLAGS="-isystem $try $old_CPPFLAGS"
8627     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8628 /* end confdefs.h.  */
8629
8630                     #include <openssl/ssl.h>
8631 int
8632 main ()
8633 {
8634 int a = 1;
8635   ;
8636   return 0;
8637 }
8638 _ACEOF
8639 if ac_fn_c_try_compile "$LINENO"; then :
8640
8641                      smart_include="-isystem $try"
8642                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8643 $as_echo "yes" >&6; }
8644                      break
8645
8646 else
8647
8648                      smart_include=
8649                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8650 $as_echo "no" >&6; }
8651
8652 fi
8653 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8654   done
8655   CPPFLAGS="$old_CPPFLAGS"
8656 fi
8657
8658 if test "x$smart_include" != "x"; then
8659   eval "ac_cv_header_$ac_safe=yes"
8660   CPPFLAGS="$smart_include $old_CPPFLAGS"
8661   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
8662 fi
8663
8664 smart_prefix=
8665
8666   if test "x$ac_cv_header_openssl_ssl_h" = "xyes"; then
8667
8668 $as_echo "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
8669
8670
8671     for ac_header in \
8672       openssl/crypto.h \
8673       openssl/err.h \
8674       openssl/evp.h \
8675       openssl/md5.h \
8676       openssl/md4.h \
8677       openssl/sha.h \
8678       openssl/ssl.h \
8679       openssl/ocsp.h \
8680       openssl/engine.h
8681 do :
8682   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8683 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8684 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8685   cat >>confdefs.h <<_ACEOF
8686 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8687 _ACEOF
8688   OPENSSL_CPPFLAGS="$smart_include"
8689 else
8690
8691         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8692 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8693 as_fn_error $? "failed locating OpenSSL headers. Use --with-openssl-include-dir=<path>, or --with-openssl=no (builds without OpenSSL)
8694 See \`config.log' for more details" "$LINENO" 5; }
8695
8696
8697 fi
8698
8699 done
8700
8701
8702     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL version >= 0.9.7" >&5
8703 $as_echo_n "checking for OpenSSL version >= 0.9.7... " >&6; }
8704     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8705 /* end confdefs.h.  */
8706 #include <openssl/crypto.h>
8707        #if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
8708        yes
8709        #endif
8710
8711 _ACEOF
8712 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8713   $EGREP "yes" >/dev/null 2>&1; then :
8714
8715         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8716 $as_echo "yes" >&6; }
8717
8718 else
8719
8720         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8721 $as_echo "no" >&6; }
8722         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8723 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8724 as_fn_error $? "OpenSSL version too old
8725 See \`config.log' for more details" "$LINENO" 5; }
8726
8727
8728 fi
8729 rm -f conftest*
8730
8731
8732                         old_CPPFLAGS="$CPPFLAGS"
8733     CPPFLAGS="$OPENSSL_CPPFLAGS $CPPFLAGS"
8734
8735                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library and header version consistency" >&5
8736 $as_echo_n "checking OpenSSL library and header version consistency... " >&6; }
8737     if test "$cross_compiling" = yes; then :
8738   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8739 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8740 as_fn_error $? "cannot run test program while cross compiling
8741 See \`config.log' for more details" "$LINENO" 5; }
8742 else
8743   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8744 /* end confdefs.h.  */
8745
8746           #include <stdio.h>
8747           #include <openssl/opensslv.h>
8748           #include <openssl/crypto.h>
8749
8750 int
8751 main ()
8752 {
8753
8754           printf("library: %lx header: %lx... ", (unsigned long) SSLeay(), (unsigned long) OPENSSL_VERSION_NUMBER);
8755           if (SSLeay() == OPENSSL_VERSION_NUMBER) {
8756             return 0;
8757           } else {
8758             return 1;
8759           }
8760
8761
8762   ;
8763   return 0;
8764 }
8765 _ACEOF
8766 if ac_fn_c_try_run "$LINENO"; then :
8767
8768         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8769 $as_echo "yes" >&6; }
8770
8771 else
8772
8773         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8774 $as_echo "no" >&6; }
8775         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8776 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8777 as_fn_error $? "OpenSSL library version does not match header version
8778 See \`config.log' for more details" "$LINENO" 5; }
8779
8780
8781 fi
8782 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8783   conftest.$ac_objext conftest.beam conftest.$ac_ext
8784 fi
8785
8786     CPPFLAGS="$old_CPPFLAGS"
8787   fi
8788
8789   LIBS="$OLD_LIBS"
8790
8791
8792
8793   export OPENSSL_LIBS OPENSSL_LDFLAGS OPENSSL_CPPFLAGS
8794 fi
8795
8796 if test "x$PCAP_LIBS" = x; then
8797   { $as_echo "$as_me:${as_lineno-$LINENO}: skipping test for pcap.h." >&5
8798 $as_echo "$as_me: skipping test for pcap.h." >&6;}
8799 else
8800         smart_try_dir="$pcap_include_dir"
8801
8802
8803 ac_safe=`echo "pcap.h" | sed 'y%./+-%__pm%'`
8804 old_CPPFLAGS="$CPPFLAGS"
8805 smart_include=
8806 smart_include_dir="/usr/local/include /opt/include"
8807
8808 _smart_try_dir=
8809 _smart_include_dir=
8810
8811 for _prefix in $smart_prefix ""; do
8812   for _dir in $smart_try_dir; do
8813     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
8814   done
8815
8816   for _dir in $smart_include_dir; do
8817     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
8818   done
8819 done
8820
8821 if test "x$_smart_try_dir" != "x"; then
8822   for try in $_smart_try_dir; do
8823     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h in $try" >&5
8824 $as_echo_n "checking for pcap.h in $try... " >&6; }
8825     CPPFLAGS="-isystem $try $old_CPPFLAGS"
8826     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8827 /* end confdefs.h.  */
8828
8829                     #include <pcap.h>
8830 int
8831 main ()
8832 {
8833 int a = 1;
8834   ;
8835   return 0;
8836 }
8837 _ACEOF
8838 if ac_fn_c_try_compile "$LINENO"; then :
8839
8840                      smart_include="-isystem $try"
8841                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8842 $as_echo "yes" >&6; }
8843                      break
8844
8845 else
8846
8847                      smart_include=
8848                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8849 $as_echo "no" >&6; }
8850
8851 fi
8852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8853   done
8854   CPPFLAGS="$old_CPPFLAGS"
8855 fi
8856
8857 if test "x$smart_include" = "x"; then
8858   for _prefix in $smart_prefix; do
8859     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/pcap.h" >&5
8860 $as_echo_n "checking for ${_prefix}/pcap.h... " >&6; }
8861
8862     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8863 /* end confdefs.h.  */
8864
8865                     #include <pcap.h>
8866 int
8867 main ()
8868 {
8869 int a = 1;
8870   ;
8871   return 0;
8872 }
8873 _ACEOF
8874 if ac_fn_c_try_compile "$LINENO"; then :
8875
8876                      smart_include="-isystem ${_prefix}/"
8877                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8878 $as_echo "yes" >&6; }
8879                      break
8880
8881 else
8882
8883                      smart_include=
8884                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8885 $as_echo "no" >&6; }
8886
8887 fi
8888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8889   done
8890 fi
8891
8892 if test "x$smart_include" = "x"; then
8893     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h" >&5
8894 $as_echo_n "checking for pcap.h... " >&6; }
8895
8896     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8897 /* end confdefs.h.  */
8898
8899                     #include <pcap.h>
8900 int
8901 main ()
8902 {
8903 int a = 1;
8904   ;
8905   return 0;
8906 }
8907 _ACEOF
8908 if ac_fn_c_try_compile "$LINENO"; then :
8909
8910                      smart_include=" "
8911                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8912 $as_echo "yes" >&6; }
8913                      break
8914
8915 else
8916
8917                      smart_include=
8918                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8919 $as_echo "no" >&6; }
8920
8921 fi
8922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8923 fi
8924
8925 if test "x$smart_include" = "x"; then
8926
8927   for prefix in $smart_prefix; do
8928
8929
8930 if test "x$LOCATE" != "x"; then
8931         DIRS=
8932   file="${_prefix}/${1}"
8933
8934   for x in `${LOCATE} $file 2>/dev/null`; do
8935                                         base=`echo $x | sed "s%/${file}%%"`
8936     if test "x$x" = "x$base"; then
8937       continue;
8938     fi
8939
8940     dir=`${DIRNAME} $x 2>/dev/null`
8941                 exclude=`echo ${dir} | ${GREP} /home`
8942     if test "x$exclude" != "x"; then
8943       continue
8944     fi
8945
8946                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
8947     if test "x$already" = "x"; then
8948       DIRS="$DIRS $dir"
8949     fi
8950   done
8951 fi
8952
8953 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
8954
8955   done
8956
8957
8958 if test "x$LOCATE" != "x"; then
8959         DIRS=
8960   file=pcap.h
8961
8962   for x in `${LOCATE} $file 2>/dev/null`; do
8963                                         base=`echo $x | sed "s%/${file}%%"`
8964     if test "x$x" = "x$base"; then
8965       continue;
8966     fi
8967
8968     dir=`${DIRNAME} $x 2>/dev/null`
8969                 exclude=`echo ${dir} | ${GREP} /home`
8970     if test "x$exclude" != "x"; then
8971       continue
8972     fi
8973
8974                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
8975     if test "x$already" = "x"; then
8976       DIRS="$DIRS $dir"
8977     fi
8978   done
8979 fi
8980
8981 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
8982
8983
8984   for try in $_smart_include_dir; do
8985     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h in $try" >&5
8986 $as_echo_n "checking for pcap.h in $try... " >&6; }
8987     CPPFLAGS="-isystem $try $old_CPPFLAGS"
8988     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8989 /* end confdefs.h.  */
8990
8991                     #include <pcap.h>
8992 int
8993 main ()
8994 {
8995 int a = 1;
8996   ;
8997   return 0;
8998 }
8999 _ACEOF
9000 if ac_fn_c_try_compile "$LINENO"; then :
9001
9002                      smart_include="-isystem $try"
9003                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9004 $as_echo "yes" >&6; }
9005                      break
9006
9007 else
9008
9009                      smart_include=
9010                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9011 $as_echo "no" >&6; }
9012
9013 fi
9014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9015   done
9016   CPPFLAGS="$old_CPPFLAGS"
9017 fi
9018
9019 if test "x$smart_include" != "x"; then
9020   eval "ac_cv_header_$ac_safe=yes"
9021   CPPFLAGS="$smart_include $old_CPPFLAGS"
9022   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
9023 fi
9024
9025 smart_prefix=
9026
9027   if test "x$ac_cv_header_pcap_h" == "xyes"; then
9028
9029 $as_echo "#define HAVE_PCAP_H 1" >>confdefs.h
9030
9031
9032
9033   else
9034     { $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
9035 $as_echo "$as_me: WARNING: pcap headers not found, silently disabling the RADIUS sniffer, and ARP listener. Use --with-pcap-include-dir=<path>." >&2;}
9036   fi
9037 fi
9038
9039 if test "x$COLLECTDC_LIBS" = x; then
9040   { $as_echo "$as_me:${as_lineno-$LINENO}: skipping test for collectd/client.h." >&5
9041 $as_echo "$as_me: skipping test for collectd/client.h." >&6;}
9042 else
9043         smart_try_dir="$collectdclient_include_dir"
9044
9045
9046 ac_safe=`echo "collectd/client.h" | sed 'y%./+-%__pm%'`
9047 old_CPPFLAGS="$CPPFLAGS"
9048 smart_include=
9049 smart_include_dir="/usr/local/include /opt/include"
9050
9051 _smart_try_dir=
9052 _smart_include_dir=
9053
9054 for _prefix in $smart_prefix ""; do
9055   for _dir in $smart_try_dir; do
9056     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
9057   done
9058
9059   for _dir in $smart_include_dir; do
9060     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
9061   done
9062 done
9063
9064 if test "x$_smart_try_dir" != "x"; then
9065   for try in $_smart_try_dir; do
9066     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h in $try" >&5
9067 $as_echo_n "checking for collectd/client.h in $try... " >&6; }
9068     CPPFLAGS="-isystem $try $old_CPPFLAGS"
9069     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9070 /* end confdefs.h.  */
9071
9072                     #include <collectd/client.h>
9073 int
9074 main ()
9075 {
9076 int a = 1;
9077   ;
9078   return 0;
9079 }
9080 _ACEOF
9081 if ac_fn_c_try_compile "$LINENO"; then :
9082
9083                      smart_include="-isystem $try"
9084                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9085 $as_echo "yes" >&6; }
9086                      break
9087
9088 else
9089
9090                      smart_include=
9091                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9092 $as_echo "no" >&6; }
9093
9094 fi
9095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9096   done
9097   CPPFLAGS="$old_CPPFLAGS"
9098 fi
9099
9100 if test "x$smart_include" = "x"; then
9101   for _prefix in $smart_prefix; do
9102     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/collectd/client.h" >&5
9103 $as_echo_n "checking for ${_prefix}/collectd/client.h... " >&6; }
9104
9105     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9106 /* end confdefs.h.  */
9107
9108                     #include <collectd/client.h>
9109 int
9110 main ()
9111 {
9112 int a = 1;
9113   ;
9114   return 0;
9115 }
9116 _ACEOF
9117 if ac_fn_c_try_compile "$LINENO"; then :
9118
9119                      smart_include="-isystem ${_prefix}/"
9120                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9121 $as_echo "yes" >&6; }
9122                      break
9123
9124 else
9125
9126                      smart_include=
9127                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9128 $as_echo "no" >&6; }
9129
9130 fi
9131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9132   done
9133 fi
9134
9135 if test "x$smart_include" = "x"; then
9136     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h" >&5
9137 $as_echo_n "checking for collectd/client.h... " >&6; }
9138
9139     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9140 /* end confdefs.h.  */
9141
9142                     #include <collectd/client.h>
9143 int
9144 main ()
9145 {
9146 int a = 1;
9147   ;
9148   return 0;
9149 }
9150 _ACEOF
9151 if ac_fn_c_try_compile "$LINENO"; then :
9152
9153                      smart_include=" "
9154                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9155 $as_echo "yes" >&6; }
9156                      break
9157
9158 else
9159
9160                      smart_include=
9161                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9162 $as_echo "no" >&6; }
9163
9164 fi
9165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9166 fi
9167
9168 if test "x$smart_include" = "x"; then
9169
9170   for prefix in $smart_prefix; do
9171
9172
9173 if test "x$LOCATE" != "x"; then
9174         DIRS=
9175   file="${_prefix}/${1}"
9176
9177   for x in `${LOCATE} $file 2>/dev/null`; do
9178                                         base=`echo $x | sed "s%/${file}%%"`
9179     if test "x$x" = "x$base"; then
9180       continue;
9181     fi
9182
9183     dir=`${DIRNAME} $x 2>/dev/null`
9184                 exclude=`echo ${dir} | ${GREP} /home`
9185     if test "x$exclude" != "x"; then
9186       continue
9187     fi
9188
9189                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
9190     if test "x$already" = "x"; then
9191       DIRS="$DIRS $dir"
9192     fi
9193   done
9194 fi
9195
9196 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
9197
9198   done
9199
9200
9201 if test "x$LOCATE" != "x"; then
9202         DIRS=
9203   file=collectd/client.h
9204
9205   for x in `${LOCATE} $file 2>/dev/null`; do
9206                                         base=`echo $x | sed "s%/${file}%%"`
9207     if test "x$x" = "x$base"; then
9208       continue;
9209     fi
9210
9211     dir=`${DIRNAME} $x 2>/dev/null`
9212                 exclude=`echo ${dir} | ${GREP} /home`
9213     if test "x$exclude" != "x"; then
9214       continue
9215     fi
9216
9217                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
9218     if test "x$already" = "x"; then
9219       DIRS="$DIRS $dir"
9220     fi
9221   done
9222 fi
9223
9224 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
9225
9226
9227   for try in $_smart_include_dir; do
9228     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h in $try" >&5
9229 $as_echo_n "checking for collectd/client.h in $try... " >&6; }
9230     CPPFLAGS="-isystem $try $old_CPPFLAGS"
9231     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9232 /* end confdefs.h.  */
9233
9234                     #include <collectd/client.h>
9235 int
9236 main ()
9237 {
9238 int a = 1;
9239   ;
9240   return 0;
9241 }
9242 _ACEOF
9243 if ac_fn_c_try_compile "$LINENO"; then :
9244
9245                      smart_include="-isystem $try"
9246                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9247 $as_echo "yes" >&6; }
9248                      break
9249
9250 else
9251
9252                      smart_include=
9253                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9254 $as_echo "no" >&6; }
9255
9256 fi
9257 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9258   done
9259   CPPFLAGS="$old_CPPFLAGS"
9260 fi
9261
9262 if test "x$smart_include" != "x"; then
9263   eval "ac_cv_header_$ac_safe=yes"
9264   CPPFLAGS="$smart_include $old_CPPFLAGS"
9265   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
9266 fi
9267
9268 smart_prefix=
9269
9270   if test "x$ac_cv_header_collectd_client_h" == "xyes"; then
9271
9272 $as_echo "#define HAVE_COLLECTDC_H 1" >>confdefs.h
9273
9274
9275
9276   else
9277     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: collectdclient headers not found. Use --with-collectdclient-include-dir=<path>." >&5
9278 $as_echo "$as_me: WARNING: collectdclient headers not found. Use --with-collectdclient-include-dir=<path>." >&2;}
9279   fi
9280 fi
9281
9282 if test "x$HAVE_LIBCAP" = x; then
9283   { $as_echo "$as_me:${as_lineno-$LINENO}: skipping test for cap.h." >&5
9284 $as_echo "$as_me: skipping test for cap.h." >&6;}
9285 else
9286         smart_try_dir="$cap_include_dir"
9287
9288
9289 ac_safe=`echo "sys/capability.h" | sed 'y%./+-%__pm%'`
9290 old_CPPFLAGS="$CPPFLAGS"
9291 smart_include=
9292 smart_include_dir="/usr/local/include /opt/include"
9293
9294 _smart_try_dir=
9295 _smart_include_dir=
9296
9297 for _prefix in $smart_prefix ""; do
9298   for _dir in $smart_try_dir; do
9299     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
9300   done
9301
9302   for _dir in $smart_include_dir; do
9303     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
9304   done
9305 done
9306
9307 if test "x$_smart_try_dir" != "x"; then
9308   for try in $_smart_try_dir; do
9309     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h in $try" >&5
9310 $as_echo_n "checking for sys/capability.h in $try... " >&6; }
9311     CPPFLAGS="-isystem $try $old_CPPFLAGS"
9312     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9313 /* end confdefs.h.  */
9314
9315                     #include <sys/capability.h>
9316 int
9317 main ()
9318 {
9319 int a = 1;
9320   ;
9321   return 0;
9322 }
9323 _ACEOF
9324 if ac_fn_c_try_compile "$LINENO"; then :
9325
9326                      smart_include="-isystem $try"
9327                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9328 $as_echo "yes" >&6; }
9329                      break
9330
9331 else
9332
9333                      smart_include=
9334                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9335 $as_echo "no" >&6; }
9336
9337 fi
9338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9339   done
9340   CPPFLAGS="$old_CPPFLAGS"
9341 fi
9342
9343 if test "x$smart_include" = "x"; then
9344   for _prefix in $smart_prefix; do
9345     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/sys/capability.h" >&5
9346 $as_echo_n "checking for ${_prefix}/sys/capability.h... " >&6; }
9347
9348     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9349 /* end confdefs.h.  */
9350
9351                     #include <sys/capability.h>
9352 int
9353 main ()
9354 {
9355 int a = 1;
9356   ;
9357   return 0;
9358 }
9359 _ACEOF
9360 if ac_fn_c_try_compile "$LINENO"; then :
9361
9362                      smart_include="-isystem ${_prefix}/"
9363                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9364 $as_echo "yes" >&6; }
9365                      break
9366
9367 else
9368
9369                      smart_include=
9370                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9371 $as_echo "no" >&6; }
9372
9373 fi
9374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9375   done
9376 fi
9377
9378 if test "x$smart_include" = "x"; then
9379     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h" >&5
9380 $as_echo_n "checking for sys/capability.h... " >&6; }
9381
9382     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9383 /* end confdefs.h.  */
9384
9385                     #include <sys/capability.h>
9386 int
9387 main ()
9388 {
9389 int a = 1;
9390   ;
9391   return 0;
9392 }
9393 _ACEOF
9394 if ac_fn_c_try_compile "$LINENO"; then :
9395
9396                      smart_include=" "
9397                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9398 $as_echo "yes" >&6; }
9399                      break
9400
9401 else
9402
9403                      smart_include=
9404                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9405 $as_echo "no" >&6; }
9406
9407 fi
9408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9409 fi
9410
9411 if test "x$smart_include" = "x"; then
9412
9413   for prefix in $smart_prefix; do
9414
9415
9416 if test "x$LOCATE" != "x"; then
9417         DIRS=
9418   file="${_prefix}/${1}"
9419
9420   for x in `${LOCATE} $file 2>/dev/null`; do
9421                                         base=`echo $x | sed "s%/${file}%%"`
9422     if test "x$x" = "x$base"; then
9423       continue;
9424     fi
9425
9426     dir=`${DIRNAME} $x 2>/dev/null`
9427                 exclude=`echo ${dir} | ${GREP} /home`
9428     if test "x$exclude" != "x"; then
9429       continue
9430     fi
9431
9432                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
9433     if test "x$already" = "x"; then
9434       DIRS="$DIRS $dir"
9435     fi
9436   done
9437 fi
9438
9439 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
9440
9441   done
9442
9443
9444 if test "x$LOCATE" != "x"; then
9445         DIRS=
9446   file=sys/capability.h
9447
9448   for x in `${LOCATE} $file 2>/dev/null`; do
9449                                         base=`echo $x | sed "s%/${file}%%"`
9450     if test "x$x" = "x$base"; then
9451       continue;
9452     fi
9453
9454     dir=`${DIRNAME} $x 2>/dev/null`
9455                 exclude=`echo ${dir} | ${GREP} /home`
9456     if test "x$exclude" != "x"; then
9457       continue
9458     fi
9459
9460                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
9461     if test "x$already" = "x"; then
9462       DIRS="$DIRS $dir"
9463     fi
9464   done
9465 fi
9466
9467 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
9468
9469
9470   for try in $_smart_include_dir; do
9471     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h in $try" >&5
9472 $as_echo_n "checking for sys/capability.h in $try... " >&6; }
9473     CPPFLAGS="-isystem $try $old_CPPFLAGS"
9474     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9475 /* end confdefs.h.  */
9476
9477                     #include <sys/capability.h>
9478 int
9479 main ()
9480 {
9481 int a = 1;
9482   ;
9483   return 0;
9484 }
9485 _ACEOF
9486 if ac_fn_c_try_compile "$LINENO"; then :
9487
9488                      smart_include="-isystem $try"
9489                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9490 $as_echo "yes" >&6; }
9491                      break
9492
9493 else
9494
9495                      smart_include=
9496                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9497 $as_echo "no" >&6; }
9498
9499 fi
9500 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9501   done
9502   CPPFLAGS="$old_CPPFLAGS"
9503 fi
9504
9505 if test "x$smart_include" != "x"; then
9506   eval "ac_cv_header_$ac_safe=yes"
9507   CPPFLAGS="$smart_include $old_CPPFLAGS"
9508   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
9509 fi
9510
9511 smart_prefix=
9512
9513   if test "x$ac_cv_header_sys_capability_h" == "xyes"; then
9514
9515 $as_echo "#define HAVE_CAPABILITY_H 1" >>confdefs.h
9516
9517   else
9518     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cap headers not found, will not perform debugger checks. Use --with-cap-include-dir=<path>." >&5
9519 $as_echo "$as_me: WARNING: cap headers not found, will not perform debugger checks. Use --with-cap-include-dir=<path>." >&2;}
9520   fi
9521 fi
9522
9523
9524 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
9525 if test "x$ac_cv_type_off_t" = xyes; then :
9526
9527 else
9528
9529 cat >>confdefs.h <<_ACEOF
9530 #define off_t long int
9531 _ACEOF
9532
9533 fi
9534
9535 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9536 if test "x$ac_cv_type_pid_t" = xyes; then :
9537
9538 else
9539
9540 cat >>confdefs.h <<_ACEOF
9541 #define pid_t int
9542 _ACEOF
9543
9544 fi
9545
9546 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
9547 if test "x$ac_cv_type_size_t" = xyes; then :
9548
9549 else
9550
9551 cat >>confdefs.h <<_ACEOF
9552 #define size_t unsigned int
9553 _ACEOF
9554
9555 fi
9556
9557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
9558 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
9559 if ${ac_cv_type_uid_t+:} false; then :
9560   $as_echo_n "(cached) " >&6
9561 else
9562   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9563 /* end confdefs.h.  */
9564 #include <sys/types.h>
9565
9566 _ACEOF
9567 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9568   $EGREP "uid_t" >/dev/null 2>&1; then :
9569   ac_cv_type_uid_t=yes
9570 else
9571   ac_cv_type_uid_t=no
9572 fi
9573 rm -f conftest*
9574
9575 fi
9576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
9577 $as_echo "$ac_cv_type_uid_t" >&6; }
9578 if test $ac_cv_type_uid_t = no; then
9579
9580 $as_echo "#define uid_t int" >>confdefs.h
9581
9582
9583 $as_echo "#define gid_t int" >>confdefs.h
9584
9585 fi
9586
9587
9588
9589   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
9590 $as_echo_n "checking for socklen_t... " >&6; }
9591 if ${ac_cv_type_socklen_t+:} false; then :
9592   $as_echo_n "(cached) " >&6
9593 else
9594    ac_cv_type_socklen_t=no
9595       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9596 /* end confdefs.h.  */
9597 #ifdef HAVE_SYS_TYPES_H
9598     #  include <sys/types.h>
9599     #endif
9600
9601     #ifdef HAVE_SYS_SOCKET_H
9602     #  include <sys/socket.h>
9603     #endif
9604
9605 int
9606 main ()
9607 {
9608 socklen_t foo
9609   ;
9610   return 0;
9611 }
9612 _ACEOF
9613 if ac_fn_c_try_compile "$LINENO"; then :
9614   ac_cv_type_socklen_t=yes
9615 fi
9616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9617
9618
9619 fi
9620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_socklen_t" >&5
9621 $as_echo "$ac_cv_type_socklen_t" >&6; }
9622
9623   if test "$ac_cv_type_socklen_t" != "yes"; then
9624
9625 $as_echo "#define socklen_t int" >>confdefs.h
9626
9627   fi
9628
9629
9630
9631   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint8_t" >&5
9632 $as_echo_n "checking for uint8_t... " >&6; }
9633 if ${ac_cv_type_uint8_t+:} false; then :
9634   $as_echo_n "(cached) " >&6
9635 else
9636    ac_cv_type_uint8_t=no
9637       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9638 /* end confdefs.h.  */
9639 #ifdef HAVE_INTTYPES_H
9640     #  include <inttypes.h>
9641     #endif
9642
9643     #ifdef HAVE_STDINT_H
9644     #  include <stdint.h>
9645     #endif
9646
9647 int
9648 main ()
9649 {
9650 uint8_t foo
9651   ;
9652   return 0;
9653 }
9654 _ACEOF
9655 if ac_fn_c_try_compile "$LINENO"; then :
9656   ac_cv_type_uint8_t=yes
9657 fi
9658 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9659
9660
9661 fi
9662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint8_t" >&5
9663 $as_echo "$ac_cv_type_uint8_t" >&6; }
9664
9665   if test "$ac_cv_type_uint8_t" != "yes"; then
9666
9667 $as_echo "#define uint8_t unsigned char" >>confdefs.h
9668
9669   fi
9670
9671
9672
9673   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint16_t" >&5
9674 $as_echo_n "checking for uint16_t... " >&6; }
9675 if ${ac_cv_type_uint16_t+:} false; then :
9676   $as_echo_n "(cached) " >&6
9677 else
9678    ac_cv_type_uint16_t=no
9679       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9680 /* end confdefs.h.  */
9681 #ifdef HAVE_INTTYPES_H
9682     #  include <inttypes.h>
9683     #endif
9684
9685     #ifdef HAVE_STDINT_H
9686     #  include <stdint.h>
9687     #endif
9688
9689 int
9690 main ()
9691 {
9692 uint16_t foo
9693   ;
9694   return 0;
9695 }
9696 _ACEOF
9697 if ac_fn_c_try_compile "$LINENO"; then :
9698   ac_cv_type_uint16_t=yes
9699 fi
9700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9701
9702
9703 fi
9704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint16_t" >&5
9705 $as_echo "$ac_cv_type_uint16_t" >&6; }
9706
9707   if test "$ac_cv_type_uint16_t" != "yes"; then
9708
9709 $as_echo "#define uint16_t unsigned short" >>confdefs.h
9710
9711   fi
9712
9713
9714
9715   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint32_t" >&5
9716 $as_echo_n "checking for uint32_t... " >&6; }
9717 if ${ac_cv_type_uint32_t+:} false; then :
9718   $as_echo_n "(cached) " >&6
9719 else
9720    ac_cv_type_uint32_t=no
9721       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9722 /* end confdefs.h.  */
9723 #ifdef HAVE_INTTYPES_H
9724     #  include <inttypes.h>
9725     #endif
9726
9727     #ifdef HAVE_STDINT_H
9728     #  include <stdint.h>
9729     #endif
9730
9731 int
9732 main ()
9733 {
9734 uint32_t foo
9735   ;
9736   return 0;
9737 }
9738 _ACEOF
9739 if ac_fn_c_try_compile "$LINENO"; then :
9740   ac_cv_type_uint32_t=yes
9741 fi
9742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9743
9744
9745 fi
9746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint32_t" >&5
9747 $as_echo "$ac_cv_type_uint32_t" >&6; }
9748
9749   if test "$ac_cv_type_uint32_t" != "yes"; then
9750
9751 $as_echo "#define uint32_t unsigned int" >>confdefs.h
9752
9753   fi
9754
9755
9756
9757   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint64_t" >&5
9758 $as_echo_n "checking for uint64_t... " >&6; }
9759 if ${ac_cv_type_uint64_t+:} false; then :
9760   $as_echo_n "(cached) " >&6
9761 else
9762    ac_cv_type_uint64_t=no
9763       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9764 /* end confdefs.h.  */
9765 #ifdef HAVE_INTTYPES_H
9766     #  include <inttypes.h>
9767     #endif
9768
9769     #ifdef HAVE_STDINT_H
9770     #  include <stdint.h>
9771     #endif
9772
9773 int
9774 main ()
9775 {
9776 uint64_t foo
9777   ;
9778   return 0;
9779 }
9780 _ACEOF
9781 if ac_fn_c_try_compile "$LINENO"; then :
9782   ac_cv_type_uint64_t=yes
9783 fi
9784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9785
9786
9787 fi
9788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint64_t" >&5
9789 $as_echo "$ac_cv_type_uint64_t" >&6; }
9790
9791   if test "$ac_cv_type_uint64_t" != "yes"; then
9792
9793 $as_echo "#define uint64_t unsigned long long" >>confdefs.h
9794
9795   fi
9796
9797
9798 ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
9799 if test "x$ac_cv_type___uint128_t" = xyes; then :
9800
9801 $as_echo "#define HAVE___UINT128_T 1" >>confdefs.h
9802
9803 fi
9804
9805
9806 ac_fn_c_check_type "$LINENO" "uint128_t" "ac_cv_type_uint128_t" "
9807     #ifdef HAVE_INTTYPES_H
9808     #  include <inttypes.h>
9809     #endif
9810
9811     #ifdef HAVE_STDINT_H
9812     #  include <stdint.h>
9813     #endif
9814
9815
9816 "
9817 if test "x$ac_cv_type_uint128_t" = xyes; then :
9818
9819 $as_echo "#define HAVE_UINT128_T 1" >>confdefs.h
9820
9821 fi
9822
9823
9824 ac_fn_c_check_type "$LINENO" "struct in6_addr" "ac_cv_type_struct_in6_addr" "
9825     #ifdef HAVE_NETINET_IN_H
9826     #  include <netinet/in.h>
9827     #endif
9828
9829
9830 "
9831 if test "x$ac_cv_type_struct_in6_addr" = xyes; then :
9832
9833 $as_echo "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h
9834
9835 fi
9836
9837
9838 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
9839     #ifdef HAVE_NETINET_IN_H
9840     #  include <netinet/in.h>
9841     #endif
9842
9843     #ifdef HAVE_SYS_SOCKET_H
9844     #  include <sys/socket.h>
9845     #endif
9846
9847 "
9848 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
9849
9850 $as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
9851
9852 fi
9853
9854
9855 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "
9856     #ifdef HAVE_NETINET_IN_H
9857     #  include <netinet/in.h>
9858     #endif
9859
9860 "
9861 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
9862
9863 $as_echo "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h
9864
9865 fi
9866
9867
9868 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "
9869     #ifdef HAVE_SYS_TYPES_H
9870     #  include <sys/types.h>
9871     #endif
9872
9873     #ifdef HAVE_SYS_SOCKET_H
9874     #  include <sys/socket.h>
9875     #endif
9876
9877     #ifdef HAVE_NETDB_H
9878     #  include <netdb.h>
9879     #endif
9880
9881
9882 "
9883 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
9884
9885 $as_echo "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h
9886
9887 fi
9888
9889
9890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sig_t is defined" >&5
9891 $as_echo_n "checking if sig_t is defined... " >&6; }
9892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9893 /* end confdefs.h.  */
9894
9895       #ifdef HAVE_SIGNAL_H
9896       #  include <signal.h>
9897       #endif
9898
9899 int
9900 main ()
9901 {
9902
9903       sig_t func;
9904       return 0;
9905
9906
9907   ;
9908   return 0;
9909 }
9910 _ACEOF
9911 if ac_fn_c_try_link "$LINENO"; then :
9912
9913       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9914 $as_echo "yes" >&6; }
9915
9916 $as_echo "#define HAVE_SIG_T 1" >>confdefs.h
9917
9918
9919 else
9920
9921       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9922 $as_echo "no" >&6; }
9923
9924
9925 fi
9926 rm -f core conftest.err conftest.$ac_objext \
9927     conftest$ac_exeext conftest.$ac_ext
9928
9929 for ac_func in \
9930   getopt_long \
9931   fcntl \
9932   strsignal \
9933   sigaction \
9934   sigprocmask \
9935   pthread_sigmask \
9936   snprintf \
9937   vsnprintf \
9938   setsid \
9939   strncasecmp \
9940   strcasecmp \
9941   localtime_r \
9942   ctime_r \
9943   gmtime_r \
9944   strsep \
9945   inet_aton \
9946   inet_pton \
9947   inet_ntop \
9948   mallopt \
9949   setlinebuf \
9950   setvbuf \
9951   getusershell \
9952   initgroups \
9953   getaddrinfo \
9954   getnameinfo \
9955   closefrom \
9956   gettimeofday \
9957   getpeereid \
9958   setuid \
9959   setresuid \
9960   getresuid \
9961   strlcat \
9962   strlcpy \
9963   kqueue \
9964   openat \
9965   mkdirat \
9966   unlinkat \
9967   bindat
9968
9969 do :
9970   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9971 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9972 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9973   cat >>confdefs.h <<_ACEOF
9974 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9975 _ACEOF
9976
9977 fi
9978 done
9979
9980
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9982 $as_echo_n "checking return type of signal handlers... " >&6; }
9983 if ${ac_cv_type_signal+:} false; then :
9984   $as_echo_n "(cached) " >&6
9985 else
9986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9987 /* end confdefs.h.  */
9988 #include <sys/types.h>
9989 #include <signal.h>
9990
9991 int
9992 main ()
9993 {
9994 return *(signal (0, 0)) (0) == 1;
9995   ;
9996   return 0;
9997 }
9998 _ACEOF
9999 if ac_fn_c_try_compile "$LINENO"; then :
10000   ac_cv_type_signal=int
10001 else
10002   ac_cv_type_signal=void
10003 fi
10004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10005 fi
10006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
10007 $as_echo "$ac_cv_type_signal" >&6; }
10008
10009 cat >>confdefs.h <<_ACEOF
10010 #define RETSIGTYPE $ac_cv_type_signal
10011 _ACEOF
10012
10013
10014
10015 if test "x$ac_cv_header_utmpx_h" = "xyes"; then
10016
10017   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_xtime in struct utmpx" >&5
10018 $as_echo_n "checking for ut_xtime in struct utmpx... " >&6; }
10019
10020
10021   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10022 /* end confdefs.h.  */
10023
10024 #include <utmpx.h>
10025 #ifdef HAVE_STDDEF_H
10026 #include <stddef.h>
10027 #endif
10028 #ifndef offsetof
10029 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
10030 #endif
10031
10032 int
10033 main ()
10034 {
10035  int foo = offsetof(struct utmpx, ut_xtime)
10036   ;
10037   return 0;
10038 }
10039 _ACEOF
10040 if ac_fn_c_try_compile "$LINENO"; then :
10041   has_element=" "
10042 else
10043   has_element=
10044 fi
10045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10046
10047   ac_safe_type=`echo "struct utmpx" | sed 'y% %_%'`
10048   if test "x$has_element" != "x"; then
10049     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10050 $as_echo "yes" >&6; }
10051     eval "ac_cv_type_${ac_safe_type}_has_ut_xtime=yes"
10052   else
10053     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10054 $as_echo "no" >&6; }
10055     eval "ac_cv_type_${ac_safe_type}_has_ut_xtime="
10056  fi
10057
10058  if test "x$ac_cv_type_struct_utmpx_has_ut_xtime" = "x"; then
10059
10060 $as_echo "#define ut_xtime ut_tv.tv_sec" >>confdefs.h
10061
10062  fi
10063 fi
10064
10065
10066   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipi_addr in struct in_pktinfo" >&5
10067 $as_echo_n "checking for ipi_addr in struct in_pktinfo... " >&6; }
10068
10069
10070   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10071 /* end confdefs.h.  */
10072
10073 #include <netinet/in.h>
10074 #ifdef HAVE_STDDEF_H
10075 #include <stddef.h>
10076 #endif
10077 #ifndef offsetof
10078 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
10079 #endif
10080
10081 int
10082 main ()
10083 {
10084  int foo = offsetof(struct in_pktinfo, ipi_addr)
10085   ;
10086   return 0;
10087 }
10088 _ACEOF
10089 if ac_fn_c_try_compile "$LINENO"; then :
10090   has_element=" "
10091 else
10092   has_element=
10093 fi
10094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10095
10096   ac_safe_type=`echo "struct in_pktinfo" | sed 'y% %_%'`
10097   if test "x$has_element" != "x"; then
10098     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10099 $as_echo "yes" >&6; }
10100     eval "ac_cv_type_${ac_safe_type}_has_ipi_addr=yes"
10101   else
10102     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10103 $as_echo "no" >&6; }
10104     eval "ac_cv_type_${ac_safe_type}_has_ipi_addr="
10105  fi
10106
10107 if test "x$ac_cv_type_struct_in_pktinfo_has_ipi_addr" = "xyes"; then
10108
10109 $as_echo "#define HAVE_IP_PKTINFO /**/" >>confdefs.h
10110
10111 fi
10112
10113
10114   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipi6_addr in struct in6_pktinfo" >&5
10115 $as_echo_n "checking for ipi6_addr in struct in6_pktinfo... " >&6; }
10116
10117
10118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10119 /* end confdefs.h.  */
10120
10121 #include <netinet/in.h>
10122 #ifdef HAVE_STDDEF_H
10123 #include <stddef.h>
10124 #endif
10125 #ifndef offsetof
10126 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
10127 #endif
10128
10129 int
10130 main ()
10131 {
10132  int foo = offsetof(struct in6_pktinfo, ipi6_addr)
10133   ;
10134   return 0;
10135 }
10136 _ACEOF
10137 if ac_fn_c_try_compile "$LINENO"; then :
10138   has_element=" "
10139 else
10140   has_element=
10141 fi
10142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10143
10144   ac_safe_type=`echo "struct in6_pktinfo" | sed 'y% %_%'`
10145   if test "x$has_element" != "x"; then
10146     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10147 $as_echo "yes" >&6; }
10148     eval "ac_cv_type_${ac_safe_type}_has_ipi6_addr=yes"
10149   else
10150     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10151 $as_echo "no" >&6; }
10152     eval "ac_cv_type_${ac_safe_type}_has_ipi6_addr="
10153  fi
10154
10155 if test "x$ac_cv_type_struct_in6_pktinfo_has_ipi6_addr" = "xyes"; then
10156
10157 $as_echo "#define HAVE_IN6_PKTINFO /**/" >>confdefs.h
10158
10159 fi
10160
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if htonll is defined" >&5
10162 $as_echo_n "checking if htonll is defined... " >&6; }
10163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10164 /* end confdefs.h.  */
10165
10166       #include <sys/types.h>
10167       #include <netinet/in.h>
10168
10169 int
10170 main ()
10171 {
10172
10173       return htonll(0);
10174
10175
10176   ;
10177   return 0;
10178 }
10179 _ACEOF
10180 if ac_fn_c_try_link "$LINENO"; then :
10181
10182       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10183 $as_echo "yes" >&6; }
10184
10185 $as_echo "#define HAVE_HTONLL 1" >>confdefs.h
10186
10187
10188 else
10189
10190       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10191 $as_echo "no" >&6; }
10192
10193
10194 fi
10195 rm -f core conftest.err conftest.$ac_objext \
10196     conftest$ac_exeext conftest.$ac_ext
10197
10198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if htonlll is defined" >&5
10199 $as_echo_n "checking if htonlll is defined... " >&6; }
10200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10201 /* end confdefs.h.  */
10202
10203       #include <sys/types.h>
10204       #include <netinet/in.h>
10205
10206 int
10207 main ()
10208 {
10209
10210       return htonlll(0);
10211
10212
10213   ;
10214   return 0;
10215 }
10216 _ACEOF
10217 if ac_fn_c_try_link "$LINENO"; then :
10218
10219       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10220 $as_echo "yes" >&6; }
10221
10222 $as_echo "#define HAVE_HTONLLL 1" >>confdefs.h
10223
10224
10225 else
10226
10227       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10228 $as_echo "no" >&6; }
10229
10230
10231 fi
10232 rm -f core conftest.err conftest.$ac_objext \
10233     conftest$ac_exeext conftest.$ac_ext
10234
10235
10236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10237 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10238 if ${ac_cv_c_const+:} false; then :
10239   $as_echo_n "(cached) " >&6
10240 else
10241   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10242 /* end confdefs.h.  */
10243
10244 int
10245 main ()
10246 {
10247
10248 #ifndef __cplusplus
10249   /* Ultrix mips cc rejects this sort of thing.  */
10250   typedef int charset[2];
10251   const charset cs = { 0, 0 };
10252   /* SunOS 4.1.1 cc rejects this.  */
10253   char const *const *pcpcc;
10254   char **ppc;
10255   /* NEC SVR4.0.2 mips cc rejects this.  */
10256   struct point {int x, y;};
10257   static struct point const zero = {0,0};
10258   /* AIX XL C 1.02.0.0 rejects this.
10259      It does not let you subtract one const X* pointer from another in
10260      an arm of an if-expression whose if-part is not a constant
10261      expression */
10262   const char *g = "string";
10263   pcpcc = &g + (g ? g-g : 0);
10264   /* HPUX 7.0 cc rejects these. */
10265   ++pcpcc;
10266   ppc = (char**) pcpcc;
10267   pcpcc = (char const *const *) ppc;
10268   { /* SCO 3.2v4 cc rejects this sort of thing.  */
10269     char tx;
10270     char *t = &tx;
10271     char const *s = 0 ? (char *) 0 : (char const *) 0;
10272
10273     *t++ = 0;
10274     if (s) return 0;
10275   }
10276   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10277     int x[] = {25, 17};
10278     const int *foo = &x[0];
10279     ++foo;
10280   }
10281   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10282     typedef const int *iptr;
10283     iptr p = 0;
10284     ++p;
10285   }
10286   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
10287        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10288     struct s { int j; const int *ap[3]; } bx;
10289     struct s *b = &bx; b->j = 5;
10290   }
10291   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10292     const int foo = 10;
10293     if (!foo) return 0;
10294   }
10295   return !cs[0] && !zero.x;
10296 #endif
10297
10298   ;
10299   return 0;
10300 }
10301 _ACEOF
10302 if ac_fn_c_try_compile "$LINENO"; then :
10303   ac_cv_c_const=yes
10304 else
10305   ac_cv_c_const=no
10306 fi
10307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10308 fi
10309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
10310 $as_echo "$ac_cv_c_const" >&6; }
10311 if test $ac_cv_c_const = no; then
10312
10313 $as_echo "#define const /**/" >>confdefs.h
10314
10315 fi
10316
10317
10318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of OS" >&5
10319 $as_echo_n "checking type of OS... " >&6; }
10320 OS=`uname -s`
10321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OS" >&5
10322 $as_echo "$OS" >&6; }
10323 if test "$OS" = "OS/2"; then
10324   LIBPREFIX=
10325 else
10326   LIBPREFIX=lib
10327 fi
10328
10329
10330 if test "x$developer" = "xyes"; then
10331   { $as_echo "$as_me:${as_lineno-$LINENO}: Setting additional developer CFLAGS" >&5
10332 $as_echo "$as_me: Setting additional developer CFLAGS" >&6;}
10333
10334
10335   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Wdocumentation\"" >&5
10336 $as_echo_n "checking for the compiler flag \"-Wdocumentation\"... " >&6; }
10337 if ${ax_cv_cc_wdocumentation_flag+:} false; then :
10338   $as_echo_n "(cached) " >&6
10339 else
10340
10341
10342     CFLAGS_SAVED=$CFLAGS
10343     CFLAGS="$CFLAGS -Werror -Wdocumentation"
10344
10345     ac_ext=c
10346 ac_cpp='$CPP $CPPFLAGS'
10347 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10348 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10349 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10350
10351     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10352 /* end confdefs.h.  */
10353
10354 int
10355 main ()
10356 {
10357 return 0;
10358   ;
10359   return 0;
10360 }
10361 _ACEOF
10362 if ac_fn_c_try_compile "$LINENO"; then :
10363   ax_cv_cc_wdocumentation_flag="yes"
10364 else
10365   ax_cv_cc_wdocumentation_flag="no"
10366 fi
10367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10368     ac_ext=c
10369 ac_cpp='$CPP $CPPFLAGS'
10370 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10371 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10372 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10373
10374
10375     CFLAGS="$CFLAGS_SAVED"
10376
10377 fi
10378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_wdocumentation_flag" >&5
10379 $as_echo "$ax_cv_cc_wdocumentation_flag" >&6; }
10380
10381   if test "x$ax_cv_cc_wdocumentation_flag" = "xyes"; then
10382     devflags="-Wdocumentation"
10383   fi
10384
10385
10386   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Weverything\"" >&5
10387 $as_echo_n "checking for the compiler flag \"-Weverything\"... " >&6; }
10388 if ${ax_cv_cc_weverything_flag+:} false; then :
10389   $as_echo_n "(cached) " >&6
10390 else
10391
10392
10393     CFLAGS_SAVED=$CFLAGS
10394     CFLAGS="$CFLAGS -Werror -Weverything -Wno-unused-macros -Wno-unreachable-code-return"
10395
10396     ac_ext=c
10397 ac_cpp='$CPP $CPPFLAGS'
10398 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10399 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10400 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10401
10402     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10403 /* end confdefs.h.  */
10404
10405 int
10406 main ()
10407 {
10408 return 0;
10409   ;
10410   return 0;
10411 }
10412 _ACEOF
10413 if ac_fn_c_try_compile "$LINENO"; then :
10414   ax_cv_cc_weverything_flag="yes"
10415 else
10416   ax_cv_cc_weverything_flag="no"
10417 fi
10418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10419     ac_ext=c
10420 ac_cpp='$CPP $CPPFLAGS'
10421 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10422 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10423 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10424
10425
10426     CFLAGS="$CFLAGS_SAVED"
10427
10428 fi
10429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_weverything_flag" >&5
10430 $as_echo "$ax_cv_cc_weverything_flag" >&6; }
10431
10432   if test "x$ax_cv_cc_weverything_flag" = "xyes"; then
10433     devflags="$devflags -W -Weverything -Wformat=2 -Wno-date-time -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"
10434   else
10435     if test "x$GCC" = "xyes"; then
10436       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"
10437       INSTALLSTRIP=""
10438     fi
10439   fi
10440
10441   { $as_echo "$as_me:${as_lineno-$LINENO}: Developer CFLAGS are \"$devflags\"" >&5
10442 $as_echo "$as_me: Developer CFLAGS are \"$devflags\"" >&6;}
10443
10444   CFLAGS="$CFLAGS $devflags"
10445         if test "x$EXPERIMENTAL" != "xno"; then
10446     { $as_echo "$as_me:${as_lineno-$LINENO}: is developer build, enabling experimental modules implicitly, disable with --without-experimental-modules" >&5
10447 $as_echo "$as_me: is developer build, enabling experimental modules implicitly, disable with --without-experimental-modules" >&6;}
10448     EXPERIMENTAL=yes
10449   fi
10450 else
10451   devflags=""
10452   CFLAGS="$CFLAGS -DNDEBUG"
10453   INSTALLSTRIP=""
10454 fi
10455
10456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building with -DNDEBUG" >&5
10457 $as_echo_n "checking if building with -DNDEBUG... " >&6; }
10458 if echo "$CFLAGS" | grep '\-DNDEBUG' > /dev/null; then
10459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10460 $as_echo "yes" >&6; }
10461
10462 $as_echo "#define WITH_NDEBUG 1" >>confdefs.h
10463
10464 else
10465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10466 $as_echo "no" >&6; }
10467 fi
10468
10469 export EXPERIMENTAL
10470
10471 if test -d $srcdir/.git -a "x$GIT" = "xyes"; then
10472   RADIUSD_VERSION_COMMIT=`git log --pretty=format:'%h' -n 1`
10473
10474 cat >>confdefs.h <<_ACEOF
10475 #define RADIUSD_VERSION_COMMIT ${RADIUSD_VERSION_COMMIT}
10476 _ACEOF
10477
10478 fi
10479
10480
10481   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support in compiler" >&5
10482 $as_echo_n "checking for __thread support in compiler... " >&6; }
10483   if test "$cross_compiling" = yes; then :
10484   have_tls=no
10485 else
10486   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10487 /* end confdefs.h.  */
10488
10489         static __thread int val;
10490         int main(int argc, char **argv) {
10491           val = 0;
10492           return val;
10493         }
10494
10495
10496 _ACEOF
10497 if ac_fn_c_try_run "$LINENO"; then :
10498   have_tls=yes
10499 else
10500   have_tls=no
10501 fi
10502 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10503   conftest.$ac_objext conftest.beam conftest.$ac_ext
10504 fi
10505
10506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5
10507 $as_echo "$have_tls" >&6; }
10508   if test "x$have_tls" = "xyes"; then
10509
10510 $as_echo "#define TLS_STORAGE_CLASS __thread" >>confdefs.h
10511
10512   fi
10513
10514   if test "x$have_tls" = "xno"; then
10515     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __declspec(thread) support in compiler" >&5
10516 $as_echo_n "checking for __declspec(thread) support in compiler... " >&6; }
10517     if test "$cross_compiling" = yes; then :
10518   have_tls=no
10519 else
10520   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10521 /* end confdefs.h.  */
10522
10523           static _Thread_local int val;
10524           int main(int argc, char **argv) {
10525             val = 0;
10526             return val;
10527           }
10528
10529
10530 _ACEOF
10531 if ac_fn_c_try_run "$LINENO"; then :
10532   have_tls=yes
10533 else
10534   have_tls=no
10535 fi
10536 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10537   conftest.$ac_objext conftest.beam conftest.$ac_ext
10538 fi
10539
10540     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5
10541 $as_echo "$have_tls" >&6; }
10542     if test "x$have_tls" = "xyes"; then
10543
10544 $as_echo "#define TLS_STORAGE_CLASS __declspec(thread)" >>confdefs.h
10545
10546     fi
10547   fi
10548   if test "x$have_tls" = "xno"; then
10549     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Thread_local support in compiler" >&5
10550 $as_echo_n "checking for _Thread_local support in compiler... " >&6; }
10551     if test "$cross_compiling" = yes; then :
10552   have_tls=no
10553 else
10554   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10555 /* end confdefs.h.  */
10556
10557           static _Thread_local int val;
10558           int main(int argc, char **argv) {
10559             val = 0;
10560             return val;
10561           }
10562
10563
10564 _ACEOF
10565 if ac_fn_c_try_run "$LINENO"; then :
10566   have_tls=yes
10567 else
10568   have_tls=no
10569 fi
10570 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10571   conftest.$ac_objext conftest.beam conftest.$ac_ext
10572 fi
10573
10574     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5
10575 $as_echo "$have_tls" >&6; }
10576     if test "x$have_tls" = "xyes"; then
10577
10578 $as_echo "#define TLS_STORAGE_CLASS _Thread_local" >>confdefs.h
10579
10580     fi
10581   fi
10582
10583
10584   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_choose_expr support in compiler" >&5
10585 $as_echo_n "checking for __builtin_choose_expr support in compiler... " >&6; }
10586 if ${ax_cv_cc_builtin_choose_expr+:} false; then :
10587   $as_echo_n "(cached) " >&6
10588 else
10589
10590     if test "$cross_compiling" = yes; then :
10591   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10592 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10593 as_fn_error $? "cannot run test program while cross compiling
10594 See \`config.log' for more details" "$LINENO" 5; }
10595 else
10596   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10597 /* end confdefs.h.  */
10598
10599
10600           int main(int argc, char **argv) {
10601             if ((argc < 0) || !argv) return 1; /* -Werror=unused-parameter */
10602             return __builtin_choose_expr(0, 1, 0);
10603           }
10604
10605
10606 _ACEOF
10607 if ac_fn_c_try_run "$LINENO"; then :
10608   ax_cv_cc_builtin_choose_expr=yes
10609 else
10610   ax_cv_cc_builtin_choose_expr=no
10611
10612 fi
10613 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10614   conftest.$ac_objext conftest.beam conftest.$ac_ext
10615 fi
10616
10617
10618 fi
10619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_builtin_choose_expr" >&5
10620 $as_echo "$ax_cv_cc_builtin_choose_expr" >&6; }
10621   if test "x$ax_cv_cc_builtin_choose_expr" = "xyes"; then
10622
10623 $as_echo "#define HAVE_BUILTIN_CHOOSE_EXPR 1" >>confdefs.h
10624
10625   fi
10626
10627
10628   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p support in compiler" >&5
10629 $as_echo_n "checking for __builtin_types_compatible_p support in compiler... " >&6; }
10630 if ${ax_cv_cc_builtin_types_compatible_p+:} false; then :
10631   $as_echo_n "(cached) " >&6
10632 else
10633
10634     if test "$cross_compiling" = yes; then :
10635   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10636 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10637 as_fn_error $? "cannot run test program while cross compiling
10638 See \`config.log' for more details" "$LINENO" 5; }
10639 else
10640   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10641 /* end confdefs.h.  */
10642
10643
10644           int main(int argc, char **argv) {
10645             if ((argc < 0) || !argv) return 1; /* -Werror=unused-parameter */
10646             return !(__builtin_types_compatible_p(char *, char *));
10647           }
10648
10649
10650 _ACEOF
10651 if ac_fn_c_try_run "$LINENO"; then :
10652   ax_cv_cc_builtin_types_compatible_p=yes
10653 else
10654   ax_cv_cc_builtin_types_compatible_p=no
10655
10656 fi
10657 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10658   conftest.$ac_objext conftest.beam conftest.$ac_ext
10659 fi
10660
10661
10662 fi
10663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_builtin_types_compatible_p" >&5
10664 $as_echo "$ax_cv_cc_builtin_types_compatible_p" >&6; }
10665   if test "x$ax_cv_cc_builtin_types_compatible_p" = "xyes"; then
10666
10667 $as_echo "#define HAVE_BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
10668
10669   fi
10670
10671
10672   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64 support in compiler" >&5
10673 $as_echo_n "checking for __builtin_bswap64 support in compiler... " >&6; }
10674 if ${ax_cv_cc_builtin_bswap64+:} false; then :
10675   $as_echo_n "(cached) " >&6
10676 else
10677
10678     if test "$cross_compiling" = yes; then :
10679   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10680 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10681 as_fn_error $? "cannot run test program while cross compiling
10682 See \`config.log' for more details" "$LINENO" 5; }
10683 else
10684   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10685 /* end confdefs.h.  */
10686
10687
10688           int main(int argc, char **argv) {
10689             if ((argc < 0) || !argv) return 1; /* -Werror=unused-parameter */
10690             return (__builtin_bswap64(0));
10691           }
10692
10693
10694 _ACEOF
10695 if ac_fn_c_try_run "$LINENO"; then :
10696   ax_cv_cc_builtin_bswap64=yes
10697 else
10698   ax_cv_cc_builtin_bswap64=no
10699
10700 fi
10701 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10702   conftest.$ac_objext conftest.beam conftest.$ac_ext
10703 fi
10704
10705
10706 fi
10707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_builtin_bswap64" >&5
10708 $as_echo "$ax_cv_cc_builtin_bswap64" >&6; }
10709   if test "x$ax_cv_cc_builtin_bswap64" = "xyes"; then
10710
10711 $as_echo "#define HAVE_BUILTIN_BSWAP_64 1" >>confdefs.h
10712
10713   fi
10714
10715
10716   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__bounded__)) support in compiler" >&5
10717 $as_echo_n "checking for __attribute__((__bounded__)) support in compiler... " >&6; }
10718 if ${ax_cv_cc_bounded_attribute+:} false; then :
10719   $as_echo_n "(cached) " >&6
10720 else
10721
10722     CFLAGS_SAVED=$CFLAGS
10723     CFLAGS="$CFLAGS -Werror"
10724     if test "$cross_compiling" = yes; then :
10725   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10726 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10727 as_fn_error $? "cannot run test program while cross compiling
10728 See \`config.log' for more details" "$LINENO" 5; }
10729 else
10730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10731 /* end confdefs.h.  */
10732
10733
10734           void test(char *buff) __attribute__ ((__bounded__ (__string__, 1, 1)));
10735           int main(int argc, char **argv) {
10736             if ((argc < 0) || !argv) return 1; /* -Werror=unused-parameter */
10737             return 0;
10738           }
10739
10740
10741 _ACEOF
10742 if ac_fn_c_try_run "$LINENO"; then :
10743   ax_cv_cc_bounded_attribute=yes
10744 else
10745   ax_cv_cc_bounded_attribute=no
10746
10747 fi
10748 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10749   conftest.$ac_objext conftest.beam conftest.$ac_ext
10750 fi
10751
10752     CFLAGS="$CFLAGS_SAVED"
10753
10754 fi
10755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_bounded_attribute" >&5
10756 $as_echo "$ax_cv_cc_bounded_attribute" >&6; }
10757   if test "x$ax_cv_cc_bounded_attribute" = "xyes"; then
10758
10759 $as_echo "#define HAVE_ATTRIBUTE_BOUNDED 1" >>confdefs.h
10760
10761   fi
10762
10763
10764
10765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc_set_memlimit in -ltalloc" >&5
10766 $as_echo_n "checking for talloc_set_memlimit in -ltalloc... " >&6; }
10767 if ${ac_cv_lib_talloc_talloc_set_memlimit+:} false; then :
10768   $as_echo_n "(cached) " >&6
10769 else
10770   ac_check_lib_save_LIBS=$LIBS
10771 LIBS="-ltalloc  $LIBS"
10772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10773 /* end confdefs.h.  */
10774
10775 /* Override any GCC internal prototype to avoid an error.
10776    Use char because int might match the return type of a GCC
10777    builtin and then its argument prototype would still apply.  */
10778 #ifdef __cplusplus
10779 extern "C"
10780 #endif
10781 char talloc_set_memlimit ();
10782 int
10783 main ()
10784 {
10785 return talloc_set_memlimit ();
10786   ;
10787   return 0;
10788 }
10789 _ACEOF
10790 if ac_fn_c_try_link "$LINENO"; then :
10791   ac_cv_lib_talloc_talloc_set_memlimit=yes
10792 else
10793   ac_cv_lib_talloc_talloc_set_memlimit=no
10794 fi
10795 rm -f core conftest.err conftest.$ac_objext \
10796     conftest$ac_exeext conftest.$ac_ext
10797 LIBS=$ac_check_lib_save_LIBS
10798 fi
10799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_talloc_talloc_set_memlimit" >&5
10800 $as_echo "$ac_cv_lib_talloc_talloc_set_memlimit" >&6; }
10801 if test "x$ac_cv_lib_talloc_talloc_set_memlimit" = xyes; then :
10802
10803
10804 $as_echo "#define HAVE_TALLOC_SET_MEMLIMIT 1" >>confdefs.h
10805
10806
10807
10808 fi
10809
10810
10811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
10812 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
10813 if ${ac_cv_lib_crypt_crypt+:} false; then :
10814   $as_echo_n "(cached) " >&6
10815 else
10816   ac_check_lib_save_LIBS=$LIBS
10817 LIBS="-lcrypt  $LIBS"
10818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10819 /* end confdefs.h.  */
10820
10821 /* Override any GCC internal prototype to avoid an error.
10822    Use char because int might match the return type of a GCC
10823    builtin and then its argument prototype would still apply.  */
10824 #ifdef __cplusplus
10825 extern "C"
10826 #endif
10827 char crypt ();
10828 int
10829 main ()
10830 {
10831 return crypt ();
10832   ;
10833   return 0;
10834 }
10835 _ACEOF
10836 if ac_fn_c_try_link "$LINENO"; then :
10837   ac_cv_lib_crypt_crypt=yes
10838 else
10839   ac_cv_lib_crypt_crypt=no
10840 fi
10841 rm -f core conftest.err conftest.$ac_objext \
10842     conftest$ac_exeext conftest.$ac_ext
10843 LIBS=$ac_check_lib_save_LIBS
10844 fi
10845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
10846 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
10847 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
10848   CRYPTLIB="-lcrypt"
10849
10850 fi
10851
10852
10853 if test "$CRYPTLIB" != ""; then
10854
10855 $as_echo "#define HAVE_CRYPT /**/" >>confdefs.h
10856
10857 else
10858   ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
10859 if test "x$ac_cv_func_crypt" = xyes; then :
10860
10861 $as_echo "#define HAVE_CRYPT /**/" >>confdefs.h
10862
10863 fi
10864
10865 fi
10866
10867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setkey in -lcipher" >&5
10868 $as_echo_n "checking for setkey in -lcipher... " >&6; }
10869 if ${ac_cv_lib_cipher_setkey+:} false; then :
10870   $as_echo_n "(cached) " >&6
10871 else
10872   ac_check_lib_save_LIBS=$LIBS
10873 LIBS="-lcipher  $LIBS"
10874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10875 /* end confdefs.h.  */
10876
10877 /* Override any GCC internal prototype to avoid an error.
10878    Use char because int might match the return type of a GCC
10879    builtin and then its argument prototype would still apply.  */
10880 #ifdef __cplusplus
10881 extern "C"
10882 #endif
10883 char setkey ();
10884 int
10885 main ()
10886 {
10887 return setkey ();
10888   ;
10889   return 0;
10890 }
10891 _ACEOF
10892 if ac_fn_c_try_link "$LINENO"; then :
10893   ac_cv_lib_cipher_setkey=yes
10894 else
10895   ac_cv_lib_cipher_setkey=no
10896 fi
10897 rm -f core conftest.err conftest.$ac_objext \
10898     conftest$ac_exeext conftest.$ac_ext
10899 LIBS=$ac_check_lib_save_LIBS
10900 fi
10901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cipher_setkey" >&5
10902 $as_echo "$ac_cv_lib_cipher_setkey" >&6; }
10903 if test "x$ac_cv_lib_cipher_setkey" = xyes; then :
10904   CRYPTLIB="${CRYPTLIB} -lcipher"
10905
10906 fi
10907
10908
10909
10910 execinfo_lib_dir=
10911
10912 # Check whether --with-execinfo-lib-dir was given.
10913 if test "${with_execinfo_lib_dir+set}" = set; then :
10914   withval=$with_execinfo_lib_dir;  case "$withval" in
10915     no)
10916         as_fn_error $? "Need execinfo-lib-dir" "$LINENO" 5
10917         ;;
10918     yes)
10919         ;;
10920     *)
10921         execinfo_lib_dir="$withval"
10922         ;;
10923   esac
10924
10925 fi
10926
10927
10928 execinfo_include_dir=
10929
10930 # Check whether --with-execinfo-include-dir was given.
10931 if test "${with_execinfo_include_dir+set}" = set; then :
10932   withval=$with_execinfo_include_dir;  case "$withval" in
10933     no)
10934         as_fn_error $? "Need execinfo-include-dir" "$LINENO" 5
10935         ;;
10936     yes)
10937         ;;
10938     *)
10939         execinfo_include_dir="$withval"
10940         ;;
10941   esac
10942
10943 fi
10944
10945
10946 smart_try_dir=$execinfo_include_dir
10947
10948
10949 ac_safe=`echo "execinfo.h" | sed 'y%./+-%__pm%'`
10950 old_CPPFLAGS="$CPPFLAGS"
10951 smart_include=
10952 smart_include_dir="/usr/local/include /opt/include"
10953
10954 _smart_try_dir=
10955 _smart_include_dir=
10956
10957 for _prefix in $smart_prefix ""; do
10958   for _dir in $smart_try_dir; do
10959     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
10960   done
10961
10962   for _dir in $smart_include_dir; do
10963     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
10964   done
10965 done
10966
10967 if test "x$_smart_try_dir" != "x"; then
10968   for try in $_smart_try_dir; do
10969     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h in $try" >&5
10970 $as_echo_n "checking for execinfo.h in $try... " >&6; }
10971     CPPFLAGS="-isystem $try $old_CPPFLAGS"
10972     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10973 /* end confdefs.h.  */
10974
10975                     #include <execinfo.h>
10976 int
10977 main ()
10978 {
10979 int a = 1;
10980   ;
10981   return 0;
10982 }
10983 _ACEOF
10984 if ac_fn_c_try_compile "$LINENO"; then :
10985
10986                      smart_include="-isystem $try"
10987                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10988 $as_echo "yes" >&6; }
10989                      break
10990
10991 else
10992
10993                      smart_include=
10994                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10995 $as_echo "no" >&6; }
10996
10997 fi
10998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10999   done
11000   CPPFLAGS="$old_CPPFLAGS"
11001 fi
11002
11003 if test "x$smart_include" = "x"; then
11004   for _prefix in $smart_prefix; do
11005     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/execinfo.h" >&5
11006 $as_echo_n "checking for ${_prefix}/execinfo.h... " >&6; }
11007
11008     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11009 /* end confdefs.h.  */
11010
11011                     #include <execinfo.h>
11012 int
11013 main ()
11014 {
11015 int a = 1;
11016   ;
11017   return 0;
11018 }
11019 _ACEOF
11020 if ac_fn_c_try_compile "$LINENO"; then :
11021
11022                      smart_include="-isystem ${_prefix}/"
11023                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11024 $as_echo "yes" >&6; }
11025                      break
11026
11027 else
11028
11029                      smart_include=
11030                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11031 $as_echo "no" >&6; }
11032
11033 fi
11034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11035   done
11036 fi
11037
11038 if test "x$smart_include" = "x"; then
11039     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h" >&5
11040 $as_echo_n "checking for execinfo.h... " >&6; }
11041
11042     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11043 /* end confdefs.h.  */
11044
11045                     #include <execinfo.h>
11046 int
11047 main ()
11048 {
11049 int a = 1;
11050   ;
11051   return 0;
11052 }
11053 _ACEOF
11054 if ac_fn_c_try_compile "$LINENO"; then :
11055
11056                      smart_include=" "
11057                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11058 $as_echo "yes" >&6; }
11059                      break
11060
11061 else
11062
11063                      smart_include=
11064                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11065 $as_echo "no" >&6; }
11066
11067 fi
11068 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11069 fi
11070
11071 if test "x$smart_include" = "x"; then
11072
11073   for prefix in $smart_prefix; do
11074
11075
11076 if test "x$LOCATE" != "x"; then
11077         DIRS=
11078   file="${_prefix}/${1}"
11079
11080   for x in `${LOCATE} $file 2>/dev/null`; do
11081                                         base=`echo $x | sed "s%/${file}%%"`
11082     if test "x$x" = "x$base"; then
11083       continue;
11084     fi
11085
11086     dir=`${DIRNAME} $x 2>/dev/null`
11087                 exclude=`echo ${dir} | ${GREP} /home`
11088     if test "x$exclude" != "x"; then
11089       continue
11090     fi
11091
11092                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
11093     if test "x$already" = "x"; then
11094       DIRS="$DIRS $dir"
11095     fi
11096   done
11097 fi
11098
11099 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
11100
11101   done
11102
11103
11104 if test "x$LOCATE" != "x"; then
11105         DIRS=
11106   file=execinfo.h
11107
11108   for x in `${LOCATE} $file 2>/dev/null`; do
11109                                         base=`echo $x | sed "s%/${file}%%"`
11110     if test "x$x" = "x$base"; then
11111       continue;
11112     fi
11113
11114     dir=`${DIRNAME} $x 2>/dev/null`
11115                 exclude=`echo ${dir} | ${GREP} /home`
11116     if test "x$exclude" != "x"; then
11117       continue
11118     fi
11119
11120                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
11121     if test "x$already" = "x"; then
11122       DIRS="$DIRS $dir"
11123     fi
11124   done
11125 fi
11126
11127 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
11128
11129
11130   for try in $_smart_include_dir; do
11131     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h in $try" >&5
11132 $as_echo_n "checking for execinfo.h in $try... " >&6; }
11133     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11134     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11135 /* end confdefs.h.  */
11136
11137                     #include <execinfo.h>
11138 int
11139 main ()
11140 {
11141 int a = 1;
11142   ;
11143   return 0;
11144 }
11145 _ACEOF
11146 if ac_fn_c_try_compile "$LINENO"; then :
11147
11148                      smart_include="-isystem $try"
11149                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11150 $as_echo "yes" >&6; }
11151                      break
11152
11153 else
11154
11155                      smart_include=
11156                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11157 $as_echo "no" >&6; }
11158
11159 fi
11160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11161   done
11162   CPPFLAGS="$old_CPPFLAGS"
11163 fi
11164
11165 if test "x$smart_include" != "x"; then
11166   eval "ac_cv_header_$ac_safe=yes"
11167   CPPFLAGS="$smart_include $old_CPPFLAGS"
11168   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
11169 fi
11170
11171 smart_prefix=
11172
11173 if test "x$ac_cv_header_execinfo_h" = "xyes"; then
11174   smart_try_dir=$execinfo_lib_dir
11175
11176
11177 sm_lib_safe=`echo "execinfo" | sed 'y%./+-%__p_%'`
11178 sm_func_safe=`echo "backtrace_symbols" | sed 'y%./+-%__p_%'`
11179
11180 old_LIBS="$LIBS"
11181 old_CPPFLAGS="$CPPFLAGS"
11182 smart_lib=
11183 smart_ldflags=
11184 smart_lib_dir=
11185
11186 if test "x$smart_try_dir" != "x"; then
11187   for try in $smart_try_dir; do
11188     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo in $try" >&5
11189 $as_echo_n "checking for backtrace_symbols in -lexecinfo in $try... " >&6; }
11190     LIBS="-lexecinfo $old_LIBS"
11191     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
11192     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11193 /* end confdefs.h.  */
11194 extern char backtrace_symbols();
11195 int
11196 main ()
11197 {
11198 backtrace_symbols()
11199   ;
11200   return 0;
11201 }
11202 _ACEOF
11203 if ac_fn_c_try_link "$LINENO"; then :
11204
11205                  smart_lib="-lexecinfo"
11206                  smart_ldflags="-L$try -Wl,-rpath,$try"
11207                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11208 $as_echo "yes" >&6; }
11209                  break
11210
11211 else
11212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11213 $as_echo "no" >&6; }
11214 fi
11215 rm -f core conftest.err conftest.$ac_objext \
11216     conftest$ac_exeext conftest.$ac_ext
11217   done
11218   LIBS="$old_LIBS"
11219   CPPFLAGS="$old_CPPFLAGS"
11220 fi
11221
11222 if test "x$smart_lib" = "x"; then
11223   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo" >&5
11224 $as_echo_n "checking for backtrace_symbols in -lexecinfo... " >&6; }
11225   LIBS="-lexecinfo $old_LIBS"
11226   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11227 /* end confdefs.h.  */
11228 extern char backtrace_symbols();
11229 int
11230 main ()
11231 {
11232 backtrace_symbols()
11233   ;
11234   return 0;
11235 }
11236 _ACEOF
11237 if ac_fn_c_try_link "$LINENO"; then :
11238
11239                 smart_lib="-lexecinfo"
11240                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11241 $as_echo "yes" >&6; }
11242
11243 else
11244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11245 $as_echo "no" >&6; }
11246 fi
11247 rm -f core conftest.err conftest.$ac_objext \
11248     conftest$ac_exeext conftest.$ac_ext
11249   LIBS="$old_LIBS"
11250 fi
11251
11252 if test "x$smart_lib" = "x"; then
11253
11254
11255 if test "x$LOCATE" != "x"; then
11256         DIRS=
11257   file=libexecinfo${libltdl_cv_shlibext}
11258
11259   for x in `${LOCATE} $file 2>/dev/null`; do
11260                                         base=`echo $x | sed "s%/${file}%%"`
11261     if test "x$x" = "x$base"; then
11262       continue;
11263     fi
11264
11265     dir=`${DIRNAME} $x 2>/dev/null`
11266                 exclude=`echo ${dir} | ${GREP} /home`
11267     if test "x$exclude" != "x"; then
11268       continue
11269     fi
11270
11271                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
11272     if test "x$already" = "x"; then
11273       DIRS="$DIRS $dir"
11274     fi
11275   done
11276 fi
11277
11278 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
11279
11280
11281
11282 if test "x$LOCATE" != "x"; then
11283         DIRS=
11284   file=libexecinfo.a
11285
11286   for x in `${LOCATE} $file 2>/dev/null`; do
11287                                         base=`echo $x | sed "s%/${file}%%"`
11288     if test "x$x" = "x$base"; then
11289       continue;
11290     fi
11291
11292     dir=`${DIRNAME} $x 2>/dev/null`
11293                 exclude=`echo ${dir} | ${GREP} /home`
11294     if test "x$exclude" != "x"; then
11295       continue
11296     fi
11297
11298                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
11299     if test "x$already" = "x"; then
11300       DIRS="$DIRS $dir"
11301     fi
11302   done
11303 fi
11304
11305 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
11306
11307
11308   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
11309     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo in $try" >&5
11310 $as_echo_n "checking for backtrace_symbols in -lexecinfo in $try... " >&6; }
11311     LIBS="-lexecinfo $old_LIBS"
11312     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
11313     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11314 /* end confdefs.h.  */
11315 extern char backtrace_symbols();
11316 int
11317 main ()
11318 {
11319 backtrace_symbols()
11320   ;
11321   return 0;
11322 }
11323 _ACEOF
11324 if ac_fn_c_try_link "$LINENO"; then :
11325
11326                   smart_lib="-lexecinfo"
11327                   smart_ldflags="-L$try -Wl,-rpath,$try"
11328                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11329 $as_echo "yes" >&6; }
11330                   break
11331
11332 else
11333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11334 $as_echo "no" >&6; }
11335 fi
11336 rm -f core conftest.err conftest.$ac_objext \
11337     conftest$ac_exeext conftest.$ac_ext
11338   done
11339   LIBS="$old_LIBS"
11340   CPPFLAGS="$old_CPPFLAGS"
11341 fi
11342
11343 if test "x$smart_lib" != "x"; then
11344   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
11345   LIBS="$smart_ldflags $smart_lib $old_LIBS"
11346   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
11347 fi
11348
11349   if test "x$ac_cv_lib_execinfo_backtrace_symbols" != "xyes"; then
11350         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if execinfo provided as part of libc" >&5
11351 $as_echo_n "checking if execinfo provided as part of libc... " >&6; }
11352     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11353 /* end confdefs.h.  */
11354
11355         #include <execinfo.h>
11356
11357 int
11358 main ()
11359 {
11360
11361         void *sym[1];
11362         backtrace_symbols(&sym, sizeof(sym))
11363   ;
11364   return 0;
11365 }
11366 _ACEOF
11367 if ac_fn_c_try_link "$LINENO"; then :
11368
11369         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11370 $as_echo "yes" >&6; }
11371         ac_cv_lib_execinfo_backtrace_symbols="yes"
11372
11373 else
11374
11375         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11376 $as_echo "no" >&6; }
11377
11378
11379 fi
11380 rm -f core conftest.err conftest.$ac_objext \
11381     conftest$ac_exeext conftest.$ac_ext
11382   fi
11383
11384   if test "x$ac_cv_lib_execinfo_backtrace_symbols" = "xyes"; then
11385
11386 $as_echo "#define HAVE_EXECINFO 1" >>confdefs.h
11387
11388   fi
11389 fi
11390
11391 PCRE=yes
11392
11393 # Check whether --with-pcre was given.
11394 if test "${with_pcre+set}" = set; then :
11395   withval=$with_pcre;  case "$withval" in
11396     no)
11397     PCRE=no
11398         ;;
11399     yes)
11400     PCRE=yes
11401         ;;
11402   esac
11403
11404 fi
11405
11406
11407 pcre_lib_dir=
11408
11409 # Check whether --with-pcre-lib-dir was given.
11410 if test "${with_pcre_lib_dir+set}" = set; then :
11411   withval=$with_pcre_lib_dir;  case "$withval" in
11412     no)
11413         as_fn_error $? "Need pcre-lib-dir" "$LINENO" 5
11414         ;;
11415     yes)
11416         ;;
11417     *)
11418         pcre_lib_dir="$withval"
11419         ;;
11420   esac
11421
11422 fi
11423
11424
11425 pcre_include_dir=
11426
11427 # Check whether --with-pcre-include-dir was given.
11428 if test "${with_pcre_include_dir+set}" = set; then :
11429   withval=$with_pcre_include_dir;  case "$withval" in
11430     no)
11431         as_fn_error $? "Need pcre-include-dir" "$LINENO" 5
11432         ;;
11433     yes)
11434         ;;
11435     *)
11436         pcre_include_dir="$withval"
11437         ;;
11438   esac
11439
11440 fi
11441
11442
11443 REGEX=
11444
11445 # Check whether --with-regex was given.
11446 if test "${with_regex+set}" = set; then :
11447   withval=$with_regex;  case "$withval" in
11448     no)
11449         REGEX=no
11450         ;;
11451     *)
11452         ;;
11453   esac
11454
11455 fi
11456
11457
11458 if test "x$REGEX" != "xno" && test "x$PCRE" != "xno"; then
11459   smart_try_dir=$pcre_include_dir
11460
11461
11462 ac_safe=`echo "pcre.h" | sed 'y%./+-%__pm%'`
11463 old_CPPFLAGS="$CPPFLAGS"
11464 smart_include=
11465 smart_include_dir="/usr/local/include /opt/include"
11466
11467 _smart_try_dir=
11468 _smart_include_dir=
11469
11470 for _prefix in $smart_prefix ""; do
11471   for _dir in $smart_try_dir; do
11472     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
11473   done
11474
11475   for _dir in $smart_include_dir; do
11476     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
11477   done
11478 done
11479
11480 if test "x$_smart_try_dir" != "x"; then
11481   for try in $_smart_try_dir; do
11482     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre.h in $try" >&5
11483 $as_echo_n "checking for pcre.h in $try... " >&6; }
11484     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11485     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11486 /* end confdefs.h.  */
11487
11488                     #include <pcre.h>
11489 int
11490 main ()
11491 {
11492 int a = 1;
11493   ;
11494   return 0;
11495 }
11496 _ACEOF
11497 if ac_fn_c_try_compile "$LINENO"; then :
11498
11499                      smart_include="-isystem $try"
11500                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11501 $as_echo "yes" >&6; }
11502                      break
11503
11504 else
11505
11506                      smart_include=
11507                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11508 $as_echo "no" >&6; }
11509
11510 fi
11511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11512   done
11513   CPPFLAGS="$old_CPPFLAGS"
11514 fi
11515
11516 if test "x$smart_include" = "x"; then
11517   for _prefix in $smart_prefix; do
11518     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/pcre.h" >&5
11519 $as_echo_n "checking for ${_prefix}/pcre.h... " >&6; }
11520
11521     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11522 /* end confdefs.h.  */
11523
11524                     #include <pcre.h>
11525 int
11526 main ()
11527 {
11528 int a = 1;
11529   ;
11530   return 0;
11531 }
11532 _ACEOF
11533 if ac_fn_c_try_compile "$LINENO"; then :
11534
11535                      smart_include="-isystem ${_prefix}/"
11536                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11537 $as_echo "yes" >&6; }
11538                      break
11539
11540 else
11541
11542                      smart_include=
11543                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11544 $as_echo "no" >&6; }
11545
11546 fi
11547 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11548   done
11549 fi
11550
11551 if test "x$smart_include" = "x"; then
11552     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre.h" >&5
11553 $as_echo_n "checking for pcre.h... " >&6; }
11554
11555     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11556 /* end confdefs.h.  */
11557
11558                     #include <pcre.h>
11559 int
11560 main ()
11561 {
11562 int a = 1;
11563   ;
11564   return 0;
11565 }
11566 _ACEOF
11567 if ac_fn_c_try_compile "$LINENO"; then :
11568
11569                      smart_include=" "
11570                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11571 $as_echo "yes" >&6; }
11572                      break
11573
11574 else
11575
11576                      smart_include=
11577                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11578 $as_echo "no" >&6; }
11579
11580 fi
11581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11582 fi
11583
11584 if test "x$smart_include" = "x"; then
11585
11586   for prefix in $smart_prefix; do
11587
11588
11589 if test "x$LOCATE" != "x"; then
11590         DIRS=
11591   file="${_prefix}/${1}"
11592
11593   for x in `${LOCATE} $file 2>/dev/null`; do
11594                                         base=`echo $x | sed "s%/${file}%%"`
11595     if test "x$x" = "x$base"; then
11596       continue;
11597     fi
11598
11599     dir=`${DIRNAME} $x 2>/dev/null`
11600                 exclude=`echo ${dir} | ${GREP} /home`
11601     if test "x$exclude" != "x"; then
11602       continue
11603     fi
11604
11605                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
11606     if test "x$already" = "x"; then
11607       DIRS="$DIRS $dir"
11608     fi
11609   done
11610 fi
11611
11612 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
11613
11614   done
11615
11616
11617 if test "x$LOCATE" != "x"; then
11618         DIRS=
11619   file=pcre.h
11620
11621   for x in `${LOCATE} $file 2>/dev/null`; do
11622                                         base=`echo $x | sed "s%/${file}%%"`
11623     if test "x$x" = "x$base"; then
11624       continue;
11625     fi
11626
11627     dir=`${DIRNAME} $x 2>/dev/null`
11628                 exclude=`echo ${dir} | ${GREP} /home`
11629     if test "x$exclude" != "x"; then
11630       continue
11631     fi
11632
11633                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
11634     if test "x$already" = "x"; then
11635       DIRS="$DIRS $dir"
11636     fi
11637   done
11638 fi
11639
11640 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
11641
11642
11643   for try in $_smart_include_dir; do
11644     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre.h in $try" >&5
11645 $as_echo_n "checking for pcre.h in $try... " >&6; }
11646     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11647     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11648 /* end confdefs.h.  */
11649
11650                     #include <pcre.h>
11651 int
11652 main ()
11653 {
11654 int a = 1;
11655   ;
11656   return 0;
11657 }
11658 _ACEOF
11659 if ac_fn_c_try_compile "$LINENO"; then :
11660
11661                      smart_include="-isystem $try"
11662                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11663 $as_echo "yes" >&6; }
11664                      break
11665
11666 else
11667
11668                      smart_include=
11669                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11670 $as_echo "no" >&6; }
11671
11672 fi
11673 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11674   done
11675   CPPFLAGS="$old_CPPFLAGS"
11676 fi
11677
11678 if test "x$smart_include" != "x"; then
11679   eval "ac_cv_header_$ac_safe=yes"
11680   CPPFLAGS="$smart_include $old_CPPFLAGS"
11681   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
11682 fi
11683
11684 smart_prefix=
11685
11686   if test "x$ac_cv_header_pcre_h" = "xyes"; then
11687     smart_try_dir=$pcre_lib_dir
11688
11689
11690 sm_lib_safe=`echo "pcre" | sed 'y%./+-%__p_%'`
11691 sm_func_safe=`echo "pcre_compile" | sed 'y%./+-%__p_%'`
11692
11693 old_LIBS="$LIBS"
11694 old_CPPFLAGS="$CPPFLAGS"
11695 smart_lib=
11696 smart_ldflags=
11697 smart_lib_dir=
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 pcre_compile in -lpcre in $try" >&5
11702 $as_echo_n "checking for pcre_compile in -lpcre in $try... " >&6; }
11703     LIBS="-lpcre $old_LIBS"
11704     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
11705     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11706 /* end confdefs.h.  */
11707 extern char pcre_compile();
11708 int
11709 main ()
11710 {
11711 pcre_compile()
11712   ;
11713   return 0;
11714 }
11715 _ACEOF
11716 if ac_fn_c_try_link "$LINENO"; then :
11717
11718                  smart_lib="-lpcre"
11719                  smart_ldflags="-L$try -Wl,-rpath,$try"
11720                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11721 $as_echo "yes" >&6; }
11722                  break
11723
11724 else
11725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11726 $as_echo "no" >&6; }
11727 fi
11728 rm -f core conftest.err conftest.$ac_objext \
11729     conftest$ac_exeext conftest.$ac_ext
11730   done
11731   LIBS="$old_LIBS"
11732   CPPFLAGS="$old_CPPFLAGS"
11733 fi
11734
11735 if test "x$smart_lib" = "x"; then
11736   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre" >&5
11737 $as_echo_n "checking for pcre_compile in -lpcre... " >&6; }
11738   LIBS="-lpcre $old_LIBS"
11739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11740 /* end confdefs.h.  */
11741 extern char pcre_compile();
11742 int
11743 main ()
11744 {
11745 pcre_compile()
11746   ;
11747   return 0;
11748 }
11749 _ACEOF
11750 if ac_fn_c_try_link "$LINENO"; then :
11751
11752                 smart_lib="-lpcre"
11753                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11754 $as_echo "yes" >&6; }
11755
11756 else
11757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11758 $as_echo "no" >&6; }
11759 fi
11760 rm -f core conftest.err conftest.$ac_objext \
11761     conftest$ac_exeext conftest.$ac_ext
11762   LIBS="$old_LIBS"
11763 fi
11764
11765 if test "x$smart_lib" = "x"; then
11766
11767
11768 if test "x$LOCATE" != "x"; then
11769         DIRS=
11770   file=libpcre${libltdl_cv_shlibext}
11771
11772   for x in `${LOCATE} $file 2>/dev/null`; do
11773                                         base=`echo $x | sed "s%/${file}%%"`
11774     if test "x$x" = "x$base"; then
11775       continue;
11776     fi
11777
11778     dir=`${DIRNAME} $x 2>/dev/null`
11779                 exclude=`echo ${dir} | ${GREP} /home`
11780     if test "x$exclude" != "x"; then
11781       continue
11782     fi
11783
11784                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
11785     if test "x$already" = "x"; then
11786       DIRS="$DIRS $dir"
11787     fi
11788   done
11789 fi
11790
11791 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
11792
11793
11794
11795 if test "x$LOCATE" != "x"; then
11796         DIRS=
11797   file=libpcre.a
11798
11799   for x in `${LOCATE} $file 2>/dev/null`; do
11800                                         base=`echo $x | sed "s%/${file}%%"`
11801     if test "x$x" = "x$base"; then
11802       continue;
11803     fi
11804
11805     dir=`${DIRNAME} $x 2>/dev/null`
11806                 exclude=`echo ${dir} | ${GREP} /home`
11807     if test "x$exclude" != "x"; then
11808       continue
11809     fi
11810
11811                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
11812     if test "x$already" = "x"; then
11813       DIRS="$DIRS $dir"
11814     fi
11815   done
11816 fi
11817
11818 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
11819
11820
11821   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
11822     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre in $try" >&5
11823 $as_echo_n "checking for pcre_compile in -lpcre in $try... " >&6; }
11824     LIBS="-lpcre $old_LIBS"
11825     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
11826     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11827 /* end confdefs.h.  */
11828 extern char pcre_compile();
11829 int
11830 main ()
11831 {
11832 pcre_compile()
11833   ;
11834   return 0;
11835 }
11836 _ACEOF
11837 if ac_fn_c_try_link "$LINENO"; then :
11838
11839                   smart_lib="-lpcre"
11840                   smart_ldflags="-L$try -Wl,-rpath,$try"
11841                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11842 $as_echo "yes" >&6; }
11843                   break
11844
11845 else
11846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11847 $as_echo "no" >&6; }
11848 fi
11849 rm -f core conftest.err conftest.$ac_objext \
11850     conftest$ac_exeext conftest.$ac_ext
11851   done
11852   LIBS="$old_LIBS"
11853   CPPFLAGS="$old_CPPFLAGS"
11854 fi
11855
11856 if test "x$smart_lib" != "x"; then
11857   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
11858   LIBS="$smart_ldflags $smart_lib $old_LIBS"
11859   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
11860 fi
11861
11862     if test "x$ac_cv_lib_pcre_pcre_compile" = "xyes"; then
11863       REGEX=yes
11864
11865 $as_echo "#define HAVE_PCRE 1" >>confdefs.h
11866
11867
11868 $as_echo "#define HAVE_BINSAFE_REGEX 1" >>confdefs.h
11869
11870     fi
11871   fi
11872 fi
11873
11874 if test "x$REGEX" = "x"; then
11875   smart_try_dir=
11876
11877
11878 ac_safe=`echo "regex.h" | sed 'y%./+-%__pm%'`
11879 old_CPPFLAGS="$CPPFLAGS"
11880 smart_include=
11881 smart_include_dir="/usr/local/include /opt/include"
11882
11883 _smart_try_dir=
11884 _smart_include_dir=
11885
11886 for _prefix in $smart_prefix ""; do
11887   for _dir in $smart_try_dir; do
11888     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
11889   done
11890
11891   for _dir in $smart_include_dir; do
11892     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
11893   done
11894 done
11895
11896 if test "x$_smart_try_dir" != "x"; then
11897   for try in $_smart_try_dir; do
11898     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h in $try" >&5
11899 $as_echo_n "checking for regex.h in $try... " >&6; }
11900     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11901     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11902 /* end confdefs.h.  */
11903
11904                     #include <regex.h>
11905 int
11906 main ()
11907 {
11908 int a = 1;
11909   ;
11910   return 0;
11911 }
11912 _ACEOF
11913 if ac_fn_c_try_compile "$LINENO"; then :
11914
11915                      smart_include="-isystem $try"
11916                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11917 $as_echo "yes" >&6; }
11918                      break
11919
11920 else
11921
11922                      smart_include=
11923                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11924 $as_echo "no" >&6; }
11925
11926 fi
11927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11928   done
11929   CPPFLAGS="$old_CPPFLAGS"
11930 fi
11931
11932 if test "x$smart_include" = "x"; then
11933   for _prefix in $smart_prefix; do
11934     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/regex.h" >&5
11935 $as_echo_n "checking for ${_prefix}/regex.h... " >&6; }
11936
11937     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11938 /* end confdefs.h.  */
11939
11940                     #include <regex.h>
11941 int
11942 main ()
11943 {
11944 int a = 1;
11945   ;
11946   return 0;
11947 }
11948 _ACEOF
11949 if ac_fn_c_try_compile "$LINENO"; then :
11950
11951                      smart_include="-isystem ${_prefix}/"
11952                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11953 $as_echo "yes" >&6; }
11954                      break
11955
11956 else
11957
11958                      smart_include=
11959                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11960 $as_echo "no" >&6; }
11961
11962 fi
11963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11964   done
11965 fi
11966
11967 if test "x$smart_include" = "x"; then
11968     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h" >&5
11969 $as_echo_n "checking for regex.h... " >&6; }
11970
11971     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11972 /* end confdefs.h.  */
11973
11974                     #include <regex.h>
11975 int
11976 main ()
11977 {
11978 int a = 1;
11979   ;
11980   return 0;
11981 }
11982 _ACEOF
11983 if ac_fn_c_try_compile "$LINENO"; then :
11984
11985                      smart_include=" "
11986                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11987 $as_echo "yes" >&6; }
11988                      break
11989
11990 else
11991
11992                      smart_include=
11993                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11994 $as_echo "no" >&6; }
11995
11996 fi
11997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11998 fi
11999
12000 if test "x$smart_include" = "x"; then
12001
12002   for prefix in $smart_prefix; do
12003
12004
12005 if test "x$LOCATE" != "x"; then
12006         DIRS=
12007   file="${_prefix}/${1}"
12008
12009   for x in `${LOCATE} $file 2>/dev/null`; do
12010                                         base=`echo $x | sed "s%/${file}%%"`
12011     if test "x$x" = "x$base"; then
12012       continue;
12013     fi
12014
12015     dir=`${DIRNAME} $x 2>/dev/null`
12016                 exclude=`echo ${dir} | ${GREP} /home`
12017     if test "x$exclude" != "x"; then
12018       continue
12019     fi
12020
12021                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
12022     if test "x$already" = "x"; then
12023       DIRS="$DIRS $dir"
12024     fi
12025   done
12026 fi
12027
12028 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
12029
12030   done
12031
12032
12033 if test "x$LOCATE" != "x"; then
12034         DIRS=
12035   file=regex.h
12036
12037   for x in `${LOCATE} $file 2>/dev/null`; do
12038                                         base=`echo $x | sed "s%/${file}%%"`
12039     if test "x$x" = "x$base"; then
12040       continue;
12041     fi
12042
12043     dir=`${DIRNAME} $x 2>/dev/null`
12044                 exclude=`echo ${dir} | ${GREP} /home`
12045     if test "x$exclude" != "x"; then
12046       continue
12047     fi
12048
12049                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
12050     if test "x$already" = "x"; then
12051       DIRS="$DIRS $dir"
12052     fi
12053   done
12054 fi
12055
12056 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
12057
12058
12059   for try in $_smart_include_dir; do
12060     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h in $try" >&5
12061 $as_echo_n "checking for regex.h in $try... " >&6; }
12062     CPPFLAGS="-isystem $try $old_CPPFLAGS"
12063     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12064 /* end confdefs.h.  */
12065
12066                     #include <regex.h>
12067 int
12068 main ()
12069 {
12070 int a = 1;
12071   ;
12072   return 0;
12073 }
12074 _ACEOF
12075 if ac_fn_c_try_compile "$LINENO"; then :
12076
12077                      smart_include="-isystem $try"
12078                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12079 $as_echo "yes" >&6; }
12080                      break
12081
12082 else
12083
12084                      smart_include=
12085                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12086 $as_echo "no" >&6; }
12087
12088 fi
12089 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12090   done
12091   CPPFLAGS="$old_CPPFLAGS"
12092 fi
12093
12094 if test "x$smart_include" != "x"; then
12095   eval "ac_cv_header_$ac_safe=yes"
12096   CPPFLAGS="$smart_include $old_CPPFLAGS"
12097   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
12098 fi
12099
12100 smart_prefix=
12101
12102   if test "x$ac_cv_header_regex_h" = "xyes"; then
12103     REGEX=yes
12104     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extended regular expressions" >&5
12105 $as_echo_n "checking for extended regular expressions... " >&6; }
12106     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12107 /* end confdefs.h.  */
12108
12109         #include <regex.h>
12110         #ifdef REG_EXTENDED
12111         yes
12112         #endif
12113
12114 _ACEOF
12115 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12116   $EGREP "yes" >/dev/null 2>&1; then :
12117
12118         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12119 $as_echo "yes" >&6; }
12120
12121 $as_echo "#define HAVE_REG_EXTENDED 1" >>confdefs.h
12122
12123
12124 else
12125
12126         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12127 $as_echo "no" >&6; }
12128
12129
12130 fi
12131 rm -f conftest*
12132
12133
12134                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regcomp in -lregex" >&5
12135 $as_echo_n "checking for regcomp in -lregex... " >&6; }
12136 if ${ac_cv_lib_regex_regcomp+:} false; then :
12137   $as_echo_n "(cached) " >&6
12138 else
12139   ac_check_lib_save_LIBS=$LIBS
12140 LIBS="-lregex  $LIBS"
12141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12142 /* end confdefs.h.  */
12143
12144 /* Override any GCC internal prototype to avoid an error.
12145    Use char because int might match the return type of a GCC
12146    builtin and then its argument prototype would still apply.  */
12147 #ifdef __cplusplus
12148 extern "C"
12149 #endif
12150 char regcomp ();
12151 int
12152 main ()
12153 {
12154 return regcomp ();
12155   ;
12156   return 0;
12157 }
12158 _ACEOF
12159 if ac_fn_c_try_link "$LINENO"; then :
12160   ac_cv_lib_regex_regcomp=yes
12161 else
12162   ac_cv_lib_regex_regcomp=no
12163 fi
12164 rm -f core conftest.err conftest.$ac_objext \
12165     conftest$ac_exeext conftest.$ac_ext
12166 LIBS=$ac_check_lib_save_LIBS
12167 fi
12168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_regex_regcomp" >&5
12169 $as_echo "$ac_cv_lib_regex_regcomp" >&6; }
12170 if test "x$ac_cv_lib_regex_regcomp" = xyes; then :
12171
12172         LIBS="-lregex $LIBS"
12173
12174
12175 fi
12176
12177
12178                     for ac_func in \
12179       regncomp \
12180       regnexec
12181
12182 do :
12183   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12184 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12185 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12186   cat >>confdefs.h <<_ACEOF
12187 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12188 _ACEOF
12189
12190 fi
12191 done
12192
12193     if test x"$ac_cv_func_regncomp" = x"yes" && test  x"$ac_cv_func_regnexec" = x"yes"; then
12194
12195 $as_echo "#define HAVE_BINSAFE_REGEX 1" >>confdefs.h
12196
12197     fi
12198   fi
12199 fi
12200
12201 if test "x$REGEX" = "xyes"; then
12202
12203 $as_echo "#define HAVE_REGEX 1" >>confdefs.h
12204
12205 fi
12206
12207
12208 $as_echo "#define GNUSTYLE 1" >>confdefs.h
12209
12210
12211
12212 $as_echo "#define SYSVSTYLE 2" >>confdefs.h
12213
12214
12215
12216 $as_echo "#define BSDSTYLE 3" >>confdefs.h
12217
12218
12219 gethostbyaddrrstyle=""
12220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyaddr_r() syntax" >&5
12221 $as_echo_n "checking gethostbyaddr_r() syntax... " >&6; }
12222 case "$host" in
12223   *-freebsd*)
12224                             ac_fn_c_check_decl "$LINENO" "gethostbyaddr_r" "ac_cv_have_decl_gethostbyaddr_r" "
12225         #ifdef HAVE_NETDB_H
12226         #include <netdb.h>
12227         #endif
12228
12229 "
12230 if test "x$ac_cv_have_decl_gethostbyaddr_r" = xyes; then :
12231   ac_have_decl=1
12232 else
12233   ac_have_decl=0
12234 fi
12235
12236 cat >>confdefs.h <<_ACEOF
12237 #define HAVE_DECL_GETHOSTBYADDR_R $ac_have_decl
12238 _ACEOF
12239 if test $ac_have_decl = 1; then :
12240
12241 else
12242
12243
12244 $as_echo "#define GETHOSTBYADDRRSTYLE BSDSTYLE" >>confdefs.h
12245
12246         gethostbyaddrrstyle=BSD
12247         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: FreeBSD overridden to BSD-style" >&5
12248 $as_echo "$as_me: WARNING: FreeBSD overridden to BSD-style" >&2;}
12249
12250 fi
12251
12252     ;;
12253 esac
12254
12255 if test "x$gethostbyaddrrstyle" = "x"; then
12256   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12257 /* end confdefs.h.  */
12258
12259       #include <stdio.h>
12260       #include <netdb.h>
12261
12262 int
12263 main ()
12264 {
12265  gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL, NULL)
12266   ;
12267   return 0;
12268 }
12269 _ACEOF
12270 if ac_fn_c_try_link "$LINENO"; then :
12271
12272
12273 $as_echo "#define GETHOSTBYADDRRSTYLE GNUSTYLE" >>confdefs.h
12274
12275       gethostbyaddrrstyle=GNU
12276
12277
12278 fi
12279 rm -f core conftest.err conftest.$ac_objext \
12280     conftest$ac_exeext conftest.$ac_ext
12281 fi
12282
12283 if test "x$gethostbyaddrrstyle" = "x"; then
12284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12285 /* end confdefs.h.  */
12286
12287       #include <stdio.h>
12288       #include <netdb.h>
12289
12290 int
12291 main ()
12292 {
12293  gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL)
12294   ;
12295   return 0;
12296 }
12297 _ACEOF
12298 if ac_fn_c_try_link "$LINENO"; then :
12299
12300
12301 $as_echo "#define GETHOSTBYADDRRSTYLE SYSVSTYLE" >>confdefs.h
12302
12303       gethostbyaddrrstyle=SYSV
12304
12305
12306 fi
12307 rm -f core conftest.err conftest.$ac_objext \
12308     conftest$ac_exeext conftest.$ac_ext
12309 fi
12310
12311
12312 if test "x$gethostbyaddrrstyle" = "x"; then
12313   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12314 /* end confdefs.h.  */
12315
12316       #include <stdio.h>
12317       #include <netdb.h>
12318
12319 int
12320 main ()
12321 {
12322  gethostbyaddr(NULL, 0, 0)
12323   ;
12324   return 0;
12325 }
12326 _ACEOF
12327 if ac_fn_c_try_link "$LINENO"; then :
12328
12329
12330 $as_echo "#define GETHOSTBYADDRRSTYLE BSDSTYLE" >>confdefs.h
12331
12332       gethostbyaddrrstyle=BSD
12333
12334
12335 fi
12336 rm -f core conftest.err conftest.$ac_objext \
12337     conftest$ac_exeext conftest.$ac_ext
12338 fi
12339
12340 if test "x$gethostbyaddrrstyle" = "x"; then
12341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none!  It must not exist, here." >&5
12342 $as_echo "none!  It must not exist, here." >&6; }
12343 else
12344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${gethostbyaddrrstyle}-style" >&5
12345 $as_echo "${gethostbyaddrrstyle}-style" >&6; }
12346 fi
12347
12348 if test "x$gethostbyaddrrstyle" = "xBSD"; then
12349   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** " >&5
12350 $as_echo "$as_me: WARNING:  ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** " >&2;}
12351 fi
12352
12353 gethostbynamerstyle=""
12354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r() syntax" >&5
12355 $as_echo_n "checking gethostbyname_r() syntax... " >&6; }
12356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12357 /* end confdefs.h.  */
12358
12359     #include <stdio.h>
12360     #include <netdb.h>
12361
12362 int
12363 main ()
12364 {
12365  gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL)
12366   ;
12367   return 0;
12368 }
12369 _ACEOF
12370 if ac_fn_c_try_link "$LINENO"; then :
12371
12372
12373 $as_echo "#define GETHOSTBYNAMERSTYLE GNUSTYLE" >>confdefs.h
12374
12375     gethostbynamerstyle=GNU
12376
12377
12378 fi
12379 rm -f core conftest.err conftest.$ac_objext \
12380     conftest$ac_exeext conftest.$ac_ext
12381
12382 if test "x$gethostbynamerstyle" = "x"; then
12383   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12384 /* end confdefs.h.  */
12385
12386       #include <stdio.h>
12387       #include <netdb.h>
12388
12389 int
12390 main ()
12391 {
12392  gethostbyname_r(NULL, NULL, NULL, 0, NULL)
12393   ;
12394   return 0;
12395 }
12396 _ACEOF
12397 if ac_fn_c_try_link "$LINENO"; then :
12398
12399
12400 $as_echo "#define GETHOSTBYNAMERSTYLE SYSVSTYLE" >>confdefs.h
12401
12402       gethostbynamerstyle=SYSV
12403
12404
12405 fi
12406 rm -f core conftest.err conftest.$ac_objext \
12407     conftest$ac_exeext conftest.$ac_ext
12408 fi
12409
12410 if test "x$gethostbynamerstyle" = "x"; then
12411   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12412 /* end confdefs.h.  */
12413
12414       #include <stdio.h>
12415       #include <netdb.h>
12416
12417 int
12418 main ()
12419 {
12420  gethostbyname(NULL)
12421   ;
12422   return 0;
12423 }
12424 _ACEOF
12425 if ac_fn_c_try_link "$LINENO"; then :
12426
12427
12428 $as_echo "#define GETHOSTBYNAMERSTYLE BSDSTYLE" >>confdefs.h
12429
12430       gethostbynamerstyle=BSD
12431
12432
12433 fi
12434 rm -f core conftest.err conftest.$ac_objext \
12435     conftest$ac_exeext conftest.$ac_ext
12436 fi
12437
12438 if test "x$gethostbynamerstyle" = "x"; then
12439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none!  It must not exist, here." >&5
12440 $as_echo "none!  It must not exist, here." >&6; }
12441 else
12442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${gethostbynamerstyle}-style" >&5
12443 $as_echo "${gethostbynamerstyle}-style" >&6; }
12444 fi
12445
12446 if test "x$gethostbynamerstyle" = "xBSD"; then
12447   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  ****** BSD-style gethostbyname might NOT be thread-safe! ****** " >&5
12448 $as_echo "$as_me: WARNING:  ****** BSD-style gethostbyname might NOT be thread-safe! ****** " >&2;}
12449 fi
12450
12451 if test "x$ac_cv_header_pwd_h" = "xyes"; then
12452   { $as_echo "$as_me:${as_lineno-$LINENO}: checking getpwnam_r" >&5
12453 $as_echo_n "checking getpwnam_r... " >&6; }
12454   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12455 /* end confdefs.h.  */
12456
12457       #include <stdlib.h>
12458       #include <sys/types.h>
12459       #include <pwd.h>
12460
12461 int
12462 main ()
12463 {
12464  getpwnam_r(NULL, NULL, NULL, 0, NULL)
12465   ;
12466   return 0;
12467 }
12468 _ACEOF
12469 if ac_fn_c_try_link "$LINENO"; then :
12470
12471       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12472 $as_echo "yes" >&6; }
12473
12474 $as_echo "#define HAVE_GETPWNAM_R 1" >>confdefs.h
12475
12476
12477 else
12478
12479         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12480 $as_echo "no" >&6; }
12481
12482
12483 fi
12484 rm -f core conftest.err conftest.$ac_objext \
12485     conftest$ac_exeext conftest.$ac_ext
12486 fi
12487
12488 if test "x$ac_cv_header_grp_h" = "xyes"; then
12489   { $as_echo "$as_me:${as_lineno-$LINENO}: checking getgrnam_r" >&5
12490 $as_echo_n "checking getgrnam_r... " >&6; }
12491   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12492 /* end confdefs.h.  */
12493
12494       #include <stdlib.h>
12495       #include <sys/types.h>
12496       #include <grp.h>
12497
12498 int
12499 main ()
12500 {
12501  getgrnam_r(NULL, NULL, NULL, 0, NULL)
12502   ;
12503   return 0;
12504 }
12505 _ACEOF
12506 if ac_fn_c_try_link "$LINENO"; then :
12507
12508       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12509 $as_echo "yes" >&6; }
12510
12511 $as_echo "#define HAVE_GETGRNAM_R 1" >>confdefs.h
12512
12513
12514 else
12515
12516         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12517 $as_echo "no" >&6; }
12518
12519
12520 fi
12521 rm -f core conftest.err conftest.$ac_objext \
12522     conftest$ac_exeext conftest.$ac_ext
12523 fi
12524
12525
12526
12527 $as_echo "#define POSIXSTYLE 1" >>confdefs.h
12528
12529
12530 $as_echo "#define SOLARISSTYLE 2" >>confdefs.h
12531
12532 ctimerstyle=""
12533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ctime_r() syntax" >&5
12534 $as_echo_n "checking ctime_r() syntax... " >&6; }
12535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12536 /* end confdefs.h.  */
12537
12538     #include <time.h>
12539
12540 int
12541 main ()
12542 {
12543  ctime_r(NULL, NULL, 0)
12544   ;
12545   return 0;
12546 }
12547 _ACEOF
12548 if ac_fn_c_try_link "$LINENO"; then :
12549
12550
12551 $as_echo "#define CTIMERSTYLE SOLARISSTYLE" >>confdefs.h
12552
12553     ctimerstyle="SOLARIS"
12554
12555
12556 fi
12557 rm -f core conftest.err conftest.$ac_objext \
12558     conftest$ac_exeext conftest.$ac_ext
12559
12560 if test "x$ctimerstyle" = "x"; then
12561   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12562 /* end confdefs.h.  */
12563
12564       #include <time.h>
12565
12566 int
12567 main ()
12568 {
12569  ctime_r(NULL, NULL)
12570   ;
12571   return 0;
12572 }
12573 _ACEOF
12574 if ac_fn_c_try_link "$LINENO"; then :
12575
12576
12577 $as_echo "#define CTIMERSTYLE POSIXSTYLE" >>confdefs.h
12578
12579       ctimerstyle="POSIX"
12580
12581
12582 fi
12583 rm -f core conftest.err conftest.$ac_objext \
12584     conftest$ac_exeext conftest.$ac_ext
12585 fi
12586
12587 if test "x$ctimerstyle" = "x"; then
12588     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none!  It must not exist, here." >&5
12589 $as_echo "none!  It must not exist, here." >&6; }
12590 else
12591     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ctimerstyle}-style" >&5
12592 $as_echo "${ctimerstyle}-style" >&6; }
12593 fi
12594
12595 HOSTINFO=$host
12596
12597
12598
12599 top_builddir=`pwd`
12600 export top_builddir
12601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: top_builddir=$top_builddir" >&5
12602 $as_echo "top_builddir=$top_builddir" >&6; }
12603
12604
12605
12606
12607 if test "x$EXPERIMENTAL" = "xyes"; then
12608   for foo in `ls -1 "${srcdir}"/src/modules | grep rlm_`; do
12609     MODULES="$MODULES $foo"
12610   done
12611 else
12612             for foo in `cat "${srcdir}"/src/modules/stable`; do
12613       MODULES="$MODULES $foo"
12614    done
12615 fi
12616
12617 mysubdirs=""
12618 for bar in $MODULES; do
12619   if test -f "${srcdir}"/src/modules/$bar/configure; then
12620     mysubdirs="$mysubdirs src/modules/$bar"
12621   fi
12622 done
12623
12624
12625
12626 subdirs="$subdirs $mysubdirs"
12627
12628
12629
12630 if test "x$werror" == "xyes"; then
12631   CFLAGS="-Werror $CFLAGS"
12632 fi
12633
12634 ac_config_commands="$ac_config_commands stamp-h"
12635
12636 ac_config_commands="$ac_config_commands build-radpaths-h"
12637
12638 ac_config_commands="$ac_config_commands main-chmod"
12639
12640 ac_config_commands="$ac_config_commands scripts-chmod"
12641
12642
12643
12644
12645
12646
12647 USE_STATIC_LIBS="yes"
12648
12649
12650
12651
12652   unset ac_cv_env_LIBS_set
12653   unset ac_cv_env_LIBS_value
12654
12655   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"
12656
12657 cat >confcache <<\_ACEOF
12658 # This file is a shell script that caches the results of configure
12659 # tests run on this system so they can be shared between configure
12660 # scripts and configure runs, see configure's option --config-cache.
12661 # It is not useful on other systems.  If it contains results you don't
12662 # want to keep, you may remove or edit it.
12663 #
12664 # config.status only pays attention to the cache file if you give it
12665 # the --recheck option to rerun configure.
12666 #
12667 # `ac_cv_env_foo' variables (set or unset) will be overridden when
12668 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12669 # following values.
12670
12671 _ACEOF
12672
12673 # The following way of writing the cache mishandles newlines in values,
12674 # but we know of no workaround that is simple, portable, and efficient.
12675 # So, we kill variables containing newlines.
12676 # Ultrix sh set writes to stderr and can't be redirected directly,
12677 # and sets the high bit in the cache file unless we assign to the vars.
12678 (
12679   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
12680     eval ac_val=\$$ac_var
12681     case $ac_val in #(
12682     *${as_nl}*)
12683       case $ac_var in #(
12684       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
12685 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
12686       esac
12687       case $ac_var in #(
12688       _ | IFS | as_nl) ;; #(
12689       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
12690       *) { eval $ac_var=; unset $ac_var;} ;;
12691       esac ;;
12692     esac
12693   done
12694
12695   (set) 2>&1 |
12696     case $as_nl`(ac_space=' '; set) 2>&1` in #(
12697     *${as_nl}ac_space=\ *)
12698       # `set' does not quote correctly, so add quotes: double-quote
12699       # substitution turns \\\\ into \\, and sed turns \\ into \.
12700       sed -n \
12701         "s/'/'\\\\''/g;
12702           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12703       ;; #(
12704     *)
12705       # `set' quotes correctly as required by POSIX, so do not add quotes.
12706       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
12707       ;;
12708     esac |
12709     sort
12710 ) |
12711   sed '
12712      /^ac_cv_env_/b end
12713      t clear
12714      :clear
12715      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12716      t end
12717      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12718      :end' >>confcache
12719 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
12720   if test -w "$cache_file"; then
12721     if test "x$cache_file" != "x/dev/null"; then
12722       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
12723 $as_echo "$as_me: updating cache $cache_file" >&6;}
12724       if test ! -f "$cache_file" || test -h "$cache_file"; then
12725         cat confcache >"$cache_file"
12726       else
12727         case $cache_file in #(
12728         */* | ?:*)
12729           mv -f confcache "$cache_file"$$ &&
12730           mv -f "$cache_file"$$ "$cache_file" ;; #(
12731         *)
12732           mv -f confcache "$cache_file" ;;
12733         esac
12734       fi
12735     fi
12736   else
12737     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
12738 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
12739   fi
12740 fi
12741 rm -f confcache
12742
12743 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12744 # Let make expand exec_prefix.
12745 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12746
12747 DEFS=-DHAVE_CONFIG_H
12748
12749 ac_libobjs=
12750 ac_ltlibobjs=
12751 U=
12752 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
12753   # 1. Remove the extension, and $U if already installed.
12754   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
12755   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
12756   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
12757   #    will be set to the directory where LIBOBJS objects are built.
12758   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
12759   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
12760 done
12761 LIBOBJS=$ac_libobjs
12762
12763 LTLIBOBJS=$ac_ltlibobjs
12764
12765
12766
12767
12768 : "${CONFIG_STATUS=./config.status}"
12769 ac_write_fail=0
12770 ac_clean_files_save=$ac_clean_files
12771 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12772 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
12773 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
12774 as_write_fail=0
12775 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
12776 #! $SHELL
12777 # Generated by $as_me.
12778 # Run this file to recreate the current configuration.
12779 # Compiler output produced by configure, useful for debugging
12780 # configure, is in config.log if it exists.
12781
12782 debug=false
12783 ac_cs_recheck=false
12784 ac_cs_silent=false
12785
12786 SHELL=\${CONFIG_SHELL-$SHELL}
12787 export SHELL
12788 _ASEOF
12789 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
12790 ## -------------------- ##
12791 ## M4sh Initialization. ##
12792 ## -------------------- ##
12793
12794 # Be more Bourne compatible
12795 DUALCASE=1; export DUALCASE # for MKS sh
12796 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
12797   emulate sh
12798   NULLCMD=:
12799   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
12800   # is contrary to our usage.  Disable this feature.
12801   alias -g '${1+"$@"}'='"$@"'
12802   setopt NO_GLOB_SUBST
12803 else
12804   case `(set -o) 2>/dev/null` in #(
12805   *posix*) :
12806     set -o posix ;; #(
12807   *) :
12808      ;;
12809 esac
12810 fi
12811
12812
12813 as_nl='
12814 '
12815 export as_nl
12816 # Printing a long string crashes Solaris 7 /usr/bin/printf.
12817 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
12818 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
12819 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
12820 # Prefer a ksh shell builtin over an external printf program on Solaris,
12821 # but without wasting forks for bash or zsh.
12822 if test -z "$BASH_VERSION$ZSH_VERSION" \
12823     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
12824   as_echo='print -r --'
12825   as_echo_n='print -rn --'
12826 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
12827   as_echo='printf %s\n'
12828   as_echo_n='printf %s'
12829 else
12830   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
12831     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
12832     as_echo_n='/usr/ucb/echo -n'
12833   else
12834     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
12835     as_echo_n_body='eval
12836       arg=$1;
12837       case $arg in #(
12838       *"$as_nl"*)
12839         expr "X$arg" : "X\\(.*\\)$as_nl";
12840         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
12841       esac;
12842       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
12843     '
12844     export as_echo_n_body
12845     as_echo_n='sh -c $as_echo_n_body as_echo'
12846   fi
12847   export as_echo_body
12848   as_echo='sh -c $as_echo_body as_echo'
12849 fi
12850
12851 # The user is always right.
12852 if test "${PATH_SEPARATOR+set}" != set; then
12853   PATH_SEPARATOR=:
12854   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
12855     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
12856       PATH_SEPARATOR=';'
12857   }
12858 fi
12859
12860
12861 # IFS
12862 # We need space, tab and new line, in precisely that order.  Quoting is
12863 # there to prevent editors from complaining about space-tab.
12864 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
12865 # splitting by setting IFS to empty value.)
12866 IFS=" ""        $as_nl"
12867
12868 # Find who we are.  Look in the path if we contain no directory separator.
12869 as_myself=
12870 case $0 in #((
12871   *[\\/]* ) as_myself=$0 ;;
12872   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12873 for as_dir in $PATH
12874 do
12875   IFS=$as_save_IFS
12876   test -z "$as_dir" && as_dir=.
12877     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
12878   done
12879 IFS=$as_save_IFS
12880
12881      ;;
12882 esac
12883 # We did not find ourselves, most probably we were run as `sh COMMAND'
12884 # in which case we are not to be found in the path.
12885 if test "x$as_myself" = x; then
12886   as_myself=$0
12887 fi
12888 if test ! -f "$as_myself"; then
12889   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
12890   exit 1
12891 fi
12892
12893 # Unset variables that we do not need and which cause bugs (e.g. in
12894 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
12895 # suppresses any "Segmentation fault" message there.  '((' could
12896 # trigger a bug in pdksh 5.2.14.
12897 for as_var in BASH_ENV ENV MAIL MAILPATH
12898 do eval test x\${$as_var+set} = xset \
12899   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
12900 done
12901 PS1='$ '
12902 PS2='> '
12903 PS4='+ '
12904
12905 # NLS nuisances.
12906 LC_ALL=C
12907 export LC_ALL
12908 LANGUAGE=C
12909 export LANGUAGE
12910
12911 # CDPATH.
12912 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
12913
12914
12915 # as_fn_error STATUS ERROR [LINENO LOG_FD]
12916 # ----------------------------------------
12917 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
12918 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
12919 # script with STATUS, using 1 if that was 0.
12920 as_fn_error ()
12921 {
12922   as_status=$1; test $as_status -eq 0 && as_status=1
12923   if test "$4"; then
12924     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
12925     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
12926   fi
12927   $as_echo "$as_me: error: $2" >&2
12928   as_fn_exit $as_status
12929 } # as_fn_error
12930
12931
12932 # as_fn_set_status STATUS
12933 # -----------------------
12934 # Set $? to STATUS, without forking.
12935 as_fn_set_status ()
12936 {
12937   return $1
12938 } # as_fn_set_status
12939
12940 # as_fn_exit STATUS
12941 # -----------------
12942 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
12943 as_fn_exit ()
12944 {
12945   set +e
12946   as_fn_set_status $1
12947   exit $1
12948 } # as_fn_exit
12949
12950 # as_fn_unset VAR
12951 # ---------------
12952 # Portably unset VAR.
12953 as_fn_unset ()
12954 {
12955   { eval $1=; unset $1;}
12956 }
12957 as_unset=as_fn_unset
12958 # as_fn_append VAR VALUE
12959 # ----------------------
12960 # Append the text in VALUE to the end of the definition contained in VAR. Take
12961 # advantage of any shell optimizations that allow amortized linear growth over
12962 # repeated appends, instead of the typical quadratic growth present in naive
12963 # implementations.
12964 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
12965   eval 'as_fn_append ()
12966   {
12967     eval $1+=\$2
12968   }'
12969 else
12970   as_fn_append ()
12971   {
12972     eval $1=\$$1\$2
12973   }
12974 fi # as_fn_append
12975
12976 # as_fn_arith ARG...
12977 # ------------------
12978 # Perform arithmetic evaluation on the ARGs, and store the result in the
12979 # global $as_val. Take advantage of shells that can avoid forks. The arguments
12980 # must be portable across $(()) and expr.
12981 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
12982   eval 'as_fn_arith ()
12983   {
12984     as_val=$(( $* ))
12985   }'
12986 else
12987   as_fn_arith ()
12988   {
12989     as_val=`expr "$@" || test $? -eq 1`
12990   }
12991 fi # as_fn_arith
12992
12993
12994 if expr a : '\(a\)' >/dev/null 2>&1 &&
12995    test "X`expr 00001 : '.*\(...\)'`" = X001; then
12996   as_expr=expr
12997 else
12998   as_expr=false
12999 fi
13000
13001 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13002   as_basename=basename
13003 else
13004   as_basename=false
13005 fi
13006
13007 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13008   as_dirname=dirname
13009 else
13010   as_dirname=false
13011 fi
13012
13013 as_me=`$as_basename -- "$0" ||
13014 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13015          X"$0" : 'X\(//\)$' \| \
13016          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
13017 $as_echo X/"$0" |
13018     sed '/^.*\/\([^/][^/]*\)\/*$/{
13019             s//\1/
13020             q
13021           }
13022           /^X\/\(\/\/\)$/{
13023             s//\1/
13024             q
13025           }
13026           /^X\/\(\/\).*/{
13027             s//\1/
13028             q
13029           }
13030           s/.*/./; q'`
13031
13032 # Avoid depending upon Character Ranges.
13033 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13034 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13035 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13036 as_cr_digits='0123456789'
13037 as_cr_alnum=$as_cr_Letters$as_cr_digits
13038
13039 ECHO_C= ECHO_N= ECHO_T=
13040 case `echo -n x` in #(((((
13041 -n*)
13042   case `echo 'xy\c'` in
13043   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
13044   xy)  ECHO_C='\c';;
13045   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
13046        ECHO_T=' ';;
13047   esac;;
13048 *)
13049   ECHO_N='-n';;
13050 esac
13051
13052 rm -f conf$$ conf$$.exe conf$$.file
13053 if test -d conf$$.dir; then
13054   rm -f conf$$.dir/conf$$.file
13055 else
13056   rm -f conf$$.dir
13057   mkdir conf$$.dir 2>/dev/null
13058 fi
13059 if (echo >conf$$.file) 2>/dev/null; then
13060   if ln -s conf$$.file conf$$ 2>/dev/null; then
13061     as_ln_s='ln -s'
13062     # ... but there are two gotchas:
13063     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13064     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13065     # In both cases, we have to default to `cp -pR'.
13066     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13067       as_ln_s='cp -pR'
13068   elif ln conf$$.file conf$$ 2>/dev/null; then
13069     as_ln_s=ln
13070   else
13071     as_ln_s='cp -pR'
13072   fi
13073 else
13074   as_ln_s='cp -pR'
13075 fi
13076 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13077 rmdir conf$$.dir 2>/dev/null
13078
13079
13080 # as_fn_mkdir_p
13081 # -------------
13082 # Create "$as_dir" as a directory, including parents if necessary.
13083 as_fn_mkdir_p ()
13084 {
13085
13086   case $as_dir in #(
13087   -*) as_dir=./$as_dir;;
13088   esac
13089   test -d "$as_dir" || eval $as_mkdir_p || {
13090     as_dirs=
13091     while :; do
13092       case $as_dir in #(
13093       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13094       *) as_qdir=$as_dir;;
13095       esac
13096       as_dirs="'$as_qdir' $as_dirs"
13097       as_dir=`$as_dirname -- "$as_dir" ||
13098 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13099          X"$as_dir" : 'X\(//\)[^/]' \| \
13100          X"$as_dir" : 'X\(//\)$' \| \
13101          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13102 $as_echo X"$as_dir" |
13103     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13104             s//\1/
13105             q
13106           }
13107           /^X\(\/\/\)[^/].*/{
13108             s//\1/
13109             q
13110           }
13111           /^X\(\/\/\)$/{
13112             s//\1/
13113             q
13114           }
13115           /^X\(\/\).*/{
13116             s//\1/
13117             q
13118           }
13119           s/.*/./; q'`
13120       test -d "$as_dir" && break
13121     done
13122     test -z "$as_dirs" || eval "mkdir $as_dirs"
13123   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
13124
13125
13126 } # as_fn_mkdir_p
13127 if mkdir -p . 2>/dev/null; then
13128   as_mkdir_p='mkdir -p "$as_dir"'
13129 else
13130   test -d ./-p && rmdir ./-p
13131   as_mkdir_p=false
13132 fi
13133
13134
13135 # as_fn_executable_p FILE
13136 # -----------------------
13137 # Test if FILE is an executable regular file.
13138 as_fn_executable_p ()
13139 {
13140   test -f "$1" && test -x "$1"
13141 } # as_fn_executable_p
13142 as_test_x='test -x'
13143 as_executable_p=as_fn_executable_p
13144
13145 # Sed expression to map a string onto a valid CPP name.
13146 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
13147
13148 # Sed expression to map a string onto a valid variable name.
13149 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
13150
13151
13152 exec 6>&1
13153 ## ----------------------------------- ##
13154 ## Main body of $CONFIG_STATUS script. ##
13155 ## ----------------------------------- ##
13156 _ASEOF
13157 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
13158
13159 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13160 # Save the log message, to keep $0 and so on meaningful, and to
13161 # report actual input values of CONFIG_FILES etc. instead of their
13162 # values after options handling.
13163 ac_log="
13164 This file was extended by freeradius $as_me $Id$, which was
13165 generated by GNU Autoconf 2.69.  Invocation command line was
13166
13167   CONFIG_FILES    = $CONFIG_FILES
13168   CONFIG_HEADERS  = $CONFIG_HEADERS
13169   CONFIG_LINKS    = $CONFIG_LINKS
13170   CONFIG_COMMANDS = $CONFIG_COMMANDS
13171   $ $0 $@
13172
13173 on `(hostname || uname -n) 2>/dev/null | sed 1q`
13174 "
13175
13176 _ACEOF
13177
13178 case $ac_config_files in *"
13179 "*) set x $ac_config_files; shift; ac_config_files=$*;;
13180 esac
13181
13182 case $ac_config_headers in *"
13183 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
13184 esac
13185
13186
13187 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13188 # Files that config.status was made for.
13189 config_files="$ac_config_files"
13190 config_headers="$ac_config_headers"
13191 config_commands="$ac_config_commands"
13192
13193 _ACEOF
13194
13195 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13196 ac_cs_usage="\
13197 \`$as_me' instantiates files and other configuration actions
13198 from templates according to the current configuration.  Unless the files
13199 and actions are specified as TAGs, all are instantiated by default.
13200
13201 Usage: $0 [OPTION]... [TAG]...
13202
13203   -h, --help       print this help, then exit
13204   -V, --version    print version number and configuration settings, then exit
13205       --config     print configuration, then exit
13206   -q, --quiet, --silent
13207                    do not print progress messages
13208   -d, --debug      don't remove temporary files
13209       --recheck    update $as_me by reconfiguring in the same conditions
13210       --file=FILE[:TEMPLATE]
13211                    instantiate the configuration file FILE
13212       --header=FILE[:TEMPLATE]
13213                    instantiate the configuration header FILE
13214
13215 Configuration files:
13216 $config_files
13217
13218 Configuration headers:
13219 $config_headers
13220
13221 Configuration commands:
13222 $config_commands
13223
13224 Report bugs to <http://bugs.freeradius.org>.
13225 freeradius home page: <http://www.freeradius.org>."
13226
13227 _ACEOF
13228 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13229 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
13230 ac_cs_version="\\
13231 freeradius config.status $Id$
13232 configured by $0, generated by GNU Autoconf 2.69,
13233   with options \\"\$ac_cs_config\\"
13234
13235 Copyright (C) 2012 Free Software Foundation, Inc.
13236 This config.status script is free software; the Free Software Foundation
13237 gives unlimited permission to copy, distribute and modify it."
13238
13239 ac_pwd='$ac_pwd'
13240 srcdir='$srcdir'
13241 test -n "\$AWK" || AWK=awk
13242 _ACEOF
13243
13244 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13245 # The default lists apply if the user does not specify any file.
13246 ac_need_defaults=:
13247 while test $# != 0
13248 do
13249   case $1 in
13250   --*=?*)
13251     ac_option=`expr "X$1" : 'X\([^=]*\)='`
13252     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
13253     ac_shift=:
13254     ;;
13255   --*=)
13256     ac_option=`expr "X$1" : 'X\([^=]*\)='`
13257     ac_optarg=
13258     ac_shift=:
13259     ;;
13260   *)
13261     ac_option=$1
13262     ac_optarg=$2
13263     ac_shift=shift
13264     ;;
13265   esac
13266
13267   case $ac_option in
13268   # Handling of the options.
13269   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13270     ac_cs_recheck=: ;;
13271   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
13272     $as_echo "$ac_cs_version"; exit ;;
13273   --config | --confi | --conf | --con | --co | --c )
13274     $as_echo "$ac_cs_config"; exit ;;
13275   --debug | --debu | --deb | --de | --d | -d )
13276     debug=: ;;
13277   --file | --fil | --fi | --f )
13278     $ac_shift
13279     case $ac_optarg in
13280     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
13281     '') as_fn_error $? "missing file argument" ;;
13282     esac
13283     as_fn_append CONFIG_FILES " '$ac_optarg'"
13284     ac_need_defaults=false;;
13285   --header | --heade | --head | --hea )
13286     $ac_shift
13287     case $ac_optarg in
13288     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
13289     esac
13290     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
13291     ac_need_defaults=false;;
13292   --he | --h)
13293     # Conflict between --help and --header
13294     as_fn_error $? "ambiguous option: \`$1'
13295 Try \`$0 --help' for more information.";;
13296   --help | --hel | -h )
13297     $as_echo "$ac_cs_usage"; exit ;;
13298   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
13299   | -silent | --silent | --silen | --sile | --sil | --si | --s)
13300     ac_cs_silent=: ;;
13301
13302   # This is an error.
13303   -*) as_fn_error $? "unrecognized option: \`$1'
13304 Try \`$0 --help' for more information." ;;
13305
13306   *) as_fn_append ac_config_targets " $1"
13307      ac_need_defaults=false ;;
13308
13309   esac
13310   shift
13311 done
13312
13313 ac_configure_extra_args=
13314
13315 if $ac_cs_silent; then
13316   exec 6>/dev/null
13317   ac_configure_extra_args="$ac_configure_extra_args --silent"
13318 fi
13319
13320 _ACEOF
13321 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13322 if \$ac_cs_recheck; then
13323   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
13324   shift
13325   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
13326   CONFIG_SHELL='$SHELL'
13327   export CONFIG_SHELL
13328   exec "\$@"
13329 fi
13330
13331 _ACEOF
13332 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13333 exec 5>>config.log
13334 {
13335   echo
13336   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
13337 ## Running $as_me. ##
13338 _ASBOX
13339   $as_echo "$ac_log"
13340 } >&5
13341
13342 _ACEOF
13343 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13344 _ACEOF
13345
13346 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13347
13348 # Handling of arguments.
13349 for ac_config_target in $ac_config_targets
13350 do
13351   case $ac_config_target in
13352     "src/include/autoconf.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/autoconf.h" ;;
13353     "stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;;
13354     "build-radpaths-h") CONFIG_COMMANDS="$CONFIG_COMMANDS build-radpaths-h" ;;
13355     "main-chmod") CONFIG_COMMANDS="$CONFIG_COMMANDS main-chmod" ;;
13356     "scripts-chmod") CONFIG_COMMANDS="$CONFIG_COMMANDS scripts-chmod" ;;
13357     "./Make.inc") CONFIG_FILES="$CONFIG_FILES ./Make.inc" ;;
13358     "./src/include/build-radpaths-h") CONFIG_FILES="$CONFIG_FILES ./src/include/build-radpaths-h" ;;
13359     "./src/main/radsniff.mk") CONFIG_FILES="$CONFIG_FILES ./src/main/radsniff.mk" ;;
13360     "./src/main/checkrad") CONFIG_FILES="$CONFIG_FILES ./src/main/checkrad" ;;
13361     "./src/main/radlast") CONFIG_FILES="$CONFIG_FILES ./src/main/radlast" ;;
13362     "./src/main/radtest") CONFIG_FILES="$CONFIG_FILES ./src/main/radtest" ;;
13363     "./scripts/rc.radiusd") CONFIG_FILES="$CONFIG_FILES ./scripts/rc.radiusd" ;;
13364     "./scripts/cron/radiusd.cron.daily") CONFIG_FILES="$CONFIG_FILES ./scripts/cron/radiusd.cron.daily" ;;
13365     "./scripts/cron/radiusd.cron.monthly") CONFIG_FILES="$CONFIG_FILES ./scripts/cron/radiusd.cron.monthly" ;;
13366     "./scripts/cryptpasswd") CONFIG_FILES="$CONFIG_FILES ./scripts/cryptpasswd" ;;
13367     "./raddb/radrelay.conf") CONFIG_FILES="$CONFIG_FILES ./raddb/radrelay.conf" ;;
13368     "./raddb/radiusd.conf") CONFIG_FILES="$CONFIG_FILES ./raddb/radiusd.conf" ;;
13369
13370   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
13371   esac
13372 done
13373
13374
13375 # If the user did not use the arguments to specify the items to instantiate,
13376 # then the envvar interface is used.  Set only those that are not.
13377 # We use the long form for the default assignment because of an extremely
13378 # bizarre bug on SunOS 4.1.3.
13379 if $ac_need_defaults; then
13380   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
13381   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
13382   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
13383 fi
13384
13385 # Have a temporary directory for convenience.  Make it in the build tree
13386 # simply because there is no reason against having it here, and in addition,
13387 # creating and moving files from /tmp can sometimes cause problems.
13388 # Hook for its removal unless debugging.
13389 # Note that there is a small window in which the directory will not be cleaned:
13390 # after its creation but before its name has been assigned to `$tmp'.
13391 $debug ||
13392 {
13393   tmp= ac_tmp=
13394   trap 'exit_status=$?
13395   : "${ac_tmp:=$tmp}"
13396   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
13397 ' 0
13398   trap 'as_fn_exit 1' 1 2 13 15
13399 }
13400 # Create a (secure) tmp directory for tmp files.
13401
13402 {
13403   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
13404   test -d "$tmp"
13405 }  ||
13406 {
13407   tmp=./conf$$-$RANDOM
13408   (umask 077 && mkdir "$tmp")
13409 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
13410 ac_tmp=$tmp
13411
13412 # Set up the scripts for CONFIG_FILES section.
13413 # No need to generate them if there are no CONFIG_FILES.
13414 # This happens for instance with `./config.status config.h'.
13415 if test -n "$CONFIG_FILES"; then
13416
13417
13418 ac_cr=`echo X | tr X '\015'`
13419 # On cygwin, bash can eat \r inside `` if the user requested igncr.
13420 # But we know of no other shell where ac_cr would be empty at this
13421 # point, so we can use a bashism as a fallback.
13422 if test "x$ac_cr" = x; then
13423   eval ac_cr=\$\'\\r\'
13424 fi
13425 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
13426 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
13427   ac_cs_awk_cr='\\r'
13428 else
13429   ac_cs_awk_cr=$ac_cr
13430 fi
13431
13432 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
13433 _ACEOF
13434
13435
13436 {
13437   echo "cat >conf$$subs.awk <<_ACEOF" &&
13438   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
13439   echo "_ACEOF"
13440 } >conf$$subs.sh ||
13441   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13442 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
13443 ac_delim='%!_!# '
13444 for ac_last_try in false false false false false :; do
13445   . ./conf$$subs.sh ||
13446     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13447
13448   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
13449   if test $ac_delim_n = $ac_delim_num; then
13450     break
13451   elif $ac_last_try; then
13452     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13453   else
13454     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
13455   fi
13456 done
13457 rm -f conf$$subs.sh
13458
13459 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13460 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
13461 _ACEOF
13462 sed -n '
13463 h
13464 s/^/S["/; s/!.*/"]=/
13465 p
13466 g
13467 s/^[^!]*!//
13468 :repl
13469 t repl
13470 s/'"$ac_delim"'$//
13471 t delim
13472 :nl
13473 h
13474 s/\(.\{148\}\)..*/\1/
13475 t more1
13476 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
13477 p
13478 n
13479 b repl
13480 :more1
13481 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
13482 p
13483 g
13484 s/.\{148\}//
13485 t nl
13486 :delim
13487 h
13488 s/\(.\{148\}\)..*/\1/
13489 t more2
13490 s/["\\]/\\&/g; s/^/"/; s/$/"/
13491 p
13492 b
13493 :more2
13494 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
13495 p
13496 g
13497 s/.\{148\}//
13498 t delim
13499 ' <conf$$subs.awk | sed '
13500 /^[^""]/{
13501   N
13502   s/\n//
13503 }
13504 ' >>$CONFIG_STATUS || ac_write_fail=1
13505 rm -f conf$$subs.awk
13506 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13507 _ACAWK
13508 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
13509   for (key in S) S_is_set[key] = 1
13510   FS = "\a"
13511
13512 }
13513 {
13514   line = $ 0
13515   nfields = split(line, field, "@")
13516   substed = 0
13517   len = length(field[1])
13518   for (i = 2; i < nfields; i++) {
13519     key = field[i]
13520     keylen = length(key)
13521     if (S_is_set[key]) {
13522       value = S[key]
13523       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
13524       len += length(value) + length(field[++i])
13525       substed = 1
13526     } else
13527       len += 1 + keylen
13528   }
13529
13530   print line
13531 }
13532
13533 _ACAWK
13534 _ACEOF
13535 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13536 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
13537   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
13538 else
13539   cat
13540 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
13541   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
13542 _ACEOF
13543
13544 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
13545 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
13546 # trailing colons and then remove the whole line if VPATH becomes empty
13547 # (actually we leave an empty line to preserve line numbers).
13548 if test "x$srcdir" = x.; then
13549   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
13550 h
13551 s///
13552 s/^/:/
13553 s/[      ]*$/:/
13554 s/:\$(srcdir):/:/g
13555 s/:\${srcdir}:/:/g
13556 s/:@srcdir@:/:/g
13557 s/^:*//
13558 s/:*$//
13559 x
13560 s/\(=[   ]*\).*/\1/
13561 G
13562 s/\n//
13563 s/^[^=]*=[       ]*$//
13564 }'
13565 fi
13566
13567 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13568 fi # test -n "$CONFIG_FILES"
13569
13570 # Set up the scripts for CONFIG_HEADERS section.
13571 # No need to generate them if there are no CONFIG_HEADERS.
13572 # This happens for instance with `./config.status Makefile'.
13573 if test -n "$CONFIG_HEADERS"; then
13574 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
13575 BEGIN {
13576 _ACEOF
13577
13578 # Transform confdefs.h into an awk script `defines.awk', embedded as
13579 # here-document in config.status, that substitutes the proper values into
13580 # config.h.in to produce config.h.
13581
13582 # Create a delimiter string that does not exist in confdefs.h, to ease
13583 # handling of long lines.
13584 ac_delim='%!_!# '
13585 for ac_last_try in false false :; do
13586   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
13587   if test -z "$ac_tt"; then
13588     break
13589   elif $ac_last_try; then
13590     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
13591   else
13592     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
13593   fi
13594 done
13595
13596 # For the awk script, D is an array of macro values keyed by name,
13597 # likewise P contains macro parameters if any.  Preserve backslash
13598 # newline sequences.
13599
13600 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
13601 sed -n '
13602 s/.\{148\}/&'"$ac_delim"'/g
13603 t rset
13604 :rset
13605 s/^[     ]*#[    ]*define[       ][      ]*/ /
13606 t def
13607 d
13608 :def
13609 s/\\$//
13610 t bsnl
13611 s/["\\]/\\&/g
13612 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
13613 D["\1"]=" \3"/p
13614 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
13615 d
13616 :bsnl
13617 s/["\\]/\\&/g
13618 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
13619 D["\1"]=" \3\\\\\\n"\\/p
13620 t cont
13621 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
13622 t cont
13623 d
13624 :cont
13625 n
13626 s/.\{148\}/&'"$ac_delim"'/g
13627 t clear
13628 :clear
13629 s/\\$//
13630 t bsnlc
13631 s/["\\]/\\&/g; s/^/"/; s/$/"/p
13632 d
13633 :bsnlc
13634 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
13635 b cont
13636 ' <confdefs.h | sed '
13637 s/'"$ac_delim"'/"\\\
13638 "/g' >>$CONFIG_STATUS || ac_write_fail=1
13639
13640 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13641   for (key in D) D_is_set[key] = 1
13642   FS = "\a"
13643 }
13644 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
13645   line = \$ 0
13646   split(line, arg, " ")
13647   if (arg[1] == "#") {
13648     defundef = arg[2]
13649     mac1 = arg[3]
13650   } else {
13651     defundef = substr(arg[1], 2)
13652     mac1 = arg[2]
13653   }
13654   split(mac1, mac2, "(") #)
13655   macro = mac2[1]
13656   prefix = substr(line, 1, index(line, defundef) - 1)
13657   if (D_is_set[macro]) {
13658     # Preserve the white space surrounding the "#".
13659     print prefix "define", macro P[macro] D[macro]
13660     next
13661   } else {
13662     # Replace #undef with comments.  This is necessary, for example,
13663     # in the case of _POSIX_SOURCE, which is predefined and required
13664     # on some systems where configure will not decide to define it.
13665     if (defundef == "undef") {
13666       print "/*", prefix defundef, macro, "*/"
13667       next
13668     }
13669   }
13670 }
13671 { print }
13672 _ACAWK
13673 _ACEOF
13674 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13675   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
13676 fi # test -n "$CONFIG_HEADERS"
13677
13678
13679 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
13680 shift
13681 for ac_tag
13682 do
13683   case $ac_tag in
13684   :[FHLC]) ac_mode=$ac_tag; continue;;
13685   esac
13686   case $ac_mode$ac_tag in
13687   :[FHL]*:*);;
13688   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
13689   :[FH]-) ac_tag=-:-;;
13690   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
13691   esac
13692   ac_save_IFS=$IFS
13693   IFS=:
13694   set x $ac_tag
13695   IFS=$ac_save_IFS
13696   shift
13697   ac_file=$1
13698   shift
13699
13700   case $ac_mode in
13701   :L) ac_source=$1;;
13702   :[FH])
13703     ac_file_inputs=
13704     for ac_f
13705     do
13706       case $ac_f in
13707       -) ac_f="$ac_tmp/stdin";;
13708       *) # Look for the file first in the build tree, then in the source tree
13709          # (if the path is not absolute).  The absolute path cannot be DOS-style,
13710          # because $ac_f cannot contain `:'.
13711          test -f "$ac_f" ||
13712            case $ac_f in
13713            [\\/$]*) false;;
13714            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
13715            esac ||
13716            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
13717       esac
13718       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
13719       as_fn_append ac_file_inputs " '$ac_f'"
13720     done
13721
13722     # Let's still pretend it is `configure' which instantiates (i.e., don't
13723     # use $as_me), people would be surprised to read:
13724     #    /* config.h.  Generated by config.status.  */
13725     configure_input='Generated from '`
13726           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
13727         `' by configure.'
13728     if test x"$ac_file" != x-; then
13729       configure_input="$ac_file.  $configure_input"
13730       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
13731 $as_echo "$as_me: creating $ac_file" >&6;}
13732     fi
13733     # Neutralize special characters interpreted by sed in replacement strings.
13734     case $configure_input in #(
13735     *\&* | *\|* | *\\* )
13736        ac_sed_conf_input=`$as_echo "$configure_input" |
13737        sed 's/[\\\\&|]/\\\\&/g'`;; #(
13738     *) ac_sed_conf_input=$configure_input;;
13739     esac
13740
13741     case $ac_tag in
13742     *:-:* | *:-) cat >"$ac_tmp/stdin" \
13743       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
13744     esac
13745     ;;
13746   esac
13747
13748   ac_dir=`$as_dirname -- "$ac_file" ||
13749 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13750          X"$ac_file" : 'X\(//\)[^/]' \| \
13751          X"$ac_file" : 'X\(//\)$' \| \
13752          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
13753 $as_echo X"$ac_file" |
13754     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13755             s//\1/
13756             q
13757           }
13758           /^X\(\/\/\)[^/].*/{
13759             s//\1/
13760             q
13761           }
13762           /^X\(\/\/\)$/{
13763             s//\1/
13764             q
13765           }
13766           /^X\(\/\).*/{
13767             s//\1/
13768             q
13769           }
13770           s/.*/./; q'`
13771   as_dir="$ac_dir"; as_fn_mkdir_p
13772   ac_builddir=.
13773
13774 case "$ac_dir" in
13775 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
13776 *)
13777   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
13778   # A ".." for each directory in $ac_dir_suffix.
13779   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
13780   case $ac_top_builddir_sub in
13781   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
13782   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
13783   esac ;;
13784 esac
13785 ac_abs_top_builddir=$ac_pwd
13786 ac_abs_builddir=$ac_pwd$ac_dir_suffix
13787 # for backward compatibility:
13788 ac_top_builddir=$ac_top_build_prefix
13789
13790 case $srcdir in
13791   .)  # We are building in place.
13792     ac_srcdir=.
13793     ac_top_srcdir=$ac_top_builddir_sub
13794     ac_abs_top_srcdir=$ac_pwd ;;
13795   [\\/]* | ?:[\\/]* )  # Absolute name.
13796     ac_srcdir=$srcdir$ac_dir_suffix;
13797     ac_top_srcdir=$srcdir
13798     ac_abs_top_srcdir=$srcdir ;;
13799   *) # Relative name.
13800     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
13801     ac_top_srcdir=$ac_top_build_prefix$srcdir
13802     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
13803 esac
13804 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
13805
13806
13807   case $ac_mode in
13808   :F)
13809   #
13810   # CONFIG_FILE
13811   #
13812
13813 _ACEOF
13814
13815 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13816 # If the template does not know about datarootdir, expand it.
13817 # FIXME: This hack should be removed a few years after 2.60.
13818 ac_datarootdir_hack=; ac_datarootdir_seen=
13819 ac_sed_dataroot='
13820 /datarootdir/ {
13821   p
13822   q
13823 }
13824 /@datadir@/p
13825 /@docdir@/p
13826 /@infodir@/p
13827 /@localedir@/p
13828 /@mandir@/p'
13829 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
13830 *datarootdir*) ac_datarootdir_seen=yes;;
13831 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
13832   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
13833 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
13834 _ACEOF
13835 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13836   ac_datarootdir_hack='
13837   s&@datadir@&$datadir&g
13838   s&@docdir@&$docdir&g
13839   s&@infodir@&$infodir&g
13840   s&@localedir@&$localedir&g
13841   s&@mandir@&$mandir&g
13842   s&\\\${datarootdir}&$datarootdir&g' ;;
13843 esac
13844 _ACEOF
13845
13846 # Neutralize VPATH when `$srcdir' = `.'.
13847 # Shell code in configure.ac might set extrasub.
13848 # FIXME: do we really want to maintain this feature?
13849 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13850 ac_sed_extra="$ac_vpsub
13851 $extrasub
13852 _ACEOF
13853 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13854 :t
13855 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13856 s|@configure_input@|$ac_sed_conf_input|;t t
13857 s&@top_builddir@&$ac_top_builddir_sub&;t t
13858 s&@top_build_prefix@&$ac_top_build_prefix&;t t
13859 s&@srcdir@&$ac_srcdir&;t t
13860 s&@abs_srcdir@&$ac_abs_srcdir&;t t
13861 s&@top_srcdir@&$ac_top_srcdir&;t t
13862 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
13863 s&@builddir@&$ac_builddir&;t t
13864 s&@abs_builddir@&$ac_abs_builddir&;t t
13865 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
13866 $ac_datarootdir_hack
13867 "
13868 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
13869   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13870
13871 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
13872   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
13873   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
13874       "$ac_tmp/out"`; test -z "$ac_out"; } &&
13875   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13876 which seems to be undefined.  Please make sure it is defined" >&5
13877 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13878 which seems to be undefined.  Please make sure it is defined" >&2;}
13879
13880   rm -f "$ac_tmp/stdin"
13881   case $ac_file in
13882   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
13883   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
13884   esac \
13885   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13886  ;;
13887   :H)
13888   #
13889   # CONFIG_HEADER
13890   #
13891   if test x"$ac_file" != x-; then
13892     {
13893       $as_echo "/* $configure_input  */" \
13894       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
13895     } >"$ac_tmp/config.h" \
13896       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13897     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
13898       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
13899 $as_echo "$as_me: $ac_file is unchanged" >&6;}
13900     else
13901       rm -f "$ac_file"
13902       mv "$ac_tmp/config.h" "$ac_file" \
13903         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13904     fi
13905   else
13906     $as_echo "/* $configure_input  */" \
13907       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
13908       || as_fn_error $? "could not create -" "$LINENO" 5
13909   fi
13910  ;;
13911
13912   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
13913 $as_echo "$as_me: executing $ac_file commands" >&6;}
13914  ;;
13915   esac
13916
13917
13918   case $ac_file$ac_mode in
13919     "stamp-h":C) echo timestamp > src/include/stamp-h ;;
13920     "build-radpaths-h":C) (cd ./src/include && /bin/sh ./build-radpaths-h) ;;
13921     "main-chmod":C) (cd ./src/main && chmod +x checkrad radlast radtest) ;;
13922     "scripts-chmod":C) (cd ./scripts && chmod +x rc.radiusd cron/radiusd.cron.daily cron/radiusd.cron.monthly cryptpasswd) ;;
13923
13924   esac
13925 done # for ac_tag
13926
13927
13928 as_fn_exit 0
13929 _ACEOF
13930 ac_clean_files=$ac_clean_files_save
13931
13932 test $ac_write_fail = 0 ||
13933   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
13934
13935
13936 # configure is writing to config.log, and then calls config.status.
13937 # config.status does its own redirection, appending to config.log.
13938 # Unfortunately, on DOS this fails, as config.log is still kept open
13939 # by configure, so config.status won't be able to write to it; its
13940 # output is simply discarded.  So we exec the FD to /dev/null,
13941 # effectively closing config.log, so it can be properly (re)opened and
13942 # appended to by config.status.  When coming back to configure, we
13943 # need to make the FD available again.
13944 if test "$no_create" != yes; then
13945   ac_cs_success=:
13946   ac_config_status_args=
13947   test "$silent" = yes &&
13948     ac_config_status_args="$ac_config_status_args --quiet"
13949   exec 5>/dev/null
13950   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
13951   exec 5>>config.log
13952   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13953   # would make configure fail if this is the last instruction.
13954   $ac_cs_success || as_fn_exit 1
13955 fi
13956
13957 #
13958 # CONFIG_SUBDIRS section.
13959 #
13960 if test "$no_recursion" != yes; then
13961
13962   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
13963   # so they do not pile up.
13964   ac_sub_configure_args=
13965   ac_prev=
13966   eval "set x $ac_configure_args"
13967   shift
13968   for ac_arg
13969   do
13970     if test -n "$ac_prev"; then
13971       ac_prev=
13972       continue
13973     fi
13974     case $ac_arg in
13975     -cache-file | --cache-file | --cache-fil | --cache-fi \
13976     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
13977       ac_prev=cache_file ;;
13978     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
13979     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
13980     | --c=*)
13981       ;;
13982     --config-cache | -C)
13983       ;;
13984     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
13985       ac_prev=srcdir ;;
13986     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
13987       ;;
13988     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
13989       ac_prev=prefix ;;
13990     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
13991       ;;
13992     --disable-option-checking)
13993       ;;
13994     *)
13995       case $ac_arg in
13996       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
13997       esac
13998       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
13999     esac
14000   done
14001
14002   # Always prepend --prefix to ensure using the same prefix
14003   # in subdir configurations.
14004   ac_arg="--prefix=$prefix"
14005   case $ac_arg in
14006   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
14007   esac
14008   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
14009
14010   # Pass --silent
14011   if test "$silent" = yes; then
14012     ac_sub_configure_args="--silent $ac_sub_configure_args"
14013   fi
14014
14015   # Always prepend --disable-option-checking to silence warnings, since
14016   # different subdirs can have different --enable and --with options.
14017   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
14018
14019   ac_popdir=`pwd`
14020   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
14021
14022     # Do not complain, so a configure script can configure whichever
14023     # parts of a large source tree are present.
14024     test -d "$srcdir/$ac_dir" || continue
14025
14026     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
14027     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
14028     $as_echo "$ac_msg" >&6
14029     as_dir="$ac_dir"; as_fn_mkdir_p
14030     ac_builddir=.
14031
14032 case "$ac_dir" in
14033 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14034 *)
14035   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14036   # A ".." for each directory in $ac_dir_suffix.
14037   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14038   case $ac_top_builddir_sub in
14039   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14040   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14041   esac ;;
14042 esac
14043 ac_abs_top_builddir=$ac_pwd
14044 ac_abs_builddir=$ac_pwd$ac_dir_suffix
14045 # for backward compatibility:
14046 ac_top_builddir=$ac_top_build_prefix
14047
14048 case $srcdir in
14049   .)  # We are building in place.
14050     ac_srcdir=.
14051     ac_top_srcdir=$ac_top_builddir_sub
14052     ac_abs_top_srcdir=$ac_pwd ;;
14053   [\\/]* | ?:[\\/]* )  # Absolute name.
14054     ac_srcdir=$srcdir$ac_dir_suffix;
14055     ac_top_srcdir=$srcdir
14056     ac_abs_top_srcdir=$srcdir ;;
14057   *) # Relative name.
14058     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14059     ac_top_srcdir=$ac_top_build_prefix$srcdir
14060     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
14061 esac
14062 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
14063
14064
14065     cd "$ac_dir"
14066
14067     # Check for guested configure; otherwise get Cygnus style configure.
14068     if test -f "$ac_srcdir/configure.gnu"; then
14069       ac_sub_configure=$ac_srcdir/configure.gnu
14070     elif test -f "$ac_srcdir/configure"; then
14071       ac_sub_configure=$ac_srcdir/configure
14072     elif test -f "$ac_srcdir/configure.in"; then
14073       # This should be Cygnus configure.
14074       ac_sub_configure=$ac_aux_dir/configure
14075     else
14076       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
14077 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
14078       ac_sub_configure=
14079     fi
14080
14081     # The recursion is here.
14082     if test -n "$ac_sub_configure"; then
14083       # Make the cache file name correct relative to the subdirectory.
14084       case $cache_file in
14085       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
14086       *) # Relative name.
14087         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
14088       esac
14089
14090       { $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
14091 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
14092       # The eval makes quoting arguments work.
14093       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
14094            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
14095         as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
14096     fi
14097
14098     cd "$ac_popdir"
14099   done
14100 fi
14101 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14102   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14103 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
14104 fi
14105
14106