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