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