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