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