Removed iodbc configuration checks from the top-level 'configure'
[freeradius.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-shared[=PKGS]  build shared libraries [default=yes]"
16 ac_help="$ac_help
17   --enable-static[=PKGS]  build static libraries [default=yes]"
18 ac_help="$ac_help
19   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
20 ac_help="$ac_help
21   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
22 ac_help="$ac_help
23   --disable-libtool-lock  avoid locking (might break parallel builds)"
24 ac_help="$ac_help
25   --enable-strict-dependencies  Fail configure on lack of module dependancy."
26 ac_help="$ac_help
27   --with-logdir=DIR       Directory for logfiles [LOCALSTATEDIR/log/radius] "
28 ac_help="$ac_help
29   --with-radacctdir=PATH  Directory for detail files [LOGDIR/radacct] "
30 ac_help="$ac_help
31   --with-raddbdir=DIR     Directory for config files [SYSCONFDIR/raddb] "
32 ac_help="$ac_help
33   --with-dict-nocase      Make dictionary case-independant (default=yes)"
34 ac_help="$ac_help
35   --with-ascend-binary    Include support for Ascend binary filter attributes (default=yes)"
36 ac_help="$ac_help
37   --with-threads          Use threads, if available.  (default=yes) "
38 ac_help="$ac_help
39   --with-snmp             Compile in SNMP support. (default=yes)"
40 ac_help="$ac_help
41   --disable-ltdl-install  do not install libltdl"
42 ac_help="$ac_help
43   --with-static-modules=QUOTED-MODULE-LIST"
44 ac_help="$ac_help
45   --enable-developer               Enables features of interest to developers."
46 ac_help="$ac_help
47   --with-experimental-modules      Use experimental and unstable modules. (default=no) "
48 ac_help="$ac_help
49   --with-rlm-FOO-lib-dir=DIR       Directory to look for library files used by module FOO"
50 ac_help="$ac_help
51   --with-rlm-FOO-include-dir=DIR   Directory to look for include files used by module FOO"
52
53 # Initialize some variables set by options.
54 # The variables have the same names as the options, with
55 # dashes changed to underlines.
56 build=NONE
57 cache_file=./config.cache
58 exec_prefix=NONE
59 host=NONE
60 no_create=
61 nonopt=NONE
62 no_recursion=
63 prefix=NONE
64 program_prefix=NONE
65 program_suffix=NONE
66 program_transform_name=s,x,x,
67 silent=
68 site=
69 srcdir=
70 target=NONE
71 verbose=
72 x_includes=NONE
73 x_libraries=NONE
74 bindir='${exec_prefix}/bin'
75 sbindir='${exec_prefix}/sbin'
76 libexecdir='${exec_prefix}/libexec'
77 datadir='${prefix}/share'
78 sysconfdir='${prefix}/etc'
79 sharedstatedir='${prefix}/com'
80 localstatedir='${prefix}/var'
81 libdir='${exec_prefix}/lib'
82 includedir='${prefix}/include'
83 oldincludedir='/usr/include'
84 infodir='${prefix}/info'
85 mandir='${prefix}/man'
86
87 # Initialize some other variables.
88 subdirs=
89 MFLAGS= MAKEFLAGS=
90 SHELL=${CONFIG_SHELL-/bin/sh}
91 # Maximum number of lines to put in a shell here document.
92 ac_max_here_lines=12
93
94 ac_prev=
95 for ac_option
96 do
97
98   # If the previous option needs an argument, assign it.
99   if test -n "$ac_prev"; then
100     eval "$ac_prev=\$ac_option"
101     ac_prev=
102     continue
103   fi
104
105   case "$ac_option" in
106   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
107   *) ac_optarg= ;;
108   esac
109
110   # Accept the important Cygnus configure options, so we can diagnose typos.
111
112   case "$ac_option" in
113
114   -bindir | --bindir | --bindi | --bind | --bin | --bi)
115     ac_prev=bindir ;;
116   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
117     bindir="$ac_optarg" ;;
118
119   -build | --build | --buil | --bui | --bu)
120     ac_prev=build ;;
121   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
122     build="$ac_optarg" ;;
123
124   -cache-file | --cache-file | --cache-fil | --cache-fi \
125   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
126     ac_prev=cache_file ;;
127   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
128   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
129     cache_file="$ac_optarg" ;;
130
131   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
132     ac_prev=datadir ;;
133   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
134   | --da=*)
135     datadir="$ac_optarg" ;;
136
137   -disable-* | --disable-*)
138     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
139     # Reject names that are not valid shell variable names.
140     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
141       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
142     fi
143     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
144     eval "enable_${ac_feature}=no" ;;
145
146   -enable-* | --enable-*)
147     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
148     # Reject names that are not valid shell variable names.
149     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
150       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
151     fi
152     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
153     case "$ac_option" in
154       *=*) ;;
155       *) ac_optarg=yes ;;
156     esac
157     eval "enable_${ac_feature}='$ac_optarg'" ;;
158
159   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
160   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
161   | --exec | --exe | --ex)
162     ac_prev=exec_prefix ;;
163   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
164   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
165   | --exec=* | --exe=* | --ex=*)
166     exec_prefix="$ac_optarg" ;;
167
168   -gas | --gas | --ga | --g)
169     # Obsolete; use --with-gas.
170     with_gas=yes ;;
171
172   -help | --help | --hel | --he)
173     # Omit some internal or obsolete options to make the list less imposing.
174     # This message is too long to be a string in the A/UX 3.1 sh.
175     cat << EOF
176 Usage: configure [options] [host]
177 Options: [defaults in brackets after descriptions]
178 Configuration:
179   --cache-file=FILE       cache test results in FILE
180   --help                  print this message
181   --no-create             do not create output files
182   --quiet, --silent       do not print \`checking...' messages
183   --version               print the version of autoconf that created configure
184 Directory and file names:
185   --prefix=PREFIX         install architecture-independent files in PREFIX
186                           [$ac_default_prefix]
187   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
188                           [same as prefix]
189   --bindir=DIR            user executables in DIR [EPREFIX/bin]
190   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
191   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
192   --datadir=DIR           read-only architecture-independent data in DIR
193                           [PREFIX/share]
194   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
195   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
196                           [PREFIX/com]
197   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
198   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
199   --includedir=DIR        C header files in DIR [PREFIX/include]
200   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
201   --infodir=DIR           info documentation in DIR [PREFIX/info]
202   --mandir=DIR            man documentation in DIR [PREFIX/man]
203   --srcdir=DIR            find the sources in DIR [configure dir or ..]
204   --program-prefix=PREFIX prepend PREFIX to installed program names
205   --program-suffix=SUFFIX append SUFFIX to installed program names
206   --program-transform-name=PROGRAM
207                           run sed PROGRAM on installed program names
208 EOF
209     cat << EOF
210 Host type:
211   --build=BUILD           configure for building on BUILD [BUILD=HOST]
212   --host=HOST             configure for HOST [guessed]
213   --target=TARGET         configure for TARGET [TARGET=HOST]
214 Features and packages:
215   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
216   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
217   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
218   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
219   --x-includes=DIR        X include files are in DIR
220   --x-libraries=DIR       X library files are in DIR
221 EOF
222     if test -n "$ac_help"; then
223       echo "--enable and --with options recognized:$ac_help"
224     fi
225     exit 0 ;;
226
227   -host | --host | --hos | --ho)
228     ac_prev=host ;;
229   -host=* | --host=* | --hos=* | --ho=*)
230     host="$ac_optarg" ;;
231
232   -includedir | --includedir | --includedi | --included | --include \
233   | --includ | --inclu | --incl | --inc)
234     ac_prev=includedir ;;
235   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
236   | --includ=* | --inclu=* | --incl=* | --inc=*)
237     includedir="$ac_optarg" ;;
238
239   -infodir | --infodir | --infodi | --infod | --info | --inf)
240     ac_prev=infodir ;;
241   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
242     infodir="$ac_optarg" ;;
243
244   -libdir | --libdir | --libdi | --libd)
245     ac_prev=libdir ;;
246   -libdir=* | --libdir=* | --libdi=* | --libd=*)
247     libdir="$ac_optarg" ;;
248
249   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
250   | --libexe | --libex | --libe)
251     ac_prev=libexecdir ;;
252   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
253   | --libexe=* | --libex=* | --libe=*)
254     libexecdir="$ac_optarg" ;;
255
256   -localstatedir | --localstatedir | --localstatedi | --localstated \
257   | --localstate | --localstat | --localsta | --localst \
258   | --locals | --local | --loca | --loc | --lo)
259     ac_prev=localstatedir ;;
260   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
261   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
262   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
263     localstatedir="$ac_optarg" ;;
264
265   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
266     ac_prev=mandir ;;
267   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
268     mandir="$ac_optarg" ;;
269
270   -nfp | --nfp | --nf)
271     # Obsolete; use --without-fp.
272     with_fp=no ;;
273
274   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
275   | --no-cr | --no-c)
276     no_create=yes ;;
277
278   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
279   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
280     no_recursion=yes ;;
281
282   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
283   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
284   | --oldin | --oldi | --old | --ol | --o)
285     ac_prev=oldincludedir ;;
286   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
287   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
288   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
289     oldincludedir="$ac_optarg" ;;
290
291   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
292     ac_prev=prefix ;;
293   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
294     prefix="$ac_optarg" ;;
295
296   -program-prefix | --program-prefix | --program-prefi | --program-pref \
297   | --program-pre | --program-pr | --program-p)
298     ac_prev=program_prefix ;;
299   -program-prefix=* | --program-prefix=* | --program-prefi=* \
300   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
301     program_prefix="$ac_optarg" ;;
302
303   -program-suffix | --program-suffix | --program-suffi | --program-suff \
304   | --program-suf | --program-su | --program-s)
305     ac_prev=program_suffix ;;
306   -program-suffix=* | --program-suffix=* | --program-suffi=* \
307   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
308     program_suffix="$ac_optarg" ;;
309
310   -program-transform-name | --program-transform-name \
311   | --program-transform-nam | --program-transform-na \
312   | --program-transform-n | --program-transform- \
313   | --program-transform | --program-transfor \
314   | --program-transfo | --program-transf \
315   | --program-trans | --program-tran \
316   | --progr-tra | --program-tr | --program-t)
317     ac_prev=program_transform_name ;;
318   -program-transform-name=* | --program-transform-name=* \
319   | --program-transform-nam=* | --program-transform-na=* \
320   | --program-transform-n=* | --program-transform-=* \
321   | --program-transform=* | --program-transfor=* \
322   | --program-transfo=* | --program-transf=* \
323   | --program-trans=* | --program-tran=* \
324   | --progr-tra=* | --program-tr=* | --program-t=*)
325     program_transform_name="$ac_optarg" ;;
326
327   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
328   | -silent | --silent | --silen | --sile | --sil)
329     silent=yes ;;
330
331   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
332     ac_prev=sbindir ;;
333   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
334   | --sbi=* | --sb=*)
335     sbindir="$ac_optarg" ;;
336
337   -sharedstatedir | --sharedstatedir | --sharedstatedi \
338   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
339   | --sharedst | --shareds | --shared | --share | --shar \
340   | --sha | --sh)
341     ac_prev=sharedstatedir ;;
342   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
343   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
344   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
345   | --sha=* | --sh=*)
346     sharedstatedir="$ac_optarg" ;;
347
348   -site | --site | --sit)
349     ac_prev=site ;;
350   -site=* | --site=* | --sit=*)
351     site="$ac_optarg" ;;
352
353   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
354     ac_prev=srcdir ;;
355   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
356     srcdir="$ac_optarg" ;;
357
358   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
359   | --syscon | --sysco | --sysc | --sys | --sy)
360     ac_prev=sysconfdir ;;
361   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
362   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
363     sysconfdir="$ac_optarg" ;;
364
365   -target | --target | --targe | --targ | --tar | --ta | --t)
366     ac_prev=target ;;
367   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
368     target="$ac_optarg" ;;
369
370   -v | -verbose | --verbose | --verbos | --verbo | --verb)
371     verbose=yes ;;
372
373   -version | --version | --versio | --versi | --vers)
374     echo "configure generated by autoconf version 2.13"
375     exit 0 ;;
376
377   -with-* | --with-*)
378     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
379     # Reject names that are not valid shell variable names.
380     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
381       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
382     fi
383     ac_package=`echo $ac_package| sed 's/-/_/g'`
384     case "$ac_option" in
385       *=*) ;;
386       *) ac_optarg=yes ;;
387     esac
388     eval "with_${ac_package}='$ac_optarg'" ;;
389
390   -without-* | --without-*)
391     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
392     # Reject names that are not valid shell variable names.
393     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
394       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
395     fi
396     ac_package=`echo $ac_package| sed 's/-/_/g'`
397     eval "with_${ac_package}=no" ;;
398
399   --x)
400     # Obsolete; use --with-x.
401     with_x=yes ;;
402
403   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
404   | --x-incl | --x-inc | --x-in | --x-i)
405     ac_prev=x_includes ;;
406   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
407   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
408     x_includes="$ac_optarg" ;;
409
410   -x-libraries | --x-libraries | --x-librarie | --x-librari \
411   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
412     ac_prev=x_libraries ;;
413   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
414   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
415     x_libraries="$ac_optarg" ;;
416
417   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
418     ;;
419
420   *)
421     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
422       echo "configure: warning: $ac_option: invalid host type" 1>&2
423     fi
424     if test "x$nonopt" != xNONE; then
425       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
426     fi
427     nonopt="$ac_option"
428     ;;
429
430   esac
431 done
432
433 if test -n "$ac_prev"; then
434   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
435 fi
436
437 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
438
439 # File descriptor usage:
440 # 0 standard input
441 # 1 file creation
442 # 2 errors and warnings
443 # 3 some systems may open it to /dev/tty
444 # 4 used on the Kubota Titan
445 # 6 checking for... messages and results
446 # 5 compiler messages saved in config.log
447 if test "$silent" = yes; then
448   exec 6>/dev/null
449 else
450   exec 6>&1
451 fi
452 exec 5>./config.log
453
454 echo "\
455 This file contains any messages produced by compilers while
456 running configure, to aid debugging if configure makes a mistake.
457 " 1>&5
458
459 # Strip out --no-create and --no-recursion so they do not pile up.
460 # Also quote any args containing shell metacharacters.
461 ac_configure_args=
462 for ac_arg
463 do
464   case "$ac_arg" in
465   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
466   | --no-cr | --no-c) ;;
467   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
468   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
469   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
470   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
471   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
472   esac
473 done
474
475 # NLS nuisances.
476 # Only set these to C if already set.  These must not be set unconditionally
477 # because not all systems understand e.g. LANG=C (notably SCO).
478 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
479 # Non-C LC_CTYPE values break the ctype check.
480 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
481 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
482 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
483 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
484
485 # confdefs.h avoids OS command line length limits that DEFS can exceed.
486 rm -rf conftest* confdefs.h
487 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
488 echo > confdefs.h
489
490 # A filename unique to this package, relative to the directory that
491 # configure is in, which we can look for to find out if srcdir is correct.
492 ac_unique_file=src/main/radiusd.c
493
494 # Find the source files, if location was not specified.
495 if test -z "$srcdir"; then
496   ac_srcdir_defaulted=yes
497   # Try the directory containing this script, then its parent.
498   ac_prog=$0
499   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
500   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
501   srcdir=$ac_confdir
502   if test ! -r $srcdir/$ac_unique_file; then
503     srcdir=..
504   fi
505 else
506   ac_srcdir_defaulted=no
507 fi
508 if test ! -r $srcdir/$ac_unique_file; then
509   if test "$ac_srcdir_defaulted" = yes; then
510     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
511   else
512     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
513   fi
514 fi
515 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
516
517 # Prefer explicitly selected file to automatically selected ones.
518 if test -z "$CONFIG_SITE"; then
519   if test "x$prefix" != xNONE; then
520     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
521   else
522     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
523   fi
524 fi
525 for ac_site_file in $CONFIG_SITE; do
526   if test -r "$ac_site_file"; then
527     echo "loading site script $ac_site_file"
528     . "$ac_site_file"
529   fi
530 done
531
532 if test -r "$cache_file"; then
533   echo "loading cache $cache_file"
534   . $cache_file
535 else
536   echo "creating cache $cache_file"
537   > $cache_file
538 fi
539
540 ac_ext=c
541 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
542 ac_cpp='$CPP $CPPFLAGS'
543 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
544 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
545 cross_compiling=$ac_cv_prog_cc_cross
546
547 ac_exeext=
548 ac_objext=o
549 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
550   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
551   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
552     ac_n= ac_c='
553 ' ac_t='        '
554   else
555     ac_n=-n ac_c= ac_t=
556   fi
557 else
558   ac_n= ac_c='\c' ac_t=
559 fi
560
561
562
563 # From configure.in Revision: 1.150 
564 RADIUSD_MAJOR_VERSION=0
565 RADIUSD_MINOR_VERSION=6
566 RADIUSD_VERSION="${RADIUSD_MAJOR_VERSION}.${RADIUSD_MINOR_VERSION}"
567
568
569 # Extract the first word of "gcc", so it can be a program name with args.
570 set dummy gcc; ac_word=$2
571 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
572 echo "configure:573: checking for $ac_word" >&5
573 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
574   echo $ac_n "(cached) $ac_c" 1>&6
575 else
576   if test -n "$CC"; then
577   ac_cv_prog_CC="$CC" # Let the user override the test.
578 else
579   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
580   ac_dummy="$PATH"
581   for ac_dir in $ac_dummy; do
582     test -z "$ac_dir" && ac_dir=.
583     if test -f $ac_dir/$ac_word; then
584       ac_cv_prog_CC="gcc"
585       break
586     fi
587   done
588   IFS="$ac_save_ifs"
589 fi
590 fi
591 CC="$ac_cv_prog_CC"
592 if test -n "$CC"; then
593   echo "$ac_t""$CC" 1>&6
594 else
595   echo "$ac_t""no" 1>&6
596 fi
597
598 if test -z "$CC"; then
599   # Extract the first word of "cc", so it can be a program name with args.
600 set dummy cc; ac_word=$2
601 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
602 echo "configure:603: checking for $ac_word" >&5
603 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
604   echo $ac_n "(cached) $ac_c" 1>&6
605 else
606   if test -n "$CC"; then
607   ac_cv_prog_CC="$CC" # Let the user override the test.
608 else
609   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
610   ac_prog_rejected=no
611   ac_dummy="$PATH"
612   for ac_dir in $ac_dummy; do
613     test -z "$ac_dir" && ac_dir=.
614     if test -f $ac_dir/$ac_word; then
615       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
616         ac_prog_rejected=yes
617         continue
618       fi
619       ac_cv_prog_CC="cc"
620       break
621     fi
622   done
623   IFS="$ac_save_ifs"
624 if test $ac_prog_rejected = yes; then
625   # We found a bogon in the path, so make sure we never use it.
626   set dummy $ac_cv_prog_CC
627   shift
628   if test $# -gt 0; then
629     # We chose a different compiler from the bogus one.
630     # However, it has the same basename, so the bogon will be chosen
631     # first if we set CC to just the basename; use the full file name.
632     shift
633     set dummy "$ac_dir/$ac_word" "$@"
634     shift
635     ac_cv_prog_CC="$@"
636   fi
637 fi
638 fi
639 fi
640 CC="$ac_cv_prog_CC"
641 if test -n "$CC"; then
642   echo "$ac_t""$CC" 1>&6
643 else
644   echo "$ac_t""no" 1>&6
645 fi
646
647   if test -z "$CC"; then
648     case "`uname -s`" in
649     *win32* | *WIN32*)
650       # Extract the first word of "cl", so it can be a program name with args.
651 set dummy cl; ac_word=$2
652 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
653 echo "configure:654: checking for $ac_word" >&5
654 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
655   echo $ac_n "(cached) $ac_c" 1>&6
656 else
657   if test -n "$CC"; then
658   ac_cv_prog_CC="$CC" # Let the user override the test.
659 else
660   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
661   ac_dummy="$PATH"
662   for ac_dir in $ac_dummy; do
663     test -z "$ac_dir" && ac_dir=.
664     if test -f $ac_dir/$ac_word; then
665       ac_cv_prog_CC="cl"
666       break
667     fi
668   done
669   IFS="$ac_save_ifs"
670 fi
671 fi
672 CC="$ac_cv_prog_CC"
673 if test -n "$CC"; then
674   echo "$ac_t""$CC" 1>&6
675 else
676   echo "$ac_t""no" 1>&6
677 fi
678  ;;
679     esac
680   fi
681   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
682 fi
683
684 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
685 echo "configure:686: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
686
687 ac_ext=c
688 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
689 ac_cpp='$CPP $CPPFLAGS'
690 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
691 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
692 cross_compiling=$ac_cv_prog_cc_cross
693
694 cat > conftest.$ac_ext << EOF
695
696 #line 697 "configure"
697 #include "confdefs.h"
698
699 main(){return(0);}
700 EOF
701 if { (eval echo configure:702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
702   ac_cv_prog_cc_works=yes
703   # If we can't run a trivial program, we are probably using a cross compiler.
704   if (./conftest; exit) 2>/dev/null; then
705     ac_cv_prog_cc_cross=no
706   else
707     ac_cv_prog_cc_cross=yes
708   fi
709 else
710   echo "configure: failed program was:" >&5
711   cat conftest.$ac_ext >&5
712   ac_cv_prog_cc_works=no
713 fi
714 rm -fr conftest*
715 ac_ext=c
716 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
717 ac_cpp='$CPP $CPPFLAGS'
718 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
719 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
720 cross_compiling=$ac_cv_prog_cc_cross
721
722 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
723 if test $ac_cv_prog_cc_works = no; then
724   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
725 fi
726 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
727 echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
728 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
729 cross_compiling=$ac_cv_prog_cc_cross
730
731 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
732 echo "configure:733: checking whether we are using GNU C" >&5
733 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
734   echo $ac_n "(cached) $ac_c" 1>&6
735 else
736   cat > conftest.c <<EOF
737 #ifdef __GNUC__
738   yes;
739 #endif
740 EOF
741 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
742   ac_cv_prog_gcc=yes
743 else
744   ac_cv_prog_gcc=no
745 fi
746 fi
747
748 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
749
750 if test $ac_cv_prog_gcc = yes; then
751   GCC=yes
752 else
753   GCC=
754 fi
755
756 ac_test_CFLAGS="${CFLAGS+set}"
757 ac_save_CFLAGS="$CFLAGS"
758 CFLAGS=
759 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
760 echo "configure:761: checking whether ${CC-cc} accepts -g" >&5
761 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
762   echo $ac_n "(cached) $ac_c" 1>&6
763 else
764   echo 'void f(){}' > conftest.c
765 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
766   ac_cv_prog_cc_g=yes
767 else
768   ac_cv_prog_cc_g=no
769 fi
770 rm -f conftest*
771
772 fi
773
774 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
775 if test "$ac_test_CFLAGS" = set; then
776   CFLAGS="$ac_save_CFLAGS"
777 elif test $ac_cv_prog_cc_g = yes; then
778   if test "$GCC" = yes; then
779     CFLAGS="-g -O2"
780   else
781     CFLAGS="-g"
782   fi
783 else
784   if test "$GCC" = yes; then
785     CFLAGS="-O2"
786   else
787     CFLAGS=
788   fi
789 fi
790
791 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
792 echo "configure:793: checking how to run the C preprocessor" >&5
793 # On Suns, sometimes $CPP names a directory.
794 if test -n "$CPP" && test -d "$CPP"; then
795   CPP=
796 fi
797 if test -z "$CPP"; then
798 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
799   echo $ac_n "(cached) $ac_c" 1>&6
800 else
801     # This must be in double quotes, not single quotes, because CPP may get
802   # substituted into the Makefile and "${CC-cc}" will confuse make.
803   CPP="${CC-cc} -E"
804   # On the NeXT, cc -E runs the code through the compiler's parser,
805   # not just through cpp.
806   cat > conftest.$ac_ext <<EOF
807 #line 808 "configure"
808 #include "confdefs.h"
809 #include <assert.h>
810 Syntax Error
811 EOF
812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
813 { (eval echo configure:814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
815 if test -z "$ac_err"; then
816   :
817 else
818   echo "$ac_err" >&5
819   echo "configure: failed program was:" >&5
820   cat conftest.$ac_ext >&5
821   rm -rf conftest*
822   CPP="${CC-cc} -E -traditional-cpp"
823   cat > conftest.$ac_ext <<EOF
824 #line 825 "configure"
825 #include "confdefs.h"
826 #include <assert.h>
827 Syntax Error
828 EOF
829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
830 { (eval echo configure:831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
832 if test -z "$ac_err"; then
833   :
834 else
835   echo "$ac_err" >&5
836   echo "configure: failed program was:" >&5
837   cat conftest.$ac_ext >&5
838   rm -rf conftest*
839   CPP="${CC-cc} -nologo -E"
840   cat > conftest.$ac_ext <<EOF
841 #line 842 "configure"
842 #include "confdefs.h"
843 #include <assert.h>
844 Syntax Error
845 EOF
846 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
847 { (eval echo configure:848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
848 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
849 if test -z "$ac_err"; then
850   :
851 else
852   echo "$ac_err" >&5
853   echo "configure: failed program was:" >&5
854   cat conftest.$ac_ext >&5
855   rm -rf conftest*
856   CPP=/lib/cpp
857 fi
858 rm -f conftest*
859 fi
860 rm -f conftest*
861 fi
862 rm -f conftest*
863   ac_cv_prog_CPP="$CPP"
864 fi
865   CPP="$ac_cv_prog_CPP"
866 else
867   ac_cv_prog_CPP="$CPP"
868 fi
869 echo "$ac_t""$CPP" 1>&6
870
871 if test $ac_cv_prog_gcc = yes; then
872     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
873 echo "configure:874: checking whether ${CC-cc} needs -traditional" >&5
874 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
875   echo $ac_n "(cached) $ac_c" 1>&6
876 else
877     ac_pattern="Autoconf.*'x'"
878   cat > conftest.$ac_ext <<EOF
879 #line 880 "configure"
880 #include "confdefs.h"
881 #include <sgtty.h>
882 Autoconf TIOCGETP
883 EOF
884 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
885   egrep "$ac_pattern" >/dev/null 2>&1; then
886   rm -rf conftest*
887   ac_cv_prog_gcc_traditional=yes
888 else
889   rm -rf conftest*
890   ac_cv_prog_gcc_traditional=no
891 fi
892 rm -f conftest*
893
894
895   if test $ac_cv_prog_gcc_traditional = no; then
896     cat > conftest.$ac_ext <<EOF
897 #line 898 "configure"
898 #include "confdefs.h"
899 #include <termio.h>
900 Autoconf TCGETA
901 EOF
902 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
903   egrep "$ac_pattern" >/dev/null 2>&1; then
904   rm -rf conftest*
905   ac_cv_prog_gcc_traditional=yes
906 fi
907 rm -f conftest*
908
909   fi
910 fi
911
912 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
913   if test $ac_cv_prog_gcc_traditional = yes; then
914     CC="$CC -traditional"
915   fi
916 fi
917
918 echo $ac_n "checking whether we are using SUNPro C""... $ac_c" 1>&6
919 echo "configure:920: checking whether we are using SUNPro C" >&5
920 if eval "test \"`echo '$''{'ac_cv_prog_suncc'+set}'`\" = set"; then
921   echo $ac_n "(cached) $ac_c" 1>&6
922 else
923   cat > conftest.c <<EOF
924 #ifdef __SUNPRO_C
925   yes;
926 #endif
927 EOF
928 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
929   ac_cv_prog_suncc=yes
930 else
931   ac_cv_prog_suncc=no
932 fi
933 fi
934
935 echo "$ac_t""$ac_cv_prog_suncc" 1>&6
936 # Extract the first word of "ranlib", so it can be a program name with args.
937 set dummy ranlib; ac_word=$2
938 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
939 echo "configure:940: checking for $ac_word" >&5
940 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
941   echo $ac_n "(cached) $ac_c" 1>&6
942 else
943   if test -n "$RANLIB"; then
944   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
945 else
946   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
947   ac_dummy="$PATH"
948   for ac_dir in $ac_dummy; do
949     test -z "$ac_dir" && ac_dir=.
950     if test -f $ac_dir/$ac_word; then
951       ac_cv_prog_RANLIB="ranlib"
952       break
953     fi
954   done
955   IFS="$ac_save_ifs"
956   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
957 fi
958 fi
959 RANLIB="$ac_cv_prog_RANLIB"
960 if test -n "$RANLIB"; then
961   echo "$ac_t""$RANLIB" 1>&6
962 else
963   echo "$ac_t""no" 1>&6
964 fi
965
966
967 PACKAGE=freeradius
968
969 # Extract the first word of "gmake", so it can be a program name with args.
970 set dummy gmake; ac_word=$2
971 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
972 echo "configure:973: checking for $ac_word" >&5
973 if eval "test \"`echo '$''{'ac_cv_prog_GMAKE'+set}'`\" = set"; then
974   echo $ac_n "(cached) $ac_c" 1>&6
975 else
976   if test -n "$GMAKE"; then
977   ac_cv_prog_GMAKE="$GMAKE" # Let the user override the test.
978 else
979   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
980   ac_dummy="$PATH"
981   for ac_dir in $ac_dummy; do
982     test -z "$ac_dir" && ac_dir=.
983     if test -f $ac_dir/$ac_word; then
984       ac_cv_prog_GMAKE="yes"
985       break
986     fi
987   done
988   IFS="$ac_save_ifs"
989   test -z "$ac_cv_prog_GMAKE" && ac_cv_prog_GMAKE="no"
990 fi
991 fi
992 GMAKE="$ac_cv_prog_GMAKE"
993 if test -n "$GMAKE"; then
994   echo "$ac_t""$GMAKE" 1>&6
995 else
996   echo "$ac_t""no" 1>&6
997 fi
998
999 if test $GMAKE = no; then
1000   # Extract the first word of "make", so it can be a program name with args.
1001 set dummy make; ac_word=$2
1002 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1003 echo "configure:1004: checking for $ac_word" >&5
1004 if eval "test \"`echo '$''{'ac_cv_path_MAKE'+set}'`\" = set"; then
1005   echo $ac_n "(cached) $ac_c" 1>&6
1006 else
1007   case "$MAKE" in
1008   /*)
1009   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
1010   ;;
1011   ?:/*)                  
1012   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a dos path.
1013   ;;
1014   *)
1015   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1016   ac_dummy="$PATH"
1017   for ac_dir in $ac_dummy; do 
1018     test -z "$ac_dir" && ac_dir=.
1019     if test -f $ac_dir/$ac_word; then
1020       ac_cv_path_MAKE="$ac_dir/$ac_word"
1021       break
1022     fi
1023   done
1024   IFS="$ac_save_ifs"
1025   test -z "$ac_cv_path_MAKE" && ac_cv_path_MAKE="/usr/local/bin/make"
1026   ;;
1027 esac
1028 fi
1029 MAKE="$ac_cv_path_MAKE"
1030 if test -n "$MAKE"; then
1031   echo "$ac_t""$MAKE" 1>&6
1032 else
1033   echo "$ac_t""no" 1>&6
1034 fi
1035
1036 else
1037   # Extract the first word of "gmake", so it can be a program name with args.
1038 set dummy gmake; ac_word=$2
1039 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1040 echo "configure:1041: checking for $ac_word" >&5
1041 if eval "test \"`echo '$''{'ac_cv_path_MAKE'+set}'`\" = set"; then
1042   echo $ac_n "(cached) $ac_c" 1>&6
1043 else
1044   case "$MAKE" in
1045   /*)
1046   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
1047   ;;
1048   ?:/*)                  
1049   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a dos path.
1050   ;;
1051   *)
1052   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1053   ac_dummy="$PATH"
1054   for ac_dir in $ac_dummy; do 
1055     test -z "$ac_dir" && ac_dir=.
1056     if test -f $ac_dir/$ac_word; then
1057       ac_cv_path_MAKE="$ac_dir/$ac_word"
1058       break
1059     fi
1060   done
1061   IFS="$ac_save_ifs"
1062   test -z "$ac_cv_path_MAKE" && ac_cv_path_MAKE="/usr/local/gnu/bin/make"
1063   ;;
1064 esac
1065 fi
1066 MAKE="$ac_cv_path_MAKE"
1067 if test -n "$MAKE"; then
1068   echo "$ac_t""$MAKE" 1>&6
1069 else
1070   echo "$ac_t""no" 1>&6
1071 fi
1072
1073 fi
1074 makever=`$ac_cv_path_MAKE --version 2>&1 | grep "GNU Make"`
1075 if test -z "$makever"; then
1076   { echo "configure: error: GNU Make is not installed.  Please download and install it
1077                 from ftp://prep.ai.mit.edu/pub/gnu/make/ before continuing." 1>&2; exit 1; }
1078 fi
1079
1080   echo $ac_n "checking for main in -lltdl""... $ac_c" 1>&6
1081 echo "configure:1082: checking for main in -lltdl" >&5
1082 ac_lib_var=`echo ltdl'_'main | sed 'y%./+-%__p_%'`
1083 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1084   echo $ac_n "(cached) $ac_c" 1>&6
1085 else
1086   ac_save_LIBS="$LIBS"
1087 LIBS="-lltdl  $LIBS"
1088 cat > conftest.$ac_ext <<EOF
1089 #line 1090 "configure"
1090 #include "confdefs.h"
1091
1092 int main() {
1093 main()
1094 ; return 0; }
1095 EOF
1096 if { (eval echo configure:1097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1097   rm -rf conftest*
1098   eval "ac_cv_lib_$ac_lib_var=yes"
1099 else
1100   echo "configure: failed program was:" >&5
1101   cat conftest.$ac_ext >&5
1102   rm -rf conftest*
1103   eval "ac_cv_lib_$ac_lib_var=no"
1104 fi
1105 rm -f conftest*
1106 LIBS="$ac_save_LIBS"
1107
1108 fi
1109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1110   echo "$ac_t""yes" 1>&6
1111   test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no
1112 else
1113   echo "$ac_t""no" 1>&6
1114 if test x"$enable_ltdl_install" = xno; then
1115      echo "configure: warning: libltdl not installed, but installation disabled" 1>&2
1116    else
1117      enable_ltdl_install=yes
1118    fi
1119   
1120 fi
1121
1122   if test x"$enable_ltdl_install" = x"yes"; then
1123     ac_configure_args="$ac_configure_args --enable-ltdl-install"
1124     LIBLTDL='${top_builddir}/libltdl'/libltdl.la
1125     INCLTDL='-I${top_builddir}/libltdl'
1126   else
1127     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
1128     LIBLTDL="-lltdl"
1129     INCLTDL=
1130   fi
1131
1132
1133
1134
1135 ac_aux_dir=
1136 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1137   if test -f $ac_dir/install-sh; then
1138     ac_aux_dir=$ac_dir
1139     ac_install_sh="$ac_aux_dir/install-sh -c"
1140     break
1141   elif test -f $ac_dir/install.sh; then
1142     ac_aux_dir=$ac_dir
1143     ac_install_sh="$ac_aux_dir/install.sh -c"
1144     break
1145   fi
1146 done
1147 if test -z "$ac_aux_dir"; then
1148   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1149 fi
1150 ac_config_guess=$ac_aux_dir/config.guess
1151 ac_config_sub=$ac_aux_dir/config.sub
1152 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1153
1154 # Check whether --enable-shared or --disable-shared was given.
1155 if test "${enable_shared+set}" = set; then
1156   enableval="$enable_shared"
1157   p=${PACKAGE-default}
1158 case "$enableval" in
1159 yes) enable_shared=yes ;;
1160 no) enable_shared=no ;;
1161 *)
1162   enable_shared=no
1163   # Look at the argument we got.  We use all the common list separators.
1164   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1165   for pkg in $enableval; do
1166     if test "X$pkg" = "X$p"; then
1167       enable_shared=yes
1168     fi
1169   done
1170   IFS="$ac_save_ifs"
1171   ;;
1172 esac
1173 else
1174   enable_shared=yes
1175 fi
1176
1177 # Check whether --enable-static or --disable-static was given.
1178 if test "${enable_static+set}" = set; then
1179   enableval="$enable_static"
1180   p=${PACKAGE-default}
1181 case "$enableval" in
1182 yes) enable_static=yes ;;
1183 no) enable_static=no ;;
1184 *)
1185   enable_static=no
1186   # Look at the argument we got.  We use all the common list separators.
1187   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1188   for pkg in $enableval; do
1189     if test "X$pkg" = "X$p"; then
1190       enable_static=yes
1191     fi
1192   done
1193   IFS="$ac_save_ifs"
1194   ;;
1195 esac
1196 else
1197   enable_static=yes
1198 fi
1199
1200 # Check whether --enable-fast-install or --disable-fast-install was given.
1201 if test "${enable_fast_install+set}" = set; then
1202   enableval="$enable_fast_install"
1203   p=${PACKAGE-default}
1204 case "$enableval" in
1205 yes) enable_fast_install=yes ;;
1206 no) enable_fast_install=no ;;
1207 *)
1208   enable_fast_install=no
1209   # Look at the argument we got.  We use all the common list separators.
1210   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1211   for pkg in $enableval; do
1212     if test "X$pkg" = "X$p"; then
1213       enable_fast_install=yes
1214     fi
1215   done
1216   IFS="$ac_save_ifs"
1217   ;;
1218 esac
1219 else
1220   enable_fast_install=yes
1221 fi
1222
1223
1224 # Make sure we can run config.sub.
1225 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1226 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1227 fi
1228
1229 echo $ac_n "checking host system type""... $ac_c" 1>&6
1230 echo "configure:1231: checking host system type" >&5
1231
1232 host_alias=$host
1233 case "$host_alias" in
1234 NONE)
1235   case $nonopt in
1236   NONE)
1237     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1238     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1239     fi ;;
1240   *) host_alias=$nonopt ;;
1241   esac ;;
1242 esac
1243
1244 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1245 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1246 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1247 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1248 echo "$ac_t""$host" 1>&6
1249
1250 echo $ac_n "checking build system type""... $ac_c" 1>&6
1251 echo "configure:1252: checking build system type" >&5
1252
1253 build_alias=$build
1254 case "$build_alias" in
1255 NONE)
1256   case $nonopt in
1257   NONE) build_alias=$host_alias ;;
1258   *) build_alias=$nonopt ;;
1259   esac ;;
1260 esac
1261
1262 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1263 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1264 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1265 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1266 echo "$ac_t""$build" 1>&6
1267
1268 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1269 if test "${with_gnu_ld+set}" = set; then
1270   withval="$with_gnu_ld"
1271   test "$withval" = no || with_gnu_ld=yes
1272 else
1273   with_gnu_ld=no
1274 fi
1275
1276 ac_prog=ld
1277 if test "$ac_cv_prog_gcc" = yes; then
1278   # Check if gcc -print-prog-name=ld gives a path.
1279   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1280 echo "configure:1281: checking for ld used by GCC" >&5
1281   ac_prog=`($CC -print-prog-name=ld) 2>&5`
1282   case "$ac_prog" in
1283     # Accept absolute paths.
1284     [\\/]* | [A-Za-z]:[\\/]*)
1285       re_direlt='/[^/][^/]*/\.\./'
1286       # Canonicalize the path of ld
1287       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1288       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1289         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1290       done
1291       test -z "$LD" && LD="$ac_prog"
1292       ;;
1293   "")
1294     # If it fails, then pretend we aren't using GCC.
1295     ac_prog=ld
1296     ;;
1297   *)
1298     # If it is relative, then search for the first ld in PATH.
1299     with_gnu_ld=unknown
1300     ;;
1301   esac
1302 elif test "$with_gnu_ld" = yes; then
1303   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1304 echo "configure:1305: checking for GNU ld" >&5
1305 else
1306   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1307 echo "configure:1308: checking for non-GNU ld" >&5
1308 fi
1309 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1310   echo $ac_n "(cached) $ac_c" 1>&6
1311 else
1312   if test -z "$LD"; then
1313   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1314   for ac_dir in $PATH; do
1315     test -z "$ac_dir" && ac_dir=.
1316     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1317       ac_cv_path_LD="$ac_dir/$ac_prog"
1318       # Check to see if the program is GNU ld.  I'd rather use --version,
1319       # but apparently some GNU ld's only accept -v.
1320       # Break only if it was the GNU/non-GNU ld that we prefer.
1321       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1322         test "$with_gnu_ld" != no && break
1323       else
1324         test "$with_gnu_ld" != yes && break
1325       fi
1326     fi
1327   done
1328   IFS="$ac_save_ifs"
1329 else
1330   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1331 fi
1332 fi
1333
1334 LD="$ac_cv_path_LD"
1335 if test -n "$LD"; then
1336   echo "$ac_t""$LD" 1>&6
1337 else
1338   echo "$ac_t""no" 1>&6
1339 fi
1340 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1341 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1342 echo "configure:1343: checking if the linker ($LD) is GNU ld" >&5
1343 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1344   echo $ac_n "(cached) $ac_c" 1>&6
1345 else
1346   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1347 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1348   ac_cv_prog_gnu_ld=yes
1349 else
1350   ac_cv_prog_gnu_ld=no
1351 fi
1352 fi
1353
1354 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1355
1356
1357 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1358 echo "configure:1359: checking for BSD-compatible nm" >&5
1359 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1360   echo $ac_n "(cached) $ac_c" 1>&6
1361 else
1362   if test -n "$NM"; then
1363   # Let the user override the test.
1364   ac_cv_path_NM="$NM"
1365 else
1366   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1367   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1368     test -z "$ac_dir" && ac_dir=.
1369     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1370       # Check to see if the nm accepts a BSD-compat flag.
1371       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1372       #   nm: unknown option "B" ignored
1373       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1374         ac_cv_path_NM="$ac_dir/nm -B"
1375         break
1376       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1377         ac_cv_path_NM="$ac_dir/nm -p"
1378         break
1379       else
1380         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1381         continue # so that we can try to find one that supports BSD flags
1382       fi
1383     fi
1384   done
1385   IFS="$ac_save_ifs"
1386   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1387 fi
1388 fi
1389
1390 NM="$ac_cv_path_NM"
1391 echo "$ac_t""$NM" 1>&6
1392
1393 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1394 echo "configure:1395: checking whether ln -s works" >&5
1395 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1396   echo $ac_n "(cached) $ac_c" 1>&6
1397 else
1398   rm -f conftestdata
1399 if ln -s X conftestdata 2>/dev/null
1400 then
1401   rm -f conftestdata
1402   ac_cv_prog_LN_S="ln -s"
1403 else
1404   ac_cv_prog_LN_S=ln
1405 fi
1406 fi
1407 LN_S="$ac_cv_prog_LN_S"
1408 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1409   echo "$ac_t""yes" 1>&6
1410 else
1411   echo "$ac_t""no" 1>&6
1412 fi
1413
1414
1415 case "$target" in
1416 NONE) lt_target="$host" ;;
1417 *) lt_target="$target" ;;
1418 esac
1419
1420 # Check for any special flags to pass to ltconfig.
1421 libtool_flags="--cache-file=$cache_file"
1422 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1423 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1424 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1425 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1426 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1427 libtool_flags="$libtool_flags --enable-dlopen"
1428
1429 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1430 if test "${enable_libtool_lock+set}" = set; then
1431   enableval="$enable_libtool_lock"
1432   :
1433 fi
1434
1435 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1436 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1437
1438 # Some flags need to be propagated to the compiler or linker for good
1439 # libtool support.
1440 case "$lt_target" in
1441 *-*-irix6*)
1442   # Find out which ABI we are using.
1443   echo '#line 1444 "configure"' > conftest.$ac_ext
1444   if { (eval echo configure:1445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1445     case "`/usr/bin/file conftest.o`" in
1446     *32-bit*)
1447       LD="${LD-ld} -32"
1448       ;;
1449     *N32*)
1450       LD="${LD-ld} -n32"
1451       ;;
1452     *64-bit*)
1453       LD="${LD-ld} -64"
1454       ;;
1455     esac
1456   fi
1457   rm -rf conftest*
1458   ;;
1459
1460 *-*-sco3.2v5*)
1461   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1462   SAVE_CFLAGS="$CFLAGS"
1463   CFLAGS="$CFLAGS -belf"
1464   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1465 echo "configure:1466: checking whether the C compiler needs -belf" >&5
1466 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1467   echo $ac_n "(cached) $ac_c" 1>&6
1468 else
1469   cat > conftest.$ac_ext <<EOF
1470 #line 1471 "configure"
1471 #include "confdefs.h"
1472
1473 int main() {
1474
1475 ; return 0; }
1476 EOF
1477 if { (eval echo configure:1478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1478   rm -rf conftest*
1479   lt_cv_cc_needs_belf=yes
1480 else
1481   echo "configure: failed program was:" >&5
1482   cat conftest.$ac_ext >&5
1483   rm -rf conftest*
1484   lt_cv_cc_needs_belf=no
1485 fi
1486 rm -f conftest*
1487 fi
1488
1489 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1490   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1491     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1492     CFLAGS="$SAVE_CFLAGS"
1493   fi
1494   ;;
1495
1496
1497 esac
1498
1499
1500 # Save cache, so that ltconfig can load it
1501 cat > confcache <<\EOF
1502 # This file is a shell script that caches the results of configure
1503 # tests run on this system so they can be shared between configure
1504 # scripts and configure runs.  It is not useful on other systems.
1505 # If it contains results you don't want to keep, you may remove or edit it.
1506 #
1507 # By default, configure uses ./config.cache as the cache file,
1508 # creating it if it does not exist already.  You can give configure
1509 # the --cache-file=FILE option to use a different cache file; that is
1510 # what configure does when it calls configure scripts in
1511 # subdirectories, so they share the cache.
1512 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1513 # config.status only pays attention to the cache file if you give it the
1514 # --recheck option to rerun configure.
1515 #
1516 EOF
1517 # The following way of writing the cache mishandles newlines in values,
1518 # but we know of no workaround that is simple, portable, and efficient.
1519 # So, don't put newlines in cache variables' values.
1520 # Ultrix sh set writes to stderr and can't be redirected directly,
1521 # and sets the high bit in the cache file unless we assign to the vars.
1522 (set) 2>&1 |
1523   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1524   *ac_space=\ *)
1525     # `set' does not quote correctly, so add quotes (double-quote substitution
1526     # turns \\\\ into \\, and sed turns \\ into \).
1527     sed -n \
1528       -e "s/'/'\\\\''/g" \
1529       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1530     ;;
1531   *)
1532     # `set' quotes correctly as required by POSIX, so do not add quotes.
1533     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1534     ;;
1535   esac >> confcache
1536 if cmp -s $cache_file confcache; then
1537   :
1538 else
1539   if test -w $cache_file; then
1540     echo "updating cache $cache_file"
1541     cat confcache > $cache_file
1542   else
1543     echo "not updating unwritable cache $cache_file"
1544   fi
1545 fi
1546 rm -f confcache
1547
1548
1549 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1550 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1551 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1552 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1553 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1554 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1555 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
1556 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1557
1558 # Reload cache, that may have been modified by ltconfig
1559 if test -r "$cache_file"; then
1560   echo "loading cache $cache_file"
1561   . $cache_file
1562 else
1563   echo "creating cache $cache_file"
1564   > $cache_file
1565 fi
1566
1567
1568 # This can be used to rebuild libtool when needed
1569 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1570
1571 # Always use our own libtool.
1572 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1573
1574 # Redirect the config.log output again, so that the ltconfig log is not
1575 # clobbered by the next message.
1576 exec 5>>./config.log
1577
1578
1579
1580 # Check whether --enable-strict-dependencies or --disable-strict-dependencies was given.
1581 if test "${enable_strict_dependencies+set}" = set; then
1582   enableval="$enable_strict_dependencies"
1583   :
1584 fi
1585
1586
1587 logdir='${localstatedir}/log/radius'
1588 echo $ac_n "checking logdir""... $ac_c" 1>&6
1589 echo "configure:1590: checking logdir" >&5
1590 # Check whether --with-logdir or --without-logdir was given.
1591 if test "${with_logdir+set}" = set; then
1592   withval="$with_logdir"
1593    case "$withval" in
1594     no)
1595         { echo "configure: error: Need logdir" 1>&2; exit 1; }
1596         ;;
1597     yes)
1598         ;;
1599     *)
1600         logdir="$withval"
1601         ;;
1602   esac 
1603
1604 fi
1605
1606
1607 echo "$ac_t""$logdir" 1>&6
1608
1609 radacctdir='${logdir}/radacct'
1610 echo $ac_n "checking radacctdir""... $ac_c" 1>&6
1611 echo "configure:1612: checking radacctdir" >&5
1612 # Check whether --with-radacctdir or --without-radacctdir was given.
1613 if test "${with_radacctdir+set}" = set; then
1614   withval="$with_radacctdir"
1615    case "$withval" in
1616     no)
1617         { echo "configure: error: Need radacctdir" 1>&2; exit 1; }
1618         ;;
1619     yes)
1620         ;;
1621     *)
1622         radacctdir="$withval"
1623         ;;
1624   esac 
1625
1626 fi
1627
1628
1629 echo "$ac_t""$radacctdir" 1>&6
1630
1631 raddbdir='${sysconfdir}/raddb'
1632 echo $ac_n "checking raddbdir""... $ac_c" 1>&6
1633 echo "configure:1634: checking raddbdir" >&5
1634 # Check whether --with-raddbdir or --without-raddbdir was given.
1635 if test "${with_raddbdir+set}" = set; then
1636   withval="$with_raddbdir"
1637    case "$withval" in
1638     no)
1639         { echo "configure: error: Need raddbdir" 1>&2; exit 1; }
1640         ;;
1641     yes)
1642         ;;
1643     *)
1644         raddbdir="$withval"
1645         ;;
1646   esac 
1647
1648 fi
1649
1650
1651 echo "$ac_t""$raddbdir" 1>&6
1652
1653 WITH_DICT_NOCASE=yes
1654 # Check whether --with-dict-nocase or --without-dict-nocase was given.
1655 if test "${with_dict_nocase+set}" = set; then
1656   withval="$with_dict_nocase"
1657     case "$withval" in
1658     yes)
1659         ;;
1660     *)
1661         WITH_DICT_NOCASE=""
1662   esac 
1663
1664 fi
1665
1666 if test "X$WITH_DICT_NOCASE" = "Xyes"; then
1667   cat >> confdefs.h <<\EOF
1668 #define WITH_DICT_NOCASE 1
1669 EOF
1670
1671 fi
1672
1673 ASCEND_BINARY=yes
1674 # Check whether --with-ascend-binary or --without-ascend-binary was given.
1675 if test "${with_ascend_binary+set}" = set; then
1676   withval="$with_ascend_binary"
1677    case "$withval" in
1678     yes)
1679         ;;
1680     *)
1681         ASCEND_BINARY=""
1682   esac 
1683
1684 fi
1685
1686 if test "X$ASCEND_BINARY" = "Xyes"; then
1687   cat >> confdefs.h <<\EOF
1688 #define ASCEND_BINARY 1
1689 EOF
1690
1691 fi
1692
1693 WITH_THREADS=yes
1694 WITH_THREAD_POOL=yes
1695 # Check whether --with-threads or --without-threads was given.
1696 if test "${with_threads+set}" = set; then
1697   withval="$with_threads"
1698    case "$withval" in
1699     yes)
1700         ;;
1701     *)
1702         WITH_THREADS=""
1703         WITH_THREAD_POOL=""
1704   esac 
1705
1706 fi
1707
1708
1709 WITH_SNMP=yes
1710 # Check whether --with-snmp or --without-snmp was given.
1711 if test "${with_snmp+set}" = set; then
1712   withval="$with_snmp"
1713    case "$withval" in
1714     yes)
1715         ;;
1716     *)
1717         WITH_SNMP=no
1718   esac 
1719
1720 fi
1721
1722
1723 # Check whether --enable-ltdl-install or --disable-ltdl-install was given.
1724 if test "${enable_ltdl_install+set}" = set; then
1725   enableval="$enable_ltdl_install"
1726   :
1727 fi
1728
1729 if test x"${enable_ltdl_install+set}" != xset; then
1730   enable_ltdl_install=yes
1731   ac_configure_args="$ac_configure_args --enable-ltdl-install"
1732 fi
1733 subdirs="libltdl"
1734
1735
1736 STATIC_MODULES=
1737 # Check whether --with-static_modules or --without-static_modules was given.
1738 if test "${with_static_modules+set}" = set; then
1739   withval="$with_static_modules"
1740   
1741   for i in $withval; do
1742     STATIC_MODULES="$STATIC_MODULES -dlpreopen ../modules/rlm_$i/rlm_$i.la"
1743   done
1744
1745 fi
1746
1747
1748 # Check whether --enable-developer or --disable-developer was given.
1749 if test "${enable_developer+set}" = set; then
1750   enableval="$enable_developer"
1751    case "$withval" in
1752     *)
1753         developer=no
1754         ;;
1755     yes)
1756         developer=yes
1757   esac 
1758
1759 fi
1760
1761
1762 if test "x$developer" != "xno" -a -d $srcdir/CVS; then
1763     developer="yes"
1764 fi
1765
1766 EXPERIMENTAL=
1767 # Check whether --with-experimental-modules or --without-experimental-modules was given.
1768 if test "${with_experimental_modules+set}" = set; then
1769   withval="$with_experimental_modules"
1770    case "$withval" in
1771     yes)
1772         EXPERIMENTAL=yes
1773         ;;
1774     *)
1775   esac 
1776
1777 fi
1778
1779
1780
1781 # Check whether --with-rlm-FOO-lib-dir or --without-rlm-FOO-lib-dir was given.
1782 if test "${with_rlm_FOO_lib_dir+set}" = set; then
1783   withval="$with_rlm_FOO_lib_dir"
1784    case "$withval" in
1785     *)
1786         ;;
1787   esac 
1788
1789 fi
1790
1791
1792 # Check whether --with-rlm-FOO-include-dir or --without-rlm-FOO-include-dir was given.
1793 if test "${with_rlm_FOO_include_dir+set}" = set; then
1794   withval="$with_rlm_FOO_include_dir"
1795    case "$withval" in
1796     *)
1797         ;;
1798   esac 
1799
1800 fi
1801
1802
1803
1804
1805 # Extract the first word of "perl", so it can be a program name with args.
1806 set dummy perl; ac_word=$2
1807 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1808 echo "configure:1809: checking for $ac_word" >&5
1809 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
1810   echo $ac_n "(cached) $ac_c" 1>&6
1811 else
1812   case "$PERL" in
1813   /*)
1814   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
1815   ;;
1816   ?:/*)                  
1817   ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
1818   ;;
1819   *)
1820   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1821   ac_dummy="$PATH"
1822   for ac_dir in $ac_dummy; do 
1823     test -z "$ac_dir" && ac_dir=.
1824     if test -f $ac_dir/$ac_word; then
1825       ac_cv_path_PERL="$ac_dir/$ac_word"
1826       break
1827     fi
1828   done
1829   IFS="$ac_save_ifs"
1830   test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="/usr/local/bin/perl"
1831   ;;
1832 esac
1833 fi
1834 PERL="$ac_cv_path_PERL"
1835 if test -n "$PERL"; then
1836   echo "$ac_t""$PERL" 1>&6
1837 else
1838   echo "$ac_t""no" 1>&6
1839 fi
1840
1841 if test ! -x $ac_cv_path_PERL; then
1842   { echo "configure: error: perl not found - fatal" 1>&2; exit 1; }
1843 fi
1844 # Extract the first word of "snmpget", so it can be a program name with args.
1845 set dummy snmpget; ac_word=$2
1846 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1847 echo "configure:1848: checking for $ac_word" >&5
1848 if eval "test \"`echo '$''{'ac_cv_path_SNMPGET'+set}'`\" = set"; then
1849   echo $ac_n "(cached) $ac_c" 1>&6
1850 else
1851   case "$SNMPGET" in
1852   /*)
1853   ac_cv_path_SNMPGET="$SNMPGET" # Let the user override the test with a path.
1854   ;;
1855   ?:/*)                  
1856   ac_cv_path_SNMPGET="$SNMPGET" # Let the user override the test with a dos path.
1857   ;;
1858   *)
1859   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1860   ac_dummy="$PATH"
1861   for ac_dir in $ac_dummy; do 
1862     test -z "$ac_dir" && ac_dir=.
1863     if test -f $ac_dir/$ac_word; then
1864       ac_cv_path_SNMPGET="$ac_dir/$ac_word"
1865       break
1866     fi
1867   done
1868   IFS="$ac_save_ifs"
1869   test -z "$ac_cv_path_SNMPGET" && ac_cv_path_SNMPGET="/usr/local/bin/snmpget"
1870   ;;
1871 esac
1872 fi
1873 SNMPGET="$ac_cv_path_SNMPGET"
1874 if test -n "$SNMPGET"; then
1875   echo "$ac_t""$SNMPGET" 1>&6
1876 else
1877   echo "$ac_t""no" 1>&6
1878 fi
1879
1880 # Extract the first word of "snmpwalk", so it can be a program name with args.
1881 set dummy snmpwalk; ac_word=$2
1882 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1883 echo "configure:1884: checking for $ac_word" >&5
1884 if eval "test \"`echo '$''{'ac_cv_path_SNMPWALK'+set}'`\" = set"; then
1885   echo $ac_n "(cached) $ac_c" 1>&6
1886 else
1887   case "$SNMPWALK" in
1888   /*)
1889   ac_cv_path_SNMPWALK="$SNMPWALK" # Let the user override the test with a path.
1890   ;;
1891   ?:/*)                  
1892   ac_cv_path_SNMPWALK="$SNMPWALK" # Let the user override the test with a dos path.
1893   ;;
1894   *)
1895   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1896   ac_dummy="$PATH"
1897   for ac_dir in $ac_dummy; do 
1898     test -z "$ac_dir" && ac_dir=.
1899     if test -f $ac_dir/$ac_word; then
1900       ac_cv_path_SNMPWALK="$ac_dir/$ac_word"
1901       break
1902     fi
1903   done
1904   IFS="$ac_save_ifs"
1905   test -z "$ac_cv_path_SNMPWALK" && ac_cv_path_SNMPWALK="/usr/local/bin/snmpwalk"
1906   ;;
1907 esac
1908 fi
1909 SNMPWALK="$ac_cv_path_SNMPWALK"
1910 if test -n "$SNMPWALK"; then
1911   echo "$ac_t""$SNMPWALK" 1>&6
1912 else
1913   echo "$ac_t""no" 1>&6
1914 fi
1915
1916 # Extract the first word of "rusers", so it can be a program name with args.
1917 set dummy rusers; ac_word=$2
1918 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1919 echo "configure:1920: checking for $ac_word" >&5
1920 if eval "test \"`echo '$''{'ac_cv_path_RUSERS'+set}'`\" = set"; then
1921   echo $ac_n "(cached) $ac_c" 1>&6
1922 else
1923   case "$RUSERS" in
1924   /*)
1925   ac_cv_path_RUSERS="$RUSERS" # Let the user override the test with a path.
1926   ;;
1927   ?:/*)                  
1928   ac_cv_path_RUSERS="$RUSERS" # Let the user override the test with a dos path.
1929   ;;
1930   *)
1931   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1932   ac_dummy="$PATH"
1933   for ac_dir in $ac_dummy; do 
1934     test -z "$ac_dir" && ac_dir=.
1935     if test -f $ac_dir/$ac_word; then
1936       ac_cv_path_RUSERS="$ac_dir/$ac_word"
1937       break
1938     fi
1939   done
1940   IFS="$ac_save_ifs"
1941   test -z "$ac_cv_path_RUSERS" && ac_cv_path_RUSERS="/usr/bin/rusers"
1942   ;;
1943 esac
1944 fi
1945 RUSERS="$ac_cv_path_RUSERS"
1946 if test -n "$RUSERS"; then
1947   echo "$ac_t""$RUSERS" 1>&6
1948 else
1949   echo "$ac_t""no" 1>&6
1950 fi
1951
1952
1953 missing_dir=`cd $ac_aux_dir && pwd`
1954 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1955 echo "configure:1956: checking for working aclocal" >&5
1956 # Run test in a subshell; some versions of sh will print an error if
1957 # an executable is not found, even if stderr is redirected.
1958 # Redirect stdin to placate older versions of autoconf.  Sigh.
1959 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1960    ACLOCAL=aclocal
1961    echo "$ac_t""found" 1>&6
1962 else
1963    ACLOCAL="$missing_dir/missing aclocal"
1964    echo "$ac_t""missing" 1>&6
1965 fi
1966
1967 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1968 echo "configure:1969: checking for working autoconf" >&5
1969 # Run test in a subshell; some versions of sh will print an error if
1970 # an executable is not found, even if stderr is redirected.
1971 # Redirect stdin to placate older versions of autoconf.  Sigh.
1972 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1973    AUTOCONF=autoconf
1974    echo "$ac_t""found" 1>&6
1975 else
1976    AUTOCONF="$missing_dir/missing autoconf"
1977    echo "$ac_t""missing" 1>&6
1978 fi
1979
1980 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1981 echo "configure:1982: checking for working autoheader" >&5
1982 # Run test in a subshell; some versions of sh will print an error if
1983 # an executable is not found, even if stderr is redirected.
1984 # Redirect stdin to placate older versions of autoconf.  Sigh.
1985 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1986    AUTOHEADER=autoheader
1987    echo "$ac_t""found" 1>&6
1988 else
1989    AUTOHEADER="$missing_dir/missing autoheader"
1990    echo "$ac_t""missing" 1>&6
1991 fi
1992
1993
1994 # Extract the first word of "locate", so it can be a program name with args.
1995 set dummy locate; ac_word=$2
1996 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1997 echo "configure:1998: checking for $ac_word" >&5
1998 if eval "test \"`echo '$''{'ac_cv_path_LOCATE'+set}'`\" = set"; then
1999   echo $ac_n "(cached) $ac_c" 1>&6
2000 else
2001   case "$LOCATE" in
2002   /*)
2003   ac_cv_path_LOCATE="$LOCATE" # Let the user override the test with a path.
2004   ;;
2005   ?:/*)                  
2006   ac_cv_path_LOCATE="$LOCATE" # Let the user override the test with a dos path.
2007   ;;
2008   *)
2009   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2010   ac_dummy="$PATH"
2011   for ac_dir in $ac_dummy; do 
2012     test -z "$ac_dir" && ac_dir=.
2013     if test -f $ac_dir/$ac_word; then
2014       ac_cv_path_LOCATE="$ac_dir/$ac_word"
2015       break
2016     fi
2017   done
2018   IFS="$ac_save_ifs"
2019   ;;
2020 esac
2021 fi
2022 LOCATE="$ac_cv_path_LOCATE"
2023 if test -n "$LOCATE"; then
2024   echo "$ac_t""$LOCATE" 1>&6
2025 else
2026   echo "$ac_t""no" 1>&6
2027 fi
2028
2029 # Extract the first word of "dirname", so it can be a program name with args.
2030 set dummy dirname; ac_word=$2
2031 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2032 echo "configure:2033: checking for $ac_word" >&5
2033 if eval "test \"`echo '$''{'ac_cv_path_DIRNAME'+set}'`\" = set"; then
2034   echo $ac_n "(cached) $ac_c" 1>&6
2035 else
2036   case "$DIRNAME" in
2037   /*)
2038   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
2039   ;;
2040   ?:/*)                  
2041   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a dos path.
2042   ;;
2043   *)
2044   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2045   ac_dummy="$PATH"
2046   for ac_dir in $ac_dummy; do 
2047     test -z "$ac_dir" && ac_dir=.
2048     if test -f $ac_dir/$ac_word; then
2049       ac_cv_path_DIRNAME="$ac_dir/$ac_word"
2050       break
2051     fi
2052   done
2053   IFS="$ac_save_ifs"
2054   ;;
2055 esac
2056 fi
2057 DIRNAME="$ac_cv_path_DIRNAME"
2058 if test -n "$DIRNAME"; then
2059   echo "$ac_t""$DIRNAME" 1>&6
2060 else
2061   echo "$ac_t""no" 1>&6
2062 fi
2063
2064 # Extract the first word of "grep", so it can be a program name with args.
2065 set dummy grep; ac_word=$2
2066 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2067 echo "configure:2068: checking for $ac_word" >&5
2068 if eval "test \"`echo '$''{'ac_cv_path_GREP'+set}'`\" = set"; then
2069   echo $ac_n "(cached) $ac_c" 1>&6
2070 else
2071   case "$GREP" in
2072   /*)
2073   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
2074   ;;
2075   ?:/*)                  
2076   ac_cv_path_GREP="$GREP" # Let the user override the test with a dos path.
2077   ;;
2078   *)
2079   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2080   ac_dummy="$PATH"
2081   for ac_dir in $ac_dummy; do 
2082     test -z "$ac_dir" && ac_dir=.
2083     if test -f $ac_dir/$ac_word; then
2084       ac_cv_path_GREP="$ac_dir/$ac_word"
2085       break
2086     fi
2087   done
2088   IFS="$ac_save_ifs"
2089   ;;
2090 esac
2091 fi
2092 GREP="$ac_cv_path_GREP"
2093 if test -n "$GREP"; then
2094   echo "$ac_t""$GREP" 1>&6
2095 else
2096   echo "$ac_t""no" 1>&6
2097 fi
2098
2099
2100 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2101 echo "configure:2102: checking for AIX" >&5
2102 cat > conftest.$ac_ext <<EOF
2103 #line 2104 "configure"
2104 #include "confdefs.h"
2105 #ifdef _AIX
2106   yes
2107 #endif
2108
2109 EOF
2110 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2111   egrep "yes" >/dev/null 2>&1; then
2112   rm -rf conftest*
2113   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2114 #define _ALL_SOURCE 1
2115 EOF
2116
2117 else
2118   rm -rf conftest*
2119   echo "$ac_t""no" 1>&6
2120 fi
2121 rm -f conftest*
2122
2123
2124
2125
2126 PTHREADLIB=
2127 if test "$WITH_THREADS" = "yes"; then 
2128   if test $ac_cv_prog_suncc = "yes"; then
2129     CFLAGS="$CFLAGS -mt"
2130   fi
2131
2132   for ac_hdr in pthread.h
2133 do
2134 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2135 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2136 echo "configure:2137: checking for $ac_hdr" >&5
2137 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2138   echo $ac_n "(cached) $ac_c" 1>&6
2139 else
2140   cat > conftest.$ac_ext <<EOF
2141 #line 2142 "configure"
2142 #include "confdefs.h"
2143 #include <$ac_hdr>
2144 EOF
2145 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2146 { (eval echo configure:2147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2147 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2148 if test -z "$ac_err"; then
2149   rm -rf conftest*
2150   eval "ac_cv_header_$ac_safe=yes"
2151 else
2152   echo "$ac_err" >&5
2153   echo "configure: failed program was:" >&5
2154   cat conftest.$ac_ext >&5
2155   rm -rf conftest*
2156   eval "ac_cv_header_$ac_safe=no"
2157 fi
2158 rm -f conftest*
2159 fi
2160 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2161   echo "$ac_t""yes" 1>&6
2162     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2163   cat >> confdefs.h <<EOF
2164 #define $ac_tr_hdr 1
2165 EOF
2166  
2167 else
2168   echo "$ac_t""no" 1>&6
2169 fi
2170 done
2171
2172
2173   if test "X$ac_cv_header_pthread_h" = "X"; then
2174     { echo "configure: error: "You are trying to use threads without a POSIX <pthread.h>"" 1>&2; exit 1; }
2175   fi
2176
2177           echo $ac_n "checking for pthread_join""... $ac_c" 1>&6
2178 echo "configure:2179: checking for pthread_join" >&5
2179 if eval "test \"`echo '$''{'ac_cv_func_pthread_join'+set}'`\" = set"; then
2180   echo $ac_n "(cached) $ac_c" 1>&6
2181 else
2182   cat > conftest.$ac_ext <<EOF
2183 #line 2184 "configure"
2184 #include "confdefs.h"
2185 /* System header to define __stub macros and hopefully few prototypes,
2186     which can conflict with char pthread_join(); below.  */
2187 #include <assert.h>
2188 /* Override any gcc2 internal prototype to avoid an error.  */
2189 /* We use char because int might match the return type of a gcc2
2190     builtin and then its argument prototype would still apply.  */
2191 char pthread_join();
2192
2193 int main() {
2194
2195 /* The GNU C library defines this for functions which it implements
2196     to always fail with ENOSYS.  Some functions are actually named
2197     something starting with __ and the normal name is an alias.  */
2198 #if defined (__stub_pthread_join) || defined (__stub___pthread_join)
2199 choke me
2200 #else
2201 pthread_join();
2202 #endif
2203
2204 ; return 0; }
2205 EOF
2206 if { (eval echo configure:2207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2207   rm -rf conftest*
2208   eval "ac_cv_func_pthread_join=yes"
2209 else
2210   echo "configure: failed program was:" >&5
2211   cat conftest.$ac_ext >&5
2212   rm -rf conftest*
2213   eval "ac_cv_func_pthread_join=no"
2214 fi
2215 rm -f conftest*
2216 fi
2217
2218 if eval "test \"`echo '$ac_cv_func_'pthread_join`\" = yes"; then
2219   echo "$ac_t""yes" 1>&6
2220   PTHREADLIB=" "
2221 else
2222   echo "$ac_t""no" 1>&6
2223 fi
2224
2225
2226   echo $ac_n "checking for pthread_join in -lpthread""... $ac_c" 1>&6
2227 echo "configure:2228: checking for pthread_join in -lpthread" >&5
2228 ac_lib_var=`echo pthread'_'pthread_join | sed 'y%./+-%__p_%'`
2229 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2230   echo $ac_n "(cached) $ac_c" 1>&6
2231 else
2232   ac_save_LIBS="$LIBS"
2233 LIBS="-lpthread  $LIBS"
2234 cat > conftest.$ac_ext <<EOF
2235 #line 2236 "configure"
2236 #include "confdefs.h"
2237 /* Override any gcc2 internal prototype to avoid an error.  */
2238 /* We use char because int might match the return type of a gcc2
2239     builtin and then its argument prototype would still apply.  */
2240 char pthread_join();
2241
2242 int main() {
2243 pthread_join()
2244 ; return 0; }
2245 EOF
2246 if { (eval echo configure:2247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2247   rm -rf conftest*
2248   eval "ac_cv_lib_$ac_lib_var=yes"
2249 else
2250   echo "configure: failed program was:" >&5
2251   cat conftest.$ac_ext >&5
2252   rm -rf conftest*
2253   eval "ac_cv_lib_$ac_lib_var=no"
2254 fi
2255 rm -f conftest*
2256 LIBS="$ac_save_LIBS"
2257
2258 fi
2259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2260   echo "$ac_t""yes" 1>&6
2261   PTHREADLIB="-lpthread"
2262   
2263 else
2264   echo "$ac_t""no" 1>&6
2265 fi
2266
2267
2268
2269   
2270 echo $ac_n "checking for library containing sem_init""... $ac_c" 1>&6
2271 echo "configure:2272: checking for library containing sem_init" >&5
2272 if eval "test \"`echo '$''{'ac_cv_search_sem_init'+set}'`\" = set"; then
2273   echo $ac_n "(cached) $ac_c" 1>&6
2274 else
2275   ac_func_search_save_LIBS="$LIBS"
2276 ac_cv_search_sem_init="no"
2277 cat > conftest.$ac_ext <<EOF
2278 #line 2279 "configure"
2279 #include "confdefs.h"
2280 /* Override any gcc2 internal prototype to avoid an error.  */
2281 /* We use char because int might match the return type of a gcc2
2282     builtin and then its argument prototype would still apply.  */
2283 char sem_init();
2284
2285 int main() {
2286 sem_init()
2287 ; return 0; }
2288 EOF
2289 if { (eval echo configure:2290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2290   rm -rf conftest*
2291   ac_cv_search_sem_init="none required"
2292 else
2293   echo "configure: failed program was:" >&5
2294   cat conftest.$ac_ext >&5
2295 fi
2296 rm -f conftest*
2297 test "$ac_cv_search_sem_init" = "no" && for i in pthread rt; do
2298 LIBS="-l$i "-lpthread"
2299    $ac_func_search_save_LIBS"
2300 cat > conftest.$ac_ext <<EOF
2301 #line 2302 "configure"
2302 #include "confdefs.h"
2303 /* Override any gcc2 internal prototype to avoid an error.  */
2304 /* We use char because int might match the return type of a gcc2
2305     builtin and then its argument prototype would still apply.  */
2306 char sem_init();
2307
2308 int main() {
2309 sem_init()
2310 ; return 0; }
2311 EOF
2312 if { (eval echo configure:2313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2313   rm -rf conftest*
2314   ac_cv_search_sem_init="-l$i"
2315 break
2316 else
2317   echo "configure: failed program was:" >&5
2318   cat conftest.$ac_ext >&5
2319 fi
2320 rm -f conftest*
2321 done
2322 LIBS="$ac_func_search_save_LIBS"
2323 fi
2324
2325 echo "$ac_t""$ac_cv_search_sem_init" 1>&6
2326 if test "$ac_cv_search_sem_init" != "no"; then
2327   test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
2328    
2329                                 
2330 else :
2331   
2332 fi
2333
2334   if test "X$PTHREADLIB" = "X"; then
2335     SAVED_CFLAGS=$CFLAGS
2336     CFLAGS="$CFLAGS -pthread -D_THREAD_SAFE"
2337     echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
2338 echo "configure:2339: checking for pthread_create in -lc_r" >&5
2339 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
2340 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2341   echo $ac_n "(cached) $ac_c" 1>&6
2342 else
2343   ac_save_LIBS="$LIBS"
2344 LIBS="-lc_r  $LIBS"
2345 cat > conftest.$ac_ext <<EOF
2346 #line 2347 "configure"
2347 #include "confdefs.h"
2348 /* Override any gcc2 internal prototype to avoid an error.  */
2349 /* We use char because int might match the return type of a gcc2
2350     builtin and then its argument prototype would still apply.  */
2351 char pthread_create();
2352
2353 int main() {
2354 pthread_create()
2355 ; return 0; }
2356 EOF
2357 if { (eval echo configure:2358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2358   rm -rf conftest*
2359   eval "ac_cv_lib_$ac_lib_var=yes"
2360 else
2361   echo "configure: failed program was:" >&5
2362   cat conftest.$ac_ext >&5
2363   rm -rf conftest*
2364   eval "ac_cv_lib_$ac_lib_var=no"
2365 fi
2366 rm -f conftest*
2367 LIBS="$ac_save_LIBS"
2368
2369 fi
2370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2371   echo "$ac_t""yes" 1>&6
2372   PTHREADLIB="-lc_r"
2373     
2374 else
2375   echo "$ac_t""no" 1>&6
2376 fi
2377
2378   fi
2379
2380   if test "x$PTHREADLIB" != "x"; then
2381     LIBS="$LIBS $PTHREADLIB"
2382     CFLAGS="$CFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
2383   fi
2384 fi
2385
2386 if test "x$PTHREADLIB" = "x"; then
2387   CFLAGS=$SAVED_CFLAGS
2388   ac_cv_header_pthread_h="no"
2389   WITH_THREADS=no
2390   WITH_THREAD_POOL=no
2391 fi
2392
2393 echo $ac_n "checking for getsockname in -lsocket""... $ac_c" 1>&6
2394 echo "configure:2395: checking for getsockname in -lsocket" >&5
2395 ac_lib_var=`echo socket'_'getsockname | sed 'y%./+-%__p_%'`
2396 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2397   echo $ac_n "(cached) $ac_c" 1>&6
2398 else
2399   ac_save_LIBS="$LIBS"
2400 LIBS="-lsocket  $LIBS"
2401 cat > conftest.$ac_ext <<EOF
2402 #line 2403 "configure"
2403 #include "confdefs.h"
2404 /* Override any gcc2 internal prototype to avoid an error.  */
2405 /* We use char because int might match the return type of a gcc2
2406     builtin and then its argument prototype would still apply.  */
2407 char getsockname();
2408
2409 int main() {
2410 getsockname()
2411 ; return 0; }
2412 EOF
2413 if { (eval echo configure:2414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2414   rm -rf conftest*
2415   eval "ac_cv_lib_$ac_lib_var=yes"
2416 else
2417   echo "configure: failed program was:" >&5
2418   cat conftest.$ac_ext >&5
2419   rm -rf conftest*
2420   eval "ac_cv_lib_$ac_lib_var=no"
2421 fi
2422 rm -f conftest*
2423 LIBS="$ac_save_LIBS"
2424
2425 fi
2426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2427   echo "$ac_t""yes" 1>&6
2428     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2429     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2430   cat >> confdefs.h <<EOF
2431 #define $ac_tr_lib 1
2432 EOF
2433
2434   LIBS="-lsocket $LIBS"
2435
2436 else
2437   echo "$ac_t""no" 1>&6
2438 fi
2439
2440
2441 echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
2442 echo "configure:2443: checking for inet_aton in -lresolv" >&5
2443 ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
2444 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2445   echo $ac_n "(cached) $ac_c" 1>&6
2446 else
2447   ac_save_LIBS="$LIBS"
2448 LIBS="-lresolv  $LIBS"
2449 cat > conftest.$ac_ext <<EOF
2450 #line 2451 "configure"
2451 #include "confdefs.h"
2452 /* Override any gcc2 internal prototype to avoid an error.  */
2453 /* We use char because int might match the return type of a gcc2
2454     builtin and then its argument prototype would still apply.  */
2455 char inet_aton();
2456
2457 int main() {
2458 inet_aton()
2459 ; return 0; }
2460 EOF
2461 if { (eval echo configure:2462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2462   rm -rf conftest*
2463   eval "ac_cv_lib_$ac_lib_var=yes"
2464 else
2465   echo "configure: failed program was:" >&5
2466   cat conftest.$ac_ext >&5
2467   rm -rf conftest*
2468   eval "ac_cv_lib_$ac_lib_var=no"
2469 fi
2470 rm -f conftest*
2471 LIBS="$ac_save_LIBS"
2472
2473 fi
2474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2475   echo "$ac_t""yes" 1>&6
2476     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2477     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2478   cat >> confdefs.h <<EOF
2479 #define $ac_tr_lib 1
2480 EOF
2481
2482   LIBS="-lresolv $LIBS"
2483
2484 else
2485   echo "$ac_t""no" 1>&6
2486 fi
2487
2488
2489 echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6
2490 echo "configure:2491: checking for inet_ntoa in -lnsl" >&5
2491 ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'`
2492 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2493   echo $ac_n "(cached) $ac_c" 1>&6
2494 else
2495   ac_save_LIBS="$LIBS"
2496 LIBS="-lnsl  $LIBS"
2497 cat > conftest.$ac_ext <<EOF
2498 #line 2499 "configure"
2499 #include "confdefs.h"
2500 /* Override any gcc2 internal prototype to avoid an error.  */
2501 /* We use char because int might match the return type of a gcc2
2502     builtin and then its argument prototype would still apply.  */
2503 char inet_ntoa();
2504
2505 int main() {
2506 inet_ntoa()
2507 ; return 0; }
2508 EOF
2509 if { (eval echo configure:2510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2510   rm -rf conftest*
2511   eval "ac_cv_lib_$ac_lib_var=yes"
2512 else
2513   echo "configure: failed program was:" >&5
2514   cat conftest.$ac_ext >&5
2515   rm -rf conftest*
2516   eval "ac_cv_lib_$ac_lib_var=no"
2517 fi
2518 rm -f conftest*
2519 LIBS="$ac_save_LIBS"
2520
2521 fi
2522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2523   echo "$ac_t""yes" 1>&6
2524     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2525     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2526   cat >> confdefs.h <<EOF
2527 #define $ac_tr_lib 1
2528 EOF
2529
2530   LIBS="-lnsl $LIBS"
2531
2532 else
2533   echo "$ac_t""no" 1>&6
2534 fi
2535
2536
2537
2538 ac_header_dirent=no
2539 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2540 do
2541 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2542 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2543 echo "configure:2544: checking for $ac_hdr that defines DIR" >&5
2544 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2545   echo $ac_n "(cached) $ac_c" 1>&6
2546 else
2547   cat > conftest.$ac_ext <<EOF
2548 #line 2549 "configure"
2549 #include "confdefs.h"
2550 #include <sys/types.h>
2551 #include <$ac_hdr>
2552 int main() {
2553 DIR *dirp = 0;
2554 ; return 0; }
2555 EOF
2556 if { (eval echo configure:2557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2557   rm -rf conftest*
2558   eval "ac_cv_header_dirent_$ac_safe=yes"
2559 else
2560   echo "configure: failed program was:" >&5
2561   cat conftest.$ac_ext >&5
2562   rm -rf conftest*
2563   eval "ac_cv_header_dirent_$ac_safe=no"
2564 fi
2565 rm -f conftest*
2566 fi
2567 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2568   echo "$ac_t""yes" 1>&6
2569     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2570   cat >> confdefs.h <<EOF
2571 #define $ac_tr_hdr 1
2572 EOF
2573  ac_header_dirent=$ac_hdr; break
2574 else
2575   echo "$ac_t""no" 1>&6
2576 fi
2577 done
2578 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2579 if test $ac_header_dirent = dirent.h; then
2580 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2581 echo "configure:2582: checking for opendir in -ldir" >&5
2582 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2583 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2584   echo $ac_n "(cached) $ac_c" 1>&6
2585 else
2586   ac_save_LIBS="$LIBS"
2587 LIBS="-ldir  $LIBS"
2588 cat > conftest.$ac_ext <<EOF
2589 #line 2590 "configure"
2590 #include "confdefs.h"
2591 /* Override any gcc2 internal prototype to avoid an error.  */
2592 /* We use char because int might match the return type of a gcc2
2593     builtin and then its argument prototype would still apply.  */
2594 char opendir();
2595
2596 int main() {
2597 opendir()
2598 ; return 0; }
2599 EOF
2600 if { (eval echo configure:2601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2601   rm -rf conftest*
2602   eval "ac_cv_lib_$ac_lib_var=yes"
2603 else
2604   echo "configure: failed program was:" >&5
2605   cat conftest.$ac_ext >&5
2606   rm -rf conftest*
2607   eval "ac_cv_lib_$ac_lib_var=no"
2608 fi
2609 rm -f conftest*
2610 LIBS="$ac_save_LIBS"
2611
2612 fi
2613 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2614   echo "$ac_t""yes" 1>&6
2615   LIBS="$LIBS -ldir"
2616 else
2617   echo "$ac_t""no" 1>&6
2618 fi
2619
2620 else
2621 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2622 echo "configure:2623: checking for opendir in -lx" >&5
2623 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2624 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2625   echo $ac_n "(cached) $ac_c" 1>&6
2626 else
2627   ac_save_LIBS="$LIBS"
2628 LIBS="-lx  $LIBS"
2629 cat > conftest.$ac_ext <<EOF
2630 #line 2631 "configure"
2631 #include "confdefs.h"
2632 /* Override any gcc2 internal prototype to avoid an error.  */
2633 /* We use char because int might match the return type of a gcc2
2634     builtin and then its argument prototype would still apply.  */
2635 char opendir();
2636
2637 int main() {
2638 opendir()
2639 ; return 0; }
2640 EOF
2641 if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2642   rm -rf conftest*
2643   eval "ac_cv_lib_$ac_lib_var=yes"
2644 else
2645   echo "configure: failed program was:" >&5
2646   cat conftest.$ac_ext >&5
2647   rm -rf conftest*
2648   eval "ac_cv_lib_$ac_lib_var=no"
2649 fi
2650 rm -f conftest*
2651 LIBS="$ac_save_LIBS"
2652
2653 fi
2654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2655   echo "$ac_t""yes" 1>&6
2656   LIBS="$LIBS -lx"
2657 else
2658   echo "$ac_t""no" 1>&6
2659 fi
2660
2661 fi
2662
2663 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2664 echo "configure:2665: checking for ANSI C header files" >&5
2665 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2666   echo $ac_n "(cached) $ac_c" 1>&6
2667 else
2668   cat > conftest.$ac_ext <<EOF
2669 #line 2670 "configure"
2670 #include "confdefs.h"
2671 #include <stdlib.h>
2672 #include <stdarg.h>
2673 #include <string.h>
2674 #include <float.h>
2675 EOF
2676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2677 { (eval echo configure:2678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2679 if test -z "$ac_err"; then
2680   rm -rf conftest*
2681   ac_cv_header_stdc=yes
2682 else
2683   echo "$ac_err" >&5
2684   echo "configure: failed program was:" >&5
2685   cat conftest.$ac_ext >&5
2686   rm -rf conftest*
2687   ac_cv_header_stdc=no
2688 fi
2689 rm -f conftest*
2690
2691 if test $ac_cv_header_stdc = yes; then
2692   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2693 cat > conftest.$ac_ext <<EOF
2694 #line 2695 "configure"
2695 #include "confdefs.h"
2696 #include <string.h>
2697 EOF
2698 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2699   egrep "memchr" >/dev/null 2>&1; then
2700   :
2701 else
2702   rm -rf conftest*
2703   ac_cv_header_stdc=no
2704 fi
2705 rm -f conftest*
2706
2707 fi
2708
2709 if test $ac_cv_header_stdc = yes; then
2710   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2711 cat > conftest.$ac_ext <<EOF
2712 #line 2713 "configure"
2713 #include "confdefs.h"
2714 #include <stdlib.h>
2715 EOF
2716 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2717   egrep "free" >/dev/null 2>&1; then
2718   :
2719 else
2720   rm -rf conftest*
2721   ac_cv_header_stdc=no
2722 fi
2723 rm -f conftest*
2724
2725 fi
2726
2727 if test $ac_cv_header_stdc = yes; then
2728   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2729 if test "$cross_compiling" = yes; then
2730   :
2731 else
2732   cat > conftest.$ac_ext <<EOF
2733 #line 2734 "configure"
2734 #include "confdefs.h"
2735 #include <ctype.h>
2736 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2737 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2738 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2739 int main () { int i; for (i = 0; i < 256; i++)
2740 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2741 exit (0); }
2742
2743 EOF
2744 if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2745 then
2746   :
2747 else
2748   echo "configure: failed program was:" >&5
2749   cat conftest.$ac_ext >&5
2750   rm -fr conftest*
2751   ac_cv_header_stdc=no
2752 fi
2753 rm -fr conftest*
2754 fi
2755
2756 fi
2757 fi
2758
2759 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2760 if test $ac_cv_header_stdc = yes; then
2761   cat >> confdefs.h <<\EOF
2762 #define STDC_HEADERS 1
2763 EOF
2764
2765 fi
2766
2767 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2768 echo "configure:2769: checking whether time.h and sys/time.h may both be included" >&5
2769 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2770   echo $ac_n "(cached) $ac_c" 1>&6
2771 else
2772   cat > conftest.$ac_ext <<EOF
2773 #line 2774 "configure"
2774 #include "confdefs.h"
2775 #include <sys/types.h>
2776 #include <sys/time.h>
2777 #include <time.h>
2778 int main() {
2779 struct tm *tp;
2780 ; return 0; }
2781 EOF
2782 if { (eval echo configure:2783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2783   rm -rf conftest*
2784   ac_cv_header_time=yes
2785 else
2786   echo "configure: failed program was:" >&5
2787   cat conftest.$ac_ext >&5
2788   rm -rf conftest*
2789   ac_cv_header_time=no
2790 fi
2791 rm -f conftest*
2792 fi
2793
2794 echo "$ac_t""$ac_cv_header_time" 1>&6
2795 if test $ac_cv_header_time = yes; then
2796   cat >> confdefs.h <<\EOF
2797 #define TIME_WITH_SYS_TIME 1
2798 EOF
2799
2800 fi
2801
2802 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2803 echo "configure:2804: checking for sys/wait.h that is POSIX.1 compatible" >&5
2804 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2805   echo $ac_n "(cached) $ac_c" 1>&6
2806 else
2807   cat > conftest.$ac_ext <<EOF
2808 #line 2809 "configure"
2809 #include "confdefs.h"
2810 #include <sys/types.h>
2811 #include <sys/wait.h>
2812 #ifndef WEXITSTATUS
2813 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2814 #endif
2815 #ifndef WIFEXITED
2816 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2817 #endif
2818 int main() {
2819 int s;
2820 wait (&s);
2821 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2822 ; return 0; }
2823 EOF
2824 if { (eval echo configure:2825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2825   rm -rf conftest*
2826   ac_cv_header_sys_wait_h=yes
2827 else
2828   echo "configure: failed program was:" >&5
2829   cat conftest.$ac_ext >&5
2830   rm -rf conftest*
2831   ac_cv_header_sys_wait_h=no
2832 fi
2833 rm -f conftest*
2834 fi
2835
2836 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2837 if test $ac_cv_header_sys_wait_h = yes; then
2838   cat >> confdefs.h <<\EOF
2839 #define HAVE_SYS_WAIT_H 1
2840 EOF
2841
2842 fi
2843
2844
2845 for ac_hdr in \
2846         unistd.h \
2847         crypt.h \
2848         errno.h \
2849         resource.h \
2850         getopt.h \
2851         malloc.h \
2852         utmp.h \
2853         utmpx.h \
2854         signal.h \
2855         sys/select.h \
2856         syslog.h \
2857         inttypes.h \
2858         stdint.h \
2859         stdio.h \
2860         netdb.h \
2861         semaphore.h \
2862         arpa/inet.h \
2863         netinet/in.h \
2864         sys/types.h \
2865         sys/socket.h \
2866         sys/time.h \
2867         sys/wait.h \
2868         sys/security.h \
2869         prot.h \
2870         sia.h \
2871         siad.h
2872
2873 do
2874 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2875 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2876 echo "configure:2877: checking for $ac_hdr" >&5
2877 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2878   echo $ac_n "(cached) $ac_c" 1>&6
2879 else
2880   cat > conftest.$ac_ext <<EOF
2881 #line 2882 "configure"
2882 #include "confdefs.h"
2883 #include <$ac_hdr>
2884 EOF
2885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2886 { (eval echo configure:2887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2888 if test -z "$ac_err"; then
2889   rm -rf conftest*
2890   eval "ac_cv_header_$ac_safe=yes"
2891 else
2892   echo "$ac_err" >&5
2893   echo "configure: failed program was:" >&5
2894   cat conftest.$ac_ext >&5
2895   rm -rf conftest*
2896   eval "ac_cv_header_$ac_safe=no"
2897 fi
2898 rm -f conftest*
2899 fi
2900 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2901   echo "$ac_t""yes" 1>&6
2902     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2903   cat >> confdefs.h <<EOF
2904 #define $ac_tr_hdr 1
2905 EOF
2906  
2907 else
2908   echo "$ac_t""no" 1>&6
2909 fi
2910 done
2911
2912
2913 REGEX=no
2914 ac_safe=`echo "regex.h" | sed 'y%./+-%__p_%'`
2915 echo $ac_n "checking for regex.h""... $ac_c" 1>&6
2916 echo "configure:2917: checking for regex.h" >&5
2917 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2918   echo $ac_n "(cached) $ac_c" 1>&6
2919 else
2920   cat > conftest.$ac_ext <<EOF
2921 #line 2922 "configure"
2922 #include "confdefs.h"
2923 #include <regex.h>
2924 EOF
2925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2926 { (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2928 if test -z "$ac_err"; then
2929   rm -rf conftest*
2930   eval "ac_cv_header_$ac_safe=yes"
2931 else
2932   echo "$ac_err" >&5
2933   echo "configure: failed program was:" >&5
2934   cat conftest.$ac_ext >&5
2935   rm -rf conftest*
2936   eval "ac_cv_header_$ac_safe=no"
2937 fi
2938 rm -f conftest*
2939 fi
2940 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2941   echo "$ac_t""yes" 1>&6
2942   cat >> confdefs.h <<\EOF
2943 #define HAVE_REGEX_H 1
2944 EOF
2945
2946 else
2947   echo "$ac_t""no" 1>&6
2948 fi
2949
2950 if test "x$ac_cv_header_regex_h" = "xyes"; then
2951   REGEX_EXTENDED=no
2952   REGEX=yes
2953   cat > conftest.$ac_ext <<EOF
2954 #line 2955 "configure"
2955 #include "confdefs.h"
2956 #include <regex.h>
2957      #ifdef REG_EXTENDED
2958        yes
2959      #endif
2960      
2961 EOF
2962 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2963   egrep "yes" >/dev/null 2>&1; then
2964   rm -rf conftest*
2965   cat >> confdefs.h <<\EOF
2966 #define HAVE_REG_EXTENDED 1
2967 EOF
2968  REGEX_EXTENDED=yes
2969 fi
2970 rm -f conftest*
2971
2972 fi
2973
2974
2975
2976 if test "x$ac_cv_header_sys_security_h" = "xyes" && test "x$ac_cv_header_prot_h" = "xyes"
2977 then
2978   cat >> confdefs.h <<\EOF
2979 #define OSFC2 1
2980 EOF
2981
2982 fi
2983
2984 if test "x$ac_cv_header_sia_h" = "xyes" && test "x$ac_cv_header_siad_h" = "xyes"
2985 then
2986   cat >> confdefs.h <<\EOF
2987 #define OSFSIA 1
2988 EOF
2989
2990 fi
2991
2992
2993
2994 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2995 echo "configure:2996: checking for off_t" >&5
2996 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2997   echo $ac_n "(cached) $ac_c" 1>&6
2998 else
2999   cat > conftest.$ac_ext <<EOF
3000 #line 3001 "configure"
3001 #include "confdefs.h"
3002 #include <sys/types.h>
3003 #if STDC_HEADERS
3004 #include <stdlib.h>
3005 #include <stddef.h>
3006 #endif
3007 EOF
3008 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3009   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3010   rm -rf conftest*
3011   ac_cv_type_off_t=yes
3012 else
3013   rm -rf conftest*
3014   ac_cv_type_off_t=no
3015 fi
3016 rm -f conftest*
3017
3018 fi
3019 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3020 if test $ac_cv_type_off_t = no; then
3021   cat >> confdefs.h <<\EOF
3022 #define off_t long
3023 EOF
3024
3025 fi
3026  
3027 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3028 echo "configure:3029: checking for pid_t" >&5
3029 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3030   echo $ac_n "(cached) $ac_c" 1>&6
3031 else
3032   cat > conftest.$ac_ext <<EOF
3033 #line 3034 "configure"
3034 #include "confdefs.h"
3035 #include <sys/types.h>
3036 #if STDC_HEADERS
3037 #include <stdlib.h>
3038 #include <stddef.h>
3039 #endif
3040 EOF
3041 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3042   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3043   rm -rf conftest*
3044   ac_cv_type_pid_t=yes
3045 else
3046   rm -rf conftest*
3047   ac_cv_type_pid_t=no
3048 fi
3049 rm -f conftest*
3050
3051 fi
3052 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3053 if test $ac_cv_type_pid_t = no; then
3054   cat >> confdefs.h <<\EOF
3055 #define pid_t int
3056 EOF
3057
3058 fi
3059
3060 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3061 echo "configure:3062: checking for size_t" >&5
3062 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3063   echo $ac_n "(cached) $ac_c" 1>&6
3064 else
3065   cat > conftest.$ac_ext <<EOF
3066 #line 3067 "configure"
3067 #include "confdefs.h"
3068 #include <sys/types.h>
3069 #if STDC_HEADERS
3070 #include <stdlib.h>
3071 #include <stddef.h>
3072 #endif
3073 EOF
3074 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3075   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3076   rm -rf conftest*
3077   ac_cv_type_size_t=yes
3078 else
3079   rm -rf conftest*
3080   ac_cv_type_size_t=no
3081 fi
3082 rm -f conftest*
3083
3084 fi
3085 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3086 if test $ac_cv_type_size_t = no; then
3087   cat >> confdefs.h <<\EOF
3088 #define size_t unsigned
3089 EOF
3090
3091 fi
3092
3093 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3094 echo "configure:3095: checking for uid_t in sys/types.h" >&5
3095 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3096   echo $ac_n "(cached) $ac_c" 1>&6
3097 else
3098   cat > conftest.$ac_ext <<EOF
3099 #line 3100 "configure"
3100 #include "confdefs.h"
3101 #include <sys/types.h>
3102 EOF
3103 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3104   egrep "uid_t" >/dev/null 2>&1; then
3105   rm -rf conftest*
3106   ac_cv_type_uid_t=yes
3107 else
3108   rm -rf conftest*
3109   ac_cv_type_uid_t=no
3110 fi
3111 rm -f conftest*
3112
3113 fi
3114
3115 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3116 if test $ac_cv_type_uid_t = no; then
3117   cat >> confdefs.h <<\EOF
3118 #define uid_t int
3119 EOF
3120
3121   cat >> confdefs.h <<\EOF
3122 #define gid_t int
3123 EOF
3124
3125 fi
3126
3127
3128
3129   echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
3130 echo "configure:3131: checking for socklen_t" >&5
3131 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
3132   echo $ac_n "(cached) $ac_c" 1>&6
3133 else
3134    ac_cv_type_socklen_t=no
3135       cat > conftest.$ac_ext <<EOF
3136 #line 3137 "configure"
3137 #include "confdefs.h"
3138 #ifdef HAVE_SYS_TYPES_H
3139 #include <sys/types.h>
3140 #endif
3141 #ifdef HAVE_SYS_SOCKET_H
3142 #include <sys/socket.h>
3143 #endif
3144
3145 int main() {
3146 socklen_t foo
3147 ; return 0; }
3148 EOF
3149 if { (eval echo configure:3150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3150   rm -rf conftest*
3151   ac_cv_type_socklen_t=yes
3152 else
3153   echo "configure: failed program was:" >&5
3154   cat conftest.$ac_ext >&5
3155 fi
3156 rm -f conftest*
3157     
3158   
3159 fi
3160
3161 echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
3162
3163   if test "$ac_cv_type_socklen_t" != "yes"; then
3164          cat >> confdefs.h <<\EOF
3165 #define socklen_t int
3166 EOF
3167
3168   fi
3169
3170
3171
3172   echo $ac_n "checking for uint8_t""... $ac_c" 1>&6
3173 echo "configure:3174: checking for uint8_t" >&5
3174 if eval "test \"`echo '$''{'ac_cv_type_uint8_t'+set}'`\" = set"; then
3175   echo $ac_n "(cached) $ac_c" 1>&6
3176 else
3177    ac_cv_type_uint8_t=no
3178       cat > conftest.$ac_ext <<EOF
3179 #line 3180 "configure"
3180 #include "confdefs.h"
3181 #ifdef HAVE_INTTYPES_H
3182 #include <inttypes.h>
3183 #endif
3184 #ifdef HAVE_STDINT_H
3185 #include <stdint.h>
3186 #endif
3187
3188 int main() {
3189 uint8_t foo
3190 ; return 0; }
3191 EOF
3192 if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3193   rm -rf conftest*
3194   ac_cv_type_uint8_t=yes
3195 else
3196   echo "configure: failed program was:" >&5
3197   cat conftest.$ac_ext >&5
3198 fi
3199 rm -f conftest*
3200     
3201   
3202 fi
3203
3204 echo "$ac_t""$ac_cv_type_uint8_t" 1>&6
3205
3206   if test "$ac_cv_type_uint8_t" != "yes"; then
3207          cat >> confdefs.h <<\EOF
3208 #define uint8_t unsigned char
3209 EOF
3210
3211   fi
3212
3213
3214
3215   echo $ac_n "checking for uint16_t""... $ac_c" 1>&6
3216 echo "configure:3217: checking for uint16_t" >&5
3217 if eval "test \"`echo '$''{'ac_cv_type_uint16_t'+set}'`\" = set"; then
3218   echo $ac_n "(cached) $ac_c" 1>&6
3219 else
3220    ac_cv_type_uint16_t=no
3221       cat > conftest.$ac_ext <<EOF
3222 #line 3223 "configure"
3223 #include "confdefs.h"
3224 #ifdef HAVE_INTTYPES_H
3225 #include <inttypes.h>
3226 #endif
3227 #ifdef HAVE_STDINT_H
3228 #include <stdint.h>
3229 #endif
3230
3231 int main() {
3232 uint16_t foo
3233 ; return 0; }
3234 EOF
3235 if { (eval echo configure:3236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3236   rm -rf conftest*
3237   ac_cv_type_uint16_t=yes
3238 else
3239   echo "configure: failed program was:" >&5
3240   cat conftest.$ac_ext >&5
3241 fi
3242 rm -f conftest*
3243     
3244   
3245 fi
3246
3247 echo "$ac_t""$ac_cv_type_uint16_t" 1>&6
3248
3249   if test "$ac_cv_type_uint16_t" != "yes"; then
3250          cat >> confdefs.h <<\EOF
3251 #define uint16_t unsigned short
3252 EOF
3253
3254   fi
3255
3256
3257
3258   echo $ac_n "checking for uint32_t""... $ac_c" 1>&6
3259 echo "configure:3260: checking for uint32_t" >&5
3260 if eval "test \"`echo '$''{'ac_cv_type_uint32_t'+set}'`\" = set"; then
3261   echo $ac_n "(cached) $ac_c" 1>&6
3262 else
3263    ac_cv_type_uint32_t=no
3264       cat > conftest.$ac_ext <<EOF
3265 #line 3266 "configure"
3266 #include "confdefs.h"
3267 #ifdef HAVE_INTTYPES_H
3268 #include <inttypes.h>
3269 #endif
3270 #ifdef HAVE_STDINT_H
3271 #include <stdint.h>
3272 #endif
3273
3274 int main() {
3275 uint32_t foo
3276 ; return 0; }
3277 EOF
3278 if { (eval echo configure:3279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3279   rm -rf conftest*
3280   ac_cv_type_uint32_t=yes
3281 else
3282   echo "configure: failed program was:" >&5
3283   cat conftest.$ac_ext >&5
3284 fi
3285 rm -f conftest*
3286     
3287   
3288 fi
3289
3290 echo "$ac_t""$ac_cv_type_uint32_t" 1>&6
3291
3292   if test "$ac_cv_type_uint32_t" != "yes"; then
3293          cat >> confdefs.h <<\EOF
3294 #define uint32_t unsigned int
3295 EOF
3296
3297   fi
3298
3299
3300 for ac_func in \
3301         getopt_long \
3302         lockf \
3303         strsignal \
3304         sigaction \
3305         sigprocmask \
3306         pthread_sigmask \
3307         snprintf \
3308         vsnprintf \
3309         setsid \
3310         strncasecmp \
3311         strcasecmp \
3312         localtime_r \
3313         ctime_r \
3314         gmtime_r \
3315         strsep \
3316         inet_aton \
3317         gethostname \
3318         setlinebuf \
3319         setvbuf \
3320         sem_init \
3321         getusershell
3322
3323 do
3324 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3325 echo "configure:3326: checking for $ac_func" >&5
3326 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3327   echo $ac_n "(cached) $ac_c" 1>&6
3328 else
3329   cat > conftest.$ac_ext <<EOF
3330 #line 3331 "configure"
3331 #include "confdefs.h"
3332 /* System header to define __stub macros and hopefully few prototypes,
3333     which can conflict with char $ac_func(); below.  */
3334 #include <assert.h>
3335 /* Override any gcc2 internal prototype to avoid an error.  */
3336 /* We use char because int might match the return type of a gcc2
3337     builtin and then its argument prototype would still apply.  */
3338 char $ac_func();
3339
3340 int main() {
3341
3342 /* The GNU C library defines this for functions which it implements
3343     to always fail with ENOSYS.  Some functions are actually named
3344     something starting with __ and the normal name is an alias.  */
3345 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3346 choke me
3347 #else
3348 $ac_func();
3349 #endif
3350
3351 ; return 0; }
3352 EOF
3353 if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3354   rm -rf conftest*
3355   eval "ac_cv_func_$ac_func=yes"
3356 else
3357   echo "configure: failed program was:" >&5
3358   cat conftest.$ac_ext >&5
3359   rm -rf conftest*
3360   eval "ac_cv_func_$ac_func=no"
3361 fi
3362 rm -f conftest*
3363 fi
3364
3365 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3366   echo "$ac_t""yes" 1>&6
3367     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3368   cat >> confdefs.h <<EOF
3369 #define $ac_tr_func 1
3370 EOF
3371  
3372 else
3373   echo "$ac_t""no" 1>&6
3374 fi
3375 done
3376
3377 for ac_func in \
3378         crypt \
3379         strncasecmp \
3380         strcasecmp \
3381         inet_aton \
3382         gethostname \
3383         setlinebuf \
3384         getusershell \
3385         endusershell
3386
3387 do
3388 echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
3389 echo "configure:3390: checking whether $ac_func must be declared" >&5
3390 if eval "test \"`echo '$''{'radius_cv_decl_needed_$ac_func'+set}'`\" = set"; then
3391   echo $ac_n "(cached) $ac_c" 1>&6
3392 else
3393   cat > conftest.$ac_ext <<EOF
3394 #line 3395 "configure"
3395 #include "confdefs.h"
3396
3397 #include <stdio.h>
3398 #include <string.h>
3399 #ifdef HAVE_UNISTD_H
3400 #include <unistd.h>
3401 #endif
3402 #ifdef HAVE_CRYPT_H
3403 #include <crypt.h>
3404 #endif
3405 #ifdef HAVE_ERRNO_H
3406 #include <errno.h>
3407 #endif
3408 #ifdef HAVE_RESOURCE_H
3409 #include <resource.h>
3410 #endif
3411 #ifdef HAVE_GETOPT_H
3412 #include <getopt.h>
3413 #endif
3414 #ifdef HAVE_MALLOC_H
3415 #include <malloc.h>
3416 #endif
3417 #ifdef HAVE_UTMP_H
3418 #include <utmp.h>
3419 #endif
3420 #ifdef HAVE_UTMPX_H
3421 #include <utmpx.h>
3422 #endif
3423 #ifdef HAVE_SYS_SELECT_H
3424 #include <sys/select.h>
3425 #endif
3426 #ifdef HAVE_DLFCN_H
3427 #include <dlfcn.h>
3428 #endif
3429 #ifdef HAVE_REGEX_H
3430 #include <regex.h>
3431 #endif
3432 #ifdef HAVE_SYSLOG_H
3433 #include <syslog.h>
3434 #endif
3435 #ifdef HAVE_INTTYPES_H
3436 #include <inttypes.h>
3437 #endif
3438 #ifdef HAVE_STDINT_H
3439 #include <stdint.h>
3440 #endif
3441 #ifdef HAVE_ARPA_INET_H
3442 #include <arpa/inet.h>
3443 #endif
3444
3445 int main() {
3446 char *(*pfn) = (char *(*)) $ac_func
3447 ; return 0; }
3448 EOF
3449 if { (eval echo configure:3450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3450   rm -rf conftest*
3451   eval "radius_cv_decl_needed_$ac_func=no"
3452 else
3453   echo "configure: failed program was:" >&5
3454   cat conftest.$ac_ext >&5
3455   rm -rf conftest*
3456   eval "radius_cv_decl_needed_$ac_func=yes"
3457 fi
3458 rm -f conftest*
3459 fi
3460
3461 if eval "test \"`echo '$radius_cv_decl_needed_'$ac_func`\" = yes"; then
3462   echo "$ac_t""yes" 1>&6
3463   radius_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3464   cat >> confdefs.h <<EOF
3465 #define $radius_tr_decl 1
3466 EOF
3467
3468 else
3469   echo "$ac_t""no" 1>&6
3470 fi
3471
3472 done
3473
3474
3475 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3476 echo "configure:3477: checking return type of signal handlers" >&5
3477 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3478   echo $ac_n "(cached) $ac_c" 1>&6
3479 else
3480   cat > conftest.$ac_ext <<EOF
3481 #line 3482 "configure"
3482 #include "confdefs.h"
3483 #include <sys/types.h>
3484 #include <signal.h>
3485 #ifdef signal
3486 #undef signal
3487 #endif
3488 #ifdef __cplusplus
3489 extern "C" void (*signal (int, void (*)(int)))(int);
3490 #else
3491 void (*signal ()) ();
3492 #endif
3493
3494 int main() {
3495 int i;
3496 ; return 0; }
3497 EOF
3498 if { (eval echo configure:3499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3499   rm -rf conftest*
3500   ac_cv_type_signal=void
3501 else
3502   echo "configure: failed program was:" >&5
3503   cat conftest.$ac_ext >&5
3504   rm -rf conftest*
3505   ac_cv_type_signal=int
3506 fi
3507 rm -f conftest*
3508 fi
3509
3510 echo "$ac_t""$ac_cv_type_signal" 1>&6
3511 cat >> confdefs.h <<EOF
3512 #define RETSIGTYPE $ac_cv_type_signal
3513 EOF
3514
3515
3516
3517 if test "x$ac_cv_header_utmpx_h" = "xyes"
3518 then
3519  
3520   echo $ac_n "checking for ut_xtime in struct utmpx""... $ac_c" 1>&6
3521 echo "configure:3522: checking for ut_xtime in struct utmpx" >&5
3522
3523
3524   cat > conftest.$ac_ext <<EOF
3525 #line 3526 "configure"
3526 #include "confdefs.h"
3527
3528 #include <utmpx.h>
3529 #ifndef offsetof
3530 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
3531 #endif
3532
3533 int main() {
3534  int foo = offsetof(struct utmpx, ut_xtime) 
3535 ; return 0; }
3536 EOF
3537 if { (eval echo configure:3538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3538   rm -rf conftest*
3539   has_element=" "
3540 else
3541   echo "configure: failed program was:" >&5
3542   cat conftest.$ac_ext >&5
3543   rm -rf conftest*
3544   has_element=
3545 fi
3546 rm -f conftest*
3547
3548   ac_safe_type=`echo "struct utmpx" | sed 'y% %_%'`
3549   if test "x$has_element" != "x"; then
3550     echo "$ac_t""yes" 1>&6
3551     eval "ac_cv_type_${ac_safe_type}_has_ut_xtime=yes"
3552   else
3553     echo "$ac_t""no" 1>&6 
3554     eval "ac_cv_type_${ac_safe_type}_has_ut_xtime="
3555  fi
3556
3557  if test "x$ac_cv_type_struct_utmpx_ut_xtime" = "x"
3558  then
3559    cat >> confdefs.h <<\EOF
3560 #define ut_xtime ut_tv.tv_sec
3561 EOF
3562
3563  fi
3564 fi
3565
3566
3567 echo $ac_n "checking for working const""... $ac_c" 1>&6
3568 echo "configure:3569: checking for working const" >&5
3569 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3570   echo $ac_n "(cached) $ac_c" 1>&6
3571 else
3572   cat > conftest.$ac_ext <<EOF
3573 #line 3574 "configure"
3574 #include "confdefs.h"
3575
3576 int main() {
3577
3578 /* Ultrix mips cc rejects this.  */
3579 typedef int charset[2]; const charset x;
3580 /* SunOS 4.1.1 cc rejects this.  */
3581 char const *const *ccp;
3582 char **p;
3583 /* NEC SVR4.0.2 mips cc rejects this.  */
3584 struct point {int x, y;};
3585 static struct point const zero = {0,0};
3586 /* AIX XL C 1.02.0.0 rejects this.
3587    It does not let you subtract one const X* pointer from another in an arm
3588    of an if-expression whose if-part is not a constant expression */
3589 const char *g = "string";
3590 ccp = &g + (g ? g-g : 0);
3591 /* HPUX 7.0 cc rejects these. */
3592 ++ccp;
3593 p = (char**) ccp;
3594 ccp = (char const *const *) p;
3595 { /* SCO 3.2v4 cc rejects this.  */
3596   char *t;
3597   char const *s = 0 ? (char *) 0 : (char const *) 0;
3598
3599   *t++ = 0;
3600 }
3601 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3602   int x[] = {25, 17};
3603   const int *foo = &x[0];
3604   ++foo;
3605 }
3606 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3607   typedef const int *iptr;
3608   iptr p = 0;
3609   ++p;
3610 }
3611 { /* AIX XL C 1.02.0.0 rejects this saying
3612      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3613   struct s { int j; const int *ap[3]; };
3614   struct s *b; b->j = 5;
3615 }
3616 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3617   const int foo = 10;
3618 }
3619
3620 ; return 0; }
3621 EOF
3622 if { (eval echo configure:3623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3623   rm -rf conftest*
3624   ac_cv_c_const=yes
3625 else
3626   echo "configure: failed program was:" >&5
3627   cat conftest.$ac_ext >&5
3628   rm -rf conftest*
3629   ac_cv_c_const=no
3630 fi
3631 rm -f conftest*
3632 fi
3633
3634 echo "$ac_t""$ac_cv_c_const" 1>&6
3635 if test $ac_cv_c_const = no; then
3636   cat >> confdefs.h <<\EOF
3637 #define const 
3638 EOF
3639
3640 fi
3641  
3642
3643 echo $ac_n "checking type of OS""... $ac_c" 1>&6
3644 echo "configure:3645: checking type of OS" >&5
3645 OS=`uname -s`
3646 echo "$ac_t""$OS" 1>&6
3647 if test "$OS" = "OS/2"; then
3648         LIBPREFIX=
3649 else
3650         LIBPREFIX=lib
3651 fi
3652
3653
3654 if test "x$GCC" = "xyes"; then
3655     CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
3656 fi
3657
3658 echo $ac_n "checking for developer gcc flags""... $ac_c" 1>&6
3659 echo "configure:3660: checking for developer gcc flags" >&5
3660 if test "x$developer" = "xyes" -a "x$GCC" = "xyes"; then
3661   devflags="-g -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs"
3662   CFLAGS="$CFLAGS $devflags"
3663   INSTALLSTRIP=""
3664   echo "$ac_t""yes.  Using $devflags" 1>&6
3665 else
3666   devflags=""
3667   CFLAGS="$CFLAGS -DNDEBUG"
3668   INSTALLSTRIP="-s"
3669   echo "$ac_t""no." 1>&6
3670 fi
3671
3672
3673 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
3674 echo "configure:3675: checking for crypt in -lcrypt" >&5
3675 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
3676 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3677   echo $ac_n "(cached) $ac_c" 1>&6
3678 else
3679   ac_save_LIBS="$LIBS"
3680 LIBS="-lcrypt  $LIBS"
3681 cat > conftest.$ac_ext <<EOF
3682 #line 3683 "configure"
3683 #include "confdefs.h"
3684 /* Override any gcc2 internal prototype to avoid an error.  */
3685 /* We use char because int might match the return type of a gcc2
3686     builtin and then its argument prototype would still apply.  */
3687 char crypt();
3688
3689 int main() {
3690 crypt()
3691 ; return 0; }
3692 EOF
3693 if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3694   rm -rf conftest*
3695   eval "ac_cv_lib_$ac_lib_var=yes"
3696 else
3697   echo "configure: failed program was:" >&5
3698   cat conftest.$ac_ext >&5
3699   rm -rf conftest*
3700   eval "ac_cv_lib_$ac_lib_var=no"
3701 fi
3702 rm -f conftest*
3703 LIBS="$ac_save_LIBS"
3704
3705 fi
3706 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3707   echo "$ac_t""yes" 1>&6
3708   CRYPTLIB="-lcrypt"
3709
3710 else
3711   echo "$ac_t""no" 1>&6
3712 fi
3713
3714 if test "$CRYPTLIB" != ""; then
3715   cat >> confdefs.h <<\EOF
3716 #define HAVE_CRYPT 1
3717 EOF
3718
3719 else
3720   echo $ac_n "checking for crypt""... $ac_c" 1>&6
3721 echo "configure:3722: checking for crypt" >&5
3722 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
3723   echo $ac_n "(cached) $ac_c" 1>&6
3724 else
3725   cat > conftest.$ac_ext <<EOF
3726 #line 3727 "configure"
3727 #include "confdefs.h"
3728 /* System header to define __stub macros and hopefully few prototypes,
3729     which can conflict with char crypt(); below.  */
3730 #include <assert.h>
3731 /* Override any gcc2 internal prototype to avoid an error.  */
3732 /* We use char because int might match the return type of a gcc2
3733     builtin and then its argument prototype would still apply.  */
3734 char crypt();
3735
3736 int main() {
3737
3738 /* The GNU C library defines this for functions which it implements
3739     to always fail with ENOSYS.  Some functions are actually named
3740     something starting with __ and the normal name is an alias.  */
3741 #if defined (__stub_crypt) || defined (__stub___crypt)
3742 choke me
3743 #else
3744 crypt();
3745 #endif
3746
3747 ; return 0; }
3748 EOF
3749 if { (eval echo configure:3750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3750   rm -rf conftest*
3751   eval "ac_cv_func_crypt=yes"
3752 else
3753   echo "configure: failed program was:" >&5
3754   cat conftest.$ac_ext >&5
3755   rm -rf conftest*
3756   eval "ac_cv_func_crypt=no"
3757 fi
3758 rm -f conftest*
3759 fi
3760
3761 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
3762   echo "$ac_t""yes" 1>&6
3763   cat >> confdefs.h <<\EOF
3764 #define HAVE_CRYPT 1
3765 EOF
3766
3767 else
3768   echo "$ac_t""no" 1>&6
3769 fi
3770
3771 fi
3772
3773 echo $ac_n "checking for setkey in -lcipher""... $ac_c" 1>&6
3774 echo "configure:3775: checking for setkey in -lcipher" >&5
3775 ac_lib_var=`echo cipher'_'setkey | sed 'y%./+-%__p_%'`
3776 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3777   echo $ac_n "(cached) $ac_c" 1>&6
3778 else
3779   ac_save_LIBS="$LIBS"
3780 LIBS="-lcipher  $LIBS"
3781 cat > conftest.$ac_ext <<EOF
3782 #line 3783 "configure"
3783 #include "confdefs.h"
3784 /* Override any gcc2 internal prototype to avoid an error.  */
3785 /* We use char because int might match the return type of a gcc2
3786     builtin and then its argument prototype would still apply.  */
3787 char setkey();
3788
3789 int main() {
3790 setkey()
3791 ; return 0; }
3792 EOF
3793 if { (eval echo configure:3794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3794   rm -rf conftest*
3795   eval "ac_cv_lib_$ac_lib_var=yes"
3796 else
3797   echo "configure: failed program was:" >&5
3798   cat conftest.$ac_ext >&5
3799   rm -rf conftest*
3800   eval "ac_cv_lib_$ac_lib_var=no"
3801 fi
3802 rm -f conftest*
3803 LIBS="$ac_save_LIBS"
3804
3805 fi
3806 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3807   echo "$ac_t""yes" 1>&6
3808   CRYPTLIB="${CRYPTLIB} -lcipher"
3809
3810 else
3811   echo "$ac_t""no" 1>&6
3812 fi
3813
3814
3815
3816 if test "x$WITH_SNMP" = "xyes"; then
3817   
3818         
3819         
3820
3821 echo $ac_n "checking for asn1.h""... $ac_c" 1>&6
3822 echo "configure:3823: checking for asn1.h" >&5
3823
3824 cat > conftest.$ac_ext <<EOF
3825 #line 3826 "configure"
3826 #include "confdefs.h"
3827
3828 #ifdef HAVE_SYS_TYPES_H
3829 #include <sys/types.h>
3830 #endif
3831 #ifdef HAVE_STDINT_H
3832 #include <stdint.h>
3833 #endif
3834 #ifdef HAVE_STDIO_H
3835 #include <stdio.h>
3836 #endif
3837 #ifdef HAVE_NETDB_H
3838 #include <netdb.h>
3839 #endif
3840 #ifdef HAVE_UNISTD_H
3841 #include <unistd.h>
3842 #endif
3843 #include <asn1.h>
3844 int main() {
3845  int a = 1;
3846 ; return 0; }
3847 EOF
3848 if { (eval echo configure:3849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3849   rm -rf conftest*
3850   SNMP_INCLUDE=""
3851 else
3852   echo "configure: failed program was:" >&5
3853   cat conftest.$ac_ext >&5
3854   rm -rf conftest*
3855   SNMP_INCLUDE=
3856 fi
3857 rm -f conftest*
3858
3859 if test "x$SNMP_INCLUDE" = "x"; then
3860   old_CFLAGS="$CFLAGS"
3861   for try in /usr/include/ucd-snmp /usr/local/include/ucd-snmp $snmp_include_dir; do
3862     CFLAGS="$old_CFLAGS -I$try"
3863     cat > conftest.$ac_ext <<EOF
3864 #line 3865 "configure"
3865 #include "confdefs.h"
3866
3867 #ifdef HAVE_SYS_TYPES_H
3868 #include <sys/types.h>
3869 #endif
3870 #ifdef HAVE_STDINT_H
3871 #include <stdint.h>
3872 #endif
3873 #ifdef HAVE_STDIO_H
3874 #include <stdio.h>
3875 #endif
3876 #ifdef HAVE_NETDB_H
3877 #include <netdb.h>
3878 #endif
3879 #ifdef HAVE_UNISTD_H
3880 #include <unistd.h>
3881 #endif
3882 #include <asn1.h>
3883 int main() {
3884  int a = 1;
3885 ; return 0; }
3886 EOF
3887 if { (eval echo configure:3888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3888   rm -rf conftest*
3889   SNMP_INCLUDE="-I$try"
3890 else
3891   echo "configure: failed program was:" >&5
3892   cat conftest.$ac_ext >&5
3893   rm -rf conftest*
3894   SNMP_INCLUDE=
3895 fi
3896 rm -f conftest*
3897     if test "x$SNMP_INCLUDE" != "x"; then
3898       break;
3899     fi
3900   done
3901   CFLAGS="$old_CFLAGS"
3902 fi
3903
3904 if test "x$SNMP_INCLUDE" = "x"; then
3905   echo "$ac_t""no" 1>&6
3906 else
3907   echo "$ac_t""yes" 1>&6
3908   cat >> confdefs.h <<\EOF
3909 #define HAVE_ASN1_H 1
3910 EOF
3911
3912   
3913   old_CFLAGS="$CFLAGS"
3914   CFLAGS="$CFLAGS $SNMP_INCLUDE"
3915
3916   echo $ac_n "checking for snmp.h""... $ac_c" 1>&6
3917 echo "configure:3918: checking for snmp.h" >&5
3918     cat > conftest.$ac_ext <<EOF
3919 #line 3920 "configure"
3920 #include "confdefs.h"
3921
3922 #ifdef HAVE_SYS_TYPES_H
3923 #include <sys/types.h>
3924 #endif
3925 #ifdef HAVE_STDINT_H
3926 #include <stdint.h>
3927 #endif
3928 #ifdef HAVE_STDIO_H
3929 #include <stdio.h>
3930 #endif
3931 #ifdef HAVE_NETDB_H
3932 #include <netdb.h>
3933 #endif
3934 #ifdef HAVE_UNISTD_H
3935 #include <unistd.h>
3936 #endif
3937 #ifdef HAVE_ASN1_H
3938 #include <asn1.h>
3939 #endif
3940 #include <snmp.h>
3941 int main() {
3942  int a = 1;
3943 ; return 0; }
3944 EOF
3945 if { (eval echo configure:3946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3946   rm -rf conftest*
3947   cat >> confdefs.h <<\EOF
3948 #define HAVE_SNMP_H 1
3949 EOF
3950  ac_cv_header_snmp_h=yes
3951 else
3952   echo "configure: failed program was:" >&5
3953   cat conftest.$ac_ext >&5
3954 fi
3955 rm -f conftest*
3956     if test "x$ac_cv_header_snmp_h" = "xyes"; then
3957       echo "$ac_t""yes" 1>&6
3958     else
3959       echo "$ac_t""no" 1>&6
3960     fi
3961
3962     echo $ac_n "checking for snmp_impl.h""... $ac_c" 1>&6
3963 echo "configure:3964: checking for snmp_impl.h" >&5
3964     cat > conftest.$ac_ext <<EOF
3965 #line 3966 "configure"
3966 #include "confdefs.h"
3967
3968 #ifdef HAVE_SYS_TYPES_H
3969 #include <sys/types.h>
3970 #endif
3971 #ifdef HAVE_STDINT_H
3972 #include <stdint.h>
3973 #endif
3974 #ifdef HAVE_STDIO_H
3975 #include <stdio.h>
3976 #endif
3977 #ifdef HAVE_NETDB_H
3978 #include <netdb.h>
3979 #endif
3980 #ifdef HAVE_UNISTD_H
3981 #include <unistd.h>
3982 #endif
3983 #ifdef HAVE_ASN1_H
3984 #include <asn1.h>
3985 #endif
3986 #ifdef HAVE_SNMP_H
3987 #include <snmp.h>
3988 #endif
3989 #include <snmp_impl.h>
3990 int main() {
3991  int a = 1;
3992 ; return 0; }
3993 EOF
3994 if { (eval echo configure:3995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3995   rm -rf conftest*
3996   cat >> confdefs.h <<\EOF
3997 #define HAVE_SNMP_IMPL_H 1
3998 EOF
3999  ac_cv_header_snmp_impl_h=yes
4000 else
4001   echo "configure: failed program was:" >&5
4002   cat conftest.$ac_ext >&5
4003 fi
4004 rm -f conftest*
4005     if test "x$ac_cv_header_snmp_h" = "xyes"; then
4006       echo "$ac_t""yes" 1>&6
4007     else
4008       echo "$ac_t""no" 1>&6
4009     fi
4010
4011   echo $ac_n "checking for snmp_build_var_op in -lsnmp""... $ac_c" 1>&6
4012 echo "configure:4013: checking for snmp_build_var_op in -lsnmp" >&5
4013
4014   old_LIBS="$LIBS"
4015   LIBS="$old_LIBS -lsnmp"
4016   cat > conftest.$ac_ext <<EOF
4017 #line 4018 "configure"
4018 #include "confdefs.h"
4019 extern char snmp_build_var_op();
4020 int main() {
4021  snmp_build_var_op()
4022 ; return 0; }
4023 EOF
4024 if { (eval echo configure:4025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4025   rm -rf conftest*
4026   SNMP_LIBS="-lsnmp"
4027 else
4028   echo "configure: failed program was:" >&5
4029   cat conftest.$ac_ext >&5
4030   rm -rf conftest*
4031   SNMP_LIBS=
4032 fi
4033 rm -f conftest*
4034
4035   if test "x$SNMP_LIBS" = "x"; then
4036     for try in /usr/lib /usr/local/lib /usr/local/snmp/lib $snmp_lib_dir; do
4037       LIBS="$old_LIBS -L$try -lsnmp"
4038       cat > conftest.$ac_ext <<EOF
4039 #line 4040 "configure"
4040 #include "confdefs.h"
4041 extern char snmp_build_var_op();
4042 int main() {
4043  snmp_build_var_op()
4044 ; return 0; }
4045 EOF
4046 if { (eval echo configure:4047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4047   rm -rf conftest*
4048   SNMP_LIBS="-L$try -lsnmp"
4049 else
4050   echo "configure: failed program was:" >&5
4051   cat conftest.$ac_ext >&5
4052   rm -rf conftest*
4053   SNMP_LIBS=
4054 fi
4055 rm -f conftest*
4056       if test "x$SNMP_LIBS" != "x"; then
4057         break;
4058       fi
4059       LIBS="$old_LIBS -L$try -lsnmp -lcrypto"
4060       cat > conftest.$ac_ext <<EOF
4061 #line 4062 "configure"
4062 #include "confdefs.h"
4063 extern char snmp_build_var_op();
4064 int main() {
4065  snmp_build_var_op()
4066 ; return 0; }
4067 EOF
4068 if { (eval echo configure:4069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4069   rm -rf conftest*
4070   SNMP_LIBS="-L$try -lsnmp -lcrypto"
4071 else
4072   echo "configure: failed program was:" >&5
4073   cat conftest.$ac_ext >&5
4074   rm -rf conftest*
4075   SNMP_LIBS=
4076 fi
4077 rm -f conftest*
4078       if test "x$SNMP_LIBS" != "x"; then
4079         break;
4080       fi
4081     done
4082   fi
4083   LIBS="$old_LIBS"
4084
4085           CFLAGS="$old_CFLAGS"
4086   if test "x$SNMP_LIBS" = "x"; then
4087     echo "$ac_t""no" 1>&6
4088     SNMP_INCLUDE=
4089   else
4090     echo "$ac_t""yes" 1>&6
4091     cat >> confdefs.h <<\EOF
4092 #define WITH_SNMP 1
4093 EOF
4094
4095     cat >> confdefs.h <<\EOF
4096 #define HAVE_LIBSNMP 1
4097 EOF
4098
4099   fi
4100 fi
4101
4102 fi
4103
4104 if test "X$ac_cv_func_sem_init" = "Xno"; then
4105
4106  echo $ac_n "checking for sem_init in -lposix4""... $ac_c" 1>&6
4107 echo "configure:4108: checking for sem_init in -lposix4" >&5
4108 ac_lib_var=`echo posix4'_'sem_init | sed 'y%./+-%__p_%'`
4109 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4110   echo $ac_n "(cached) $ac_c" 1>&6
4111 else
4112   ac_save_LIBS="$LIBS"
4113 LIBS="-lposix4  $LIBS"
4114 cat > conftest.$ac_ext <<EOF
4115 #line 4116 "configure"
4116 #include "confdefs.h"
4117 /* Override any gcc2 internal prototype to avoid an error.  */
4118 /* We use char because int might match the return type of a gcc2
4119     builtin and then its argument prototype would still apply.  */
4120 char sem_init();
4121
4122 int main() {
4123 sem_init()
4124 ; return 0; }
4125 EOF
4126 if { (eval echo configure:4127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4127   rm -rf conftest*
4128   eval "ac_cv_lib_$ac_lib_var=yes"
4129 else
4130   echo "configure: failed program was:" >&5
4131   cat conftest.$ac_ext >&5
4132   rm -rf conftest*
4133   eval "ac_cv_lib_$ac_lib_var=no"
4134 fi
4135 rm -f conftest*
4136 LIBS="$ac_save_LIBS"
4137
4138 fi
4139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4140   echo "$ac_t""yes" 1>&6
4141     ac_tr_lib=HAVE_LIB`echo posix4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4142     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4143   cat >> confdefs.h <<EOF
4144 #define $ac_tr_lib 1
4145 EOF
4146
4147   LIBS="-lposix4 $LIBS"
4148
4149 else
4150   echo "$ac_t""no" 1>&6
4151 fi
4152
4153
4154   if test "X$ac_cv_lib_posix4_sem_init" = "X"; then
4155     if test "$WITH_THREAD_POOL" = "yes"; then
4156       echo "configure: warning: You do not have posix semaphores.  Disabling thread pools" 1>&2
4157     fi
4158     WITH_THREAD_POOL=no
4159   fi
4160 fi
4161
4162
4163 gethostbyaddrrstyle=""
4164 echo $ac_n "checking gethostbyaddr_r() syntax""... $ac_c" 1>&6
4165 echo "configure:4166: checking gethostbyaddr_r() syntax" >&5
4166 cat > conftest.$ac_ext <<EOF
4167 #line 4168 "configure"
4168 #include "confdefs.h"
4169 #include <netdb.h>
4170 int main() {
4171  gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL)  
4172 ; return 0; }
4173 EOF
4174 if { (eval echo configure:4175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4175   rm -rf conftest*
4176   
4177         cat >> confdefs.h <<\EOF
4178 #define GETHOSTBYADDRRSTYLE SYSVSTYLE
4179 EOF
4180
4181         gethostbyaddrrstyle=SYSV
4182
4183 else
4184   echo "configure: failed program was:" >&5
4185   cat conftest.$ac_ext >&5
4186 fi
4187 rm -f conftest*
4188 cat > conftest.$ac_ext <<EOF
4189 #line 4190 "configure"
4190 #include "confdefs.h"
4191 #include <netdb.h>
4192 int main() {
4193  gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL, NULL) 
4194 ; return 0; }
4195 EOF
4196 if { (eval echo configure:4197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4197   rm -rf conftest*
4198   
4199         cat >> confdefs.h <<\EOF
4200 #define GETHOSTBYADDRRSTYLE GNUSTYLE
4201 EOF
4202
4203         gethostbyaddrrstyle=GNU
4204
4205 else
4206   echo "configure: failed program was:" >&5
4207   cat conftest.$ac_ext >&5
4208 fi
4209 rm -f conftest*
4210
4211 cat > conftest.$ac_ext <<EOF
4212 #line 4213 "configure"
4213 #include "confdefs.h"
4214 #include <netdb.h>
4215 int main() {
4216  gethostbyaddr(NULL, 0, 0)  
4217 ; return 0; }
4218 EOF
4219 if { (eval echo configure:4220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4220   rm -rf conftest*
4221   
4222         cat >> confdefs.h <<\EOF
4223 #define GETHOSTBYADDRRSTYLE BSDSTYLE
4224 EOF
4225
4226         gethostbyaddrrstyle=BSD
4227
4228 else
4229   echo "configure: failed program was:" >&5
4230   cat conftest.$ac_ext >&5
4231 fi
4232 rm -f conftest*
4233
4234 if test "x$gethostbyaddrrstyle" = "x"; then
4235         echo "$ac_t""none!  It must not exist, here." 1>&6
4236 else
4237         echo "$ac_t""${gethostbyaddrrstyle}-style" 1>&6
4238 fi
4239
4240
4241
4242 LIBTOOL="`pwd`/libtool"
4243
4244
4245
4246 top_builddir=`pwd`
4247
4248
4249
4250 if test "$WITH_THREAD_POOL" = "yes"; then
4251         if test "$WITH_THREADS" != "yes"; then
4252     { echo "configure: error: You must have threads enabled for thread pools to work." 1>&2; exit 1; }
4253   fi
4254
4255         if test "X$PTHREADLIB" = "X"; then
4256     { echo "configure: error: You must have threading libraries for thread pools to work." 1>&2; exit 1; }
4257   fi
4258
4259 fi
4260
4261
4262 mysubdirs=
4263 if test "x$EXPERIMENTAL" = "xyes"; then
4264   for foo in `find src/modules -name configure -print`; do
4265     bar=`echo $foo | sed 's%/configure$%%g'`
4266     mysubdirs="$mysubdirs $bar"
4267   done
4268 else
4269             for foo in `find \`cat src/modules/stable | sed 's%rlm%src/modules/rlm%g'\` -name configure -print`; do
4270     bar=`echo $foo | sed 's%/configure$%%g'`
4271     mysubdirs="$mysubdirs $bar"
4272   done
4273 fi
4274
4275 MODULES=
4276 if test "x$EXPERIMENTAL" = "xyes"; then
4277   for foo in `ls src/modules | grep rlm_`; do
4278     MODULES="$MODULES $foo"
4279   done
4280 else
4281             for foo in `cat src/modules/stable`; do
4282     MODULES="$MODULES $foo"
4283    done
4284 fi
4285
4286 subdirs="libltdl $mysubdirs"
4287
4288
4289
4290
4291
4292
4293
4294 USE_SHARED_LIBS=$enable_shared
4295
4296 USE_STATIC_LIBS=$enable_static
4297
4298
4299
4300
4301
4302 export CFLAGS LIBS
4303
4304 trap '' 1 2 15
4305 cat > confcache <<\EOF
4306 # This file is a shell script that caches the results of configure
4307 # tests run on this system so they can be shared between configure
4308 # scripts and configure runs.  It is not useful on other systems.
4309 # If it contains results you don't want to keep, you may remove or edit it.
4310 #
4311 # By default, configure uses ./config.cache as the cache file,
4312 # creating it if it does not exist already.  You can give configure
4313 # the --cache-file=FILE option to use a different cache file; that is
4314 # what configure does when it calls configure scripts in
4315 # subdirectories, so they share the cache.
4316 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4317 # config.status only pays attention to the cache file if you give it the
4318 # --recheck option to rerun configure.
4319 #
4320 EOF
4321 # The following way of writing the cache mishandles newlines in values,
4322 # but we know of no workaround that is simple, portable, and efficient.
4323 # So, don't put newlines in cache variables' values.
4324 # Ultrix sh set writes to stderr and can't be redirected directly,
4325 # and sets the high bit in the cache file unless we assign to the vars.
4326 (set) 2>&1 |
4327   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4328   *ac_space=\ *)
4329     # `set' does not quote correctly, so add quotes (double-quote substitution
4330     # turns \\\\ into \\, and sed turns \\ into \).
4331     sed -n \
4332       -e "s/'/'\\\\''/g" \
4333       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4334     ;;
4335   *)
4336     # `set' quotes correctly as required by POSIX, so do not add quotes.
4337     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4338     ;;
4339   esac >> confcache
4340 if cmp -s $cache_file confcache; then
4341   :
4342 else
4343   if test -w $cache_file; then
4344     echo "updating cache $cache_file"
4345     cat confcache > $cache_file
4346   else
4347     echo "not updating unwritable cache $cache_file"
4348   fi
4349 fi
4350 rm -f confcache
4351
4352 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4353
4354 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4355 # Let make expand exec_prefix.
4356 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4357
4358 # Any assignment to VPATH causes Sun make to only execute
4359 # the first set of double-colon rules, so remove it if not needed.
4360 # If there is a colon in the path, we need to keep it.
4361 if test "x$srcdir" = x.; then
4362   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4363 fi
4364
4365 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4366
4367 DEFS=-DHAVE_CONFIG_H
4368
4369 # Without the "./", some shells look in PATH for config.status.
4370 : ${CONFIG_STATUS=./config.status}
4371
4372 echo creating $CONFIG_STATUS
4373 rm -f $CONFIG_STATUS
4374 cat > $CONFIG_STATUS <<EOF
4375 #! /bin/sh
4376 # Generated automatically by configure.
4377 # Run this file to recreate the current configuration.
4378 # This directory was configured as follows,
4379 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4380 #
4381 # $0 $ac_configure_args
4382 #
4383 # Compiler output produced by configure, useful for debugging
4384 # configure, is in ./config.log if it exists.
4385
4386 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4387 for ac_option
4388 do
4389   case "\$ac_option" in
4390   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4391     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4392     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4393   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4394     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4395     exit 0 ;;
4396   -help | --help | --hel | --he | --h)
4397     echo "\$ac_cs_usage"; exit 0 ;;
4398   *) echo "\$ac_cs_usage"; exit 1 ;;
4399   esac
4400 done
4401
4402 ac_given_srcdir=$srcdir
4403
4404 trap 'rm -fr `echo "\
4405         ./Make.inc \
4406         ./src/include/build-radpaths-h \
4407         ./src/main/checkrad.pl \
4408         ./src/main/radlast \
4409         ./src/main/radtest \
4410         ./scripts/rc.radiusd \
4411         ./scripts/radwatch \
4412         ./scripts/check-radiusd-config \
4413         ./scripts/radiusd.cron.daily \
4414         ./scripts/radiusd.cron.monthly \
4415         ./scripts/cryptpasswd \
4416         ./raddb/radiusd.conf
4417  src/include/autoconf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4418 EOF
4419 cat >> $CONFIG_STATUS <<EOF
4420
4421 # Protect against being on the right side of a sed subst in config.status.
4422 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4423  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4424 $ac_vpsub
4425 $extrasub
4426 s%@SHELL@%$SHELL%g
4427 s%@CFLAGS@%$CFLAGS%g
4428 s%@CPPFLAGS@%$CPPFLAGS%g
4429 s%@CXXFLAGS@%$CXXFLAGS%g
4430 s%@FFLAGS@%$FFLAGS%g
4431 s%@DEFS@%$DEFS%g
4432 s%@LDFLAGS@%$LDFLAGS%g
4433 s%@LIBS@%$LIBS%g
4434 s%@exec_prefix@%$exec_prefix%g
4435 s%@prefix@%$prefix%g
4436 s%@program_transform_name@%$program_transform_name%g
4437 s%@bindir@%$bindir%g
4438 s%@sbindir@%$sbindir%g
4439 s%@libexecdir@%$libexecdir%g
4440 s%@datadir@%$datadir%g
4441 s%@sysconfdir@%$sysconfdir%g
4442 s%@sharedstatedir@%$sharedstatedir%g
4443 s%@localstatedir@%$localstatedir%g
4444 s%@libdir@%$libdir%g
4445 s%@includedir@%$includedir%g
4446 s%@oldincludedir@%$oldincludedir%g
4447 s%@infodir@%$infodir%g
4448 s%@mandir@%$mandir%g
4449 s%@CC@%$CC%g
4450 s%@CPP@%$CPP%g
4451 s%@RANLIB@%$RANLIB%g
4452 s%@GMAKE@%$GMAKE%g
4453 s%@MAKE@%$MAKE%g
4454 s%@host@%$host%g
4455 s%@host_alias@%$host_alias%g
4456 s%@host_cpu@%$host_cpu%g
4457 s%@host_vendor@%$host_vendor%g
4458 s%@host_os@%$host_os%g
4459 s%@build@%$build%g
4460 s%@build_alias@%$build_alias%g
4461 s%@build_cpu@%$build_cpu%g
4462 s%@build_vendor@%$build_vendor%g
4463 s%@build_os@%$build_os%g
4464 s%@LN_S@%$LN_S%g
4465 s%@LIBTOOL@%$LIBTOOL%g
4466 s%@logdir@%$logdir%g
4467 s%@radacctdir@%$radacctdir%g
4468 s%@raddbdir@%$raddbdir%g
4469 s%@subdirs@%$subdirs%g
4470 s%@PERL@%$PERL%g
4471 s%@SNMPGET@%$SNMPGET%g
4472 s%@SNMPWALK@%$SNMPWALK%g
4473 s%@RUSERS@%$RUSERS%g
4474 s%@ACLOCAL@%$ACLOCAL%g
4475 s%@AUTOCONF@%$AUTOCONF%g
4476 s%@AUTOHEADER@%$AUTOHEADER%g
4477 s%@LOCATE@%$LOCATE%g
4478 s%@DIRNAME@%$DIRNAME%g
4479 s%@GREP@%$GREP%g
4480 s%@REGEX@%$REGEX%g
4481 s%@REGEX_EXTENDED@%$REGEX_EXTENDED%g
4482 s%@LIBPREFIX@%$LIBPREFIX%g
4483 s%@CRYPTLIB@%$CRYPTLIB%g
4484 s%@SNMP_LIBS@%$SNMP_LIBS%g
4485 s%@SNMP_INCLUDE@%$SNMP_INCLUDE%g
4486 s%@LIBLTDL@%$LIBLTDL%g
4487 s%@INCLTDL@%$INCLTDL%g
4488 s%@top_builddir@%$top_builddir%g
4489 s%@MODULES@%$MODULES%g
4490 s%@INSTALLSTRIP@%$INSTALLSTRIP%g
4491 s%@USE_SHARED_LIBS@%$USE_SHARED_LIBS%g
4492 s%@USE_STATIC_LIBS@%$USE_STATIC_LIBS%g
4493 s%@STATIC_MODULES@%$STATIC_MODULES%g
4494 s%@RADIUSD_MAJOR_VERSION@%$RADIUSD_MAJOR_VERSION%g
4495 s%@RADIUSD_MINOR_VERSION@%$RADIUSD_MINOR_VERSION%g
4496 s%@RADIUSD_VERSION@%$RADIUSD_VERSION%g
4497
4498 CEOF
4499 EOF
4500
4501 cat >> $CONFIG_STATUS <<\EOF
4502
4503 # Split the substitutions into bite-sized pieces for seds with
4504 # small command number limits, like on Digital OSF/1 and HP-UX.
4505 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4506 ac_file=1 # Number of current file.
4507 ac_beg=1 # First line for current file.
4508 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4509 ac_more_lines=:
4510 ac_sed_cmds=""
4511 while $ac_more_lines; do
4512   if test $ac_beg -gt 1; then
4513     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4514   else
4515     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4516   fi
4517   if test ! -s conftest.s$ac_file; then
4518     ac_more_lines=false
4519     rm -f conftest.s$ac_file
4520   else
4521     if test -z "$ac_sed_cmds"; then
4522       ac_sed_cmds="sed -f conftest.s$ac_file"
4523     else
4524       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4525     fi
4526     ac_file=`expr $ac_file + 1`
4527     ac_beg=$ac_end
4528     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4529   fi
4530 done
4531 if test -z "$ac_sed_cmds"; then
4532   ac_sed_cmds=cat
4533 fi
4534 EOF
4535
4536 cat >> $CONFIG_STATUS <<EOF
4537
4538 CONFIG_FILES=\${CONFIG_FILES-"\
4539         ./Make.inc \
4540         ./src/include/build-radpaths-h \
4541         ./src/main/checkrad.pl \
4542         ./src/main/radlast \
4543         ./src/main/radtest \
4544         ./scripts/rc.radiusd \
4545         ./scripts/radwatch \
4546         ./scripts/check-radiusd-config \
4547         ./scripts/radiusd.cron.daily \
4548         ./scripts/radiusd.cron.monthly \
4549         ./scripts/cryptpasswd \
4550         ./raddb/radiusd.conf
4551 "}
4552 EOF
4553 cat >> $CONFIG_STATUS <<\EOF
4554 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4555   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4556   case "$ac_file" in
4557   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4558        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4559   *) ac_file_in="${ac_file}.in" ;;
4560   esac
4561
4562   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4563
4564   # Remove last slash and all that follows it.  Not all systems have dirname.
4565   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4566   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4567     # The file is in a subdirectory.
4568     test ! -d "$ac_dir" && mkdir "$ac_dir"
4569     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4570     # A "../" for each directory in $ac_dir_suffix.
4571     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4572   else
4573     ac_dir_suffix= ac_dots=
4574   fi
4575
4576   case "$ac_given_srcdir" in
4577   .)  srcdir=.
4578       if test -z "$ac_dots"; then top_srcdir=.
4579       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4580   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4581   *) # Relative path.
4582     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4583     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4584   esac
4585
4586
4587   echo creating "$ac_file"
4588   rm -f "$ac_file"
4589   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4590   case "$ac_file" in
4591   *Makefile*) ac_comsub="1i\\
4592 # $configure_input" ;;
4593   *) ac_comsub= ;;
4594   esac
4595
4596   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4597   sed -e "$ac_comsub
4598 s%@configure_input@%$configure_input%g
4599 s%@srcdir@%$srcdir%g
4600 s%@top_srcdir@%$top_srcdir%g
4601 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4602 fi; done
4603 rm -f conftest.s*
4604
4605 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4606 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4607 #
4608 # ac_d sets the value in "#define NAME VALUE" lines.
4609 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4610 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4611 ac_dC='\3'
4612 ac_dD='%g'
4613 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4614 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4615 ac_uB='\([      ]\)%\1#\2define\3'
4616 ac_uC=' '
4617 ac_uD='\4%g'
4618 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4619 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4620 ac_eB='$%\1#\2define\3'
4621 ac_eC=' '
4622 ac_eD='%g'
4623
4624 if test "${CONFIG_HEADERS+set}" != set; then
4625 EOF
4626 cat >> $CONFIG_STATUS <<EOF
4627   CONFIG_HEADERS="src/include/autoconf.h"
4628 EOF
4629 cat >> $CONFIG_STATUS <<\EOF
4630 fi
4631 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4632   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4633   case "$ac_file" in
4634   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4635        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4636   *) ac_file_in="${ac_file}.in" ;;
4637   esac
4638
4639   echo creating $ac_file
4640
4641   rm -f conftest.frag conftest.in conftest.out
4642   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4643   cat $ac_file_inputs > conftest.in
4644
4645 EOF
4646
4647 # Transform confdefs.h into a sed script conftest.vals that substitutes
4648 # the proper values into config.h.in to produce config.h.  And first:
4649 # Protect against being on the right side of a sed subst in config.status.
4650 # Protect against being in an unquoted here document in config.status.
4651 rm -f conftest.vals
4652 cat > conftest.hdr <<\EOF
4653 s/[\\&%]/\\&/g
4654 s%[\\$`]%\\&%g
4655 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4656 s%ac_d%ac_u%gp
4657 s%ac_u%ac_e%gp
4658 EOF
4659 sed -n -f conftest.hdr confdefs.h > conftest.vals
4660 rm -f conftest.hdr
4661
4662 # This sed command replaces #undef with comments.  This is necessary, for
4663 # example, in the case of _POSIX_SOURCE, which is predefined and required
4664 # on some systems where configure will not decide to define it.
4665 cat >> conftest.vals <<\EOF
4666 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4667 EOF
4668
4669 # Break up conftest.vals because some shells have a limit on
4670 # the size of here documents, and old seds have small limits too.
4671
4672 rm -f conftest.tail
4673 while :
4674 do
4675   ac_lines=`grep -c . conftest.vals`
4676   # grep -c gives empty output for an empty file on some AIX systems.
4677   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4678   # Write a limited-size here document to conftest.frag.
4679   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4680   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4681   echo 'CEOF
4682   sed -f conftest.frag conftest.in > conftest.out
4683   rm -f conftest.in
4684   mv conftest.out conftest.in
4685 ' >> $CONFIG_STATUS
4686   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4687   rm -f conftest.vals
4688   mv conftest.tail conftest.vals
4689 done
4690 rm -f conftest.vals
4691
4692 cat >> $CONFIG_STATUS <<\EOF
4693   rm -f conftest.frag conftest.h
4694   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4695   cat conftest.in >> conftest.h
4696   rm -f conftest.in
4697   if cmp -s $ac_file conftest.h 2>/dev/null; then
4698     echo "$ac_file is unchanged"
4699     rm -f conftest.h
4700   else
4701     # Remove last slash and all that follows it.  Not all systems have dirname.
4702       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4703       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4704       # The file is in a subdirectory.
4705       test ! -d "$ac_dir" && mkdir "$ac_dir"
4706     fi
4707     rm -f $ac_file
4708     mv conftest.h $ac_file
4709   fi
4710 fi; done
4711
4712 EOF
4713 cat >> $CONFIG_STATUS <<EOF
4714
4715 EOF
4716 cat >> $CONFIG_STATUS <<\EOF
4717
4718 exit 0
4719 EOF
4720 chmod +x $CONFIG_STATUS
4721 rm -fr confdefs* $ac_clean_files
4722 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4723
4724 if test "$no_recursion" != yes; then
4725
4726   # Remove --cache-file and --srcdir arguments so they do not pile up.
4727   ac_sub_configure_args=
4728   ac_prev=
4729   for ac_arg in $ac_configure_args; do
4730     if test -n "$ac_prev"; then
4731       ac_prev=
4732       continue
4733     fi
4734     case "$ac_arg" in
4735     -cache-file | --cache-file | --cache-fil | --cache-fi \
4736     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4737       ac_prev=cache_file ;;
4738     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4739     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
4740       ;;
4741     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4742       ac_prev=srcdir ;;
4743     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4744       ;;
4745     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
4746     esac
4747   done
4748
4749   for ac_config_dir in libltdl $mysubdirs; do
4750
4751     # Do not complain, so a configure script can configure whichever
4752     # parts of a large source tree are present.
4753     if test ! -d $srcdir/$ac_config_dir; then
4754       continue
4755     fi
4756
4757     echo configuring in $ac_config_dir
4758
4759     case "$srcdir" in
4760     .) ;;
4761     *)
4762       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
4763       else
4764         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
4765       fi
4766       ;;
4767     esac
4768
4769     ac_popdir=`pwd`
4770     cd $ac_config_dir
4771
4772       # A "../" for each directory in /$ac_config_dir.
4773       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
4774
4775     case "$srcdir" in
4776     .) # No --srcdir option.  We are building in place.
4777       ac_sub_srcdir=$srcdir ;;
4778     /*) # Absolute path.
4779       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
4780     *) # Relative path.
4781       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
4782     esac
4783
4784     # Check for guested configure; otherwise get Cygnus style configure.
4785     if test -f $ac_sub_srcdir/configure; then
4786       ac_sub_configure=$ac_sub_srcdir/configure
4787     elif test -f $ac_sub_srcdir/configure.in; then
4788       ac_sub_configure=$ac_configure
4789     else
4790       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
4791       ac_sub_configure=
4792     fi
4793
4794     # The recursion is here.
4795     if test -n "$ac_sub_configure"; then
4796
4797       # Make the cache file name correct relative to the subdirectory.
4798       case "$cache_file" in
4799       /*) ac_sub_cache_file=$cache_file ;;
4800       *) # Relative path.
4801         ac_sub_cache_file="$ac_dots$cache_file" ;;
4802       esac
4803
4804       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
4805       # The eval makes quoting arguments work.
4806       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
4807       then :
4808       else
4809         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
4810       fi
4811     fi
4812
4813     cd $ac_popdir
4814   done
4815 fi
4816
4817
4818
4819
4820
4821
4822
4823 echo timestamp > src/include/stamp-h
4824 (cd ./src/include && /bin/sh ./build-radpaths-h)
4825 (cd ./src/main   && chmod +x checkrad.pl radlast radtest)
4826 (cd ./scripts    && chmod +x rc.radiusd radwatch check-radiusd-config radiusd.cron.daily radiusd.cron.monthly cryptpasswd)
4827
4828 cat >> src/include/autoconf.h <<EOF
4829
4830 #define HOSTINFO        "$host"
4831 #define RADIUSD_VERSION "$RADIUSD_VERSION"
4832 EOF
4833
4834
4835
4836
4837
4838 host=$host