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