Fix changelog syntax
[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 WITH_DHCP
658 modconfdir
659 dictdir
660 raddbdir
661 radacctdir
662 logdir
663 GIT
664 FR_MAKEFLAGS
665 MAKE
666 GMAKE
667 clang_path
668 RANLIB
669 EGREP
670 GREP
671 CPP
672 ac_ct_CXX
673 CXXFLAGS
674 CXX
675 OBJEXT
676 EXEEXT
677 ac_ct_CC
678 CPPFLAGS
679 LDFLAGS
680 CFLAGS
681 CC
682 target_os
683 target_vendor
684 target_cpu
685 target
686 host_os
687 host_vendor
688 host_cpu
689 host
690 build_os
691 build_vendor
692 build_cpu
693 build
694 RADIUSD_VERSION_STRING
695 target_alias
696 host_alias
697 build_alias
698 LIBS
699 ECHO_T
700 ECHO_N
701 ECHO_C
702 DEFS
703 mandir
704 localedir
705 libdir
706 psdir
707 pdfdir
708 dvidir
709 htmldir
710 infodir
711 docdir
712 oldincludedir
713 includedir
714 localstatedir
715 sharedstatedir
716 sysconfdir
717 datadir
718 datarootdir
719 libexecdir
720 sbindir
721 bindir
722 program_transform_name
723 prefix
724 exec_prefix
725 PACKAGE_URL
726 PACKAGE_BUGREPORT
727 PACKAGE_STRING
728 PACKAGE_VERSION
729 PACKAGE_TARNAME
730 PACKAGE_NAME
731 PATH_SEPARATOR
732 SHELL'
733 ac_subst_files=''
734 ac_user_opts='
735 enable_option_checking
736 enable_developer
737 enable_largefile
738 enable_strict_dependencies
739 enable_werror
740 with_docdir
741 with_logdir
742 with_radacctdir
743 with_raddbdir
744 with_dictdir
745 with_ascend_binary
746 with_threads
747 with_tcp
748 with_vmps
749 with_dhcp
750 with_static_modules
751 with_shared_libs
752 with_modules
753 with_experimental_modules
754 with_udpfromto
755 with_rlm_FOO_lib_dir
756 with_rlm_FOO_include_dir
757 with_openssl
758 with_openssl_lib_dir
759 with_openssl_include_dir
760 enable_openssl_version_check
761 with_talloc_lib_dir
762 with_talloc_include_dir
763 with_pcap_lib_dir
764 with_pcap_include_dir
765 with_collectdclient_lib_dir
766 with_collectdclient_include_dir
767 with_cap_lib_dir
768 with_cap_include_dir
769 with_execinfo_lib_dir
770 with_execinfo_include_dir
771 with_pcre
772 with_pcre_lib_dir
773 with_pcre_include_dir
774 with_regex
775 '
776       ac_precious_vars='build_alias
777 host_alias
778 target_alias
779 CC
780 CFLAGS
781 LDFLAGS
782 LIBS
783 CPPFLAGS
784 CXX
785 CXXFLAGS
786 CCC
787 CPP'
788 ac_subdirs_all='$mysubdirs'
789
790 # Initialize some variables set by options.
791 ac_init_help=
792 ac_init_version=false
793 ac_unrecognized_opts=
794 ac_unrecognized_sep=
795 # The variables have the same names as the options, with
796 # dashes changed to underlines.
797 cache_file=/dev/null
798 exec_prefix=NONE
799 no_create=
800 no_recursion=
801 prefix=NONE
802 program_prefix=NONE
803 program_suffix=NONE
804 program_transform_name=s,x,x,
805 silent=
806 site=
807 srcdir=
808 verbose=
809 x_includes=NONE
810 x_libraries=NONE
811
812 # Installation directory options.
813 # These are left unexpanded so users can "make install exec_prefix=/foo"
814 # and all the variables that are supposed to be based on exec_prefix
815 # by default will actually change.
816 # Use braces instead of parens because sh, perl, etc. also accept them.
817 # (The list follows the same order as the GNU Coding Standards.)
818 bindir='${exec_prefix}/bin'
819 sbindir='${exec_prefix}/sbin'
820 libexecdir='${exec_prefix}/libexec'
821 datarootdir='${prefix}/share'
822 datadir='${datarootdir}'
823 sysconfdir='${prefix}/etc'
824 sharedstatedir='${prefix}/com'
825 localstatedir='${prefix}/var'
826 includedir='${prefix}/include'
827 oldincludedir='/usr/include'
828 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
829 infodir='${datarootdir}/info'
830 htmldir='${docdir}'
831 dvidir='${docdir}'
832 pdfdir='${docdir}'
833 psdir='${docdir}'
834 libdir='${exec_prefix}/lib'
835 localedir='${datarootdir}/locale'
836 mandir='${datarootdir}/man'
837
838 ac_prev=
839 ac_dashdash=
840 for ac_option
841 do
842   # If the previous option needs an argument, assign it.
843   if test -n "$ac_prev"; then
844     eval $ac_prev=\$ac_option
845     ac_prev=
846     continue
847   fi
848
849   case $ac_option in
850   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
851   *=)   ac_optarg= ;;
852   *)    ac_optarg=yes ;;
853   esac
854
855   # Accept the important Cygnus configure options, so we can diagnose typos.
856
857   case $ac_dashdash$ac_option in
858   --)
859     ac_dashdash=yes ;;
860
861   -bindir | --bindir | --bindi | --bind | --bin | --bi)
862     ac_prev=bindir ;;
863   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
864     bindir=$ac_optarg ;;
865
866   -build | --build | --buil | --bui | --bu)
867     ac_prev=build_alias ;;
868   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
869     build_alias=$ac_optarg ;;
870
871   -cache-file | --cache-file | --cache-fil | --cache-fi \
872   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
873     ac_prev=cache_file ;;
874   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
875   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
876     cache_file=$ac_optarg ;;
877
878   --config-cache | -C)
879     cache_file=config.cache ;;
880
881   -datadir | --datadir | --datadi | --datad)
882     ac_prev=datadir ;;
883   -datadir=* | --datadir=* | --datadi=* | --datad=*)
884     datadir=$ac_optarg ;;
885
886   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
887   | --dataroo | --dataro | --datar)
888     ac_prev=datarootdir ;;
889   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
890   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
891     datarootdir=$ac_optarg ;;
892
893   -disable-* | --disable-*)
894     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
895     # Reject names that are not valid shell variable names.
896     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
897       as_fn_error $? "invalid feature name: $ac_useropt"
898     ac_useropt_orig=$ac_useropt
899     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
900     case $ac_user_opts in
901       *"
902 "enable_$ac_useropt"
903 "*) ;;
904       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
905          ac_unrecognized_sep=', ';;
906     esac
907     eval enable_$ac_useropt=no ;;
908
909   -docdir | --docdir | --docdi | --doc | --do)
910     ac_prev=docdir ;;
911   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
912     docdir=$ac_optarg ;;
913
914   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
915     ac_prev=dvidir ;;
916   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
917     dvidir=$ac_optarg ;;
918
919   -enable-* | --enable-*)
920     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
921     # Reject names that are not valid shell variable names.
922     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
923       as_fn_error $? "invalid feature name: $ac_useropt"
924     ac_useropt_orig=$ac_useropt
925     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
926     case $ac_user_opts in
927       *"
928 "enable_$ac_useropt"
929 "*) ;;
930       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
931          ac_unrecognized_sep=', ';;
932     esac
933     eval enable_$ac_useropt=\$ac_optarg ;;
934
935   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
936   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
937   | --exec | --exe | --ex)
938     ac_prev=exec_prefix ;;
939   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
940   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
941   | --exec=* | --exe=* | --ex=*)
942     exec_prefix=$ac_optarg ;;
943
944   -gas | --gas | --ga | --g)
945     # Obsolete; use --with-gas.
946     with_gas=yes ;;
947
948   -help | --help | --hel | --he | -h)
949     ac_init_help=long ;;
950   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
951     ac_init_help=recursive ;;
952   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
953     ac_init_help=short ;;
954
955   -host | --host | --hos | --ho)
956     ac_prev=host_alias ;;
957   -host=* | --host=* | --hos=* | --ho=*)
958     host_alias=$ac_optarg ;;
959
960   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
961     ac_prev=htmldir ;;
962   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
963   | --ht=*)
964     htmldir=$ac_optarg ;;
965
966   -includedir | --includedir | --includedi | --included | --include \
967   | --includ | --inclu | --incl | --inc)
968     ac_prev=includedir ;;
969   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
970   | --includ=* | --inclu=* | --incl=* | --inc=*)
971     includedir=$ac_optarg ;;
972
973   -infodir | --infodir | --infodi | --infod | --info | --inf)
974     ac_prev=infodir ;;
975   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
976     infodir=$ac_optarg ;;
977
978   -libdir | --libdir | --libdi | --libd)
979     ac_prev=libdir ;;
980   -libdir=* | --libdir=* | --libdi=* | --libd=*)
981     libdir=$ac_optarg ;;
982
983   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
984   | --libexe | --libex | --libe)
985     ac_prev=libexecdir ;;
986   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
987   | --libexe=* | --libex=* | --libe=*)
988     libexecdir=$ac_optarg ;;
989
990   -localedir | --localedir | --localedi | --localed | --locale)
991     ac_prev=localedir ;;
992   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
993     localedir=$ac_optarg ;;
994
995   -localstatedir | --localstatedir | --localstatedi | --localstated \
996   | --localstate | --localstat | --localsta | --localst | --locals)
997     ac_prev=localstatedir ;;
998   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
999   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1000     localstatedir=$ac_optarg ;;
1001
1002   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1003     ac_prev=mandir ;;
1004   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1005     mandir=$ac_optarg ;;
1006
1007   -nfp | --nfp | --nf)
1008     # Obsolete; use --without-fp.
1009     with_fp=no ;;
1010
1011   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1012   | --no-cr | --no-c | -n)
1013     no_create=yes ;;
1014
1015   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1016   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1017     no_recursion=yes ;;
1018
1019   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1020   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1021   | --oldin | --oldi | --old | --ol | --o)
1022     ac_prev=oldincludedir ;;
1023   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1024   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1025   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1026     oldincludedir=$ac_optarg ;;
1027
1028   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1029     ac_prev=prefix ;;
1030   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1031     prefix=$ac_optarg ;;
1032
1033   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1034   | --program-pre | --program-pr | --program-p)
1035     ac_prev=program_prefix ;;
1036   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1037   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1038     program_prefix=$ac_optarg ;;
1039
1040   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1041   | --program-suf | --program-su | --program-s)
1042     ac_prev=program_suffix ;;
1043   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1044   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1045     program_suffix=$ac_optarg ;;
1046
1047   -program-transform-name | --program-transform-name \
1048   | --program-transform-nam | --program-transform-na \
1049   | --program-transform-n | --program-transform- \
1050   | --program-transform | --program-transfor \
1051   | --program-transfo | --program-transf \
1052   | --program-trans | --program-tran \
1053   | --progr-tra | --program-tr | --program-t)
1054     ac_prev=program_transform_name ;;
1055   -program-transform-name=* | --program-transform-name=* \
1056   | --program-transform-nam=* | --program-transform-na=* \
1057   | --program-transform-n=* | --program-transform-=* \
1058   | --program-transform=* | --program-transfor=* \
1059   | --program-transfo=* | --program-transf=* \
1060   | --program-trans=* | --program-tran=* \
1061   | --progr-tra=* | --program-tr=* | --program-t=*)
1062     program_transform_name=$ac_optarg ;;
1063
1064   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1065     ac_prev=pdfdir ;;
1066   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1067     pdfdir=$ac_optarg ;;
1068
1069   -psdir | --psdir | --psdi | --psd | --ps)
1070     ac_prev=psdir ;;
1071   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1072     psdir=$ac_optarg ;;
1073
1074   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1075   | -silent | --silent | --silen | --sile | --sil)
1076     silent=yes ;;
1077
1078   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1079     ac_prev=sbindir ;;
1080   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1081   | --sbi=* | --sb=*)
1082     sbindir=$ac_optarg ;;
1083
1084   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1085   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1086   | --sharedst | --shareds | --shared | --share | --shar \
1087   | --sha | --sh)
1088     ac_prev=sharedstatedir ;;
1089   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1090   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1091   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1092   | --sha=* | --sh=*)
1093     sharedstatedir=$ac_optarg ;;
1094
1095   -site | --site | --sit)
1096     ac_prev=site ;;
1097   -site=* | --site=* | --sit=*)
1098     site=$ac_optarg ;;
1099
1100   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1101     ac_prev=srcdir ;;
1102   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1103     srcdir=$ac_optarg ;;
1104
1105   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1106   | --syscon | --sysco | --sysc | --sys | --sy)
1107     ac_prev=sysconfdir ;;
1108   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1109   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1110     sysconfdir=$ac_optarg ;;
1111
1112   -target | --target | --targe | --targ | --tar | --ta | --t)
1113     ac_prev=target_alias ;;
1114   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1115     target_alias=$ac_optarg ;;
1116
1117   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1118     verbose=yes ;;
1119
1120   -version | --version | --versio | --versi | --vers | -V)
1121     ac_init_version=: ;;
1122
1123   -with-* | --with-*)
1124     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1125     # Reject names that are not valid shell variable names.
1126     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1127       as_fn_error $? "invalid package name: $ac_useropt"
1128     ac_useropt_orig=$ac_useropt
1129     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1130     case $ac_user_opts in
1131       *"
1132 "with_$ac_useropt"
1133 "*) ;;
1134       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1135          ac_unrecognized_sep=', ';;
1136     esac
1137     eval with_$ac_useropt=\$ac_optarg ;;
1138
1139   -without-* | --without-*)
1140     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1141     # Reject names that are not valid shell variable names.
1142     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1143       as_fn_error $? "invalid package name: $ac_useropt"
1144     ac_useropt_orig=$ac_useropt
1145     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1146     case $ac_user_opts in
1147       *"
1148 "with_$ac_useropt"
1149 "*) ;;
1150       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1151          ac_unrecognized_sep=', ';;
1152     esac
1153     eval with_$ac_useropt=no ;;
1154
1155   --x)
1156     # Obsolete; use --with-x.
1157     with_x=yes ;;
1158
1159   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1160   | --x-incl | --x-inc | --x-in | --x-i)
1161     ac_prev=x_includes ;;
1162   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1163   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1164     x_includes=$ac_optarg ;;
1165
1166   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1167   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1168     ac_prev=x_libraries ;;
1169   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1170   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1171     x_libraries=$ac_optarg ;;
1172
1173   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1174 Try \`$0 --help' for more information"
1175     ;;
1176
1177   *=*)
1178     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1179     # Reject names that are not valid shell variable names.
1180     case $ac_envvar in #(
1181       '' | [0-9]* | *[!_$as_cr_alnum]* )
1182       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1183     esac
1184     eval $ac_envvar=\$ac_optarg
1185     export $ac_envvar ;;
1186
1187   *)
1188     # FIXME: should be removed in autoconf 3.0.
1189     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1190     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1191       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1192     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1193     ;;
1194
1195   esac
1196 done
1197
1198 if test -n "$ac_prev"; then
1199   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1200   as_fn_error $? "missing argument to $ac_option"
1201 fi
1202
1203 if test -n "$ac_unrecognized_opts"; then
1204   case $enable_option_checking in
1205     no) ;;
1206     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1207     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1208   esac
1209 fi
1210
1211 # Check all directory arguments for consistency.
1212 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1213                 datadir sysconfdir sharedstatedir localstatedir includedir \
1214                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1215                 libdir localedir mandir
1216 do
1217   eval ac_val=\$$ac_var
1218   # Remove trailing slashes.
1219   case $ac_val in
1220     */ )
1221       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1222       eval $ac_var=\$ac_val;;
1223   esac
1224   # Be sure to have absolute directory names.
1225   case $ac_val in
1226     [\\/$]* | ?:[\\/]* )  continue;;
1227     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1228   esac
1229   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1230 done
1231
1232 # There might be people who depend on the old broken behavior: `$host'
1233 # used to hold the argument of --host etc.
1234 # FIXME: To remove some day.
1235 build=$build_alias
1236 host=$host_alias
1237 target=$target_alias
1238
1239 # FIXME: To remove some day.
1240 if test "x$host_alias" != x; then
1241   if test "x$build_alias" = x; then
1242     cross_compiling=maybe
1243   elif test "x$build_alias" != "x$host_alias"; then
1244     cross_compiling=yes
1245   fi
1246 fi
1247
1248 ac_tool_prefix=
1249 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1250
1251 test "$silent" = yes && exec 6>/dev/null
1252
1253
1254 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1255 ac_ls_di=`ls -di .` &&
1256 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1257   as_fn_error $? "working directory cannot be determined"
1258 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1259   as_fn_error $? "pwd does not report name of working directory"
1260
1261
1262 # Find the source files, if location was not specified.
1263 if test -z "$srcdir"; then
1264   ac_srcdir_defaulted=yes
1265   # Try the directory containing this script, then the parent directory.
1266   ac_confdir=`$as_dirname -- "$as_myself" ||
1267 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1268          X"$as_myself" : 'X\(//\)[^/]' \| \
1269          X"$as_myself" : 'X\(//\)$' \| \
1270          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1271 $as_echo X"$as_myself" |
1272     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1273             s//\1/
1274             q
1275           }
1276           /^X\(\/\/\)[^/].*/{
1277             s//\1/
1278             q
1279           }
1280           /^X\(\/\/\)$/{
1281             s//\1/
1282             q
1283           }
1284           /^X\(\/\).*/{
1285             s//\1/
1286             q
1287           }
1288           s/.*/./; q'`
1289   srcdir=$ac_confdir
1290   if test ! -r "$srcdir/$ac_unique_file"; then
1291     srcdir=..
1292   fi
1293 else
1294   ac_srcdir_defaulted=no
1295 fi
1296 if test ! -r "$srcdir/$ac_unique_file"; then
1297   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1298   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1299 fi
1300 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1301 ac_abs_confdir=`(
1302         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1303         pwd)`
1304 # When building in place, set srcdir=.
1305 if test "$ac_abs_confdir" = "$ac_pwd"; then
1306   srcdir=.
1307 fi
1308 # Remove unnecessary trailing slashes from srcdir.
1309 # Double slashes in file names in object file debugging info
1310 # mess up M-x gdb in Emacs.
1311 case $srcdir in
1312 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1313 esac
1314 for ac_var in $ac_precious_vars; do
1315   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1316   eval ac_env_${ac_var}_value=\$${ac_var}
1317   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1318   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1319 done
1320
1321 #
1322 # Report the --help message.
1323 #
1324 if test "$ac_init_help" = "long"; then
1325   # Omit some internal or obsolete options to make the list less imposing.
1326   # This message is too long to be a string in the A/UX 3.1 sh.
1327   cat <<_ACEOF
1328 \`configure' configures freeradius $Id$ to adapt to many kinds of systems.
1329
1330 Usage: $0 [OPTION]... [VAR=VALUE]...
1331
1332 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1333 VAR=VALUE.  See below for descriptions of some of the useful variables.
1334
1335 Defaults for the options are specified in brackets.
1336
1337 Configuration:
1338   -h, --help              display this help and exit
1339       --help=short        display options specific to this package
1340       --help=recursive    display the short help of all the included packages
1341   -V, --version           display version information and exit
1342   -q, --quiet, --silent   do not print \`checking ...' messages
1343       --cache-file=FILE   cache test results in FILE [disabled]
1344   -C, --config-cache      alias for \`--cache-file=config.cache'
1345   -n, --no-create         do not create output files
1346       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1347
1348 Installation directories:
1349   --prefix=PREFIX         install architecture-independent files in PREFIX
1350                           [$ac_default_prefix]
1351   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1352                           [PREFIX]
1353
1354 By default, \`make install' will install all the files in
1355 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1356 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1357 for instance \`--prefix=\$HOME'.
1358
1359 For better control, use the options below.
1360
1361 Fine tuning of the installation directories:
1362   --bindir=DIR            user executables [EPREFIX/bin]
1363   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1364   --libexecdir=DIR        program executables [EPREFIX/libexec]
1365   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1366   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1367   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1368   --libdir=DIR            object code libraries [EPREFIX/lib]
1369   --includedir=DIR        C header files [PREFIX/include]
1370   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1371   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1372   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1373   --infodir=DIR           info documentation [DATAROOTDIR/info]
1374   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1375   --mandir=DIR            man documentation [DATAROOTDIR/man]
1376   --docdir=DIR            documentation root [DATAROOTDIR/doc/freeradius]
1377   --htmldir=DIR           html documentation [DOCDIR]
1378   --dvidir=DIR            dvi documentation [DOCDIR]
1379   --pdfdir=DIR            pdf documentation [DOCDIR]
1380   --psdir=DIR             ps documentation [DOCDIR]
1381 _ACEOF
1382
1383   cat <<\_ACEOF
1384
1385 System types:
1386   --build=BUILD     configure for building on BUILD [guessed]
1387   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1388   --target=TARGET   configure for building compilers for TARGET [HOST]
1389 _ACEOF
1390 fi
1391
1392 if test -n "$ac_init_help"; then
1393   case $ac_init_help in
1394      short | recursive ) echo "Configuration of freeradius $Id$:";;
1395    esac
1396   cat <<\_ACEOF
1397
1398 Optional Features:
1399   --disable-option-checking  ignore unrecognized --enable/--with options
1400   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1401   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1402   --enable-developer      enables features of interest to developers.
1403   --disable-largefile     omit support for large files
1404   --enable-strict-dependencies  fail configure on lack of module dependancy.
1405   --enable-werror         causes the build to fail if any warnings are generated.
1406   --disable-openssl-version-check
1407                           disable vulnerable OpenSSL version check
1408
1409
1410 Optional Packages:
1411   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1412   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1413   --with-docdir=DIR       directory for documentation DATADIR/doc/freeradius
1414   --with-logdir=DIR       directory for logfiles LOCALSTATEDIR/log/radius
1415   --with-radacctdir=DIR   directory for detail files LOGDIR/radacct
1416   --with-raddbdir=DIR     directory for config files SYSCONFDIR/raddb
1417   --with-dictdir=DIR      directory for dictionary files DATAROOTDIR/freeradius
1418   --with-ascend-binary    include support for Ascend binary filter attributes (default=yes)
1419   --with-threads          use threads, if available.  (default=yes)
1420   --with-tcp              compile in TCP support. (default=yes)
1421   --with-vmps             compile in VMPS support. (default=yes)
1422   --with-dhcp             compile in DHCP support. (default=yes)
1423   --with-static-modules=QUOTED-MODULE-LIST
1424   --with-shared-libs      build dynamic libraries and link against them.
1425                           (default=yes)
1426   --with-modules=QUOTED-MODULE-LIST
1427   --with-experimental-modules
1428                           use experimental and unstable modules. (default=no,
1429                           unless --enable-developer=yes)
1430   --with-udpfromto        compile in UDPFROMTO support. (default=yes)
1431   --with-rlm-FOO-lib-dir=DIR
1432                           directory in which to look for library files used by
1433                           module FOO
1434   --with-rlm-FOO-include-dir=DIR
1435                           directory in which to look for include files used by
1436                           module FOO
1437   --with-openssl          use OpenSSL. (default=yes)
1438   --with-openssl-lib-dir=DIR
1439                           directory to look for OpenSSL library files
1440   --with-openssl-include-dir=DIR
1441                           directory to look for OpenSSL include files
1442   --with-talloc-lib-dir=DIR
1443                           directory in which to look for talloc library files
1444   --with-talloc-include-dir=DIR
1445                           directory in which to look for talloc include files
1446   --with-pcap-lib-dir=DIR directory in which to look for pcap library files
1447   --with-pcap-include-dir=DIR
1448                           directory in which to look for pcap include files
1449   --with-collectdclient-lib-dir=DIR
1450                           directory in which to look for collectdclient
1451                           library files
1452   --with-collectdclient-include-dir=DIR
1453                           directory in which to look for collectdclient
1454                           include files
1455   --with-cap-lib-dir=DIR  directory in which to look for cap library files
1456   --with-cap-include-dir=DIR
1457                           directory in which to look for cap include files
1458   --with-execinfo-lib-dir=DIR
1459                           directory in which to look for execinfo library
1460                           files
1461   --with-execinfo-include-dir=DIR
1462                           directory in which to look for execinfo include
1463                           files
1464   --with-pcre             use libpcre (if available). (default=yes)
1465   --with-pcre-lib-dir=DIR directory in which to look for pcre library files
1466   --with-pcre-include-dir=DIR
1467                           directory in which to look for pcre include files
1468   --with-regex            Whether to build with regular expressions
1469                           (default=yes)
1470
1471 Some influential environment variables:
1472   CC          C compiler command
1473   CFLAGS      C compiler flags
1474   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1475               nonstandard directory <lib dir>
1476   LIBS        libraries to pass to the linker, e.g. -l<library>
1477   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1478               you have headers in a nonstandard directory <include dir>
1479   CXX         C++ compiler command
1480   CXXFLAGS    C++ compiler flags
1481   CPP         C preprocessor
1482
1483 Use these variables to override the choices made by `configure' or to help
1484 it to find libraries and programs with nonstandard names/locations.
1485
1486 Report bugs to <http://bugs.freeradius.org>.
1487 freeradius home page: <http://www.freeradius.org>.
1488 _ACEOF
1489 ac_status=$?
1490 fi
1491
1492 if test "$ac_init_help" = "recursive"; then
1493   # If there are subdirs, report their specific --help.
1494   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1495     test -d "$ac_dir" ||
1496       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1497       continue
1498     ac_builddir=.
1499
1500 case "$ac_dir" in
1501 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1502 *)
1503   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1504   # A ".." for each directory in $ac_dir_suffix.
1505   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1506   case $ac_top_builddir_sub in
1507   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1508   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1509   esac ;;
1510 esac
1511 ac_abs_top_builddir=$ac_pwd
1512 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1513 # for backward compatibility:
1514 ac_top_builddir=$ac_top_build_prefix
1515
1516 case $srcdir in
1517   .)  # We are building in place.
1518     ac_srcdir=.
1519     ac_top_srcdir=$ac_top_builddir_sub
1520     ac_abs_top_srcdir=$ac_pwd ;;
1521   [\\/]* | ?:[\\/]* )  # Absolute name.
1522     ac_srcdir=$srcdir$ac_dir_suffix;
1523     ac_top_srcdir=$srcdir
1524     ac_abs_top_srcdir=$srcdir ;;
1525   *) # Relative name.
1526     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1527     ac_top_srcdir=$ac_top_build_prefix$srcdir
1528     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1529 esac
1530 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1531
1532     cd "$ac_dir" || { ac_status=$?; continue; }
1533     # Check for guested configure.
1534     if test -f "$ac_srcdir/configure.gnu"; then
1535       echo &&
1536       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1537     elif test -f "$ac_srcdir/configure"; then
1538       echo &&
1539       $SHELL "$ac_srcdir/configure" --help=recursive
1540     else
1541       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1542     fi || ac_status=$?
1543     cd "$ac_pwd" || { ac_status=$?; break; }
1544   done
1545 fi
1546
1547 test -n "$ac_init_help" && exit $ac_status
1548 if $ac_init_version; then
1549   cat <<\_ACEOF
1550 freeradius configure $Id$
1551 generated by GNU Autoconf 2.69
1552
1553 Copyright (C) 2012 Free Software Foundation, Inc.
1554 This configure script is free software; the Free Software Foundation
1555 gives unlimited permission to copy, distribute and modify it.
1556 _ACEOF
1557   exit
1558 fi
1559
1560 ## ------------------------ ##
1561 ## Autoconf initialization. ##
1562 ## ------------------------ ##
1563
1564 # ac_fn_c_try_compile LINENO
1565 # --------------------------
1566 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1567 ac_fn_c_try_compile ()
1568 {
1569   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1570   rm -f conftest.$ac_objext
1571   if { { ac_try="$ac_compile"
1572 case "(($ac_try" in
1573   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1574   *) ac_try_echo=$ac_try;;
1575 esac
1576 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1577 $as_echo "$ac_try_echo"; } >&5
1578   (eval "$ac_compile") 2>conftest.err
1579   ac_status=$?
1580   if test -s conftest.err; then
1581     grep -v '^ *+' conftest.err >conftest.er1
1582     cat conftest.er1 >&5
1583     mv -f conftest.er1 conftest.err
1584   fi
1585   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1586   test $ac_status = 0; } && {
1587          test -z "$ac_c_werror_flag" ||
1588          test ! -s conftest.err
1589        } && test -s conftest.$ac_objext; then :
1590   ac_retval=0
1591 else
1592   $as_echo "$as_me: failed program was:" >&5
1593 sed 's/^/| /' conftest.$ac_ext >&5
1594
1595         ac_retval=1
1596 fi
1597   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1598   as_fn_set_status $ac_retval
1599
1600 } # ac_fn_c_try_compile
1601
1602 # ac_fn_cxx_try_compile LINENO
1603 # ----------------------------
1604 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1605 ac_fn_cxx_try_compile ()
1606 {
1607   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1608   rm -f conftest.$ac_objext
1609   if { { ac_try="$ac_compile"
1610 case "(($ac_try" in
1611   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1612   *) ac_try_echo=$ac_try;;
1613 esac
1614 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1615 $as_echo "$ac_try_echo"; } >&5
1616   (eval "$ac_compile") 2>conftest.err
1617   ac_status=$?
1618   if test -s conftest.err; then
1619     grep -v '^ *+' conftest.err >conftest.er1
1620     cat conftest.er1 >&5
1621     mv -f conftest.er1 conftest.err
1622   fi
1623   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1624   test $ac_status = 0; } && {
1625          test -z "$ac_cxx_werror_flag" ||
1626          test ! -s conftest.err
1627        } && test -s conftest.$ac_objext; then :
1628   ac_retval=0
1629 else
1630   $as_echo "$as_me: failed program was:" >&5
1631 sed 's/^/| /' conftest.$ac_ext >&5
1632
1633         ac_retval=1
1634 fi
1635   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1636   as_fn_set_status $ac_retval
1637
1638 } # ac_fn_cxx_try_compile
1639
1640 # ac_fn_c_try_cpp LINENO
1641 # ----------------------
1642 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1643 ac_fn_c_try_cpp ()
1644 {
1645   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1646   if { { ac_try="$ac_cpp conftest.$ac_ext"
1647 case "(($ac_try" in
1648   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1649   *) ac_try_echo=$ac_try;;
1650 esac
1651 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1652 $as_echo "$ac_try_echo"; } >&5
1653   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1654   ac_status=$?
1655   if test -s conftest.err; then
1656     grep -v '^ *+' conftest.err >conftest.er1
1657     cat conftest.er1 >&5
1658     mv -f conftest.er1 conftest.err
1659   fi
1660   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1661   test $ac_status = 0; } > conftest.i && {
1662          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1663          test ! -s conftest.err
1664        }; then :
1665   ac_retval=0
1666 else
1667   $as_echo "$as_me: failed program was:" >&5
1668 sed 's/^/| /' conftest.$ac_ext >&5
1669
1670     ac_retval=1
1671 fi
1672   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1673   as_fn_set_status $ac_retval
1674
1675 } # ac_fn_c_try_cpp
1676
1677 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1678 # -------------------------------------------------------
1679 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1680 # the include files in INCLUDES and setting the cache variable VAR
1681 # accordingly.
1682 ac_fn_c_check_header_mongrel ()
1683 {
1684   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1685   if eval \${$3+:} false; then :
1686   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1687 $as_echo_n "checking for $2... " >&6; }
1688 if eval \${$3+:} false; then :
1689   $as_echo_n "(cached) " >&6
1690 fi
1691 eval ac_res=\$$3
1692                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1693 $as_echo "$ac_res" >&6; }
1694 else
1695   # Is the header compilable?
1696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1697 $as_echo_n "checking $2 usability... " >&6; }
1698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1699 /* end confdefs.h.  */
1700 $4
1701 #include <$2>
1702 _ACEOF
1703 if ac_fn_c_try_compile "$LINENO"; then :
1704   ac_header_compiler=yes
1705 else
1706   ac_header_compiler=no
1707 fi
1708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1710 $as_echo "$ac_header_compiler" >&6; }
1711
1712 # Is the header present?
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1714 $as_echo_n "checking $2 presence... " >&6; }
1715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1716 /* end confdefs.h.  */
1717 #include <$2>
1718 _ACEOF
1719 if ac_fn_c_try_cpp "$LINENO"; then :
1720   ac_header_preproc=yes
1721 else
1722   ac_header_preproc=no
1723 fi
1724 rm -f conftest.err conftest.i conftest.$ac_ext
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1726 $as_echo "$ac_header_preproc" >&6; }
1727
1728 # So?  What about this header?
1729 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1730   yes:no: )
1731     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1732 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1733     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1734 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1735     ;;
1736   no:yes:* )
1737     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1738 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1739     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1740 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1741     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1742 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1743     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1744 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1745     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1746 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1747 ( $as_echo "## ----------------------------------------- ##
1748 ## Report this to http://bugs.freeradius.org ##
1749 ## ----------------------------------------- ##"
1750      ) | sed "s/^/$as_me: WARNING:     /" >&2
1751     ;;
1752 esac
1753   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1754 $as_echo_n "checking for $2... " >&6; }
1755 if eval \${$3+:} false; then :
1756   $as_echo_n "(cached) " >&6
1757 else
1758   eval "$3=\$ac_header_compiler"
1759 fi
1760 eval ac_res=\$$3
1761                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1762 $as_echo "$ac_res" >&6; }
1763 fi
1764   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1765
1766 } # ac_fn_c_check_header_mongrel
1767
1768 # ac_fn_c_try_run LINENO
1769 # ----------------------
1770 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1771 # that executables *can* be run.
1772 ac_fn_c_try_run ()
1773 {
1774   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1775   if { { ac_try="$ac_link"
1776 case "(($ac_try" in
1777   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1778   *) ac_try_echo=$ac_try;;
1779 esac
1780 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1781 $as_echo "$ac_try_echo"; } >&5
1782   (eval "$ac_link") 2>&5
1783   ac_status=$?
1784   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1785   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1786   { { case "(($ac_try" in
1787   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1788   *) ac_try_echo=$ac_try;;
1789 esac
1790 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1791 $as_echo "$ac_try_echo"; } >&5
1792   (eval "$ac_try") 2>&5
1793   ac_status=$?
1794   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1795   test $ac_status = 0; }; }; then :
1796   ac_retval=0
1797 else
1798   $as_echo "$as_me: program exited with status $ac_status" >&5
1799        $as_echo "$as_me: failed program was:" >&5
1800 sed 's/^/| /' conftest.$ac_ext >&5
1801
1802        ac_retval=$ac_status
1803 fi
1804   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1805   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1806   as_fn_set_status $ac_retval
1807
1808 } # ac_fn_c_try_run
1809
1810 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1811 # -------------------------------------------------------
1812 # Tests whether HEADER exists and can be compiled using the include files in
1813 # INCLUDES, setting the cache variable VAR accordingly.
1814 ac_fn_c_check_header_compile ()
1815 {
1816   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1818 $as_echo_n "checking for $2... " >&6; }
1819 if eval \${$3+:} false; then :
1820   $as_echo_n "(cached) " >&6
1821 else
1822   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1823 /* end confdefs.h.  */
1824 $4
1825 #include <$2>
1826 _ACEOF
1827 if ac_fn_c_try_compile "$LINENO"; then :
1828   eval "$3=yes"
1829 else
1830   eval "$3=no"
1831 fi
1832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1833 fi
1834 eval ac_res=\$$3
1835                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1836 $as_echo "$ac_res" >&6; }
1837   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1838
1839 } # ac_fn_c_check_header_compile
1840
1841 # ac_fn_c_try_link LINENO
1842 # -----------------------
1843 # Try to link conftest.$ac_ext, and return whether this succeeded.
1844 ac_fn_c_try_link ()
1845 {
1846   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1847   rm -f conftest.$ac_objext conftest$ac_exeext
1848   if { { ac_try="$ac_link"
1849 case "(($ac_try" in
1850   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1851   *) ac_try_echo=$ac_try;;
1852 esac
1853 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1854 $as_echo "$ac_try_echo"; } >&5
1855   (eval "$ac_link") 2>conftest.err
1856   ac_status=$?
1857   if test -s conftest.err; then
1858     grep -v '^ *+' conftest.err >conftest.er1
1859     cat conftest.er1 >&5
1860     mv -f conftest.er1 conftest.err
1861   fi
1862   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1863   test $ac_status = 0; } && {
1864          test -z "$ac_c_werror_flag" ||
1865          test ! -s conftest.err
1866        } && test -s conftest$ac_exeext && {
1867          test "$cross_compiling" = yes ||
1868          test -x conftest$ac_exeext
1869        }; then :
1870   ac_retval=0
1871 else
1872   $as_echo "$as_me: failed program was:" >&5
1873 sed 's/^/| /' conftest.$ac_ext >&5
1874
1875         ac_retval=1
1876 fi
1877   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1878   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1879   # interfere with the next link command; also delete a directory that is
1880   # left behind by Apple's compiler.  We do this before executing the actions.
1881   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1882   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1883   as_fn_set_status $ac_retval
1884
1885 } # ac_fn_c_try_link
1886
1887 # ac_fn_c_check_func LINENO FUNC VAR
1888 # ----------------------------------
1889 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1890 ac_fn_c_check_func ()
1891 {
1892   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1893   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1894 $as_echo_n "checking for $2... " >&6; }
1895 if eval \${$3+:} false; then :
1896   $as_echo_n "(cached) " >&6
1897 else
1898   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1899 /* end confdefs.h.  */
1900 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1901    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1902 #define $2 innocuous_$2
1903
1904 /* System header to define __stub macros and hopefully few prototypes,
1905     which can conflict with char $2 (); below.
1906     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1907     <limits.h> exists even on freestanding compilers.  */
1908
1909 #ifdef __STDC__
1910 # include <limits.h>
1911 #else
1912 # include <assert.h>
1913 #endif
1914
1915 #undef $2
1916
1917 /* Override any GCC internal prototype to avoid an error.
1918    Use char because int might match the return type of a GCC
1919    builtin and then its argument prototype would still apply.  */
1920 #ifdef __cplusplus
1921 extern "C"
1922 #endif
1923 char $2 ();
1924 /* The GNU C library defines this for functions which it implements
1925     to always fail with ENOSYS.  Some functions are actually named
1926     something starting with __ and the normal name is an alias.  */
1927 #if defined __stub_$2 || defined __stub___$2
1928 choke me
1929 #endif
1930
1931 int
1932 main ()
1933 {
1934 return $2 ();
1935   ;
1936   return 0;
1937 }
1938 _ACEOF
1939 if ac_fn_c_try_link "$LINENO"; then :
1940   eval "$3=yes"
1941 else
1942   eval "$3=no"
1943 fi
1944 rm -f core conftest.err conftest.$ac_objext \
1945     conftest$ac_exeext conftest.$ac_ext
1946 fi
1947 eval ac_res=\$$3
1948                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1949 $as_echo "$ac_res" >&6; }
1950   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1951
1952 } # ac_fn_c_check_func
1953
1954 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1955 # -------------------------------------------
1956 # Tests whether TYPE exists after having included INCLUDES, setting cache
1957 # variable VAR accordingly.
1958 ac_fn_c_check_type ()
1959 {
1960   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1961   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1962 $as_echo_n "checking for $2... " >&6; }
1963 if eval \${$3+:} false; then :
1964   $as_echo_n "(cached) " >&6
1965 else
1966   eval "$3=no"
1967   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1968 /* end confdefs.h.  */
1969 $4
1970 int
1971 main ()
1972 {
1973 if (sizeof ($2))
1974          return 0;
1975   ;
1976   return 0;
1977 }
1978 _ACEOF
1979 if ac_fn_c_try_compile "$LINENO"; then :
1980   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1981 /* end confdefs.h.  */
1982 $4
1983 int
1984 main ()
1985 {
1986 if (sizeof (($2)))
1987             return 0;
1988   ;
1989   return 0;
1990 }
1991 _ACEOF
1992 if ac_fn_c_try_compile "$LINENO"; then :
1993
1994 else
1995   eval "$3=yes"
1996 fi
1997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1998 fi
1999 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2000 fi
2001 eval ac_res=\$$3
2002                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2003 $as_echo "$ac_res" >&6; }
2004   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2005
2006 } # ac_fn_c_check_type
2007
2008 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2009 # ---------------------------------------------
2010 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2011 # accordingly.
2012 ac_fn_c_check_decl ()
2013 {
2014   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2015   as_decl_name=`echo $2|sed 's/ *(.*//'`
2016   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2017   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2018 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2019 if eval \${$3+:} false; then :
2020   $as_echo_n "(cached) " >&6
2021 else
2022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2023 /* end confdefs.h.  */
2024 $4
2025 int
2026 main ()
2027 {
2028 #ifndef $as_decl_name
2029 #ifdef __cplusplus
2030   (void) $as_decl_use;
2031 #else
2032   (void) $as_decl_name;
2033 #endif
2034 #endif
2035
2036   ;
2037   return 0;
2038 }
2039 _ACEOF
2040 if ac_fn_c_try_compile "$LINENO"; then :
2041   eval "$3=yes"
2042 else
2043   eval "$3=no"
2044 fi
2045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2046 fi
2047 eval ac_res=\$$3
2048                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2049 $as_echo "$ac_res" >&6; }
2050   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2051
2052 } # ac_fn_c_check_decl
2053 cat >config.log <<_ACEOF
2054 This file contains any messages produced by compilers while
2055 running configure, to aid debugging if configure makes a mistake.
2056
2057 It was created by freeradius $as_me $Id$, which was
2058 generated by GNU Autoconf 2.69.  Invocation command line was
2059
2060   $ $0 $@
2061
2062 _ACEOF
2063 exec 5>>config.log
2064 {
2065 cat <<_ASUNAME
2066 ## --------- ##
2067 ## Platform. ##
2068 ## --------- ##
2069
2070 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2071 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2072 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2073 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2074 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2075
2076 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2077 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2078
2079 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2080 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2081 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2082 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2083 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2084 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2085 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2086
2087 _ASUNAME
2088
2089 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2090 for as_dir in $PATH
2091 do
2092   IFS=$as_save_IFS
2093   test -z "$as_dir" && as_dir=.
2094     $as_echo "PATH: $as_dir"
2095   done
2096 IFS=$as_save_IFS
2097
2098 } >&5
2099
2100 cat >&5 <<_ACEOF
2101
2102
2103 ## ----------- ##
2104 ## Core tests. ##
2105 ## ----------- ##
2106
2107 _ACEOF
2108
2109
2110 # Keep a trace of the command line.
2111 # Strip out --no-create and --no-recursion so they do not pile up.
2112 # Strip out --silent because we don't want to record it for future runs.
2113 # Also quote any args containing shell meta-characters.
2114 # Make two passes to allow for proper duplicate-argument suppression.
2115 ac_configure_args=
2116 ac_configure_args0=
2117 ac_configure_args1=
2118 ac_must_keep_next=false
2119 for ac_pass in 1 2
2120 do
2121   for ac_arg
2122   do
2123     case $ac_arg in
2124     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2125     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2126     | -silent | --silent | --silen | --sile | --sil)
2127       continue ;;
2128     *\'*)
2129       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2130     esac
2131     case $ac_pass in
2132     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2133     2)
2134       as_fn_append ac_configure_args1 " '$ac_arg'"
2135       if test $ac_must_keep_next = true; then
2136         ac_must_keep_next=false # Got value, back to normal.
2137       else
2138         case $ac_arg in
2139           *=* | --config-cache | -C | -disable-* | --disable-* \
2140           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2141           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2142           | -with-* | --with-* | -without-* | --without-* | --x)
2143             case "$ac_configure_args0 " in
2144               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2145             esac
2146             ;;
2147           -* ) ac_must_keep_next=true ;;
2148         esac
2149       fi
2150       as_fn_append ac_configure_args " '$ac_arg'"
2151       ;;
2152     esac
2153   done
2154 done
2155 { ac_configure_args0=; unset ac_configure_args0;}
2156 { ac_configure_args1=; unset ac_configure_args1;}
2157
2158 # When interrupted or exit'd, cleanup temporary files, and complete
2159 # config.log.  We remove comments because anyway the quotes in there
2160 # would cause problems or look ugly.
2161 # WARNING: Use '\'' to represent an apostrophe within the trap.
2162 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2163 trap 'exit_status=$?
2164   # Save into config.log some information that might help in debugging.
2165   {
2166     echo
2167
2168     $as_echo "## ---------------- ##
2169 ## Cache variables. ##
2170 ## ---------------- ##"
2171     echo
2172     # The following way of writing the cache mishandles newlines in values,
2173 (
2174   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2175     eval ac_val=\$$ac_var
2176     case $ac_val in #(
2177     *${as_nl}*)
2178       case $ac_var in #(
2179       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2180 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2181       esac
2182       case $ac_var in #(
2183       _ | IFS | as_nl) ;; #(
2184       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2185       *) { eval $ac_var=; unset $ac_var;} ;;
2186       esac ;;
2187     esac
2188   done
2189   (set) 2>&1 |
2190     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2191     *${as_nl}ac_space=\ *)
2192       sed -n \
2193         "s/'\''/'\''\\\\'\'''\''/g;
2194           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2195       ;; #(
2196     *)
2197       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2198       ;;
2199     esac |
2200     sort
2201 )
2202     echo
2203
2204     $as_echo "## ----------------- ##
2205 ## Output variables. ##
2206 ## ----------------- ##"
2207     echo
2208     for ac_var in $ac_subst_vars
2209     do
2210       eval ac_val=\$$ac_var
2211       case $ac_val in
2212       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2213       esac
2214       $as_echo "$ac_var='\''$ac_val'\''"
2215     done | sort
2216     echo
2217
2218     if test -n "$ac_subst_files"; then
2219       $as_echo "## ------------------- ##
2220 ## File substitutions. ##
2221 ## ------------------- ##"
2222       echo
2223       for ac_var in $ac_subst_files
2224       do
2225         eval ac_val=\$$ac_var
2226         case $ac_val in
2227         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2228         esac
2229         $as_echo "$ac_var='\''$ac_val'\''"
2230       done | sort
2231       echo
2232     fi
2233
2234     if test -s confdefs.h; then
2235       $as_echo "## ----------- ##
2236 ## confdefs.h. ##
2237 ## ----------- ##"
2238       echo
2239       cat confdefs.h
2240       echo
2241     fi
2242     test "$ac_signal" != 0 &&
2243       $as_echo "$as_me: caught signal $ac_signal"
2244     $as_echo "$as_me: exit $exit_status"
2245   } >&5
2246   rm -f core *.core core.conftest.* &&
2247     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2248     exit $exit_status
2249 ' 0
2250 for ac_signal in 1 2 13 15; do
2251   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2252 done
2253 ac_signal=0
2254
2255 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2256 rm -f -r conftest* confdefs.h
2257
2258 $as_echo "/* confdefs.h */" > confdefs.h
2259
2260 # Predefined preprocessor variables.
2261
2262 cat >>confdefs.h <<_ACEOF
2263 #define PACKAGE_NAME "$PACKAGE_NAME"
2264 _ACEOF
2265
2266 cat >>confdefs.h <<_ACEOF
2267 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2268 _ACEOF
2269
2270 cat >>confdefs.h <<_ACEOF
2271 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2272 _ACEOF
2273
2274 cat >>confdefs.h <<_ACEOF
2275 #define PACKAGE_STRING "$PACKAGE_STRING"
2276 _ACEOF
2277
2278 cat >>confdefs.h <<_ACEOF
2279 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2280 _ACEOF
2281
2282 cat >>confdefs.h <<_ACEOF
2283 #define PACKAGE_URL "$PACKAGE_URL"
2284 _ACEOF
2285
2286
2287 # Let the site file select an alternate cache file if it wants to.
2288 # Prefer an explicitly selected file to automatically selected ones.
2289 ac_site_file1=NONE
2290 ac_site_file2=NONE
2291 if test -n "$CONFIG_SITE"; then
2292   # We do not want a PATH search for config.site.
2293   case $CONFIG_SITE in #((
2294     -*)  ac_site_file1=./$CONFIG_SITE;;
2295     */*) ac_site_file1=$CONFIG_SITE;;
2296     *)   ac_site_file1=./$CONFIG_SITE;;
2297   esac
2298 elif test "x$prefix" != xNONE; then
2299   ac_site_file1=$prefix/share/config.site
2300   ac_site_file2=$prefix/etc/config.site
2301 else
2302   ac_site_file1=$ac_default_prefix/share/config.site
2303   ac_site_file2=$ac_default_prefix/etc/config.site
2304 fi
2305 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2306 do
2307   test "x$ac_site_file" = xNONE && continue
2308   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2309     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2310 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2311     sed 's/^/| /' "$ac_site_file" >&5
2312     . "$ac_site_file" \
2313       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2314 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2315 as_fn_error $? "failed to load site script $ac_site_file
2316 See \`config.log' for more details" "$LINENO" 5; }
2317   fi
2318 done
2319
2320 if test -r "$cache_file"; then
2321   # Some versions of bash will fail to source /dev/null (special files
2322   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2323   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2324     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2325 $as_echo "$as_me: loading cache $cache_file" >&6;}
2326     case $cache_file in
2327       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2328       *)                      . "./$cache_file";;
2329     esac
2330   fi
2331 else
2332   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2333 $as_echo "$as_me: creating cache $cache_file" >&6;}
2334   >$cache_file
2335 fi
2336
2337 # Check that the precious variables saved in the cache have kept the same
2338 # value.
2339 ac_cache_corrupted=false
2340 for ac_var in $ac_precious_vars; do
2341   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2342   eval ac_new_set=\$ac_env_${ac_var}_set
2343   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2344   eval ac_new_val=\$ac_env_${ac_var}_value
2345   case $ac_old_set,$ac_new_set in
2346     set,)
2347       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2348 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2349       ac_cache_corrupted=: ;;
2350     ,set)
2351       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2352 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2353       ac_cache_corrupted=: ;;
2354     ,);;
2355     *)
2356       if test "x$ac_old_val" != "x$ac_new_val"; then
2357         # differences in whitespace do not lead to failure.
2358         ac_old_val_w=`echo x $ac_old_val`
2359         ac_new_val_w=`echo x $ac_new_val`
2360         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2361           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2362 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2363           ac_cache_corrupted=:
2364         else
2365           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2366 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2367           eval $ac_var=\$ac_old_val
2368         fi
2369         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2370 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2371         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2372 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2373       fi;;
2374   esac
2375   # Pass precious variables to config.status.
2376   if test "$ac_new_set" = set; then
2377     case $ac_new_val in
2378     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2379     *) ac_arg=$ac_var=$ac_new_val ;;
2380     esac
2381     case " $ac_configure_args " in
2382       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2383       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2384     esac
2385   fi
2386 done
2387 if $ac_cache_corrupted; then
2388   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2389 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2390   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2391 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2392   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2393 fi
2394 ## -------------------- ##
2395 ## Main body of script. ##
2396 ## -------------------- ##
2397
2398 ac_ext=c
2399 ac_cpp='$CPP $CPPFLAGS'
2400 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2401 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2402 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2403
2404
2405
2406 ac_config_headers="$ac_config_headers src/include/autoconf.h"
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422 RADIUSD_MAJOR_VERSION=`cat VERSION | cut -f1 -d.`
2423 RADIUSD_MINOR_VERSION=`cat VERSION | cut -f2 -d.`
2424 RADIUSD_INCRM_VERSION=`cat VERSION | cut -f3 -d. | sed 's/[\.-].*$//'`
2425
2426 RADIUSD_VERSION=`printf "%02i%02i%02i" $RADIUSD_MAJOR_VERSION $RADIUSD_MINOR_VERSION $RADIUSD_INCRM_VERSION`
2427
2428 RADIUSD_VERSION_STRING=`cat VERSION`
2429
2430
2431
2432
2433 cat >>confdefs.h <<_ACEOF
2434 #define RADIUSD_VERSION ${RADIUSD_VERSION}
2435 _ACEOF
2436
2437
2438 cat >>confdefs.h <<_ACEOF
2439 #define RADIUSD_VERSION_STRING "${RADIUSD_VERSION_STRING}"
2440 _ACEOF
2441
2442
2443
2444 # Check whether --enable-developer was given.
2445 if test "${enable_developer+set}" = set; then :
2446   enableval=$enable_developer;  case "$enableval" in
2447   no)
2448     developer=no
2449     ;;
2450   *)
2451     developer=yes
2452   esac
2453
2454 fi
2455
2456
2457 if test -d $srcdir/.git; then
2458   if test "x$developer" != "xno"; then
2459     { $as_echo "$as_me:${as_lineno-$LINENO}: found .git directory, enabling developer build implicitly, disable with --disable-developer" >&5
2460 $as_echo "$as_me: found .git directory, enabling developer build implicitly, disable with --disable-developer" >&6;}
2461     developer="yes"
2462   fi
2463 fi
2464
2465 if test "x$developer" = "xyes"; then
2466   : ${CFLAGS=-g3}
2467 fi
2468
2469
2470 ac_aux_dir=
2471 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2472   if test -f "$ac_dir/install-sh"; then
2473     ac_aux_dir=$ac_dir
2474     ac_install_sh="$ac_aux_dir/install-sh -c"
2475     break
2476   elif test -f "$ac_dir/install.sh"; then
2477     ac_aux_dir=$ac_dir
2478     ac_install_sh="$ac_aux_dir/install.sh -c"
2479     break
2480   elif test -f "$ac_dir/shtool"; then
2481     ac_aux_dir=$ac_dir
2482     ac_install_sh="$ac_aux_dir/shtool install -c"
2483     break
2484   fi
2485 done
2486 if test -z "$ac_aux_dir"; then
2487   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2488 fi
2489
2490 # These three variables are undocumented and unsupported,
2491 # and are intended to be withdrawn in a future Autoconf release.
2492 # They can cause serious problems if a builder's source tree is in a directory
2493 # whose full name contains unusual characters.
2494 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2495 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2496 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2497
2498
2499 # Make sure we can run config.sub.
2500 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2501   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2502
2503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2504 $as_echo_n "checking build system type... " >&6; }
2505 if ${ac_cv_build+:} false; then :
2506   $as_echo_n "(cached) " >&6
2507 else
2508   ac_build_alias=$build_alias
2509 test "x$ac_build_alias" = x &&
2510   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2511 test "x$ac_build_alias" = x &&
2512   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2513 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2514   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2515
2516 fi
2517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2518 $as_echo "$ac_cv_build" >&6; }
2519 case $ac_cv_build in
2520 *-*-*) ;;
2521 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2522 esac
2523 build=$ac_cv_build
2524 ac_save_IFS=$IFS; IFS='-'
2525 set x $ac_cv_build
2526 shift
2527 build_cpu=$1
2528 build_vendor=$2
2529 shift; shift
2530 # Remember, the first character of IFS is used to create $*,
2531 # except with old shells:
2532 build_os=$*
2533 IFS=$ac_save_IFS
2534 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2535
2536
2537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2538 $as_echo_n "checking host system type... " >&6; }
2539 if ${ac_cv_host+:} false; then :
2540   $as_echo_n "(cached) " >&6
2541 else
2542   if test "x$host_alias" = x; then
2543   ac_cv_host=$ac_cv_build
2544 else
2545   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2546     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2547 fi
2548
2549 fi
2550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2551 $as_echo "$ac_cv_host" >&6; }
2552 case $ac_cv_host in
2553 *-*-*) ;;
2554 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2555 esac
2556 host=$ac_cv_host
2557 ac_save_IFS=$IFS; IFS='-'
2558 set x $ac_cv_host
2559 shift
2560 host_cpu=$1
2561 host_vendor=$2
2562 shift; shift
2563 # Remember, the first character of IFS is used to create $*,
2564 # except with old shells:
2565 host_os=$*
2566 IFS=$ac_save_IFS
2567 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2568
2569
2570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2571 $as_echo_n "checking target system type... " >&6; }
2572 if ${ac_cv_target+:} false; then :
2573   $as_echo_n "(cached) " >&6
2574 else
2575   if test "x$target_alias" = x; then
2576   ac_cv_target=$ac_cv_host
2577 else
2578   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2579     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2580 fi
2581
2582 fi
2583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2584 $as_echo "$ac_cv_target" >&6; }
2585 case $ac_cv_target in
2586 *-*-*) ;;
2587 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
2588 esac
2589 target=$ac_cv_target
2590 ac_save_IFS=$IFS; IFS='-'
2591 set x $ac_cv_target
2592 shift
2593 target_cpu=$1
2594 target_vendor=$2
2595 shift; shift
2596 # Remember, the first character of IFS is used to create $*,
2597 # except with old shells:
2598 target_os=$*
2599 IFS=$ac_save_IFS
2600 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2601
2602
2603 # The aliases save the names the user supplied, while $host etc.
2604 # will get canonicalized.
2605 test -n "$target_alias" &&
2606   test "$program_prefix$program_suffix$program_transform_name" = \
2607     NONENONEs,x,x, &&
2608   program_prefix=${target_alias}-
2609
2610
2611 ac_ext=c
2612 ac_cpp='$CPP $CPPFLAGS'
2613 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2614 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2615 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2616 if test -n "$ac_tool_prefix"; then
2617   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2618 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2620 $as_echo_n "checking for $ac_word... " >&6; }
2621 if ${ac_cv_prog_CC+:} false; then :
2622   $as_echo_n "(cached) " >&6
2623 else
2624   if test -n "$CC"; then
2625   ac_cv_prog_CC="$CC" # Let the user override the test.
2626 else
2627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2628 for as_dir in $PATH
2629 do
2630   IFS=$as_save_IFS
2631   test -z "$as_dir" && as_dir=.
2632     for ac_exec_ext in '' $ac_executable_extensions; do
2633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2634     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2636     break 2
2637   fi
2638 done
2639   done
2640 IFS=$as_save_IFS
2641
2642 fi
2643 fi
2644 CC=$ac_cv_prog_CC
2645 if test -n "$CC"; then
2646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2647 $as_echo "$CC" >&6; }
2648 else
2649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2650 $as_echo "no" >&6; }
2651 fi
2652
2653
2654 fi
2655 if test -z "$ac_cv_prog_CC"; then
2656   ac_ct_CC=$CC
2657   # Extract the first word of "gcc", so it can be a program name with args.
2658 set dummy gcc; ac_word=$2
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2660 $as_echo_n "checking for $ac_word... " >&6; }
2661 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2662   $as_echo_n "(cached) " >&6
2663 else
2664   if test -n "$ac_ct_CC"; then
2665   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2666 else
2667 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2668 for as_dir in $PATH
2669 do
2670   IFS=$as_save_IFS
2671   test -z "$as_dir" && as_dir=.
2672     for ac_exec_ext in '' $ac_executable_extensions; do
2673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2674     ac_cv_prog_ac_ct_CC="gcc"
2675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2676     break 2
2677   fi
2678 done
2679   done
2680 IFS=$as_save_IFS
2681
2682 fi
2683 fi
2684 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2685 if test -n "$ac_ct_CC"; then
2686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2687 $as_echo "$ac_ct_CC" >&6; }
2688 else
2689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2690 $as_echo "no" >&6; }
2691 fi
2692
2693   if test "x$ac_ct_CC" = x; then
2694     CC=""
2695   else
2696     case $cross_compiling:$ac_tool_warned in
2697 yes:)
2698 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2699 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2700 ac_tool_warned=yes ;;
2701 esac
2702     CC=$ac_ct_CC
2703   fi
2704 else
2705   CC="$ac_cv_prog_CC"
2706 fi
2707
2708 if test -z "$CC"; then
2709           if test -n "$ac_tool_prefix"; then
2710     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2711 set dummy ${ac_tool_prefix}cc; ac_word=$2
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2713 $as_echo_n "checking for $ac_word... " >&6; }
2714 if ${ac_cv_prog_CC+:} false; then :
2715   $as_echo_n "(cached) " >&6
2716 else
2717   if test -n "$CC"; then
2718   ac_cv_prog_CC="$CC" # Let the user override the test.
2719 else
2720 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2721 for as_dir in $PATH
2722 do
2723   IFS=$as_save_IFS
2724   test -z "$as_dir" && as_dir=.
2725     for ac_exec_ext in '' $ac_executable_extensions; do
2726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2727     ac_cv_prog_CC="${ac_tool_prefix}cc"
2728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2729     break 2
2730   fi
2731 done
2732   done
2733 IFS=$as_save_IFS
2734
2735 fi
2736 fi
2737 CC=$ac_cv_prog_CC
2738 if test -n "$CC"; then
2739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2740 $as_echo "$CC" >&6; }
2741 else
2742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2743 $as_echo "no" >&6; }
2744 fi
2745
2746
2747   fi
2748 fi
2749 if test -z "$CC"; then
2750   # Extract the first word of "cc", so it can be a program name with args.
2751 set dummy cc; ac_word=$2
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2753 $as_echo_n "checking for $ac_word... " >&6; }
2754 if ${ac_cv_prog_CC+:} false; then :
2755   $as_echo_n "(cached) " >&6
2756 else
2757   if test -n "$CC"; then
2758   ac_cv_prog_CC="$CC" # Let the user override the test.
2759 else
2760   ac_prog_rejected=no
2761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2762 for as_dir in $PATH
2763 do
2764   IFS=$as_save_IFS
2765   test -z "$as_dir" && as_dir=.
2766     for ac_exec_ext in '' $ac_executable_extensions; do
2767   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2768     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2769        ac_prog_rejected=yes
2770        continue
2771      fi
2772     ac_cv_prog_CC="cc"
2773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2774     break 2
2775   fi
2776 done
2777   done
2778 IFS=$as_save_IFS
2779
2780 if test $ac_prog_rejected = yes; then
2781   # We found a bogon in the path, so make sure we never use it.
2782   set dummy $ac_cv_prog_CC
2783   shift
2784   if test $# != 0; then
2785     # We chose a different compiler from the bogus one.
2786     # However, it has the same basename, so the bogon will be chosen
2787     # first if we set CC to just the basename; use the full file name.
2788     shift
2789     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2790   fi
2791 fi
2792 fi
2793 fi
2794 CC=$ac_cv_prog_CC
2795 if test -n "$CC"; then
2796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2797 $as_echo "$CC" >&6; }
2798 else
2799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2800 $as_echo "no" >&6; }
2801 fi
2802
2803
2804 fi
2805 if test -z "$CC"; then
2806   if test -n "$ac_tool_prefix"; then
2807   for ac_prog in cl.exe
2808   do
2809     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2810 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2812 $as_echo_n "checking for $ac_word... " >&6; }
2813 if ${ac_cv_prog_CC+:} false; then :
2814   $as_echo_n "(cached) " >&6
2815 else
2816   if test -n "$CC"; then
2817   ac_cv_prog_CC="$CC" # Let the user override the test.
2818 else
2819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2820 for as_dir in $PATH
2821 do
2822   IFS=$as_save_IFS
2823   test -z "$as_dir" && as_dir=.
2824     for ac_exec_ext in '' $ac_executable_extensions; do
2825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2826     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2828     break 2
2829   fi
2830 done
2831   done
2832 IFS=$as_save_IFS
2833
2834 fi
2835 fi
2836 CC=$ac_cv_prog_CC
2837 if test -n "$CC"; then
2838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2839 $as_echo "$CC" >&6; }
2840 else
2841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2842 $as_echo "no" >&6; }
2843 fi
2844
2845
2846     test -n "$CC" && break
2847   done
2848 fi
2849 if test -z "$CC"; then
2850   ac_ct_CC=$CC
2851   for ac_prog in cl.exe
2852 do
2853   # Extract the first word of "$ac_prog", so it can be a program name with args.
2854 set dummy $ac_prog; ac_word=$2
2855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2856 $as_echo_n "checking for $ac_word... " >&6; }
2857 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2858   $as_echo_n "(cached) " >&6
2859 else
2860   if test -n "$ac_ct_CC"; then
2861   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2862 else
2863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2864 for as_dir in $PATH
2865 do
2866   IFS=$as_save_IFS
2867   test -z "$as_dir" && as_dir=.
2868     for ac_exec_ext in '' $ac_executable_extensions; do
2869   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2870     ac_cv_prog_ac_ct_CC="$ac_prog"
2871     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2872     break 2
2873   fi
2874 done
2875   done
2876 IFS=$as_save_IFS
2877
2878 fi
2879 fi
2880 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2881 if test -n "$ac_ct_CC"; then
2882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2883 $as_echo "$ac_ct_CC" >&6; }
2884 else
2885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2886 $as_echo "no" >&6; }
2887 fi
2888
2889
2890   test -n "$ac_ct_CC" && break
2891 done
2892
2893   if test "x$ac_ct_CC" = x; then
2894     CC=""
2895   else
2896     case $cross_compiling:$ac_tool_warned in
2897 yes:)
2898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2899 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2900 ac_tool_warned=yes ;;
2901 esac
2902     CC=$ac_ct_CC
2903   fi
2904 fi
2905
2906 fi
2907
2908
2909 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2910 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2911 as_fn_error $? "no acceptable C compiler found in \$PATH
2912 See \`config.log' for more details" "$LINENO" 5; }
2913
2914 # Provide some information about the compiler.
2915 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2916 set X $ac_compile
2917 ac_compiler=$2
2918 for ac_option in --version -v -V -qversion; do
2919   { { ac_try="$ac_compiler $ac_option >&5"
2920 case "(($ac_try" in
2921   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2922   *) ac_try_echo=$ac_try;;
2923 esac
2924 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2925 $as_echo "$ac_try_echo"; } >&5
2926   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2927   ac_status=$?
2928   if test -s conftest.err; then
2929     sed '10a\
2930 ... rest of stderr output deleted ...
2931          10q' conftest.err >conftest.er1
2932     cat conftest.er1 >&5
2933   fi
2934   rm -f conftest.er1 conftest.err
2935   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2936   test $ac_status = 0; }
2937 done
2938
2939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2940 /* end confdefs.h.  */
2941
2942 int
2943 main ()
2944 {
2945
2946   ;
2947   return 0;
2948 }
2949 _ACEOF
2950 ac_clean_files_save=$ac_clean_files
2951 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2952 # Try to create an executable without -o first, disregard a.out.
2953 # It will help us diagnose broken compilers, and finding out an intuition
2954 # of exeext.
2955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2956 $as_echo_n "checking whether the C compiler works... " >&6; }
2957 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2958
2959 # The possible output files:
2960 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2961
2962 ac_rmfiles=
2963 for ac_file in $ac_files
2964 do
2965   case $ac_file in
2966     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2967     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2968   esac
2969 done
2970 rm -f $ac_rmfiles
2971
2972 if { { ac_try="$ac_link_default"
2973 case "(($ac_try" in
2974   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2975   *) ac_try_echo=$ac_try;;
2976 esac
2977 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2978 $as_echo "$ac_try_echo"; } >&5
2979   (eval "$ac_link_default") 2>&5
2980   ac_status=$?
2981   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2982   test $ac_status = 0; }; then :
2983   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2984 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2985 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2986 # so that the user can short-circuit this test for compilers unknown to
2987 # Autoconf.
2988 for ac_file in $ac_files ''
2989 do
2990   test -f "$ac_file" || continue
2991   case $ac_file in
2992     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2993         ;;
2994     [ab].out )
2995         # We found the default executable, but exeext='' is most
2996         # certainly right.
2997         break;;
2998     *.* )
2999         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3000         then :; else
3001            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3002         fi
3003         # We set ac_cv_exeext here because the later test for it is not
3004         # safe: cross compilers may not add the suffix if given an `-o'
3005         # argument, so we may need to know it at that point already.
3006         # Even if this section looks crufty: it has the advantage of
3007         # actually working.
3008         break;;
3009     * )
3010         break;;
3011   esac
3012 done
3013 test "$ac_cv_exeext" = no && ac_cv_exeext=
3014
3015 else
3016   ac_file=''
3017 fi
3018 if test -z "$ac_file"; then :
3019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3020 $as_echo "no" >&6; }
3021 $as_echo "$as_me: failed program was:" >&5
3022 sed 's/^/| /' conftest.$ac_ext >&5
3023
3024 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3025 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3026 as_fn_error 77 "C compiler cannot create executables
3027 See \`config.log' for more details" "$LINENO" 5; }
3028 else
3029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3030 $as_echo "yes" >&6; }
3031 fi
3032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3033 $as_echo_n "checking for C compiler default output file name... " >&6; }
3034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3035 $as_echo "$ac_file" >&6; }
3036 ac_exeext=$ac_cv_exeext
3037
3038 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3039 ac_clean_files=$ac_clean_files_save
3040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3041 $as_echo_n "checking for suffix of executables... " >&6; }
3042 if { { ac_try="$ac_link"
3043 case "(($ac_try" in
3044   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3045   *) ac_try_echo=$ac_try;;
3046 esac
3047 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3048 $as_echo "$ac_try_echo"; } >&5
3049   (eval "$ac_link") 2>&5
3050   ac_status=$?
3051   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3052   test $ac_status = 0; }; then :
3053   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3054 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3055 # work properly (i.e., refer to `conftest.exe'), while it won't with
3056 # `rm'.
3057 for ac_file in conftest.exe conftest conftest.*; do
3058   test -f "$ac_file" || continue
3059   case $ac_file in
3060     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3061     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3062           break;;
3063     * ) break;;
3064   esac
3065 done
3066 else
3067   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3068 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3069 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3070 See \`config.log' for more details" "$LINENO" 5; }
3071 fi
3072 rm -f conftest conftest$ac_cv_exeext
3073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3074 $as_echo "$ac_cv_exeext" >&6; }
3075
3076 rm -f conftest.$ac_ext
3077 EXEEXT=$ac_cv_exeext
3078 ac_exeext=$EXEEXT
3079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3080 /* end confdefs.h.  */
3081 #include <stdio.h>
3082 int
3083 main ()
3084 {
3085 FILE *f = fopen ("conftest.out", "w");
3086  return ferror (f) || fclose (f) != 0;
3087
3088   ;
3089   return 0;
3090 }
3091 _ACEOF
3092 ac_clean_files="$ac_clean_files conftest.out"
3093 # Check that the compiler produces executables we can run.  If not, either
3094 # the compiler is broken, or we cross compile.
3095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3096 $as_echo_n "checking whether we are cross compiling... " >&6; }
3097 if test "$cross_compiling" != yes; then
3098   { { ac_try="$ac_link"
3099 case "(($ac_try" in
3100   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3101   *) ac_try_echo=$ac_try;;
3102 esac
3103 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3104 $as_echo "$ac_try_echo"; } >&5
3105   (eval "$ac_link") 2>&5
3106   ac_status=$?
3107   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3108   test $ac_status = 0; }
3109   if { ac_try='./conftest$ac_cv_exeext'
3110   { { case "(($ac_try" in
3111   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3112   *) ac_try_echo=$ac_try;;
3113 esac
3114 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3115 $as_echo "$ac_try_echo"; } >&5
3116   (eval "$ac_try") 2>&5
3117   ac_status=$?
3118   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3119   test $ac_status = 0; }; }; then
3120     cross_compiling=no
3121   else
3122     if test "$cross_compiling" = maybe; then
3123         cross_compiling=yes
3124     else
3125         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3126 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3127 as_fn_error $? "cannot run C compiled programs.
3128 If you meant to cross compile, use \`--host'.
3129 See \`config.log' for more details" "$LINENO" 5; }
3130     fi
3131   fi
3132 fi
3133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3134 $as_echo "$cross_compiling" >&6; }
3135
3136 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3137 ac_clean_files=$ac_clean_files_save
3138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3139 $as_echo_n "checking for suffix of object files... " >&6; }
3140 if ${ac_cv_objext+:} false; then :
3141   $as_echo_n "(cached) " >&6
3142 else
3143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3144 /* end confdefs.h.  */
3145
3146 int
3147 main ()
3148 {
3149
3150   ;
3151   return 0;
3152 }
3153 _ACEOF
3154 rm -f conftest.o conftest.obj
3155 if { { ac_try="$ac_compile"
3156 case "(($ac_try" in
3157   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3158   *) ac_try_echo=$ac_try;;
3159 esac
3160 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3161 $as_echo "$ac_try_echo"; } >&5
3162   (eval "$ac_compile") 2>&5
3163   ac_status=$?
3164   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3165   test $ac_status = 0; }; then :
3166   for ac_file in conftest.o conftest.obj conftest.*; do
3167   test -f "$ac_file" || continue;
3168   case $ac_file in
3169     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3170     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3171        break;;
3172   esac
3173 done
3174 else
3175   $as_echo "$as_me: failed program was:" >&5
3176 sed 's/^/| /' conftest.$ac_ext >&5
3177
3178 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3179 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3180 as_fn_error $? "cannot compute suffix of object files: cannot compile
3181 See \`config.log' for more details" "$LINENO" 5; }
3182 fi
3183 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3184 fi
3185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3186 $as_echo "$ac_cv_objext" >&6; }
3187 OBJEXT=$ac_cv_objext
3188 ac_objext=$OBJEXT
3189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3190 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3191 if ${ac_cv_c_compiler_gnu+:} false; then :
3192   $as_echo_n "(cached) " >&6
3193 else
3194   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3195 /* end confdefs.h.  */
3196
3197 int
3198 main ()
3199 {
3200 #ifndef __GNUC__
3201        choke me
3202 #endif
3203
3204   ;
3205   return 0;
3206 }
3207 _ACEOF
3208 if ac_fn_c_try_compile "$LINENO"; then :
3209   ac_compiler_gnu=yes
3210 else
3211   ac_compiler_gnu=no
3212 fi
3213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3214 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3215
3216 fi
3217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3218 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3219 if test $ac_compiler_gnu = yes; then
3220   GCC=yes
3221 else
3222   GCC=
3223 fi
3224 ac_test_CFLAGS=${CFLAGS+set}
3225 ac_save_CFLAGS=$CFLAGS
3226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3227 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3228 if ${ac_cv_prog_cc_g+:} false; then :
3229   $as_echo_n "(cached) " >&6
3230 else
3231   ac_save_c_werror_flag=$ac_c_werror_flag
3232    ac_c_werror_flag=yes
3233    ac_cv_prog_cc_g=no
3234    CFLAGS="-g"
3235    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3236 /* end confdefs.h.  */
3237
3238 int
3239 main ()
3240 {
3241
3242   ;
3243   return 0;
3244 }
3245 _ACEOF
3246 if ac_fn_c_try_compile "$LINENO"; then :
3247   ac_cv_prog_cc_g=yes
3248 else
3249   CFLAGS=""
3250       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3251 /* end confdefs.h.  */
3252
3253 int
3254 main ()
3255 {
3256
3257   ;
3258   return 0;
3259 }
3260 _ACEOF
3261 if ac_fn_c_try_compile "$LINENO"; then :
3262
3263 else
3264   ac_c_werror_flag=$ac_save_c_werror_flag
3265          CFLAGS="-g"
3266          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3267 /* end confdefs.h.  */
3268
3269 int
3270 main ()
3271 {
3272
3273   ;
3274   return 0;
3275 }
3276 _ACEOF
3277 if ac_fn_c_try_compile "$LINENO"; then :
3278   ac_cv_prog_cc_g=yes
3279 fi
3280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3281 fi
3282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3283 fi
3284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3285    ac_c_werror_flag=$ac_save_c_werror_flag
3286 fi
3287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3288 $as_echo "$ac_cv_prog_cc_g" >&6; }
3289 if test "$ac_test_CFLAGS" = set; then
3290   CFLAGS=$ac_save_CFLAGS
3291 elif test $ac_cv_prog_cc_g = yes; then
3292   if test "$GCC" = yes; then
3293     CFLAGS="-g -O2"
3294   else
3295     CFLAGS="-g"
3296   fi
3297 else
3298   if test "$GCC" = yes; then
3299     CFLAGS="-O2"
3300   else
3301     CFLAGS=
3302   fi
3303 fi
3304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3305 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3306 if ${ac_cv_prog_cc_c89+:} false; then :
3307   $as_echo_n "(cached) " >&6
3308 else
3309   ac_cv_prog_cc_c89=no
3310 ac_save_CC=$CC
3311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3312 /* end confdefs.h.  */
3313 #include <stdarg.h>
3314 #include <stdio.h>
3315 struct stat;
3316 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3317 struct buf { int x; };
3318 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3319 static char *e (p, i)
3320      char **p;
3321      int i;
3322 {
3323   return p[i];
3324 }
3325 static char *f (char * (*g) (char **, int), char **p, ...)
3326 {
3327   char *s;
3328   va_list v;
3329   va_start (v,p);
3330   s = g (p, va_arg (v,int));
3331   va_end (v);
3332   return s;
3333 }
3334
3335 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3336    function prototypes and stuff, but not '\xHH' hex character constants.
3337    These don't provoke an error unfortunately, instead are silently treated
3338    as 'x'.  The following induces an error, until -std is added to get
3339    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3340    array size at least.  It's necessary to write '\x00'==0 to get something
3341    that's true only with -std.  */
3342 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3343
3344 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3345    inside strings and character constants.  */
3346 #define FOO(x) 'x'
3347 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3348
3349 int test (int i, double x);
3350 struct s1 {int (*f) (int a);};
3351 struct s2 {int (*f) (double a);};
3352 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3353 int argc;
3354 char **argv;
3355 int
3356 main ()
3357 {
3358 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3359   ;
3360   return 0;
3361 }
3362 _ACEOF
3363 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3364         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3365 do
3366   CC="$ac_save_CC $ac_arg"
3367   if ac_fn_c_try_compile "$LINENO"; then :
3368   ac_cv_prog_cc_c89=$ac_arg
3369 fi
3370 rm -f core conftest.err conftest.$ac_objext
3371   test "x$ac_cv_prog_cc_c89" != "xno" && break
3372 done
3373 rm -f conftest.$ac_ext
3374 CC=$ac_save_CC
3375
3376 fi
3377 # AC_CACHE_VAL
3378 case "x$ac_cv_prog_cc_c89" in
3379   x)
3380     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3381 $as_echo "none needed" >&6; } ;;
3382   xno)
3383     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3384 $as_echo "unsupported" >&6; } ;;
3385   *)
3386     CC="$CC $ac_cv_prog_cc_c89"
3387     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3388 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3389 esac
3390 if test "x$ac_cv_prog_cc_c89" != xno; then :
3391
3392 fi
3393
3394 ac_ext=c
3395 ac_cpp='$CPP $CPPFLAGS'
3396 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3397 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3398 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3399
3400 ac_ext=cpp
3401 ac_cpp='$CXXCPP $CPPFLAGS'
3402 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3403 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3404 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3405 if test -z "$CXX"; then
3406   if test -n "$CCC"; then
3407     CXX=$CCC
3408   else
3409     if test -n "$ac_tool_prefix"; then
3410   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3411   do
3412     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3413 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3415 $as_echo_n "checking for $ac_word... " >&6; }
3416 if ${ac_cv_prog_CXX+:} false; then :
3417   $as_echo_n "(cached) " >&6
3418 else
3419   if test -n "$CXX"; then
3420   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3421 else
3422 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3423 for as_dir in $PATH
3424 do
3425   IFS=$as_save_IFS
3426   test -z "$as_dir" && as_dir=.
3427     for ac_exec_ext in '' $ac_executable_extensions; do
3428   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3429     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3430     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3431     break 2
3432   fi
3433 done
3434   done
3435 IFS=$as_save_IFS
3436
3437 fi
3438 fi
3439 CXX=$ac_cv_prog_CXX
3440 if test -n "$CXX"; then
3441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3442 $as_echo "$CXX" >&6; }
3443 else
3444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3445 $as_echo "no" >&6; }
3446 fi
3447
3448
3449     test -n "$CXX" && break
3450   done
3451 fi
3452 if test -z "$CXX"; then
3453   ac_ct_CXX=$CXX
3454   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3455 do
3456   # Extract the first word of "$ac_prog", so it can be a program name with args.
3457 set dummy $ac_prog; ac_word=$2
3458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3459 $as_echo_n "checking for $ac_word... " >&6; }
3460 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3461   $as_echo_n "(cached) " >&6
3462 else
3463   if test -n "$ac_ct_CXX"; then
3464   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3465 else
3466 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3467 for as_dir in $PATH
3468 do
3469   IFS=$as_save_IFS
3470   test -z "$as_dir" && as_dir=.
3471     for ac_exec_ext in '' $ac_executable_extensions; do
3472   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3473     ac_cv_prog_ac_ct_CXX="$ac_prog"
3474     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3475     break 2
3476   fi
3477 done
3478   done
3479 IFS=$as_save_IFS
3480
3481 fi
3482 fi
3483 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3484 if test -n "$ac_ct_CXX"; then
3485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3486 $as_echo "$ac_ct_CXX" >&6; }
3487 else
3488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3489 $as_echo "no" >&6; }
3490 fi
3491
3492
3493   test -n "$ac_ct_CXX" && break
3494 done
3495
3496   if test "x$ac_ct_CXX" = x; then
3497     CXX="g++"
3498   else
3499     case $cross_compiling:$ac_tool_warned in
3500 yes:)
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3502 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3503 ac_tool_warned=yes ;;
3504 esac
3505     CXX=$ac_ct_CXX
3506   fi
3507 fi
3508
3509   fi
3510 fi
3511 # Provide some information about the compiler.
3512 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3513 set X $ac_compile
3514 ac_compiler=$2
3515 for ac_option in --version -v -V -qversion; do
3516   { { ac_try="$ac_compiler $ac_option >&5"
3517 case "(($ac_try" in
3518   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3519   *) ac_try_echo=$ac_try;;
3520 esac
3521 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3522 $as_echo "$ac_try_echo"; } >&5
3523   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3524   ac_status=$?
3525   if test -s conftest.err; then
3526     sed '10a\
3527 ... rest of stderr output deleted ...
3528          10q' conftest.err >conftest.er1
3529     cat conftest.er1 >&5
3530   fi
3531   rm -f conftest.er1 conftest.err
3532   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3533   test $ac_status = 0; }
3534 done
3535
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3537 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3538 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3539   $as_echo_n "(cached) " >&6
3540 else
3541   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3542 /* end confdefs.h.  */
3543
3544 int
3545 main ()
3546 {
3547 #ifndef __GNUC__
3548        choke me
3549 #endif
3550
3551   ;
3552   return 0;
3553 }
3554 _ACEOF
3555 if ac_fn_cxx_try_compile "$LINENO"; then :
3556   ac_compiler_gnu=yes
3557 else
3558   ac_compiler_gnu=no
3559 fi
3560 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3561 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3562
3563 fi
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3565 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3566 if test $ac_compiler_gnu = yes; then
3567   GXX=yes
3568 else
3569   GXX=
3570 fi
3571 ac_test_CXXFLAGS=${CXXFLAGS+set}
3572 ac_save_CXXFLAGS=$CXXFLAGS
3573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3574 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3575 if ${ac_cv_prog_cxx_g+:} false; then :
3576   $as_echo_n "(cached) " >&6
3577 else
3578   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3579    ac_cxx_werror_flag=yes
3580    ac_cv_prog_cxx_g=no
3581    CXXFLAGS="-g"
3582    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3583 /* end confdefs.h.  */
3584
3585 int
3586 main ()
3587 {
3588
3589   ;
3590   return 0;
3591 }
3592 _ACEOF
3593 if ac_fn_cxx_try_compile "$LINENO"; then :
3594   ac_cv_prog_cxx_g=yes
3595 else
3596   CXXFLAGS=""
3597       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3598 /* end confdefs.h.  */
3599
3600 int
3601 main ()
3602 {
3603
3604   ;
3605   return 0;
3606 }
3607 _ACEOF
3608 if ac_fn_cxx_try_compile "$LINENO"; then :
3609
3610 else
3611   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3612          CXXFLAGS="-g"
3613          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3614 /* end confdefs.h.  */
3615
3616 int
3617 main ()
3618 {
3619
3620   ;
3621   return 0;
3622 }
3623 _ACEOF
3624 if ac_fn_cxx_try_compile "$LINENO"; then :
3625   ac_cv_prog_cxx_g=yes
3626 fi
3627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3628 fi
3629 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3630 fi
3631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3632    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3633 fi
3634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3635 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3636 if test "$ac_test_CXXFLAGS" = set; then
3637   CXXFLAGS=$ac_save_CXXFLAGS
3638 elif test $ac_cv_prog_cxx_g = yes; then
3639   if test "$GXX" = yes; then
3640     CXXFLAGS="-g -O2"
3641   else
3642     CXXFLAGS="-g"
3643   fi
3644 else
3645   if test "$GXX" = yes; then
3646     CXXFLAGS="-O2"
3647   else
3648     CXXFLAGS=
3649   fi
3650 fi
3651 ac_ext=c
3652 ac_cpp='$CPP $CPPFLAGS'
3653 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3654 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3655 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3656
3657
3658
3659 ac_ext=c
3660 ac_cpp='$CPP $CPPFLAGS'
3661 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3662 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3663 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3665 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3666 # On Suns, sometimes $CPP names a directory.
3667 if test -n "$CPP" && test -d "$CPP"; then
3668   CPP=
3669 fi
3670 if test -z "$CPP"; then
3671   if ${ac_cv_prog_CPP+:} false; then :
3672   $as_echo_n "(cached) " >&6
3673 else
3674       # Double quotes because CPP needs to be expanded
3675     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3676     do
3677       ac_preproc_ok=false
3678 for ac_c_preproc_warn_flag in '' yes
3679 do
3680   # Use a header file that comes with gcc, so configuring glibc
3681   # with a fresh cross-compiler works.
3682   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3683   # <limits.h> exists even on freestanding compilers.
3684   # On the NeXT, cc -E runs the code through the compiler's parser,
3685   # not just through cpp. "Syntax error" is here to catch this case.
3686   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3687 /* end confdefs.h.  */
3688 #ifdef __STDC__
3689 # include <limits.h>
3690 #else
3691 # include <assert.h>
3692 #endif
3693                      Syntax error
3694 _ACEOF
3695 if ac_fn_c_try_cpp "$LINENO"; then :
3696
3697 else
3698   # Broken: fails on valid input.
3699 continue
3700 fi
3701 rm -f conftest.err conftest.i conftest.$ac_ext
3702
3703   # OK, works on sane cases.  Now check whether nonexistent headers
3704   # can be detected and how.
3705   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3706 /* end confdefs.h.  */
3707 #include <ac_nonexistent.h>
3708 _ACEOF
3709 if ac_fn_c_try_cpp "$LINENO"; then :
3710   # Broken: success on invalid input.
3711 continue
3712 else
3713   # Passes both tests.
3714 ac_preproc_ok=:
3715 break
3716 fi
3717 rm -f conftest.err conftest.i conftest.$ac_ext
3718
3719 done
3720 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3721 rm -f conftest.i conftest.err conftest.$ac_ext
3722 if $ac_preproc_ok; then :
3723   break
3724 fi
3725
3726     done
3727     ac_cv_prog_CPP=$CPP
3728
3729 fi
3730   CPP=$ac_cv_prog_CPP
3731 else
3732   ac_cv_prog_CPP=$CPP
3733 fi
3734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3735 $as_echo "$CPP" >&6; }
3736 ac_preproc_ok=false
3737 for ac_c_preproc_warn_flag in '' yes
3738 do
3739   # Use a header file that comes with gcc, so configuring glibc
3740   # with a fresh cross-compiler works.
3741   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3742   # <limits.h> exists even on freestanding compilers.
3743   # On the NeXT, cc -E runs the code through the compiler's parser,
3744   # not just through cpp. "Syntax error" is here to catch this case.
3745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3746 /* end confdefs.h.  */
3747 #ifdef __STDC__
3748 # include <limits.h>
3749 #else
3750 # include <assert.h>
3751 #endif
3752                      Syntax error
3753 _ACEOF
3754 if ac_fn_c_try_cpp "$LINENO"; then :
3755
3756 else
3757   # Broken: fails on valid input.
3758 continue
3759 fi
3760 rm -f conftest.err conftest.i conftest.$ac_ext
3761
3762   # OK, works on sane cases.  Now check whether nonexistent headers
3763   # can be detected and how.
3764   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3765 /* end confdefs.h.  */
3766 #include <ac_nonexistent.h>
3767 _ACEOF
3768 if ac_fn_c_try_cpp "$LINENO"; then :
3769   # Broken: success on invalid input.
3770 continue
3771 else
3772   # Passes both tests.
3773 ac_preproc_ok=:
3774 break
3775 fi
3776 rm -f conftest.err conftest.i conftest.$ac_ext
3777
3778 done
3779 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3780 rm -f conftest.i conftest.err conftest.$ac_ext
3781 if $ac_preproc_ok; then :
3782
3783 else
3784   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3785 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3786 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3787 See \`config.log' for more details" "$LINENO" 5; }
3788 fi
3789
3790 ac_ext=c
3791 ac_cpp='$CPP $CPPFLAGS'
3792 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3793 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3794 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3795
3796
3797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3798 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3799 if ${ac_cv_path_GREP+:} false; then :
3800   $as_echo_n "(cached) " >&6
3801 else
3802   if test -z "$GREP"; then
3803   ac_path_GREP_found=false
3804   # Loop through the user's path and test for each of PROGNAME-LIST
3805   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3806 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3807 do
3808   IFS=$as_save_IFS
3809   test -z "$as_dir" && as_dir=.
3810     for ac_prog in grep ggrep; do
3811     for ac_exec_ext in '' $ac_executable_extensions; do
3812       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3813       as_fn_executable_p "$ac_path_GREP" || continue
3814 # Check for GNU ac_path_GREP and select it if it is found.
3815   # Check for GNU $ac_path_GREP
3816 case `"$ac_path_GREP" --version 2>&1` in
3817 *GNU*)
3818   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3819 *)
3820   ac_count=0
3821   $as_echo_n 0123456789 >"conftest.in"
3822   while :
3823   do
3824     cat "conftest.in" "conftest.in" >"conftest.tmp"
3825     mv "conftest.tmp" "conftest.in"
3826     cp "conftest.in" "conftest.nl"
3827     $as_echo 'GREP' >> "conftest.nl"
3828     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3829     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3830     as_fn_arith $ac_count + 1 && ac_count=$as_val
3831     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3832       # Best one so far, save it but keep looking for a better one
3833       ac_cv_path_GREP="$ac_path_GREP"
3834       ac_path_GREP_max=$ac_count
3835     fi
3836     # 10*(2^10) chars as input seems more than enough
3837     test $ac_count -gt 10 && break
3838   done
3839   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3840 esac
3841
3842       $ac_path_GREP_found && break 3
3843     done
3844   done
3845   done
3846 IFS=$as_save_IFS
3847   if test -z "$ac_cv_path_GREP"; then
3848     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3849   fi
3850 else
3851   ac_cv_path_GREP=$GREP
3852 fi
3853
3854 fi
3855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3856 $as_echo "$ac_cv_path_GREP" >&6; }
3857  GREP="$ac_cv_path_GREP"
3858
3859
3860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3861 $as_echo_n "checking for egrep... " >&6; }
3862 if ${ac_cv_path_EGREP+:} false; then :
3863   $as_echo_n "(cached) " >&6
3864 else
3865   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3866    then ac_cv_path_EGREP="$GREP -E"
3867    else
3868      if test -z "$EGREP"; then
3869   ac_path_EGREP_found=false
3870   # Loop through the user's path and test for each of PROGNAME-LIST
3871   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3872 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3873 do
3874   IFS=$as_save_IFS
3875   test -z "$as_dir" && as_dir=.
3876     for ac_prog in egrep; do
3877     for ac_exec_ext in '' $ac_executable_extensions; do
3878       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3879       as_fn_executable_p "$ac_path_EGREP" || continue
3880 # Check for GNU ac_path_EGREP and select it if it is found.
3881   # Check for GNU $ac_path_EGREP
3882 case `"$ac_path_EGREP" --version 2>&1` in
3883 *GNU*)
3884   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3885 *)
3886   ac_count=0
3887   $as_echo_n 0123456789 >"conftest.in"
3888   while :
3889   do
3890     cat "conftest.in" "conftest.in" >"conftest.tmp"
3891     mv "conftest.tmp" "conftest.in"
3892     cp "conftest.in" "conftest.nl"
3893     $as_echo 'EGREP' >> "conftest.nl"
3894     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3895     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3896     as_fn_arith $ac_count + 1 && ac_count=$as_val
3897     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3898       # Best one so far, save it but keep looking for a better one
3899       ac_cv_path_EGREP="$ac_path_EGREP"
3900       ac_path_EGREP_max=$ac_count
3901     fi
3902     # 10*(2^10) chars as input seems more than enough
3903     test $ac_count -gt 10 && break
3904   done
3905   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3906 esac
3907
3908       $ac_path_EGREP_found && break 3
3909     done
3910   done
3911   done
3912 IFS=$as_save_IFS
3913   if test -z "$ac_cv_path_EGREP"; then
3914     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3915   fi
3916 else
3917   ac_cv_path_EGREP=$EGREP
3918 fi
3919
3920    fi
3921 fi
3922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3923 $as_echo "$ac_cv_path_EGREP" >&6; }
3924  EGREP="$ac_cv_path_EGREP"
3925
3926
3927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3928 $as_echo_n "checking for ANSI C header files... " >&6; }
3929 if ${ac_cv_header_stdc+:} false; then :
3930   $as_echo_n "(cached) " >&6
3931 else
3932   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3933 /* end confdefs.h.  */
3934 #include <stdlib.h>
3935 #include <stdarg.h>
3936 #include <string.h>
3937 #include <float.h>
3938
3939 int
3940 main ()
3941 {
3942
3943   ;
3944   return 0;
3945 }
3946 _ACEOF
3947 if ac_fn_c_try_compile "$LINENO"; then :
3948   ac_cv_header_stdc=yes
3949 else
3950   ac_cv_header_stdc=no
3951 fi
3952 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3953
3954 if test $ac_cv_header_stdc = yes; then
3955   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3956   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3957 /* end confdefs.h.  */
3958 #include <string.h>
3959
3960 _ACEOF
3961 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3962   $EGREP "memchr" >/dev/null 2>&1; then :
3963
3964 else
3965   ac_cv_header_stdc=no
3966 fi
3967 rm -f conftest*
3968
3969 fi
3970
3971 if test $ac_cv_header_stdc = yes; then
3972   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3973   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3974 /* end confdefs.h.  */
3975 #include <stdlib.h>
3976
3977 _ACEOF
3978 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3979   $EGREP "free" >/dev/null 2>&1; then :
3980
3981 else
3982   ac_cv_header_stdc=no
3983 fi
3984 rm -f conftest*
3985
3986 fi
3987
3988 if test $ac_cv_header_stdc = yes; then
3989   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3990   if test "$cross_compiling" = yes; then :
3991   :
3992 else
3993   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3994 /* end confdefs.h.  */
3995 #include <ctype.h>
3996 #include <stdlib.h>
3997 #if ((' ' & 0x0FF) == 0x020)
3998 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3999 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4000 #else
4001 # define ISLOWER(c) \
4002                    (('a' <= (c) && (c) <= 'i') \
4003                      || ('j' <= (c) && (c) <= 'r') \
4004                      || ('s' <= (c) && (c) <= 'z'))
4005 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4006 #endif
4007
4008 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4009 int
4010 main ()
4011 {
4012   int i;
4013   for (i = 0; i < 256; i++)
4014     if (XOR (islower (i), ISLOWER (i))
4015         || toupper (i) != TOUPPER (i))
4016       return 2;
4017   return 0;
4018 }
4019 _ACEOF
4020 if ac_fn_c_try_run "$LINENO"; then :
4021
4022 else
4023   ac_cv_header_stdc=no
4024 fi
4025 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4026   conftest.$ac_objext conftest.beam conftest.$ac_ext
4027 fi
4028
4029 fi
4030 fi
4031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4032 $as_echo "$ac_cv_header_stdc" >&6; }
4033 if test $ac_cv_header_stdc = yes; then
4034
4035 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4036
4037 fi
4038
4039 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4040 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4041                   inttypes.h stdint.h unistd.h
4042 do :
4043   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4044 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4045 "
4046 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4047   cat >>confdefs.h <<_ACEOF
4048 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4049 _ACEOF
4050
4051 fi
4052
4053 done
4054
4055
4056
4057   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4058 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4059   MINIX=yes
4060 else
4061   MINIX=
4062 fi
4063
4064
4065   if test "$MINIX" = yes; then
4066
4067 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4068
4069
4070 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4071
4072
4073 $as_echo "#define _MINIX 1" >>confdefs.h
4074
4075   fi
4076
4077
4078   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4079 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4080 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4081   $as_echo_n "(cached) " >&6
4082 else
4083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4084 /* end confdefs.h.  */
4085
4086 #         define __EXTENSIONS__ 1
4087           $ac_includes_default
4088 int
4089 main ()
4090 {
4091
4092   ;
4093   return 0;
4094 }
4095 _ACEOF
4096 if ac_fn_c_try_compile "$LINENO"; then :
4097   ac_cv_safe_to_define___extensions__=yes
4098 else
4099   ac_cv_safe_to_define___extensions__=no
4100 fi
4101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4102 fi
4103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4104 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4105   test $ac_cv_safe_to_define___extensions__ = yes &&
4106     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4107
4108   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4109
4110   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4111
4112   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4113
4114   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4115
4116
4117
4118
4119 if test $ac_cv_c_compiler_gnu = yes; then
4120     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
4121 $as_echo_n "checking whether $CC needs -traditional... " >&6; }
4122 if ${ac_cv_prog_gcc_traditional+:} false; then :
4123   $as_echo_n "(cached) " >&6
4124 else
4125     ac_pattern="Autoconf.*'x'"
4126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4127 /* end confdefs.h.  */
4128 #include <sgtty.h>
4129 Autoconf TIOCGETP
4130 _ACEOF
4131 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4132   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
4133   ac_cv_prog_gcc_traditional=yes
4134 else
4135   ac_cv_prog_gcc_traditional=no
4136 fi
4137 rm -f conftest*
4138
4139
4140   if test $ac_cv_prog_gcc_traditional = no; then
4141     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4142 /* end confdefs.h.  */
4143 #include <termio.h>
4144 Autoconf TCGETA
4145 _ACEOF
4146 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4147   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
4148   ac_cv_prog_gcc_traditional=yes
4149 fi
4150 rm -f conftest*
4151
4152   fi
4153 fi
4154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
4155 $as_echo "$ac_cv_prog_gcc_traditional" >&6; }
4156   if test $ac_cv_prog_gcc_traditional = yes; then
4157     CC="$CC -traditional"
4158   fi
4159 fi
4160
4161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using SUNPro C" >&5
4162 $as_echo_n "checking whether we are using SUNPro C... " >&6; }
4163 if ${ac_cv_prog_suncc+:} false; then :
4164   $as_echo_n "(cached) " >&6
4165 else
4166   cat > conftest.c <<EOF
4167 #ifdef __SUNPRO_C
4168   yes;
4169 #endif
4170 EOF
4171 if { ac_try='${CC-cc} -E conftest.c'
4172   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
4173   (eval $ac_try) 2>&5
4174   ac_status=$?
4175   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4176   test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
4177   ac_cv_prog_suncc=yes
4178 else
4179   ac_cv_prog_suncc=no
4180 fi
4181 fi
4182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_suncc" >&5
4183 $as_echo "$ac_cv_prog_suncc" >&6; }
4184 if test -n "$ac_tool_prefix"; then
4185   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4186 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4188 $as_echo_n "checking for $ac_word... " >&6; }
4189 if ${ac_cv_prog_RANLIB+:} false; then :
4190   $as_echo_n "(cached) " >&6
4191 else
4192   if test -n "$RANLIB"; then
4193   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4194 else
4195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4196 for as_dir in $PATH
4197 do
4198   IFS=$as_save_IFS
4199   test -z "$as_dir" && as_dir=.
4200     for ac_exec_ext in '' $ac_executable_extensions; do
4201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4202     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4204     break 2
4205   fi
4206 done
4207   done
4208 IFS=$as_save_IFS
4209
4210 fi
4211 fi
4212 RANLIB=$ac_cv_prog_RANLIB
4213 if test -n "$RANLIB"; then
4214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4215 $as_echo "$RANLIB" >&6; }
4216 else
4217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4218 $as_echo "no" >&6; }
4219 fi
4220
4221
4222 fi
4223 if test -z "$ac_cv_prog_RANLIB"; then
4224   ac_ct_RANLIB=$RANLIB
4225   # Extract the first word of "ranlib", so it can be a program name with args.
4226 set dummy ranlib; ac_word=$2
4227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4228 $as_echo_n "checking for $ac_word... " >&6; }
4229 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4230   $as_echo_n "(cached) " >&6
4231 else
4232   if test -n "$ac_ct_RANLIB"; then
4233   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4234 else
4235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4236 for as_dir in $PATH
4237 do
4238   IFS=$as_save_IFS
4239   test -z "$as_dir" && as_dir=.
4240     for ac_exec_ext in '' $ac_executable_extensions; do
4241   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4242     ac_cv_prog_ac_ct_RANLIB="ranlib"
4243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4244     break 2
4245   fi
4246 done
4247   done
4248 IFS=$as_save_IFS
4249
4250 fi
4251 fi
4252 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4253 if test -n "$ac_ct_RANLIB"; then
4254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4255 $as_echo "$ac_ct_RANLIB" >&6; }
4256 else
4257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4258 $as_echo "no" >&6; }
4259 fi
4260
4261   if test "x$ac_ct_RANLIB" = x; then
4262     RANLIB=":"
4263   else
4264     case $cross_compiling:$ac_tool_warned in
4265 yes:)
4266 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4267 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4268 ac_tool_warned=yes ;;
4269 esac
4270     RANLIB=$ac_ct_RANLIB
4271   fi
4272 else
4273   RANLIB="$ac_cv_prog_RANLIB"
4274 fi
4275
4276
4277
4278   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is clang" >&5
4279 $as_echo_n "checking if compiler is clang... " >&6; }
4280 if ${ax_cv_cc_clang+:} false; then :
4281   $as_echo_n "(cached) " >&6
4282 else
4283
4284
4285   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4286 /* end confdefs.h.  */
4287
4288 int
4289 main ()
4290 {
4291
4292     #ifndef __clang__
4293          not clang
4294     #endif
4295
4296   ;
4297   return 0;
4298 }
4299 _ACEOF
4300 if ac_fn_c_try_compile "$LINENO"; then :
4301   ax_cv_cc_clang=yes
4302 else
4303   ax_cv_cc_clang=no
4304 fi
4305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4306
4307 fi
4308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_clang" >&5
4309 $as_echo "$ax_cv_cc_clang" >&6; }
4310
4311 if test "x$ax_cv_cc_clang" = "xyes"; then
4312   clang_path="$CC"
4313
4314 else
4315   clang_path=""
4316
4317 fi
4318
4319
4320 if test "x$GCC" = "xyes"; then
4321   CFLAGS="$CFLAGS -Wall -std=c99 -D_GNU_SOURCE"
4322 fi
4323
4324
4325   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Qunused-arguments\"" >&5
4326 $as_echo_n "checking for the compiler flag \"-Qunused-arguments\"... " >&6; }
4327 if ${ax_cv_cc_qunused_arguments_flag+:} false; then :
4328   $as_echo_n "(cached) " >&6
4329 else
4330
4331
4332     CFLAGS_SAVED=$CFLAGS
4333     CFLAGS="$CFLAGS -Werror -Qunused-arguments -foobar"
4334
4335     ac_ext=c
4336 ac_cpp='$CPP $CPPFLAGS'
4337 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4338 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4339 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4340
4341     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4342 /* end confdefs.h.  */
4343
4344 int
4345 main ()
4346 {
4347 return 0;
4348   ;
4349   return 0;
4350 }
4351 _ACEOF
4352 if ac_fn_c_try_compile "$LINENO"; then :
4353   ax_cv_cc_qunused_arguments_flag="yes"
4354 else
4355   ax_cv_cc_qunused_arguments_flag="no"
4356 fi
4357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4358     ac_ext=c
4359 ac_cpp='$CPP $CPPFLAGS'
4360 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4361 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4362 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4363
4364
4365     CFLAGS="$CFLAGS_SAVED"
4366
4367 fi
4368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_qunused_arguments_flag" >&5
4369 $as_echo "$ax_cv_cc_qunused_arguments_flag" >&6; }
4370
4371 if test "x$ax_cv_cc_qunused_arguments_flag" = "xyes"; then
4372   CFLAGS="$CFLAGS -Qunused-arguments"
4373   LDFLAGS="$LDFLAGS -Qunused-arguments"
4374 fi
4375
4376 # Check whether --enable-largefile was given.
4377 if test "${enable_largefile+set}" = set; then :
4378   enableval=$enable_largefile;
4379 fi
4380
4381 if test "$enable_largefile" != no; then
4382
4383   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4384 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4385 if ${ac_cv_sys_largefile_CC+:} false; then :
4386   $as_echo_n "(cached) " >&6
4387 else
4388   ac_cv_sys_largefile_CC=no
4389      if test "$GCC" != yes; then
4390        ac_save_CC=$CC
4391        while :; do
4392          # IRIX 6.2 and later do not support large files by default,
4393          # so use the C compiler's -n32 option if that helps.
4394          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4395 /* end confdefs.h.  */
4396 #include <sys/types.h>
4397  /* Check that off_t can represent 2**63 - 1 correctly.
4398     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4399     since some C++ compilers masquerading as C compilers
4400     incorrectly reject 9223372036854775807.  */
4401 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4402   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4403                        && LARGE_OFF_T % 2147483647 == 1)
4404                       ? 1 : -1];
4405 int
4406 main ()
4407 {
4408
4409   ;
4410   return 0;
4411 }
4412 _ACEOF
4413          if ac_fn_c_try_compile "$LINENO"; then :
4414   break
4415 fi
4416 rm -f core conftest.err conftest.$ac_objext
4417          CC="$CC -n32"
4418          if ac_fn_c_try_compile "$LINENO"; then :
4419   ac_cv_sys_largefile_CC=' -n32'; break
4420 fi
4421 rm -f core conftest.err conftest.$ac_objext
4422          break
4423        done
4424        CC=$ac_save_CC
4425        rm -f conftest.$ac_ext
4426     fi
4427 fi
4428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4429 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4430   if test "$ac_cv_sys_largefile_CC" != no; then
4431     CC=$CC$ac_cv_sys_largefile_CC
4432   fi
4433
4434   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4435 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4436 if ${ac_cv_sys_file_offset_bits+:} false; then :
4437   $as_echo_n "(cached) " >&6
4438 else
4439   while :; do
4440   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4441 /* end confdefs.h.  */
4442 #include <sys/types.h>
4443  /* Check that off_t can represent 2**63 - 1 correctly.
4444     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4445     since some C++ compilers masquerading as C compilers
4446     incorrectly reject 9223372036854775807.  */
4447 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4448   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4449                        && LARGE_OFF_T % 2147483647 == 1)
4450                       ? 1 : -1];
4451 int
4452 main ()
4453 {
4454
4455   ;
4456   return 0;
4457 }
4458 _ACEOF
4459 if ac_fn_c_try_compile "$LINENO"; then :
4460   ac_cv_sys_file_offset_bits=no; break
4461 fi
4462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4463   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4464 /* end confdefs.h.  */
4465 #define _FILE_OFFSET_BITS 64
4466 #include <sys/types.h>
4467  /* Check that off_t can represent 2**63 - 1 correctly.
4468     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4469     since some C++ compilers masquerading as C compilers
4470     incorrectly reject 9223372036854775807.  */
4471 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4472   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4473                        && LARGE_OFF_T % 2147483647 == 1)
4474                       ? 1 : -1];
4475 int
4476 main ()
4477 {
4478
4479   ;
4480   return 0;
4481 }
4482 _ACEOF
4483 if ac_fn_c_try_compile "$LINENO"; then :
4484   ac_cv_sys_file_offset_bits=64; break
4485 fi
4486 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4487   ac_cv_sys_file_offset_bits=unknown
4488   break
4489 done
4490 fi
4491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4492 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4493 case $ac_cv_sys_file_offset_bits in #(
4494   no | unknown) ;;
4495   *)
4496 cat >>confdefs.h <<_ACEOF
4497 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4498 _ACEOF
4499 ;;
4500 esac
4501 rm -rf conftest*
4502   if test $ac_cv_sys_file_offset_bits = unknown; then
4503     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4504 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4505 if ${ac_cv_sys_large_files+:} false; then :
4506   $as_echo_n "(cached) " >&6
4507 else
4508   while :; do
4509   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4510 /* end confdefs.h.  */
4511 #include <sys/types.h>
4512  /* Check that off_t can represent 2**63 - 1 correctly.
4513     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4514     since some C++ compilers masquerading as C compilers
4515     incorrectly reject 9223372036854775807.  */
4516 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4517   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4518                        && LARGE_OFF_T % 2147483647 == 1)
4519                       ? 1 : -1];
4520 int
4521 main ()
4522 {
4523
4524   ;
4525   return 0;
4526 }
4527 _ACEOF
4528 if ac_fn_c_try_compile "$LINENO"; then :
4529   ac_cv_sys_large_files=no; break
4530 fi
4531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4532   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4533 /* end confdefs.h.  */
4534 #define _LARGE_FILES 1
4535 #include <sys/types.h>
4536  /* Check that off_t can represent 2**63 - 1 correctly.
4537     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4538     since some C++ compilers masquerading as C compilers
4539     incorrectly reject 9223372036854775807.  */
4540 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4541   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4542                        && LARGE_OFF_T % 2147483647 == 1)
4543                       ? 1 : -1];
4544 int
4545 main ()
4546 {
4547
4548   ;
4549   return 0;
4550 }
4551 _ACEOF
4552 if ac_fn_c_try_compile "$LINENO"; then :
4553   ac_cv_sys_large_files=1; break
4554 fi
4555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4556   ac_cv_sys_large_files=unknown
4557   break
4558 done
4559 fi
4560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4561 $as_echo "$ac_cv_sys_large_files" >&6; }
4562 case $ac_cv_sys_large_files in #(
4563   no | unknown) ;;
4564   *)
4565 cat >>confdefs.h <<_ACEOF
4566 #define _LARGE_FILES $ac_cv_sys_large_files
4567 _ACEOF
4568 ;;
4569 esac
4570 rm -rf conftest*
4571   fi
4572
4573
4574 fi
4575
4576
4577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
4578 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
4579 if ${ac_cv_c_bigendian+:} false; then :
4580   $as_echo_n "(cached) " >&6
4581 else
4582   ac_cv_c_bigendian=unknown
4583     # See if we're dealing with a universal compiler.
4584     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4585 /* end confdefs.h.  */
4586 #ifndef __APPLE_CC__
4587                not a universal capable compiler
4588              #endif
4589              typedef int dummy;
4590
4591 _ACEOF
4592 if ac_fn_c_try_compile "$LINENO"; then :
4593
4594         # Check for potential -arch flags.  It is not universal unless
4595         # there are at least two -arch flags with different values.
4596         ac_arch=
4597         ac_prev=
4598         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
4599          if test -n "$ac_prev"; then
4600            case $ac_word in
4601              i?86 | x86_64 | ppc | ppc64)
4602                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
4603                  ac_arch=$ac_word
4604                else
4605                  ac_cv_c_bigendian=universal
4606                  break
4607                fi
4608                ;;
4609            esac
4610            ac_prev=
4611          elif test "x$ac_word" = "x-arch"; then
4612            ac_prev=arch
4613          fi
4614        done
4615 fi
4616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4617     if test $ac_cv_c_bigendian = unknown; then
4618       # See if sys/param.h defines the BYTE_ORDER macro.
4619       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4620 /* end confdefs.h.  */
4621 #include <sys/types.h>
4622              #include <sys/param.h>
4623
4624 int
4625 main ()
4626 {
4627 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
4628                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
4629                      && LITTLE_ENDIAN)
4630               bogus endian macros
4631              #endif
4632
4633   ;
4634   return 0;
4635 }
4636 _ACEOF
4637 if ac_fn_c_try_compile "$LINENO"; then :
4638   # It does; now see whether it defined to BIG_ENDIAN or not.
4639          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4640 /* end confdefs.h.  */
4641 #include <sys/types.h>
4642                 #include <sys/param.h>
4643
4644 int
4645 main ()
4646 {
4647 #if BYTE_ORDER != BIG_ENDIAN
4648                  not big endian
4649                 #endif
4650
4651   ;
4652   return 0;
4653 }
4654 _ACEOF
4655 if ac_fn_c_try_compile "$LINENO"; then :
4656   ac_cv_c_bigendian=yes
4657 else
4658   ac_cv_c_bigendian=no
4659 fi
4660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4661 fi
4662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4663     fi
4664     if test $ac_cv_c_bigendian = unknown; then
4665       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
4666       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4667 /* end confdefs.h.  */
4668 #include <limits.h>
4669
4670 int
4671 main ()
4672 {
4673 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
4674               bogus endian macros
4675              #endif
4676
4677   ;
4678   return 0;
4679 }
4680 _ACEOF
4681 if ac_fn_c_try_compile "$LINENO"; then :
4682   # It does; now see whether it defined to _BIG_ENDIAN or not.
4683          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4684 /* end confdefs.h.  */
4685 #include <limits.h>
4686
4687 int
4688 main ()
4689 {
4690 #ifndef _BIG_ENDIAN
4691                  not big endian
4692                 #endif
4693
4694   ;
4695   return 0;
4696 }
4697 _ACEOF
4698 if ac_fn_c_try_compile "$LINENO"; then :
4699   ac_cv_c_bigendian=yes
4700 else
4701   ac_cv_c_bigendian=no
4702 fi
4703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4704 fi
4705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4706     fi
4707     if test $ac_cv_c_bigendian = unknown; then
4708       # Compile a test program.
4709       if test "$cross_compiling" = yes; then :
4710   # Try to guess by grepping values from an object file.
4711          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4712 /* end confdefs.h.  */
4713 short int ascii_mm[] =
4714                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4715                 short int ascii_ii[] =
4716                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4717                 int use_ascii (int i) {
4718                   return ascii_mm[i] + ascii_ii[i];
4719                 }
4720                 short int ebcdic_ii[] =
4721                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4722                 short int ebcdic_mm[] =
4723                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4724                 int use_ebcdic (int i) {
4725                   return ebcdic_mm[i] + ebcdic_ii[i];
4726                 }
4727                 extern int foo;
4728
4729 int
4730 main ()
4731 {
4732 return use_ascii (foo) == use_ebcdic (foo);
4733   ;
4734   return 0;
4735 }
4736 _ACEOF
4737 if ac_fn_c_try_compile "$LINENO"; then :
4738   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
4739               ac_cv_c_bigendian=yes
4740             fi
4741             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4742               if test "$ac_cv_c_bigendian" = unknown; then
4743                 ac_cv_c_bigendian=no
4744               else
4745                 # finding both strings is unlikely to happen, but who knows?
4746                 ac_cv_c_bigendian=unknown
4747               fi
4748             fi
4749 fi
4750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4751 else
4752   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4753 /* end confdefs.h.  */
4754 $ac_includes_default
4755 int
4756 main ()
4757 {
4758
4759              /* Are we little or big endian?  From Harbison&Steele.  */
4760              union
4761              {
4762                long int l;
4763                char c[sizeof (long int)];
4764              } u;
4765              u.l = 1;
4766              return u.c[sizeof (long int) - 1] == 1;
4767
4768   ;
4769   return 0;
4770 }
4771 _ACEOF
4772 if ac_fn_c_try_run "$LINENO"; then :
4773   ac_cv_c_bigendian=no
4774 else
4775   ac_cv_c_bigendian=yes
4776 fi
4777 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4778   conftest.$ac_objext conftest.beam conftest.$ac_ext
4779 fi
4780
4781     fi
4782 fi
4783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
4784 $as_echo "$ac_cv_c_bigendian" >&6; }
4785  case $ac_cv_c_bigendian in #(
4786    yes)
4787
4788 $as_echo "#define FR_BIG_ENDIAN 1" >>confdefs.h
4789 ;; #(
4790    no)
4791
4792 $as_echo "#define FR_LITTLE_ENDIAN 1" >>confdefs.h
4793
4794  ;; #(
4795    universal)
4796
4797 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
4798
4799      ;; #(
4800    *)
4801      as_fn_error $? "unknown endianness
4802  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
4803  esac
4804
4805
4806 # Extract the first word of "gmake", so it can be a program name with args.
4807 set dummy gmake; ac_word=$2
4808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4809 $as_echo_n "checking for $ac_word... " >&6; }
4810 if ${ac_cv_prog_GMAKE+:} false; then :
4811   $as_echo_n "(cached) " >&6
4812 else
4813   if test -n "$GMAKE"; then
4814   ac_cv_prog_GMAKE="$GMAKE" # Let the user override the test.
4815 else
4816 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4817 for as_dir in $PATH
4818 do
4819   IFS=$as_save_IFS
4820   test -z "$as_dir" && as_dir=.
4821     for ac_exec_ext in '' $ac_executable_extensions; do
4822   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4823     ac_cv_prog_GMAKE="yes"
4824     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4825     break 2
4826   fi
4827 done
4828   done
4829 IFS=$as_save_IFS
4830
4831   test -z "$ac_cv_prog_GMAKE" && ac_cv_prog_GMAKE="no"
4832 fi
4833 fi
4834 GMAKE=$ac_cv_prog_GMAKE
4835 if test -n "$GMAKE"; then
4836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMAKE" >&5
4837 $as_echo "$GMAKE" >&6; }
4838 else
4839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4840 $as_echo "no" >&6; }
4841 fi
4842
4843
4844 if test $GMAKE = no; then
4845   # Extract the first word of "make", so it can be a program name with args.
4846 set dummy make; ac_word=$2
4847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4848 $as_echo_n "checking for $ac_word... " >&6; }
4849 if ${ac_cv_path_MAKE+:} false; then :
4850   $as_echo_n "(cached) " >&6
4851 else
4852   case $MAKE in
4853   [\\/]* | ?:[\\/]*)
4854   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
4855   ;;
4856   *)
4857   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4858 for as_dir in $PATH
4859 do
4860   IFS=$as_save_IFS
4861   test -z "$as_dir" && as_dir=.
4862     for ac_exec_ext in '' $ac_executable_extensions; do
4863   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4864     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
4865     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4866     break 2
4867   fi
4868 done
4869   done
4870 IFS=$as_save_IFS
4871
4872   test -z "$ac_cv_path_MAKE" && ac_cv_path_MAKE="/usr/local/bin/make"
4873   ;;
4874 esac
4875 fi
4876 MAKE=$ac_cv_path_MAKE
4877 if test -n "$MAKE"; then
4878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4879 $as_echo "$MAKE" >&6; }
4880 else
4881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4882 $as_echo "no" >&6; }
4883 fi
4884
4885
4886 else
4887   # Extract the first word of "gmake", so it can be a program name with args.
4888 set dummy gmake; ac_word=$2
4889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4890 $as_echo_n "checking for $ac_word... " >&6; }
4891 if ${ac_cv_path_MAKE+:} false; then :
4892   $as_echo_n "(cached) " >&6
4893 else
4894   case $MAKE in
4895   [\\/]* | ?:[\\/]*)
4896   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
4897   ;;
4898   *)
4899   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4900 for as_dir in $PATH
4901 do
4902   IFS=$as_save_IFS
4903   test -z "$as_dir" && as_dir=.
4904     for ac_exec_ext in '' $ac_executable_extensions; do
4905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4906     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
4907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4908     break 2
4909   fi
4910 done
4911   done
4912 IFS=$as_save_IFS
4913
4914   test -z "$ac_cv_path_MAKE" && ac_cv_path_MAKE="/usr/local/gnu/bin/make"
4915   ;;
4916 esac
4917 fi
4918 MAKE=$ac_cv_path_MAKE
4919 if test -n "$MAKE"; then
4920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4921 $as_echo "$MAKE" >&6; }
4922 else
4923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4924 $as_echo "no" >&6; }
4925 fi
4926
4927
4928 fi
4929 makever=`$ac_cv_path_MAKE --version 2>&1 | grep "GNU Make"`
4930 if test -z "$makever"; then
4931   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
4932 fi
4933
4934
4935   { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of system cores" >&5
4936 $as_echo_n "checking number of system cores... " >&6; }
4937 if ${ax_cv_system_cores+:} false; then :
4938   $as_echo_n "(cached) " >&6
4939 else
4940
4941       ac_ext=c
4942 ac_cpp='$CPP $CPPFLAGS'
4943 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4944 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4945 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4946
4947       if test "$cross_compiling" = yes; then :
4948   ax_cv_system_cores=
4949
4950 else
4951   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4952 /* end confdefs.h.  */
4953
4954           #include <stdio.h>
4955           #include <stdint.h>
4956           #ifdef _WIN32
4957           #  include <windows.h>
4958           #elif MACOS
4959           #  include <sys/param.h>
4960           #  include <sys/sysctl.h>
4961           #else
4962           #  include <unistd.h>
4963           #endif
4964
4965           int main (int argc, char *argv[])
4966           {
4967             uint32_t count;
4968
4969             #ifdef WIN32
4970             SYSTEM_INFO sysinfo;
4971             GetSystemInfo(&sysinfo);
4972
4973             count = sysinfo.dwNumberOfProcessors;
4974
4975             #elif MACOS
4976             int nm[2];
4977             size_t len = 4;
4978
4979             nm[0] = CTL_HW;
4980             nm[1] = HW_AVAILCPU;
4981             sysctl(nm, 2, &count, &len, NULL, 0);
4982
4983             if(count < 1) {
4984               nm[1] = HW_NCPU;
4985               sysctl(nm, 2, &count, &len, NULL, 0);
4986               if(count < 1) {
4987                 count = 1;
4988               }
4989             }
4990
4991             #else
4992             count = sysconf(_SC_NPROCESSORS_ONLN);
4993             #endif
4994
4995             return count;
4996           }
4997
4998 _ACEOF
4999 if ac_fn_c_try_run "$LINENO"; then :
5000   ax_cv_system_cores=$?
5001 else
5002   ax_cv_system_cores=$?
5003 fi
5004 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5005   conftest.$ac_objext conftest.beam conftest.$ac_ext
5006 fi
5007
5008     ac_ext=c
5009 ac_cpp='$CPP $CPPFLAGS'
5010 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5011 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5012 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5013
5014
5015 fi
5016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_system_cores" >&5
5017 $as_echo "$ax_cv_system_cores" >&6; }
5018
5019
5020
5021
5022 # Extract the first word of "git", so it can be a program name with args.
5023 set dummy git; ac_word=$2
5024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5025 $as_echo_n "checking for $ac_word... " >&6; }
5026 if ${ac_cv_prog_GIT+:} false; then :
5027   $as_echo_n "(cached) " >&6
5028 else
5029   if test -n "$GIT"; then
5030   ac_cv_prog_GIT="$GIT" # Let the user override the test.
5031 else
5032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5033 for as_dir in $PATH
5034 do
5035   IFS=$as_save_IFS
5036   test -z "$as_dir" && as_dir=.
5037     for ac_exec_ext in '' $ac_executable_extensions; do
5038   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5039     ac_cv_prog_GIT="yes"
5040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5041     break 2
5042   fi
5043 done
5044   done
5045 IFS=$as_save_IFS
5046
5047   test -z "$ac_cv_prog_GIT" && ac_cv_prog_GIT="no"
5048 fi
5049 fi
5050 GIT=$ac_cv_prog_GIT
5051 if test -n "$GIT"; then
5052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5
5053 $as_echo "$GIT" >&6; }
5054 else
5055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5056 $as_echo "no" >&6; }
5057 fi
5058
5059
5060
5061
5062 # Check whether --enable-strict-dependencies was given.
5063 if test "${enable_strict_dependencies+set}" = set; then :
5064   enableval=$enable_strict_dependencies;
5065 fi
5066
5067
5068 # Check whether --enable-werror was given.
5069 if test "${enable_werror+set}" = set; then :
5070   enableval=$enable_werror;  case "$enableval" in
5071     no)
5072       werror=no
5073     ;;
5074     *)
5075       werror=yes
5076   esac
5077
5078 fi
5079
5080
5081 docdir='${datadir}/doc/freeradius'
5082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking docdir" >&5
5083 $as_echo_n "checking docdir... " >&6; }
5084
5085 # Check whether --with-docdir was given.
5086 if test "${with_docdir+set}" = set; then :
5087   withval=$with_docdir;  case "$withval" in
5088   no)
5089     docdir=no
5090     ;;
5091   yes)
5092     ;;
5093   [\\/$]* | ?:[\\/]* )
5094     docdir="$withval"
5095     ;;
5096   *)
5097     as_fn_error $? "expected an absolute directory name for --with-docdir: $withval" "$LINENO" 5
5098     ;;
5099   esac
5100
5101 fi
5102
5103
5104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $docdir" >&5
5105 $as_echo "$docdir" >&6; }
5106 if test "x$docdir" = xno; then
5107   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Documentation files will NOT be installed." >&5
5108 $as_echo "$as_me: WARNING: Documentation files will NOT be installed." >&2;}
5109 fi
5110
5111 logdir='${localstatedir}/log/radius'
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking logdir" >&5
5113 $as_echo_n "checking logdir... " >&6; }
5114
5115 # Check whether --with-logdir was given.
5116 if test "${with_logdir+set}" = set; then :
5117   withval=$with_logdir;  case "$withval" in
5118   no)
5119     as_fn_error $? "Need logdir" "$LINENO" 5
5120     ;;
5121   yes)
5122     ;;
5123   [\\/$]* | ?:[\\/]* )
5124     logdir="$withval"
5125     ;;
5126   *)
5127     as_fn_error $? "expected an absolute directory name for --with-logdir: $withval" "$LINENO" 5
5128     ;;
5129   esac
5130
5131 fi
5132
5133
5134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $logdir" >&5
5135 $as_echo "$logdir" >&6; }
5136
5137 radacctdir='${logdir}/radacct'
5138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking radacctdir" >&5
5139 $as_echo_n "checking radacctdir... " >&6; }
5140
5141 # Check whether --with-radacctdir was given.
5142 if test "${with_radacctdir+set}" = set; then :
5143   withval=$with_radacctdir;  case "$withval" in
5144   no)
5145     as_fn_error $? "Need radacctdir" "$LINENO" 5
5146     ;;
5147   yes)
5148     ;;
5149   [\\/$]* | ?:[\\/]* )
5150     radacctdir="$withval"
5151     ;;
5152   *)
5153     as_fn_error $? "expected an absolute directory name for --with-radacctdir: $withval" "$LINENO" 5
5154     ;;
5155   esac
5156
5157 fi
5158
5159
5160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $radacctdir" >&5
5161 $as_echo "$radacctdir" >&6; }
5162
5163 raddbdir='${sysconfdir}/raddb'
5164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking raddbdir" >&5
5165 $as_echo_n "checking raddbdir... " >&6; }
5166
5167 # Check whether --with-raddbdir was given.
5168 if test "${with_raddbdir+set}" = set; then :
5169   withval=$with_raddbdir;  case "$withval" in
5170   no)
5171     as_fn_error $? "Need raddbdir" "$LINENO" 5
5172     ;;
5173   yes)
5174     ;;
5175   [\\/$]* | ?:[\\/]* )
5176     raddbdir="$withval"
5177     ;;
5178   *)
5179     as_fn_error $? "expected an absolute directory name for --with-raddbdir: $withval" "$LINENO" 5
5180     ;;
5181   esac
5182
5183 fi
5184
5185
5186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $raddbdir" >&5
5187 $as_echo "$raddbdir" >&6; }
5188
5189 dictdir='${datarootdir}/freeradius'
5190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dictdir" >&5
5191 $as_echo_n "checking dictdir... " >&6; }
5192
5193 # Check whether --with-dictdir was given.
5194 if test "${with_dictdir+set}" = set; then :
5195   withval=$with_dictdir;  case "$withval" in
5196   no)
5197     as_fn_error $? "Need dictdir" "$LINENO" 5
5198     ;;
5199   yes)
5200     ;;
5201   [\\/$]* | ?:[\\/]* )
5202     dictdir="$withval"
5203     ;;
5204   *)
5205     as_fn_error $? "expected an absolute directory name for --with-dictdir: $withval" "$LINENO" 5
5206     ;;
5207   esac
5208
5209 fi
5210
5211
5212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dictdir" >&5
5213 $as_echo "$dictdir" >&6; }
5214
5215 modconfdir='${raddbdir}/mods-config'
5216
5217
5218 WITH_ASCEND_BINARY=yes
5219
5220 # Check whether --with-ascend-binary was given.
5221 if test "${with_ascend_binary+set}" = set; then :
5222   withval=$with_ascend_binary;  case "$withval" in
5223   yes)
5224     ;;
5225   *)
5226     WITH_ASCEND_BINARY=no
5227   esac
5228
5229 fi
5230
5231 if test "x$WITH_ASCEND_BINARY" = "xyes"; then
5232
5233 $as_echo "#define WITH_ASCEND_BINARY 1" >>confdefs.h
5234
5235 fi
5236
5237 WITH_THREADS=yes
5238
5239 # Check whether --with-threads was given.
5240 if test "${with_threads+set}" = set; then :
5241   withval=$with_threads;  case "$withval" in
5242   yes)
5243     ;;
5244   *)
5245     WITH_THREADS=no
5246   esac
5247
5248 fi
5249
5250
5251 WITH_TCP=yes
5252
5253 # Check whether --with-tcp was given.
5254 if test "${with_tcp+set}" = set; then :
5255   withval=$with_tcp;  case "$withval" in
5256   yes)
5257     ;;
5258   *)
5259     WITH_TCP=no
5260   esac
5261
5262 fi
5263
5264 if test "x$WITH_TCP" = "xyes"; then
5265
5266 $as_echo "#define WITH_TCP 1" >>confdefs.h
5267
5268 fi
5269
5270 WITH_VMPS=yes
5271
5272 # Check whether --with-vmps was given.
5273 if test "${with_vmps+set}" = set; then :
5274   withval=$with_vmps;  case "$withval" in
5275   yes)
5276     ;;
5277   *)
5278     WITH_VMPS=no
5279   esac
5280
5281 fi
5282
5283 if test "x$WITH_VMPS" = "xyes"; then
5284
5285 $as_echo "#define WITH_VMPS 1" >>confdefs.h
5286
5287 fi
5288
5289 WITH_DHCP=yes
5290
5291 # Check whether --with-dhcp was given.
5292 if test "${with_dhcp+set}" = set; then :
5293   withval=$with_dhcp;  case "$withval" in
5294   yes)
5295     ;;
5296   *)
5297     WITH_DHCP=no
5298   esac
5299
5300 fi
5301
5302 if test "x$WITH_DHCP" = "xyes"; then
5303
5304 $as_echo "#define WITH_DHCP 1" >>confdefs.h
5305
5306 fi
5307
5308
5309 STATIC_MODULES=
5310
5311 # Check whether --with-static_modules was given.
5312 if test "${with_static_modules+set}" = set; then :
5313   withval=$with_static_modules;
5314   for i in $withval; do
5315     STATIC_MODULES="$STATIC_MODULES -dlpreopen ../modules/rlm_$i/rlm_$i.la"
5316   done
5317
5318 fi
5319
5320
5321 USE_SHARED_LIBS=yes
5322
5323 # Check whether --with-shared-libs was given.
5324 if test "${with_shared_libs+set}" = set; then :
5325   withval=$with_shared_libs;  case "$withval" in
5326   no)
5327     USE_SHARED_LIBS=no
5328     ;;
5329   *)
5330   esac
5331
5332 fi
5333
5334
5335 MODULES=
5336
5337 # Check whether --with-modules was given.
5338 if test "${with_modules+set}" = set; then :
5339   withval=$with_modules;
5340  for i in $withval; do
5341    MODULES="$MODULES $i"
5342  done
5343
5344 fi
5345
5346
5347 EXPERIMENTAL=
5348
5349 # Check whether --with-experimental-modules was given.
5350 if test "${with_experimental_modules+set}" = set; then :
5351   withval=$with_experimental_modules;  case "$withval" in
5352   yes)
5353     EXPERIMENTAL=yes
5354     ;;
5355   no)
5356     EXPERIMENTAL=no
5357     ;;
5358   *)
5359   esac
5360
5361 fi
5362
5363
5364 WITH_UDPFROMTO=yes
5365
5366 # Check whether --with-udpfromto was given.
5367 if test "${with_udpfromto+set}" = set; then :
5368   withval=$with_udpfromto;  case "$withval" in
5369   yes)
5370     WITH_UDPFROMTO=yes
5371     ;;
5372   *)
5373     WITH_UDPFROMTO=no
5374   esac
5375
5376 fi
5377
5378
5379 if test "x$WITH_UDPFROMTO" = "xyes"; then
5380
5381 $as_echo "#define WITH_UDPFROMTO /**/" >>confdefs.h
5382
5383 fi
5384
5385
5386
5387 # Check whether --with-rlm-FOO-lib-dir was given.
5388 if test "${with_rlm_FOO_lib_dir+set}" = set; then :
5389   withval=$with_rlm_FOO_lib_dir;  case "$withval" in
5390   *)
5391     ;;
5392   esac
5393
5394 fi
5395
5396
5397
5398 # Check whether --with-rlm-FOO-include-dir was given.
5399 if test "${with_rlm_FOO_include_dir+set}" = set; then :
5400   withval=$with_rlm_FOO_include_dir;  case "$withval" in
5401   *)
5402     ;;
5403   esac
5404
5405 fi
5406
5407
5408 WITH_OPENSSL=yes
5409
5410 # Check whether --with-openssl was given.
5411 if test "${with_openssl+set}" = set; then :
5412   withval=$with_openssl;  case "$withval" in
5413   no)
5414     WITH_OPENSSL=no
5415     ;;
5416   *)
5417     WITH_OPENSSL=yes
5418     ;;
5419   esac
5420
5421 fi
5422
5423
5424 openssl_lib_dir=
5425
5426 # Check whether --with-openssl-lib-dir was given.
5427 if test "${with_openssl_lib_dir+set}" = set; then :
5428   withval=$with_openssl_lib_dir;  case "$withval" in
5429   *) openssl_lib_dir="$withval"
5430     ;;
5431   esac
5432
5433 fi
5434
5435
5436 openssl_include_dir=
5437
5438 # Check whether --with-openssl-include-dir was given.
5439 if test "${with_openssl_include_dir+set}" = set; then :
5440   withval=$with_openssl_include_dir;  case "$withval" in
5441   *) openssl_include_dir="$withval"
5442     ;;
5443   esac
5444
5445 fi
5446
5447
5448 # Check whether --enable-openssl-version-check was given.
5449 if test "${enable_openssl_version_check+set}" = set; then :
5450   enableval=$enable_openssl_version_check;
5451 fi
5452
5453 if test "x$enable_openssl_version_check" != "xno"; then
5454
5455 $as_echo "#define ENABLE_OPENSSL_VERSION_CHECK 1" >>confdefs.h
5456
5457   openssl_version_check_config="\
5458         #
5459         #  allow_vulnerable_openssl: Allow the server to start with
5460         #  versions of OpenSSL known to have critical vulnerabilities.
5461         #
5462         #  This check is based on the version number reported by libssl
5463         #  and may not reflect patches applied to libssl by
5464         #  distribution maintainers.
5465         #
5466         allow_vulnerable_openssl = no"
5467 else
5468   openssl_version_check_config=
5469 fi
5470
5471
5472
5473
5474 CHECKRAD=checkrad
5475 # Extract the first word of "perl", so it can be a program name with args.
5476 set dummy perl; ac_word=$2
5477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5478 $as_echo_n "checking for $ac_word... " >&6; }
5479 if ${ac_cv_path_PERL+:} false; then :
5480   $as_echo_n "(cached) " >&6
5481 else
5482   case $PERL in
5483   [\\/]* | ?:[\\/]*)
5484   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5485   ;;
5486   *)
5487   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5488 for as_dir in $PATH
5489 do
5490   IFS=$as_save_IFS
5491   test -z "$as_dir" && as_dir=.
5492     for ac_exec_ext in '' $ac_executable_extensions; do
5493   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5494     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5495     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5496     break 2
5497   fi
5498 done
5499   done
5500 IFS=$as_save_IFS
5501
5502   test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="/usr/local/bin/perl"
5503   ;;
5504 esac
5505 fi
5506 PERL=$ac_cv_path_PERL
5507 if test -n "$PERL"; then
5508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
5509 $as_echo "$PERL" >&6; }
5510 else
5511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5512 $as_echo "no" >&6; }
5513 fi
5514
5515
5516 if test "x$ac_cv_path_PERL" = "x"; then
5517   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl not found - Simultaneous-Use and checkrad may not work" >&5
5518 $as_echo "$as_me: WARNING: perl not found - Simultaneous-Use and checkrad may not work" >&2;}
5519 fi
5520 # Extract the first word of "snmpget", so it can be a program name with args.
5521 set dummy snmpget; ac_word=$2
5522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5523 $as_echo_n "checking for $ac_word... " >&6; }
5524 if ${ac_cv_path_SNMPGET+:} false; then :
5525   $as_echo_n "(cached) " >&6
5526 else
5527   case $SNMPGET in
5528   [\\/]* | ?:[\\/]*)
5529   ac_cv_path_SNMPGET="$SNMPGET" # Let the user override the test with a path.
5530   ;;
5531   *)
5532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5533 for as_dir in $PATH
5534 do
5535   IFS=$as_save_IFS
5536   test -z "$as_dir" && as_dir=.
5537     for ac_exec_ext in '' $ac_executable_extensions; do
5538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5539     ac_cv_path_SNMPGET="$as_dir/$ac_word$ac_exec_ext"
5540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5541     break 2
5542   fi
5543 done
5544   done
5545 IFS=$as_save_IFS
5546
5547   ;;
5548 esac
5549 fi
5550 SNMPGET=$ac_cv_path_SNMPGET
5551 if test -n "$SNMPGET"; then
5552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SNMPGET" >&5
5553 $as_echo "$SNMPGET" >&6; }
5554 else
5555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5556 $as_echo "no" >&6; }
5557 fi
5558
5559
5560 if test "x$ac_cv_path_SNMPGET" = "x"; then
5561   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: snmpget not found - Simultaneous-Use and checkrad may not work" >&5
5562 $as_echo "$as_me: WARNING: snmpget not found - Simultaneous-Use and checkrad may not work" >&2;}
5563 fi
5564
5565 # Extract the first word of "snmpwalk", so it can be a program name with args.
5566 set dummy snmpwalk; ac_word=$2
5567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5568 $as_echo_n "checking for $ac_word... " >&6; }
5569 if ${ac_cv_path_SNMPWALK+:} false; then :
5570   $as_echo_n "(cached) " >&6
5571 else
5572   case $SNMPWALK in
5573   [\\/]* | ?:[\\/]*)
5574   ac_cv_path_SNMPWALK="$SNMPWALK" # Let the user override the test with a path.
5575   ;;
5576   *)
5577   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5578 for as_dir in $PATH
5579 do
5580   IFS=$as_save_IFS
5581   test -z "$as_dir" && as_dir=.
5582     for ac_exec_ext in '' $ac_executable_extensions; do
5583   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5584     ac_cv_path_SNMPWALK="$as_dir/$ac_word$ac_exec_ext"
5585     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5586     break 2
5587   fi
5588 done
5589   done
5590 IFS=$as_save_IFS
5591
5592   ;;
5593 esac
5594 fi
5595 SNMPWALK=$ac_cv_path_SNMPWALK
5596 if test -n "$SNMPWALK"; then
5597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SNMPWALK" >&5
5598 $as_echo "$SNMPWALK" >&6; }
5599 else
5600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5601 $as_echo "no" >&6; }
5602 fi
5603
5604
5605 if test "x$ac_cv_path_SNMPWALK" = "x"; then
5606   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: snmpwalk not found - Simultaneous-Use and checkrad may not work" >&5
5607 $as_echo "$as_me: WARNING: snmpwalk not found - Simultaneous-Use and checkrad may not work" >&2;}
5608 fi
5609
5610 # Extract the first word of "rusers", so it can be a program name with args.
5611 set dummy rusers; ac_word=$2
5612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5613 $as_echo_n "checking for $ac_word... " >&6; }
5614 if ${ac_cv_path_RUSERS+:} false; then :
5615   $as_echo_n "(cached) " >&6
5616 else
5617   case $RUSERS in
5618   [\\/]* | ?:[\\/]*)
5619   ac_cv_path_RUSERS="$RUSERS" # Let the user override the test with a path.
5620   ;;
5621   *)
5622   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5623 for as_dir in $PATH
5624 do
5625   IFS=$as_save_IFS
5626   test -z "$as_dir" && as_dir=.
5627     for ac_exec_ext in '' $ac_executable_extensions; do
5628   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5629     ac_cv_path_RUSERS="$as_dir/$ac_word$ac_exec_ext"
5630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5631     break 2
5632   fi
5633 done
5634   done
5635 IFS=$as_save_IFS
5636
5637   test -z "$ac_cv_path_RUSERS" && ac_cv_path_RUSERS="/usr/bin/rusers"
5638   ;;
5639 esac
5640 fi
5641 RUSERS=$ac_cv_path_RUSERS
5642 if test -n "$RUSERS"; then
5643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUSERS" >&5
5644 $as_echo "$RUSERS" >&6; }
5645 else
5646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5647 $as_echo "no" >&6; }
5648 fi
5649
5650
5651
5652 missing_dir=`cd $ac_aux_dir && pwd`
5653 # Expand $ac_aux_dir to an absolute path.
5654 am_aux_dir=`cd "$ac_aux_dir" && pwd`
5655
5656 if test x"${MISSING+set}" != xset; then
5657   case $am_aux_dir in
5658   *\ * | *\     *)
5659     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
5660   *)
5661     MISSING="\${SHELL} $am_aux_dir/missing" ;;
5662   esac
5663 fi
5664 # Use eval to expand $SHELL
5665 if eval "$MISSING --is-lightweight"; then
5666   am_missing_run="$MISSING "
5667 else
5668   am_missing_run=
5669   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
5670 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
5671 fi
5672
5673
5674 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
5675
5676
5677 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
5678
5679
5680 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
5681
5682
5683 # Extract the first word of "locate", so it can be a program name with args.
5684 set dummy locate; ac_word=$2
5685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5686 $as_echo_n "checking for $ac_word... " >&6; }
5687 if ${ac_cv_path_LOCATE+:} false; then :
5688   $as_echo_n "(cached) " >&6
5689 else
5690   case $LOCATE in
5691   [\\/]* | ?:[\\/]*)
5692   ac_cv_path_LOCATE="$LOCATE" # Let the user override the test with a path.
5693   ;;
5694   *)
5695   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5696 for as_dir in $PATH
5697 do
5698   IFS=$as_save_IFS
5699   test -z "$as_dir" && as_dir=.
5700     for ac_exec_ext in '' $ac_executable_extensions; do
5701   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5702     ac_cv_path_LOCATE="$as_dir/$ac_word$ac_exec_ext"
5703     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5704     break 2
5705   fi
5706 done
5707   done
5708 IFS=$as_save_IFS
5709
5710   ;;
5711 esac
5712 fi
5713 LOCATE=$ac_cv_path_LOCATE
5714 if test -n "$LOCATE"; then
5715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOCATE" >&5
5716 $as_echo "$LOCATE" >&6; }
5717 else
5718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5719 $as_echo "no" >&6; }
5720 fi
5721
5722
5723 # Extract the first word of "dirname", so it can be a program name with args.
5724 set dummy dirname; ac_word=$2
5725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5726 $as_echo_n "checking for $ac_word... " >&6; }
5727 if ${ac_cv_path_DIRNAME+:} false; then :
5728   $as_echo_n "(cached) " >&6
5729 else
5730   case $DIRNAME in
5731   [\\/]* | ?:[\\/]*)
5732   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
5733   ;;
5734   *)
5735   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5736 for as_dir in $PATH
5737 do
5738   IFS=$as_save_IFS
5739   test -z "$as_dir" && as_dir=.
5740     for ac_exec_ext in '' $ac_executable_extensions; do
5741   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5742     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
5743     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5744     break 2
5745   fi
5746 done
5747   done
5748 IFS=$as_save_IFS
5749
5750   ;;
5751 esac
5752 fi
5753 DIRNAME=$ac_cv_path_DIRNAME
5754 if test -n "$DIRNAME"; then
5755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
5756 $as_echo "$DIRNAME" >&6; }
5757 else
5758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5759 $as_echo "no" >&6; }
5760 fi
5761
5762
5763 # Extract the first word of "grep", so it can be a program name with args.
5764 set dummy grep; ac_word=$2
5765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5766 $as_echo_n "checking for $ac_word... " >&6; }
5767 if ${ac_cv_path_GREP+:} false; then :
5768   $as_echo_n "(cached) " >&6
5769 else
5770   case $GREP in
5771   [\\/]* | ?:[\\/]*)
5772   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
5773   ;;
5774   *)
5775   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5776 for as_dir in $PATH
5777 do
5778   IFS=$as_save_IFS
5779   test -z "$as_dir" && as_dir=.
5780     for ac_exec_ext in '' $ac_executable_extensions; do
5781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5782     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
5783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5784     break 2
5785   fi
5786 done
5787   done
5788 IFS=$as_save_IFS
5789
5790   ;;
5791 esac
5792 fi
5793 GREP=$ac_cv_path_GREP
5794 if test -n "$GREP"; then
5795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
5796 $as_echo "$GREP" >&6; }
5797 else
5798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5799 $as_echo "no" >&6; }
5800 fi
5801
5802
5803
5804
5805 talloc_lib_dir=
5806
5807 # Check whether --with-talloc-lib-dir was given.
5808 if test "${with_talloc_lib_dir+set}" = set; then :
5809   withval=$with_talloc_lib_dir; case "$withval" in
5810     no)
5811       as_fn_error $? "Need talloc-lib-dir" "$LINENO" 5
5812       ;;
5813     yes)
5814       ;;
5815     *)
5816       talloc_lib_dir="$withval"
5817       ;;
5818   esac
5819 fi
5820
5821
5822 talloc_include_dir=
5823
5824 # Check whether --with-talloc-include-dir was given.
5825 if test "${with_talloc_include_dir+set}" = set; then :
5826   withval=$with_talloc_include_dir; case "$withval" in
5827     no)
5828       as_fn_error $? "Need talloc-include-dir" "$LINENO" 5
5829       ;;
5830     yes)
5831       ;;
5832     *)
5833       talloc_include_dir="$withval"
5834       ;;
5835   esac
5836 fi
5837
5838
5839 smart_try_dir="$talloc_lib_dir"
5840
5841
5842 sm_lib_safe=`echo "talloc" | sed 'y%./+-%__p_%'`
5843 sm_func_safe=`echo "_talloc" | sed 'y%./+-%__p_%'`
5844
5845 old_LIBS="$LIBS"
5846 old_CPPFLAGS="$CPPFLAGS"
5847 smart_lib=
5848 smart_ldflags=
5849 smart_lib_dir=
5850
5851 if test "x$smart_try_dir" != "x"; then
5852   for try in $smart_try_dir; do
5853     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc in $try" >&5
5854 $as_echo_n "checking for _talloc in -ltalloc in $try... " >&6; }
5855     LIBS="-ltalloc $old_LIBS"
5856     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
5857     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5858 /* end confdefs.h.  */
5859 extern char _talloc();
5860 int
5861 main ()
5862 {
5863 _talloc()
5864   ;
5865   return 0;
5866 }
5867 _ACEOF
5868 if ac_fn_c_try_link "$LINENO"; then :
5869
5870                  smart_lib="-ltalloc"
5871                  smart_ldflags="-L$try -Wl,-rpath,$try"
5872                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5873 $as_echo "yes" >&6; }
5874                  break
5875
5876 else
5877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5878 $as_echo "no" >&6; }
5879 fi
5880 rm -f core conftest.err conftest.$ac_objext \
5881     conftest$ac_exeext conftest.$ac_ext
5882   done
5883   LIBS="$old_LIBS"
5884   CPPFLAGS="$old_CPPFLAGS"
5885 fi
5886
5887 if test "x$smart_lib" = "x"; then
5888   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc" >&5
5889 $as_echo_n "checking for _talloc in -ltalloc... " >&6; }
5890   LIBS="-ltalloc $old_LIBS"
5891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5892 /* end confdefs.h.  */
5893 extern char _talloc();
5894 int
5895 main ()
5896 {
5897 _talloc()
5898   ;
5899   return 0;
5900 }
5901 _ACEOF
5902 if ac_fn_c_try_link "$LINENO"; then :
5903
5904                 smart_lib="-ltalloc"
5905                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5906 $as_echo "yes" >&6; }
5907
5908 else
5909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5910 $as_echo "no" >&6; }
5911 fi
5912 rm -f core conftest.err conftest.$ac_objext \
5913     conftest$ac_exeext conftest.$ac_ext
5914   LIBS="$old_LIBS"
5915 fi
5916
5917 if test "x$smart_lib" = "x"; then
5918
5919
5920 if test "x$LOCATE" != "x"; then
5921         DIRS=
5922   file=libtalloc${libltdl_cv_shlibext}
5923
5924   for x in `${LOCATE} $file 2>/dev/null`; do
5925                                         base=`echo $x | sed "s%/${file}%%"`
5926     if test "x$x" = "x$base"; then
5927       continue;
5928     fi
5929
5930     dir=`${DIRNAME} $x 2>/dev/null`
5931                 exclude=`echo ${dir} | ${GREP} /home`
5932     if test "x$exclude" != "x"; then
5933       continue
5934     fi
5935
5936                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
5937     if test "x$already" = "x"; then
5938       DIRS="$DIRS $dir"
5939     fi
5940   done
5941 fi
5942
5943 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
5944
5945
5946
5947 if test "x$LOCATE" != "x"; then
5948         DIRS=
5949   file=libtalloc.a
5950
5951   for x in `${LOCATE} $file 2>/dev/null`; do
5952                                         base=`echo $x | sed "s%/${file}%%"`
5953     if test "x$x" = "x$base"; then
5954       continue;
5955     fi
5956
5957     dir=`${DIRNAME} $x 2>/dev/null`
5958                 exclude=`echo ${dir} | ${GREP} /home`
5959     if test "x$exclude" != "x"; then
5960       continue
5961     fi
5962
5963                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
5964     if test "x$already" = "x"; then
5965       DIRS="$DIRS $dir"
5966     fi
5967   done
5968 fi
5969
5970 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
5971
5972
5973   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
5974     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc in $try" >&5
5975 $as_echo_n "checking for _talloc in -ltalloc in $try... " >&6; }
5976     LIBS="-ltalloc $old_LIBS"
5977     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
5978     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5979 /* end confdefs.h.  */
5980 extern char _talloc();
5981 int
5982 main ()
5983 {
5984 _talloc()
5985   ;
5986   return 0;
5987 }
5988 _ACEOF
5989 if ac_fn_c_try_link "$LINENO"; then :
5990
5991                   smart_lib="-ltalloc"
5992                   smart_ldflags="-L$try -Wl,-rpath,$try"
5993                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5994 $as_echo "yes" >&6; }
5995                   break
5996
5997 else
5998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5999 $as_echo "no" >&6; }
6000 fi
6001 rm -f core conftest.err conftest.$ac_objext \
6002     conftest$ac_exeext conftest.$ac_ext
6003   done
6004   LIBS="$old_LIBS"
6005   CPPFLAGS="$old_CPPFLAGS"
6006 fi
6007
6008 if test "x$smart_lib" != "x"; then
6009   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
6010   LIBS="$smart_ldflags $smart_lib $old_LIBS"
6011   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
6012 fi
6013
6014 if test "x$ac_cv_lib_talloc__talloc" != "xyes"; then
6015   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: talloc library not found. Use --with-talloc-lib-dir=<path>." >&5
6016 $as_echo "$as_me: WARNING: talloc library not found. Use --with-talloc-lib-dir=<path>." >&2;}
6017   as_fn_error $? "FreeRADIUS requires libtalloc" "$LINENO" 5
6018 fi
6019
6020 TALLOC_LIBS="${smart_lib}"
6021 TALLOC_LDFLAGS="${smart_ldflags}"
6022
6023
6024 LIBS="$old_LIBS"
6025
6026 old_CFLAGS=$CFLAGS
6027 if test "x$WITH_THREADS" = "xyes"; then
6028   if test $ac_cv_prog_suncc = "yes"; then
6029     CFLAGS="$CFLAGS -mt"
6030   fi
6031
6032   for ac_header in pthread.h
6033 do :
6034   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
6035 if test "x$ac_cv_header_pthread_h" = xyes; then :
6036   cat >>confdefs.h <<_ACEOF
6037 #define HAVE_PTHREAD_H 1
6038 _ACEOF
6039
6040 else
6041
6042       WITH_THREADS="no"
6043       fail=pthread.h
6044
6045 fi
6046
6047 done
6048
6049
6050                 if test "x$WITH_THREADS" != "xno"; then
6051     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
6052 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
6053 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
6054   $as_echo_n "(cached) " >&6
6055 else
6056   ac_check_lib_save_LIBS=$LIBS
6057 LIBS="-lpthread  $LIBS"
6058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6059 /* end confdefs.h.  */
6060
6061 /* Override any GCC internal prototype to avoid an error.
6062    Use char because int might match the return type of a GCC
6063    builtin and then its argument prototype would still apply.  */
6064 #ifdef __cplusplus
6065 extern "C"
6066 #endif
6067 char pthread_create ();
6068 int
6069 main ()
6070 {
6071 return pthread_create ();
6072   ;
6073   return 0;
6074 }
6075 _ACEOF
6076 if ac_fn_c_try_link "$LINENO"; then :
6077   ac_cv_lib_pthread_pthread_create=yes
6078 else
6079   ac_cv_lib_pthread_pthread_create=no
6080 fi
6081 rm -f core conftest.err conftest.$ac_objext \
6082     conftest$ac_exeext conftest.$ac_ext
6083 LIBS=$ac_check_lib_save_LIBS
6084 fi
6085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
6086 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
6087 if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
6088
6089         HAVE_LPTHREAD='yes'
6090         CFLAGS="$CFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
6091         LIBS="-lpthread $LIBS"
6092
6093
6094   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-pthread\"" >&5
6095 $as_echo_n "checking for the compiler flag \"-pthread\"... " >&6; }
6096 if ${ax_cv_cc_pthread_flag+:} false; then :
6097   $as_echo_n "(cached) " >&6
6098 else
6099
6100
6101     CFLAGS_SAVED=$CFLAGS
6102     CFLAGS="$CFLAGS -Werror -pthread"
6103
6104     ac_ext=c
6105 ac_cpp='$CPP $CPPFLAGS'
6106 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6107 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6108 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6109
6110     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6111 /* end confdefs.h.  */
6112
6113 int
6114 main ()
6115 {
6116 return 0;
6117   ;
6118   return 0;
6119 }
6120 _ACEOF
6121 if ac_fn_c_try_compile "$LINENO"; then :
6122   ax_cv_cc_pthread_flag="yes"
6123 else
6124   ax_cv_cc_pthread_flag="no"
6125 fi
6126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6127     ac_ext=c
6128 ac_cpp='$CPP $CPPFLAGS'
6129 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6130 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6131 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6132
6133
6134     CFLAGS="$CFLAGS_SAVED"
6135
6136 fi
6137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_pthread_flag" >&5
6138 $as_echo "$ax_cv_cc_pthread_flag" >&6; }
6139
6140         if test "x$ax_cv_cc_pthread_flag" != 'xyes'; then
6141           CFLAGS="$CFLAGS -pthread"
6142         fi
6143
6144
6145 fi
6146
6147
6148                         if test "x$HAVE_LPTHREAD" != "xyes"; then
6149       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
6150 $as_echo_n "checking for pthread_create in -lc_r... " >&6; }
6151 if ${ac_cv_lib_c_r_pthread_create+:} false; then :
6152   $as_echo_n "(cached) " >&6
6153 else
6154   ac_check_lib_save_LIBS=$LIBS
6155 LIBS="-lc_r  $LIBS"
6156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6157 /* end confdefs.h.  */
6158
6159 /* Override any GCC internal prototype to avoid an error.
6160    Use char because int might match the return type of a GCC
6161    builtin and then its argument prototype would still apply.  */
6162 #ifdef __cplusplus
6163 extern "C"
6164 #endif
6165 char pthread_create ();
6166 int
6167 main ()
6168 {
6169 return pthread_create ();
6170   ;
6171   return 0;
6172 }
6173 _ACEOF
6174 if ac_fn_c_try_link "$LINENO"; then :
6175   ac_cv_lib_c_r_pthread_create=yes
6176 else
6177   ac_cv_lib_c_r_pthread_create=no
6178 fi
6179 rm -f core conftest.err conftest.$ac_objext \
6180     conftest$ac_exeext conftest.$ac_ext
6181 LIBS=$ac_check_lib_save_LIBS
6182 fi
6183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
6184 $as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
6185 if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
6186
6187           CFLAGS="$CFLAGS -D_THREAD_SAFE"
6188
6189
6190   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-pthread\"" >&5
6191 $as_echo_n "checking for the compiler flag \"-pthread\"... " >&6; }
6192 if ${ax_cv_cc_pthread_flag+:} false; then :
6193   $as_echo_n "(cached) " >&6
6194 else
6195
6196
6197     CFLAGS_SAVED=$CFLAGS
6198     CFLAGS="$CFLAGS -Werror -pthread"
6199
6200     ac_ext=c
6201 ac_cpp='$CPP $CPPFLAGS'
6202 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6203 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6204 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6205
6206     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6207 /* end confdefs.h.  */
6208
6209 int
6210 main ()
6211 {
6212 return 0;
6213   ;
6214   return 0;
6215 }
6216 _ACEOF
6217 if ac_fn_c_try_compile "$LINENO"; then :
6218   ax_cv_cc_pthread_flag="yes"
6219 else
6220   ax_cv_cc_pthread_flag="no"
6221 fi
6222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6223     ac_ext=c
6224 ac_cpp='$CPP $CPPFLAGS'
6225 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6226 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6227 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6228
6229
6230     CFLAGS="$CFLAGS_SAVED"
6231
6232 fi
6233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_pthread_flag" >&5
6234 $as_echo "$ax_cv_cc_pthread_flag" >&6; }
6235
6236           if test "x$ax_cv_cc_pthread_flag" != 'xyes'; then
6237             LIBS="-lc_r $LIBS"
6238           else
6239             CFLAGS="$CFLAGS -pthread"
6240           fi
6241
6242 else
6243    fail=-lc_r or -lpthread
6244
6245 fi
6246
6247     fi
6248   fi
6249
6250   if test "x$WITH_THREADS" != "xyes"; then
6251     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: silently not building with thread support." >&5
6252 $as_echo "$as_me: WARNING: silently not building with thread support." >&2;}
6253     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: FAILURE: thread support requires: $fail." >&5
6254 $as_echo "$as_me: WARNING: FAILURE: thread support requires: $fail." >&2;}
6255   else
6256
6257 $as_echo "#define WITH_THREADS 1" >>confdefs.h
6258
6259   fi
6260 fi
6261
6262 if test "x$WITH_THREADS" != "xyes"; then
6263   CFLAGS=$old_CFLAGS
6264   ac_cv_header_pthread_h="no"
6265   WITH_THREADS=no
6266 else
6267
6268   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
6269 $as_echo_n "checking for library containing sem_init... " >&6; }
6270 if ${ac_cv_search_sem_init+:} false; then :
6271   $as_echo_n "(cached) " >&6
6272 else
6273   ac_func_search_save_LIBS=$LIBS
6274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6275 /* end confdefs.h.  */
6276
6277 /* Override any GCC internal prototype to avoid an error.
6278    Use char because int might match the return type of a GCC
6279    builtin and then its argument prototype would still apply.  */
6280 #ifdef __cplusplus
6281 extern "C"
6282 #endif
6283 char sem_init ();
6284 int
6285 main ()
6286 {
6287 return sem_init ();
6288   ;
6289   return 0;
6290 }
6291 _ACEOF
6292 for ac_lib in '' pthread sem posix4 rt semaphore; do
6293   if test -z "$ac_lib"; then
6294     ac_res="none required"
6295   else
6296     ac_res=-l$ac_lib
6297     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6298   fi
6299   if ac_fn_c_try_link "$LINENO"; then :
6300   ac_cv_search_sem_init=$ac_res
6301 fi
6302 rm -f core conftest.err conftest.$ac_objext \
6303     conftest$ac_exeext
6304   if ${ac_cv_search_sem_init+:} false; then :
6305   break
6306 fi
6307 done
6308 if ${ac_cv_search_sem_init+:} false; then :
6309
6310 else
6311   ac_cv_search_sem_init=no
6312 fi
6313 rm conftest.$ac_ext
6314 LIBS=$ac_func_search_save_LIBS
6315 fi
6316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
6317 $as_echo "$ac_cv_search_sem_init" >&6; }
6318 ac_res=$ac_cv_search_sem_init
6319 if test "$ac_res" != no; then :
6320   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6321
6322 else
6323   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
6324
6325 fi
6326
6327 fi
6328
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
6330 $as_echo_n "checking for dlopen in -ldl... " >&6; }
6331 if ${ac_cv_lib_dl_dlopen+:} false; then :
6332   $as_echo_n "(cached) " >&6
6333 else
6334   ac_check_lib_save_LIBS=$LIBS
6335 LIBS="-ldl  $LIBS"
6336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6337 /* end confdefs.h.  */
6338
6339 /* Override any GCC internal prototype to avoid an error.
6340    Use char because int might match the return type of a GCC
6341    builtin and then its argument prototype would still apply.  */
6342 #ifdef __cplusplus
6343 extern "C"
6344 #endif
6345 char dlopen ();
6346 int
6347 main ()
6348 {
6349 return dlopen ();
6350   ;
6351   return 0;
6352 }
6353 _ACEOF
6354 if ac_fn_c_try_link "$LINENO"; then :
6355   ac_cv_lib_dl_dlopen=yes
6356 else
6357   ac_cv_lib_dl_dlopen=no
6358 fi
6359 rm -f core conftest.err conftest.$ac_objext \
6360     conftest$ac_exeext conftest.$ac_ext
6361 LIBS=$ac_check_lib_save_LIBS
6362 fi
6363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
6364 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
6365 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
6366   cat >>confdefs.h <<_ACEOF
6367 #define HAVE_LIBDL 1
6368 _ACEOF
6369
6370   LIBS="-ldl $LIBS"
6371
6372 fi
6373
6374
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getsockname in -lsocket" >&5
6376 $as_echo_n "checking for getsockname in -lsocket... " >&6; }
6377 if ${ac_cv_lib_socket_getsockname+:} false; then :
6378   $as_echo_n "(cached) " >&6
6379 else
6380   ac_check_lib_save_LIBS=$LIBS
6381 LIBS="-lsocket  $LIBS"
6382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6383 /* end confdefs.h.  */
6384
6385 /* Override any GCC internal prototype to avoid an error.
6386    Use char because int might match the return type of a GCC
6387    builtin and then its argument prototype would still apply.  */
6388 #ifdef __cplusplus
6389 extern "C"
6390 #endif
6391 char getsockname ();
6392 int
6393 main ()
6394 {
6395 return getsockname ();
6396   ;
6397   return 0;
6398 }
6399 _ACEOF
6400 if ac_fn_c_try_link "$LINENO"; then :
6401   ac_cv_lib_socket_getsockname=yes
6402 else
6403   ac_cv_lib_socket_getsockname=no
6404 fi
6405 rm -f core conftest.err conftest.$ac_objext \
6406     conftest$ac_exeext conftest.$ac_ext
6407 LIBS=$ac_check_lib_save_LIBS
6408 fi
6409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getsockname" >&5
6410 $as_echo "$ac_cv_lib_socket_getsockname" >&6; }
6411 if test "x$ac_cv_lib_socket_getsockname" = xyes; then :
6412   cat >>confdefs.h <<_ACEOF
6413 #define HAVE_LIBSOCKET 1
6414 _ACEOF
6415
6416   LIBS="-lsocket $LIBS"
6417
6418 fi
6419
6420
6421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
6422 $as_echo_n "checking for inet_aton in -lresolv... " >&6; }
6423 if ${ac_cv_lib_resolv_inet_aton+:} false; then :
6424   $as_echo_n "(cached) " >&6
6425 else
6426   ac_check_lib_save_LIBS=$LIBS
6427 LIBS="-lresolv  $LIBS"
6428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6429 /* end confdefs.h.  */
6430
6431 /* Override any GCC internal prototype to avoid an error.
6432    Use char because int might match the return type of a GCC
6433    builtin and then its argument prototype would still apply.  */
6434 #ifdef __cplusplus
6435 extern "C"
6436 #endif
6437 char inet_aton ();
6438 int
6439 main ()
6440 {
6441 return inet_aton ();
6442   ;
6443   return 0;
6444 }
6445 _ACEOF
6446 if ac_fn_c_try_link "$LINENO"; then :
6447   ac_cv_lib_resolv_inet_aton=yes
6448 else
6449   ac_cv_lib_resolv_inet_aton=no
6450 fi
6451 rm -f core conftest.err conftest.$ac_objext \
6452     conftest$ac_exeext conftest.$ac_ext
6453 LIBS=$ac_check_lib_save_LIBS
6454 fi
6455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
6456 $as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
6457 if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
6458   cat >>confdefs.h <<_ACEOF
6459 #define HAVE_LIBRESOLV 1
6460 _ACEOF
6461
6462   LIBS="-lresolv $LIBS"
6463
6464 fi
6465
6466
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnsl" >&5
6468 $as_echo_n "checking for inet_ntoa in -lnsl... " >&6; }
6469 if ${ac_cv_lib_nsl_inet_ntoa+:} false; then :
6470   $as_echo_n "(cached) " >&6
6471 else
6472   ac_check_lib_save_LIBS=$LIBS
6473 LIBS="-lnsl  $LIBS"
6474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6475 /* end confdefs.h.  */
6476
6477 /* Override any GCC internal prototype to avoid an error.
6478    Use char because int might match the return type of a GCC
6479    builtin and then its argument prototype would still apply.  */
6480 #ifdef __cplusplus
6481 extern "C"
6482 #endif
6483 char inet_ntoa ();
6484 int
6485 main ()
6486 {
6487 return inet_ntoa ();
6488   ;
6489   return 0;
6490 }
6491 _ACEOF
6492 if ac_fn_c_try_link "$LINENO"; then :
6493   ac_cv_lib_nsl_inet_ntoa=yes
6494 else
6495   ac_cv_lib_nsl_inet_ntoa=no
6496 fi
6497 rm -f core conftest.err conftest.$ac_objext \
6498     conftest$ac_exeext conftest.$ac_ext
6499 LIBS=$ac_check_lib_save_LIBS
6500 fi
6501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_inet_ntoa" >&5
6502 $as_echo "$ac_cv_lib_nsl_inet_ntoa" >&6; }
6503 if test "x$ac_cv_lib_nsl_inet_ntoa" = xyes; then :
6504   cat >>confdefs.h <<_ACEOF
6505 #define HAVE_LIBNSL 1
6506 _ACEOF
6507
6508   LIBS="-lnsl $LIBS"
6509
6510 fi
6511
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htonl in -lws2_32" >&5
6513 $as_echo_n "checking for htonl in -lws2_32... " >&6; }
6514 if ${ac_cv_lib_ws2_32_htonl+:} false; then :
6515   $as_echo_n "(cached) " >&6
6516 else
6517   ac_check_lib_save_LIBS=$LIBS
6518 LIBS="-lws2_32  $LIBS"
6519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6520 /* end confdefs.h.  */
6521
6522 /* Override any GCC internal prototype to avoid an error.
6523    Use char because int might match the return type of a GCC
6524    builtin and then its argument prototype would still apply.  */
6525 #ifdef __cplusplus
6526 extern "C"
6527 #endif
6528 char htonl ();
6529 int
6530 main ()
6531 {
6532 return htonl ();
6533   ;
6534   return 0;
6535 }
6536 _ACEOF
6537 if ac_fn_c_try_link "$LINENO"; then :
6538   ac_cv_lib_ws2_32_htonl=yes
6539 else
6540   ac_cv_lib_ws2_32_htonl=no
6541 fi
6542 rm -f core conftest.err conftest.$ac_objext \
6543     conftest$ac_exeext conftest.$ac_ext
6544 LIBS=$ac_check_lib_save_LIBS
6545 fi
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_htonl" >&5
6547 $as_echo "$ac_cv_lib_ws2_32_htonl" >&6; }
6548 if test "x$ac_cv_lib_ws2_32_htonl" = xyes; then :
6549   cat >>confdefs.h <<_ACEOF
6550 #define HAVE_LIBWS2_32 1
6551 _ACEOF
6552
6553   LIBS="-lws2_32 $LIBS"
6554
6555 fi
6556
6557
6558 pcap_lib_dir=
6559
6560 # Check whether --with-pcap-lib-dir was given.
6561 if test "${with_pcap_lib_dir+set}" = set; then :
6562   withval=$with_pcap_lib_dir; case "$withval" in
6563     no)
6564       as_fn_error $? "Need pcap-lib-dir" "$LINENO" 5
6565       ;;
6566     yes)
6567       ;;
6568     *)
6569       pcap_lib_dir="$withval"
6570       ;;
6571   esac
6572 fi
6573
6574
6575 pcap_include_dir=
6576
6577 # Check whether --with-pcap-include-dir was given.
6578 if test "${with_pcap_include_dir+set}" = set; then :
6579   withval=$with_pcap_include_dir; case "$withval" in
6580     no)
6581       as_fn_error $? "Need pcap-include-dir" "$LINENO" 5
6582       ;;
6583     yes)
6584       ;;
6585     *)
6586       pcap_include_dir="$withval"
6587       ;;
6588   esac
6589 fi
6590
6591
6592 smart_try_dir="$pcap_lib_dir"
6593
6594
6595 sm_lib_safe=`echo "pcap" | sed 'y%./+-%__p_%'`
6596 sm_func_safe=`echo "pcap_open_live" | sed 'y%./+-%__p_%'`
6597
6598 old_LIBS="$LIBS"
6599 old_CPPFLAGS="$CPPFLAGS"
6600 smart_lib=
6601 smart_ldflags=
6602 smart_lib_dir=
6603
6604 if test "x$smart_try_dir" != "x"; then
6605   for try in $smart_try_dir; do
6606     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap in $try" >&5
6607 $as_echo_n "checking for pcap_open_live in -lpcap in $try... " >&6; }
6608     LIBS="-lpcap $old_LIBS"
6609     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6610     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6611 /* end confdefs.h.  */
6612 extern char pcap_open_live();
6613 int
6614 main ()
6615 {
6616 pcap_open_live()
6617   ;
6618   return 0;
6619 }
6620 _ACEOF
6621 if ac_fn_c_try_link "$LINENO"; then :
6622
6623                  smart_lib="-lpcap"
6624                  smart_ldflags="-L$try -Wl,-rpath,$try"
6625                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6626 $as_echo "yes" >&6; }
6627                  break
6628
6629 else
6630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6631 $as_echo "no" >&6; }
6632 fi
6633 rm -f core conftest.err conftest.$ac_objext \
6634     conftest$ac_exeext conftest.$ac_ext
6635   done
6636   LIBS="$old_LIBS"
6637   CPPFLAGS="$old_CPPFLAGS"
6638 fi
6639
6640 if test "x$smart_lib" = "x"; then
6641   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap" >&5
6642 $as_echo_n "checking for pcap_open_live in -lpcap... " >&6; }
6643   LIBS="-lpcap $old_LIBS"
6644   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6645 /* end confdefs.h.  */
6646 extern char pcap_open_live();
6647 int
6648 main ()
6649 {
6650 pcap_open_live()
6651   ;
6652   return 0;
6653 }
6654 _ACEOF
6655 if ac_fn_c_try_link "$LINENO"; then :
6656
6657                 smart_lib="-lpcap"
6658                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6659 $as_echo "yes" >&6; }
6660
6661 else
6662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6663 $as_echo "no" >&6; }
6664 fi
6665 rm -f core conftest.err conftest.$ac_objext \
6666     conftest$ac_exeext conftest.$ac_ext
6667   LIBS="$old_LIBS"
6668 fi
6669
6670 if test "x$smart_lib" = "x"; then
6671
6672
6673 if test "x$LOCATE" != "x"; then
6674         DIRS=
6675   file=libpcap${libltdl_cv_shlibext}
6676
6677   for x in `${LOCATE} $file 2>/dev/null`; do
6678                                         base=`echo $x | sed "s%/${file}%%"`
6679     if test "x$x" = "x$base"; then
6680       continue;
6681     fi
6682
6683     dir=`${DIRNAME} $x 2>/dev/null`
6684                 exclude=`echo ${dir} | ${GREP} /home`
6685     if test "x$exclude" != "x"; then
6686       continue
6687     fi
6688
6689                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6690     if test "x$already" = "x"; then
6691       DIRS="$DIRS $dir"
6692     fi
6693   done
6694 fi
6695
6696 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6697
6698
6699
6700 if test "x$LOCATE" != "x"; then
6701         DIRS=
6702   file=libpcap.a
6703
6704   for x in `${LOCATE} $file 2>/dev/null`; do
6705                                         base=`echo $x | sed "s%/${file}%%"`
6706     if test "x$x" = "x$base"; then
6707       continue;
6708     fi
6709
6710     dir=`${DIRNAME} $x 2>/dev/null`
6711                 exclude=`echo ${dir} | ${GREP} /home`
6712     if test "x$exclude" != "x"; then
6713       continue
6714     fi
6715
6716                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6717     if test "x$already" = "x"; then
6718       DIRS="$DIRS $dir"
6719     fi
6720   done
6721 fi
6722
6723 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6724
6725
6726   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
6727     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap in $try" >&5
6728 $as_echo_n "checking for pcap_open_live in -lpcap in $try... " >&6; }
6729     LIBS="-lpcap $old_LIBS"
6730     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6731     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6732 /* end confdefs.h.  */
6733 extern char pcap_open_live();
6734 int
6735 main ()
6736 {
6737 pcap_open_live()
6738   ;
6739   return 0;
6740 }
6741 _ACEOF
6742 if ac_fn_c_try_link "$LINENO"; then :
6743
6744                   smart_lib="-lpcap"
6745                   smart_ldflags="-L$try -Wl,-rpath,$try"
6746                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6747 $as_echo "yes" >&6; }
6748                   break
6749
6750 else
6751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6752 $as_echo "no" >&6; }
6753 fi
6754 rm -f core conftest.err conftest.$ac_objext \
6755     conftest$ac_exeext conftest.$ac_ext
6756   done
6757   LIBS="$old_LIBS"
6758   CPPFLAGS="$old_CPPFLAGS"
6759 fi
6760
6761 if test "x$smart_lib" != "x"; then
6762   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
6763   LIBS="$smart_ldflags $smart_lib $old_LIBS"
6764   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
6765 fi
6766
6767 if test "x$ac_cv_lib_pcap_pcap_open_live" != "xyes"; then
6768   { $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
6769 $as_echo "$as_me: WARNING: pcap library not found, silently disabling the RADIUS sniffer, and ARP listener.  Use --with-pcap-lib-dir=<path>." >&2;}
6770 else
6771
6772 $as_echo "#define HAVE_LIBPCAP 1" >>confdefs.h
6773
6774
6775   for ac_func in \
6776     pcap_fopen_offline \
6777     pcap_dump_fopen \
6778     pcap_create \
6779     pcap_activate
6780
6781 do :
6782   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6783 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6784 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6785   cat >>confdefs.h <<_ACEOF
6786 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6787 _ACEOF
6788
6789 fi
6790 done
6791
6792
6793   PCAP_LIBS="${smart_lib}"
6794   PCAP_LDFLAGS="${smart_ldflags}"
6795 fi
6796 LIBS="${old_LIBS}"
6797
6798 collectdclient_lib_dir=
6799
6800 # Check whether --with-collectdclient-lib-dir was given.
6801 if test "${with_collectdclient_lib_dir+set}" = set; then :
6802   withval=$with_collectdclient_lib_dir; case "$withval" in
6803     no)
6804       as_fn_error $? "Need collectdclient-lib-dir" "$LINENO" 5
6805       ;;
6806     yes)
6807       ;;
6808     *)
6809       collectdclient_lib_dir="$withval"
6810       ;;
6811   esac
6812 fi
6813
6814
6815 collectdclient_include_dir=
6816
6817 # Check whether --with-collectdclient-include-dir was given.
6818 if test "${with_collectdclient_include_dir+set}" = set; then :
6819   withval=$with_collectdclient_include_dir; case "$withval" in
6820     no)
6821       as_fn_error $? "Need collectdclient-include-dir" "$LINENO" 5
6822       ;;
6823     yes)
6824       ;;
6825     *)
6826       collectdclient_include_dir="$withval"
6827       ;;
6828   esac
6829 fi
6830
6831
6832 smart_try_dir="$collectdclient_lib_dir"
6833
6834
6835 sm_lib_safe=`echo "collectdclient" | sed 'y%./+-%__p_%'`
6836 sm_func_safe=`echo "lcc_connect" | sed 'y%./+-%__p_%'`
6837
6838 old_LIBS="$LIBS"
6839 old_CPPFLAGS="$CPPFLAGS"
6840 smart_lib=
6841 smart_ldflags=
6842 smart_lib_dir=
6843
6844 if test "x$smart_try_dir" != "x"; then
6845   for try in $smart_try_dir; do
6846     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient in $try" >&5
6847 $as_echo_n "checking for lcc_connect in -lcollectdclient in $try... " >&6; }
6848     LIBS="-lcollectdclient $old_LIBS"
6849     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6850     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6851 /* end confdefs.h.  */
6852 extern char lcc_connect();
6853 int
6854 main ()
6855 {
6856 lcc_connect()
6857   ;
6858   return 0;
6859 }
6860 _ACEOF
6861 if ac_fn_c_try_link "$LINENO"; then :
6862
6863                  smart_lib="-lcollectdclient"
6864                  smart_ldflags="-L$try -Wl,-rpath,$try"
6865                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6866 $as_echo "yes" >&6; }
6867                  break
6868
6869 else
6870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6871 $as_echo "no" >&6; }
6872 fi
6873 rm -f core conftest.err conftest.$ac_objext \
6874     conftest$ac_exeext conftest.$ac_ext
6875   done
6876   LIBS="$old_LIBS"
6877   CPPFLAGS="$old_CPPFLAGS"
6878 fi
6879
6880 if test "x$smart_lib" = "x"; then
6881   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient" >&5
6882 $as_echo_n "checking for lcc_connect in -lcollectdclient... " >&6; }
6883   LIBS="-lcollectdclient $old_LIBS"
6884   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6885 /* end confdefs.h.  */
6886 extern char lcc_connect();
6887 int
6888 main ()
6889 {
6890 lcc_connect()
6891   ;
6892   return 0;
6893 }
6894 _ACEOF
6895 if ac_fn_c_try_link "$LINENO"; then :
6896
6897                 smart_lib="-lcollectdclient"
6898                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6899 $as_echo "yes" >&6; }
6900
6901 else
6902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6903 $as_echo "no" >&6; }
6904 fi
6905 rm -f core conftest.err conftest.$ac_objext \
6906     conftest$ac_exeext conftest.$ac_ext
6907   LIBS="$old_LIBS"
6908 fi
6909
6910 if test "x$smart_lib" = "x"; then
6911
6912
6913 if test "x$LOCATE" != "x"; then
6914         DIRS=
6915   file=libcollectdclient${libltdl_cv_shlibext}
6916
6917   for x in `${LOCATE} $file 2>/dev/null`; do
6918                                         base=`echo $x | sed "s%/${file}%%"`
6919     if test "x$x" = "x$base"; then
6920       continue;
6921     fi
6922
6923     dir=`${DIRNAME} $x 2>/dev/null`
6924                 exclude=`echo ${dir} | ${GREP} /home`
6925     if test "x$exclude" != "x"; then
6926       continue
6927     fi
6928
6929                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6930     if test "x$already" = "x"; then
6931       DIRS="$DIRS $dir"
6932     fi
6933   done
6934 fi
6935
6936 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6937
6938
6939
6940 if test "x$LOCATE" != "x"; then
6941         DIRS=
6942   file=libcollectdclient.a
6943
6944   for x in `${LOCATE} $file 2>/dev/null`; do
6945                                         base=`echo $x | sed "s%/${file}%%"`
6946     if test "x$x" = "x$base"; then
6947       continue;
6948     fi
6949
6950     dir=`${DIRNAME} $x 2>/dev/null`
6951                 exclude=`echo ${dir} | ${GREP} /home`
6952     if test "x$exclude" != "x"; then
6953       continue
6954     fi
6955
6956                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
6957     if test "x$already" = "x"; then
6958       DIRS="$DIRS $dir"
6959     fi
6960   done
6961 fi
6962
6963 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
6964
6965
6966   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
6967     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient in $try" >&5
6968 $as_echo_n "checking for lcc_connect in -lcollectdclient in $try... " >&6; }
6969     LIBS="-lcollectdclient $old_LIBS"
6970     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
6971     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6972 /* end confdefs.h.  */
6973 extern char lcc_connect();
6974 int
6975 main ()
6976 {
6977 lcc_connect()
6978   ;
6979   return 0;
6980 }
6981 _ACEOF
6982 if ac_fn_c_try_link "$LINENO"; then :
6983
6984                   smart_lib="-lcollectdclient"
6985                   smart_ldflags="-L$try -Wl,-rpath,$try"
6986                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6987 $as_echo "yes" >&6; }
6988                   break
6989
6990 else
6991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6992 $as_echo "no" >&6; }
6993 fi
6994 rm -f core conftest.err conftest.$ac_objext \
6995     conftest$ac_exeext conftest.$ac_ext
6996   done
6997   LIBS="$old_LIBS"
6998   CPPFLAGS="$old_CPPFLAGS"
6999 fi
7000
7001 if test "x$smart_lib" != "x"; then
7002   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
7003   LIBS="$smart_ldflags $smart_lib $old_LIBS"
7004   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
7005 fi
7006
7007 if test "x$ac_cv_lib_collectdclient_lcc_connect" != "xyes"; then
7008   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: collectdclient library not found. Use --with-collectdclient-lib-dir=<path>." >&5
7009 $as_echo "$as_me: WARNING: collectdclient library not found. Use --with-collectdclient-lib-dir=<path>." >&2;}
7010 else
7011   COLLECTDC_LIBS="${smart_lib}"
7012   COLLECTDC_LDFLAGS="${smart_ldflags}"
7013 fi
7014 LIBS="${old_LIBS}"
7015
7016 cap_lib_dir=
7017
7018 # Check whether --with-cap-lib-dir was given.
7019 if test "${with_cap_lib_dir+set}" = set; then :
7020   withval=$with_cap_lib_dir; case "$withval" in
7021     no)
7022       as_fn_error $? "Need cap-lib-dir" "$LINENO" 5
7023       ;;
7024     yes)
7025       ;;
7026     *)
7027       cap_lib_dir="$withval"
7028       ;;
7029   esac
7030 fi
7031
7032
7033 cap_include_dir=
7034
7035 # Check whether --with-cap-include-dir was given.
7036 if test "${with_cap_include_dir+set}" = set; then :
7037   withval=$with_cap_include_dir; case "$withval" in
7038     no)
7039       as_fn_error $? "Need cap-include-dir" "$LINENO" 5
7040       ;;
7041     yes)
7042       ;;
7043     *)
7044       cap_include_dir="$withval"
7045       ;;
7046   esac
7047 fi
7048
7049
7050 smart_try_dir="$cap_lib_dir"
7051
7052
7053 sm_lib_safe=`echo "cap" | sed 'y%./+-%__p_%'`
7054 sm_func_safe=`echo "cap_get_proc" | sed 'y%./+-%__p_%'`
7055
7056 old_LIBS="$LIBS"
7057 old_CPPFLAGS="$CPPFLAGS"
7058 smart_lib=
7059 smart_ldflags=
7060 smart_lib_dir=
7061
7062 if test "x$smart_try_dir" != "x"; then
7063   for try in $smart_try_dir; do
7064     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap in $try" >&5
7065 $as_echo_n "checking for cap_get_proc in -lcap in $try... " >&6; }
7066     LIBS="-lcap $old_LIBS"
7067     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
7068     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7069 /* end confdefs.h.  */
7070 extern char cap_get_proc();
7071 int
7072 main ()
7073 {
7074 cap_get_proc()
7075   ;
7076   return 0;
7077 }
7078 _ACEOF
7079 if ac_fn_c_try_link "$LINENO"; then :
7080
7081                  smart_lib="-lcap"
7082                  smart_ldflags="-L$try -Wl,-rpath,$try"
7083                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7084 $as_echo "yes" >&6; }
7085                  break
7086
7087 else
7088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7089 $as_echo "no" >&6; }
7090 fi
7091 rm -f core conftest.err conftest.$ac_objext \
7092     conftest$ac_exeext conftest.$ac_ext
7093   done
7094   LIBS="$old_LIBS"
7095   CPPFLAGS="$old_CPPFLAGS"
7096 fi
7097
7098 if test "x$smart_lib" = "x"; then
7099   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap" >&5
7100 $as_echo_n "checking for cap_get_proc in -lcap... " >&6; }
7101   LIBS="-lcap $old_LIBS"
7102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7103 /* end confdefs.h.  */
7104 extern char cap_get_proc();
7105 int
7106 main ()
7107 {
7108 cap_get_proc()
7109   ;
7110   return 0;
7111 }
7112 _ACEOF
7113 if ac_fn_c_try_link "$LINENO"; then :
7114
7115                 smart_lib="-lcap"
7116                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7117 $as_echo "yes" >&6; }
7118
7119 else
7120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7121 $as_echo "no" >&6; }
7122 fi
7123 rm -f core conftest.err conftest.$ac_objext \
7124     conftest$ac_exeext conftest.$ac_ext
7125   LIBS="$old_LIBS"
7126 fi
7127
7128 if test "x$smart_lib" = "x"; then
7129
7130
7131 if test "x$LOCATE" != "x"; then
7132         DIRS=
7133   file=libcap${libltdl_cv_shlibext}
7134
7135   for x in `${LOCATE} $file 2>/dev/null`; do
7136                                         base=`echo $x | sed "s%/${file}%%"`
7137     if test "x$x" = "x$base"; then
7138       continue;
7139     fi
7140
7141     dir=`${DIRNAME} $x 2>/dev/null`
7142                 exclude=`echo ${dir} | ${GREP} /home`
7143     if test "x$exclude" != "x"; then
7144       continue
7145     fi
7146
7147                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
7148     if test "x$already" = "x"; then
7149       DIRS="$DIRS $dir"
7150     fi
7151   done
7152 fi
7153
7154 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
7155
7156
7157
7158 if test "x$LOCATE" != "x"; then
7159         DIRS=
7160   file=libcap.a
7161
7162   for x in `${LOCATE} $file 2>/dev/null`; do
7163                                         base=`echo $x | sed "s%/${file}%%"`
7164     if test "x$x" = "x$base"; then
7165       continue;
7166     fi
7167
7168     dir=`${DIRNAME} $x 2>/dev/null`
7169                 exclude=`echo ${dir} | ${GREP} /home`
7170     if test "x$exclude" != "x"; then
7171       continue
7172     fi
7173
7174                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
7175     if test "x$already" = "x"; then
7176       DIRS="$DIRS $dir"
7177     fi
7178   done
7179 fi
7180
7181 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
7182
7183
7184   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
7185     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap in $try" >&5
7186 $as_echo_n "checking for cap_get_proc in -lcap in $try... " >&6; }
7187     LIBS="-lcap $old_LIBS"
7188     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
7189     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7190 /* end confdefs.h.  */
7191 extern char cap_get_proc();
7192 int
7193 main ()
7194 {
7195 cap_get_proc()
7196   ;
7197   return 0;
7198 }
7199 _ACEOF
7200 if ac_fn_c_try_link "$LINENO"; then :
7201
7202                   smart_lib="-lcap"
7203                   smart_ldflags="-L$try -Wl,-rpath,$try"
7204                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7205 $as_echo "yes" >&6; }
7206                   break
7207
7208 else
7209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7210 $as_echo "no" >&6; }
7211 fi
7212 rm -f core conftest.err conftest.$ac_objext \
7213     conftest$ac_exeext conftest.$ac_ext
7214   done
7215   LIBS="$old_LIBS"
7216   CPPFLAGS="$old_CPPFLAGS"
7217 fi
7218
7219 if test "x$smart_lib" != "x"; then
7220   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
7221   LIBS="$smart_ldflags $smart_lib $old_LIBS"
7222   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
7223 fi
7224
7225 if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then
7226   { $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
7227 $as_echo "$as_me: WARNING: cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>." >&2;}
7228 else
7229
7230 $as_echo "#define HAVE_LIBCAP 1" >>confdefs.h
7231
7232   HAVE_LIBCAP=1
7233 fi
7234
7235
7236   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a readline compatible library" >&5
7237 $as_echo_n "checking for a readline compatible library... " >&6; }
7238 if ${vl_cv_lib_readline+:} false; then :
7239   $as_echo_n "(cached) " >&6
7240 else
7241
7242     ORIG_LIBS="$LIBS"
7243     for readline_lib in readline edit editline; do
7244       for termcap_lib in "" termcap curses ncurses; do
7245         if test -z "$termcap_lib"; then
7246           TRY_LIB="-l$readline_lib"
7247         else
7248           TRY_LIB="-l$readline_lib -l$termcap_lib"
7249         fi
7250         LIBS="$ORIG_LIBS $TRY_LIB"
7251         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7252 /* end confdefs.h.  */
7253
7254 /* Override any GCC internal prototype to avoid an error.
7255    Use char because int might match the return type of a GCC
7256    builtin and then its argument prototype would still apply.  */
7257 #ifdef __cplusplus
7258 extern "C"
7259 #endif
7260 char readline ();
7261 int
7262 main ()
7263 {
7264 return readline ();
7265   ;
7266   return 0;
7267 }
7268 _ACEOF
7269 if ac_fn_c_try_link "$LINENO"; then :
7270   vl_cv_lib_readline="$TRY_LIB"
7271 fi
7272 rm -f core conftest.err conftest.$ac_objext \
7273     conftest$ac_exeext conftest.$ac_ext
7274         if test -n "$vl_cv_lib_readline"; then
7275           break
7276         fi
7277       done
7278       if test -n "$vl_cv_lib_readline"; then
7279         break
7280       fi
7281     done
7282     if test -z "$vl_cv_lib_readline"; then
7283       vl_cv_lib_readline="no"
7284       LIBS="$ORIG_LIBS"
7285     fi
7286
7287 fi
7288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vl_cv_lib_readline" >&5
7289 $as_echo "$vl_cv_lib_readline" >&6; }
7290
7291   if test "$vl_cv_lib_readline" != "no"; then
7292     LIBREADLINE="$vl_cv_lib_readline"
7293
7294 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
7295
7296     for ac_header in readline.h readline/readline.h
7297 do :
7298   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7299 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7300 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7301   cat >>confdefs.h <<_ACEOF
7302 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7303 _ACEOF
7304
7305 fi
7306
7307 done
7308
7309     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
7310 $as_echo_n "checking whether readline supports history... " >&6; }
7311 if ${vl_cv_lib_readline_history+:} false; then :
7312   $as_echo_n "(cached) " >&6
7313 else
7314
7315       vl_cv_lib_readline_history="no"
7316       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7317 /* end confdefs.h.  */
7318
7319 /* Override any GCC internal prototype to avoid an error.
7320    Use char because int might match the return type of a GCC
7321    builtin and then its argument prototype would still apply.  */
7322 #ifdef __cplusplus
7323 extern "C"
7324 #endif
7325 char add_history ();
7326 int
7327 main ()
7328 {
7329 return add_history ();
7330   ;
7331   return 0;
7332 }
7333 _ACEOF
7334 if ac_fn_c_try_link "$LINENO"; then :
7335   vl_cv_lib_readline_history="yes"
7336 fi
7337 rm -f core conftest.err conftest.$ac_objext \
7338     conftest$ac_exeext conftest.$ac_ext
7339
7340 fi
7341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vl_cv_lib_readline_history" >&5
7342 $as_echo "$vl_cv_lib_readline_history" >&6; }
7343     if test "$vl_cv_lib_readline_history" = "yes"; then
7344
7345 $as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
7346
7347       for ac_header in history.h readline/history.h
7348 do :
7349   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7350 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7351 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7352   cat >>confdefs.h <<_ACEOF
7353 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7354 _ACEOF
7355
7356 fi
7357
7358 done
7359
7360     fi
7361   fi
7362
7363
7364
7365
7366 smart_try_dir="$talloc_include_dir"
7367
7368
7369 ac_safe=`echo "talloc.h" | sed 'y%./+-%__pm%'`
7370 old_CPPFLAGS="$CPPFLAGS"
7371 smart_include=
7372 smart_include_dir="/usr/local/include /opt/include"
7373
7374 _smart_try_dir=
7375 _smart_include_dir=
7376
7377 for _prefix in $smart_prefix ""; do
7378   for _dir in $smart_try_dir; do
7379     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
7380   done
7381
7382   for _dir in $smart_include_dir; do
7383     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
7384   done
7385 done
7386
7387 if test "x$_smart_try_dir" != "x"; then
7388   for try in $_smart_try_dir; do
7389     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h in $try" >&5
7390 $as_echo_n "checking for talloc.h in $try... " >&6; }
7391     CPPFLAGS="-isystem $try $old_CPPFLAGS"
7392     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7393 /* end confdefs.h.  */
7394
7395                     #include <talloc.h>
7396 int
7397 main ()
7398 {
7399 int a = 1;
7400   ;
7401   return 0;
7402 }
7403 _ACEOF
7404 if ac_fn_c_try_compile "$LINENO"; then :
7405
7406                      smart_include="-isystem $try"
7407                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7408 $as_echo "yes" >&6; }
7409                      break
7410
7411 else
7412
7413                      smart_include=
7414                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7415 $as_echo "no" >&6; }
7416
7417 fi
7418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7419   done
7420   CPPFLAGS="$old_CPPFLAGS"
7421 fi
7422
7423 if test "x$smart_include" = "x"; then
7424   for _prefix in $smart_prefix; do
7425     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/talloc.h" >&5
7426 $as_echo_n "checking for ${_prefix}/talloc.h... " >&6; }
7427
7428     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7429 /* end confdefs.h.  */
7430
7431                     #include <talloc.h>
7432 int
7433 main ()
7434 {
7435 int a = 1;
7436   ;
7437   return 0;
7438 }
7439 _ACEOF
7440 if ac_fn_c_try_compile "$LINENO"; then :
7441
7442                      smart_include="-isystem ${_prefix}/"
7443                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7444 $as_echo "yes" >&6; }
7445                      break
7446
7447 else
7448
7449                      smart_include=
7450                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7451 $as_echo "no" >&6; }
7452
7453 fi
7454 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7455   done
7456 fi
7457
7458 if test "x$smart_include" = "x"; then
7459     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h" >&5
7460 $as_echo_n "checking for talloc.h... " >&6; }
7461
7462     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7463 /* end confdefs.h.  */
7464
7465                     #include <talloc.h>
7466 int
7467 main ()
7468 {
7469 int a = 1;
7470   ;
7471   return 0;
7472 }
7473 _ACEOF
7474 if ac_fn_c_try_compile "$LINENO"; then :
7475
7476                      smart_include=" "
7477                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7478 $as_echo "yes" >&6; }
7479                      break
7480
7481 else
7482
7483                      smart_include=
7484                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7485 $as_echo "no" >&6; }
7486
7487 fi
7488 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7489 fi
7490
7491 if test "x$smart_include" = "x"; then
7492
7493   for prefix in $smart_prefix; do
7494
7495
7496 if test "x$LOCATE" != "x"; then
7497         DIRS=
7498   file="${_prefix}/${1}"
7499
7500   for x in `${LOCATE} $file 2>/dev/null`; do
7501                                         base=`echo $x | sed "s%/${file}%%"`
7502     if test "x$x" = "x$base"; then
7503       continue;
7504     fi
7505
7506     dir=`${DIRNAME} $x 2>/dev/null`
7507                 exclude=`echo ${dir} | ${GREP} /home`
7508     if test "x$exclude" != "x"; then
7509       continue
7510     fi
7511
7512                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
7513     if test "x$already" = "x"; then
7514       DIRS="$DIRS $dir"
7515     fi
7516   done
7517 fi
7518
7519 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
7520
7521   done
7522
7523
7524 if test "x$LOCATE" != "x"; then
7525         DIRS=
7526   file=talloc.h
7527
7528   for x in `${LOCATE} $file 2>/dev/null`; do
7529                                         base=`echo $x | sed "s%/${file}%%"`
7530     if test "x$x" = "x$base"; then
7531       continue;
7532     fi
7533
7534     dir=`${DIRNAME} $x 2>/dev/null`
7535                 exclude=`echo ${dir} | ${GREP} /home`
7536     if test "x$exclude" != "x"; then
7537       continue
7538     fi
7539
7540                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
7541     if test "x$already" = "x"; then
7542       DIRS="$DIRS $dir"
7543     fi
7544   done
7545 fi
7546
7547 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
7548
7549
7550   for try in $_smart_include_dir; do
7551     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h in $try" >&5
7552 $as_echo_n "checking for talloc.h in $try... " >&6; }
7553     CPPFLAGS="-isystem $try $old_CPPFLAGS"
7554     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7555 /* end confdefs.h.  */
7556
7557                     #include <talloc.h>
7558 int
7559 main ()
7560 {
7561 int a = 1;
7562   ;
7563   return 0;
7564 }
7565 _ACEOF
7566 if ac_fn_c_try_compile "$LINENO"; then :
7567
7568                      smart_include="-isystem $try"
7569                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7570 $as_echo "yes" >&6; }
7571                      break
7572
7573 else
7574
7575                      smart_include=
7576                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7577 $as_echo "no" >&6; }
7578
7579 fi
7580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7581   done
7582   CPPFLAGS="$old_CPPFLAGS"
7583 fi
7584
7585 if test "x$smart_include" != "x"; then
7586   eval "ac_cv_header_$ac_safe=yes"
7587   CPPFLAGS="$smart_include $old_CPPFLAGS"
7588   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
7589 fi
7590
7591 smart_prefix=
7592
7593 if test "x$ac_cv_header_talloc_h" != "xyes"; then
7594   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: talloc headers not found. Use --with-talloc-include-dir=<path>." >&5
7595 $as_echo "$as_me: WARNING: talloc headers not found. Use --with-talloc-include-dir=<path>." >&2;}
7596   as_fn_error $? "FreeRADIUS requires libtalloc" "$LINENO" 5
7597 fi
7598
7599 case "$host" in
7600   *-interix*)
7601     CFLAGS="$CFLAGS -D_ALL_SOURCE"
7602     ;;
7603   *-darwin*)
7604     CFLAGS="$CFLAGS -DDARWIN"
7605     LIBS="-framework DirectoryService $LIBS"
7606
7607 $as_echo "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
7608
7609     ;;
7610 esac
7611
7612 ac_header_dirent=no
7613 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
7614   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7616 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
7617 if eval \${$as_ac_Header+:} false; then :
7618   $as_echo_n "(cached) " >&6
7619 else
7620   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7621 /* end confdefs.h.  */
7622 #include <sys/types.h>
7623 #include <$ac_hdr>
7624
7625 int
7626 main ()
7627 {
7628 if ((DIR *) 0)
7629 return 0;
7630   ;
7631   return 0;
7632 }
7633 _ACEOF
7634 if ac_fn_c_try_compile "$LINENO"; then :
7635   eval "$as_ac_Header=yes"
7636 else
7637   eval "$as_ac_Header=no"
7638 fi
7639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7640 fi
7641 eval ac_res=\$$as_ac_Header
7642                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7643 $as_echo "$ac_res" >&6; }
7644 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7645   cat >>confdefs.h <<_ACEOF
7646 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
7647 _ACEOF
7648
7649 ac_header_dirent=$ac_hdr; break
7650 fi
7651
7652 done
7653 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7654 if test $ac_header_dirent = dirent.h; then
7655   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7656 $as_echo_n "checking for library containing opendir... " >&6; }
7657 if ${ac_cv_search_opendir+:} false; then :
7658   $as_echo_n "(cached) " >&6
7659 else
7660   ac_func_search_save_LIBS=$LIBS
7661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7662 /* end confdefs.h.  */
7663
7664 /* Override any GCC internal prototype to avoid an error.
7665    Use char because int might match the return type of a GCC
7666    builtin and then its argument prototype would still apply.  */
7667 #ifdef __cplusplus
7668 extern "C"
7669 #endif
7670 char opendir ();
7671 int
7672 main ()
7673 {
7674 return opendir ();
7675   ;
7676   return 0;
7677 }
7678 _ACEOF
7679 for ac_lib in '' dir; do
7680   if test -z "$ac_lib"; then
7681     ac_res="none required"
7682   else
7683     ac_res=-l$ac_lib
7684     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7685   fi
7686   if ac_fn_c_try_link "$LINENO"; then :
7687   ac_cv_search_opendir=$ac_res
7688 fi
7689 rm -f core conftest.err conftest.$ac_objext \
7690     conftest$ac_exeext
7691   if ${ac_cv_search_opendir+:} false; then :
7692   break
7693 fi
7694 done
7695 if ${ac_cv_search_opendir+:} false; then :
7696
7697 else
7698   ac_cv_search_opendir=no
7699 fi
7700 rm conftest.$ac_ext
7701 LIBS=$ac_func_search_save_LIBS
7702 fi
7703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7704 $as_echo "$ac_cv_search_opendir" >&6; }
7705 ac_res=$ac_cv_search_opendir
7706 if test "$ac_res" != no; then :
7707   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7708
7709 fi
7710
7711 else
7712   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7713 $as_echo_n "checking for library containing opendir... " >&6; }
7714 if ${ac_cv_search_opendir+:} false; then :
7715   $as_echo_n "(cached) " >&6
7716 else
7717   ac_func_search_save_LIBS=$LIBS
7718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7719 /* end confdefs.h.  */
7720
7721 /* Override any GCC internal prototype to avoid an error.
7722    Use char because int might match the return type of a GCC
7723    builtin and then its argument prototype would still apply.  */
7724 #ifdef __cplusplus
7725 extern "C"
7726 #endif
7727 char opendir ();
7728 int
7729 main ()
7730 {
7731 return opendir ();
7732   ;
7733   return 0;
7734 }
7735 _ACEOF
7736 for ac_lib in '' x; do
7737   if test -z "$ac_lib"; then
7738     ac_res="none required"
7739   else
7740     ac_res=-l$ac_lib
7741     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7742   fi
7743   if ac_fn_c_try_link "$LINENO"; then :
7744   ac_cv_search_opendir=$ac_res
7745 fi
7746 rm -f core conftest.err conftest.$ac_objext \
7747     conftest$ac_exeext
7748   if ${ac_cv_search_opendir+:} false; then :
7749   break
7750 fi
7751 done
7752 if ${ac_cv_search_opendir+:} false; then :
7753
7754 else
7755   ac_cv_search_opendir=no
7756 fi
7757 rm conftest.$ac_ext
7758 LIBS=$ac_func_search_save_LIBS
7759 fi
7760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7761 $as_echo "$ac_cv_search_opendir" >&6; }
7762 ac_res=$ac_cv_search_opendir
7763 if test "$ac_res" != no; then :
7764   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7765
7766 fi
7767
7768 fi
7769
7770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7771 $as_echo_n "checking for ANSI C header files... " >&6; }
7772 if ${ac_cv_header_stdc+:} false; then :
7773   $as_echo_n "(cached) " >&6
7774 else
7775   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7776 /* end confdefs.h.  */
7777 #include <stdlib.h>
7778 #include <stdarg.h>
7779 #include <string.h>
7780 #include <float.h>
7781
7782 int
7783 main ()
7784 {
7785
7786   ;
7787   return 0;
7788 }
7789 _ACEOF
7790 if ac_fn_c_try_compile "$LINENO"; then :
7791   ac_cv_header_stdc=yes
7792 else
7793   ac_cv_header_stdc=no
7794 fi
7795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7796
7797 if test $ac_cv_header_stdc = yes; then
7798   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7799   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7800 /* end confdefs.h.  */
7801 #include <string.h>
7802
7803 _ACEOF
7804 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7805   $EGREP "memchr" >/dev/null 2>&1; then :
7806
7807 else
7808   ac_cv_header_stdc=no
7809 fi
7810 rm -f conftest*
7811
7812 fi
7813
7814 if test $ac_cv_header_stdc = yes; then
7815   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7817 /* end confdefs.h.  */
7818 #include <stdlib.h>
7819
7820 _ACEOF
7821 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7822   $EGREP "free" >/dev/null 2>&1; then :
7823
7824 else
7825   ac_cv_header_stdc=no
7826 fi
7827 rm -f conftest*
7828
7829 fi
7830
7831 if test $ac_cv_header_stdc = yes; then
7832   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7833   if test "$cross_compiling" = yes; then :
7834   :
7835 else
7836   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7837 /* end confdefs.h.  */
7838 #include <ctype.h>
7839 #include <stdlib.h>
7840 #if ((' ' & 0x0FF) == 0x020)
7841 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7842 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7843 #else
7844 # define ISLOWER(c) \
7845                    (('a' <= (c) && (c) <= 'i') \
7846                      || ('j' <= (c) && (c) <= 'r') \
7847                      || ('s' <= (c) && (c) <= 'z'))
7848 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7849 #endif
7850
7851 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7852 int
7853 main ()
7854 {
7855   int i;
7856   for (i = 0; i < 256; i++)
7857     if (XOR (islower (i), ISLOWER (i))
7858         || toupper (i) != TOUPPER (i))
7859       return 2;
7860   return 0;
7861 }
7862 _ACEOF
7863 if ac_fn_c_try_run "$LINENO"; then :
7864
7865 else
7866   ac_cv_header_stdc=no
7867 fi
7868 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7869   conftest.$ac_objext conftest.beam conftest.$ac_ext
7870 fi
7871
7872 fi
7873 fi
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7875 $as_echo "$ac_cv_header_stdc" >&6; }
7876 if test $ac_cv_header_stdc = yes; then
7877
7878 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7879
7880 fi
7881
7882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
7883 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
7884 if ${ac_cv_header_time+:} false; then :
7885   $as_echo_n "(cached) " >&6
7886 else
7887   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7888 /* end confdefs.h.  */
7889 #include <sys/types.h>
7890 #include <sys/time.h>
7891 #include <time.h>
7892
7893 int
7894 main ()
7895 {
7896 if ((struct tm *) 0)
7897 return 0;
7898   ;
7899   return 0;
7900 }
7901 _ACEOF
7902 if ac_fn_c_try_compile "$LINENO"; then :
7903   ac_cv_header_time=yes
7904 else
7905   ac_cv_header_time=no
7906 fi
7907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7908 fi
7909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
7910 $as_echo "$ac_cv_header_time" >&6; }
7911 if test $ac_cv_header_time = yes; then
7912
7913 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
7914
7915 fi
7916
7917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
7918 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
7919 if ${ac_cv_header_sys_wait_h+:} false; then :
7920   $as_echo_n "(cached) " >&6
7921 else
7922   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7923 /* end confdefs.h.  */
7924 #include <sys/types.h>
7925 #include <sys/wait.h>
7926 #ifndef WEXITSTATUS
7927 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
7928 #endif
7929 #ifndef WIFEXITED
7930 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7931 #endif
7932
7933 int
7934 main ()
7935 {
7936   int s;
7937   wait (&s);
7938   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7939   ;
7940   return 0;
7941 }
7942 _ACEOF
7943 if ac_fn_c_try_compile "$LINENO"; then :
7944   ac_cv_header_sys_wait_h=yes
7945 else
7946   ac_cv_header_sys_wait_h=no
7947 fi
7948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7949 fi
7950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
7951 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
7952 if test $ac_cv_header_sys_wait_h = yes; then
7953
7954 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7955
7956 fi
7957
7958
7959 for ac_header in \
7960   arpa/inet.h \
7961   crypt.h \
7962   dlfcn.h \
7963   errno.h \
7964   fcntl.h \
7965   features.h \
7966   fnmatch.h \
7967   getopt.h \
7968   glob.h \
7969   grp.h \
7970   inttypes.h \
7971   limits.h \
7972   malloc.h \
7973   netdb.h \
7974   netinet/in.h \
7975   prot.h \
7976   pwd.h \
7977   resource.h \
7978   semaphore.h \
7979   sia.h \
7980   siad.h \
7981   signal.h \
7982   stdbool.h \
7983   stddef.h \
7984   stdint.h \
7985   stdio.h \
7986   sys/event.h \
7987   sys/fcntl.h \
7988   sys/prctl.h \
7989   sys/ptrace.h \
7990   sys/resource.h \
7991   sys/security.h \
7992   sys/select.h \
7993   sys/socket.h \
7994   sys/time.h \
7995   sys/types.h \
7996   sys/un.h \
7997   sys/wait.h \
7998   syslog.h \
7999   unistd.h \
8000   utime.h \
8001   utmp.h \
8002   utmpx.h \
8003   winsock.h
8004
8005 do :
8006   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8007 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8008 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8009   cat >>confdefs.h <<_ACEOF
8010 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8011 _ACEOF
8012
8013 fi
8014
8015 done
8016
8017
8018 for ac_header in net/if.h
8019 do :
8020   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
8021     #ifdef HAVE_SYS_SOCKET_H
8022     #  include <sys/socket.h>
8023     #endif
8024
8025
8026 "
8027 if test "x$ac_cv_header_net_if_h" = xyes; then :
8028   cat >>confdefs.h <<_ACEOF
8029 #define HAVE_NET_IF_H 1
8030 _ACEOF
8031
8032 fi
8033
8034 done
8035
8036
8037 if test "x$ac_cv_header_sys_security_h" = "xyes" && test "x$ac_cv_header_prot_h" = "xyes"
8038 then
8039
8040 $as_echo "#define OSFC2 /**/" >>confdefs.h
8041
8042 fi
8043
8044 if test "x$ac_cv_header_sia_h" = "xyes" && test "x$ac_cv_header_siad_h" = "xyes"
8045 then
8046
8047 $as_echo "#define OSFSIA /**/" >>confdefs.h
8048
8049 fi
8050
8051 if test "x$WITH_OPENSSL" = xyes; then
8052   OLD_LIBS="$LIBS"
8053
8054         CFLAGS="$CFLAGS -DOPENSSL_NO_KRB5"
8055
8056         smart_try_dir="$openssl_lib_dir"
8057
8058
8059 sm_lib_safe=`echo "crypto" | sed 'y%./+-%__p_%'`
8060 sm_func_safe=`echo "DH_new" | sed 'y%./+-%__p_%'`
8061
8062 old_LIBS="$LIBS"
8063 old_CPPFLAGS="$CPPFLAGS"
8064 smart_lib=
8065 smart_ldflags=
8066 smart_lib_dir=
8067
8068 if test "x$smart_try_dir" != "x"; then
8069   for try in $smart_try_dir; do
8070     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto in $try" >&5
8071 $as_echo_n "checking for DH_new in -lcrypto in $try... " >&6; }
8072     LIBS="-lcrypto $old_LIBS"
8073     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
8074     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8075 /* end confdefs.h.  */
8076 extern char DH_new();
8077 int
8078 main ()
8079 {
8080 DH_new()
8081   ;
8082   return 0;
8083 }
8084 _ACEOF
8085 if ac_fn_c_try_link "$LINENO"; then :
8086
8087                  smart_lib="-lcrypto"
8088                  smart_ldflags="-L$try -Wl,-rpath,$try"
8089                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8090 $as_echo "yes" >&6; }
8091                  break
8092
8093 else
8094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8095 $as_echo "no" >&6; }
8096 fi
8097 rm -f core conftest.err conftest.$ac_objext \
8098     conftest$ac_exeext conftest.$ac_ext
8099   done
8100   LIBS="$old_LIBS"
8101   CPPFLAGS="$old_CPPFLAGS"
8102 fi
8103
8104 if test "x$smart_lib" = "x"; then
8105   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto" >&5
8106 $as_echo_n "checking for DH_new in -lcrypto... " >&6; }
8107   LIBS="-lcrypto $old_LIBS"
8108   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8109 /* end confdefs.h.  */
8110 extern char DH_new();
8111 int
8112 main ()
8113 {
8114 DH_new()
8115   ;
8116   return 0;
8117 }
8118 _ACEOF
8119 if ac_fn_c_try_link "$LINENO"; then :
8120
8121                 smart_lib="-lcrypto"
8122                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8123 $as_echo "yes" >&6; }
8124
8125 else
8126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8127 $as_echo "no" >&6; }
8128 fi
8129 rm -f core conftest.err conftest.$ac_objext \
8130     conftest$ac_exeext conftest.$ac_ext
8131   LIBS="$old_LIBS"
8132 fi
8133
8134 if test "x$smart_lib" = "x"; then
8135
8136
8137 if test "x$LOCATE" != "x"; then
8138         DIRS=
8139   file=libcrypto${libltdl_cv_shlibext}
8140
8141   for x in `${LOCATE} $file 2>/dev/null`; do
8142                                         base=`echo $x | sed "s%/${file}%%"`
8143     if test "x$x" = "x$base"; then
8144       continue;
8145     fi
8146
8147     dir=`${DIRNAME} $x 2>/dev/null`
8148                 exclude=`echo ${dir} | ${GREP} /home`
8149     if test "x$exclude" != "x"; then
8150       continue
8151     fi
8152
8153                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
8154     if test "x$already" = "x"; then
8155       DIRS="$DIRS $dir"
8156     fi
8157   done
8158 fi
8159
8160 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
8161
8162
8163
8164 if test "x$LOCATE" != "x"; then
8165         DIRS=
8166   file=libcrypto.a
8167
8168   for x in `${LOCATE} $file 2>/dev/null`; do
8169                                         base=`echo $x | sed "s%/${file}%%"`
8170     if test "x$x" = "x$base"; then
8171       continue;
8172     fi
8173
8174     dir=`${DIRNAME} $x 2>/dev/null`
8175                 exclude=`echo ${dir} | ${GREP} /home`
8176     if test "x$exclude" != "x"; then
8177       continue
8178     fi
8179
8180                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
8181     if test "x$already" = "x"; then
8182       DIRS="$DIRS $dir"
8183     fi
8184   done
8185 fi
8186
8187 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
8188
8189
8190   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
8191     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto in $try" >&5
8192 $as_echo_n "checking for DH_new in -lcrypto in $try... " >&6; }
8193     LIBS="-lcrypto $old_LIBS"
8194     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
8195     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8196 /* end confdefs.h.  */
8197 extern char DH_new();
8198 int
8199 main ()
8200 {
8201 DH_new()
8202   ;
8203   return 0;
8204 }
8205 _ACEOF
8206 if ac_fn_c_try_link "$LINENO"; then :
8207
8208                   smart_lib="-lcrypto"
8209                   smart_ldflags="-L$try -Wl,-rpath,$try"
8210                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8211 $as_echo "yes" >&6; }
8212                   break
8213
8214 else
8215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8216 $as_echo "no" >&6; }
8217 fi
8218 rm -f core conftest.err conftest.$ac_objext \
8219     conftest$ac_exeext conftest.$ac_ext
8220   done
8221   LIBS="$old_LIBS"
8222   CPPFLAGS="$old_CPPFLAGS"
8223 fi
8224
8225 if test "x$smart_lib" != "x"; then
8226   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
8227   LIBS="$smart_ldflags $smart_lib $old_LIBS"
8228   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
8229 fi
8230
8231   if test "x$ac_cv_lib_crypto_DH_new" = "xyes"; then
8232
8233 $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
8234
8235     OPENSSL_LIBS="$smart_lib"
8236     OPENSSL_LDFLAGS="$smart_ldflags"
8237
8238
8239
8240 sm_lib_safe=`echo "ssl" | sed 'y%./+-%__p_%'`
8241 sm_func_safe=`echo "SSL_new" | sed 'y%./+-%__p_%'`
8242
8243 old_LIBS="$LIBS"
8244 old_CPPFLAGS="$CPPFLAGS"
8245 smart_lib=
8246 smart_ldflags=
8247 smart_lib_dir=
8248
8249 if test "x$smart_try_dir" != "x"; then
8250   for try in $smart_try_dir; do
8251     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl in $try" >&5
8252 $as_echo_n "checking for SSL_new in -lssl in $try... " >&6; }
8253     LIBS="-lssl $old_LIBS"
8254     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
8255     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8256 /* end confdefs.h.  */
8257 extern char SSL_new();
8258 int
8259 main ()
8260 {
8261 SSL_new()
8262   ;
8263   return 0;
8264 }
8265 _ACEOF
8266 if ac_fn_c_try_link "$LINENO"; then :
8267
8268                  smart_lib="-lssl"
8269                  smart_ldflags="-L$try -Wl,-rpath,$try"
8270                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8271 $as_echo "yes" >&6; }
8272                  break
8273
8274 else
8275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8276 $as_echo "no" >&6; }
8277 fi
8278 rm -f core conftest.err conftest.$ac_objext \
8279     conftest$ac_exeext conftest.$ac_ext
8280   done
8281   LIBS="$old_LIBS"
8282   CPPFLAGS="$old_CPPFLAGS"
8283 fi
8284
8285 if test "x$smart_lib" = "x"; then
8286   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
8287 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
8288   LIBS="-lssl $old_LIBS"
8289   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8290 /* end confdefs.h.  */
8291 extern char SSL_new();
8292 int
8293 main ()
8294 {
8295 SSL_new()
8296   ;
8297   return 0;
8298 }
8299 _ACEOF
8300 if ac_fn_c_try_link "$LINENO"; then :
8301
8302                 smart_lib="-lssl"
8303                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8304 $as_echo "yes" >&6; }
8305
8306 else
8307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8308 $as_echo "no" >&6; }
8309 fi
8310 rm -f core conftest.err conftest.$ac_objext \
8311     conftest$ac_exeext conftest.$ac_ext
8312   LIBS="$old_LIBS"
8313 fi
8314
8315 if test "x$smart_lib" = "x"; then
8316
8317
8318 if test "x$LOCATE" != "x"; then
8319         DIRS=
8320   file=libssl${libltdl_cv_shlibext}
8321
8322   for x in `${LOCATE} $file 2>/dev/null`; do
8323                                         base=`echo $x | sed "s%/${file}%%"`
8324     if test "x$x" = "x$base"; then
8325       continue;
8326     fi
8327
8328     dir=`${DIRNAME} $x 2>/dev/null`
8329                 exclude=`echo ${dir} | ${GREP} /home`
8330     if test "x$exclude" != "x"; then
8331       continue
8332     fi
8333
8334                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
8335     if test "x$already" = "x"; then
8336       DIRS="$DIRS $dir"
8337     fi
8338   done
8339 fi
8340
8341 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
8342
8343
8344
8345 if test "x$LOCATE" != "x"; then
8346         DIRS=
8347   file=libssl.a
8348
8349   for x in `${LOCATE} $file 2>/dev/null`; do
8350                                         base=`echo $x | sed "s%/${file}%%"`
8351     if test "x$x" = "x$base"; then
8352       continue;
8353     fi
8354
8355     dir=`${DIRNAME} $x 2>/dev/null`
8356                 exclude=`echo ${dir} | ${GREP} /home`
8357     if test "x$exclude" != "x"; then
8358       continue
8359     fi
8360
8361                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
8362     if test "x$already" = "x"; then
8363       DIRS="$DIRS $dir"
8364     fi
8365   done
8366 fi
8367
8368 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
8369
8370
8371   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
8372     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl in $try" >&5
8373 $as_echo_n "checking for SSL_new in -lssl in $try... " >&6; }
8374     LIBS="-lssl $old_LIBS"
8375     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
8376     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8377 /* end confdefs.h.  */
8378 extern char SSL_new();
8379 int
8380 main ()
8381 {
8382 SSL_new()
8383   ;
8384   return 0;
8385 }
8386 _ACEOF
8387 if ac_fn_c_try_link "$LINENO"; then :
8388
8389                   smart_lib="-lssl"
8390                   smart_ldflags="-L$try -Wl,-rpath,$try"
8391                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8392 $as_echo "yes" >&6; }
8393                   break
8394
8395 else
8396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8397 $as_echo "no" >&6; }
8398 fi
8399 rm -f core conftest.err conftest.$ac_objext \
8400     conftest$ac_exeext conftest.$ac_ext
8401   done
8402   LIBS="$old_LIBS"
8403   CPPFLAGS="$old_CPPFLAGS"
8404 fi
8405
8406 if test "x$smart_lib" != "x"; then
8407   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
8408   LIBS="$smart_ldflags $smart_lib $old_LIBS"
8409   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
8410 fi
8411
8412     if test "x$ac_cv_lib_ssl_SSL_new" != "xyes"; then
8413       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8414 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8415 as_fn_error $? "failed linking to libssl. Use --with-openssl-lib-dir=<path>, or --with-openssl=no (builds without OpenSSL)
8416 See \`config.log' for more details" "$LINENO" 5; }
8417     else
8418
8419 $as_echo "#define HAVE_LIBSSL 1" >>confdefs.h
8420
8421       OPENSSL_LIBS="$OPENSSL_LIBS $smart_lib"
8422
8423       if test "$OPENSSL_LDFLAGS" != "$smart_ldflags"; then
8424         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8425 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8426 as_fn_error $? "\"inconsistent LDFLAGS between -lssl '$smart_ldflags' and -lcrypto '$OPENSSL_LDFLAGS'\"
8427 See \`config.log' for more details" "$LINENO" 5; }
8428       fi
8429     fi
8430   else
8431     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8432 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8433 as_fn_error $? "failed linking to libcrypto. Use --with-openssl-lib-dir=<path>, or --with-openssl=no (builds without OpenSSL)
8434 See \`config.log' for more details" "$LINENO" 5; }
8435   fi
8436
8437   smart_try_dir="$openssl_include_dir"
8438
8439
8440 ac_safe=`echo "openssl/ssl.h" | sed 'y%./+-%__pm%'`
8441 old_CPPFLAGS="$CPPFLAGS"
8442 smart_include=
8443 smart_include_dir="/usr/local/include /opt/include"
8444
8445 _smart_try_dir=
8446 _smart_include_dir=
8447
8448 for _prefix in $smart_prefix ""; do
8449   for _dir in $smart_try_dir; do
8450     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
8451   done
8452
8453   for _dir in $smart_include_dir; do
8454     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
8455   done
8456 done
8457
8458 if test "x$_smart_try_dir" != "x"; then
8459   for try in $_smart_try_dir; do
8460     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $try" >&5
8461 $as_echo_n "checking for openssl/ssl.h in $try... " >&6; }
8462     CPPFLAGS="-isystem $try $old_CPPFLAGS"
8463     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8464 /* end confdefs.h.  */
8465
8466                     #include <openssl/ssl.h>
8467 int
8468 main ()
8469 {
8470 int a = 1;
8471   ;
8472   return 0;
8473 }
8474 _ACEOF
8475 if ac_fn_c_try_compile "$LINENO"; then :
8476
8477                      smart_include="-isystem $try"
8478                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8479 $as_echo "yes" >&6; }
8480                      break
8481
8482 else
8483
8484                      smart_include=
8485                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8486 $as_echo "no" >&6; }
8487
8488 fi
8489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8490   done
8491   CPPFLAGS="$old_CPPFLAGS"
8492 fi
8493
8494 if test "x$smart_include" = "x"; then
8495   for _prefix in $smart_prefix; do
8496     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/openssl/ssl.h" >&5
8497 $as_echo_n "checking for ${_prefix}/openssl/ssl.h... " >&6; }
8498
8499     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8500 /* end confdefs.h.  */
8501
8502                     #include <openssl/ssl.h>
8503 int
8504 main ()
8505 {
8506 int a = 1;
8507   ;
8508   return 0;
8509 }
8510 _ACEOF
8511 if ac_fn_c_try_compile "$LINENO"; then :
8512
8513                      smart_include="-isystem ${_prefix}/"
8514                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8515 $as_echo "yes" >&6; }
8516                      break
8517
8518 else
8519
8520                      smart_include=
8521                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8522 $as_echo "no" >&6; }
8523
8524 fi
8525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8526   done
8527 fi
8528
8529 if test "x$smart_include" = "x"; then
8530     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h" >&5
8531 $as_echo_n "checking for openssl/ssl.h... " >&6; }
8532
8533     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8534 /* end confdefs.h.  */
8535
8536                     #include <openssl/ssl.h>
8537 int
8538 main ()
8539 {
8540 int a = 1;
8541   ;
8542   return 0;
8543 }
8544 _ACEOF
8545 if ac_fn_c_try_compile "$LINENO"; then :
8546
8547                      smart_include=" "
8548                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8549 $as_echo "yes" >&6; }
8550                      break
8551
8552 else
8553
8554                      smart_include=
8555                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8556 $as_echo "no" >&6; }
8557
8558 fi
8559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8560 fi
8561
8562 if test "x$smart_include" = "x"; then
8563
8564   for prefix in $smart_prefix; do
8565
8566
8567 if test "x$LOCATE" != "x"; then
8568         DIRS=
8569   file="${_prefix}/${1}"
8570
8571   for x in `${LOCATE} $file 2>/dev/null`; do
8572                                         base=`echo $x | sed "s%/${file}%%"`
8573     if test "x$x" = "x$base"; then
8574       continue;
8575     fi
8576
8577     dir=`${DIRNAME} $x 2>/dev/null`
8578                 exclude=`echo ${dir} | ${GREP} /home`
8579     if test "x$exclude" != "x"; then
8580       continue
8581     fi
8582
8583                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
8584     if test "x$already" = "x"; then
8585       DIRS="$DIRS $dir"
8586     fi
8587   done
8588 fi
8589
8590 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
8591
8592   done
8593
8594
8595 if test "x$LOCATE" != "x"; then
8596         DIRS=
8597   file=openssl/ssl.h
8598
8599   for x in `${LOCATE} $file 2>/dev/null`; do
8600                                         base=`echo $x | sed "s%/${file}%%"`
8601     if test "x$x" = "x$base"; then
8602       continue;
8603     fi
8604
8605     dir=`${DIRNAME} $x 2>/dev/null`
8606                 exclude=`echo ${dir} | ${GREP} /home`
8607     if test "x$exclude" != "x"; then
8608       continue
8609     fi
8610
8611                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
8612     if test "x$already" = "x"; then
8613       DIRS="$DIRS $dir"
8614     fi
8615   done
8616 fi
8617
8618 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
8619
8620
8621   for try in $_smart_include_dir; do
8622     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $try" >&5
8623 $as_echo_n "checking for openssl/ssl.h in $try... " >&6; }
8624     CPPFLAGS="-isystem $try $old_CPPFLAGS"
8625     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8626 /* end confdefs.h.  */
8627
8628                     #include <openssl/ssl.h>
8629 int
8630 main ()
8631 {
8632 int a = 1;
8633   ;
8634   return 0;
8635 }
8636 _ACEOF
8637 if ac_fn_c_try_compile "$LINENO"; then :
8638
8639                      smart_include="-isystem $try"
8640                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8641 $as_echo "yes" >&6; }
8642                      break
8643
8644 else
8645
8646                      smart_include=
8647                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8648 $as_echo "no" >&6; }
8649
8650 fi
8651 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8652   done
8653   CPPFLAGS="$old_CPPFLAGS"
8654 fi
8655
8656 if test "x$smart_include" != "x"; then
8657   eval "ac_cv_header_$ac_safe=yes"
8658   CPPFLAGS="$smart_include $old_CPPFLAGS"
8659   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
8660 fi
8661
8662 smart_prefix=
8663
8664   if test "x$ac_cv_header_openssl_ssl_h" = "xyes"; then
8665
8666 $as_echo "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
8667
8668
8669     for ac_header in \
8670       openssl/asn1.h \
8671       openssl/conf.h \
8672       openssl/crypto.h \
8673       openssl/err.h \
8674       openssl/evp.h \
8675       openssl/hmac.h \
8676       openssl/md5.h \
8677       openssl/md4.h \
8678       openssl/sha.h \
8679       openssl/ssl.h \
8680       openssl/ocsp.h \
8681       openssl/engine.h
8682 do :
8683   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8684 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8685 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8686   cat >>confdefs.h <<_ACEOF
8687 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8688 _ACEOF
8689   OPENSSL_CPPFLAGS="$smart_include"
8690 else
8691
8692         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8693 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8694 as_fn_error $? "failed locating OpenSSL headers. Use --with-openssl-include-dir=<path>, or --with-openssl=no (builds without OpenSSL)
8695 See \`config.log' for more details" "$LINENO" 5; }
8696
8697
8698 fi
8699
8700 done
8701
8702
8703     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL version >= 0.9.7" >&5
8704 $as_echo_n "checking for OpenSSL version >= 0.9.7... " >&6; }
8705     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8706 /* end confdefs.h.  */
8707 #include <openssl/crypto.h>
8708        #if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
8709        yes
8710        #endif
8711
8712 _ACEOF
8713 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8714   $EGREP "yes" >/dev/null 2>&1; then :
8715
8716         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8717 $as_echo "yes" >&6; }
8718
8719 else
8720
8721         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8722 $as_echo "no" >&6; }
8723         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8724 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8725 as_fn_error $? "OpenSSL version too old
8726 See \`config.log' for more details" "$LINENO" 5; }
8727
8728
8729 fi
8730 rm -f conftest*
8731
8732
8733                         old_CPPFLAGS="$CPPFLAGS"
8734     CPPFLAGS="$OPENSSL_CPPFLAGS $CPPFLAGS"
8735
8736                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library and header version consistency" >&5
8737 $as_echo_n "checking OpenSSL library and header version consistency... " >&6; }
8738     if test "$cross_compiling" = yes; then :
8739
8740         { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling (assuming yes)" >&5
8741 $as_echo "cross-compiling (assuming yes)" >&6; }
8742
8743
8744 else
8745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8746 /* end confdefs.h.  */
8747
8748           #include <stdio.h>
8749           #include <openssl/opensslv.h>
8750           #include <openssl/crypto.h>
8751
8752 int
8753 main ()
8754 {
8755
8756           printf("library: %lx header: %lx... ", (unsigned long) SSLeay(), (unsigned long) OPENSSL_VERSION_NUMBER);
8757           if (SSLeay() == OPENSSL_VERSION_NUMBER) {
8758             return 0;
8759           } else {
8760             return 1;
8761           }
8762
8763
8764   ;
8765   return 0;
8766 }
8767 _ACEOF
8768 if ac_fn_c_try_run "$LINENO"; then :
8769
8770         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8771 $as_echo "yes" >&6; }
8772
8773 else
8774
8775         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8776 $as_echo "no" >&6; }
8777         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8778 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8779 as_fn_error $? "OpenSSL library version does not match header version
8780 See \`config.log' for more details" "$LINENO" 5; }
8781
8782 fi
8783 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8784   conftest.$ac_objext conftest.beam conftest.$ac_ext
8785 fi
8786
8787                 for ac_func in \
8788       SSL_get_client_random \
8789       SSL_get_server_random \
8790       SSL_SESSION_get_master_key \
8791       HMAC_CTX_new \
8792       HMAC_CTX_free \
8793       ASN1_STRING_get0_data \
8794       CONF_modules_load_file \
8795       CRYPTO_set_id_callback \
8796       CRYPTO_set_locking_callback
8797
8798 do :
8799   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8800 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8801 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8802   cat >>confdefs.h <<_ACEOF
8803 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8804 _ACEOF
8805
8806 fi
8807 done
8808
8809     CPPFLAGS="$old_CPPFLAGS"
8810   fi
8811
8812   LIBS="$OLD_LIBS"
8813
8814
8815
8816   export OPENSSL_LIBS OPENSSL_LDFLAGS OPENSSL_CPPFLAGS
8817 fi
8818
8819 if test "x$PCAP_LIBS" = x; then
8820   { $as_echo "$as_me:${as_lineno-$LINENO}: skipping test for pcap.h." >&5
8821 $as_echo "$as_me: skipping test for pcap.h." >&6;}
8822 else
8823         smart_try_dir="$pcap_include_dir"
8824
8825
8826 ac_safe=`echo "pcap.h" | sed 'y%./+-%__pm%'`
8827 old_CPPFLAGS="$CPPFLAGS"
8828 smart_include=
8829 smart_include_dir="/usr/local/include /opt/include"
8830
8831 _smart_try_dir=
8832 _smart_include_dir=
8833
8834 for _prefix in $smart_prefix ""; do
8835   for _dir in $smart_try_dir; do
8836     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
8837   done
8838
8839   for _dir in $smart_include_dir; do
8840     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
8841   done
8842 done
8843
8844 if test "x$_smart_try_dir" != "x"; then
8845   for try in $_smart_try_dir; do
8846     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h in $try" >&5
8847 $as_echo_n "checking for pcap.h in $try... " >&6; }
8848     CPPFLAGS="-isystem $try $old_CPPFLAGS"
8849     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8850 /* end confdefs.h.  */
8851
8852                     #include <pcap.h>
8853 int
8854 main ()
8855 {
8856 int a = 1;
8857   ;
8858   return 0;
8859 }
8860 _ACEOF
8861 if ac_fn_c_try_compile "$LINENO"; then :
8862
8863                      smart_include="-isystem $try"
8864                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8865 $as_echo "yes" >&6; }
8866                      break
8867
8868 else
8869
8870                      smart_include=
8871                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8872 $as_echo "no" >&6; }
8873
8874 fi
8875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8876   done
8877   CPPFLAGS="$old_CPPFLAGS"
8878 fi
8879
8880 if test "x$smart_include" = "x"; then
8881   for _prefix in $smart_prefix; do
8882     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/pcap.h" >&5
8883 $as_echo_n "checking for ${_prefix}/pcap.h... " >&6; }
8884
8885     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8886 /* end confdefs.h.  */
8887
8888                     #include <pcap.h>
8889 int
8890 main ()
8891 {
8892 int a = 1;
8893   ;
8894   return 0;
8895 }
8896 _ACEOF
8897 if ac_fn_c_try_compile "$LINENO"; then :
8898
8899                      smart_include="-isystem ${_prefix}/"
8900                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8901 $as_echo "yes" >&6; }
8902                      break
8903
8904 else
8905
8906                      smart_include=
8907                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8908 $as_echo "no" >&6; }
8909
8910 fi
8911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8912   done
8913 fi
8914
8915 if test "x$smart_include" = "x"; then
8916     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h" >&5
8917 $as_echo_n "checking for pcap.h... " >&6; }
8918
8919     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8920 /* end confdefs.h.  */
8921
8922                     #include <pcap.h>
8923 int
8924 main ()
8925 {
8926 int a = 1;
8927   ;
8928   return 0;
8929 }
8930 _ACEOF
8931 if ac_fn_c_try_compile "$LINENO"; then :
8932
8933                      smart_include=" "
8934                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8935 $as_echo "yes" >&6; }
8936                      break
8937
8938 else
8939
8940                      smart_include=
8941                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8942 $as_echo "no" >&6; }
8943
8944 fi
8945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8946 fi
8947
8948 if test "x$smart_include" = "x"; then
8949
8950   for prefix in $smart_prefix; do
8951
8952
8953 if test "x$LOCATE" != "x"; then
8954         DIRS=
8955   file="${_prefix}/${1}"
8956
8957   for x in `${LOCATE} $file 2>/dev/null`; do
8958                                         base=`echo $x | sed "s%/${file}%%"`
8959     if test "x$x" = "x$base"; then
8960       continue;
8961     fi
8962
8963     dir=`${DIRNAME} $x 2>/dev/null`
8964                 exclude=`echo ${dir} | ${GREP} /home`
8965     if test "x$exclude" != "x"; then
8966       continue
8967     fi
8968
8969                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
8970     if test "x$already" = "x"; then
8971       DIRS="$DIRS $dir"
8972     fi
8973   done
8974 fi
8975
8976 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
8977
8978   done
8979
8980
8981 if test "x$LOCATE" != "x"; then
8982         DIRS=
8983   file=pcap.h
8984
8985   for x in `${LOCATE} $file 2>/dev/null`; do
8986                                         base=`echo $x | sed "s%/${file}%%"`
8987     if test "x$x" = "x$base"; then
8988       continue;
8989     fi
8990
8991     dir=`${DIRNAME} $x 2>/dev/null`
8992                 exclude=`echo ${dir} | ${GREP} /home`
8993     if test "x$exclude" != "x"; then
8994       continue
8995     fi
8996
8997                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
8998     if test "x$already" = "x"; then
8999       DIRS="$DIRS $dir"
9000     fi
9001   done
9002 fi
9003
9004 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
9005
9006
9007   for try in $_smart_include_dir; do
9008     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h in $try" >&5
9009 $as_echo_n "checking for pcap.h in $try... " >&6; }
9010     CPPFLAGS="-isystem $try $old_CPPFLAGS"
9011     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9012 /* end confdefs.h.  */
9013
9014                     #include <pcap.h>
9015 int
9016 main ()
9017 {
9018 int a = 1;
9019   ;
9020   return 0;
9021 }
9022 _ACEOF
9023 if ac_fn_c_try_compile "$LINENO"; then :
9024
9025                      smart_include="-isystem $try"
9026                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9027 $as_echo "yes" >&6; }
9028                      break
9029
9030 else
9031
9032                      smart_include=
9033                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9034 $as_echo "no" >&6; }
9035
9036 fi
9037 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9038   done
9039   CPPFLAGS="$old_CPPFLAGS"
9040 fi
9041
9042 if test "x$smart_include" != "x"; then
9043   eval "ac_cv_header_$ac_safe=yes"
9044   CPPFLAGS="$smart_include $old_CPPFLAGS"
9045   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
9046 fi
9047
9048 smart_prefix=
9049
9050   if test "x$ac_cv_header_pcap_h" == "xyes"; then
9051
9052 $as_echo "#define HAVE_PCAP_H 1" >>confdefs.h
9053
9054
9055
9056   else
9057     { $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
9058 $as_echo "$as_me: WARNING: pcap headers not found, silently disabling the RADIUS sniffer, and ARP listener. Use --with-pcap-include-dir=<path>." >&2;}
9059   fi
9060 fi
9061
9062 if test "x$COLLECTDC_LIBS" = x; then
9063   { $as_echo "$as_me:${as_lineno-$LINENO}: skipping test for collectd/client.h." >&5
9064 $as_echo "$as_me: skipping test for collectd/client.h." >&6;}
9065 else
9066         smart_try_dir="$collectdclient_include_dir"
9067
9068
9069 ac_safe=`echo "collectd/client.h" | sed 'y%./+-%__pm%'`
9070 old_CPPFLAGS="$CPPFLAGS"
9071 smart_include=
9072 smart_include_dir="/usr/local/include /opt/include"
9073
9074 _smart_try_dir=
9075 _smart_include_dir=
9076
9077 for _prefix in $smart_prefix ""; do
9078   for _dir in $smart_try_dir; do
9079     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
9080   done
9081
9082   for _dir in $smart_include_dir; do
9083     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
9084   done
9085 done
9086
9087 if test "x$_smart_try_dir" != "x"; then
9088   for try in $_smart_try_dir; do
9089     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h in $try" >&5
9090 $as_echo_n "checking for collectd/client.h in $try... " >&6; }
9091     CPPFLAGS="-isystem $try $old_CPPFLAGS"
9092     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9093 /* end confdefs.h.  */
9094
9095                     #include <collectd/client.h>
9096 int
9097 main ()
9098 {
9099 int a = 1;
9100   ;
9101   return 0;
9102 }
9103 _ACEOF
9104 if ac_fn_c_try_compile "$LINENO"; then :
9105
9106                      smart_include="-isystem $try"
9107                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9108 $as_echo "yes" >&6; }
9109                      break
9110
9111 else
9112
9113                      smart_include=
9114                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9115 $as_echo "no" >&6; }
9116
9117 fi
9118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9119   done
9120   CPPFLAGS="$old_CPPFLAGS"
9121 fi
9122
9123 if test "x$smart_include" = "x"; then
9124   for _prefix in $smart_prefix; do
9125     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/collectd/client.h" >&5
9126 $as_echo_n "checking for ${_prefix}/collectd/client.h... " >&6; }
9127
9128     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9129 /* end confdefs.h.  */
9130
9131                     #include <collectd/client.h>
9132 int
9133 main ()
9134 {
9135 int a = 1;
9136   ;
9137   return 0;
9138 }
9139 _ACEOF
9140 if ac_fn_c_try_compile "$LINENO"; then :
9141
9142                      smart_include="-isystem ${_prefix}/"
9143                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9144 $as_echo "yes" >&6; }
9145                      break
9146
9147 else
9148
9149                      smart_include=
9150                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9151 $as_echo "no" >&6; }
9152
9153 fi
9154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9155   done
9156 fi
9157
9158 if test "x$smart_include" = "x"; then
9159     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h" >&5
9160 $as_echo_n "checking for collectd/client.h... " >&6; }
9161
9162     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9163 /* end confdefs.h.  */
9164
9165                     #include <collectd/client.h>
9166 int
9167 main ()
9168 {
9169 int a = 1;
9170   ;
9171   return 0;
9172 }
9173 _ACEOF
9174 if ac_fn_c_try_compile "$LINENO"; then :
9175
9176                      smart_include=" "
9177                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9178 $as_echo "yes" >&6; }
9179                      break
9180
9181 else
9182
9183                      smart_include=
9184                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9185 $as_echo "no" >&6; }
9186
9187 fi
9188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9189 fi
9190
9191 if test "x$smart_include" = "x"; then
9192
9193   for prefix in $smart_prefix; do
9194
9195
9196 if test "x$LOCATE" != "x"; then
9197         DIRS=
9198   file="${_prefix}/${1}"
9199
9200   for x in `${LOCATE} $file 2>/dev/null`; do
9201                                         base=`echo $x | sed "s%/${file}%%"`
9202     if test "x$x" = "x$base"; then
9203       continue;
9204     fi
9205
9206     dir=`${DIRNAME} $x 2>/dev/null`
9207                 exclude=`echo ${dir} | ${GREP} /home`
9208     if test "x$exclude" != "x"; then
9209       continue
9210     fi
9211
9212                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
9213     if test "x$already" = "x"; then
9214       DIRS="$DIRS $dir"
9215     fi
9216   done
9217 fi
9218
9219 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
9220
9221   done
9222
9223
9224 if test "x$LOCATE" != "x"; then
9225         DIRS=
9226   file=collectd/client.h
9227
9228   for x in `${LOCATE} $file 2>/dev/null`; do
9229                                         base=`echo $x | sed "s%/${file}%%"`
9230     if test "x$x" = "x$base"; then
9231       continue;
9232     fi
9233
9234     dir=`${DIRNAME} $x 2>/dev/null`
9235                 exclude=`echo ${dir} | ${GREP} /home`
9236     if test "x$exclude" != "x"; then
9237       continue
9238     fi
9239
9240                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
9241     if test "x$already" = "x"; then
9242       DIRS="$DIRS $dir"
9243     fi
9244   done
9245 fi
9246
9247 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
9248
9249
9250   for try in $_smart_include_dir; do
9251     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h in $try" >&5
9252 $as_echo_n "checking for collectd/client.h in $try... " >&6; }
9253     CPPFLAGS="-isystem $try $old_CPPFLAGS"
9254     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9255 /* end confdefs.h.  */
9256
9257                     #include <collectd/client.h>
9258 int
9259 main ()
9260 {
9261 int a = 1;
9262   ;
9263   return 0;
9264 }
9265 _ACEOF
9266 if ac_fn_c_try_compile "$LINENO"; then :
9267
9268                      smart_include="-isystem $try"
9269                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9270 $as_echo "yes" >&6; }
9271                      break
9272
9273 else
9274
9275                      smart_include=
9276                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9277 $as_echo "no" >&6; }
9278
9279 fi
9280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9281   done
9282   CPPFLAGS="$old_CPPFLAGS"
9283 fi
9284
9285 if test "x$smart_include" != "x"; then
9286   eval "ac_cv_header_$ac_safe=yes"
9287   CPPFLAGS="$smart_include $old_CPPFLAGS"
9288   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
9289 fi
9290
9291 smart_prefix=
9292
9293   if test "x$ac_cv_header_collectd_client_h" == "xyes"; then
9294
9295 $as_echo "#define HAVE_COLLECTDC_H 1" >>confdefs.h
9296
9297
9298
9299   else
9300     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: collectdclient headers not found. Use --with-collectdclient-include-dir=<path>." >&5
9301 $as_echo "$as_me: WARNING: collectdclient headers not found. Use --with-collectdclient-include-dir=<path>." >&2;}
9302   fi
9303 fi
9304
9305 if test "x$HAVE_LIBCAP" = x; then
9306   { $as_echo "$as_me:${as_lineno-$LINENO}: skipping test for cap.h." >&5
9307 $as_echo "$as_me: skipping test for cap.h." >&6;}
9308 else
9309         smart_try_dir="$cap_include_dir"
9310
9311
9312 ac_safe=`echo "sys/capability.h" | sed 'y%./+-%__pm%'`
9313 old_CPPFLAGS="$CPPFLAGS"
9314 smart_include=
9315 smart_include_dir="/usr/local/include /opt/include"
9316
9317 _smart_try_dir=
9318 _smart_include_dir=
9319
9320 for _prefix in $smart_prefix ""; do
9321   for _dir in $smart_try_dir; do
9322     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
9323   done
9324
9325   for _dir in $smart_include_dir; do
9326     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
9327   done
9328 done
9329
9330 if test "x$_smart_try_dir" != "x"; then
9331   for try in $_smart_try_dir; do
9332     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h in $try" >&5
9333 $as_echo_n "checking for sys/capability.h in $try... " >&6; }
9334     CPPFLAGS="-isystem $try $old_CPPFLAGS"
9335     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9336 /* end confdefs.h.  */
9337
9338                     #include <sys/capability.h>
9339 int
9340 main ()
9341 {
9342 int a = 1;
9343   ;
9344   return 0;
9345 }
9346 _ACEOF
9347 if ac_fn_c_try_compile "$LINENO"; then :
9348
9349                      smart_include="-isystem $try"
9350                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9351 $as_echo "yes" >&6; }
9352                      break
9353
9354 else
9355
9356                      smart_include=
9357                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9358 $as_echo "no" >&6; }
9359
9360 fi
9361 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9362   done
9363   CPPFLAGS="$old_CPPFLAGS"
9364 fi
9365
9366 if test "x$smart_include" = "x"; then
9367   for _prefix in $smart_prefix; do
9368     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/sys/capability.h" >&5
9369 $as_echo_n "checking for ${_prefix}/sys/capability.h... " >&6; }
9370
9371     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9372 /* end confdefs.h.  */
9373
9374                     #include <sys/capability.h>
9375 int
9376 main ()
9377 {
9378 int a = 1;
9379   ;
9380   return 0;
9381 }
9382 _ACEOF
9383 if ac_fn_c_try_compile "$LINENO"; then :
9384
9385                      smart_include="-isystem ${_prefix}/"
9386                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9387 $as_echo "yes" >&6; }
9388                      break
9389
9390 else
9391
9392                      smart_include=
9393                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9394 $as_echo "no" >&6; }
9395
9396 fi
9397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9398   done
9399 fi
9400
9401 if test "x$smart_include" = "x"; then
9402     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h" >&5
9403 $as_echo_n "checking for sys/capability.h... " >&6; }
9404
9405     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9406 /* end confdefs.h.  */
9407
9408                     #include <sys/capability.h>
9409 int
9410 main ()
9411 {
9412 int a = 1;
9413   ;
9414   return 0;
9415 }
9416 _ACEOF
9417 if ac_fn_c_try_compile "$LINENO"; then :
9418
9419                      smart_include=" "
9420                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9421 $as_echo "yes" >&6; }
9422                      break
9423
9424 else
9425
9426                      smart_include=
9427                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9428 $as_echo "no" >&6; }
9429
9430 fi
9431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9432 fi
9433
9434 if test "x$smart_include" = "x"; then
9435
9436   for prefix in $smart_prefix; do
9437
9438
9439 if test "x$LOCATE" != "x"; then
9440         DIRS=
9441   file="${_prefix}/${1}"
9442
9443   for x in `${LOCATE} $file 2>/dev/null`; do
9444                                         base=`echo $x | sed "s%/${file}%%"`
9445     if test "x$x" = "x$base"; then
9446       continue;
9447     fi
9448
9449     dir=`${DIRNAME} $x 2>/dev/null`
9450                 exclude=`echo ${dir} | ${GREP} /home`
9451     if test "x$exclude" != "x"; then
9452       continue
9453     fi
9454
9455                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
9456     if test "x$already" = "x"; then
9457       DIRS="$DIRS $dir"
9458     fi
9459   done
9460 fi
9461
9462 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
9463
9464   done
9465
9466
9467 if test "x$LOCATE" != "x"; then
9468         DIRS=
9469   file=sys/capability.h
9470
9471   for x in `${LOCATE} $file 2>/dev/null`; do
9472                                         base=`echo $x | sed "s%/${file}%%"`
9473     if test "x$x" = "x$base"; then
9474       continue;
9475     fi
9476
9477     dir=`${DIRNAME} $x 2>/dev/null`
9478                 exclude=`echo ${dir} | ${GREP} /home`
9479     if test "x$exclude" != "x"; then
9480       continue
9481     fi
9482
9483                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
9484     if test "x$already" = "x"; then
9485       DIRS="$DIRS $dir"
9486     fi
9487   done
9488 fi
9489
9490 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
9491
9492
9493   for try in $_smart_include_dir; do
9494     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h in $try" >&5
9495 $as_echo_n "checking for sys/capability.h in $try... " >&6; }
9496     CPPFLAGS="-isystem $try $old_CPPFLAGS"
9497     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9498 /* end confdefs.h.  */
9499
9500                     #include <sys/capability.h>
9501 int
9502 main ()
9503 {
9504 int a = 1;
9505   ;
9506   return 0;
9507 }
9508 _ACEOF
9509 if ac_fn_c_try_compile "$LINENO"; then :
9510
9511                      smart_include="-isystem $try"
9512                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9513 $as_echo "yes" >&6; }
9514                      break
9515
9516 else
9517
9518                      smart_include=
9519                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9520 $as_echo "no" >&6; }
9521
9522 fi
9523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9524   done
9525   CPPFLAGS="$old_CPPFLAGS"
9526 fi
9527
9528 if test "x$smart_include" != "x"; then
9529   eval "ac_cv_header_$ac_safe=yes"
9530   CPPFLAGS="$smart_include $old_CPPFLAGS"
9531   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
9532 fi
9533
9534 smart_prefix=
9535
9536   if test "x$ac_cv_header_sys_capability_h" == "xyes"; then
9537
9538 $as_echo "#define HAVE_CAPABILITY_H 1" >>confdefs.h
9539
9540   else
9541     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cap headers not found, will not perform debugger checks. Use --with-cap-include-dir=<path>." >&5
9542 $as_echo "$as_me: WARNING: cap headers not found, will not perform debugger checks. Use --with-cap-include-dir=<path>." >&2;}
9543   fi
9544 fi
9545
9546
9547 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
9548 if test "x$ac_cv_type_off_t" = xyes; then :
9549
9550 else
9551
9552 cat >>confdefs.h <<_ACEOF
9553 #define off_t long int
9554 _ACEOF
9555
9556 fi
9557
9558 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9559 if test "x$ac_cv_type_pid_t" = xyes; then :
9560
9561 else
9562
9563 cat >>confdefs.h <<_ACEOF
9564 #define pid_t int
9565 _ACEOF
9566
9567 fi
9568
9569 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
9570 if test "x$ac_cv_type_size_t" = xyes; then :
9571
9572 else
9573
9574 cat >>confdefs.h <<_ACEOF
9575 #define size_t unsigned int
9576 _ACEOF
9577
9578 fi
9579
9580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
9581 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
9582 if ${ac_cv_type_uid_t+:} false; then :
9583   $as_echo_n "(cached) " >&6
9584 else
9585   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9586 /* end confdefs.h.  */
9587 #include <sys/types.h>
9588
9589 _ACEOF
9590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9591   $EGREP "uid_t" >/dev/null 2>&1; then :
9592   ac_cv_type_uid_t=yes
9593 else
9594   ac_cv_type_uid_t=no
9595 fi
9596 rm -f conftest*
9597
9598 fi
9599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
9600 $as_echo "$ac_cv_type_uid_t" >&6; }
9601 if test $ac_cv_type_uid_t = no; then
9602
9603 $as_echo "#define uid_t int" >>confdefs.h
9604
9605
9606 $as_echo "#define gid_t int" >>confdefs.h
9607
9608 fi
9609
9610
9611
9612   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
9613 $as_echo_n "checking for socklen_t... " >&6; }
9614 if ${ac_cv_type_socklen_t+:} false; then :
9615   $as_echo_n "(cached) " >&6
9616 else
9617    ac_cv_type_socklen_t=no
9618       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9619 /* end confdefs.h.  */
9620 #ifdef HAVE_SYS_TYPES_H
9621     #  include <sys/types.h>
9622     #endif
9623
9624     #ifdef HAVE_SYS_SOCKET_H
9625     #  include <sys/socket.h>
9626     #endif
9627
9628 int
9629 main ()
9630 {
9631 socklen_t foo
9632   ;
9633   return 0;
9634 }
9635 _ACEOF
9636 if ac_fn_c_try_compile "$LINENO"; then :
9637   ac_cv_type_socklen_t=yes
9638 fi
9639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9640
9641
9642 fi
9643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_socklen_t" >&5
9644 $as_echo "$ac_cv_type_socklen_t" >&6; }
9645
9646   if test "$ac_cv_type_socklen_t" != "yes"; then
9647
9648 $as_echo "#define socklen_t int" >>confdefs.h
9649
9650   fi
9651
9652
9653
9654   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint8_t" >&5
9655 $as_echo_n "checking for uint8_t... " >&6; }
9656 if ${ac_cv_type_uint8_t+:} false; then :
9657   $as_echo_n "(cached) " >&6
9658 else
9659    ac_cv_type_uint8_t=no
9660       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9661 /* end confdefs.h.  */
9662 #ifdef HAVE_INTTYPES_H
9663     #  include <inttypes.h>
9664     #endif
9665
9666     #ifdef HAVE_STDINT_H
9667     #  include <stdint.h>
9668     #endif
9669
9670 int
9671 main ()
9672 {
9673 uint8_t foo
9674   ;
9675   return 0;
9676 }
9677 _ACEOF
9678 if ac_fn_c_try_compile "$LINENO"; then :
9679   ac_cv_type_uint8_t=yes
9680 fi
9681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9682
9683
9684 fi
9685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint8_t" >&5
9686 $as_echo "$ac_cv_type_uint8_t" >&6; }
9687
9688   if test "$ac_cv_type_uint8_t" != "yes"; then
9689
9690 $as_echo "#define uint8_t unsigned char" >>confdefs.h
9691
9692   fi
9693
9694
9695
9696   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint16_t" >&5
9697 $as_echo_n "checking for uint16_t... " >&6; }
9698 if ${ac_cv_type_uint16_t+:} false; then :
9699   $as_echo_n "(cached) " >&6
9700 else
9701    ac_cv_type_uint16_t=no
9702       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9703 /* end confdefs.h.  */
9704 #ifdef HAVE_INTTYPES_H
9705     #  include <inttypes.h>
9706     #endif
9707
9708     #ifdef HAVE_STDINT_H
9709     #  include <stdint.h>
9710     #endif
9711
9712 int
9713 main ()
9714 {
9715 uint16_t foo
9716   ;
9717   return 0;
9718 }
9719 _ACEOF
9720 if ac_fn_c_try_compile "$LINENO"; then :
9721   ac_cv_type_uint16_t=yes
9722 fi
9723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9724
9725
9726 fi
9727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint16_t" >&5
9728 $as_echo "$ac_cv_type_uint16_t" >&6; }
9729
9730   if test "$ac_cv_type_uint16_t" != "yes"; then
9731
9732 $as_echo "#define uint16_t unsigned short" >>confdefs.h
9733
9734   fi
9735
9736
9737
9738   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint32_t" >&5
9739 $as_echo_n "checking for uint32_t... " >&6; }
9740 if ${ac_cv_type_uint32_t+:} false; then :
9741   $as_echo_n "(cached) " >&6
9742 else
9743    ac_cv_type_uint32_t=no
9744       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9745 /* end confdefs.h.  */
9746 #ifdef HAVE_INTTYPES_H
9747     #  include <inttypes.h>
9748     #endif
9749
9750     #ifdef HAVE_STDINT_H
9751     #  include <stdint.h>
9752     #endif
9753
9754 int
9755 main ()
9756 {
9757 uint32_t foo
9758   ;
9759   return 0;
9760 }
9761 _ACEOF
9762 if ac_fn_c_try_compile "$LINENO"; then :
9763   ac_cv_type_uint32_t=yes
9764 fi
9765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9766
9767
9768 fi
9769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint32_t" >&5
9770 $as_echo "$ac_cv_type_uint32_t" >&6; }
9771
9772   if test "$ac_cv_type_uint32_t" != "yes"; then
9773
9774 $as_echo "#define uint32_t unsigned int" >>confdefs.h
9775
9776   fi
9777
9778
9779
9780   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint64_t" >&5
9781 $as_echo_n "checking for uint64_t... " >&6; }
9782 if ${ac_cv_type_uint64_t+:} false; then :
9783   $as_echo_n "(cached) " >&6
9784 else
9785    ac_cv_type_uint64_t=no
9786       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9787 /* end confdefs.h.  */
9788 #ifdef HAVE_INTTYPES_H
9789     #  include <inttypes.h>
9790     #endif
9791
9792     #ifdef HAVE_STDINT_H
9793     #  include <stdint.h>
9794     #endif
9795
9796 int
9797 main ()
9798 {
9799 uint64_t foo
9800   ;
9801   return 0;
9802 }
9803 _ACEOF
9804 if ac_fn_c_try_compile "$LINENO"; then :
9805   ac_cv_type_uint64_t=yes
9806 fi
9807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9808
9809
9810 fi
9811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint64_t" >&5
9812 $as_echo "$ac_cv_type_uint64_t" >&6; }
9813
9814   if test "$ac_cv_type_uint64_t" != "yes"; then
9815
9816 $as_echo "#define uint64_t unsigned long long" >>confdefs.h
9817
9818   fi
9819
9820
9821 ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
9822 if test "x$ac_cv_type___uint128_t" = xyes; then :
9823
9824 $as_echo "#define HAVE___UINT128_T 1" >>confdefs.h
9825
9826 fi
9827
9828
9829 ac_fn_c_check_type "$LINENO" "uint128_t" "ac_cv_type_uint128_t" "
9830     #ifdef HAVE_INTTYPES_H
9831     #  include <inttypes.h>
9832     #endif
9833
9834     #ifdef HAVE_STDINT_H
9835     #  include <stdint.h>
9836     #endif
9837
9838
9839 "
9840 if test "x$ac_cv_type_uint128_t" = xyes; then :
9841
9842 $as_echo "#define HAVE_UINT128_T 1" >>confdefs.h
9843
9844 fi
9845
9846
9847 ac_fn_c_check_type "$LINENO" "struct in6_addr" "ac_cv_type_struct_in6_addr" "
9848     #ifdef HAVE_NETINET_IN_H
9849     #  include <netinet/in.h>
9850     #endif
9851
9852
9853 "
9854 if test "x$ac_cv_type_struct_in6_addr" = xyes; then :
9855
9856 $as_echo "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h
9857
9858 fi
9859
9860
9861 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
9862     #ifdef HAVE_NETINET_IN_H
9863     #  include <netinet/in.h>
9864     #endif
9865
9866     #ifdef HAVE_SYS_SOCKET_H
9867     #  include <sys/socket.h>
9868     #endif
9869
9870 "
9871 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
9872
9873 $as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
9874
9875 fi
9876
9877
9878 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "
9879     #ifdef HAVE_NETINET_IN_H
9880     #  include <netinet/in.h>
9881     #endif
9882
9883 "
9884 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
9885
9886 $as_echo "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h
9887
9888 fi
9889
9890
9891 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "
9892     #ifdef HAVE_SYS_TYPES_H
9893     #  include <sys/types.h>
9894     #endif
9895
9896     #ifdef HAVE_SYS_SOCKET_H
9897     #  include <sys/socket.h>
9898     #endif
9899
9900     #ifdef HAVE_NETDB_H
9901     #  include <netdb.h>
9902     #endif
9903
9904
9905 "
9906 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
9907
9908 $as_echo "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h
9909
9910 fi
9911
9912
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sig_t is defined" >&5
9914 $as_echo_n "checking if sig_t is defined... " >&6; }
9915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9916 /* end confdefs.h.  */
9917
9918       #ifdef HAVE_SIGNAL_H
9919       #  include <signal.h>
9920       #endif
9921
9922 int
9923 main ()
9924 {
9925
9926       sig_t func;
9927       return 0;
9928
9929
9930   ;
9931   return 0;
9932 }
9933 _ACEOF
9934 if ac_fn_c_try_link "$LINENO"; then :
9935
9936       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9937 $as_echo "yes" >&6; }
9938
9939 $as_echo "#define HAVE_SIG_T 1" >>confdefs.h
9940
9941
9942 else
9943
9944       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9945 $as_echo "no" >&6; }
9946
9947
9948 fi
9949 rm -f core conftest.err conftest.$ac_objext \
9950     conftest$ac_exeext conftest.$ac_ext
9951
9952 for ac_func in \
9953   bindat \
9954   clock_gettime \
9955   closefrom \
9956   ctime_r \
9957   dladdr \
9958   fcntl \
9959   fopencookie \
9960   funopen \
9961   getaddrinfo \
9962   getnameinfo \
9963   getopt_long \
9964   getpeereid \
9965   getresuid \
9966   gettimeofday \
9967   getusershell \
9968   gmtime_r \
9969   if_indextoname \
9970   inet_aton \
9971   inet_ntop \
9972   inet_pton \
9973   initgroups \
9974   kqueue \
9975   localtime_r \
9976   mallopt \
9977   mkdirat \
9978   openat \
9979   pthread_sigmask \
9980   setlinebuf \
9981   setresuid \
9982   setsid \
9983   setuid \
9984   setvbuf \
9985   sigaction \
9986   sigprocmask \
9987   snprintf \
9988   strcasecmp \
9989   strlcat \
9990   strlcpy \
9991   strncasecmp \
9992   strsep \
9993   strsignal \
9994   unlinkat \
9995   vdprintf \
9996   vsnprintf
9997
9998 do :
9999   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10000 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10001 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10002   cat >>confdefs.h <<_ACEOF
10003 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10004 _ACEOF
10005
10006 fi
10007 done
10008
10009
10010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
10011 $as_echo_n "checking return type of signal handlers... " >&6; }
10012 if ${ac_cv_type_signal+:} false; then :
10013   $as_echo_n "(cached) " >&6
10014 else
10015   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10016 /* end confdefs.h.  */
10017 #include <sys/types.h>
10018 #include <signal.h>
10019
10020 int
10021 main ()
10022 {
10023 return *(signal (0, 0)) (0) == 1;
10024   ;
10025   return 0;
10026 }
10027 _ACEOF
10028 if ac_fn_c_try_compile "$LINENO"; then :
10029   ac_cv_type_signal=int
10030 else
10031   ac_cv_type_signal=void
10032 fi
10033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10034 fi
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
10036 $as_echo "$ac_cv_type_signal" >&6; }
10037
10038 cat >>confdefs.h <<_ACEOF
10039 #define RETSIGTYPE $ac_cv_type_signal
10040 _ACEOF
10041
10042
10043
10044 if test "x$ac_cv_header_utmpx_h" = "xyes"; then
10045
10046   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_xtime in struct utmpx" >&5
10047 $as_echo_n "checking for ut_xtime in struct utmpx... " >&6; }
10048
10049
10050   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10051 /* end confdefs.h.  */
10052
10053 #include <utmpx.h>
10054 #ifdef HAVE_STDDEF_H
10055 #include <stddef.h>
10056 #endif
10057 #ifndef offsetof
10058 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
10059 #endif
10060
10061 int
10062 main ()
10063 {
10064  int foo = offsetof(struct utmpx, ut_xtime)
10065   ;
10066   return 0;
10067 }
10068 _ACEOF
10069 if ac_fn_c_try_compile "$LINENO"; then :
10070   has_element=" "
10071 else
10072   has_element=
10073 fi
10074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10075
10076   ac_safe_type=`echo "struct utmpx" | sed 'y% %_%'`
10077   if test "x$has_element" != "x"; then
10078     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10079 $as_echo "yes" >&6; }
10080     eval "ac_cv_type_${ac_safe_type}_has_ut_xtime=yes"
10081   else
10082     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10083 $as_echo "no" >&6; }
10084     eval "ac_cv_type_${ac_safe_type}_has_ut_xtime="
10085  fi
10086
10087  if test "x$ac_cv_type_struct_utmpx_has_ut_xtime" = "x"; then
10088
10089 $as_echo "#define ut_xtime ut_tv.tv_sec" >>confdefs.h
10090
10091  fi
10092 fi
10093
10094
10095   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipi_addr in struct in_pktinfo" >&5
10096 $as_echo_n "checking for ipi_addr in struct in_pktinfo... " >&6; }
10097
10098
10099   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10100 /* end confdefs.h.  */
10101
10102 #include <netinet/in.h>
10103 #ifdef HAVE_STDDEF_H
10104 #include <stddef.h>
10105 #endif
10106 #ifndef offsetof
10107 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
10108 #endif
10109
10110 int
10111 main ()
10112 {
10113  int foo = offsetof(struct in_pktinfo, ipi_addr)
10114   ;
10115   return 0;
10116 }
10117 _ACEOF
10118 if ac_fn_c_try_compile "$LINENO"; then :
10119   has_element=" "
10120 else
10121   has_element=
10122 fi
10123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10124
10125   ac_safe_type=`echo "struct in_pktinfo" | sed 'y% %_%'`
10126   if test "x$has_element" != "x"; then
10127     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10128 $as_echo "yes" >&6; }
10129     eval "ac_cv_type_${ac_safe_type}_has_ipi_addr=yes"
10130   else
10131     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10132 $as_echo "no" >&6; }
10133     eval "ac_cv_type_${ac_safe_type}_has_ipi_addr="
10134  fi
10135
10136 if test "x$ac_cv_type_struct_in_pktinfo_has_ipi_addr" = "xyes"; then
10137
10138 $as_echo "#define HAVE_IP_PKTINFO /**/" >>confdefs.h
10139
10140 fi
10141
10142
10143   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipi6_addr in struct in6_pktinfo" >&5
10144 $as_echo_n "checking for ipi6_addr in struct in6_pktinfo... " >&6; }
10145
10146
10147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10148 /* end confdefs.h.  */
10149
10150 #include <netinet/in.h>
10151 #ifdef HAVE_STDDEF_H
10152 #include <stddef.h>
10153 #endif
10154 #ifndef offsetof
10155 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
10156 #endif
10157
10158 int
10159 main ()
10160 {
10161  int foo = offsetof(struct in6_pktinfo, ipi6_addr)
10162   ;
10163   return 0;
10164 }
10165 _ACEOF
10166 if ac_fn_c_try_compile "$LINENO"; then :
10167   has_element=" "
10168 else
10169   has_element=
10170 fi
10171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10172
10173   ac_safe_type=`echo "struct in6_pktinfo" | sed 'y% %_%'`
10174   if test "x$has_element" != "x"; then
10175     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10176 $as_echo "yes" >&6; }
10177     eval "ac_cv_type_${ac_safe_type}_has_ipi6_addr=yes"
10178   else
10179     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10180 $as_echo "no" >&6; }
10181     eval "ac_cv_type_${ac_safe_type}_has_ipi6_addr="
10182  fi
10183
10184 if test "x$ac_cv_type_struct_in6_pktinfo_has_ipi6_addr" = "xyes"; then
10185
10186 $as_echo "#define HAVE_IN6_PKTINFO /**/" >>confdefs.h
10187
10188 fi
10189
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if htonll is defined" >&5
10191 $as_echo_n "checking if htonll is defined... " >&6; }
10192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10193 /* end confdefs.h.  */
10194
10195       #include <sys/types.h>
10196       #include <netinet/in.h>
10197
10198 int
10199 main ()
10200 {
10201
10202       return htonll(0);
10203
10204
10205   ;
10206   return 0;
10207 }
10208 _ACEOF
10209 if ac_fn_c_try_link "$LINENO"; then :
10210
10211       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10212 $as_echo "yes" >&6; }
10213
10214 $as_echo "#define HAVE_HTONLL 1" >>confdefs.h
10215
10216
10217 else
10218
10219       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10220 $as_echo "no" >&6; }
10221
10222
10223 fi
10224 rm -f core conftest.err conftest.$ac_objext \
10225     conftest$ac_exeext conftest.$ac_ext
10226
10227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if htonlll is defined" >&5
10228 $as_echo_n "checking if htonlll is defined... " >&6; }
10229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10230 /* end confdefs.h.  */
10231
10232       #include <sys/types.h>
10233       #include <netinet/in.h>
10234
10235 int
10236 main ()
10237 {
10238
10239       return htonlll(0);
10240
10241
10242   ;
10243   return 0;
10244 }
10245 _ACEOF
10246 if ac_fn_c_try_link "$LINENO"; then :
10247
10248       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10249 $as_echo "yes" >&6; }
10250
10251 $as_echo "#define HAVE_HTONLLL 1" >>confdefs.h
10252
10253
10254 else
10255
10256       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10257 $as_echo "no" >&6; }
10258
10259
10260 fi
10261 rm -f core conftest.err conftest.$ac_objext \
10262     conftest$ac_exeext conftest.$ac_ext
10263
10264
10265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10266 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10267 if ${ac_cv_c_const+:} false; then :
10268   $as_echo_n "(cached) " >&6
10269 else
10270   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10271 /* end confdefs.h.  */
10272
10273 int
10274 main ()
10275 {
10276
10277 #ifndef __cplusplus
10278   /* Ultrix mips cc rejects this sort of thing.  */
10279   typedef int charset[2];
10280   const charset cs = { 0, 0 };
10281   /* SunOS 4.1.1 cc rejects this.  */
10282   char const *const *pcpcc;
10283   char **ppc;
10284   /* NEC SVR4.0.2 mips cc rejects this.  */
10285   struct point {int x, y;};
10286   static struct point const zero = {0,0};
10287   /* AIX XL C 1.02.0.0 rejects this.
10288      It does not let you subtract one const X* pointer from another in
10289      an arm of an if-expression whose if-part is not a constant
10290      expression */
10291   const char *g = "string";
10292   pcpcc = &g + (g ? g-g : 0);
10293   /* HPUX 7.0 cc rejects these. */
10294   ++pcpcc;
10295   ppc = (char**) pcpcc;
10296   pcpcc = (char const *const *) ppc;
10297   { /* SCO 3.2v4 cc rejects this sort of thing.  */
10298     char tx;
10299     char *t = &tx;
10300     char const *s = 0 ? (char *) 0 : (char const *) 0;
10301
10302     *t++ = 0;
10303     if (s) return 0;
10304   }
10305   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10306     int x[] = {25, 17};
10307     const int *foo = &x[0];
10308     ++foo;
10309   }
10310   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10311     typedef const int *iptr;
10312     iptr p = 0;
10313     ++p;
10314   }
10315   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
10316        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10317     struct s { int j; const int *ap[3]; } bx;
10318     struct s *b = &bx; b->j = 5;
10319   }
10320   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10321     const int foo = 10;
10322     if (!foo) return 0;
10323   }
10324   return !cs[0] && !zero.x;
10325 #endif
10326
10327   ;
10328   return 0;
10329 }
10330 _ACEOF
10331 if ac_fn_c_try_compile "$LINENO"; then :
10332   ac_cv_c_const=yes
10333 else
10334   ac_cv_c_const=no
10335 fi
10336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10337 fi
10338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
10339 $as_echo "$ac_cv_c_const" >&6; }
10340 if test $ac_cv_c_const = no; then
10341
10342 $as_echo "#define const /**/" >>confdefs.h
10343
10344 fi
10345
10346
10347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of OS" >&5
10348 $as_echo_n "checking type of OS... " >&6; }
10349 OS=`uname -s`
10350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OS" >&5
10351 $as_echo "$OS" >&6; }
10352 if test "$OS" = "OS/2"; then
10353   LIBPREFIX=
10354 else
10355   LIBPREFIX=lib
10356 fi
10357
10358
10359 if test "x$developer" = "xyes"; then
10360   { $as_echo "$as_me:${as_lineno-$LINENO}: Setting additional developer CFLAGS" >&5
10361 $as_echo "$as_me: Setting additional developer CFLAGS" >&6;}
10362
10363
10364   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Wdocumentation\"" >&5
10365 $as_echo_n "checking for the compiler flag \"-Wdocumentation\"... " >&6; }
10366 if ${ax_cv_cc_wdocumentation_flag+:} false; then :
10367   $as_echo_n "(cached) " >&6
10368 else
10369
10370
10371     CFLAGS_SAVED=$CFLAGS
10372     CFLAGS="$CFLAGS -Werror -Wdocumentation"
10373
10374     ac_ext=c
10375 ac_cpp='$CPP $CPPFLAGS'
10376 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10377 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10378 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10379
10380     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10381 /* end confdefs.h.  */
10382
10383 int
10384 main ()
10385 {
10386 return 0;
10387   ;
10388   return 0;
10389 }
10390 _ACEOF
10391 if ac_fn_c_try_compile "$LINENO"; then :
10392   ax_cv_cc_wdocumentation_flag="yes"
10393 else
10394   ax_cv_cc_wdocumentation_flag="no"
10395 fi
10396 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10397     ac_ext=c
10398 ac_cpp='$CPP $CPPFLAGS'
10399 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10400 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10401 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10402
10403
10404     CFLAGS="$CFLAGS_SAVED"
10405
10406 fi
10407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_wdocumentation_flag" >&5
10408 $as_echo "$ax_cv_cc_wdocumentation_flag" >&6; }
10409
10410   if test "x$ax_cv_cc_wdocumentation_flag" = "xyes"; then
10411     devflags="-Wdocumentation"
10412   fi
10413
10414
10415   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Weverything\"" >&5
10416 $as_echo_n "checking for the compiler flag \"-Weverything\"... " >&6; }
10417 if ${ax_cv_cc_weverything_flag+:} false; then :
10418   $as_echo_n "(cached) " >&6
10419 else
10420
10421
10422     CFLAGS_SAVED=$CFLAGS
10423     CFLAGS="$CFLAGS -Werror -Weverything -Wno-unused-macros -Wno-unreachable-code-return"
10424
10425     ac_ext=c
10426 ac_cpp='$CPP $CPPFLAGS'
10427 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10428 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10429 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10430
10431     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10432 /* end confdefs.h.  */
10433
10434 int
10435 main ()
10436 {
10437 return 0;
10438   ;
10439   return 0;
10440 }
10441 _ACEOF
10442 if ac_fn_c_try_compile "$LINENO"; then :
10443   ax_cv_cc_weverything_flag="yes"
10444 else
10445   ax_cv_cc_weverything_flag="no"
10446 fi
10447 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10448     ac_ext=c
10449 ac_cpp='$CPP $CPPFLAGS'
10450 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10451 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10452 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10453
10454
10455     CFLAGS="$CFLAGS_SAVED"
10456
10457 fi
10458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_weverything_flag" >&5
10459 $as_echo "$ax_cv_cc_weverything_flag" >&6; }
10460
10461   if test "x$ax_cv_cc_weverything_flag" = "xyes"; then
10462     devflags="$devflags -W -Weverything -Wformat=2 -Wno-missing-field-initializers -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"
10463   else
10464     if test "x$GCC" = "xyes"; then
10465       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"
10466       INSTALLSTRIP=""
10467     fi
10468   fi
10469
10470   { $as_echo "$as_me:${as_lineno-$LINENO}: Developer CFLAGS are \"$devflags\"" >&5
10471 $as_echo "$as_me: Developer CFLAGS are \"$devflags\"" >&6;}
10472
10473   CFLAGS="$CFLAGS $devflags"
10474         if test "x$EXPERIMENTAL" != "xno"; then
10475     { $as_echo "$as_me:${as_lineno-$LINENO}: is developer build, enabling experimental modules implicitly, disable with --without-experimental-modules" >&5
10476 $as_echo "$as_me: is developer build, enabling experimental modules implicitly, disable with --without-experimental-modules" >&6;}
10477     EXPERIMENTAL=yes
10478   fi
10479 else
10480   devflags=""
10481   CFLAGS="$CFLAGS -DNDEBUG"
10482   INSTALLSTRIP=""
10483 fi
10484
10485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building with -DNDEBUG" >&5
10486 $as_echo_n "checking if building with -DNDEBUG... " >&6; }
10487 if echo "$CFLAGS" | grep '\-DNDEBUG' > /dev/null; then
10488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10489 $as_echo "yes" >&6; }
10490
10491 $as_echo "#define WITH_NDEBUG 1" >>confdefs.h
10492
10493 else
10494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10495 $as_echo "no" >&6; }
10496 fi
10497
10498 export EXPERIMENTAL
10499
10500 if test -d $srcdir/.git -a "x$GIT" = "xyes"; then
10501   RADIUSD_VERSION_COMMIT=`git log --pretty=format:'%h' -n 1`
10502
10503 cat >>confdefs.h <<_ACEOF
10504 #define RADIUSD_VERSION_COMMIT ${RADIUSD_VERSION_COMMIT}
10505 _ACEOF
10506
10507 fi
10508
10509
10510   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support in compiler" >&5
10511 $as_echo_n "checking for __thread support in compiler... " >&6; }
10512   if test "$cross_compiling" = yes; then :
10513   have_tls=no
10514 else
10515   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10516 /* end confdefs.h.  */
10517
10518         static __thread int val;
10519         int main(int argc, char **argv) {
10520           val = 0;
10521           return val;
10522         }
10523
10524
10525 _ACEOF
10526 if ac_fn_c_try_run "$LINENO"; then :
10527   have_tls=yes
10528 else
10529   have_tls=no
10530 fi
10531 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10532   conftest.$ac_objext conftest.beam conftest.$ac_ext
10533 fi
10534
10535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5
10536 $as_echo "$have_tls" >&6; }
10537   if test "x$have_tls" = "xyes"; then
10538
10539 $as_echo "#define TLS_STORAGE_CLASS __thread" >>confdefs.h
10540
10541   fi
10542
10543   if test "x$have_tls" = "xno"; then
10544     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __declspec(thread) support in compiler" >&5
10545 $as_echo_n "checking for __declspec(thread) support in compiler... " >&6; }
10546     if test "$cross_compiling" = yes; then :
10547   have_tls=no
10548 else
10549   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10550 /* end confdefs.h.  */
10551
10552           static _Thread_local int val;
10553           int main(int argc, char **argv) {
10554             val = 0;
10555             return val;
10556           }
10557
10558
10559 _ACEOF
10560 if ac_fn_c_try_run "$LINENO"; then :
10561   have_tls=yes
10562 else
10563   have_tls=no
10564 fi
10565 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10566   conftest.$ac_objext conftest.beam conftest.$ac_ext
10567 fi
10568
10569     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5
10570 $as_echo "$have_tls" >&6; }
10571     if test "x$have_tls" = "xyes"; then
10572
10573 $as_echo "#define TLS_STORAGE_CLASS __declspec(thread)" >>confdefs.h
10574
10575     fi
10576   fi
10577   if test "x$have_tls" = "xno"; then
10578     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Thread_local support in compiler" >&5
10579 $as_echo_n "checking for _Thread_local support in compiler... " >&6; }
10580     if test "$cross_compiling" = yes; then :
10581   have_tls=no
10582 else
10583   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10584 /* end confdefs.h.  */
10585
10586           static _Thread_local int val;
10587           int main(int argc, char **argv) {
10588             val = 0;
10589             return val;
10590           }
10591
10592
10593 _ACEOF
10594 if ac_fn_c_try_run "$LINENO"; then :
10595   have_tls=yes
10596 else
10597   have_tls=no
10598 fi
10599 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10600   conftest.$ac_objext conftest.beam conftest.$ac_ext
10601 fi
10602
10603     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5
10604 $as_echo "$have_tls" >&6; }
10605     if test "x$have_tls" = "xyes"; then
10606
10607 $as_echo "#define TLS_STORAGE_CLASS _Thread_local" >>confdefs.h
10608
10609     fi
10610   fi
10611
10612
10613   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_choose_expr support in compiler" >&5
10614 $as_echo_n "checking for __builtin_choose_expr support in compiler... " >&6; }
10615 if ${ax_cv_cc_builtin_choose_expr+:} false; then :
10616   $as_echo_n "(cached) " >&6
10617 else
10618
10619     if test "$cross_compiling" = yes; then :
10620   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10621 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10622 as_fn_error $? "cannot run test program while cross compiling
10623 See \`config.log' for more details" "$LINENO" 5; }
10624 else
10625   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10626 /* end confdefs.h.  */
10627
10628
10629           int main(int argc, char **argv) {
10630             if ((argc < 0) || !argv) return 1; /* -Werror=unused-parameter */
10631             return __builtin_choose_expr(0, 1, 0);
10632           }
10633
10634
10635 _ACEOF
10636 if ac_fn_c_try_run "$LINENO"; then :
10637   ax_cv_cc_builtin_choose_expr=yes
10638 else
10639   ax_cv_cc_builtin_choose_expr=no
10640
10641 fi
10642 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10643   conftest.$ac_objext conftest.beam conftest.$ac_ext
10644 fi
10645
10646
10647 fi
10648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_builtin_choose_expr" >&5
10649 $as_echo "$ax_cv_cc_builtin_choose_expr" >&6; }
10650   if test "x$ax_cv_cc_builtin_choose_expr" = "xyes"; then
10651
10652 $as_echo "#define HAVE_BUILTIN_CHOOSE_EXPR 1" >>confdefs.h
10653
10654   fi
10655
10656
10657   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p support in compiler" >&5
10658 $as_echo_n "checking for __builtin_types_compatible_p support in compiler... " >&6; }
10659 if ${ax_cv_cc_builtin_types_compatible_p+:} false; then :
10660   $as_echo_n "(cached) " >&6
10661 else
10662
10663     if test "$cross_compiling" = yes; then :
10664   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10665 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10666 as_fn_error $? "cannot run test program while cross compiling
10667 See \`config.log' for more details" "$LINENO" 5; }
10668 else
10669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10670 /* end confdefs.h.  */
10671
10672
10673           int main(int argc, char **argv) {
10674             if ((argc < 0) || !argv) return 1; /* -Werror=unused-parameter */
10675             return !(__builtin_types_compatible_p(char *, char *));
10676           }
10677
10678
10679 _ACEOF
10680 if ac_fn_c_try_run "$LINENO"; then :
10681   ax_cv_cc_builtin_types_compatible_p=yes
10682 else
10683   ax_cv_cc_builtin_types_compatible_p=no
10684
10685 fi
10686 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10687   conftest.$ac_objext conftest.beam conftest.$ac_ext
10688 fi
10689
10690
10691 fi
10692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_builtin_types_compatible_p" >&5
10693 $as_echo "$ax_cv_cc_builtin_types_compatible_p" >&6; }
10694   if test "x$ax_cv_cc_builtin_types_compatible_p" = "xyes"; then
10695
10696 $as_echo "#define HAVE_BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
10697
10698   fi
10699
10700
10701   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64 support in compiler" >&5
10702 $as_echo_n "checking for __builtin_bswap64 support in compiler... " >&6; }
10703 if ${ax_cv_cc_builtin_bswap64+:} false; then :
10704   $as_echo_n "(cached) " >&6
10705 else
10706
10707     if test "$cross_compiling" = yes; then :
10708   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10709 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10710 as_fn_error $? "cannot run test program while cross compiling
10711 See \`config.log' for more details" "$LINENO" 5; }
10712 else
10713   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10714 /* end confdefs.h.  */
10715
10716
10717           int main(int argc, char **argv) {
10718             if ((argc < 0) || !argv) return 1; /* -Werror=unused-parameter */
10719             return (__builtin_bswap64(0));
10720           }
10721
10722
10723 _ACEOF
10724 if ac_fn_c_try_run "$LINENO"; then :
10725   ax_cv_cc_builtin_bswap64=yes
10726 else
10727   ax_cv_cc_builtin_bswap64=no
10728
10729 fi
10730 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10731   conftest.$ac_objext conftest.beam conftest.$ac_ext
10732 fi
10733
10734
10735 fi
10736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_builtin_bswap64" >&5
10737 $as_echo "$ax_cv_cc_builtin_bswap64" >&6; }
10738   if test "x$ax_cv_cc_builtin_bswap64" = "xyes"; then
10739
10740 $as_echo "#define HAVE_BUILTIN_BSWAP_64 1" >>confdefs.h
10741
10742   fi
10743
10744
10745   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__bounded__)) support in compiler" >&5
10746 $as_echo_n "checking for __attribute__((__bounded__)) support in compiler... " >&6; }
10747 if ${ax_cv_cc_bounded_attribute+:} false; then :
10748   $as_echo_n "(cached) " >&6
10749 else
10750
10751     CFLAGS_SAVED=$CFLAGS
10752     CFLAGS="$CFLAGS -Werror"
10753     if test "$cross_compiling" = yes; then :
10754   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10755 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10756 as_fn_error $? "cannot run test program while cross compiling
10757 See \`config.log' for more details" "$LINENO" 5; }
10758 else
10759   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10760 /* end confdefs.h.  */
10761
10762
10763           void test(char *buff) __attribute__ ((__bounded__ (__string__, 1, 1)));
10764           int main(int argc, char **argv) {
10765             if ((argc < 0) || !argv) return 1; /* -Werror=unused-parameter */
10766             return 0;
10767           }
10768
10769
10770 _ACEOF
10771 if ac_fn_c_try_run "$LINENO"; then :
10772   ax_cv_cc_bounded_attribute=yes
10773 else
10774   ax_cv_cc_bounded_attribute=no
10775
10776 fi
10777 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10778   conftest.$ac_objext conftest.beam conftest.$ac_ext
10779 fi
10780
10781     CFLAGS="$CFLAGS_SAVED"
10782
10783 fi
10784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_bounded_attribute" >&5
10785 $as_echo "$ax_cv_cc_bounded_attribute" >&6; }
10786   if test "x$ax_cv_cc_bounded_attribute" = "xyes"; then
10787
10788 $as_echo "#define HAVE_ATTRIBUTE_BOUNDED 1" >>confdefs.h
10789
10790   fi
10791
10792
10793
10794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc_set_memlimit in -ltalloc" >&5
10795 $as_echo_n "checking for talloc_set_memlimit in -ltalloc... " >&6; }
10796 if ${ac_cv_lib_talloc_talloc_set_memlimit+:} false; then :
10797   $as_echo_n "(cached) " >&6
10798 else
10799   ac_check_lib_save_LIBS=$LIBS
10800 LIBS="-ltalloc  $LIBS"
10801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10802 /* end confdefs.h.  */
10803
10804 /* Override any GCC internal prototype to avoid an error.
10805    Use char because int might match the return type of a GCC
10806    builtin and then its argument prototype would still apply.  */
10807 #ifdef __cplusplus
10808 extern "C"
10809 #endif
10810 char talloc_set_memlimit ();
10811 int
10812 main ()
10813 {
10814 return talloc_set_memlimit ();
10815   ;
10816   return 0;
10817 }
10818 _ACEOF
10819 if ac_fn_c_try_link "$LINENO"; then :
10820   ac_cv_lib_talloc_talloc_set_memlimit=yes
10821 else
10822   ac_cv_lib_talloc_talloc_set_memlimit=no
10823 fi
10824 rm -f core conftest.err conftest.$ac_objext \
10825     conftest$ac_exeext conftest.$ac_ext
10826 LIBS=$ac_check_lib_save_LIBS
10827 fi
10828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_talloc_talloc_set_memlimit" >&5
10829 $as_echo "$ac_cv_lib_talloc_talloc_set_memlimit" >&6; }
10830 if test "x$ac_cv_lib_talloc_talloc_set_memlimit" = xyes; then :
10831
10832
10833 $as_echo "#define HAVE_TALLOC_SET_MEMLIMIT 1" >>confdefs.h
10834
10835
10836
10837 fi
10838
10839
10840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
10841 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
10842 if ${ac_cv_lib_crypt_crypt+:} false; then :
10843   $as_echo_n "(cached) " >&6
10844 else
10845   ac_check_lib_save_LIBS=$LIBS
10846 LIBS="-lcrypt  $LIBS"
10847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10848 /* end confdefs.h.  */
10849
10850 /* Override any GCC internal prototype to avoid an error.
10851    Use char because int might match the return type of a GCC
10852    builtin and then its argument prototype would still apply.  */
10853 #ifdef __cplusplus
10854 extern "C"
10855 #endif
10856 char crypt ();
10857 int
10858 main ()
10859 {
10860 return crypt ();
10861   ;
10862   return 0;
10863 }
10864 _ACEOF
10865 if ac_fn_c_try_link "$LINENO"; then :
10866   ac_cv_lib_crypt_crypt=yes
10867 else
10868   ac_cv_lib_crypt_crypt=no
10869 fi
10870 rm -f core conftest.err conftest.$ac_objext \
10871     conftest$ac_exeext conftest.$ac_ext
10872 LIBS=$ac_check_lib_save_LIBS
10873 fi
10874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
10875 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
10876 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
10877   CRYPTLIB="-lcrypt"
10878
10879 fi
10880
10881
10882 if test "$CRYPTLIB" != ""; then
10883
10884 $as_echo "#define HAVE_CRYPT /**/" >>confdefs.h
10885
10886 else
10887   ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
10888 if test "x$ac_cv_func_crypt" = xyes; then :
10889
10890 $as_echo "#define HAVE_CRYPT /**/" >>confdefs.h
10891
10892 fi
10893
10894 fi
10895
10896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setkey in -lcipher" >&5
10897 $as_echo_n "checking for setkey in -lcipher... " >&6; }
10898 if ${ac_cv_lib_cipher_setkey+:} false; then :
10899   $as_echo_n "(cached) " >&6
10900 else
10901   ac_check_lib_save_LIBS=$LIBS
10902 LIBS="-lcipher  $LIBS"
10903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10904 /* end confdefs.h.  */
10905
10906 /* Override any GCC internal prototype to avoid an error.
10907    Use char because int might match the return type of a GCC
10908    builtin and then its argument prototype would still apply.  */
10909 #ifdef __cplusplus
10910 extern "C"
10911 #endif
10912 char setkey ();
10913 int
10914 main ()
10915 {
10916 return setkey ();
10917   ;
10918   return 0;
10919 }
10920 _ACEOF
10921 if ac_fn_c_try_link "$LINENO"; then :
10922   ac_cv_lib_cipher_setkey=yes
10923 else
10924   ac_cv_lib_cipher_setkey=no
10925 fi
10926 rm -f core conftest.err conftest.$ac_objext \
10927     conftest$ac_exeext conftest.$ac_ext
10928 LIBS=$ac_check_lib_save_LIBS
10929 fi
10930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cipher_setkey" >&5
10931 $as_echo "$ac_cv_lib_cipher_setkey" >&6; }
10932 if test "x$ac_cv_lib_cipher_setkey" = xyes; then :
10933   CRYPTLIB="${CRYPTLIB} -lcipher"
10934
10935 fi
10936
10937
10938
10939 execinfo_lib_dir=
10940
10941 # Check whether --with-execinfo-lib-dir was given.
10942 if test "${with_execinfo_lib_dir+set}" = set; then :
10943   withval=$with_execinfo_lib_dir;  case "$withval" in
10944     no)
10945         as_fn_error $? "Need execinfo-lib-dir" "$LINENO" 5
10946         ;;
10947     yes)
10948         ;;
10949     *)
10950         execinfo_lib_dir="$withval"
10951         ;;
10952   esac
10953
10954 fi
10955
10956
10957 execinfo_include_dir=
10958
10959 # Check whether --with-execinfo-include-dir was given.
10960 if test "${with_execinfo_include_dir+set}" = set; then :
10961   withval=$with_execinfo_include_dir;  case "$withval" in
10962     no)
10963         as_fn_error $? "Need execinfo-include-dir" "$LINENO" 5
10964         ;;
10965     yes)
10966         ;;
10967     *)
10968         execinfo_include_dir="$withval"
10969         ;;
10970   esac
10971
10972 fi
10973
10974
10975 smart_try_dir=$execinfo_include_dir
10976
10977
10978 ac_safe=`echo "execinfo.h" | sed 'y%./+-%__pm%'`
10979 old_CPPFLAGS="$CPPFLAGS"
10980 smart_include=
10981 smart_include_dir="/usr/local/include /opt/include"
10982
10983 _smart_try_dir=
10984 _smart_include_dir=
10985
10986 for _prefix in $smart_prefix ""; do
10987   for _dir in $smart_try_dir; do
10988     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
10989   done
10990
10991   for _dir in $smart_include_dir; do
10992     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
10993   done
10994 done
10995
10996 if test "x$_smart_try_dir" != "x"; then
10997   for try in $_smart_try_dir; do
10998     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h in $try" >&5
10999 $as_echo_n "checking for execinfo.h in $try... " >&6; }
11000     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11001     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11002 /* end confdefs.h.  */
11003
11004                     #include <execinfo.h>
11005 int
11006 main ()
11007 {
11008 int a = 1;
11009   ;
11010   return 0;
11011 }
11012 _ACEOF
11013 if ac_fn_c_try_compile "$LINENO"; then :
11014
11015                      smart_include="-isystem $try"
11016                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11017 $as_echo "yes" >&6; }
11018                      break
11019
11020 else
11021
11022                      smart_include=
11023                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11024 $as_echo "no" >&6; }
11025
11026 fi
11027 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11028   done
11029   CPPFLAGS="$old_CPPFLAGS"
11030 fi
11031
11032 if test "x$smart_include" = "x"; then
11033   for _prefix in $smart_prefix; do
11034     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/execinfo.h" >&5
11035 $as_echo_n "checking for ${_prefix}/execinfo.h... " >&6; }
11036
11037     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11038 /* end confdefs.h.  */
11039
11040                     #include <execinfo.h>
11041 int
11042 main ()
11043 {
11044 int a = 1;
11045   ;
11046   return 0;
11047 }
11048 _ACEOF
11049 if ac_fn_c_try_compile "$LINENO"; then :
11050
11051                      smart_include="-isystem ${_prefix}/"
11052                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11053 $as_echo "yes" >&6; }
11054                      break
11055
11056 else
11057
11058                      smart_include=
11059                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11060 $as_echo "no" >&6; }
11061
11062 fi
11063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11064   done
11065 fi
11066
11067 if test "x$smart_include" = "x"; then
11068     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h" >&5
11069 $as_echo_n "checking for execinfo.h... " >&6; }
11070
11071     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11072 /* end confdefs.h.  */
11073
11074                     #include <execinfo.h>
11075 int
11076 main ()
11077 {
11078 int a = 1;
11079   ;
11080   return 0;
11081 }
11082 _ACEOF
11083 if ac_fn_c_try_compile "$LINENO"; then :
11084
11085                      smart_include=" "
11086                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11087 $as_echo "yes" >&6; }
11088                      break
11089
11090 else
11091
11092                      smart_include=
11093                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11094 $as_echo "no" >&6; }
11095
11096 fi
11097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11098 fi
11099
11100 if test "x$smart_include" = "x"; then
11101
11102   for prefix in $smart_prefix; do
11103
11104
11105 if test "x$LOCATE" != "x"; then
11106         DIRS=
11107   file="${_prefix}/${1}"
11108
11109   for x in `${LOCATE} $file 2>/dev/null`; do
11110                                         base=`echo $x | sed "s%/${file}%%"`
11111     if test "x$x" = "x$base"; then
11112       continue;
11113     fi
11114
11115     dir=`${DIRNAME} $x 2>/dev/null`
11116                 exclude=`echo ${dir} | ${GREP} /home`
11117     if test "x$exclude" != "x"; then
11118       continue
11119     fi
11120
11121                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
11122     if test "x$already" = "x"; then
11123       DIRS="$DIRS $dir"
11124     fi
11125   done
11126 fi
11127
11128 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
11129
11130   done
11131
11132
11133 if test "x$LOCATE" != "x"; then
11134         DIRS=
11135   file=execinfo.h
11136
11137   for x in `${LOCATE} $file 2>/dev/null`; do
11138                                         base=`echo $x | sed "s%/${file}%%"`
11139     if test "x$x" = "x$base"; then
11140       continue;
11141     fi
11142
11143     dir=`${DIRNAME} $x 2>/dev/null`
11144                 exclude=`echo ${dir} | ${GREP} /home`
11145     if test "x$exclude" != "x"; then
11146       continue
11147     fi
11148
11149                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
11150     if test "x$already" = "x"; then
11151       DIRS="$DIRS $dir"
11152     fi
11153   done
11154 fi
11155
11156 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
11157
11158
11159   for try in $_smart_include_dir; do
11160     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h in $try" >&5
11161 $as_echo_n "checking for execinfo.h in $try... " >&6; }
11162     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11163     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11164 /* end confdefs.h.  */
11165
11166                     #include <execinfo.h>
11167 int
11168 main ()
11169 {
11170 int a = 1;
11171   ;
11172   return 0;
11173 }
11174 _ACEOF
11175 if ac_fn_c_try_compile "$LINENO"; then :
11176
11177                      smart_include="-isystem $try"
11178                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11179 $as_echo "yes" >&6; }
11180                      break
11181
11182 else
11183
11184                      smart_include=
11185                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11186 $as_echo "no" >&6; }
11187
11188 fi
11189 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11190   done
11191   CPPFLAGS="$old_CPPFLAGS"
11192 fi
11193
11194 if test "x$smart_include" != "x"; then
11195   eval "ac_cv_header_$ac_safe=yes"
11196   CPPFLAGS="$smart_include $old_CPPFLAGS"
11197   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
11198 fi
11199
11200 smart_prefix=
11201
11202 if test "x$ac_cv_header_execinfo_h" = "xyes"; then
11203   smart_try_dir=$execinfo_lib_dir
11204
11205
11206 sm_lib_safe=`echo "execinfo" | sed 'y%./+-%__p_%'`
11207 sm_func_safe=`echo "backtrace_symbols" | sed 'y%./+-%__p_%'`
11208
11209 old_LIBS="$LIBS"
11210 old_CPPFLAGS="$CPPFLAGS"
11211 smart_lib=
11212 smart_ldflags=
11213 smart_lib_dir=
11214
11215 if test "x$smart_try_dir" != "x"; then
11216   for try in $smart_try_dir; do
11217     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo in $try" >&5
11218 $as_echo_n "checking for backtrace_symbols in -lexecinfo in $try... " >&6; }
11219     LIBS="-lexecinfo $old_LIBS"
11220     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
11221     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11222 /* end confdefs.h.  */
11223 extern char backtrace_symbols();
11224 int
11225 main ()
11226 {
11227 backtrace_symbols()
11228   ;
11229   return 0;
11230 }
11231 _ACEOF
11232 if ac_fn_c_try_link "$LINENO"; then :
11233
11234                  smart_lib="-lexecinfo"
11235                  smart_ldflags="-L$try -Wl,-rpath,$try"
11236                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11237 $as_echo "yes" >&6; }
11238                  break
11239
11240 else
11241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11242 $as_echo "no" >&6; }
11243 fi
11244 rm -f core conftest.err conftest.$ac_objext \
11245     conftest$ac_exeext conftest.$ac_ext
11246   done
11247   LIBS="$old_LIBS"
11248   CPPFLAGS="$old_CPPFLAGS"
11249 fi
11250
11251 if test "x$smart_lib" = "x"; then
11252   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo" >&5
11253 $as_echo_n "checking for backtrace_symbols in -lexecinfo... " >&6; }
11254   LIBS="-lexecinfo $old_LIBS"
11255   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11256 /* end confdefs.h.  */
11257 extern char backtrace_symbols();
11258 int
11259 main ()
11260 {
11261 backtrace_symbols()
11262   ;
11263   return 0;
11264 }
11265 _ACEOF
11266 if ac_fn_c_try_link "$LINENO"; then :
11267
11268                 smart_lib="-lexecinfo"
11269                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11270 $as_echo "yes" >&6; }
11271
11272 else
11273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11274 $as_echo "no" >&6; }
11275 fi
11276 rm -f core conftest.err conftest.$ac_objext \
11277     conftest$ac_exeext conftest.$ac_ext
11278   LIBS="$old_LIBS"
11279 fi
11280
11281 if test "x$smart_lib" = "x"; then
11282
11283
11284 if test "x$LOCATE" != "x"; then
11285         DIRS=
11286   file=libexecinfo${libltdl_cv_shlibext}
11287
11288   for x in `${LOCATE} $file 2>/dev/null`; do
11289                                         base=`echo $x | sed "s%/${file}%%"`
11290     if test "x$x" = "x$base"; then
11291       continue;
11292     fi
11293
11294     dir=`${DIRNAME} $x 2>/dev/null`
11295                 exclude=`echo ${dir} | ${GREP} /home`
11296     if test "x$exclude" != "x"; then
11297       continue
11298     fi
11299
11300                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
11301     if test "x$already" = "x"; then
11302       DIRS="$DIRS $dir"
11303     fi
11304   done
11305 fi
11306
11307 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
11308
11309
11310
11311 if test "x$LOCATE" != "x"; then
11312         DIRS=
11313   file=libexecinfo.a
11314
11315   for x in `${LOCATE} $file 2>/dev/null`; do
11316                                         base=`echo $x | sed "s%/${file}%%"`
11317     if test "x$x" = "x$base"; then
11318       continue;
11319     fi
11320
11321     dir=`${DIRNAME} $x 2>/dev/null`
11322                 exclude=`echo ${dir} | ${GREP} /home`
11323     if test "x$exclude" != "x"; then
11324       continue
11325     fi
11326
11327                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
11328     if test "x$already" = "x"; then
11329       DIRS="$DIRS $dir"
11330     fi
11331   done
11332 fi
11333
11334 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
11335
11336
11337   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
11338     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo in $try" >&5
11339 $as_echo_n "checking for backtrace_symbols in -lexecinfo in $try... " >&6; }
11340     LIBS="-lexecinfo $old_LIBS"
11341     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
11342     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11343 /* end confdefs.h.  */
11344 extern char backtrace_symbols();
11345 int
11346 main ()
11347 {
11348 backtrace_symbols()
11349   ;
11350   return 0;
11351 }
11352 _ACEOF
11353 if ac_fn_c_try_link "$LINENO"; then :
11354
11355                   smart_lib="-lexecinfo"
11356                   smart_ldflags="-L$try -Wl,-rpath,$try"
11357                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11358 $as_echo "yes" >&6; }
11359                   break
11360
11361 else
11362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11363 $as_echo "no" >&6; }
11364 fi
11365 rm -f core conftest.err conftest.$ac_objext \
11366     conftest$ac_exeext conftest.$ac_ext
11367   done
11368   LIBS="$old_LIBS"
11369   CPPFLAGS="$old_CPPFLAGS"
11370 fi
11371
11372 if test "x$smart_lib" != "x"; then
11373   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
11374   LIBS="$smart_ldflags $smart_lib $old_LIBS"
11375   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
11376 fi
11377
11378   if test "x$ac_cv_lib_execinfo_backtrace_symbols" != "xyes"; then
11379         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if execinfo provided as part of libc" >&5
11380 $as_echo_n "checking if execinfo provided as part of libc... " >&6; }
11381     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11382 /* end confdefs.h.  */
11383
11384         #include <execinfo.h>
11385
11386 int
11387 main ()
11388 {
11389
11390         void *sym[1];
11391         backtrace_symbols(&sym, sizeof(sym))
11392   ;
11393   return 0;
11394 }
11395 _ACEOF
11396 if ac_fn_c_try_link "$LINENO"; then :
11397
11398         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11399 $as_echo "yes" >&6; }
11400         ac_cv_lib_execinfo_backtrace_symbols="yes"
11401
11402 else
11403
11404         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11405 $as_echo "no" >&6; }
11406
11407
11408 fi
11409 rm -f core conftest.err conftest.$ac_objext \
11410     conftest$ac_exeext conftest.$ac_ext
11411   fi
11412
11413   if test "x$ac_cv_lib_execinfo_backtrace_symbols" = "xyes"; then
11414
11415 $as_echo "#define HAVE_EXECINFO 1" >>confdefs.h
11416
11417   fi
11418 fi
11419
11420 PCRE=yes
11421
11422 # Check whether --with-pcre was given.
11423 if test "${with_pcre+set}" = set; then :
11424   withval=$with_pcre;  case "$withval" in
11425     no)
11426     PCRE=no
11427         ;;
11428     yes)
11429     PCRE=yes
11430         ;;
11431   esac
11432
11433 fi
11434
11435
11436 pcre_lib_dir=
11437
11438 # Check whether --with-pcre-lib-dir was given.
11439 if test "${with_pcre_lib_dir+set}" = set; then :
11440   withval=$with_pcre_lib_dir;  case "$withval" in
11441     no)
11442         as_fn_error $? "Need pcre-lib-dir" "$LINENO" 5
11443         ;;
11444     yes)
11445         ;;
11446     *)
11447         pcre_lib_dir="$withval"
11448         ;;
11449   esac
11450
11451 fi
11452
11453
11454 pcre_include_dir=
11455
11456 # Check whether --with-pcre-include-dir was given.
11457 if test "${with_pcre_include_dir+set}" = set; then :
11458   withval=$with_pcre_include_dir;  case "$withval" in
11459     no)
11460         as_fn_error $? "Need pcre-include-dir" "$LINENO" 5
11461         ;;
11462     yes)
11463         ;;
11464     *)
11465         pcre_include_dir="$withval"
11466         ;;
11467   esac
11468
11469 fi
11470
11471
11472 REGEX=
11473
11474 # Check whether --with-regex was given.
11475 if test "${with_regex+set}" = set; then :
11476   withval=$with_regex;  case "$withval" in
11477     no)
11478         REGEX=no
11479         ;;
11480     *)
11481         ;;
11482   esac
11483
11484 fi
11485
11486
11487 if test "x$REGEX" != "xno" && test "x$PCRE" != "xno"; then
11488   smart_try_dir=$pcre_include_dir
11489
11490
11491 ac_safe=`echo "pcre.h" | sed 'y%./+-%__pm%'`
11492 old_CPPFLAGS="$CPPFLAGS"
11493 smart_include=
11494 smart_include_dir="/usr/local/include /opt/include"
11495
11496 _smart_try_dir=
11497 _smart_include_dir=
11498
11499 for _prefix in $smart_prefix ""; do
11500   for _dir in $smart_try_dir; do
11501     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
11502   done
11503
11504   for _dir in $smart_include_dir; do
11505     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
11506   done
11507 done
11508
11509 if test "x$_smart_try_dir" != "x"; then
11510   for try in $_smart_try_dir; do
11511     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre.h in $try" >&5
11512 $as_echo_n "checking for pcre.h in $try... " >&6; }
11513     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11514     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11515 /* end confdefs.h.  */
11516
11517                     #include <pcre.h>
11518 int
11519 main ()
11520 {
11521 int a = 1;
11522   ;
11523   return 0;
11524 }
11525 _ACEOF
11526 if ac_fn_c_try_compile "$LINENO"; then :
11527
11528                      smart_include="-isystem $try"
11529                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11530 $as_echo "yes" >&6; }
11531                      break
11532
11533 else
11534
11535                      smart_include=
11536                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11537 $as_echo "no" >&6; }
11538
11539 fi
11540 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11541   done
11542   CPPFLAGS="$old_CPPFLAGS"
11543 fi
11544
11545 if test "x$smart_include" = "x"; then
11546   for _prefix in $smart_prefix; do
11547     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/pcre.h" >&5
11548 $as_echo_n "checking for ${_prefix}/pcre.h... " >&6; }
11549
11550     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11551 /* end confdefs.h.  */
11552
11553                     #include <pcre.h>
11554 int
11555 main ()
11556 {
11557 int a = 1;
11558   ;
11559   return 0;
11560 }
11561 _ACEOF
11562 if ac_fn_c_try_compile "$LINENO"; then :
11563
11564                      smart_include="-isystem ${_prefix}/"
11565                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11566 $as_echo "yes" >&6; }
11567                      break
11568
11569 else
11570
11571                      smart_include=
11572                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11573 $as_echo "no" >&6; }
11574
11575 fi
11576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11577   done
11578 fi
11579
11580 if test "x$smart_include" = "x"; then
11581     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre.h" >&5
11582 $as_echo_n "checking for pcre.h... " >&6; }
11583
11584     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11585 /* end confdefs.h.  */
11586
11587                     #include <pcre.h>
11588 int
11589 main ()
11590 {
11591 int a = 1;
11592   ;
11593   return 0;
11594 }
11595 _ACEOF
11596 if ac_fn_c_try_compile "$LINENO"; then :
11597
11598                      smart_include=" "
11599                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11600 $as_echo "yes" >&6; }
11601                      break
11602
11603 else
11604
11605                      smart_include=
11606                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11607 $as_echo "no" >&6; }
11608
11609 fi
11610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11611 fi
11612
11613 if test "x$smart_include" = "x"; then
11614
11615   for prefix in $smart_prefix; do
11616
11617
11618 if test "x$LOCATE" != "x"; then
11619         DIRS=
11620   file="${_prefix}/${1}"
11621
11622   for x in `${LOCATE} $file 2>/dev/null`; do
11623                                         base=`echo $x | sed "s%/${file}%%"`
11624     if test "x$x" = "x$base"; then
11625       continue;
11626     fi
11627
11628     dir=`${DIRNAME} $x 2>/dev/null`
11629                 exclude=`echo ${dir} | ${GREP} /home`
11630     if test "x$exclude" != "x"; then
11631       continue
11632     fi
11633
11634                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
11635     if test "x$already" = "x"; then
11636       DIRS="$DIRS $dir"
11637     fi
11638   done
11639 fi
11640
11641 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
11642
11643   done
11644
11645
11646 if test "x$LOCATE" != "x"; then
11647         DIRS=
11648   file=pcre.h
11649
11650   for x in `${LOCATE} $file 2>/dev/null`; do
11651                                         base=`echo $x | sed "s%/${file}%%"`
11652     if test "x$x" = "x$base"; then
11653       continue;
11654     fi
11655
11656     dir=`${DIRNAME} $x 2>/dev/null`
11657                 exclude=`echo ${dir} | ${GREP} /home`
11658     if test "x$exclude" != "x"; then
11659       continue
11660     fi
11661
11662                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
11663     if test "x$already" = "x"; then
11664       DIRS="$DIRS $dir"
11665     fi
11666   done
11667 fi
11668
11669 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
11670
11671
11672   for try in $_smart_include_dir; do
11673     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre.h in $try" >&5
11674 $as_echo_n "checking for pcre.h in $try... " >&6; }
11675     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11676     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11677 /* end confdefs.h.  */
11678
11679                     #include <pcre.h>
11680 int
11681 main ()
11682 {
11683 int a = 1;
11684   ;
11685   return 0;
11686 }
11687 _ACEOF
11688 if ac_fn_c_try_compile "$LINENO"; then :
11689
11690                      smart_include="-isystem $try"
11691                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11692 $as_echo "yes" >&6; }
11693                      break
11694
11695 else
11696
11697                      smart_include=
11698                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11699 $as_echo "no" >&6; }
11700
11701 fi
11702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11703   done
11704   CPPFLAGS="$old_CPPFLAGS"
11705 fi
11706
11707 if test "x$smart_include" != "x"; then
11708   eval "ac_cv_header_$ac_safe=yes"
11709   CPPFLAGS="$smart_include $old_CPPFLAGS"
11710   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
11711 fi
11712
11713 smart_prefix=
11714
11715   if test "x$ac_cv_header_pcre_h" = "xyes"; then
11716     smart_try_dir=$pcre_lib_dir
11717
11718
11719 sm_lib_safe=`echo "pcre" | sed 'y%./+-%__p_%'`
11720 sm_func_safe=`echo "pcre_compile" | sed 'y%./+-%__p_%'`
11721
11722 old_LIBS="$LIBS"
11723 old_CPPFLAGS="$CPPFLAGS"
11724 smart_lib=
11725 smart_ldflags=
11726 smart_lib_dir=
11727
11728 if test "x$smart_try_dir" != "x"; then
11729   for try in $smart_try_dir; do
11730     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre in $try" >&5
11731 $as_echo_n "checking for pcre_compile in -lpcre in $try... " >&6; }
11732     LIBS="-lpcre $old_LIBS"
11733     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
11734     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11735 /* end confdefs.h.  */
11736 extern char pcre_compile();
11737 int
11738 main ()
11739 {
11740 pcre_compile()
11741   ;
11742   return 0;
11743 }
11744 _ACEOF
11745 if ac_fn_c_try_link "$LINENO"; then :
11746
11747                  smart_lib="-lpcre"
11748                  smart_ldflags="-L$try -Wl,-rpath,$try"
11749                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11750 $as_echo "yes" >&6; }
11751                  break
11752
11753 else
11754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11755 $as_echo "no" >&6; }
11756 fi
11757 rm -f core conftest.err conftest.$ac_objext \
11758     conftest$ac_exeext conftest.$ac_ext
11759   done
11760   LIBS="$old_LIBS"
11761   CPPFLAGS="$old_CPPFLAGS"
11762 fi
11763
11764 if test "x$smart_lib" = "x"; then
11765   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre" >&5
11766 $as_echo_n "checking for pcre_compile in -lpcre... " >&6; }
11767   LIBS="-lpcre $old_LIBS"
11768   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11769 /* end confdefs.h.  */
11770 extern char pcre_compile();
11771 int
11772 main ()
11773 {
11774 pcre_compile()
11775   ;
11776   return 0;
11777 }
11778 _ACEOF
11779 if ac_fn_c_try_link "$LINENO"; then :
11780
11781                 smart_lib="-lpcre"
11782                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11783 $as_echo "yes" >&6; }
11784
11785 else
11786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11787 $as_echo "no" >&6; }
11788 fi
11789 rm -f core conftest.err conftest.$ac_objext \
11790     conftest$ac_exeext conftest.$ac_ext
11791   LIBS="$old_LIBS"
11792 fi
11793
11794 if test "x$smart_lib" = "x"; then
11795
11796
11797 if test "x$LOCATE" != "x"; then
11798         DIRS=
11799   file=libpcre${libltdl_cv_shlibext}
11800
11801   for x in `${LOCATE} $file 2>/dev/null`; do
11802                                         base=`echo $x | sed "s%/${file}%%"`
11803     if test "x$x" = "x$base"; then
11804       continue;
11805     fi
11806
11807     dir=`${DIRNAME} $x 2>/dev/null`
11808                 exclude=`echo ${dir} | ${GREP} /home`
11809     if test "x$exclude" != "x"; then
11810       continue
11811     fi
11812
11813                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
11814     if test "x$already" = "x"; then
11815       DIRS="$DIRS $dir"
11816     fi
11817   done
11818 fi
11819
11820 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
11821
11822
11823
11824 if test "x$LOCATE" != "x"; then
11825         DIRS=
11826   file=libpcre.a
11827
11828   for x in `${LOCATE} $file 2>/dev/null`; do
11829                                         base=`echo $x | sed "s%/${file}%%"`
11830     if test "x$x" = "x$base"; then
11831       continue;
11832     fi
11833
11834     dir=`${DIRNAME} $x 2>/dev/null`
11835                 exclude=`echo ${dir} | ${GREP} /home`
11836     if test "x$exclude" != "x"; then
11837       continue
11838     fi
11839
11840                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
11841     if test "x$already" = "x"; then
11842       DIRS="$DIRS $dir"
11843     fi
11844   done
11845 fi
11846
11847 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
11848
11849
11850   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
11851     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre in $try" >&5
11852 $as_echo_n "checking for pcre_compile in -lpcre in $try... " >&6; }
11853     LIBS="-lpcre $old_LIBS"
11854     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
11855     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11856 /* end confdefs.h.  */
11857 extern char pcre_compile();
11858 int
11859 main ()
11860 {
11861 pcre_compile()
11862   ;
11863   return 0;
11864 }
11865 _ACEOF
11866 if ac_fn_c_try_link "$LINENO"; then :
11867
11868                   smart_lib="-lpcre"
11869                   smart_ldflags="-L$try -Wl,-rpath,$try"
11870                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11871 $as_echo "yes" >&6; }
11872                   break
11873
11874 else
11875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11876 $as_echo "no" >&6; }
11877 fi
11878 rm -f core conftest.err conftest.$ac_objext \
11879     conftest$ac_exeext conftest.$ac_ext
11880   done
11881   LIBS="$old_LIBS"
11882   CPPFLAGS="$old_CPPFLAGS"
11883 fi
11884
11885 if test "x$smart_lib" != "x"; then
11886   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
11887   LIBS="$smart_ldflags $smart_lib $old_LIBS"
11888   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
11889 fi
11890
11891     if test "x$ac_cv_lib_pcre_pcre_compile" = "xyes"; then
11892       REGEX=yes
11893
11894 $as_echo "#define HAVE_PCRE 1" >>confdefs.h
11895
11896
11897 $as_echo "#define HAVE_BINSAFE_REGEX 1" >>confdefs.h
11898
11899     fi
11900   fi
11901 fi
11902
11903 if test "x$REGEX" = "x"; then
11904   smart_try_dir=
11905
11906
11907 ac_safe=`echo "regex.h" | sed 'y%./+-%__pm%'`
11908 old_CPPFLAGS="$CPPFLAGS"
11909 smart_include=
11910 smart_include_dir="/usr/local/include /opt/include"
11911
11912 _smart_try_dir=
11913 _smart_include_dir=
11914
11915 for _prefix in $smart_prefix ""; do
11916   for _dir in $smart_try_dir; do
11917     _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
11918   done
11919
11920   for _dir in $smart_include_dir; do
11921     _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
11922   done
11923 done
11924
11925 if test "x$_smart_try_dir" != "x"; then
11926   for try in $_smart_try_dir; do
11927     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h in $try" >&5
11928 $as_echo_n "checking for regex.h in $try... " >&6; }
11929     CPPFLAGS="-isystem $try $old_CPPFLAGS"
11930     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11931 /* end confdefs.h.  */
11932
11933                     #include <regex.h>
11934 int
11935 main ()
11936 {
11937 int a = 1;
11938   ;
11939   return 0;
11940 }
11941 _ACEOF
11942 if ac_fn_c_try_compile "$LINENO"; then :
11943
11944                      smart_include="-isystem $try"
11945                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11946 $as_echo "yes" >&6; }
11947                      break
11948
11949 else
11950
11951                      smart_include=
11952                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11953 $as_echo "no" >&6; }
11954
11955 fi
11956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11957   done
11958   CPPFLAGS="$old_CPPFLAGS"
11959 fi
11960
11961 if test "x$smart_include" = "x"; then
11962   for _prefix in $smart_prefix; do
11963     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/regex.h" >&5
11964 $as_echo_n "checking for ${_prefix}/regex.h... " >&6; }
11965
11966     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11967 /* end confdefs.h.  */
11968
11969                     #include <regex.h>
11970 int
11971 main ()
11972 {
11973 int a = 1;
11974   ;
11975   return 0;
11976 }
11977 _ACEOF
11978 if ac_fn_c_try_compile "$LINENO"; then :
11979
11980                      smart_include="-isystem ${_prefix}/"
11981                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11982 $as_echo "yes" >&6; }
11983                      break
11984
11985 else
11986
11987                      smart_include=
11988                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11989 $as_echo "no" >&6; }
11990
11991 fi
11992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11993   done
11994 fi
11995
11996 if test "x$smart_include" = "x"; then
11997     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h" >&5
11998 $as_echo_n "checking for regex.h... " >&6; }
11999
12000     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12001 /* end confdefs.h.  */
12002
12003                     #include <regex.h>
12004 int
12005 main ()
12006 {
12007 int a = 1;
12008   ;
12009   return 0;
12010 }
12011 _ACEOF
12012 if ac_fn_c_try_compile "$LINENO"; then :
12013
12014                      smart_include=" "
12015                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12016 $as_echo "yes" >&6; }
12017                      break
12018
12019 else
12020
12021                      smart_include=
12022                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12023 $as_echo "no" >&6; }
12024
12025 fi
12026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12027 fi
12028
12029 if test "x$smart_include" = "x"; then
12030
12031   for prefix in $smart_prefix; do
12032
12033
12034 if test "x$LOCATE" != "x"; then
12035         DIRS=
12036   file="${_prefix}/${1}"
12037
12038   for x in `${LOCATE} $file 2>/dev/null`; do
12039                                         base=`echo $x | sed "s%/${file}%%"`
12040     if test "x$x" = "x$base"; then
12041       continue;
12042     fi
12043
12044     dir=`${DIRNAME} $x 2>/dev/null`
12045                 exclude=`echo ${dir} | ${GREP} /home`
12046     if test "x$exclude" != "x"; then
12047       continue
12048     fi
12049
12050                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
12051     if test "x$already" = "x"; then
12052       DIRS="$DIRS $dir"
12053     fi
12054   done
12055 fi
12056
12057 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
12058
12059   done
12060
12061
12062 if test "x$LOCATE" != "x"; then
12063         DIRS=
12064   file=regex.h
12065
12066   for x in `${LOCATE} $file 2>/dev/null`; do
12067                                         base=`echo $x | sed "s%/${file}%%"`
12068     if test "x$x" = "x$base"; then
12069       continue;
12070     fi
12071
12072     dir=`${DIRNAME} $x 2>/dev/null`
12073                 exclude=`echo ${dir} | ${GREP} /home`
12074     if test "x$exclude" != "x"; then
12075       continue
12076     fi
12077
12078                     already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
12079     if test "x$already" = "x"; then
12080       DIRS="$DIRS $dir"
12081     fi
12082   done
12083 fi
12084
12085 eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
12086
12087
12088   for try in $_smart_include_dir; do
12089     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h in $try" >&5
12090 $as_echo_n "checking for regex.h in $try... " >&6; }
12091     CPPFLAGS="-isystem $try $old_CPPFLAGS"
12092     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12093 /* end confdefs.h.  */
12094
12095                     #include <regex.h>
12096 int
12097 main ()
12098 {
12099 int a = 1;
12100   ;
12101   return 0;
12102 }
12103 _ACEOF
12104 if ac_fn_c_try_compile "$LINENO"; then :
12105
12106                      smart_include="-isystem $try"
12107                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12108 $as_echo "yes" >&6; }
12109                      break
12110
12111 else
12112
12113                      smart_include=
12114                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12115 $as_echo "no" >&6; }
12116
12117 fi
12118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12119   done
12120   CPPFLAGS="$old_CPPFLAGS"
12121 fi
12122
12123 if test "x$smart_include" != "x"; then
12124   eval "ac_cv_header_$ac_safe=yes"
12125   CPPFLAGS="$smart_include $old_CPPFLAGS"
12126   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
12127 fi
12128
12129 smart_prefix=
12130
12131   if test "x$ac_cv_header_regex_h" = "xyes"; then
12132     REGEX=yes
12133     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extended regular expressions" >&5
12134 $as_echo_n "checking for extended regular expressions... " >&6; }
12135     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12136 /* end confdefs.h.  */
12137
12138         #include <regex.h>
12139         #ifdef REG_EXTENDED
12140         yes
12141         #endif
12142
12143 _ACEOF
12144 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12145   $EGREP "yes" >/dev/null 2>&1; then :
12146
12147         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12148 $as_echo "yes" >&6; }
12149
12150 $as_echo "#define HAVE_REG_EXTENDED 1" >>confdefs.h
12151
12152
12153 else
12154
12155         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12156 $as_echo "no" >&6; }
12157
12158
12159 fi
12160 rm -f conftest*
12161
12162
12163                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regcomp in -lregex" >&5
12164 $as_echo_n "checking for regcomp in -lregex... " >&6; }
12165 if ${ac_cv_lib_regex_regcomp+:} false; then :
12166   $as_echo_n "(cached) " >&6
12167 else
12168   ac_check_lib_save_LIBS=$LIBS
12169 LIBS="-lregex  $LIBS"
12170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12171 /* end confdefs.h.  */
12172
12173 /* Override any GCC internal prototype to avoid an error.
12174    Use char because int might match the return type of a GCC
12175    builtin and then its argument prototype would still apply.  */
12176 #ifdef __cplusplus
12177 extern "C"
12178 #endif
12179 char regcomp ();
12180 int
12181 main ()
12182 {
12183 return regcomp ();
12184   ;
12185   return 0;
12186 }
12187 _ACEOF
12188 if ac_fn_c_try_link "$LINENO"; then :
12189   ac_cv_lib_regex_regcomp=yes
12190 else
12191   ac_cv_lib_regex_regcomp=no
12192 fi
12193 rm -f core conftest.err conftest.$ac_objext \
12194     conftest$ac_exeext conftest.$ac_ext
12195 LIBS=$ac_check_lib_save_LIBS
12196 fi
12197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_regex_regcomp" >&5
12198 $as_echo "$ac_cv_lib_regex_regcomp" >&6; }
12199 if test "x$ac_cv_lib_regex_regcomp" = xyes; then :
12200
12201         LIBS="-lregex $LIBS"
12202
12203
12204 fi
12205
12206
12207                     for ac_func in \
12208       regncomp \
12209       regnexec
12210
12211 do :
12212   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12213 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12214 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12215   cat >>confdefs.h <<_ACEOF
12216 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12217 _ACEOF
12218
12219 fi
12220 done
12221
12222     if test x"$ac_cv_func_regncomp" = x"yes" && test  x"$ac_cv_func_regnexec" = x"yes"; then
12223
12224 $as_echo "#define HAVE_BINSAFE_REGEX 1" >>confdefs.h
12225
12226     fi
12227   fi
12228 fi
12229
12230 if test "x$REGEX" = "xyes"; then
12231
12232 $as_echo "#define HAVE_REGEX 1" >>confdefs.h
12233
12234 fi
12235
12236
12237 $as_echo "#define GNUSTYLE 1" >>confdefs.h
12238
12239
12240
12241 $as_echo "#define SYSVSTYLE 2" >>confdefs.h
12242
12243
12244
12245 $as_echo "#define BSDSTYLE 3" >>confdefs.h
12246
12247
12248 gethostbyaddrrstyle=""
12249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyaddr_r() syntax" >&5
12250 $as_echo_n "checking gethostbyaddr_r() syntax... " >&6; }
12251 case "$host" in
12252   *-freebsd*)
12253                             ac_fn_c_check_decl "$LINENO" "gethostbyaddr_r" "ac_cv_have_decl_gethostbyaddr_r" "
12254         #ifdef HAVE_NETDB_H
12255         #include <netdb.h>
12256         #endif
12257
12258 "
12259 if test "x$ac_cv_have_decl_gethostbyaddr_r" = xyes; then :
12260   ac_have_decl=1
12261 else
12262   ac_have_decl=0
12263 fi
12264
12265 cat >>confdefs.h <<_ACEOF
12266 #define HAVE_DECL_GETHOSTBYADDR_R $ac_have_decl
12267 _ACEOF
12268 if test $ac_have_decl = 1; then :
12269
12270 else
12271
12272
12273 $as_echo "#define GETHOSTBYADDRRSTYLE BSDSTYLE" >>confdefs.h
12274
12275         gethostbyaddrrstyle=BSD
12276         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: FreeBSD overridden to BSD-style" >&5
12277 $as_echo "$as_me: WARNING: FreeBSD overridden to BSD-style" >&2;}
12278
12279 fi
12280
12281     ;;
12282 esac
12283
12284 if test "x$gethostbyaddrrstyle" = "x"; then
12285   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12286 /* end confdefs.h.  */
12287
12288       #include <stdio.h>
12289       #include <netdb.h>
12290
12291 int
12292 main ()
12293 {
12294  gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL, NULL)
12295   ;
12296   return 0;
12297 }
12298 _ACEOF
12299 if ac_fn_c_try_link "$LINENO"; then :
12300
12301
12302 $as_echo "#define GETHOSTBYADDRRSTYLE GNUSTYLE" >>confdefs.h
12303
12304       gethostbyaddrrstyle=GNU
12305
12306
12307 fi
12308 rm -f core conftest.err conftest.$ac_objext \
12309     conftest$ac_exeext conftest.$ac_ext
12310 fi
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_r(NULL, 0, 0, NULL, NULL, 0, NULL)
12323   ;
12324   return 0;
12325 }
12326 _ACEOF
12327 if ac_fn_c_try_link "$LINENO"; then :
12328
12329
12330 $as_echo "#define GETHOSTBYADDRRSTYLE SYSVSTYLE" >>confdefs.h
12331
12332       gethostbyaddrrstyle=SYSV
12333
12334
12335 fi
12336 rm -f core conftest.err conftest.$ac_objext \
12337     conftest$ac_exeext conftest.$ac_ext
12338 fi
12339
12340
12341 if test "x$gethostbyaddrrstyle" = "x"; then
12342   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12343 /* end confdefs.h.  */
12344
12345       #include <stdio.h>
12346       #include <netdb.h>
12347
12348 int
12349 main ()
12350 {
12351  gethostbyaddr(NULL, 0, 0)
12352   ;
12353   return 0;
12354 }
12355 _ACEOF
12356 if ac_fn_c_try_link "$LINENO"; then :
12357
12358
12359 $as_echo "#define GETHOSTBYADDRRSTYLE BSDSTYLE" >>confdefs.h
12360
12361       gethostbyaddrrstyle=BSD
12362
12363
12364 fi
12365 rm -f core conftest.err conftest.$ac_objext \
12366     conftest$ac_exeext conftest.$ac_ext
12367 fi
12368
12369 if test "x$gethostbyaddrrstyle" = "x"; then
12370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none!  It must not exist, here." >&5
12371 $as_echo "none!  It must not exist, here." >&6; }
12372 else
12373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${gethostbyaddrrstyle}-style" >&5
12374 $as_echo "${gethostbyaddrrstyle}-style" >&6; }
12375 fi
12376
12377 if test "x$gethostbyaddrrstyle" = "xBSD"; then
12378   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** " >&5
12379 $as_echo "$as_me: WARNING:  ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** " >&2;}
12380 fi
12381
12382 gethostbynamerstyle=""
12383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r() syntax" >&5
12384 $as_echo_n "checking gethostbyname_r() syntax... " >&6; }
12385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12386 /* end confdefs.h.  */
12387
12388     #include <stdio.h>
12389     #include <netdb.h>
12390
12391 int
12392 main ()
12393 {
12394  gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL)
12395   ;
12396   return 0;
12397 }
12398 _ACEOF
12399 if ac_fn_c_try_link "$LINENO"; then :
12400
12401
12402 $as_echo "#define GETHOSTBYNAMERSTYLE GNUSTYLE" >>confdefs.h
12403
12404     gethostbynamerstyle=GNU
12405
12406
12407 fi
12408 rm -f core conftest.err conftest.$ac_objext \
12409     conftest$ac_exeext conftest.$ac_ext
12410
12411 if test "x$gethostbynamerstyle" = "x"; then
12412   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12413 /* end confdefs.h.  */
12414
12415       #include <stdio.h>
12416       #include <netdb.h>
12417
12418 int
12419 main ()
12420 {
12421  gethostbyname_r(NULL, NULL, NULL, 0, NULL)
12422   ;
12423   return 0;
12424 }
12425 _ACEOF
12426 if ac_fn_c_try_link "$LINENO"; then :
12427
12428
12429 $as_echo "#define GETHOSTBYNAMERSTYLE SYSVSTYLE" >>confdefs.h
12430
12431       gethostbynamerstyle=SYSV
12432
12433
12434 fi
12435 rm -f core conftest.err conftest.$ac_objext \
12436     conftest$ac_exeext conftest.$ac_ext
12437 fi
12438
12439 if test "x$gethostbynamerstyle" = "x"; then
12440   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12441 /* end confdefs.h.  */
12442
12443       #include <stdio.h>
12444       #include <netdb.h>
12445
12446 int
12447 main ()
12448 {
12449  gethostbyname(NULL)
12450   ;
12451   return 0;
12452 }
12453 _ACEOF
12454 if ac_fn_c_try_link "$LINENO"; then :
12455
12456
12457 $as_echo "#define GETHOSTBYNAMERSTYLE BSDSTYLE" >>confdefs.h
12458
12459       gethostbynamerstyle=BSD
12460
12461
12462 fi
12463 rm -f core conftest.err conftest.$ac_objext \
12464     conftest$ac_exeext conftest.$ac_ext
12465 fi
12466
12467 if test "x$gethostbynamerstyle" = "x"; then
12468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none!  It must not exist, here." >&5
12469 $as_echo "none!  It must not exist, here." >&6; }
12470 else
12471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${gethostbynamerstyle}-style" >&5
12472 $as_echo "${gethostbynamerstyle}-style" >&6; }
12473 fi
12474
12475 if test "x$gethostbynamerstyle" = "xBSD"; then
12476   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  ****** BSD-style gethostbyname might NOT be thread-safe! ****** " >&5
12477 $as_echo "$as_me: WARNING:  ****** BSD-style gethostbyname might NOT be thread-safe! ****** " >&2;}
12478 fi
12479
12480 if test "x$ac_cv_header_pwd_h" = "xyes"; then
12481   { $as_echo "$as_me:${as_lineno-$LINENO}: checking getpwnam_r" >&5
12482 $as_echo_n "checking getpwnam_r... " >&6; }
12483   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12484 /* end confdefs.h.  */
12485
12486       #include <stdlib.h>
12487       #include <sys/types.h>
12488       #include <pwd.h>
12489
12490 int
12491 main ()
12492 {
12493  getpwnam_r(NULL, NULL, NULL, 0, NULL)
12494   ;
12495   return 0;
12496 }
12497 _ACEOF
12498 if ac_fn_c_try_link "$LINENO"; then :
12499
12500       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12501 $as_echo "yes" >&6; }
12502
12503 $as_echo "#define HAVE_GETPWNAM_R 1" >>confdefs.h
12504
12505
12506 else
12507
12508         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12509 $as_echo "no" >&6; }
12510
12511
12512 fi
12513 rm -f core conftest.err conftest.$ac_objext \
12514     conftest$ac_exeext conftest.$ac_ext
12515 fi
12516
12517 if test "x$ac_cv_header_grp_h" = "xyes"; then
12518   { $as_echo "$as_me:${as_lineno-$LINENO}: checking getgrnam_r" >&5
12519 $as_echo_n "checking getgrnam_r... " >&6; }
12520   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12521 /* end confdefs.h.  */
12522
12523       #include <stdlib.h>
12524       #include <sys/types.h>
12525       #include <grp.h>
12526
12527 int
12528 main ()
12529 {
12530  getgrnam_r(NULL, NULL, NULL, 0, NULL)
12531   ;
12532   return 0;
12533 }
12534 _ACEOF
12535 if ac_fn_c_try_link "$LINENO"; then :
12536
12537       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12538 $as_echo "yes" >&6; }
12539
12540 $as_echo "#define HAVE_GETGRNAM_R 1" >>confdefs.h
12541
12542
12543 else
12544
12545         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12546 $as_echo "no" >&6; }
12547
12548
12549 fi
12550 rm -f core conftest.err conftest.$ac_objext \
12551     conftest$ac_exeext conftest.$ac_ext
12552 fi
12553
12554
12555
12556 $as_echo "#define POSIXSTYLE 1" >>confdefs.h
12557
12558
12559 $as_echo "#define SOLARISSTYLE 2" >>confdefs.h
12560
12561 ctimerstyle=""
12562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ctime_r() syntax" >&5
12563 $as_echo_n "checking ctime_r() syntax... " >&6; }
12564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12565 /* end confdefs.h.  */
12566
12567     #include <time.h>
12568
12569 int
12570 main ()
12571 {
12572  ctime_r(NULL, NULL, 0)
12573   ;
12574   return 0;
12575 }
12576 _ACEOF
12577 if ac_fn_c_try_link "$LINENO"; then :
12578
12579
12580 $as_echo "#define CTIMERSTYLE SOLARISSTYLE" >>confdefs.h
12581
12582     ctimerstyle="SOLARIS"
12583
12584
12585 fi
12586 rm -f core conftest.err conftest.$ac_objext \
12587     conftest$ac_exeext conftest.$ac_ext
12588
12589 if test "x$ctimerstyle" = "x"; then
12590   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12591 /* end confdefs.h.  */
12592
12593       #include <time.h>
12594
12595 int
12596 main ()
12597 {
12598  ctime_r(NULL, NULL)
12599   ;
12600   return 0;
12601 }
12602 _ACEOF
12603 if ac_fn_c_try_link "$LINENO"; then :
12604
12605
12606 $as_echo "#define CTIMERSTYLE POSIXSTYLE" >>confdefs.h
12607
12608       ctimerstyle="POSIX"
12609
12610
12611 fi
12612 rm -f core conftest.err conftest.$ac_objext \
12613     conftest$ac_exeext conftest.$ac_ext
12614 fi
12615
12616 if test "x$ctimerstyle" = "x"; then
12617     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none!  It must not exist, here." >&5
12618 $as_echo "none!  It must not exist, here." >&6; }
12619 else
12620     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ctimerstyle}-style" >&5
12621 $as_echo "${ctimerstyle}-style" >&6; }
12622 fi
12623
12624 HOSTINFO=$host
12625
12626
12627
12628 top_builddir=`pwd`
12629 export top_builddir
12630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: top_builddir=$top_builddir" >&5
12631 $as_echo "top_builddir=$top_builddir" >&6; }
12632
12633
12634
12635
12636 if test "x$EXPERIMENTAL" = "xyes"; then
12637   for foo in `ls -1 "${srcdir}"/src/modules | grep rlm_`; do
12638     MODULES="$MODULES $foo"
12639   done
12640 else
12641             for foo in `cat "${srcdir}"/src/modules/stable`; do
12642       MODULES="$MODULES $foo"
12643    done
12644 fi
12645
12646 mysubdirs=""
12647 for bar in $MODULES; do
12648   if test -f "${srcdir}"/src/modules/$bar/configure; then
12649     mysubdirs="$mysubdirs src/modules/$bar"
12650   fi
12651 done
12652
12653
12654
12655 subdirs="$subdirs $mysubdirs"
12656
12657
12658
12659 if test "x$werror" == "xyes"; then
12660   CFLAGS="-Werror $CFLAGS"
12661 fi
12662
12663 ac_config_commands="$ac_config_commands stamp-h"
12664
12665 ac_config_commands="$ac_config_commands build-radpaths-h"
12666
12667 ac_config_commands="$ac_config_commands main-chmod"
12668
12669 ac_config_commands="$ac_config_commands scripts-chmod"
12670
12671
12672
12673
12674
12675
12676 USE_STATIC_LIBS="yes"
12677
12678
12679
12680
12681   unset ac_cv_env_LIBS_set
12682   unset ac_cv_env_LIBS_value
12683
12684   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"
12685
12686 cat >confcache <<\_ACEOF
12687 # This file is a shell script that caches the results of configure
12688 # tests run on this system so they can be shared between configure
12689 # scripts and configure runs, see configure's option --config-cache.
12690 # It is not useful on other systems.  If it contains results you don't
12691 # want to keep, you may remove or edit it.
12692 #
12693 # config.status only pays attention to the cache file if you give it
12694 # the --recheck option to rerun configure.
12695 #
12696 # `ac_cv_env_foo' variables (set or unset) will be overridden when
12697 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12698 # following values.
12699
12700 _ACEOF
12701
12702 # The following way of writing the cache mishandles newlines in values,
12703 # but we know of no workaround that is simple, portable, and efficient.
12704 # So, we kill variables containing newlines.
12705 # Ultrix sh set writes to stderr and can't be redirected directly,
12706 # and sets the high bit in the cache file unless we assign to the vars.
12707 (
12708   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
12709     eval ac_val=\$$ac_var
12710     case $ac_val in #(
12711     *${as_nl}*)
12712       case $ac_var in #(
12713       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
12714 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
12715       esac
12716       case $ac_var in #(
12717       _ | IFS | as_nl) ;; #(
12718       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
12719       *) { eval $ac_var=; unset $ac_var;} ;;
12720       esac ;;
12721     esac
12722   done
12723
12724   (set) 2>&1 |
12725     case $as_nl`(ac_space=' '; set) 2>&1` in #(
12726     *${as_nl}ac_space=\ *)
12727       # `set' does not quote correctly, so add quotes: double-quote
12728       # substitution turns \\\\ into \\, and sed turns \\ into \.
12729       sed -n \
12730         "s/'/'\\\\''/g;
12731           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12732       ;; #(
12733     *)
12734       # `set' quotes correctly as required by POSIX, so do not add quotes.
12735       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
12736       ;;
12737     esac |
12738     sort
12739 ) |
12740   sed '
12741      /^ac_cv_env_/b end
12742      t clear
12743      :clear
12744      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12745      t end
12746      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12747      :end' >>confcache
12748 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
12749   if test -w "$cache_file"; then
12750     if test "x$cache_file" != "x/dev/null"; then
12751       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
12752 $as_echo "$as_me: updating cache $cache_file" >&6;}
12753       if test ! -f "$cache_file" || test -h "$cache_file"; then
12754         cat confcache >"$cache_file"
12755       else
12756         case $cache_file in #(
12757         */* | ?:*)
12758           mv -f confcache "$cache_file"$$ &&
12759           mv -f "$cache_file"$$ "$cache_file" ;; #(
12760         *)
12761           mv -f confcache "$cache_file" ;;
12762         esac
12763       fi
12764     fi
12765   else
12766     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
12767 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
12768   fi
12769 fi
12770 rm -f confcache
12771
12772 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12773 # Let make expand exec_prefix.
12774 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12775
12776 DEFS=-DHAVE_CONFIG_H
12777
12778 ac_libobjs=
12779 ac_ltlibobjs=
12780 U=
12781 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
12782   # 1. Remove the extension, and $U if already installed.
12783   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
12784   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
12785   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
12786   #    will be set to the directory where LIBOBJS objects are built.
12787   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
12788   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
12789 done
12790 LIBOBJS=$ac_libobjs
12791
12792 LTLIBOBJS=$ac_ltlibobjs
12793
12794
12795
12796
12797 : "${CONFIG_STATUS=./config.status}"
12798 ac_write_fail=0
12799 ac_clean_files_save=$ac_clean_files
12800 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12801 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
12802 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
12803 as_write_fail=0
12804 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
12805 #! $SHELL
12806 # Generated by $as_me.
12807 # Run this file to recreate the current configuration.
12808 # Compiler output produced by configure, useful for debugging
12809 # configure, is in config.log if it exists.
12810
12811 debug=false
12812 ac_cs_recheck=false
12813 ac_cs_silent=false
12814
12815 SHELL=\${CONFIG_SHELL-$SHELL}
12816 export SHELL
12817 _ASEOF
12818 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
12819 ## -------------------- ##
12820 ## M4sh Initialization. ##
12821 ## -------------------- ##
12822
12823 # Be more Bourne compatible
12824 DUALCASE=1; export DUALCASE # for MKS sh
12825 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
12826   emulate sh
12827   NULLCMD=:
12828   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
12829   # is contrary to our usage.  Disable this feature.
12830   alias -g '${1+"$@"}'='"$@"'
12831   setopt NO_GLOB_SUBST
12832 else
12833   case `(set -o) 2>/dev/null` in #(
12834   *posix*) :
12835     set -o posix ;; #(
12836   *) :
12837      ;;
12838 esac
12839 fi
12840
12841
12842 as_nl='
12843 '
12844 export as_nl
12845 # Printing a long string crashes Solaris 7 /usr/bin/printf.
12846 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
12847 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
12848 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
12849 # Prefer a ksh shell builtin over an external printf program on Solaris,
12850 # but without wasting forks for bash or zsh.
12851 if test -z "$BASH_VERSION$ZSH_VERSION" \
12852     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
12853   as_echo='print -r --'
12854   as_echo_n='print -rn --'
12855 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
12856   as_echo='printf %s\n'
12857   as_echo_n='printf %s'
12858 else
12859   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
12860     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
12861     as_echo_n='/usr/ucb/echo -n'
12862   else
12863     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
12864     as_echo_n_body='eval
12865       arg=$1;
12866       case $arg in #(
12867       *"$as_nl"*)
12868         expr "X$arg" : "X\\(.*\\)$as_nl";
12869         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
12870       esac;
12871       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
12872     '
12873     export as_echo_n_body
12874     as_echo_n='sh -c $as_echo_n_body as_echo'
12875   fi
12876   export as_echo_body
12877   as_echo='sh -c $as_echo_body as_echo'
12878 fi
12879
12880 # The user is always right.
12881 if test "${PATH_SEPARATOR+set}" != set; then
12882   PATH_SEPARATOR=:
12883   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
12884     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
12885       PATH_SEPARATOR=';'
12886   }
12887 fi
12888
12889
12890 # IFS
12891 # We need space, tab and new line, in precisely that order.  Quoting is
12892 # there to prevent editors from complaining about space-tab.
12893 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
12894 # splitting by setting IFS to empty value.)
12895 IFS=" ""        $as_nl"
12896
12897 # Find who we are.  Look in the path if we contain no directory separator.
12898 as_myself=
12899 case $0 in #((
12900   *[\\/]* ) as_myself=$0 ;;
12901   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12902 for as_dir in $PATH
12903 do
12904   IFS=$as_save_IFS
12905   test -z "$as_dir" && as_dir=.
12906     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
12907   done
12908 IFS=$as_save_IFS
12909
12910      ;;
12911 esac
12912 # We did not find ourselves, most probably we were run as `sh COMMAND'
12913 # in which case we are not to be found in the path.
12914 if test "x$as_myself" = x; then
12915   as_myself=$0
12916 fi
12917 if test ! -f "$as_myself"; then
12918   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
12919   exit 1
12920 fi
12921
12922 # Unset variables that we do not need and which cause bugs (e.g. in
12923 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
12924 # suppresses any "Segmentation fault" message there.  '((' could
12925 # trigger a bug in pdksh 5.2.14.
12926 for as_var in BASH_ENV ENV MAIL MAILPATH
12927 do eval test x\${$as_var+set} = xset \
12928   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
12929 done
12930 PS1='$ '
12931 PS2='> '
12932 PS4='+ '
12933
12934 # NLS nuisances.
12935 LC_ALL=C
12936 export LC_ALL
12937 LANGUAGE=C
12938 export LANGUAGE
12939
12940 # CDPATH.
12941 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
12942
12943
12944 # as_fn_error STATUS ERROR [LINENO LOG_FD]
12945 # ----------------------------------------
12946 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
12947 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
12948 # script with STATUS, using 1 if that was 0.
12949 as_fn_error ()
12950 {
12951   as_status=$1; test $as_status -eq 0 && as_status=1
12952   if test "$4"; then
12953     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
12954     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
12955   fi
12956   $as_echo "$as_me: error: $2" >&2
12957   as_fn_exit $as_status
12958 } # as_fn_error
12959
12960
12961 # as_fn_set_status STATUS
12962 # -----------------------
12963 # Set $? to STATUS, without forking.
12964 as_fn_set_status ()
12965 {
12966   return $1
12967 } # as_fn_set_status
12968
12969 # as_fn_exit STATUS
12970 # -----------------
12971 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
12972 as_fn_exit ()
12973 {
12974   set +e
12975   as_fn_set_status $1
12976   exit $1
12977 } # as_fn_exit
12978
12979 # as_fn_unset VAR
12980 # ---------------
12981 # Portably unset VAR.
12982 as_fn_unset ()
12983 {
12984   { eval $1=; unset $1;}
12985 }
12986 as_unset=as_fn_unset
12987 # as_fn_append VAR VALUE
12988 # ----------------------
12989 # Append the text in VALUE to the end of the definition contained in VAR. Take
12990 # advantage of any shell optimizations that allow amortized linear growth over
12991 # repeated appends, instead of the typical quadratic growth present in naive
12992 # implementations.
12993 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
12994   eval 'as_fn_append ()
12995   {
12996     eval $1+=\$2
12997   }'
12998 else
12999   as_fn_append ()
13000   {
13001     eval $1=\$$1\$2
13002   }
13003 fi # as_fn_append
13004
13005 # as_fn_arith ARG...
13006 # ------------------
13007 # Perform arithmetic evaluation on the ARGs, and store the result in the
13008 # global $as_val. Take advantage of shells that can avoid forks. The arguments
13009 # must be portable across $(()) and expr.
13010 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13011   eval 'as_fn_arith ()
13012   {
13013     as_val=$(( $* ))
13014   }'
13015 else
13016   as_fn_arith ()
13017   {
13018     as_val=`expr "$@" || test $? -eq 1`
13019   }
13020 fi # as_fn_arith
13021
13022
13023 if expr a : '\(a\)' >/dev/null 2>&1 &&
13024    test "X`expr 00001 : '.*\(...\)'`" = X001; then
13025   as_expr=expr
13026 else
13027   as_expr=false
13028 fi
13029
13030 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13031   as_basename=basename
13032 else
13033   as_basename=false
13034 fi
13035
13036 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13037   as_dirname=dirname
13038 else
13039   as_dirname=false
13040 fi
13041
13042 as_me=`$as_basename -- "$0" ||
13043 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13044          X"$0" : 'X\(//\)$' \| \
13045          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
13046 $as_echo X/"$0" |
13047     sed '/^.*\/\([^/][^/]*\)\/*$/{
13048             s//\1/
13049             q
13050           }
13051           /^X\/\(\/\/\)$/{
13052             s//\1/
13053             q
13054           }
13055           /^X\/\(\/\).*/{
13056             s//\1/
13057             q
13058           }
13059           s/.*/./; q'`
13060
13061 # Avoid depending upon Character Ranges.
13062 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13063 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13064 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13065 as_cr_digits='0123456789'
13066 as_cr_alnum=$as_cr_Letters$as_cr_digits
13067
13068 ECHO_C= ECHO_N= ECHO_T=
13069 case `echo -n x` in #(((((
13070 -n*)
13071   case `echo 'xy\c'` in
13072   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
13073   xy)  ECHO_C='\c';;
13074   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
13075        ECHO_T=' ';;
13076   esac;;
13077 *)
13078   ECHO_N='-n';;
13079 esac
13080
13081 rm -f conf$$ conf$$.exe conf$$.file
13082 if test -d conf$$.dir; then
13083   rm -f conf$$.dir/conf$$.file
13084 else
13085   rm -f conf$$.dir
13086   mkdir conf$$.dir 2>/dev/null
13087 fi
13088 if (echo >conf$$.file) 2>/dev/null; then
13089   if ln -s conf$$.file conf$$ 2>/dev/null; then
13090     as_ln_s='ln -s'
13091     # ... but there are two gotchas:
13092     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13093     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13094     # In both cases, we have to default to `cp -pR'.
13095     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13096       as_ln_s='cp -pR'
13097   elif ln conf$$.file conf$$ 2>/dev/null; then
13098     as_ln_s=ln
13099   else
13100     as_ln_s='cp -pR'
13101   fi
13102 else
13103   as_ln_s='cp -pR'
13104 fi
13105 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13106 rmdir conf$$.dir 2>/dev/null
13107
13108
13109 # as_fn_mkdir_p
13110 # -------------
13111 # Create "$as_dir" as a directory, including parents if necessary.
13112 as_fn_mkdir_p ()
13113 {
13114
13115   case $as_dir in #(
13116   -*) as_dir=./$as_dir;;
13117   esac
13118   test -d "$as_dir" || eval $as_mkdir_p || {
13119     as_dirs=
13120     while :; do
13121       case $as_dir in #(
13122       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13123       *) as_qdir=$as_dir;;
13124       esac
13125       as_dirs="'$as_qdir' $as_dirs"
13126       as_dir=`$as_dirname -- "$as_dir" ||
13127 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13128          X"$as_dir" : 'X\(//\)[^/]' \| \
13129          X"$as_dir" : 'X\(//\)$' \| \
13130          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13131 $as_echo X"$as_dir" |
13132     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13133             s//\1/
13134             q
13135           }
13136           /^X\(\/\/\)[^/].*/{
13137             s//\1/
13138             q
13139           }
13140           /^X\(\/\/\)$/{
13141             s//\1/
13142             q
13143           }
13144           /^X\(\/\).*/{
13145             s//\1/
13146             q
13147           }
13148           s/.*/./; q'`
13149       test -d "$as_dir" && break
13150     done
13151     test -z "$as_dirs" || eval "mkdir $as_dirs"
13152   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
13153
13154
13155 } # as_fn_mkdir_p
13156 if mkdir -p . 2>/dev/null; then
13157   as_mkdir_p='mkdir -p "$as_dir"'
13158 else
13159   test -d ./-p && rmdir ./-p
13160   as_mkdir_p=false
13161 fi
13162
13163
13164 # as_fn_executable_p FILE
13165 # -----------------------
13166 # Test if FILE is an executable regular file.
13167 as_fn_executable_p ()
13168 {
13169   test -f "$1" && test -x "$1"
13170 } # as_fn_executable_p
13171 as_test_x='test -x'
13172 as_executable_p=as_fn_executable_p
13173
13174 # Sed expression to map a string onto a valid CPP name.
13175 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
13176
13177 # Sed expression to map a string onto a valid variable name.
13178 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
13179
13180
13181 exec 6>&1
13182 ## ----------------------------------- ##
13183 ## Main body of $CONFIG_STATUS script. ##
13184 ## ----------------------------------- ##
13185 _ASEOF
13186 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
13187
13188 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13189 # Save the log message, to keep $0 and so on meaningful, and to
13190 # report actual input values of CONFIG_FILES etc. instead of their
13191 # values after options handling.
13192 ac_log="
13193 This file was extended by freeradius $as_me $Id$, which was
13194 generated by GNU Autoconf 2.69.  Invocation command line was
13195
13196   CONFIG_FILES    = $CONFIG_FILES
13197   CONFIG_HEADERS  = $CONFIG_HEADERS
13198   CONFIG_LINKS    = $CONFIG_LINKS
13199   CONFIG_COMMANDS = $CONFIG_COMMANDS
13200   $ $0 $@
13201
13202 on `(hostname || uname -n) 2>/dev/null | sed 1q`
13203 "
13204
13205 _ACEOF
13206
13207 case $ac_config_files in *"
13208 "*) set x $ac_config_files; shift; ac_config_files=$*;;
13209 esac
13210
13211 case $ac_config_headers in *"
13212 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
13213 esac
13214
13215
13216 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13217 # Files that config.status was made for.
13218 config_files="$ac_config_files"
13219 config_headers="$ac_config_headers"
13220 config_commands="$ac_config_commands"
13221
13222 _ACEOF
13223
13224 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13225 ac_cs_usage="\
13226 \`$as_me' instantiates files and other configuration actions
13227 from templates according to the current configuration.  Unless the files
13228 and actions are specified as TAGs, all are instantiated by default.
13229
13230 Usage: $0 [OPTION]... [TAG]...
13231
13232   -h, --help       print this help, then exit
13233   -V, --version    print version number and configuration settings, then exit
13234       --config     print configuration, then exit
13235   -q, --quiet, --silent
13236                    do not print progress messages
13237   -d, --debug      don't remove temporary files
13238       --recheck    update $as_me by reconfiguring in the same conditions
13239       --file=FILE[:TEMPLATE]
13240                    instantiate the configuration file FILE
13241       --header=FILE[:TEMPLATE]
13242                    instantiate the configuration header FILE
13243
13244 Configuration files:
13245 $config_files
13246
13247 Configuration headers:
13248 $config_headers
13249
13250 Configuration commands:
13251 $config_commands
13252
13253 Report bugs to <http://bugs.freeradius.org>.
13254 freeradius home page: <http://www.freeradius.org>."
13255
13256 _ACEOF
13257 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13258 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
13259 ac_cs_version="\\
13260 freeradius config.status $Id$
13261 configured by $0, generated by GNU Autoconf 2.69,
13262   with options \\"\$ac_cs_config\\"
13263
13264 Copyright (C) 2012 Free Software Foundation, Inc.
13265 This config.status script is free software; the Free Software Foundation
13266 gives unlimited permission to copy, distribute and modify it."
13267
13268 ac_pwd='$ac_pwd'
13269 srcdir='$srcdir'
13270 test -n "\$AWK" || AWK=awk
13271 _ACEOF
13272
13273 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13274 # The default lists apply if the user does not specify any file.
13275 ac_need_defaults=:
13276 while test $# != 0
13277 do
13278   case $1 in
13279   --*=?*)
13280     ac_option=`expr "X$1" : 'X\([^=]*\)='`
13281     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
13282     ac_shift=:
13283     ;;
13284   --*=)
13285     ac_option=`expr "X$1" : 'X\([^=]*\)='`
13286     ac_optarg=
13287     ac_shift=:
13288     ;;
13289   *)
13290     ac_option=$1
13291     ac_optarg=$2
13292     ac_shift=shift
13293     ;;
13294   esac
13295
13296   case $ac_option in
13297   # Handling of the options.
13298   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13299     ac_cs_recheck=: ;;
13300   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
13301     $as_echo "$ac_cs_version"; exit ;;
13302   --config | --confi | --conf | --con | --co | --c )
13303     $as_echo "$ac_cs_config"; exit ;;
13304   --debug | --debu | --deb | --de | --d | -d )
13305     debug=: ;;
13306   --file | --fil | --fi | --f )
13307     $ac_shift
13308     case $ac_optarg in
13309     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
13310     '') as_fn_error $? "missing file argument" ;;
13311     esac
13312     as_fn_append CONFIG_FILES " '$ac_optarg'"
13313     ac_need_defaults=false;;
13314   --header | --heade | --head | --hea )
13315     $ac_shift
13316     case $ac_optarg in
13317     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
13318     esac
13319     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
13320     ac_need_defaults=false;;
13321   --he | --h)
13322     # Conflict between --help and --header
13323     as_fn_error $? "ambiguous option: \`$1'
13324 Try \`$0 --help' for more information.";;
13325   --help | --hel | -h )
13326     $as_echo "$ac_cs_usage"; exit ;;
13327   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
13328   | -silent | --silent | --silen | --sile | --sil | --si | --s)
13329     ac_cs_silent=: ;;
13330
13331   # This is an error.
13332   -*) as_fn_error $? "unrecognized option: \`$1'
13333 Try \`$0 --help' for more information." ;;
13334
13335   *) as_fn_append ac_config_targets " $1"
13336      ac_need_defaults=false ;;
13337
13338   esac
13339   shift
13340 done
13341
13342 ac_configure_extra_args=
13343
13344 if $ac_cs_silent; then
13345   exec 6>/dev/null
13346   ac_configure_extra_args="$ac_configure_extra_args --silent"
13347 fi
13348
13349 _ACEOF
13350 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13351 if \$ac_cs_recheck; then
13352   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
13353   shift
13354   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
13355   CONFIG_SHELL='$SHELL'
13356   export CONFIG_SHELL
13357   exec "\$@"
13358 fi
13359
13360 _ACEOF
13361 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13362 exec 5>>config.log
13363 {
13364   echo
13365   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
13366 ## Running $as_me. ##
13367 _ASBOX
13368   $as_echo "$ac_log"
13369 } >&5
13370
13371 _ACEOF
13372 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13373 _ACEOF
13374
13375 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13376
13377 # Handling of arguments.
13378 for ac_config_target in $ac_config_targets
13379 do
13380   case $ac_config_target in
13381     "src/include/autoconf.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/autoconf.h" ;;
13382     "stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;;
13383     "build-radpaths-h") CONFIG_COMMANDS="$CONFIG_COMMANDS build-radpaths-h" ;;
13384     "main-chmod") CONFIG_COMMANDS="$CONFIG_COMMANDS main-chmod" ;;
13385     "scripts-chmod") CONFIG_COMMANDS="$CONFIG_COMMANDS scripts-chmod" ;;
13386     "./Make.inc") CONFIG_FILES="$CONFIG_FILES ./Make.inc" ;;
13387     "./src/include/build-radpaths-h") CONFIG_FILES="$CONFIG_FILES ./src/include/build-radpaths-h" ;;
13388     "./src/main/radsniff.mk") CONFIG_FILES="$CONFIG_FILES ./src/main/radsniff.mk" ;;
13389     "./src/main/checkrad") CONFIG_FILES="$CONFIG_FILES ./src/main/checkrad" ;;
13390     "./src/main/radlast") CONFIG_FILES="$CONFIG_FILES ./src/main/radlast" ;;
13391     "./src/main/radtest") CONFIG_FILES="$CONFIG_FILES ./src/main/radtest" ;;
13392     "./scripts/rc.radiusd") CONFIG_FILES="$CONFIG_FILES ./scripts/rc.radiusd" ;;
13393     "./scripts/cron/radiusd.cron.daily") CONFIG_FILES="$CONFIG_FILES ./scripts/cron/radiusd.cron.daily" ;;
13394     "./scripts/cron/radiusd.cron.monthly") CONFIG_FILES="$CONFIG_FILES ./scripts/cron/radiusd.cron.monthly" ;;
13395     "./scripts/cryptpasswd") CONFIG_FILES="$CONFIG_FILES ./scripts/cryptpasswd" ;;
13396     "./raddb/radrelay.conf") CONFIG_FILES="$CONFIG_FILES ./raddb/radrelay.conf" ;;
13397     "./raddb/radiusd.conf") CONFIG_FILES="$CONFIG_FILES ./raddb/radiusd.conf" ;;
13398
13399   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
13400   esac
13401 done
13402
13403
13404 # If the user did not use the arguments to specify the items to instantiate,
13405 # then the envvar interface is used.  Set only those that are not.
13406 # We use the long form for the default assignment because of an extremely
13407 # bizarre bug on SunOS 4.1.3.
13408 if $ac_need_defaults; then
13409   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
13410   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
13411   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
13412 fi
13413
13414 # Have a temporary directory for convenience.  Make it in the build tree
13415 # simply because there is no reason against having it here, and in addition,
13416 # creating and moving files from /tmp can sometimes cause problems.
13417 # Hook for its removal unless debugging.
13418 # Note that there is a small window in which the directory will not be cleaned:
13419 # after its creation but before its name has been assigned to `$tmp'.
13420 $debug ||
13421 {
13422   tmp= ac_tmp=
13423   trap 'exit_status=$?
13424   : "${ac_tmp:=$tmp}"
13425   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
13426 ' 0
13427   trap 'as_fn_exit 1' 1 2 13 15
13428 }
13429 # Create a (secure) tmp directory for tmp files.
13430
13431 {
13432   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
13433   test -d "$tmp"
13434 }  ||
13435 {
13436   tmp=./conf$$-$RANDOM
13437   (umask 077 && mkdir "$tmp")
13438 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
13439 ac_tmp=$tmp
13440
13441 # Set up the scripts for CONFIG_FILES section.
13442 # No need to generate them if there are no CONFIG_FILES.
13443 # This happens for instance with `./config.status config.h'.
13444 if test -n "$CONFIG_FILES"; then
13445
13446
13447 ac_cr=`echo X | tr X '\015'`
13448 # On cygwin, bash can eat \r inside `` if the user requested igncr.
13449 # But we know of no other shell where ac_cr would be empty at this
13450 # point, so we can use a bashism as a fallback.
13451 if test "x$ac_cr" = x; then
13452   eval ac_cr=\$\'\\r\'
13453 fi
13454 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
13455 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
13456   ac_cs_awk_cr='\\r'
13457 else
13458   ac_cs_awk_cr=$ac_cr
13459 fi
13460
13461 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
13462 _ACEOF
13463
13464
13465 {
13466   echo "cat >conf$$subs.awk <<_ACEOF" &&
13467   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
13468   echo "_ACEOF"
13469 } >conf$$subs.sh ||
13470   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13471 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
13472 ac_delim='%!_!# '
13473 for ac_last_try in false false false false false :; do
13474   . ./conf$$subs.sh ||
13475     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13476
13477   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
13478   if test $ac_delim_n = $ac_delim_num; then
13479     break
13480   elif $ac_last_try; then
13481     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13482   else
13483     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
13484   fi
13485 done
13486 rm -f conf$$subs.sh
13487
13488 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13489 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
13490 _ACEOF
13491 sed -n '
13492 h
13493 s/^/S["/; s/!.*/"]=/
13494 p
13495 g
13496 s/^[^!]*!//
13497 :repl
13498 t repl
13499 s/'"$ac_delim"'$//
13500 t delim
13501 :nl
13502 h
13503 s/\(.\{148\}\)..*/\1/
13504 t more1
13505 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
13506 p
13507 n
13508 b repl
13509 :more1
13510 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
13511 p
13512 g
13513 s/.\{148\}//
13514 t nl
13515 :delim
13516 h
13517 s/\(.\{148\}\)..*/\1/
13518 t more2
13519 s/["\\]/\\&/g; s/^/"/; s/$/"/
13520 p
13521 b
13522 :more2
13523 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
13524 p
13525 g
13526 s/.\{148\}//
13527 t delim
13528 ' <conf$$subs.awk | sed '
13529 /^[^""]/{
13530   N
13531   s/\n//
13532 }
13533 ' >>$CONFIG_STATUS || ac_write_fail=1
13534 rm -f conf$$subs.awk
13535 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13536 _ACAWK
13537 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
13538   for (key in S) S_is_set[key] = 1
13539   FS = "\a"
13540
13541 }
13542 {
13543   line = $ 0
13544   nfields = split(line, field, "@")
13545   substed = 0
13546   len = length(field[1])
13547   for (i = 2; i < nfields; i++) {
13548     key = field[i]
13549     keylen = length(key)
13550     if (S_is_set[key]) {
13551       value = S[key]
13552       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
13553       len += length(value) + length(field[++i])
13554       substed = 1
13555     } else
13556       len += 1 + keylen
13557   }
13558
13559   print line
13560 }
13561
13562 _ACAWK
13563 _ACEOF
13564 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13565 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
13566   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
13567 else
13568   cat
13569 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
13570   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
13571 _ACEOF
13572
13573 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
13574 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
13575 # trailing colons and then remove the whole line if VPATH becomes empty
13576 # (actually we leave an empty line to preserve line numbers).
13577 if test "x$srcdir" = x.; then
13578   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
13579 h
13580 s///
13581 s/^/:/
13582 s/[      ]*$/:/
13583 s/:\$(srcdir):/:/g
13584 s/:\${srcdir}:/:/g
13585 s/:@srcdir@:/:/g
13586 s/^:*//
13587 s/:*$//
13588 x
13589 s/\(=[   ]*\).*/\1/
13590 G
13591 s/\n//
13592 s/^[^=]*=[       ]*$//
13593 }'
13594 fi
13595
13596 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13597 fi # test -n "$CONFIG_FILES"
13598
13599 # Set up the scripts for CONFIG_HEADERS section.
13600 # No need to generate them if there are no CONFIG_HEADERS.
13601 # This happens for instance with `./config.status Makefile'.
13602 if test -n "$CONFIG_HEADERS"; then
13603 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
13604 BEGIN {
13605 _ACEOF
13606
13607 # Transform confdefs.h into an awk script `defines.awk', embedded as
13608 # here-document in config.status, that substitutes the proper values into
13609 # config.h.in to produce config.h.
13610
13611 # Create a delimiter string that does not exist in confdefs.h, to ease
13612 # handling of long lines.
13613 ac_delim='%!_!# '
13614 for ac_last_try in false false :; do
13615   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
13616   if test -z "$ac_tt"; then
13617     break
13618   elif $ac_last_try; then
13619     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
13620   else
13621     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
13622   fi
13623 done
13624
13625 # For the awk script, D is an array of macro values keyed by name,
13626 # likewise P contains macro parameters if any.  Preserve backslash
13627 # newline sequences.
13628
13629 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
13630 sed -n '
13631 s/.\{148\}/&'"$ac_delim"'/g
13632 t rset
13633 :rset
13634 s/^[     ]*#[    ]*define[       ][      ]*/ /
13635 t def
13636 d
13637 :def
13638 s/\\$//
13639 t bsnl
13640 s/["\\]/\\&/g
13641 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
13642 D["\1"]=" \3"/p
13643 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
13644 d
13645 :bsnl
13646 s/["\\]/\\&/g
13647 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
13648 D["\1"]=" \3\\\\\\n"\\/p
13649 t cont
13650 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
13651 t cont
13652 d
13653 :cont
13654 n
13655 s/.\{148\}/&'"$ac_delim"'/g
13656 t clear
13657 :clear
13658 s/\\$//
13659 t bsnlc
13660 s/["\\]/\\&/g; s/^/"/; s/$/"/p
13661 d
13662 :bsnlc
13663 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
13664 b cont
13665 ' <confdefs.h | sed '
13666 s/'"$ac_delim"'/"\\\
13667 "/g' >>$CONFIG_STATUS || ac_write_fail=1
13668
13669 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13670   for (key in D) D_is_set[key] = 1
13671   FS = "\a"
13672 }
13673 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
13674   line = \$ 0
13675   split(line, arg, " ")
13676   if (arg[1] == "#") {
13677     defundef = arg[2]
13678     mac1 = arg[3]
13679   } else {
13680     defundef = substr(arg[1], 2)
13681     mac1 = arg[2]
13682   }
13683   split(mac1, mac2, "(") #)
13684   macro = mac2[1]
13685   prefix = substr(line, 1, index(line, defundef) - 1)
13686   if (D_is_set[macro]) {
13687     # Preserve the white space surrounding the "#".
13688     print prefix "define", macro P[macro] D[macro]
13689     next
13690   } else {
13691     # Replace #undef with comments.  This is necessary, for example,
13692     # in the case of _POSIX_SOURCE, which is predefined and required
13693     # on some systems where configure will not decide to define it.
13694     if (defundef == "undef") {
13695       print "/*", prefix defundef, macro, "*/"
13696       next
13697     }
13698   }
13699 }
13700 { print }
13701 _ACAWK
13702 _ACEOF
13703 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13704   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
13705 fi # test -n "$CONFIG_HEADERS"
13706
13707
13708 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
13709 shift
13710 for ac_tag
13711 do
13712   case $ac_tag in
13713   :[FHLC]) ac_mode=$ac_tag; continue;;
13714   esac
13715   case $ac_mode$ac_tag in
13716   :[FHL]*:*);;
13717   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
13718   :[FH]-) ac_tag=-:-;;
13719   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
13720   esac
13721   ac_save_IFS=$IFS
13722   IFS=:
13723   set x $ac_tag
13724   IFS=$ac_save_IFS
13725   shift
13726   ac_file=$1
13727   shift
13728
13729   case $ac_mode in
13730   :L) ac_source=$1;;
13731   :[FH])
13732     ac_file_inputs=
13733     for ac_f
13734     do
13735       case $ac_f in
13736       -) ac_f="$ac_tmp/stdin";;
13737       *) # Look for the file first in the build tree, then in the source tree
13738          # (if the path is not absolute).  The absolute path cannot be DOS-style,
13739          # because $ac_f cannot contain `:'.
13740          test -f "$ac_f" ||
13741            case $ac_f in
13742            [\\/$]*) false;;
13743            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
13744            esac ||
13745            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
13746       esac
13747       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
13748       as_fn_append ac_file_inputs " '$ac_f'"
13749     done
13750
13751     # Let's still pretend it is `configure' which instantiates (i.e., don't
13752     # use $as_me), people would be surprised to read:
13753     #    /* config.h.  Generated by config.status.  */
13754     configure_input='Generated from '`
13755           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
13756         `' by configure.'
13757     if test x"$ac_file" != x-; then
13758       configure_input="$ac_file.  $configure_input"
13759       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
13760 $as_echo "$as_me: creating $ac_file" >&6;}
13761     fi
13762     # Neutralize special characters interpreted by sed in replacement strings.
13763     case $configure_input in #(
13764     *\&* | *\|* | *\\* )
13765        ac_sed_conf_input=`$as_echo "$configure_input" |
13766        sed 's/[\\\\&|]/\\\\&/g'`;; #(
13767     *) ac_sed_conf_input=$configure_input;;
13768     esac
13769
13770     case $ac_tag in
13771     *:-:* | *:-) cat >"$ac_tmp/stdin" \
13772       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
13773     esac
13774     ;;
13775   esac
13776
13777   ac_dir=`$as_dirname -- "$ac_file" ||
13778 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13779          X"$ac_file" : 'X\(//\)[^/]' \| \
13780          X"$ac_file" : 'X\(//\)$' \| \
13781          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
13782 $as_echo X"$ac_file" |
13783     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13784             s//\1/
13785             q
13786           }
13787           /^X\(\/\/\)[^/].*/{
13788             s//\1/
13789             q
13790           }
13791           /^X\(\/\/\)$/{
13792             s//\1/
13793             q
13794           }
13795           /^X\(\/\).*/{
13796             s//\1/
13797             q
13798           }
13799           s/.*/./; q'`
13800   as_dir="$ac_dir"; as_fn_mkdir_p
13801   ac_builddir=.
13802
13803 case "$ac_dir" in
13804 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
13805 *)
13806   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
13807   # A ".." for each directory in $ac_dir_suffix.
13808   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
13809   case $ac_top_builddir_sub in
13810   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
13811   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
13812   esac ;;
13813 esac
13814 ac_abs_top_builddir=$ac_pwd
13815 ac_abs_builddir=$ac_pwd$ac_dir_suffix
13816 # for backward compatibility:
13817 ac_top_builddir=$ac_top_build_prefix
13818
13819 case $srcdir in
13820   .)  # We are building in place.
13821     ac_srcdir=.
13822     ac_top_srcdir=$ac_top_builddir_sub
13823     ac_abs_top_srcdir=$ac_pwd ;;
13824   [\\/]* | ?:[\\/]* )  # Absolute name.
13825     ac_srcdir=$srcdir$ac_dir_suffix;
13826     ac_top_srcdir=$srcdir
13827     ac_abs_top_srcdir=$srcdir ;;
13828   *) # Relative name.
13829     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
13830     ac_top_srcdir=$ac_top_build_prefix$srcdir
13831     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
13832 esac
13833 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
13834
13835
13836   case $ac_mode in
13837   :F)
13838   #
13839   # CONFIG_FILE
13840   #
13841
13842 _ACEOF
13843
13844 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13845 # If the template does not know about datarootdir, expand it.
13846 # FIXME: This hack should be removed a few years after 2.60.
13847 ac_datarootdir_hack=; ac_datarootdir_seen=
13848 ac_sed_dataroot='
13849 /datarootdir/ {
13850   p
13851   q
13852 }
13853 /@datadir@/p
13854 /@docdir@/p
13855 /@infodir@/p
13856 /@localedir@/p
13857 /@mandir@/p'
13858 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
13859 *datarootdir*) ac_datarootdir_seen=yes;;
13860 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
13861   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
13862 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
13863 _ACEOF
13864 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13865   ac_datarootdir_hack='
13866   s&@datadir@&$datadir&g
13867   s&@docdir@&$docdir&g
13868   s&@infodir@&$infodir&g
13869   s&@localedir@&$localedir&g
13870   s&@mandir@&$mandir&g
13871   s&\\\${datarootdir}&$datarootdir&g' ;;
13872 esac
13873 _ACEOF
13874
13875 # Neutralize VPATH when `$srcdir' = `.'.
13876 # Shell code in configure.ac might set extrasub.
13877 # FIXME: do we really want to maintain this feature?
13878 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13879 ac_sed_extra="$ac_vpsub
13880 $extrasub
13881 _ACEOF
13882 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13883 :t
13884 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13885 s|@configure_input@|$ac_sed_conf_input|;t t
13886 s&@top_builddir@&$ac_top_builddir_sub&;t t
13887 s&@top_build_prefix@&$ac_top_build_prefix&;t t
13888 s&@srcdir@&$ac_srcdir&;t t
13889 s&@abs_srcdir@&$ac_abs_srcdir&;t t
13890 s&@top_srcdir@&$ac_top_srcdir&;t t
13891 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
13892 s&@builddir@&$ac_builddir&;t t
13893 s&@abs_builddir@&$ac_abs_builddir&;t t
13894 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
13895 $ac_datarootdir_hack
13896 "
13897 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
13898   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13899
13900 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
13901   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
13902   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
13903       "$ac_tmp/out"`; test -z "$ac_out"; } &&
13904   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13905 which seems to be undefined.  Please make sure it is defined" >&5
13906 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13907 which seems to be undefined.  Please make sure it is defined" >&2;}
13908
13909   rm -f "$ac_tmp/stdin"
13910   case $ac_file in
13911   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
13912   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
13913   esac \
13914   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13915  ;;
13916   :H)
13917   #
13918   # CONFIG_HEADER
13919   #
13920   if test x"$ac_file" != x-; then
13921     {
13922       $as_echo "/* $configure_input  */" \
13923       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
13924     } >"$ac_tmp/config.h" \
13925       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13926     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
13927       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
13928 $as_echo "$as_me: $ac_file is unchanged" >&6;}
13929     else
13930       rm -f "$ac_file"
13931       mv "$ac_tmp/config.h" "$ac_file" \
13932         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13933     fi
13934   else
13935     $as_echo "/* $configure_input  */" \
13936       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
13937       || as_fn_error $? "could not create -" "$LINENO" 5
13938   fi
13939  ;;
13940
13941   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
13942 $as_echo "$as_me: executing $ac_file commands" >&6;}
13943  ;;
13944   esac
13945
13946
13947   case $ac_file$ac_mode in
13948     "stamp-h":C) echo timestamp > src/include/stamp-h ;;
13949     "build-radpaths-h":C) (cd ./src/include && /bin/sh ./build-radpaths-h) ;;
13950     "main-chmod":C) (cd ./src/main && chmod +x checkrad radlast radtest) ;;
13951     "scripts-chmod":C) (cd ./scripts && chmod +x rc.radiusd cron/radiusd.cron.daily cron/radiusd.cron.monthly cryptpasswd) ;;
13952
13953   esac
13954 done # for ac_tag
13955
13956
13957 as_fn_exit 0
13958 _ACEOF
13959 ac_clean_files=$ac_clean_files_save
13960
13961 test $ac_write_fail = 0 ||
13962   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
13963
13964
13965 # configure is writing to config.log, and then calls config.status.
13966 # config.status does its own redirection, appending to config.log.
13967 # Unfortunately, on DOS this fails, as config.log is still kept open
13968 # by configure, so config.status won't be able to write to it; its
13969 # output is simply discarded.  So we exec the FD to /dev/null,
13970 # effectively closing config.log, so it can be properly (re)opened and
13971 # appended to by config.status.  When coming back to configure, we
13972 # need to make the FD available again.
13973 if test "$no_create" != yes; then
13974   ac_cs_success=:
13975   ac_config_status_args=
13976   test "$silent" = yes &&
13977     ac_config_status_args="$ac_config_status_args --quiet"
13978   exec 5>/dev/null
13979   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
13980   exec 5>>config.log
13981   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13982   # would make configure fail if this is the last instruction.
13983   $ac_cs_success || as_fn_exit 1
13984 fi
13985
13986 #
13987 # CONFIG_SUBDIRS section.
13988 #
13989 if test "$no_recursion" != yes; then
13990
13991   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
13992   # so they do not pile up.
13993   ac_sub_configure_args=
13994   ac_prev=
13995   eval "set x $ac_configure_args"
13996   shift
13997   for ac_arg
13998   do
13999     if test -n "$ac_prev"; then
14000       ac_prev=
14001       continue
14002     fi
14003     case $ac_arg in
14004     -cache-file | --cache-file | --cache-fil | --cache-fi \
14005     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
14006       ac_prev=cache_file ;;
14007     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
14008     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
14009     | --c=*)
14010       ;;
14011     --config-cache | -C)
14012       ;;
14013     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
14014       ac_prev=srcdir ;;
14015     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
14016       ;;
14017     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
14018       ac_prev=prefix ;;
14019     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
14020       ;;
14021     --disable-option-checking)
14022       ;;
14023     *)
14024       case $ac_arg in
14025       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
14026       esac
14027       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
14028     esac
14029   done
14030
14031   # Always prepend --prefix to ensure using the same prefix
14032   # in subdir configurations.
14033   ac_arg="--prefix=$prefix"
14034   case $ac_arg in
14035   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
14036   esac
14037   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
14038
14039   # Pass --silent
14040   if test "$silent" = yes; then
14041     ac_sub_configure_args="--silent $ac_sub_configure_args"
14042   fi
14043
14044   # Always prepend --disable-option-checking to silence warnings, since
14045   # different subdirs can have different --enable and --with options.
14046   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
14047
14048   ac_popdir=`pwd`
14049   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
14050
14051     # Do not complain, so a configure script can configure whichever
14052     # parts of a large source tree are present.
14053     test -d "$srcdir/$ac_dir" || continue
14054
14055     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
14056     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
14057     $as_echo "$ac_msg" >&6
14058     as_dir="$ac_dir"; as_fn_mkdir_p
14059     ac_builddir=.
14060
14061 case "$ac_dir" in
14062 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14063 *)
14064   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14065   # A ".." for each directory in $ac_dir_suffix.
14066   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14067   case $ac_top_builddir_sub in
14068   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14069   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14070   esac ;;
14071 esac
14072 ac_abs_top_builddir=$ac_pwd
14073 ac_abs_builddir=$ac_pwd$ac_dir_suffix
14074 # for backward compatibility:
14075 ac_top_builddir=$ac_top_build_prefix
14076
14077 case $srcdir in
14078   .)  # We are building in place.
14079     ac_srcdir=.
14080     ac_top_srcdir=$ac_top_builddir_sub
14081     ac_abs_top_srcdir=$ac_pwd ;;
14082   [\\/]* | ?:[\\/]* )  # Absolute name.
14083     ac_srcdir=$srcdir$ac_dir_suffix;
14084     ac_top_srcdir=$srcdir
14085     ac_abs_top_srcdir=$srcdir ;;
14086   *) # Relative name.
14087     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14088     ac_top_srcdir=$ac_top_build_prefix$srcdir
14089     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
14090 esac
14091 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
14092
14093
14094     cd "$ac_dir"
14095
14096     # Check for guested configure; otherwise get Cygnus style configure.
14097     if test -f "$ac_srcdir/configure.gnu"; then
14098       ac_sub_configure=$ac_srcdir/configure.gnu
14099     elif test -f "$ac_srcdir/configure"; then
14100       ac_sub_configure=$ac_srcdir/configure
14101     elif test -f "$ac_srcdir/configure.in"; then
14102       # This should be Cygnus configure.
14103       ac_sub_configure=$ac_aux_dir/configure
14104     else
14105       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
14106 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
14107       ac_sub_configure=
14108     fi
14109
14110     # The recursion is here.
14111     if test -n "$ac_sub_configure"; then
14112       # Make the cache file name correct relative to the subdirectory.
14113       case $cache_file in
14114       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
14115       *) # Relative name.
14116         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
14117       esac
14118
14119       { $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
14120 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
14121       # The eval makes quoting arguments work.
14122       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
14123            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
14124         as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
14125     fi
14126
14127     cd "$ac_popdir"
14128   done
14129 fi
14130 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14131   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14132 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
14133 fi
14134
14135