One more stab at working around autoconf stupidities
[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
23 # Find the correct PATH separator.  Usually this is `:', but
24 # DJGPP uses `;' like DOS.
25 if test "X${PATH_SEPARATOR+set}" != Xset; then
26   UNAME=${UNAME-`uname 2>/dev/null`}
27   case X$UNAME in
28     *-DOS) lt_cv_sys_path_separator=';' ;;
29     *)     lt_cv_sys_path_separator=':' ;;
30   esac
31   PATH_SEPARATOR=$lt_cv_sys_path_separator
32 fi
33
34
35 # Check that we are running under the correct shell.
36 SHELL=${CONFIG_SHELL-/bin/sh}
37
38 case X$ECHO in
39 X*--fallback-echo)
40   # Remove one level of quotation (which was required for Make).
41   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
42   ;;
43 esac
44
45 echo=${ECHO-echo}
46 if test "X$1" = X--no-reexec; then
47   # Discard the --no-reexec flag, and continue.
48   shift
49 elif test "X$1" = X--fallback-echo; then
50   # Avoid inline document here, it may be left over
51   :
52 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
53   # Yippee, $echo works!
54   :
55 else
56   # Restart under the correct shell.
57   exec $SHELL "$0" --no-reexec ${1+"$@"}
58 fi
59
60 if test "X$1" = X--fallback-echo; then
61   # used as fallback echo
62   shift
63   cat <<EOF
64
65 EOF
66   exit 0
67 fi
68
69 # The HP-UX ksh and POSIX shell print the target directory to stdout
70 # if CDPATH is set.
71 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
72
73 if test -z "$ECHO"; then
74 if test "X${echo_test_string+set}" != Xset; then
75 # find a string as large as possible, as long as the shell can cope with it
76   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
77     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
78     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
79        echo_test_string="`eval $cmd`" &&
80        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
81     then
82       break
83     fi
84   done
85 fi
86
87 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
88    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
89    test "X$echo_testing_string" = "X$echo_test_string"; then
90   :
91 else
92   # The Solaris, AIX, and Digital Unix default echo programs unquote
93   # backslashes.  This makes it impossible to quote backslashes using
94   #   echo "$something" | sed 's/\\/\\\\/g'
95   #
96   # So, first we look for a working echo in the user's PATH.
97
98   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
99   for dir in $PATH /usr/ucb; do
100     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
101        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
102        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
103        test "X$echo_testing_string" = "X$echo_test_string"; then
104       echo="$dir/echo"
105       break
106     fi
107   done
108   IFS="$save_ifs"
109
110   if test "X$echo" = Xecho; then
111     # We didn't find a better echo, so look for alternatives.
112     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
113        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
114        test "X$echo_testing_string" = "X$echo_test_string"; then
115       # This shell has a builtin print -r that does the trick.
116       echo='print -r'
117     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
118          test "X$CONFIG_SHELL" != X/bin/ksh; then
119       # If we have ksh, try running configure again with it.
120       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
121       export ORIGINAL_CONFIG_SHELL
122       CONFIG_SHELL=/bin/ksh
123       export CONFIG_SHELL
124       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
125     else
126       # Try using printf.
127       echo='printf %s\n'
128       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
129          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
130          test "X$echo_testing_string" = "X$echo_test_string"; then
131         # Cool, printf works
132         :
133       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
134            test "X$echo_testing_string" = 'X\t' &&
135            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
136            test "X$echo_testing_string" = "X$echo_test_string"; then
137         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
138         export CONFIG_SHELL
139         SHELL="$CONFIG_SHELL"
140         export SHELL
141         echo="$CONFIG_SHELL $0 --fallback-echo"
142       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
143            test "X$echo_testing_string" = 'X\t' &&
144            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
145            test "X$echo_testing_string" = "X$echo_test_string"; then
146         echo="$CONFIG_SHELL $0 --fallback-echo"
147       else
148         # maybe with a smaller string...
149         prev=:
150
151         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
152           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
153           then
154             break
155           fi
156           prev="$cmd"
157         done
158
159         if test "$prev" != 'sed 50q "$0"'; then
160           echo_test_string=`eval $prev`
161           export echo_test_string
162           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
163         else
164           # Oops.  We lost completely, so just stick with echo.
165           echo=echo
166         fi
167       fi
168     fi
169   fi
170 fi
171 fi
172
173 # Copy echo and quote the copy suitably for passing to libtool from
174 # the Makefile, instead of quoting the original, which is used later.
175 ECHO=$echo
176 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
177    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
178 fi
179
180
181 ac_help="$ac_help
182   --disable-libtool-lock  avoid locking (might break parallel builds)"
183 ac_help="$ac_help
184   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
185 ac_help="$ac_help
186   --enable-strict-dependencies  Fail configure on lack of module dependancy."
187 ac_help="$ac_help
188   --with-logdir=DIR       Directory for logfiles [LOCALSTATEDIR/log/radius] "
189 ac_help="$ac_help
190   --with-radacctdir=PATH  Directory for detail files [LOGDIR/radacct] "
191 ac_help="$ac_help
192   --with-raddbdir=DIR     Directory for config files [SYSCONFDIR/raddb] "
193 ac_help="$ac_help
194   --with-dict-nocase      Make dictionary case-independant (default=yes)"
195 ac_help="$ac_help
196   --with-ascend-binary    Include support for Ascend binary filter attributes (default=yes)"
197 ac_help="$ac_help
198   --with-threads          Use threads, if available.  (default=yes) "
199 ac_help="$ac_help
200   --with-snmp             Compile in SNMP support. (default=yes)"
201 ac_help="$ac_help
202   --disable-ltdl-install  do not install libltdl"
203 ac_help="$ac_help
204   --with-static-modules=QUOTED-MODULE-LIST"
205 ac_help="$ac_help
206   --enable-developer               Enables features of interest to developers."
207 ac_help="$ac_help
208   --with-experimental-modules      Use experimental and unstable modules. (default=no) "
209 ac_help="$ac_help
210   --with-rlm-FOO-lib-dir=DIR       Directory to look for library files used by module FOO"
211 ac_help="$ac_help
212   --with-rlm-FOO-include-dir=DIR   Directory to look for include files used by module FOO"
213
214 # Initialize some variables set by options.
215 # The variables have the same names as the options, with
216 # dashes changed to underlines.
217 build=NONE
218 cache_file=./config.cache
219 exec_prefix=NONE
220 host=NONE
221 no_create=
222 nonopt=NONE
223 no_recursion=
224 prefix=NONE
225 program_prefix=NONE
226 program_suffix=NONE
227 program_transform_name=s,x,x,
228 silent=
229 site=
230 srcdir=
231 target=NONE
232 verbose=
233 x_includes=NONE
234 x_libraries=NONE
235 bindir='${exec_prefix}/bin'
236 sbindir='${exec_prefix}/sbin'
237 libexecdir='${exec_prefix}/libexec'
238 datadir='${prefix}/share'
239 sysconfdir='${prefix}/etc'
240 sharedstatedir='${prefix}/com'
241 localstatedir='${prefix}/var'
242 libdir='${exec_prefix}/lib'
243 includedir='${prefix}/include'
244 oldincludedir='/usr/include'
245 infodir='${prefix}/info'
246 mandir='${prefix}/man'
247
248 # Initialize some other variables.
249 subdirs=
250 MFLAGS= MAKEFLAGS=
251 SHELL=${CONFIG_SHELL-/bin/sh}
252 # Maximum number of lines to put in a shell here document.
253 ac_max_here_lines=12
254
255 ac_prev=
256 for ac_option
257 do
258
259   # If the previous option needs an argument, assign it.
260   if test -n "$ac_prev"; then
261     eval "$ac_prev=\$ac_option"
262     ac_prev=
263     continue
264   fi
265
266   case "$ac_option" in
267   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
268   *) ac_optarg= ;;
269   esac
270
271   # Accept the important Cygnus configure options, so we can diagnose typos.
272
273   case "$ac_option" in
274
275   -bindir | --bindir | --bindi | --bind | --bin | --bi)
276     ac_prev=bindir ;;
277   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
278     bindir="$ac_optarg" ;;
279
280   -build | --build | --buil | --bui | --bu)
281     ac_prev=build ;;
282   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
283     build="$ac_optarg" ;;
284
285   -cache-file | --cache-file | --cache-fil | --cache-fi \
286   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
287     ac_prev=cache_file ;;
288   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
289   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
290     cache_file="$ac_optarg" ;;
291
292   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
293     ac_prev=datadir ;;
294   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
295   | --da=*)
296     datadir="$ac_optarg" ;;
297
298   -disable-* | --disable-*)
299     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
300     # Reject names that are not valid shell variable names.
301     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
302       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
303     fi
304     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
305     eval "enable_${ac_feature}=no" ;;
306
307   -enable-* | --enable-*)
308     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
309     # Reject names that are not valid shell variable names.
310     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
311       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
312     fi
313     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
314     case "$ac_option" in
315       *=*) ;;
316       *) ac_optarg=yes ;;
317     esac
318     eval "enable_${ac_feature}='$ac_optarg'" ;;
319
320   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
321   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
322   | --exec | --exe | --ex)
323     ac_prev=exec_prefix ;;
324   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
325   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
326   | --exec=* | --exe=* | --ex=*)
327     exec_prefix="$ac_optarg" ;;
328
329   -gas | --gas | --ga | --g)
330     # Obsolete; use --with-gas.
331     with_gas=yes ;;
332
333   -help | --help | --hel | --he)
334     # Omit some internal or obsolete options to make the list less imposing.
335     # This message is too long to be a string in the A/UX 3.1 sh.
336     cat << EOF
337 Usage: configure [options] [host]
338 Options: [defaults in brackets after descriptions]
339 Configuration:
340   --cache-file=FILE       cache test results in FILE
341   --help                  print this message
342   --no-create             do not create output files
343   --quiet, --silent       do not print \`checking...' messages
344   --version               print the version of autoconf that created configure
345 Directory and file names:
346   --prefix=PREFIX         install architecture-independent files in PREFIX
347                           [$ac_default_prefix]
348   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
349                           [same as prefix]
350   --bindir=DIR            user executables in DIR [EPREFIX/bin]
351   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
352   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
353   --datadir=DIR           read-only architecture-independent data in DIR
354                           [PREFIX/share]
355   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
356   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
357                           [PREFIX/com]
358   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
359   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
360   --includedir=DIR        C header files in DIR [PREFIX/include]
361   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
362   --infodir=DIR           info documentation in DIR [PREFIX/info]
363   --mandir=DIR            man documentation in DIR [PREFIX/man]
364   --srcdir=DIR            find the sources in DIR [configure dir or ..]
365   --program-prefix=PREFIX prepend PREFIX to installed program names
366   --program-suffix=SUFFIX append SUFFIX to installed program names
367   --program-transform-name=PROGRAM
368                           run sed PROGRAM on installed program names
369 EOF
370     cat << EOF
371 Host type:
372   --build=BUILD           configure for building on BUILD [BUILD=HOST]
373   --host=HOST             configure for HOST [guessed]
374   --target=TARGET         configure for TARGET [TARGET=HOST]
375 Features and packages:
376   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
377   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
378   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
379   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
380   --x-includes=DIR        X include files are in DIR
381   --x-libraries=DIR       X library files are in DIR
382 EOF
383     if test -n "$ac_help"; then
384       echo "--enable and --with options recognized:$ac_help"
385     fi
386     exit 0 ;;
387
388   -host | --host | --hos | --ho)
389     ac_prev=host ;;
390   -host=* | --host=* | --hos=* | --ho=*)
391     host="$ac_optarg" ;;
392
393   -includedir | --includedir | --includedi | --included | --include \
394   | --includ | --inclu | --incl | --inc)
395     ac_prev=includedir ;;
396   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
397   | --includ=* | --inclu=* | --incl=* | --inc=*)
398     includedir="$ac_optarg" ;;
399
400   -infodir | --infodir | --infodi | --infod | --info | --inf)
401     ac_prev=infodir ;;
402   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
403     infodir="$ac_optarg" ;;
404
405   -libdir | --libdir | --libdi | --libd)
406     ac_prev=libdir ;;
407   -libdir=* | --libdir=* | --libdi=* | --libd=*)
408     libdir="$ac_optarg" ;;
409
410   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
411   | --libexe | --libex | --libe)
412     ac_prev=libexecdir ;;
413   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
414   | --libexe=* | --libex=* | --libe=*)
415     libexecdir="$ac_optarg" ;;
416
417   -localstatedir | --localstatedir | --localstatedi | --localstated \
418   | --localstate | --localstat | --localsta | --localst \
419   | --locals | --local | --loca | --loc | --lo)
420     ac_prev=localstatedir ;;
421   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
422   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
423   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
424     localstatedir="$ac_optarg" ;;
425
426   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
427     ac_prev=mandir ;;
428   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
429     mandir="$ac_optarg" ;;
430
431   -nfp | --nfp | --nf)
432     # Obsolete; use --without-fp.
433     with_fp=no ;;
434
435   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
436   | --no-cr | --no-c)
437     no_create=yes ;;
438
439   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
440   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
441     no_recursion=yes ;;
442
443   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
444   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
445   | --oldin | --oldi | --old | --ol | --o)
446     ac_prev=oldincludedir ;;
447   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
448   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
449   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
450     oldincludedir="$ac_optarg" ;;
451
452   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
453     ac_prev=prefix ;;
454   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
455     prefix="$ac_optarg" ;;
456
457   -program-prefix | --program-prefix | --program-prefi | --program-pref \
458   | --program-pre | --program-pr | --program-p)
459     ac_prev=program_prefix ;;
460   -program-prefix=* | --program-prefix=* | --program-prefi=* \
461   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
462     program_prefix="$ac_optarg" ;;
463
464   -program-suffix | --program-suffix | --program-suffi | --program-suff \
465   | --program-suf | --program-su | --program-s)
466     ac_prev=program_suffix ;;
467   -program-suffix=* | --program-suffix=* | --program-suffi=* \
468   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
469     program_suffix="$ac_optarg" ;;
470
471   -program-transform-name | --program-transform-name \
472   | --program-transform-nam | --program-transform-na \
473   | --program-transform-n | --program-transform- \
474   | --program-transform | --program-transfor \
475   | --program-transfo | --program-transf \
476   | --program-trans | --program-tran \
477   | --progr-tra | --program-tr | --program-t)
478     ac_prev=program_transform_name ;;
479   -program-transform-name=* | --program-transform-name=* \
480   | --program-transform-nam=* | --program-transform-na=* \
481   | --program-transform-n=* | --program-transform-=* \
482   | --program-transform=* | --program-transfor=* \
483   | --program-transfo=* | --program-transf=* \
484   | --program-trans=* | --program-tran=* \
485   | --progr-tra=* | --program-tr=* | --program-t=*)
486     program_transform_name="$ac_optarg" ;;
487
488   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
489   | -silent | --silent | --silen | --sile | --sil)
490     silent=yes ;;
491
492   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
493     ac_prev=sbindir ;;
494   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
495   | --sbi=* | --sb=*)
496     sbindir="$ac_optarg" ;;
497
498   -sharedstatedir | --sharedstatedir | --sharedstatedi \
499   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
500   | --sharedst | --shareds | --shared | --share | --shar \
501   | --sha | --sh)
502     ac_prev=sharedstatedir ;;
503   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
504   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
505   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
506   | --sha=* | --sh=*)
507     sharedstatedir="$ac_optarg" ;;
508
509   -site | --site | --sit)
510     ac_prev=site ;;
511   -site=* | --site=* | --sit=*)
512     site="$ac_optarg" ;;
513
514   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
515     ac_prev=srcdir ;;
516   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
517     srcdir="$ac_optarg" ;;
518
519   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
520   | --syscon | --sysco | --sysc | --sys | --sy)
521     ac_prev=sysconfdir ;;
522   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
523   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
524     sysconfdir="$ac_optarg" ;;
525
526   -target | --target | --targe | --targ | --tar | --ta | --t)
527     ac_prev=target ;;
528   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
529     target="$ac_optarg" ;;
530
531   -v | -verbose | --verbose | --verbos | --verbo | --verb)
532     verbose=yes ;;
533
534   -version | --version | --versio | --versi | --vers)
535     echo "configure generated by autoconf version 2.13"
536     exit 0 ;;
537
538   -with-* | --with-*)
539     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
540     # Reject names that are not valid shell variable names.
541     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
542       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
543     fi
544     ac_package=`echo $ac_package| sed 's/-/_/g'`
545     case "$ac_option" in
546       *=*) ;;
547       *) ac_optarg=yes ;;
548     esac
549     eval "with_${ac_package}='$ac_optarg'" ;;
550
551   -without-* | --without-*)
552     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
553     # Reject names that are not valid shell variable names.
554     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
555       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
556     fi
557     ac_package=`echo $ac_package| sed 's/-/_/g'`
558     eval "with_${ac_package}=no" ;;
559
560   --x)
561     # Obsolete; use --with-x.
562     with_x=yes ;;
563
564   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
565   | --x-incl | --x-inc | --x-in | --x-i)
566     ac_prev=x_includes ;;
567   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
568   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
569     x_includes="$ac_optarg" ;;
570
571   -x-libraries | --x-libraries | --x-librarie | --x-librari \
572   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
573     ac_prev=x_libraries ;;
574   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
575   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
576     x_libraries="$ac_optarg" ;;
577
578   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
579     ;;
580
581   *)
582     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
583       echo "configure: warning: $ac_option: invalid host type" 1>&2
584     fi
585     if test "x$nonopt" != xNONE; then
586       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
587     fi
588     nonopt="$ac_option"
589     ;;
590
591   esac
592 done
593
594 if test -n "$ac_prev"; then
595   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
596 fi
597
598 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
599
600 # File descriptor usage:
601 # 0 standard input
602 # 1 file creation
603 # 2 errors and warnings
604 # 3 some systems may open it to /dev/tty
605 # 4 used on the Kubota Titan
606 # 6 checking for... messages and results
607 # 5 compiler messages saved in config.log
608 if test "$silent" = yes; then
609   exec 6>/dev/null
610 else
611   exec 6>&1
612 fi
613 exec 5>./config.log
614
615 echo "\
616 This file contains any messages produced by compilers while
617 running configure, to aid debugging if configure makes a mistake.
618 " 1>&5
619
620 # Strip out --no-create and --no-recursion so they do not pile up.
621 # Also quote any args containing shell metacharacters.
622 ac_configure_args=
623 for ac_arg
624 do
625   case "$ac_arg" in
626   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
627   | --no-cr | --no-c) ;;
628   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
629   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
630   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
631   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
632   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
633   esac
634 done
635
636 # NLS nuisances.
637 # Only set these to C if already set.  These must not be set unconditionally
638 # because not all systems understand e.g. LANG=C (notably SCO).
639 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
640 # Non-C LC_CTYPE values break the ctype check.
641 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
642 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
643 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
644 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
645
646 # confdefs.h avoids OS command line length limits that DEFS can exceed.
647 rm -rf conftest* confdefs.h
648 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
649 echo > confdefs.h
650
651 # A filename unique to this package, relative to the directory that
652 # configure is in, which we can look for to find out if srcdir is correct.
653 ac_unique_file=src/main/radiusd.c
654
655 # Find the source files, if location was not specified.
656 if test -z "$srcdir"; then
657   ac_srcdir_defaulted=yes
658   # Try the directory containing this script, then its parent.
659   ac_prog=$0
660   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
661   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
662   srcdir=$ac_confdir
663   if test ! -r $srcdir/$ac_unique_file; then
664     srcdir=..
665   fi
666 else
667   ac_srcdir_defaulted=no
668 fi
669 if test ! -r $srcdir/$ac_unique_file; then
670   if test "$ac_srcdir_defaulted" = yes; then
671     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
672   else
673     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
674   fi
675 fi
676 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
677
678 # Prefer explicitly selected file to automatically selected ones.
679 if test -z "$CONFIG_SITE"; then
680   if test "x$prefix" != xNONE; then
681     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
682   else
683     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
684   fi
685 fi
686 for ac_site_file in $CONFIG_SITE; do
687   if test -r "$ac_site_file"; then
688     echo "loading site script $ac_site_file"
689     . "$ac_site_file"
690   fi
691 done
692
693 if test -r "$cache_file"; then
694   echo "loading cache $cache_file"
695   . $cache_file
696 else
697   echo "creating cache $cache_file"
698   > $cache_file
699 fi
700
701 ac_ext=c
702 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
703 ac_cpp='$CPP $CPPFLAGS'
704 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
705 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
706 cross_compiling=$ac_cv_prog_cc_cross
707
708 ac_exeext=
709 ac_objext=o
710 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
711   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
712   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
713     ac_n= ac_c='
714 ' ac_t='        '
715   else
716     ac_n=-n ac_c= ac_t=
717   fi
718 else
719   ac_n= ac_c='\c' ac_t=
720 fi
721
722
723
724 # From configure.in Revision: 1.154 
725 RADIUSD_MAJOR_VERSION=0
726 RADIUSD_MINOR_VERSION=6
727 RADIUSD_VERSION="${RADIUSD_MAJOR_VERSION}.${RADIUSD_MINOR_VERSION}"
728
729
730 # Extract the first word of "gcc", so it can be a program name with args.
731 set dummy gcc; ac_word=$2
732 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
733 echo "configure:734: checking for $ac_word" >&5
734 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
735   echo $ac_n "(cached) $ac_c" 1>&6
736 else
737   if test -n "$CC"; then
738   ac_cv_prog_CC="$CC" # Let the user override the test.
739 else
740   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
741   ac_dummy="$PATH"
742   for ac_dir in $ac_dummy; do
743     test -z "$ac_dir" && ac_dir=.
744     if test -f $ac_dir/$ac_word; then
745       ac_cv_prog_CC="gcc"
746       break
747     fi
748   done
749   IFS="$ac_save_ifs"
750 fi
751 fi
752 CC="$ac_cv_prog_CC"
753 if test -n "$CC"; then
754   echo "$ac_t""$CC" 1>&6
755 else
756   echo "$ac_t""no" 1>&6
757 fi
758
759 if test -z "$CC"; then
760   # Extract the first word of "cc", so it can be a program name with args.
761 set dummy cc; ac_word=$2
762 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
763 echo "configure:764: checking for $ac_word" >&5
764 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
765   echo $ac_n "(cached) $ac_c" 1>&6
766 else
767   if test -n "$CC"; then
768   ac_cv_prog_CC="$CC" # Let the user override the test.
769 else
770   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
771   ac_prog_rejected=no
772   ac_dummy="$PATH"
773   for ac_dir in $ac_dummy; do
774     test -z "$ac_dir" && ac_dir=.
775     if test -f $ac_dir/$ac_word; then
776       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
777         ac_prog_rejected=yes
778         continue
779       fi
780       ac_cv_prog_CC="cc"
781       break
782     fi
783   done
784   IFS="$ac_save_ifs"
785 if test $ac_prog_rejected = yes; then
786   # We found a bogon in the path, so make sure we never use it.
787   set dummy $ac_cv_prog_CC
788   shift
789   if test $# -gt 0; then
790     # We chose a different compiler from the bogus one.
791     # However, it has the same basename, so the bogon will be chosen
792     # first if we set CC to just the basename; use the full file name.
793     shift
794     set dummy "$ac_dir/$ac_word" "$@"
795     shift
796     ac_cv_prog_CC="$@"
797   fi
798 fi
799 fi
800 fi
801 CC="$ac_cv_prog_CC"
802 if test -n "$CC"; then
803   echo "$ac_t""$CC" 1>&6
804 else
805   echo "$ac_t""no" 1>&6
806 fi
807
808   if test -z "$CC"; then
809     case "`uname -s`" in
810     *win32* | *WIN32*)
811       # Extract the first word of "cl", so it can be a program name with args.
812 set dummy cl; ac_word=$2
813 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
814 echo "configure:815: checking for $ac_word" >&5
815 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
816   echo $ac_n "(cached) $ac_c" 1>&6
817 else
818   if test -n "$CC"; then
819   ac_cv_prog_CC="$CC" # Let the user override the test.
820 else
821   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
822   ac_dummy="$PATH"
823   for ac_dir in $ac_dummy; do
824     test -z "$ac_dir" && ac_dir=.
825     if test -f $ac_dir/$ac_word; then
826       ac_cv_prog_CC="cl"
827       break
828     fi
829   done
830   IFS="$ac_save_ifs"
831 fi
832 fi
833 CC="$ac_cv_prog_CC"
834 if test -n "$CC"; then
835   echo "$ac_t""$CC" 1>&6
836 else
837   echo "$ac_t""no" 1>&6
838 fi
839  ;;
840     esac
841   fi
842   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
843 fi
844
845 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
846 echo "configure:847: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
847
848 ac_ext=c
849 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
850 ac_cpp='$CPP $CPPFLAGS'
851 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
852 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
853 cross_compiling=$ac_cv_prog_cc_cross
854
855 cat > conftest.$ac_ext << EOF
856
857 #line 858 "configure"
858 #include "confdefs.h"
859
860 main(){return(0);}
861 EOF
862 if { (eval echo configure:863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
863   ac_cv_prog_cc_works=yes
864   # If we can't run a trivial program, we are probably using a cross compiler.
865   if (./conftest; exit) 2>/dev/null; then
866     ac_cv_prog_cc_cross=no
867   else
868     ac_cv_prog_cc_cross=yes
869   fi
870 else
871   echo "configure: failed program was:" >&5
872   cat conftest.$ac_ext >&5
873   ac_cv_prog_cc_works=no
874 fi
875 rm -fr conftest*
876 ac_ext=c
877 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
878 ac_cpp='$CPP $CPPFLAGS'
879 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
880 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
881 cross_compiling=$ac_cv_prog_cc_cross
882
883 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
884 if test $ac_cv_prog_cc_works = no; then
885   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
886 fi
887 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
888 echo "configure:889: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
889 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
890 cross_compiling=$ac_cv_prog_cc_cross
891
892 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
893 echo "configure:894: checking whether we are using GNU C" >&5
894 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
895   echo $ac_n "(cached) $ac_c" 1>&6
896 else
897   cat > conftest.c <<EOF
898 #ifdef __GNUC__
899   yes;
900 #endif
901 EOF
902 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
903   ac_cv_prog_gcc=yes
904 else
905   ac_cv_prog_gcc=no
906 fi
907 fi
908
909 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
910
911 if test $ac_cv_prog_gcc = yes; then
912   GCC=yes
913 else
914   GCC=
915 fi
916
917 ac_test_CFLAGS="${CFLAGS+set}"
918 ac_save_CFLAGS="$CFLAGS"
919 CFLAGS=
920 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
921 echo "configure:922: checking whether ${CC-cc} accepts -g" >&5
922 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
923   echo $ac_n "(cached) $ac_c" 1>&6
924 else
925   echo 'void f(){}' > conftest.c
926 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
927   ac_cv_prog_cc_g=yes
928 else
929   ac_cv_prog_cc_g=no
930 fi
931 rm -f conftest*
932
933 fi
934
935 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
936 if test "$ac_test_CFLAGS" = set; then
937   CFLAGS="$ac_save_CFLAGS"
938 elif test $ac_cv_prog_cc_g = yes; then
939   if test "$GCC" = yes; then
940     CFLAGS="-g -O2"
941   else
942     CFLAGS="-g"
943   fi
944 else
945   if test "$GCC" = yes; then
946     CFLAGS="-O2"
947   else
948     CFLAGS=
949   fi
950 fi
951
952 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
953 echo "configure:954: checking how to run the C preprocessor" >&5
954 # On Suns, sometimes $CPP names a directory.
955 if test -n "$CPP" && test -d "$CPP"; then
956   CPP=
957 fi
958 if test -z "$CPP"; then
959 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
960   echo $ac_n "(cached) $ac_c" 1>&6
961 else
962     # This must be in double quotes, not single quotes, because CPP may get
963   # substituted into the Makefile and "${CC-cc}" will confuse make.
964   CPP="${CC-cc} -E"
965   # On the NeXT, cc -E runs the code through the compiler's parser,
966   # not just through cpp.
967   cat > conftest.$ac_ext <<EOF
968 #line 969 "configure"
969 #include "confdefs.h"
970 #include <assert.h>
971 Syntax Error
972 EOF
973 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
974 { (eval echo configure:975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
975 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
976 if test -z "$ac_err"; then
977   :
978 else
979   echo "$ac_err" >&5
980   echo "configure: failed program was:" >&5
981   cat conftest.$ac_ext >&5
982   rm -rf conftest*
983   CPP="${CC-cc} -E -traditional-cpp"
984   cat > conftest.$ac_ext <<EOF
985 #line 986 "configure"
986 #include "confdefs.h"
987 #include <assert.h>
988 Syntax Error
989 EOF
990 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
991 { (eval echo configure:992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
992 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
993 if test -z "$ac_err"; then
994   :
995 else
996   echo "$ac_err" >&5
997   echo "configure: failed program was:" >&5
998   cat conftest.$ac_ext >&5
999   rm -rf conftest*
1000   CPP="${CC-cc} -nologo -E"
1001   cat > conftest.$ac_ext <<EOF
1002 #line 1003 "configure"
1003 #include "confdefs.h"
1004 #include <assert.h>
1005 Syntax Error
1006 EOF
1007 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1008 { (eval echo configure:1009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1009 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1010 if test -z "$ac_err"; then
1011   :
1012 else
1013   echo "$ac_err" >&5
1014   echo "configure: failed program was:" >&5
1015   cat conftest.$ac_ext >&5
1016   rm -rf conftest*
1017   CPP=/lib/cpp
1018 fi
1019 rm -f conftest*
1020 fi
1021 rm -f conftest*
1022 fi
1023 rm -f conftest*
1024   ac_cv_prog_CPP="$CPP"
1025 fi
1026   CPP="$ac_cv_prog_CPP"
1027 else
1028   ac_cv_prog_CPP="$CPP"
1029 fi
1030 echo "$ac_t""$CPP" 1>&6
1031
1032 if test $ac_cv_prog_gcc = yes; then
1033     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1034 echo "configure:1035: checking whether ${CC-cc} needs -traditional" >&5
1035 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1036   echo $ac_n "(cached) $ac_c" 1>&6
1037 else
1038     ac_pattern="Autoconf.*'x'"
1039   cat > conftest.$ac_ext <<EOF
1040 #line 1041 "configure"
1041 #include "confdefs.h"
1042 #include <sgtty.h>
1043 Autoconf TIOCGETP
1044 EOF
1045 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1046   egrep "$ac_pattern" >/dev/null 2>&1; then
1047   rm -rf conftest*
1048   ac_cv_prog_gcc_traditional=yes
1049 else
1050   rm -rf conftest*
1051   ac_cv_prog_gcc_traditional=no
1052 fi
1053 rm -f conftest*
1054
1055
1056   if test $ac_cv_prog_gcc_traditional = no; then
1057     cat > conftest.$ac_ext <<EOF
1058 #line 1059 "configure"
1059 #include "confdefs.h"
1060 #include <termio.h>
1061 Autoconf TCGETA
1062 EOF
1063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1064   egrep "$ac_pattern" >/dev/null 2>&1; then
1065   rm -rf conftest*
1066   ac_cv_prog_gcc_traditional=yes
1067 fi
1068 rm -f conftest*
1069
1070   fi
1071 fi
1072
1073 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1074   if test $ac_cv_prog_gcc_traditional = yes; then
1075     CC="$CC -traditional"
1076   fi
1077 fi
1078
1079 echo $ac_n "checking whether we are using SUNPro C""... $ac_c" 1>&6
1080 echo "configure:1081: checking whether we are using SUNPro C" >&5
1081 if eval "test \"`echo '$''{'ac_cv_prog_suncc'+set}'`\" = set"; then
1082   echo $ac_n "(cached) $ac_c" 1>&6
1083 else
1084   cat > conftest.c <<EOF
1085 #ifdef __SUNPRO_C
1086   yes;
1087 #endif
1088 EOF
1089 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1090   ac_cv_prog_suncc=yes
1091 else
1092   ac_cv_prog_suncc=no
1093 fi
1094 fi
1095
1096 echo "$ac_t""$ac_cv_prog_suncc" 1>&6
1097 # Extract the first word of "ranlib", so it can be a program name with args.
1098 set dummy ranlib; ac_word=$2
1099 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1100 echo "configure:1101: checking for $ac_word" >&5
1101 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1102   echo $ac_n "(cached) $ac_c" 1>&6
1103 else
1104   if test -n "$RANLIB"; then
1105   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1106 else
1107   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1108   ac_dummy="$PATH"
1109   for ac_dir in $ac_dummy; do
1110     test -z "$ac_dir" && ac_dir=.
1111     if test -f $ac_dir/$ac_word; then
1112       ac_cv_prog_RANLIB="ranlib"
1113       break
1114     fi
1115   done
1116   IFS="$ac_save_ifs"
1117   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1118 fi
1119 fi
1120 RANLIB="$ac_cv_prog_RANLIB"
1121 if test -n "$RANLIB"; then
1122   echo "$ac_t""$RANLIB" 1>&6
1123 else
1124   echo "$ac_t""no" 1>&6
1125 fi
1126
1127
1128 PACKAGE=freeradius
1129
1130 echo $ac_n "checking for AIX""... $ac_c" 1>&6
1131 echo "configure:1132: checking for AIX" >&5
1132 cat > conftest.$ac_ext <<EOF
1133 #line 1134 "configure"
1134 #include "confdefs.h"
1135 #ifdef _AIX
1136   yes
1137 #endif
1138
1139 EOF
1140 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1141   egrep "yes" >/dev/null 2>&1; then
1142   rm -rf conftest*
1143   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1144 #define _ALL_SOURCE 1
1145 EOF
1146
1147 else
1148   rm -rf conftest*
1149   echo "$ac_t""no" 1>&6
1150 fi
1151 rm -f conftest*
1152
1153
1154
1155 # Extract the first word of "gmake", so it can be a program name with args.
1156 set dummy gmake; ac_word=$2
1157 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1158 echo "configure:1159: checking for $ac_word" >&5
1159 if eval "test \"`echo '$''{'ac_cv_prog_GMAKE'+set}'`\" = set"; then
1160   echo $ac_n "(cached) $ac_c" 1>&6
1161 else
1162   if test -n "$GMAKE"; then
1163   ac_cv_prog_GMAKE="$GMAKE" # Let the user override the test.
1164 else
1165   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1166   ac_dummy="$PATH"
1167   for ac_dir in $ac_dummy; do
1168     test -z "$ac_dir" && ac_dir=.
1169     if test -f $ac_dir/$ac_word; then
1170       ac_cv_prog_GMAKE="yes"
1171       break
1172     fi
1173   done
1174   IFS="$ac_save_ifs"
1175   test -z "$ac_cv_prog_GMAKE" && ac_cv_prog_GMAKE="no"
1176 fi
1177 fi
1178 GMAKE="$ac_cv_prog_GMAKE"
1179 if test -n "$GMAKE"; then
1180   echo "$ac_t""$GMAKE" 1>&6
1181 else
1182   echo "$ac_t""no" 1>&6
1183 fi
1184
1185 if test $GMAKE = no; then
1186   # Extract the first word of "make", so it can be a program name with args.
1187 set dummy make; ac_word=$2
1188 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1189 echo "configure:1190: checking for $ac_word" >&5
1190 if eval "test \"`echo '$''{'ac_cv_path_MAKE'+set}'`\" = set"; then
1191   echo $ac_n "(cached) $ac_c" 1>&6
1192 else
1193   case "$MAKE" in
1194   /*)
1195   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
1196   ;;
1197   ?:/*)                  
1198   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a dos path.
1199   ;;
1200   *)
1201   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1202   ac_dummy="$PATH"
1203   for ac_dir in $ac_dummy; do 
1204     test -z "$ac_dir" && ac_dir=.
1205     if test -f $ac_dir/$ac_word; then
1206       ac_cv_path_MAKE="$ac_dir/$ac_word"
1207       break
1208     fi
1209   done
1210   IFS="$ac_save_ifs"
1211   test -z "$ac_cv_path_MAKE" && ac_cv_path_MAKE="/usr/local/bin/make"
1212   ;;
1213 esac
1214 fi
1215 MAKE="$ac_cv_path_MAKE"
1216 if test -n "$MAKE"; then
1217   echo "$ac_t""$MAKE" 1>&6
1218 else
1219   echo "$ac_t""no" 1>&6
1220 fi
1221
1222 else
1223   # Extract the first word of "gmake", so it can be a program name with args.
1224 set dummy gmake; ac_word=$2
1225 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1226 echo "configure:1227: checking for $ac_word" >&5
1227 if eval "test \"`echo '$''{'ac_cv_path_MAKE'+set}'`\" = set"; then
1228   echo $ac_n "(cached) $ac_c" 1>&6
1229 else
1230   case "$MAKE" in
1231   /*)
1232   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
1233   ;;
1234   ?:/*)                  
1235   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a dos path.
1236   ;;
1237   *)
1238   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1239   ac_dummy="$PATH"
1240   for ac_dir in $ac_dummy; do 
1241     test -z "$ac_dir" && ac_dir=.
1242     if test -f $ac_dir/$ac_word; then
1243       ac_cv_path_MAKE="$ac_dir/$ac_word"
1244       break
1245     fi
1246   done
1247   IFS="$ac_save_ifs"
1248   test -z "$ac_cv_path_MAKE" && ac_cv_path_MAKE="/usr/local/gnu/bin/make"
1249   ;;
1250 esac
1251 fi
1252 MAKE="$ac_cv_path_MAKE"
1253 if test -n "$MAKE"; then
1254   echo "$ac_t""$MAKE" 1>&6
1255 else
1256   echo "$ac_t""no" 1>&6
1257 fi
1258
1259 fi
1260 makever=`$ac_cv_path_MAKE --version 2>&1 | grep "GNU Make"`
1261 if test -z "$makever"; then
1262   { echo "configure: error: GNU Make is not installed.  Please download and install it
1263                 from ftp://prep.ai.mit.edu/pub/gnu/make/ before continuing." 1>&2; exit 1; }
1264 fi
1265
1266   echo $ac_n "checking for main in -lltdl""... $ac_c" 1>&6
1267 echo "configure:1268: checking for main in -lltdl" >&5
1268 ac_lib_var=`echo ltdl'_'main | sed 'y%./+-%__p_%'`
1269 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1270   echo $ac_n "(cached) $ac_c" 1>&6
1271 else
1272   ac_save_LIBS="$LIBS"
1273 LIBS="-lltdl  $LIBS"
1274 cat > conftest.$ac_ext <<EOF
1275 #line 1276 "configure"
1276 #include "confdefs.h"
1277
1278 int main() {
1279 main()
1280 ; return 0; }
1281 EOF
1282 if { (eval echo configure:1283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1283   rm -rf conftest*
1284   eval "ac_cv_lib_$ac_lib_var=yes"
1285 else
1286   echo "configure: failed program was:" >&5
1287   cat conftest.$ac_ext >&5
1288   rm -rf conftest*
1289   eval "ac_cv_lib_$ac_lib_var=no"
1290 fi
1291 rm -f conftest*
1292 LIBS="$ac_save_LIBS"
1293
1294 fi
1295 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1296   echo "$ac_t""yes" 1>&6
1297   test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no
1298 else
1299   echo "$ac_t""no" 1>&6
1300 if test x"$enable_ltdl_install" = xno; then
1301      echo "configure: warning: libltdl not installed, but installation disabled" 1>&2
1302    else
1303      enable_ltdl_install=yes
1304    fi
1305   
1306 fi
1307
1308   if test x"$enable_ltdl_install" = x"yes"; then
1309     ac_configure_args="$ac_configure_args --enable-ltdl-install"
1310     LIBLTDL='${top_builddir}/''libltdl'/libltdl.la
1311     INCLTDL='-I${top_srcdir}/''libltdl'
1312   else
1313     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
1314     LIBLTDL="-lltdl"
1315     INCLTDL=
1316   fi
1317
1318
1319
1320
1321 ac_aux_dir=
1322 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1323   if test -f $ac_dir/install-sh; then
1324     ac_aux_dir=$ac_dir
1325     ac_install_sh="$ac_aux_dir/install-sh -c"
1326     break
1327   elif test -f $ac_dir/install.sh; then
1328     ac_aux_dir=$ac_dir
1329     ac_install_sh="$ac_aux_dir/install.sh -c"
1330     break
1331   fi
1332 done
1333 if test -z "$ac_aux_dir"; then
1334   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1335 fi
1336 ac_config_guess=$ac_aux_dir/config.guess
1337 ac_config_sub=$ac_aux_dir/config.sub
1338 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1339
1340 # Find the correct PATH separator.  Usually this is `:', but
1341 # DJGPP uses `;' like DOS.
1342 if test "X${PATH_SEPARATOR+set}" != Xset; then
1343   UNAME=${UNAME-`uname 2>/dev/null`}
1344   case X$UNAME in
1345     *-DOS) lt_cv_sys_path_separator=';' ;;
1346     *)     lt_cv_sys_path_separator=':' ;;
1347   esac
1348   PATH_SEPARATOR=$lt_cv_sys_path_separator
1349 fi
1350
1351 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1352 echo "configure:1353: checking for Cygwin environment" >&5
1353 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1354   echo $ac_n "(cached) $ac_c" 1>&6
1355 else
1356   cat > conftest.$ac_ext <<EOF
1357 #line 1358 "configure"
1358 #include "confdefs.h"
1359
1360 int main() {
1361
1362 #ifndef __CYGWIN__
1363 #define __CYGWIN__ __CYGWIN32__
1364 #endif
1365 return __CYGWIN__;
1366 ; return 0; }
1367 EOF
1368 if { (eval echo configure:1369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1369   rm -rf conftest*
1370   ac_cv_cygwin=yes
1371 else
1372   echo "configure: failed program was:" >&5
1373   cat conftest.$ac_ext >&5
1374   rm -rf conftest*
1375   ac_cv_cygwin=no
1376 fi
1377 rm -f conftest*
1378 rm -f conftest*
1379 fi
1380
1381 echo "$ac_t""$ac_cv_cygwin" 1>&6
1382 CYGWIN=
1383 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1384 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1385 echo "configure:1386: checking for mingw32 environment" >&5
1386 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1387   echo $ac_n "(cached) $ac_c" 1>&6
1388 else
1389   cat > conftest.$ac_ext <<EOF
1390 #line 1391 "configure"
1391 #include "confdefs.h"
1392
1393 int main() {
1394 return __MINGW32__;
1395 ; return 0; }
1396 EOF
1397 if { (eval echo configure:1398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1398   rm -rf conftest*
1399   ac_cv_mingw32=yes
1400 else
1401   echo "configure: failed program was:" >&5
1402   cat conftest.$ac_ext >&5
1403   rm -rf conftest*
1404   ac_cv_mingw32=no
1405 fi
1406 rm -f conftest*
1407 rm -f conftest*
1408 fi
1409
1410 echo "$ac_t""$ac_cv_mingw32" 1>&6
1411 MINGW32=
1412 test "$ac_cv_mingw32" = yes && MINGW32=yes
1413 # Check whether --enable-shared or --disable-shared was given.
1414 if test "${enable_shared+set}" = set; then
1415   enableval="$enable_shared"
1416   p=${PACKAGE-default}
1417 case $enableval in
1418 yes) enable_shared=yes ;;
1419 no) enable_shared=no ;;
1420 *)
1421   enable_shared=no
1422   # Look at the argument we got.  We use all the common list separators.
1423   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1424   for pkg in $enableval; do
1425     if test "X$pkg" = "X$p"; then
1426       enable_shared=yes
1427     fi
1428   done
1429   IFS="$ac_save_ifs"
1430   ;;
1431 esac
1432 else
1433   enable_shared=yes
1434 fi
1435
1436 # Check whether --enable-static or --disable-static was given.
1437 if test "${enable_static+set}" = set; then
1438   enableval="$enable_static"
1439   p=${PACKAGE-default}
1440 case $enableval in
1441 yes) enable_static=yes ;;
1442 no) enable_static=no ;;
1443 *)
1444   enable_static=no
1445   # Look at the argument we got.  We use all the common list separators.
1446   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1447   for pkg in $enableval; do
1448     if test "X$pkg" = "X$p"; then
1449       enable_static=yes
1450     fi
1451   done
1452   IFS="$ac_save_ifs"
1453   ;;
1454 esac
1455 else
1456   enable_static=yes
1457 fi
1458
1459 # Check whether --enable-fast-install or --disable-fast-install was given.
1460 if test "${enable_fast_install+set}" = set; then
1461   enableval="$enable_fast_install"
1462   p=${PACKAGE-default}
1463 case $enableval in
1464 yes) enable_fast_install=yes ;;
1465 no) enable_fast_install=no ;;
1466 *)
1467   enable_fast_install=no
1468   # Look at the argument we got.  We use all the common list separators.
1469   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1470   for pkg in $enableval; do
1471     if test "X$pkg" = "X$p"; then
1472       enable_fast_install=yes
1473     fi
1474   done
1475   IFS="$ac_save_ifs"
1476   ;;
1477 esac
1478 else
1479   enable_fast_install=yes
1480 fi
1481
1482
1483 # Make sure we can run config.sub.
1484 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1485 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1486 fi
1487
1488 echo $ac_n "checking host system type""... $ac_c" 1>&6
1489 echo "configure:1490: checking host system type" >&5
1490
1491 host_alias=$host
1492 case "$host_alias" in
1493 NONE)
1494   case $nonopt in
1495   NONE)
1496     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1497     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1498     fi ;;
1499   *) host_alias=$nonopt ;;
1500   esac ;;
1501 esac
1502
1503 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1504 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1505 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1506 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1507 echo "$ac_t""$host" 1>&6
1508
1509 echo $ac_n "checking build system type""... $ac_c" 1>&6
1510 echo "configure:1511: checking build system type" >&5
1511
1512 build_alias=$build
1513 case "$build_alias" in
1514 NONE)
1515   case $nonopt in
1516   NONE) build_alias=$host_alias ;;
1517   *) build_alias=$nonopt ;;
1518   esac ;;
1519 esac
1520
1521 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1522 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1523 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1524 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1525 echo "$ac_t""$build" 1>&6
1526
1527 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1528 if test "${with_gnu_ld+set}" = set; then
1529   withval="$with_gnu_ld"
1530   test "$withval" = no || with_gnu_ld=yes
1531 else
1532   with_gnu_ld=no
1533 fi
1534
1535 ac_prog=ld
1536 if test "$GCC" = yes; then
1537   # Check if gcc -print-prog-name=ld gives a path.
1538   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1539 echo "configure:1540: checking for ld used by GCC" >&5
1540   case $host in
1541   *-*-mingw*)
1542     # gcc leaves a trailing carriage return which upsets mingw
1543     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1544   *)
1545     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1546   esac
1547   case $ac_prog in
1548     # Accept absolute paths.
1549     [\\/]* | [A-Za-z]:[\\/]*)
1550       re_direlt='/[^/][^/]*/\.\./'
1551       # Canonicalize the path of ld
1552       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1553       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1554         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1555       done
1556       test -z "$LD" && LD="$ac_prog"
1557       ;;
1558   "")
1559     # If it fails, then pretend we aren't using GCC.
1560     ac_prog=ld
1561     ;;
1562   *)
1563     # If it is relative, then search for the first ld in PATH.
1564     with_gnu_ld=unknown
1565     ;;
1566   esac
1567 elif test "$with_gnu_ld" = yes; then
1568   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1569 echo "configure:1570: checking for GNU ld" >&5
1570 else
1571   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1572 echo "configure:1573: checking for non-GNU ld" >&5
1573 fi
1574 if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1575   echo $ac_n "(cached) $ac_c" 1>&6
1576 else
1577   if test -z "$LD"; then
1578   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1579   for ac_dir in $PATH; do
1580     test -z "$ac_dir" && ac_dir=.
1581     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1582       lt_cv_path_LD="$ac_dir/$ac_prog"
1583       # Check to see if the program is GNU ld.  I'd rather use --version,
1584       # but apparently some GNU ld's only accept -v.
1585       # Break only if it was the GNU/non-GNU ld that we prefer.
1586       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1587         test "$with_gnu_ld" != no && break
1588       else
1589         test "$with_gnu_ld" != yes && break
1590       fi
1591     fi
1592   done
1593   IFS="$ac_save_ifs"
1594 else
1595   lt_cv_path_LD="$LD" # Let the user override the test with a path.
1596 fi
1597 fi
1598
1599 LD="$lt_cv_path_LD"
1600 if test -n "$LD"; then
1601   echo "$ac_t""$LD" 1>&6
1602 else
1603   echo "$ac_t""no" 1>&6
1604 fi
1605 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1606 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1607 echo "configure:1608: checking if the linker ($LD) is GNU ld" >&5
1608 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1609   echo $ac_n "(cached) $ac_c" 1>&6
1610 else
1611   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1612 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1613   lt_cv_prog_gnu_ld=yes
1614 else
1615   lt_cv_prog_gnu_ld=no
1616 fi
1617 fi
1618
1619 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1620 with_gnu_ld=$lt_cv_prog_gnu_ld
1621
1622
1623 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1624 echo "configure:1625: checking for $LD option to reload object files" >&5
1625 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1626   echo $ac_n "(cached) $ac_c" 1>&6
1627 else
1628   lt_cv_ld_reload_flag='-r'
1629 fi
1630
1631 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1632 reload_flag=$lt_cv_ld_reload_flag
1633 test -n "$reload_flag" && reload_flag=" $reload_flag"
1634
1635 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1636 echo "configure:1637: checking for BSD-compatible nm" >&5
1637 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1638   echo $ac_n "(cached) $ac_c" 1>&6
1639 else
1640   if test -n "$NM"; then
1641   # Let the user override the test.
1642   lt_cv_path_NM="$NM"
1643 else
1644   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1645   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1646     test -z "$ac_dir" && ac_dir=.
1647     tmp_nm=$ac_dir/${ac_tool_prefix}nm
1648     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1649       # Check to see if the nm accepts a BSD-compat flag.
1650       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1651       #   nm: unknown option "B" ignored
1652       # Tru64's nm complains that /dev/null is an invalid object file
1653       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1654         lt_cv_path_NM="$tmp_nm -B"
1655         break
1656       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1657         lt_cv_path_NM="$tmp_nm -p"
1658         break
1659       else
1660         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1661         continue # so that we can try to find one that supports BSD flags
1662       fi
1663     fi
1664   done
1665   IFS="$ac_save_ifs"
1666   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1667 fi
1668 fi
1669
1670 NM="$lt_cv_path_NM"
1671 echo "$ac_t""$NM" 1>&6
1672
1673 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1674 echo "configure:1675: checking whether ln -s works" >&5
1675 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1676   echo $ac_n "(cached) $ac_c" 1>&6
1677 else
1678   rm -f conftestdata
1679 if ln -s X conftestdata 2>/dev/null
1680 then
1681   rm -f conftestdata
1682   ac_cv_prog_LN_S="ln -s"
1683 else
1684   ac_cv_prog_LN_S=ln
1685 fi
1686 fi
1687 LN_S="$ac_cv_prog_LN_S"
1688 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1689   echo "$ac_t""yes" 1>&6
1690 else
1691   echo "$ac_t""no" 1>&6
1692 fi
1693
1694 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1695 echo "configure:1696: checking how to recognise dependant libraries" >&5
1696 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1697   echo $ac_n "(cached) $ac_c" 1>&6
1698 else
1699   lt_cv_file_magic_cmd='$MAGIC_CMD'
1700 lt_cv_file_magic_test_file=
1701 lt_cv_deplibs_check_method='unknown'
1702 # Need to set the preceding variable on all platforms that support
1703 # interlibrary dependencies.
1704 # 'none' -- dependencies not supported.
1705 # `unknown' -- same as none, but documents that we really don't know.
1706 # 'pass_all' -- all dependencies passed with no checks.
1707 # 'test_compile' -- check by making test program.
1708 # 'file_magic [[regex]]' -- check by looking for files in library path
1709 # which responds to the $file_magic_cmd with a given egrep regex.
1710 # If you have `file' or equivalent on your system and you're not sure
1711 # whether `pass_all' will *always* work, you probably want this one.
1712
1713 case $host_os in
1714 aix4* | aix5*)
1715   lt_cv_deplibs_check_method=pass_all
1716   ;;
1717
1718 beos*)
1719   lt_cv_deplibs_check_method=pass_all
1720   ;;
1721
1722 bsdi4*)
1723   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1724   lt_cv_file_magic_cmd='/usr/bin/file -L'
1725   lt_cv_file_magic_test_file=/shlib/libc.so
1726   ;;
1727
1728 cygwin* | mingw* | pw32*)
1729   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1730   lt_cv_file_magic_cmd='$OBJDUMP -f'
1731   ;;
1732
1733 darwin* | rhapsody*)
1734   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1735   lt_cv_file_magic_cmd='/usr/bin/file -L'
1736   case "$host_os" in
1737   rhapsody* | darwin1.[012])
1738     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
1739     ;;
1740   *) # Darwin 1.3 on
1741     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1742     ;;
1743   esac
1744   ;;
1745
1746 freebsd*)
1747   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1748     case $host_cpu in
1749     i*86 )
1750       # Not sure whether the presence of OpenBSD here was a mistake.
1751       # Let's accept both of them until this is cleared up.
1752       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1753       lt_cv_file_magic_cmd=/usr/bin/file
1754       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1755       ;;
1756     esac
1757   else
1758     lt_cv_deplibs_check_method=pass_all
1759   fi
1760   ;;
1761
1762 gnu*)
1763   lt_cv_deplibs_check_method=pass_all
1764   ;;
1765
1766 hpux10.20*|hpux11*)
1767   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1768   lt_cv_file_magic_cmd=/usr/bin/file
1769   lt_cv_file_magic_test_file=/usr/lib/libc.sl
1770   ;;
1771
1772 irix5* | irix6*)
1773   case $host_os in
1774   irix5*)
1775     # this will be overridden with pass_all, but let us keep it just in case
1776     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1777     ;;
1778   *)
1779     case $LD in
1780     *-32|*"-32 ") libmagic=32-bit;;
1781     *-n32|*"-n32 ") libmagic=N32;;
1782     *-64|*"-64 ") libmagic=64-bit;;
1783     *) libmagic=never-match;;
1784     esac
1785     # this will be overridden with pass_all, but let us keep it just in case
1786     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
1787     ;;
1788   esac
1789   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1790   lt_cv_deplibs_check_method=pass_all
1791   ;;
1792
1793 # This must be Linux ELF.
1794 linux-gnu*)
1795   case $host_cpu in
1796   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* )
1797     lt_cv_deplibs_check_method=pass_all ;;
1798   *)
1799     # glibc up to 2.1.1 does not perform some relocations on ARM
1800     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
1801   esac
1802   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1803   ;;
1804
1805 netbsd*)
1806   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1807     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1808   else
1809     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
1810   fi
1811   ;;
1812
1813 newos6*)
1814   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
1815   lt_cv_file_magic_cmd=/usr/bin/file
1816   lt_cv_file_magic_test_file=/usr/lib/libnls.so
1817   ;;
1818
1819 openbsd*)
1820   lt_cv_file_magic_cmd=/usr/bin/file
1821   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1822   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1823     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
1824   else
1825     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
1826   fi
1827   ;;
1828
1829 osf3* | osf4* | osf5*)
1830   # this will be overridden with pass_all, but let us keep it just in case
1831   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
1832   lt_cv_file_magic_test_file=/shlib/libc.so
1833   lt_cv_deplibs_check_method=pass_all
1834   ;;
1835
1836 sco3.2v5*)
1837   lt_cv_deplibs_check_method=pass_all
1838   ;;
1839
1840 solaris*)
1841   lt_cv_deplibs_check_method=pass_all
1842   lt_cv_file_magic_test_file=/lib/libc.so
1843   ;;
1844
1845 sysv5uw[78]* | sysv4*uw2*)
1846   lt_cv_deplibs_check_method=pass_all
1847   ;;
1848
1849 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1850   case $host_vendor in
1851   motorola)
1852     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
1853     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
1854     ;;
1855   ncr)
1856     lt_cv_deplibs_check_method=pass_all
1857     ;;
1858   sequent)
1859     lt_cv_file_magic_cmd='/bin/file'
1860     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
1861     ;;
1862   sni)
1863     lt_cv_file_magic_cmd='/bin/file'
1864     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
1865     lt_cv_file_magic_test_file=/lib/libc.so
1866     ;;
1867   esac
1868   ;;
1869 esac
1870
1871 fi
1872
1873 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
1874 file_magic_cmd=$lt_cv_file_magic_cmd
1875 deplibs_check_method=$lt_cv_deplibs_check_method
1876
1877 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1878 echo "configure:1879: checking for object suffix" >&5
1879 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1880   echo $ac_n "(cached) $ac_c" 1>&6
1881 else
1882   rm -f conftest*
1883 echo 'int i = 1;' > conftest.$ac_ext
1884 if { (eval echo configure:1885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1885   for ac_file in conftest.*; do
1886     case $ac_file in
1887     *.c) ;;
1888     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1889     esac
1890   done
1891 else
1892   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1893 fi
1894 rm -f conftest*
1895 fi
1896
1897 echo "$ac_t""$ac_cv_objext" 1>&6
1898 OBJEXT=$ac_cv_objext
1899 ac_objext=$ac_cv_objext
1900
1901
1902
1903 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1904 echo "configure:1905: checking for executable suffix" >&5
1905 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1906   echo $ac_n "(cached) $ac_c" 1>&6
1907 else
1908   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1909   ac_cv_exeext=.exe
1910 else
1911   rm -f conftest*
1912   echo 'int main () { return 0; }' > conftest.$ac_ext
1913   ac_cv_exeext=
1914   if { (eval echo configure:1915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1915     for file in conftest.*; do
1916       case $file in
1917       *.c | *.o | *.obj) ;;
1918       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1919       esac
1920     done
1921   else
1922     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1923   fi
1924   rm -f conftest*
1925   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1926 fi
1927 fi
1928
1929 EXEEXT=""
1930 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1931 echo "$ac_t""${ac_cv_exeext}" 1>&6
1932 ac_exeext=$EXEEXT
1933
1934 if test $host != $build; then
1935   ac_tool_prefix=${host_alias}-
1936 else
1937   ac_tool_prefix=
1938 fi
1939
1940
1941
1942
1943 # Check for command to grab the raw symbol name followed by C symbol from nm.
1944 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
1945 echo "configure:1946: checking command to parse $NM output" >&5
1946 if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then
1947   echo $ac_n "(cached) $ac_c" 1>&6
1948 else
1949   
1950 # These are sane defaults that work on at least a few old systems.
1951 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
1952
1953 # Character class describing NM global symbol codes.
1954 symcode='[BCDEGRST]'
1955
1956 # Regexp to match symbols that can be accessed directly from C.
1957 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1958
1959 # Transform the above into a raw symbol and a C symbol.
1960 symxfrm='\1 \2\3 \3'
1961
1962 # Transform an extracted symbol line into a proper C declaration
1963 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1964
1965 # Transform an extracted symbol line into symbol name and symbol address
1966 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
1967
1968 # Define system-specific variables.
1969 case $host_os in
1970 aix*)
1971   symcode='[BCDT]'
1972   ;;
1973 cygwin* | mingw* | pw32*)
1974   symcode='[ABCDGISTW]'
1975   ;;
1976 hpux*) # Its linker distinguishes data from code symbols
1977   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
1978   lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
1979   ;;
1980 irix*)
1981   symcode='[BCDEGRST]'
1982   ;;
1983 solaris* | sysv5*)
1984   symcode='[BDT]'
1985   ;;
1986 sysv4)
1987   symcode='[DFNSTU]'
1988   ;;
1989 esac
1990
1991 # Handle CRLF in mingw tool chain
1992 opt_cr=
1993 case $host_os in
1994 mingw*)
1995   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1996   ;;
1997 esac
1998
1999 # If we're using GNU nm, then use its standard symbol codes.
2000 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
2001   symcode='[ABCDGISTW]'
2002 fi
2003
2004 # Try without a prefix undercore, then with it.
2005 for ac_symprfx in "" "_"; do
2006
2007   # Write the raw and C identifiers.
2008 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
2009
2010   # Check to see that the pipe works correctly.
2011   pipe_works=no
2012   rm -f conftest*
2013   cat > conftest.$ac_ext <<EOF
2014 #ifdef __cplusplus
2015 extern "C" {
2016 #endif
2017 char nm_test_var;
2018 void nm_test_func(){}
2019 #ifdef __cplusplus
2020 }
2021 #endif
2022 int main(){nm_test_var='a';nm_test_func();return(0);}
2023 EOF
2024
2025   if { (eval echo configure:2026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2026     # Now try to grab the symbols.
2027     nlist=conftest.nm
2028     if { (eval echo configure:2029: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
2029       # Try sorting and uniquifying the output.
2030       if sort "$nlist" | uniq > "$nlist"T; then
2031         mv -f "$nlist"T "$nlist"
2032       else
2033         rm -f "$nlist"T
2034       fi
2035
2036       # Make sure that we snagged all the symbols we need.
2037       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
2038         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
2039           cat <<EOF > conftest.$ac_ext
2040 #ifdef __cplusplus
2041 extern "C" {
2042 #endif
2043
2044 EOF
2045           # Now generate the symbol file.
2046           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
2047
2048           cat <<EOF >> conftest.$ac_ext
2049 #if defined (__STDC__) && __STDC__
2050 # define lt_ptr void *
2051 #else
2052 # define lt_ptr char *
2053 # define const
2054 #endif
2055
2056 /* The mapping between symbol names and symbols. */
2057 const struct {
2058   const char *name;
2059   lt_ptr address;
2060 }
2061 lt_preloaded_symbols[] =
2062 {
2063 EOF
2064           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
2065           cat <<\EOF >> conftest.$ac_ext
2066   {0, (lt_ptr) 0}
2067 };
2068
2069 #ifdef __cplusplus
2070 }
2071 #endif
2072 EOF
2073           # Now try linking the two files.
2074           mv conftest.$ac_objext conftstm.$ac_objext
2075           save_LIBS="$LIBS"
2076           save_CFLAGS="$CFLAGS"
2077           LIBS="conftstm.$ac_objext"
2078           CFLAGS="$CFLAGS$no_builtin_flag"
2079           if { (eval echo configure:2080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2080             pipe_works=yes
2081           fi
2082           LIBS="$save_LIBS"
2083           CFLAGS="$save_CFLAGS"
2084         else
2085           echo "cannot find nm_test_func in $nlist" >&5
2086         fi
2087       else
2088         echo "cannot find nm_test_var in $nlist" >&5
2089       fi
2090     else
2091       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
2092     fi
2093   else
2094     echo "$progname: failed program was:" >&5
2095     cat conftest.$ac_ext >&5
2096   fi
2097   rm -f conftest* conftst*
2098
2099   # Do not use the global_symbol_pipe unless it works.
2100   if test "$pipe_works" = yes; then
2101     break
2102   else
2103     lt_cv_sys_global_symbol_pipe=
2104   fi
2105 done
2106
2107 fi
2108
2109 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
2110 if test -z "$lt_cv_sys_global_symbol_pipe"; then
2111   global_symbol_to_cdecl=
2112   global_symbol_to_c_name_address=
2113 else
2114   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
2115   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
2116 fi
2117 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
2118 then
2119   echo "$ac_t""failed" 1>&6
2120 else
2121   echo "$ac_t""ok" 1>&6
2122 fi
2123
2124 for ac_hdr in dlfcn.h
2125 do
2126 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2127 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2128 echo "configure:2129: checking for $ac_hdr" >&5
2129 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2130   echo $ac_n "(cached) $ac_c" 1>&6
2131 else
2132   cat > conftest.$ac_ext <<EOF
2133 #line 2134 "configure"
2134 #include "confdefs.h"
2135 #include <$ac_hdr>
2136 EOF
2137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2138 { (eval echo configure:2139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2140 if test -z "$ac_err"; then
2141   rm -rf conftest*
2142   eval "ac_cv_header_$ac_safe=yes"
2143 else
2144   echo "$ac_err" >&5
2145   echo "configure: failed program was:" >&5
2146   cat conftest.$ac_ext >&5
2147   rm -rf conftest*
2148   eval "ac_cv_header_$ac_safe=no"
2149 fi
2150 rm -f conftest*
2151 fi
2152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2153   echo "$ac_t""yes" 1>&6
2154     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2155   cat >> confdefs.h <<EOF
2156 #define $ac_tr_hdr 1
2157 EOF
2158  
2159 else
2160   echo "$ac_t""no" 1>&6
2161 fi
2162 done
2163
2164
2165
2166
2167
2168 # Only perform the check for file, if the check method requires it
2169 case $deplibs_check_method in
2170 file_magic*)
2171   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2172     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
2173 echo "configure:2174: checking for ${ac_tool_prefix}file" >&5
2174 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2175   echo $ac_n "(cached) $ac_c" 1>&6
2176 else
2177   case $MAGIC_CMD in
2178   /*)
2179   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2180   ;;
2181   ?:/*)
2182   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2183   ;;
2184   *)
2185   ac_save_MAGIC_CMD="$MAGIC_CMD"
2186   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2187   ac_dummy="/usr/bin:$PATH"
2188   for ac_dir in $ac_dummy; do
2189     test -z "$ac_dir" && ac_dir=.
2190     if test -f $ac_dir/${ac_tool_prefix}file; then
2191       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
2192       if test -n "$file_magic_test_file"; then
2193         case $deplibs_check_method in
2194         "file_magic "*)
2195           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2196           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2197           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2198             egrep "$file_magic_regex" > /dev/null; then
2199             :
2200           else
2201             cat <<EOF 1>&2
2202
2203 *** Warning: the command libtool uses to detect shared libraries,
2204 *** $file_magic_cmd, produces output that libtool cannot recognize.
2205 *** The result is that libtool may fail to recognize shared libraries
2206 *** as such.  This will affect the creation of libtool libraries that
2207 *** depend on shared libraries, but programs linked with such libtool
2208 *** libraries will work regardless of this problem.  Nevertheless, you
2209 *** may want to report the problem to your system manager and/or to
2210 *** bug-libtool@gnu.org
2211
2212 EOF
2213           fi ;;
2214         esac
2215       fi
2216       break
2217     fi
2218   done
2219   IFS="$ac_save_ifs"
2220   MAGIC_CMD="$ac_save_MAGIC_CMD"
2221   ;;
2222 esac
2223 fi
2224
2225 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2226 if test -n "$MAGIC_CMD"; then
2227   echo "$ac_t""$MAGIC_CMD" 1>&6
2228 else
2229   echo "$ac_t""no" 1>&6
2230 fi
2231
2232 if test -z "$lt_cv_path_MAGIC_CMD"; then
2233   if test -n "$ac_tool_prefix"; then
2234     echo $ac_n "checking for file""... $ac_c" 1>&6
2235 echo "configure:2236: checking for file" >&5
2236 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2237   echo $ac_n "(cached) $ac_c" 1>&6
2238 else
2239   case $MAGIC_CMD in
2240   /*)
2241   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2242   ;;
2243   ?:/*)
2244   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2245   ;;
2246   *)
2247   ac_save_MAGIC_CMD="$MAGIC_CMD"
2248   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2249   ac_dummy="/usr/bin:$PATH"
2250   for ac_dir in $ac_dummy; do
2251     test -z "$ac_dir" && ac_dir=.
2252     if test -f $ac_dir/file; then
2253       lt_cv_path_MAGIC_CMD="$ac_dir/file"
2254       if test -n "$file_magic_test_file"; then
2255         case $deplibs_check_method in
2256         "file_magic "*)
2257           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2258           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2259           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2260             egrep "$file_magic_regex" > /dev/null; then
2261             :
2262           else
2263             cat <<EOF 1>&2
2264
2265 *** Warning: the command libtool uses to detect shared libraries,
2266 *** $file_magic_cmd, produces output that libtool cannot recognize.
2267 *** The result is that libtool may fail to recognize shared libraries
2268 *** as such.  This will affect the creation of libtool libraries that
2269 *** depend on shared libraries, but programs linked with such libtool
2270 *** libraries will work regardless of this problem.  Nevertheless, you
2271 *** may want to report the problem to your system manager and/or to
2272 *** bug-libtool@gnu.org
2273
2274 EOF
2275           fi ;;
2276         esac
2277       fi
2278       break
2279     fi
2280   done
2281   IFS="$ac_save_ifs"
2282   MAGIC_CMD="$ac_save_MAGIC_CMD"
2283   ;;
2284 esac
2285 fi
2286
2287 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2288 if test -n "$MAGIC_CMD"; then
2289   echo "$ac_t""$MAGIC_CMD" 1>&6
2290 else
2291   echo "$ac_t""no" 1>&6
2292 fi
2293
2294   else
2295     MAGIC_CMD=:
2296   fi
2297 fi
2298
2299   fi
2300   ;;
2301 esac
2302
2303 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2304 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2305 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2306 echo "configure:2307: checking for $ac_word" >&5
2307 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2308   echo $ac_n "(cached) $ac_c" 1>&6
2309 else
2310   if test -n "$RANLIB"; then
2311   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2312 else
2313   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2314   ac_dummy="$PATH"
2315   for ac_dir in $ac_dummy; do
2316     test -z "$ac_dir" && ac_dir=.
2317     if test -f $ac_dir/$ac_word; then
2318       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2319       break
2320     fi
2321   done
2322   IFS="$ac_save_ifs"
2323 fi
2324 fi
2325 RANLIB="$ac_cv_prog_RANLIB"
2326 if test -n "$RANLIB"; then
2327   echo "$ac_t""$RANLIB" 1>&6
2328 else
2329   echo "$ac_t""no" 1>&6
2330 fi
2331
2332
2333 if test -z "$ac_cv_prog_RANLIB"; then
2334 if test -n "$ac_tool_prefix"; then
2335   # Extract the first word of "ranlib", so it can be a program name with args.
2336 set dummy ranlib; ac_word=$2
2337 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2338 echo "configure:2339: checking for $ac_word" >&5
2339 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2340   echo $ac_n "(cached) $ac_c" 1>&6
2341 else
2342   if test -n "$RANLIB"; then
2343   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2344 else
2345   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2346   ac_dummy="$PATH"
2347   for ac_dir in $ac_dummy; do
2348     test -z "$ac_dir" && ac_dir=.
2349     if test -f $ac_dir/$ac_word; then
2350       ac_cv_prog_RANLIB="ranlib"
2351       break
2352     fi
2353   done
2354   IFS="$ac_save_ifs"
2355   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2356 fi
2357 fi
2358 RANLIB="$ac_cv_prog_RANLIB"
2359 if test -n "$RANLIB"; then
2360   echo "$ac_t""$RANLIB" 1>&6
2361 else
2362   echo "$ac_t""no" 1>&6
2363 fi
2364
2365 else
2366   RANLIB=":"
2367 fi
2368 fi
2369
2370 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2371 set dummy ${ac_tool_prefix}strip; ac_word=$2
2372 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2373 echo "configure:2374: checking for $ac_word" >&5
2374 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2375   echo $ac_n "(cached) $ac_c" 1>&6
2376 else
2377   if test -n "$STRIP"; then
2378   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2379 else
2380   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2381   ac_dummy="$PATH"
2382   for ac_dir in $ac_dummy; do
2383     test -z "$ac_dir" && ac_dir=.
2384     if test -f $ac_dir/$ac_word; then
2385       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2386       break
2387     fi
2388   done
2389   IFS="$ac_save_ifs"
2390 fi
2391 fi
2392 STRIP="$ac_cv_prog_STRIP"
2393 if test -n "$STRIP"; then
2394   echo "$ac_t""$STRIP" 1>&6
2395 else
2396   echo "$ac_t""no" 1>&6
2397 fi
2398
2399
2400 if test -z "$ac_cv_prog_STRIP"; then
2401 if test -n "$ac_tool_prefix"; then
2402   # Extract the first word of "strip", so it can be a program name with args.
2403 set dummy strip; ac_word=$2
2404 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2405 echo "configure:2406: checking for $ac_word" >&5
2406 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2407   echo $ac_n "(cached) $ac_c" 1>&6
2408 else
2409   if test -n "$STRIP"; then
2410   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2411 else
2412   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2413   ac_dummy="$PATH"
2414   for ac_dir in $ac_dummy; do
2415     test -z "$ac_dir" && ac_dir=.
2416     if test -f $ac_dir/$ac_word; then
2417       ac_cv_prog_STRIP="strip"
2418       break
2419     fi
2420   done
2421   IFS="$ac_save_ifs"
2422   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2423 fi
2424 fi
2425 STRIP="$ac_cv_prog_STRIP"
2426 if test -n "$STRIP"; then
2427   echo "$ac_t""$STRIP" 1>&6
2428 else
2429   echo "$ac_t""no" 1>&6
2430 fi
2431
2432 else
2433   STRIP=":"
2434 fi
2435 fi
2436
2437
2438 enable_dlopen=yes
2439 enable_win32_dll=no
2440
2441 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2442 if test "${enable_libtool_lock+set}" = set; then
2443   enableval="$enable_libtool_lock"
2444   :
2445 fi
2446
2447 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2448
2449 # Some flags need to be propagated to the compiler or linker for good
2450 # libtool support.
2451 case $host in
2452 *-*-irix6*)
2453   # Find out which ABI we are using.
2454   echo '#line 2455 "configure"' > conftest.$ac_ext
2455   if { (eval echo configure:2456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2456     case `/usr/bin/file conftest.$ac_objext` in
2457     *32-bit*)
2458       LD="${LD-ld} -32"
2459       ;;
2460     *N32*)
2461       LD="${LD-ld} -n32"
2462       ;;
2463     *64-bit*)
2464       LD="${LD-ld} -64"
2465       ;;
2466     esac
2467   fi
2468   rm -rf conftest*
2469   ;;
2470
2471 *-*-sco3.2v5*)
2472   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2473   SAVE_CFLAGS="$CFLAGS"
2474   CFLAGS="$CFLAGS -belf"
2475   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2476 echo "configure:2477: checking whether the C compiler needs -belf" >&5
2477 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2478   echo $ac_n "(cached) $ac_c" 1>&6
2479 else
2480   
2481      ac_ext=c
2482 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2483 ac_cpp='$CPP $CPPFLAGS'
2484 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2485 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2486 cross_compiling=$ac_cv_prog_cc_cross
2487
2488      cat > conftest.$ac_ext <<EOF
2489 #line 2490 "configure"
2490 #include "confdefs.h"
2491
2492 int main() {
2493
2494 ; return 0; }
2495 EOF
2496 if { (eval echo configure:2497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2497   rm -rf conftest*
2498   lt_cv_cc_needs_belf=yes
2499 else
2500   echo "configure: failed program was:" >&5
2501   cat conftest.$ac_ext >&5
2502   rm -rf conftest*
2503   lt_cv_cc_needs_belf=no
2504 fi
2505 rm -f conftest*
2506      ac_ext=c
2507 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2508 ac_cpp='$CPP $CPPFLAGS'
2509 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2510 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2511 cross_compiling=$ac_cv_prog_cc_cross
2512
2513 fi
2514
2515 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2516   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2517     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2518     CFLAGS="$SAVE_CFLAGS"
2519   fi
2520   ;;
2521
2522
2523 esac
2524
2525 # Sed substitution that helps us do robust quoting.  It backslashifies
2526 # metacharacters that are still active within double-quoted strings.
2527 Xsed='sed -e s/^X//'
2528 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
2529
2530 # Same as above, but do not quote variable references.
2531 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
2532
2533 # Sed substitution to delay expansion of an escaped shell variable in a
2534 # double_quote_subst'ed string.
2535 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2536
2537 # Constants:
2538 rm="rm -f"
2539
2540 # Global variables:
2541 default_ofile=libtool
2542 can_build_shared=yes
2543
2544 # All known linkers require a `.a' archive for static linking (except M$VC,
2545 # which needs '.lib').
2546 libext=a
2547 ltmain="$ac_aux_dir/ltmain.sh"
2548 ofile="$default_ofile"
2549 with_gnu_ld="$lt_cv_prog_gnu_ld"
2550 need_locks="$enable_libtool_lock"
2551
2552 old_CC="$CC"
2553 old_CFLAGS="$CFLAGS"
2554
2555 # Set sane defaults for various variables
2556 test -z "$AR" && AR=ar
2557 test -z "$AR_FLAGS" && AR_FLAGS=cru
2558 test -z "$AS" && AS=as
2559 test -z "$CC" && CC=cc
2560 test -z "$DLLTOOL" && DLLTOOL=dlltool
2561 test -z "$LD" && LD=ld
2562 test -z "$LN_S" && LN_S="ln -s"
2563 test -z "$MAGIC_CMD" && MAGIC_CMD=file
2564 test -z "$NM" && NM=nm
2565 test -z "$OBJDUMP" && OBJDUMP=objdump
2566 test -z "$RANLIB" && RANLIB=:
2567 test -z "$STRIP" && STRIP=:
2568 test -z "$ac_objext" && ac_objext=o
2569
2570 if test x"$host" != x"$build"; then
2571   ac_tool_prefix=${host_alias}-
2572 else
2573   ac_tool_prefix=
2574 fi
2575
2576 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
2577 case $host_os in
2578 linux-gnu*) ;;
2579 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
2580 esac
2581
2582 case $host_os in
2583 aix3*)
2584   # AIX sometimes has problems with the GCC collect2 program.  For some
2585   # reason, if we set the COLLECT_NAMES environment variable, the problems
2586   # vanish in a puff of smoke.
2587   if test "X${COLLECT_NAMES+set}" != Xset; then
2588     COLLECT_NAMES=
2589     export COLLECT_NAMES
2590   fi
2591   ;;
2592 esac
2593
2594 # Determine commands to create old-style static archives.
2595 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
2596 old_postinstall_cmds='chmod 644 $oldlib'
2597 old_postuninstall_cmds=
2598
2599 if test -n "$RANLIB"; then
2600   case $host_os in
2601   openbsd*)
2602     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
2603     ;;
2604   *)
2605     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
2606     ;;
2607   esac
2608   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2609 fi
2610
2611 # Allow CC to be a program name with arguments.
2612 set dummy $CC
2613 compiler="$2"
2614
2615 ## FIXME: this should be a separate macro
2616 ##
2617 echo $ac_n "checking for objdir""... $ac_c" 1>&6
2618 echo "configure:2619: checking for objdir" >&5
2619 rm -f .libs 2>/dev/null
2620 mkdir .libs 2>/dev/null
2621 if test -d .libs; then
2622   objdir=.libs
2623 else
2624   # MS-DOS does not allow filenames that begin with a dot.
2625   objdir=_libs
2626 fi
2627 rmdir .libs 2>/dev/null
2628 echo "$ac_t""$objdir" 1>&6
2629 ##
2630 ## END FIXME
2631
2632
2633 ## FIXME: this should be a separate macro
2634 ##
2635 # Check whether --with-pic or --without-pic was given.
2636 if test "${with_pic+set}" = set; then
2637   withval="$with_pic"
2638   pic_mode="$withval"
2639 else
2640   pic_mode=default
2641 fi
2642
2643 test -z "$pic_mode" && pic_mode=default
2644
2645 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
2646 # in isolation, and that seeing it set (from the cache) indicates that
2647 # the associated values are set (in the cache) correctly too.
2648 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
2649 echo "configure:2650: checking for $compiler option to produce PIC" >&5
2650 if eval "test \"`echo '$''{'lt_cv_prog_cc_pic'+set}'`\" = set"; then
2651   echo $ac_n "(cached) $ac_c" 1>&6
2652 else
2653    lt_cv_prog_cc_pic=
2654   lt_cv_prog_cc_shlib=
2655   lt_cv_prog_cc_wl=
2656   lt_cv_prog_cc_static=
2657   lt_cv_prog_cc_no_builtin=
2658   lt_cv_prog_cc_can_build_shared=$can_build_shared
2659
2660   if test "$GCC" = yes; then
2661     lt_cv_prog_cc_wl='-Wl,'
2662     lt_cv_prog_cc_static='-static'
2663
2664     case $host_os in
2665     aix*)
2666       # Below there is a dirty hack to force normal static linking with -ldl
2667       # The problem is because libdl dynamically linked with both libc and
2668       # libC (AIX C++ library), which obviously doesn't included in libraries
2669       # list by gcc. This cause undefined symbols with -static flags.
2670       # This hack allows C programs to be linked with "-static -ldl", but
2671       # not sure about C++ programs.
2672       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
2673       ;;
2674     amigaos*)
2675       # FIXME: we need at least 68020 code to build shared libraries, but
2676       # adding the `-m68020' flag to GCC prevents building anything better,
2677       # like `-m68040'.
2678       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
2679       ;;
2680     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
2681       # PIC is the default for these OSes.
2682       ;;
2683     darwin* | rhapsody*)
2684       # PIC is the default on this platform
2685       # Common symbols not allowed in MH_DYLIB files
2686       lt_cv_prog_cc_pic='-fno-common'
2687       ;;
2688     cygwin* | mingw* | pw32* | os2*)
2689       # This hack is so that the source file can tell whether it is being
2690       # built for inclusion in a dll (and should export symbols for example).
2691       lt_cv_prog_cc_pic='-DDLL_EXPORT'
2692       ;;
2693     sysv4*MP*)
2694       if test -d /usr/nec; then
2695          lt_cv_prog_cc_pic=-Kconform_pic
2696       fi
2697       ;;
2698     *)
2699       lt_cv_prog_cc_pic='-fPIC'
2700       ;;
2701     esac
2702   else
2703     # PORTME Check for PIC flags for the system compiler.
2704     case $host_os in
2705     aix3* | aix4* | aix5*)
2706       lt_cv_prog_cc_wl='-Wl,'
2707       # All AIX code is PIC.
2708       if test "$host_cpu" = ia64; then
2709         # AIX 5 now supports IA64 processor
2710         lt_cv_prog_cc_static='-Bstatic'
2711       else
2712         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
2713       fi
2714       ;;
2715
2716     hpux9* | hpux10* | hpux11*)
2717       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
2718       lt_cv_prog_cc_wl='-Wl,'
2719       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
2720       lt_cv_prog_cc_pic='+Z'
2721       ;;
2722
2723     irix5* | irix6*)
2724       lt_cv_prog_cc_wl='-Wl,'
2725       lt_cv_prog_cc_static='-non_shared'
2726       # PIC (with -KPIC) is the default.
2727       ;;
2728
2729     cygwin* | mingw* | pw32* | os2*)
2730       # This hack is so that the source file can tell whether it is being
2731       # built for inclusion in a dll (and should export symbols for example).
2732       lt_cv_prog_cc_pic='-DDLL_EXPORT'
2733       ;;
2734
2735     newsos6)
2736       lt_cv_prog_cc_pic='-KPIC'
2737       lt_cv_prog_cc_static='-Bstatic'
2738       ;;
2739
2740     osf3* | osf4* | osf5*)
2741       # All OSF/1 code is PIC.
2742       lt_cv_prog_cc_wl='-Wl,'
2743       lt_cv_prog_cc_static='-non_shared'
2744       ;;
2745
2746     sco3.2v5*)
2747       lt_cv_prog_cc_pic='-Kpic'
2748       lt_cv_prog_cc_static='-dn'
2749       lt_cv_prog_cc_shlib='-belf'
2750       ;;
2751
2752     solaris*)
2753       lt_cv_prog_cc_pic='-KPIC'
2754       lt_cv_prog_cc_static='-Bstatic'
2755       lt_cv_prog_cc_wl='-Wl,'
2756       ;;
2757
2758     sunos4*)
2759       lt_cv_prog_cc_pic='-PIC'
2760       lt_cv_prog_cc_static='-Bstatic'
2761       lt_cv_prog_cc_wl='-Qoption ld '
2762       ;;
2763
2764     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2765       lt_cv_prog_cc_pic='-KPIC'
2766       lt_cv_prog_cc_static='-Bstatic'
2767       if test "x$host_vendor" = xsni; then
2768         lt_cv_prog_cc_wl='-LD'
2769       else
2770         lt_cv_prog_cc_wl='-Wl,'
2771       fi
2772       ;;
2773
2774     uts4*)
2775       lt_cv_prog_cc_pic='-pic'
2776       lt_cv_prog_cc_static='-Bstatic'
2777       ;;
2778
2779     sysv4*MP*)
2780       if test -d /usr/nec ;then
2781         lt_cv_prog_cc_pic='-Kconform_pic'
2782         lt_cv_prog_cc_static='-Bstatic'
2783       fi
2784       ;;
2785
2786     *)
2787       lt_cv_prog_cc_can_build_shared=no
2788       ;;
2789     esac
2790   fi
2791
2792 fi
2793
2794 if test -z "$lt_cv_prog_cc_pic"; then
2795   echo "$ac_t""none" 1>&6
2796 else
2797   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
2798
2799   # Check to make sure the pic_flag actually works.
2800   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
2801 echo "configure:2802: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
2802   if eval "test \"`echo '$''{'lt_cv_prog_cc_pic_works'+set}'`\" = set"; then
2803   echo $ac_n "(cached) $ac_c" 1>&6
2804 else
2805       save_CFLAGS="$CFLAGS"
2806     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
2807     cat > conftest.$ac_ext <<EOF
2808 #line 2809 "configure"
2809 #include "confdefs.h"
2810
2811 int main() {
2812
2813 ; return 0; }
2814 EOF
2815 if { (eval echo configure:2816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2816   rm -rf conftest*
2817         case $host_os in
2818       hpux9* | hpux10* | hpux11*)
2819         # On HP-UX, both CC and GCC only warn that PIC is supported... then
2820         # they create non-PIC objects.  So, if there were any warnings, we
2821         # assume that PIC is not supported.
2822         if test -s conftest.err; then
2823           lt_cv_prog_cc_pic_works=no
2824         else
2825           lt_cv_prog_cc_pic_works=yes
2826         fi
2827         ;;
2828       *)
2829         lt_cv_prog_cc_pic_works=yes
2830         ;;
2831       esac
2832     
2833 else
2834   echo "configure: failed program was:" >&5
2835   cat conftest.$ac_ext >&5
2836   rm -rf conftest*
2837         lt_cv_prog_cc_pic_works=no
2838     
2839 fi
2840 rm -f conftest*
2841     CFLAGS="$save_CFLAGS"
2842   
2843 fi
2844
2845
2846   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
2847     lt_cv_prog_cc_pic=
2848     lt_cv_prog_cc_can_build_shared=no
2849   else
2850     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
2851   fi
2852
2853   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
2854 fi
2855 ##
2856 ## END FIXME
2857
2858 # Check for any special shared library compilation flags.
2859 if test -n "$lt_cv_prog_cc_shlib"; then
2860   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
2861   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
2862   else
2863    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
2864     lt_cv_prog_cc_can_build_shared=no
2865   fi
2866 fi
2867
2868 ## FIXME: this should be a separate macro
2869 ##
2870 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
2871 echo "configure:2872: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
2872 if eval "test \"`echo '$''{'lt_cv_prog_cc_static_works'+set}'`\" = set"; then
2873   echo $ac_n "(cached) $ac_c" 1>&6
2874 else
2875     lt_cv_prog_cc_static_works=no
2876   save_LDFLAGS="$LDFLAGS"
2877   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
2878   cat > conftest.$ac_ext <<EOF
2879 #line 2880 "configure"
2880 #include "confdefs.h"
2881
2882 int main() {
2883
2884 ; return 0; }
2885 EOF
2886 if { (eval echo configure:2887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2887   rm -rf conftest*
2888   lt_cv_prog_cc_static_works=yes
2889 else
2890   echo "configure: failed program was:" >&5
2891   cat conftest.$ac_ext >&5
2892 fi
2893 rm -f conftest*
2894   LDFLAGS="$save_LDFLAGS"
2895
2896 fi
2897
2898
2899 # Belt *and* braces to stop my trousers falling down:
2900 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
2901 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
2902
2903 pic_flag="$lt_cv_prog_cc_pic"
2904 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
2905 wl="$lt_cv_prog_cc_wl"
2906 link_static_flag="$lt_cv_prog_cc_static"
2907 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
2908 can_build_shared="$lt_cv_prog_cc_can_build_shared"
2909 ##
2910 ## END FIXME
2911
2912
2913 ## FIXME: this should be a separate macro
2914 ##
2915 # Check to see if options -o and -c are simultaneously supported by compiler
2916 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
2917 echo "configure:2918: checking if $compiler supports -c -o file.$ac_objext" >&5
2918 if eval "test \"`echo '$''{'lt_cv_compiler_c_o'+set}'`\" = set"; then
2919   echo $ac_n "(cached) $ac_c" 1>&6
2920 else
2921   
2922 $rm -r conftest 2>/dev/null
2923 mkdir conftest
2924 cd conftest
2925 echo "int some_variable = 0;" > conftest.$ac_ext
2926 mkdir out
2927 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
2928 # that will create temporary files in the current directory regardless of
2929 # the output directory.  Thus, making CWD read-only will cause this test
2930 # to fail, enabling locking or at least warning the user not to do parallel
2931 # builds.
2932 chmod -w .
2933 save_CFLAGS="$CFLAGS"
2934 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
2935 compiler_c_o=no
2936 if { (eval echo configure:2937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
2937   # The compiler can only warn and ignore the option if not recognized
2938   # So say no if there are warnings
2939   if test -s out/conftest.err; then
2940     lt_cv_compiler_c_o=no
2941   else
2942     lt_cv_compiler_c_o=yes
2943   fi
2944 else
2945   # Append any errors to the config.log.
2946   cat out/conftest.err 1>&5
2947   lt_cv_compiler_c_o=no
2948 fi
2949 CFLAGS="$save_CFLAGS"
2950 chmod u+w .
2951 $rm conftest* out/*
2952 rmdir out
2953 cd ..
2954 rmdir conftest
2955 $rm -r conftest 2>/dev/null
2956
2957 fi
2958
2959 compiler_c_o=$lt_cv_compiler_c_o
2960 echo "$ac_t""$compiler_c_o" 1>&6
2961
2962 if test x"$compiler_c_o" = x"yes"; then
2963   # Check to see if we can write to a .lo
2964   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
2965 echo "configure:2966: checking if $compiler supports -c -o file.lo" >&5
2966   if eval "test \"`echo '$''{'lt_cv_compiler_o_lo'+set}'`\" = set"; then
2967   echo $ac_n "(cached) $ac_c" 1>&6
2968 else
2969   
2970   lt_cv_compiler_o_lo=no
2971   save_CFLAGS="$CFLAGS"
2972   CFLAGS="$CFLAGS -c -o conftest.lo"
2973   save_objext="$ac_objext"
2974   ac_objext=lo
2975   cat > conftest.$ac_ext <<EOF
2976 #line 2977 "configure"
2977 #include "confdefs.h"
2978
2979 int main() {
2980 int some_variable = 0;
2981 ; return 0; }
2982 EOF
2983 if { (eval echo configure:2984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2984   rm -rf conftest*
2985       # The compiler can only warn and ignore the option if not recognized
2986     # So say no if there are warnings
2987     if test -s conftest.err; then
2988       lt_cv_compiler_o_lo=no
2989     else
2990       lt_cv_compiler_o_lo=yes
2991     fi
2992   
2993 else
2994   echo "configure: failed program was:" >&5
2995   cat conftest.$ac_ext >&5
2996 fi
2997 rm -f conftest*
2998   ac_objext="$save_objext"
2999   CFLAGS="$save_CFLAGS"
3000   
3001 fi
3002
3003   compiler_o_lo=$lt_cv_compiler_o_lo
3004   echo "$ac_t""$compiler_o_lo" 1>&6
3005 else
3006   compiler_o_lo=no
3007 fi
3008 ##
3009 ## END FIXME
3010
3011 ## FIXME: this should be a separate macro
3012 ##
3013 # Check to see if we can do hard links to lock some files if needed
3014 hard_links="nottested"
3015 if test "$compiler_c_o" = no && test "$need_locks" != no; then
3016   # do not overwrite the value of need_locks provided by the user
3017   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
3018 echo "configure:3019: checking if we can lock with hard links" >&5
3019   hard_links=yes
3020   $rm conftest*
3021   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3022   touch conftest.a
3023   ln conftest.a conftest.b 2>&5 || hard_links=no
3024   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3025   echo "$ac_t""$hard_links" 1>&6
3026   if test "$hard_links" = no; then
3027     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
3028     need_locks=warn
3029   fi
3030 else
3031   need_locks=no
3032 fi
3033 ##
3034 ## END FIXME
3035
3036 ## FIXME: this should be a separate macro
3037 ##
3038 if test "$GCC" = yes; then
3039   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
3040   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
3041 echo "configure:3042: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
3042   echo "int some_variable = 0;" > conftest.$ac_ext
3043   save_CFLAGS="$CFLAGS"
3044   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
3045   compiler_rtti_exceptions=no
3046   cat > conftest.$ac_ext <<EOF
3047 #line 3048 "configure"
3048 #include "confdefs.h"
3049
3050 int main() {
3051 int some_variable = 0;
3052 ; return 0; }
3053 EOF
3054 if { (eval echo configure:3055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3055   rm -rf conftest*
3056       # The compiler can only warn and ignore the option if not recognized
3057     # So say no if there are warnings
3058     if test -s conftest.err; then
3059       compiler_rtti_exceptions=no
3060     else
3061       compiler_rtti_exceptions=yes
3062     fi
3063   
3064 else
3065   echo "configure: failed program was:" >&5
3066   cat conftest.$ac_ext >&5
3067 fi
3068 rm -f conftest*
3069   CFLAGS="$save_CFLAGS"
3070   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
3071
3072   if test "$compiler_rtti_exceptions" = "yes"; then
3073     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
3074   else
3075     no_builtin_flag=' -fno-builtin'
3076   fi
3077 fi
3078 ##
3079 ## END FIXME
3080
3081 ## FIXME: this should be a separate macro
3082 ##
3083 # See if the linker supports building shared libraries.
3084 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
3085 echo "configure:3086: checking whether the linker ($LD) supports shared libraries" >&5
3086
3087 allow_undefined_flag=
3088 no_undefined_flag=
3089 need_lib_prefix=unknown
3090 need_version=unknown
3091 # when you set need_version to no, make sure it does not cause -set_version
3092 # flags to be left without arguments
3093 archive_cmds=
3094 archive_expsym_cmds=
3095 old_archive_from_new_cmds=
3096 old_archive_from_expsyms_cmds=
3097 export_dynamic_flag_spec=
3098 whole_archive_flag_spec=
3099 thread_safe_flag_spec=
3100 hardcode_into_libs=no
3101 hardcode_libdir_flag_spec=
3102 hardcode_libdir_separator=
3103 hardcode_direct=no
3104 hardcode_minus_L=no
3105 hardcode_shlibpath_var=unsupported
3106 runpath_var=
3107 link_all_deplibs=unknown
3108 always_export_symbols=no
3109 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
3110 # include_expsyms should be a list of space-separated symbols to be *always*
3111 # included in the symbol list
3112 include_expsyms=
3113 # exclude_expsyms can be an egrep regular expression of symbols to exclude
3114 # it will be wrapped by ` (' and `)$', so one must not match beginning or
3115 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
3116 # as well as any symbol that contains `d'.
3117 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
3118 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
3119 # platforms (ab)use it in PIC code, but their linkers get confused if
3120 # the symbol is explicitly referenced.  Since portable code cannot
3121 # rely on this symbol name, it's probably fine to never include it in
3122 # preloaded symbol tables.
3123 extract_expsyms_cmds=
3124
3125 case $host_os in
3126 cygwin* | mingw* | pw32*)
3127   # FIXME: the MSVC++ port hasn't been tested in a loooong time
3128   # When not using gcc, we currently assume that we are using
3129   # Microsoft Visual C++.
3130   if test "$GCC" != yes; then
3131     with_gnu_ld=no
3132   fi
3133   ;;
3134 openbsd*)
3135   with_gnu_ld=no
3136   ;;
3137 esac
3138
3139 ld_shlibs=yes
3140 if test "$with_gnu_ld" = yes; then
3141   # If archive_cmds runs LD, not CC, wlarc should be empty
3142   wlarc='${wl}'
3143
3144   # See if GNU ld supports shared libraries.
3145   case $host_os in
3146   aix3* | aix4* | aix5*)
3147     # On AIX, the GNU linker is very broken
3148     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
3149     ld_shlibs=no
3150     cat <<EOF 1>&2
3151
3152 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
3153 *** to be unable to reliably create shared libraries on AIX.
3154 *** Therefore, libtool is disabling shared libraries support.  If you
3155 *** really care for shared libraries, you may want to modify your PATH
3156 *** so that a non-GNU linker is found, and then restart.
3157
3158 EOF
3159     ;;
3160
3161   amigaos*)
3162     archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
3163     hardcode_libdir_flag_spec='-L$libdir'
3164     hardcode_minus_L=yes
3165
3166     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
3167     # that the semantics of dynamic libraries on AmigaOS, at least up
3168     # to version 4, is to share data among multiple programs linked
3169     # with the same dynamic library.  Since this doesn't match the
3170     # behavior of shared libraries on other platforms, we can use
3171     # them.
3172     ld_shlibs=no
3173     ;;
3174
3175   beos*)
3176     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
3177       allow_undefined_flag=unsupported
3178       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3179       # support --undefined.  This deserves some investigation.  FIXME
3180       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3181     else
3182       ld_shlibs=no
3183     fi
3184     ;;
3185
3186   cygwin* | mingw* | pw32*)
3187     # hardcode_libdir_flag_spec is actually meaningless, as there is
3188     # no search path for DLLs.
3189     hardcode_libdir_flag_spec='-L$libdir'
3190     allow_undefined_flag=unsupported
3191     always_export_symbols=yes
3192
3193     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
3194       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
3195       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
3196       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
3197       else $CC -o impgen impgen.c ; fi)~
3198       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
3199
3200     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
3201
3202     # cygwin and mingw dlls have different entry points and sets of symbols
3203     # to exclude.
3204     # FIXME: what about values for MSVC?
3205     dll_entry=__cygwin_dll_entry@12
3206     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
3207     case $host_os in
3208     mingw*)
3209       # mingw values
3210       dll_entry=_DllMainCRTStartup@12
3211       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
3212       ;;
3213     esac
3214
3215     # mingw and cygwin differ, and it's simplest to just exclude the union
3216     # of the two symbol sets.
3217     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
3218
3219     # recent cygwin and mingw systems supply a stub DllMain which the user
3220     # can override, but on older systems we have to supply one (in ltdll.c)
3221     if test "x$lt_cv_need_dllmain" = "xyes"; then
3222       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
3223       ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
3224         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
3225     else
3226       ltdll_obj=
3227       ltdll_cmds=
3228     fi
3229
3230     # Extract the symbol export list from an `--export-all' def file,
3231     # then regenerate the def file from the symbol export list, so that
3232     # the compiled dll only exports the symbol export list.
3233     # Be careful not to strip the DATA tag left be newer dlltools.
3234     export_symbols_cmds="$ltdll_cmds"'
3235       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
3236       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
3237
3238     # If the export-symbols file already is a .def file (1st line
3239     # is EXPORTS), use it as is.
3240     # If DATA tags from a recent dlltool are present, honour them!
3241     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
3242         cp $export_symbols $output_objdir/$soname-def;
3243       else
3244         echo EXPORTS > $output_objdir/$soname-def;
3245         _lt_hint=1;
3246         cat $export_symbols | while read symbol; do
3247          set dummy \$symbol;
3248          case \$# in
3249            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
3250            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
3251          esac;
3252          _lt_hint=`expr 1 + \$_lt_hint`;
3253         done;
3254       fi~
3255       '"$ltdll_cmds"'
3256       $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
3257       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
3258       $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
3259       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
3260       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
3261     ;;
3262
3263   netbsd*)
3264     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3265       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
3266       wlarc=
3267     else
3268       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3269       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3270     fi
3271     ;;
3272
3273   solaris* | sysv5*)
3274     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
3275       ld_shlibs=no
3276       cat <<EOF 1>&2
3277
3278 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
3279 *** create shared libraries on Solaris systems.  Therefore, libtool
3280 *** is disabling shared libraries support.  We urge you to upgrade GNU
3281 *** binutils to release 2.9.1 or newer.  Another option is to modify
3282 *** your PATH or compiler configuration so that the native linker is
3283 *** used, and then restart.
3284
3285 EOF
3286     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
3287       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3288       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3289     else
3290       ld_shlibs=no
3291     fi
3292     ;;
3293
3294   sunos4*)
3295     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3296     wlarc=
3297     hardcode_direct=yes
3298     hardcode_shlibpath_var=no
3299     ;;
3300
3301   *)
3302     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
3303       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3304       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3305     else
3306       ld_shlibs=no
3307     fi
3308     ;;
3309   esac
3310
3311   if test "$ld_shlibs" = yes; then
3312     runpath_var=LD_RUN_PATH
3313     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
3314     export_dynamic_flag_spec='${wl}--export-dynamic'
3315     case $host_os in
3316     cygwin* | mingw* | pw32*)
3317       # dlltool doesn't understand --whole-archive et. al.
3318       whole_archive_flag_spec=
3319       ;;
3320     *)
3321       # ancient GNU ld didn't support --whole-archive et. al.
3322       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
3323         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3324       else
3325         whole_archive_flag_spec=
3326       fi
3327       ;;
3328     esac
3329   fi
3330 else
3331   # PORTME fill in a description of your system's linker (not GNU ld)
3332   case $host_os in
3333   aix3*)
3334     allow_undefined_flag=unsupported
3335     always_export_symbols=yes
3336     archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
3337     # Note: this linker hardcodes the directories in LIBPATH if there
3338     # are no directories specified by -L.
3339     hardcode_minus_L=yes
3340     if test "$GCC" = yes && test -z "$link_static_flag"; then
3341       # Neither direct hardcoding nor static linking is supported with a
3342       # broken collect2.
3343       hardcode_direct=unsupported
3344     fi
3345     ;;
3346
3347   aix4* | aix5*)
3348     if test "$host_cpu" = ia64; then
3349       # On IA64, the linker does run time linking by default, so we don't
3350       # have to do anything special.
3351       aix_use_runtimelinking=no
3352       exp_sym_flag='-Bexport'
3353       no_entry_flag=""
3354     else
3355       aix_use_runtimelinking=no
3356
3357       # Test if we are trying to use run time linking or normal
3358       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3359       # need to do runtime linking.
3360       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
3361         for ld_flag in $LDFLAGS; do
3362           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
3363             aix_use_runtimelinking=yes
3364             break
3365           fi
3366         done
3367       esac
3368
3369       exp_sym_flag='-bexport'
3370       no_entry_flag='-bnoentry'
3371     fi
3372
3373     # When large executables or shared objects are built, AIX ld can
3374     # have problems creating the table of contents.  If linking a library
3375     # or program results in "error TOC overflow" add -mminimal-toc to
3376     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3377     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3378
3379     hardcode_direct=yes
3380     archive_cmds=''
3381     hardcode_libdir_separator=':'
3382     if test "$GCC" = yes; then
3383       case $host_os in aix4.[012]|aix4.[012].*)
3384         collect2name=`${CC} -print-prog-name=collect2`
3385         if test -f "$collect2name" && \
3386           strings "$collect2name" | grep resolve_lib_name >/dev/null
3387         then
3388           # We have reworked collect2
3389           hardcode_direct=yes
3390         else
3391           # We have old collect2
3392           hardcode_direct=unsupported
3393           # It fails to find uninstalled libraries when the uninstalled
3394           # path is not listed in the libpath.  Setting hardcode_minus_L
3395           # to unsupported forces relinking
3396           hardcode_minus_L=yes
3397           hardcode_libdir_flag_spec='-L$libdir'
3398           hardcode_libdir_separator=
3399         fi
3400       esac
3401
3402       shared_flag='-shared'
3403     else
3404       # not using gcc
3405       if test "$host_cpu" = ia64; then
3406         shared_flag='${wl}-G'
3407       else
3408         if test "$aix_use_runtimelinking" = yes; then
3409           shared_flag='${wl}-G'
3410         else
3411           shared_flag='${wl}-bM:SRE'
3412         fi
3413       fi
3414     fi
3415
3416     # It seems that -bexpall can do strange things, so it is better to
3417     # generate a list of symbols to export.
3418     always_export_symbols=yes
3419     if test "$aix_use_runtimelinking" = yes; then
3420       # Warning - without using the other runtime loading flags (-brtl),
3421       # -berok will link without error, but may produce a broken library.
3422       allow_undefined_flag='-berok'
3423       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
3424       archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3425     else
3426       if test "$host_cpu" = ia64; then
3427         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
3428         allow_undefined_flag="-z nodefs"
3429         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3430       else
3431         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
3432         # Warning - without using the other run time loading flags,
3433         # -berok will link without error, but may produce a broken library.
3434         allow_undefined_flag='${wl}-berok'
3435         # This is a bit strange, but is similar to how AIX traditionally builds
3436         # it's shared libraries.
3437         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
3438       fi
3439     fi
3440     ;;
3441
3442   amigaos*)
3443     archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
3444     hardcode_libdir_flag_spec='-L$libdir'
3445     hardcode_minus_L=yes
3446     # see comment about different semantics on the GNU ld section
3447     ld_shlibs=no
3448     ;;
3449
3450   cygwin* | mingw* | pw32*)
3451     # When not using gcc, we currently assume that we are using
3452     # Microsoft Visual C++.
3453     # hardcode_libdir_flag_spec is actually meaningless, as there is
3454     # no search path for DLLs.
3455     hardcode_libdir_flag_spec=' '
3456     allow_undefined_flag=unsupported
3457     # Tell ltmain to make .lib files, not .a files.
3458     libext=lib
3459     # FIXME: Setting linknames here is a bad hack.
3460     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
3461     # The linker will automatically build a .lib file if we build a DLL.
3462     old_archive_from_new_cmds='true'
3463     # FIXME: Should let the user specify the lib program.
3464     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
3465     fix_srcfile_path='`cygpath -w "$srcfile"`'
3466     ;;
3467
3468   darwin* | rhapsody*)
3469     case "$host_os" in
3470     rhapsody* | darwin1.[012])
3471       allow_undefined_flag='-undefined suppress'
3472       ;;
3473     *) # Darwin 1.3 on
3474       allow_undefined_flag='-flat_namespace -undefined suppress'
3475       ;;
3476     esac
3477     # FIXME: Relying on posixy $() will cause problems for
3478     #        cross-compilation, but unfortunately the echo tests do not
3479     #        yet detect zsh echo's removal of \ escapes.
3480     archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
3481     # We need to add '_' to the symbols in $export_symbols first
3482     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
3483     hardcode_direct=yes
3484     hardcode_shlibpath_var=no
3485     whole_archive_flag_spec='-all_load $convenience'
3486     ;;
3487
3488   freebsd1*)
3489     ld_shlibs=no
3490     ;;
3491
3492   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
3493   # support.  Future versions do this automatically, but an explicit c++rt0.o
3494   # does not break anything, and helps significantly (at the cost of a little
3495   # extra space).
3496   freebsd2.2*)
3497     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
3498     hardcode_libdir_flag_spec='-R$libdir'
3499     hardcode_direct=yes
3500     hardcode_shlibpath_var=no
3501     ;;
3502
3503   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
3504   freebsd2*)
3505     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3506     hardcode_direct=yes
3507     hardcode_minus_L=yes
3508     hardcode_shlibpath_var=no
3509     ;;
3510
3511   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
3512   freebsd*)
3513     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
3514     hardcode_libdir_flag_spec='-R$libdir'
3515     hardcode_direct=yes
3516     hardcode_shlibpath_var=no
3517     ;;
3518
3519   hpux9* | hpux10* | hpux11*)
3520     case $host_os in
3521     hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
3522     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
3523     esac
3524     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
3525     hardcode_libdir_separator=:
3526     hardcode_direct=yes
3527     hardcode_minus_L=yes # Not in the search PATH, but as the default
3528                          # location of the library.
3529     export_dynamic_flag_spec='${wl}-E'
3530     ;;
3531
3532   irix5* | irix6*)
3533     if test "$GCC" = yes; then
3534       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3535     else
3536       archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3537     fi
3538     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
3539     hardcode_libdir_separator=:
3540     link_all_deplibs=yes
3541     ;;
3542
3543   netbsd*)
3544     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3545       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
3546     else
3547       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
3548     fi
3549     hardcode_libdir_flag_spec='-R$libdir'
3550     hardcode_direct=yes
3551     hardcode_shlibpath_var=no
3552     ;;
3553
3554   newsos6)
3555     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3556     hardcode_direct=yes
3557     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
3558     hardcode_libdir_separator=:
3559     hardcode_shlibpath_var=no
3560     ;;
3561
3562   openbsd*)
3563     hardcode_direct=yes
3564     hardcode_shlibpath_var=no
3565     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3566       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
3567       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
3568       export_dynamic_flag_spec='${wl}-E'
3569     else
3570       case "$host_os" in
3571       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
3572         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3573         hardcode_libdir_flag_spec='-R$libdir'
3574         ;;
3575       *)
3576         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
3577         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
3578         ;;
3579       esac
3580     fi
3581     ;;
3582
3583   os2*)
3584     hardcode_libdir_flag_spec='-L$libdir'
3585     hardcode_minus_L=yes
3586     allow_undefined_flag=unsupported
3587     archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
3588     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
3589     ;;
3590
3591   osf3*)
3592     if test "$GCC" = yes; then
3593       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
3594       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3595     else
3596       allow_undefined_flag=' -expect_unresolved \*'
3597       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3598     fi
3599     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
3600     hardcode_libdir_separator=:
3601     ;;
3602
3603   osf4* | osf5*)        # as osf3* with the addition of -msym flag
3604     if test "$GCC" = yes; then
3605       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
3606       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3607       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
3608     else
3609       allow_undefined_flag=' -expect_unresolved \*'
3610       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3611       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
3612       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
3613
3614       #Both c and cxx compiler support -rpath directly
3615       hardcode_libdir_flag_spec='-rpath $libdir'
3616     fi
3617     hardcode_libdir_separator=:
3618     ;;
3619
3620   sco3.2v5*)
3621     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3622     hardcode_shlibpath_var=no
3623     runpath_var=LD_RUN_PATH
3624     hardcode_runpath_var=yes
3625     export_dynamic_flag_spec='${wl}-Bexport'
3626     ;;
3627
3628   solaris*)
3629     # gcc --version < 3.0 without binutils cannot create self contained
3630     # shared libraries reliably, requiring libgcc.a to resolve some of
3631     # the object symbols generated in some cases.  Libraries that use
3632     # assert need libgcc.a to resolve __eprintf, for example.  Linking
3633     # a copy of libgcc.a into every shared library to guarantee resolving
3634     # such symbols causes other problems:  According to Tim Van Holder
3635     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
3636     # (to the application) exception stack for one thing.
3637     no_undefined_flag=' -z defs'
3638     if test "$GCC" = yes; then
3639       case `$CC --version 2>/dev/null` in
3640       [12].*)
3641         cat <<EOF 1>&2
3642
3643 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
3644 *** create self contained shared libraries on Solaris systems, without
3645 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
3646 *** -no-undefined support, which will at least allow you to build shared
3647 *** libraries.  However, you may find that when you link such libraries
3648 *** into an application without using GCC, you have to manually add
3649 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
3650 *** upgrade to a newer version of GCC.  Another option is to rebuild your
3651 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
3652
3653 EOF
3654         no_undefined_flag=
3655         ;;
3656       esac
3657     fi
3658     # $CC -shared without GNU ld will not create a library from C++
3659     # object files and a static libstdc++, better avoid it by now
3660     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
3661     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3662                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
3663     hardcode_libdir_flag_spec='-R$libdir'
3664     hardcode_shlibpath_var=no
3665     case $host_os in
3666     solaris2.[0-5] | solaris2.[0-5].*) ;;
3667     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
3668       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
3669     esac
3670     link_all_deplibs=yes
3671     ;;
3672
3673   sunos4*)
3674     if test "x$host_vendor" = xsequent; then
3675       # Use $CC to link under sequent, because it throws in some extra .o
3676       # files that make .init and .fini sections work.
3677       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
3678     else
3679       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
3680     fi
3681     hardcode_libdir_flag_spec='-L$libdir'
3682     hardcode_direct=yes
3683     hardcode_minus_L=yes
3684     hardcode_shlibpath_var=no
3685     ;;
3686
3687   sysv4)
3688     if test "x$host_vendor" = xsno; then
3689       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
3690       hardcode_direct=yes # is this really true???
3691     else
3692       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3693       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
3694     fi
3695     runpath_var='LD_RUN_PATH'
3696     hardcode_shlibpath_var=no
3697     ;;
3698
3699   sysv4.3*)
3700     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3701     hardcode_shlibpath_var=no
3702     export_dynamic_flag_spec='-Bexport'
3703     ;;
3704
3705   sysv5*)
3706     no_undefined_flag=' -z text'
3707     # $CC -shared without GNU ld will not create a library from C++
3708     # object files and a static libstdc++, better avoid it by now
3709     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
3710     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3711                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
3712     hardcode_libdir_flag_spec=
3713     hardcode_shlibpath_var=no
3714     runpath_var='LD_RUN_PATH'
3715     ;;
3716
3717   uts4*)
3718     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3719     hardcode_libdir_flag_spec='-L$libdir'
3720     hardcode_shlibpath_var=no
3721     ;;
3722
3723   dgux*)
3724     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3725     hardcode_libdir_flag_spec='-L$libdir'
3726     hardcode_shlibpath_var=no
3727     ;;
3728
3729   sysv4*MP*)
3730     if test -d /usr/nec; then
3731       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3732       hardcode_shlibpath_var=no
3733       runpath_var=LD_RUN_PATH
3734       hardcode_runpath_var=yes
3735       ld_shlibs=yes
3736     fi
3737     ;;
3738
3739   sysv4.2uw2*)
3740     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
3741     hardcode_direct=yes
3742     hardcode_minus_L=no
3743     hardcode_shlibpath_var=no
3744     hardcode_runpath_var=yes
3745     runpath_var=LD_RUN_PATH
3746     ;;
3747
3748   sysv5uw7* | unixware7*)
3749     no_undefined_flag='${wl}-z ${wl}text'
3750     if test "$GCC" = yes; then
3751       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
3752     else
3753       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
3754     fi
3755     runpath_var='LD_RUN_PATH'
3756     hardcode_shlibpath_var=no
3757     ;;
3758
3759   *)
3760     ld_shlibs=no
3761     ;;
3762   esac
3763 fi
3764 echo "$ac_t""$ld_shlibs" 1>&6
3765 test "$ld_shlibs" = no && can_build_shared=no
3766 ##
3767 ## END FIXME
3768
3769 ## FIXME: this should be a separate macro
3770 ##
3771 # Check hardcoding attributes.
3772 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
3773 echo "configure:3774: checking how to hardcode library paths into programs" >&5
3774 hardcode_action=
3775 if test -n "$hardcode_libdir_flag_spec" || \
3776    test -n "$runpath_var"; then
3777
3778   # We can hardcode non-existant directories.
3779   if test "$hardcode_direct" != no &&
3780      # If the only mechanism to avoid hardcoding is shlibpath_var, we
3781      # have to relink, otherwise we might link with an installed library
3782      # when we should be linking with a yet-to-be-installed one
3783      ## test "$hardcode_shlibpath_var" != no &&
3784      test "$hardcode_minus_L" != no; then
3785     # Linking always hardcodes the temporary library directory.
3786     hardcode_action=relink
3787   else
3788     # We can link without hardcoding, and we can hardcode nonexisting dirs.
3789     hardcode_action=immediate
3790   fi
3791 else
3792   # We cannot hardcode anything, or else we can only hardcode existing
3793   # directories.
3794   hardcode_action=unsupported
3795 fi
3796 echo "$ac_t""$hardcode_action" 1>&6
3797 ##
3798 ## END FIXME
3799
3800 ## FIXME: this should be a separate macro
3801 ##
3802 striplib=
3803 old_striplib=
3804 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
3805 echo "configure:3806: checking whether stripping libraries is possible" >&5
3806 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
3807   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3808   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3809   echo "$ac_t""yes" 1>&6
3810 else
3811   echo "$ac_t""no" 1>&6
3812 fi
3813 ##
3814 ## END FIXME
3815
3816 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3817 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3818
3819 ## FIXME: this should be a separate macro
3820 ##
3821 # PORTME Fill in your ld.so characteristics
3822 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
3823 echo "configure:3824: checking dynamic linker characteristics" >&5
3824 library_names_spec=
3825 libname_spec='lib$name'
3826 soname_spec=
3827 postinstall_cmds=
3828 postuninstall_cmds=
3829 finish_cmds=
3830 finish_eval=
3831 shlibpath_var=
3832 shlibpath_overrides_runpath=unknown
3833 version_type=none
3834 dynamic_linker="$host_os ld.so"
3835 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3836 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3837
3838 case $host_os in
3839 aix3*)
3840   version_type=linux
3841   library_names_spec='${libname}${release}.so$versuffix $libname.a'
3842   shlibpath_var=LIBPATH
3843
3844   # AIX has no versioning support, so we append a major version to the name.
3845   soname_spec='${libname}${release}.so$major'
3846   ;;
3847
3848 aix4* | aix5*)
3849   version_type=linux
3850   if test "$host_cpu" = ia64; then
3851     # AIX 5 supports IA64
3852     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
3853     shlibpath_var=LD_LIBRARY_PATH
3854   else
3855     # With GCC up to 2.95.x, collect2 would create an import file
3856     # for dependence libraries.  The import file would start with
3857     # the line `#! .'.  This would cause the generated library to
3858     # depend on `.', always an invalid library.  This was fixed in
3859     # development snapshots of GCC prior to 3.0.
3860     case $host_os in
3861       aix4 | aix4.[01] | aix4.[01].*)
3862         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3863              echo ' yes '
3864              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
3865           :
3866         else
3867           can_build_shared=no
3868         fi
3869         ;;
3870     esac
3871     # AIX (on Power*) has no versioning support, so currently we can
3872     # not hardcode correct soname into executable. Probably we can
3873     # add versioning support to collect2, so additional links can
3874     # be useful in future.
3875     if test "$aix_use_runtimelinking" = yes; then
3876       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3877       # instead of lib<name>.a to let people know that these are not
3878       # typical AIX shared libraries.
3879       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3880     else
3881       # We preserve .a as extension for shared libraries through AIX4.2
3882       # and later when we are not doing run time linking.
3883       library_names_spec='${libname}${release}.a $libname.a'
3884       soname_spec='${libname}${release}.so$major'
3885     fi
3886     shlibpath_var=LIBPATH
3887   fi
3888   ;;
3889
3890 amigaos*)
3891   library_names_spec='$libname.ixlibrary $libname.a'
3892   # Create ${libname}_ixlibrary.a entries in /sys/libs.
3893   finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
3894   ;;
3895
3896 beos*)
3897   library_names_spec='${libname}.so'
3898   dynamic_linker="$host_os ld.so"
3899   shlibpath_var=LIBRARY_PATH
3900   ;;
3901
3902 bsdi4*)
3903   version_type=linux
3904   need_version=no
3905   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3906   soname_spec='${libname}${release}.so$major'
3907   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3908   shlibpath_var=LD_LIBRARY_PATH
3909   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3910   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3911   export_dynamic_flag_spec=-rdynamic
3912   # the default ld.so.conf also contains /usr/contrib/lib and
3913   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3914   # libtool to hard-code these into programs
3915   ;;
3916
3917 cygwin* | mingw* | pw32*)
3918   version_type=windows
3919   need_version=no
3920   need_lib_prefix=no
3921   case $GCC,$host_os in
3922   yes,cygwin*)
3923     library_names_spec='$libname.dll.a'
3924     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
3925     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
3926       dldir=$destdir/`dirname \$dlpath`~
3927       test -d \$dldir || mkdir -p \$dldir~
3928       $install_prog .libs/$dlname \$dldir/$dlname'
3929     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
3930       dlpath=$dir/\$dldll~
3931        $rm \$dlpath'
3932     ;;
3933   yes,mingw*)
3934     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
3935     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
3936     ;;
3937   yes,pw32*)
3938     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
3939     ;;
3940   *)
3941     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
3942     ;;
3943   esac
3944   dynamic_linker='Win32 ld.exe'
3945   # FIXME: first we should search . and the directory the executable is in
3946   shlibpath_var=PATH
3947   ;;
3948
3949 darwin* | rhapsody*)
3950   dynamic_linker="$host_os dyld"
3951   version_type=darwin
3952   need_lib_prefix=no
3953   need_version=no
3954   # FIXME: Relying on posixy $() will cause problems for
3955   #        cross-compilation, but unfortunately the echo tests do not
3956   #        yet detect zsh echo's removal of \ escapes.
3957   library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
3958   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
3959   shlibpath_overrides_runpath=yes
3960   shlibpath_var=DYLD_LIBRARY_PATH
3961   ;;
3962
3963 freebsd1*)
3964   dynamic_linker=no
3965   ;;
3966
3967 freebsd*)
3968   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
3969   version_type=freebsd-$objformat
3970   case $version_type in
3971     freebsd-elf*)
3972       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
3973       need_version=no
3974       need_lib_prefix=no
3975       ;;
3976     freebsd-*)
3977       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
3978       need_version=yes
3979       ;;
3980   esac
3981   shlibpath_var=LD_LIBRARY_PATH
3982   case $host_os in
3983   freebsd2*)
3984     shlibpath_overrides_runpath=yes
3985     ;;
3986   *)
3987     shlibpath_overrides_runpath=no
3988     hardcode_into_libs=yes
3989     ;;
3990   esac
3991   ;;
3992
3993 gnu*)
3994   version_type=linux
3995   need_lib_prefix=no
3996   need_version=no
3997   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
3998   soname_spec='${libname}${release}.so$major'
3999   shlibpath_var=LD_LIBRARY_PATH
4000   hardcode_into_libs=yes
4001   ;;
4002
4003 hpux9* | hpux10* | hpux11*)
4004   # Give a soname corresponding to the major version so that dld.sl refuses to
4005   # link against other versions.
4006   dynamic_linker="$host_os dld.sl"
4007   version_type=sunos
4008   need_lib_prefix=no
4009   need_version=no
4010   shlibpath_var=SHLIB_PATH
4011   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4012   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
4013   soname_spec='${libname}${release}.sl$major'
4014   # HP-UX runs *really* slowly unless shared libraries are mode 555.
4015   postinstall_cmds='chmod 555 $lib'
4016   ;;
4017
4018 irix5* | irix6*)
4019   version_type=irix
4020   need_lib_prefix=no
4021   need_version=no
4022   soname_spec='${libname}${release}.so$major'
4023   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
4024   case $host_os in
4025   irix5*)
4026     libsuff= shlibsuff=
4027     ;;
4028   *)
4029     case $LD in # libtool.m4 will add one of these switches to LD
4030     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
4031     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
4032     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
4033     *) libsuff= shlibsuff= libmagic=never-match;;
4034     esac
4035     ;;
4036   esac
4037   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4038   shlibpath_overrides_runpath=no
4039   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4040   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4041   ;;
4042
4043 # No shared lib support for Linux oldld, aout, or coff.
4044 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
4045   dynamic_linker=no
4046   ;;
4047
4048 # This must be Linux ELF.
4049 linux-gnu*)
4050   version_type=linux
4051   need_lib_prefix=no
4052   need_version=no
4053   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4054   soname_spec='${libname}${release}.so$major'
4055   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4056   shlibpath_var=LD_LIBRARY_PATH
4057   shlibpath_overrides_runpath=no
4058   # This implies no fast_install, which is unacceptable.
4059   # Some rework will be needed to allow for fast_install
4060   # before this can be enabled.
4061   hardcode_into_libs=yes
4062
4063   # We used to test for /lib/ld.so.1 and disable shared libraries on
4064   # powerpc, because MkLinux only supported shared libraries with the
4065   # GNU dynamic linker.  Since this was broken with cross compilers,
4066   # most powerpc-linux boxes support dynamic linking these days and
4067   # people can always --disable-shared, the test was removed, and we
4068   # assume the GNU/Linux dynamic linker is in use.
4069   dynamic_linker='GNU/Linux ld.so'
4070   ;;
4071
4072 netbsd*)
4073   version_type=sunos
4074   need_lib_prefix=no
4075   need_version=no
4076   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4077     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
4078     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4079     dynamic_linker='NetBSD (a.out) ld.so'
4080   else
4081     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
4082     soname_spec='${libname}${release}.so$major'
4083     dynamic_linker='NetBSD ld.elf_so'
4084   fi
4085   shlibpath_var=LD_LIBRARY_PATH
4086   shlibpath_overrides_runpath=yes
4087   hardcode_into_libs=yes
4088   ;;
4089
4090 newsos6)
4091   version_type=linux
4092   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4093   shlibpath_var=LD_LIBRARY_PATH
4094   shlibpath_overrides_runpath=yes
4095   ;;
4096
4097 openbsd*)
4098   version_type=sunos
4099   need_lib_prefix=no
4100   need_version=no
4101   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4102     case "$host_os" in
4103     openbsd2.[89] | openbsd2.[89].*)
4104       shlibpath_overrides_runpath=no
4105       ;;
4106     *)
4107       shlibpath_overrides_runpath=yes
4108       ;;
4109     esac
4110   else
4111     shlibpath_overrides_runpath=yes
4112   fi
4113   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
4114   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4115   shlibpath_var=LD_LIBRARY_PATH
4116   ;;
4117
4118 os2*)
4119   libname_spec='$name'
4120   need_lib_prefix=no
4121   library_names_spec='$libname.dll $libname.a'
4122   dynamic_linker='OS/2 ld.exe'
4123   shlibpath_var=LIBPATH
4124   ;;
4125
4126 osf3* | osf4* | osf5*)
4127   version_type=osf
4128   need_version=no
4129   soname_spec='${libname}${release}.so'
4130   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
4131   shlibpath_var=LD_LIBRARY_PATH
4132   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4133   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4134   ;;
4135
4136 sco3.2v5*)
4137   version_type=osf
4138   soname_spec='${libname}${release}.so$major'
4139   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4140   shlibpath_var=LD_LIBRARY_PATH
4141   ;;
4142
4143 solaris*)
4144   version_type=linux
4145   need_lib_prefix=no
4146   need_version=no
4147   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4148   soname_spec='${libname}${release}.so$major'
4149   shlibpath_var=LD_LIBRARY_PATH
4150   shlibpath_overrides_runpath=yes
4151   hardcode_into_libs=yes
4152   # ldd complains unless libraries are executable
4153   postinstall_cmds='chmod +x $lib'
4154   ;;
4155
4156 sunos4*)
4157   version_type=sunos
4158   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
4159   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4160   shlibpath_var=LD_LIBRARY_PATH
4161   shlibpath_overrides_runpath=yes
4162   if test "$with_gnu_ld" = yes; then
4163     need_lib_prefix=no
4164   fi
4165   need_version=yes
4166   ;;
4167
4168 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4169   version_type=linux
4170   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4171   soname_spec='${libname}${release}.so$major'
4172   shlibpath_var=LD_LIBRARY_PATH
4173   case $host_vendor in
4174     sni)
4175       shlibpath_overrides_runpath=no
4176       ;;
4177     motorola)
4178       need_lib_prefix=no
4179       need_version=no
4180       shlibpath_overrides_runpath=no
4181       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4182       ;;
4183   esac
4184   ;;
4185
4186 uts4*)
4187   version_type=linux
4188   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4189   soname_spec='${libname}${release}.so$major'
4190   shlibpath_var=LD_LIBRARY_PATH
4191   ;;
4192
4193 dgux*)
4194   version_type=linux
4195   need_lib_prefix=no
4196   need_version=no
4197   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4198   soname_spec='${libname}${release}.so$major'
4199   shlibpath_var=LD_LIBRARY_PATH
4200   ;;
4201
4202 sysv4*MP*)
4203   if test -d /usr/nec ;then
4204     version_type=linux
4205     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
4206     soname_spec='$libname.so.$major'
4207     shlibpath_var=LD_LIBRARY_PATH
4208   fi
4209   ;;
4210
4211 *)
4212   dynamic_linker=no
4213   ;;
4214 esac
4215 echo "$ac_t""$dynamic_linker" 1>&6
4216 test "$dynamic_linker" = no && can_build_shared=no
4217 ##
4218 ## END FIXME
4219
4220 ## FIXME: this should be a separate macro
4221 ##
4222 # Report the final consequences.
4223 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
4224 echo "configure:4225: checking if libtool supports shared libraries" >&5
4225 echo "$ac_t""$can_build_shared" 1>&6
4226 ##
4227 ## END FIXME
4228
4229 ## FIXME: this should be a separate macro
4230 ##
4231 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
4232 echo "configure:4233: checking whether to build shared libraries" >&5
4233 test "$can_build_shared" = "no" && enable_shared=no
4234
4235 # On AIX, shared libraries and static libraries use the same namespace, and
4236 # are all built from PIC.
4237 case "$host_os" in
4238 aix3*)
4239   test "$enable_shared" = yes && enable_static=no
4240   if test -n "$RANLIB"; then
4241     archive_cmds="$archive_cmds~\$RANLIB \$lib"
4242     postinstall_cmds='$RANLIB $lib'
4243   fi
4244   ;;
4245
4246 aix4*)
4247   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4248     test "$enable_shared" = yes && enable_static=no
4249   fi
4250   ;;
4251 esac
4252 echo "$ac_t""$enable_shared" 1>&6
4253 ##
4254 ## END FIXME
4255
4256 ## FIXME: this should be a separate macro
4257 ##
4258 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
4259 echo "configure:4260: checking whether to build static libraries" >&5
4260 # Make sure either enable_shared or enable_static is yes.
4261 test "$enable_shared" = yes || enable_static=yes
4262 echo "$ac_t""$enable_static" 1>&6
4263 ##
4264 ## END FIXME
4265
4266 if test "$hardcode_action" = relink; then
4267   # Fast installation is not supported
4268   enable_fast_install=no
4269 elif test "$shlibpath_overrides_runpath" = yes ||
4270      test "$enable_shared" = no; then
4271   # Fast installation is not necessary
4272   enable_fast_install=needless
4273 fi
4274
4275 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4276 if test "$GCC" = yes; then
4277   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4278 fi
4279
4280 if test "x$enable_dlopen" != xyes; then
4281   enable_dlopen=unknown
4282   enable_dlopen_self=unknown
4283   enable_dlopen_self_static=unknown
4284 else
4285   lt_cv_dlopen=no
4286   lt_cv_dlopen_libs=
4287
4288   case $host_os in
4289   beos*)
4290     lt_cv_dlopen="load_add_on"
4291     lt_cv_dlopen_libs=
4292     lt_cv_dlopen_self=yes
4293     ;;
4294
4295   cygwin* | mingw* | pw32*)
4296     lt_cv_dlopen="LoadLibrary"
4297     lt_cv_dlopen_libs=
4298    ;;
4299
4300   *)
4301     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
4302 echo "configure:4303: checking for shl_load" >&5
4303 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
4304   echo $ac_n "(cached) $ac_c" 1>&6
4305 else
4306   cat > conftest.$ac_ext <<EOF
4307 #line 4308 "configure"
4308 #include "confdefs.h"
4309 /* System header to define __stub macros and hopefully few prototypes,
4310     which can conflict with char shl_load(); below.  */
4311 #include <assert.h>
4312 /* Override any gcc2 internal prototype to avoid an error.  */
4313 /* We use char because int might match the return type of a gcc2
4314     builtin and then its argument prototype would still apply.  */
4315 char shl_load();
4316
4317 int main() {
4318
4319 /* The GNU C library defines this for functions which it implements
4320     to always fail with ENOSYS.  Some functions are actually named
4321     something starting with __ and the normal name is an alias.  */
4322 #if defined (__stub_shl_load) || defined (__stub___shl_load)
4323 choke me
4324 #else
4325 shl_load();
4326 #endif
4327
4328 ; return 0; }
4329 EOF
4330 if { (eval echo configure:4331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4331   rm -rf conftest*
4332   eval "ac_cv_func_shl_load=yes"
4333 else
4334   echo "configure: failed program was:" >&5
4335   cat conftest.$ac_ext >&5
4336   rm -rf conftest*
4337   eval "ac_cv_func_shl_load=no"
4338 fi
4339 rm -f conftest*
4340 fi
4341
4342 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
4343   echo "$ac_t""yes" 1>&6
4344   lt_cv_dlopen="shl_load"
4345 else
4346   echo "$ac_t""no" 1>&6
4347 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
4348 echo "configure:4349: checking for shl_load in -ldld" >&5
4349 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
4350 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4351   echo $ac_n "(cached) $ac_c" 1>&6
4352 else
4353   ac_save_LIBS="$LIBS"
4354 LIBS="-ldld  $LIBS"
4355 cat > conftest.$ac_ext <<EOF
4356 #line 4357 "configure"
4357 #include "confdefs.h"
4358 /* Override any gcc2 internal prototype to avoid an error.  */
4359 /* We use char because int might match the return type of a gcc2
4360     builtin and then its argument prototype would still apply.  */
4361 char shl_load();
4362
4363 int main() {
4364 shl_load()
4365 ; return 0; }
4366 EOF
4367 if { (eval echo configure:4368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4368   rm -rf conftest*
4369   eval "ac_cv_lib_$ac_lib_var=yes"
4370 else
4371   echo "configure: failed program was:" >&5
4372   cat conftest.$ac_ext >&5
4373   rm -rf conftest*
4374   eval "ac_cv_lib_$ac_lib_var=no"
4375 fi
4376 rm -f conftest*
4377 LIBS="$ac_save_LIBS"
4378
4379 fi
4380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4381   echo "$ac_t""yes" 1>&6
4382   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
4383 else
4384   echo "$ac_t""no" 1>&6
4385 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
4386 echo "configure:4387: checking for dlopen" >&5
4387 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
4388   echo $ac_n "(cached) $ac_c" 1>&6
4389 else
4390   cat > conftest.$ac_ext <<EOF
4391 #line 4392 "configure"
4392 #include "confdefs.h"
4393 /* System header to define __stub macros and hopefully few prototypes,
4394     which can conflict with char dlopen(); below.  */
4395 #include <assert.h>
4396 /* Override any gcc2 internal prototype to avoid an error.  */
4397 /* We use char because int might match the return type of a gcc2
4398     builtin and then its argument prototype would still apply.  */
4399 char dlopen();
4400
4401 int main() {
4402
4403 /* The GNU C library defines this for functions which it implements
4404     to always fail with ENOSYS.  Some functions are actually named
4405     something starting with __ and the normal name is an alias.  */
4406 #if defined (__stub_dlopen) || defined (__stub___dlopen)
4407 choke me
4408 #else
4409 dlopen();
4410 #endif
4411
4412 ; return 0; }
4413 EOF
4414 if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4415   rm -rf conftest*
4416   eval "ac_cv_func_dlopen=yes"
4417 else
4418   echo "configure: failed program was:" >&5
4419   cat conftest.$ac_ext >&5
4420   rm -rf conftest*
4421   eval "ac_cv_func_dlopen=no"
4422 fi
4423 rm -f conftest*
4424 fi
4425
4426 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
4427   echo "$ac_t""yes" 1>&6
4428   lt_cv_dlopen="dlopen"
4429 else
4430   echo "$ac_t""no" 1>&6
4431 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4432 echo "configure:4433: checking for dlopen in -ldl" >&5
4433 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4434 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4435   echo $ac_n "(cached) $ac_c" 1>&6
4436 else
4437   ac_save_LIBS="$LIBS"
4438 LIBS="-ldl  $LIBS"
4439 cat > conftest.$ac_ext <<EOF
4440 #line 4441 "configure"
4441 #include "confdefs.h"
4442 /* Override any gcc2 internal prototype to avoid an error.  */
4443 /* We use char because int might match the return type of a gcc2
4444     builtin and then its argument prototype would still apply.  */
4445 char dlopen();
4446
4447 int main() {
4448 dlopen()
4449 ; return 0; }
4450 EOF
4451 if { (eval echo configure:4452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4452   rm -rf conftest*
4453   eval "ac_cv_lib_$ac_lib_var=yes"
4454 else
4455   echo "configure: failed program was:" >&5
4456   cat conftest.$ac_ext >&5
4457   rm -rf conftest*
4458   eval "ac_cv_lib_$ac_lib_var=no"
4459 fi
4460 rm -f conftest*
4461 LIBS="$ac_save_LIBS"
4462
4463 fi
4464 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4465   echo "$ac_t""yes" 1>&6
4466   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
4467 else
4468   echo "$ac_t""no" 1>&6
4469 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
4470 echo "configure:4471: checking for dlopen in -lsvld" >&5
4471 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'`
4472 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4473   echo $ac_n "(cached) $ac_c" 1>&6
4474 else
4475   ac_save_LIBS="$LIBS"
4476 LIBS="-lsvld  $LIBS"
4477 cat > conftest.$ac_ext <<EOF
4478 #line 4479 "configure"
4479 #include "confdefs.h"
4480 /* Override any gcc2 internal prototype to avoid an error.  */
4481 /* We use char because int might match the return type of a gcc2
4482     builtin and then its argument prototype would still apply.  */
4483 char dlopen();
4484
4485 int main() {
4486 dlopen()
4487 ; return 0; }
4488 EOF
4489 if { (eval echo configure:4490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4490   rm -rf conftest*
4491   eval "ac_cv_lib_$ac_lib_var=yes"
4492 else
4493   echo "configure: failed program was:" >&5
4494   cat conftest.$ac_ext >&5
4495   rm -rf conftest*
4496   eval "ac_cv_lib_$ac_lib_var=no"
4497 fi
4498 rm -f conftest*
4499 LIBS="$ac_save_LIBS"
4500
4501 fi
4502 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4503   echo "$ac_t""yes" 1>&6
4504   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
4505 else
4506   echo "$ac_t""no" 1>&6
4507 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
4508 echo "configure:4509: checking for dld_link in -ldld" >&5
4509 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
4510 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4511   echo $ac_n "(cached) $ac_c" 1>&6
4512 else
4513   ac_save_LIBS="$LIBS"
4514 LIBS="-ldld  $LIBS"
4515 cat > conftest.$ac_ext <<EOF
4516 #line 4517 "configure"
4517 #include "confdefs.h"
4518 /* Override any gcc2 internal prototype to avoid an error.  */
4519 /* We use char because int might match the return type of a gcc2
4520     builtin and then its argument prototype would still apply.  */
4521 char dld_link();
4522
4523 int main() {
4524 dld_link()
4525 ; return 0; }
4526 EOF
4527 if { (eval echo configure:4528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4528   rm -rf conftest*
4529   eval "ac_cv_lib_$ac_lib_var=yes"
4530 else
4531   echo "configure: failed program was:" >&5
4532   cat conftest.$ac_ext >&5
4533   rm -rf conftest*
4534   eval "ac_cv_lib_$ac_lib_var=no"
4535 fi
4536 rm -f conftest*
4537 LIBS="$ac_save_LIBS"
4538
4539 fi
4540 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4541   echo "$ac_t""yes" 1>&6
4542   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
4543 else
4544   echo "$ac_t""no" 1>&6
4545 fi
4546
4547               
4548 fi
4549
4550             
4551 fi
4552
4553           
4554 fi
4555
4556         
4557 fi
4558
4559       
4560 fi
4561
4562     ;;
4563   esac
4564
4565   if test "x$lt_cv_dlopen" != xno; then
4566     enable_dlopen=yes
4567   else
4568     enable_dlopen=no
4569   fi
4570
4571   case $lt_cv_dlopen in
4572   dlopen)
4573     save_CPPFLAGS="$CPPFLAGS"
4574         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
4575
4576     save_LDFLAGS="$LDFLAGS"
4577     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
4578
4579     save_LIBS="$LIBS"
4580     LIBS="$lt_cv_dlopen_libs $LIBS"
4581
4582     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
4583 echo "configure:4584: checking whether a program can dlopen itself" >&5
4584 if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then
4585   echo $ac_n "(cached) $ac_c" 1>&6
4586 else
4587           if test "$cross_compiling" = yes; then :
4588   lt_cv_dlopen_self=cross
4589 else
4590     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
4591   lt_status=$lt_dlunknown
4592   cat > conftest.$ac_ext <<EOF
4593 #line 4594 "configure"
4594 #include "confdefs.h"
4595
4596 #if HAVE_DLFCN_H
4597 #include <dlfcn.h>
4598 #endif
4599
4600 #include <stdio.h>
4601
4602 #ifdef RTLD_GLOBAL
4603 #  define LT_DLGLOBAL           RTLD_GLOBAL
4604 #else
4605 #  ifdef DL_GLOBAL
4606 #    define LT_DLGLOBAL         DL_GLOBAL
4607 #  else
4608 #    define LT_DLGLOBAL         0
4609 #  endif
4610 #endif
4611
4612 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
4613    find out it does not work in some platform. */
4614 #ifndef LT_DLLAZY_OR_NOW
4615 #  ifdef RTLD_LAZY
4616 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
4617 #  else
4618 #    ifdef DL_LAZY
4619 #      define LT_DLLAZY_OR_NOW          DL_LAZY
4620 #    else
4621 #      ifdef RTLD_NOW
4622 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
4623 #      else
4624 #        ifdef DL_NOW
4625 #          define LT_DLLAZY_OR_NOW      DL_NOW
4626 #        else
4627 #          define LT_DLLAZY_OR_NOW      0
4628 #        endif
4629 #      endif
4630 #    endif
4631 #  endif
4632 #endif
4633
4634 #ifdef __cplusplus
4635 extern "C" void exit (int);
4636 #endif
4637
4638 void fnord() { int i=42;}
4639 int main ()
4640 {
4641   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
4642   int status = $lt_dlunknown;
4643
4644   if (self)
4645     {
4646       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
4647       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
4648       /* dlclose (self); */
4649     }
4650
4651     exit (status);
4652 }
4653 EOF
4654   if { (eval echo configure:4655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
4655     (./conftest; exit; ) 2>/dev/null
4656     lt_status=$?
4657     case x$lt_status in
4658       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
4659       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
4660       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
4661     esac
4662   else :
4663     # compilation failed
4664     lt_cv_dlopen_self=no
4665   fi
4666 fi
4667 rm -fr conftest*
4668
4669     
4670 fi
4671
4672 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
4673
4674     if test "x$lt_cv_dlopen_self" = xyes; then
4675       LDFLAGS="$LDFLAGS $link_static_flag"
4676       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
4677 echo "configure:4678: checking whether a statically linked program can dlopen itself" >&5
4678 if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then
4679   echo $ac_n "(cached) $ac_c" 1>&6
4680 else
4681           if test "$cross_compiling" = yes; then :
4682   lt_cv_dlopen_self_static=cross
4683 else
4684     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
4685   lt_status=$lt_dlunknown
4686   cat > conftest.$ac_ext <<EOF
4687 #line 4688 "configure"
4688 #include "confdefs.h"
4689
4690 #if HAVE_DLFCN_H
4691 #include <dlfcn.h>
4692 #endif
4693
4694 #include <stdio.h>
4695
4696 #ifdef RTLD_GLOBAL
4697 #  define LT_DLGLOBAL           RTLD_GLOBAL
4698 #else
4699 #  ifdef DL_GLOBAL
4700 #    define LT_DLGLOBAL         DL_GLOBAL
4701 #  else
4702 #    define LT_DLGLOBAL         0
4703 #  endif
4704 #endif
4705
4706 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
4707    find out it does not work in some platform. */
4708 #ifndef LT_DLLAZY_OR_NOW
4709 #  ifdef RTLD_LAZY
4710 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
4711 #  else
4712 #    ifdef DL_LAZY
4713 #      define LT_DLLAZY_OR_NOW          DL_LAZY
4714 #    else
4715 #      ifdef RTLD_NOW
4716 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
4717 #      else
4718 #        ifdef DL_NOW
4719 #          define LT_DLLAZY_OR_NOW      DL_NOW
4720 #        else
4721 #          define LT_DLLAZY_OR_NOW      0
4722 #        endif
4723 #      endif
4724 #    endif
4725 #  endif
4726 #endif
4727
4728 #ifdef __cplusplus
4729 extern "C" void exit (int);
4730 #endif
4731
4732 void fnord() { int i=42;}
4733 int main ()
4734 {
4735   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
4736   int status = $lt_dlunknown;
4737
4738   if (self)
4739     {
4740       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
4741       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
4742       /* dlclose (self); */
4743     }
4744
4745     exit (status);
4746 }
4747 EOF
4748   if { (eval echo configure:4749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
4749     (./conftest; exit; ) 2>/dev/null
4750     lt_status=$?
4751     case x$lt_status in
4752       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
4753       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
4754       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
4755     esac
4756   else :
4757     # compilation failed
4758     lt_cv_dlopen_self_static=no
4759   fi
4760 fi
4761 rm -fr conftest*
4762
4763       
4764 fi
4765
4766 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
4767     fi
4768
4769     CPPFLAGS="$save_CPPFLAGS"
4770     LDFLAGS="$save_LDFLAGS"
4771     LIBS="$save_LIBS"
4772     ;;
4773   esac
4774
4775   case $lt_cv_dlopen_self in
4776   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4777   *) enable_dlopen_self=unknown ;;
4778   esac
4779
4780   case $lt_cv_dlopen_self_static in
4781   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4782   *) enable_dlopen_self_static=unknown ;;
4783   esac
4784 fi
4785
4786
4787 ## FIXME: this should be a separate macro
4788 ##
4789 if test "$enable_shared" = yes && test "$GCC" = yes; then
4790   case $archive_cmds in
4791   *'~'*)
4792     # FIXME: we may have to deal with multi-command sequences.
4793     ;;
4794   '$CC '*)
4795     # Test whether the compiler implicitly links with -lc since on some
4796     # systems, -lgcc has to come before -lc. If gcc already passes -lc
4797     # to ld, don't add -lc before -lgcc.
4798     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
4799 echo "configure:4800: checking whether -lc should be explicitly linked in" >&5
4800     if eval "test \"`echo '$''{'lt_cv_archive_cmds_need_lc'+set}'`\" = set"; then
4801   echo $ac_n "(cached) $ac_c" 1>&6
4802 else
4803   $rm conftest*
4804     echo 'static int dummy;' > conftest.$ac_ext
4805
4806     if { (eval echo configure:4807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4807       soname=conftest
4808       lib=conftest
4809       libobjs=conftest.$ac_objext
4810       deplibs=
4811       wl=$lt_cv_prog_cc_wl
4812       compiler_flags=-v
4813       linker_flags=-v
4814       verstring=
4815       output_objdir=.
4816       libname=conftest
4817       save_allow_undefined_flag=$allow_undefined_flag
4818       allow_undefined_flag=
4819       if { (eval echo configure:4820: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
4820       then
4821         lt_cv_archive_cmds_need_lc=no
4822       else
4823         lt_cv_archive_cmds_need_lc=yes
4824       fi
4825       allow_undefined_flag=$save_allow_undefined_flag
4826     else
4827       cat conftest.err 1>&5
4828     fi
4829 fi
4830
4831     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
4832     ;;
4833   esac
4834 fi
4835 need_lc=${lt_cv_archive_cmds_need_lc-yes}
4836 ##
4837 ## END FIXME
4838
4839 ## FIXME: this should be a separate macro
4840 ##
4841 # The second clause should only fire when bootstrapping the
4842 # libtool distribution, otherwise you forgot to ship ltmain.sh
4843 # with your package, and you will get complaints that there are
4844 # no rules to generate ltmain.sh.
4845 if test -f "$ltmain"; then
4846   :
4847 else
4848   # If there is no Makefile yet, we rely on a make rule to execute
4849   # `config.status --recheck' to rerun these tests and create the
4850   # libtool script then.
4851   test -f Makefile && make "$ltmain"
4852 fi
4853
4854 if test -f "$ltmain"; then
4855   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
4856   $rm -f "${ofile}T"
4857
4858   echo creating $ofile
4859
4860   # Now quote all the things that may contain metacharacters while being
4861   # careful not to overquote the AC_SUBSTed values.  We take copies of the
4862   # variables and quote the copies for generation of the libtool script.
4863   for var in echo old_CC old_CFLAGS \
4864     AR AR_FLAGS CC LD LN_S NM SHELL \
4865     reload_flag reload_cmds wl \
4866     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
4867     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
4868     library_names_spec soname_spec \
4869     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
4870     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
4871     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
4872     old_striplib striplib file_magic_cmd export_symbols_cmds \
4873     deplibs_check_method allow_undefined_flag no_undefined_flag \
4874     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
4875     global_symbol_to_c_name_address \
4876     hardcode_libdir_flag_spec hardcode_libdir_separator  \
4877     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4878     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
4879
4880     case $var in
4881     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
4882     old_postinstall_cmds | old_postuninstall_cmds | \
4883     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
4884     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
4885     postinstall_cmds | postuninstall_cmds | \
4886     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4887       # Double-quote double-evaled strings.
4888       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4889       ;;
4890     *)
4891       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4892       ;;
4893     esac
4894   done
4895
4896   cat <<__EOF__ > "${ofile}T"
4897 #! $SHELL
4898
4899 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4900 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4901 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4902 #
4903 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
4904 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4905 #
4906 # This program is free software; you can redistribute it and/or modify
4907 # it under the terms of the GNU General Public License as published by
4908 # the Free Software Foundation; either version 2 of the License, or
4909 # (at your option) any later version.
4910 #
4911 # This program is distributed in the hope that it will be useful, but
4912 # WITHOUT ANY WARRANTY; without even the implied warranty of
4913 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4914 # General Public License for more details.
4915 #
4916 # You should have received a copy of the GNU General Public License
4917 # along with this program; if not, write to the Free Software
4918 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4919 #
4920 # As a special exception to the GNU General Public License, if you
4921 # distribute this file as part of a program that contains a
4922 # configuration script generated by Autoconf, you may include it under
4923 # the same distribution terms that you use for the rest of that program.
4924
4925 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4926 Xsed="sed -e s/^X//"
4927
4928 # The HP-UX ksh and POSIX shell print the target directory to stdout
4929 # if CDPATH is set.
4930 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4931
4932 # ### BEGIN LIBTOOL CONFIG
4933
4934 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4935
4936 # Shell to use when invoking shell scripts.
4937 SHELL=$lt_SHELL
4938
4939 # Whether or not to build shared libraries.
4940 build_libtool_libs=$enable_shared
4941
4942 # Whether or not to build static libraries.
4943 build_old_libs=$enable_static
4944
4945 # Whether or not to add -lc for building shared libraries.
4946 build_libtool_need_lc=$need_lc
4947
4948 # Whether or not to optimize for fast installation.
4949 fast_install=$enable_fast_install
4950
4951 # The host system.
4952 host_alias=$host_alias
4953 host=$host
4954
4955 # An echo program that does not interpret backslashes.
4956 echo=$lt_echo
4957
4958 # The archiver.
4959 AR=$lt_AR
4960 AR_FLAGS=$lt_AR_FLAGS
4961
4962 # The default C compiler.
4963 CC=$lt_CC
4964
4965 # Is the compiler the GNU C compiler?
4966 with_gcc=$GCC
4967
4968 # The linker used to build libraries.
4969 LD=$lt_LD
4970
4971 # Whether we need hard or soft links.
4972 LN_S=$lt_LN_S
4973
4974 # A BSD-compatible nm program.
4975 NM=$lt_NM
4976
4977 # A symbol stripping program
4978 STRIP=$STRIP
4979
4980 # Used to examine libraries when file_magic_cmd begins "file"
4981 MAGIC_CMD=$MAGIC_CMD
4982
4983 # Used on cygwin: DLL creation program.
4984 DLLTOOL="$DLLTOOL"
4985
4986 # Used on cygwin: object dumper.
4987 OBJDUMP="$OBJDUMP"
4988
4989 # Used on cygwin: assembler.
4990 AS="$AS"
4991
4992 # The name of the directory that contains temporary libtool files.
4993 objdir=$objdir
4994
4995 # How to create reloadable object files.
4996 reload_flag=$lt_reload_flag
4997 reload_cmds=$lt_reload_cmds
4998
4999 # How to pass a linker flag through the compiler.
5000 wl=$lt_wl
5001
5002 # Object file suffix (normally "o").
5003 objext="$ac_objext"
5004
5005 # Old archive suffix (normally "a").
5006 libext="$libext"
5007
5008 # Executable file suffix (normally "").
5009 exeext="$exeext"
5010
5011 # Additional compiler flags for building library objects.
5012 pic_flag=$lt_pic_flag
5013 pic_mode=$pic_mode
5014
5015 # Does compiler simultaneously support -c and -o options?
5016 compiler_c_o=$lt_compiler_c_o
5017
5018 # Can we write directly to a .lo ?
5019 compiler_o_lo=$lt_compiler_o_lo
5020
5021 # Must we lock files when doing compilation ?
5022 need_locks=$lt_need_locks
5023
5024 # Do we need the lib prefix for modules?
5025 need_lib_prefix=$need_lib_prefix
5026
5027 # Do we need a version for libraries?
5028 need_version=$need_version
5029
5030 # Whether dlopen is supported.
5031 dlopen_support=$enable_dlopen
5032
5033 # Whether dlopen of programs is supported.
5034 dlopen_self=$enable_dlopen_self
5035
5036 # Whether dlopen of statically linked programs is supported.
5037 dlopen_self_static=$enable_dlopen_self_static
5038
5039 # Compiler flag to prevent dynamic linking.
5040 link_static_flag=$lt_link_static_flag
5041
5042 # Compiler flag to turn off builtin functions.
5043 no_builtin_flag=$lt_no_builtin_flag
5044
5045 # Compiler flag to allow reflexive dlopens.
5046 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
5047
5048 # Compiler flag to generate shared objects directly from archives.
5049 whole_archive_flag_spec=$lt_whole_archive_flag_spec
5050
5051 # Compiler flag to generate thread-safe objects.
5052 thread_safe_flag_spec=$lt_thread_safe_flag_spec
5053
5054 # Library versioning type.
5055 version_type=$version_type
5056
5057 # Format of library name prefix.
5058 libname_spec=$lt_libname_spec
5059
5060 # List of archive names.  First name is the real one, the rest are links.
5061 # The last name is the one that the linker finds with -lNAME.
5062 library_names_spec=$lt_library_names_spec
5063
5064 # The coded name of the library, if different from the real name.
5065 soname_spec=$lt_soname_spec
5066
5067 # Commands used to build and install an old-style archive.
5068 RANLIB=$lt_RANLIB
5069 old_archive_cmds=$lt_old_archive_cmds
5070 old_postinstall_cmds=$lt_old_postinstall_cmds
5071 old_postuninstall_cmds=$lt_old_postuninstall_cmds
5072
5073 # Create an old-style archive from a shared archive.
5074 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
5075
5076 # Create a temporary old-style archive to link instead of a shared archive.
5077 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
5078
5079 # Commands used to build and install a shared archive.
5080 archive_cmds=$lt_archive_cmds
5081 archive_expsym_cmds=$lt_archive_expsym_cmds
5082 postinstall_cmds=$lt_postinstall_cmds
5083 postuninstall_cmds=$lt_postuninstall_cmds
5084
5085 # Commands to strip libraries.
5086 old_striplib=$lt_old_striplib
5087 striplib=$lt_striplib
5088
5089 # Method to check whether dependent libraries are shared objects.
5090 deplibs_check_method=$lt_deplibs_check_method
5091
5092 # Command to use when deplibs_check_method == file_magic.
5093 file_magic_cmd=$lt_file_magic_cmd
5094
5095 # Flag that allows shared libraries with undefined symbols to be built.
5096 allow_undefined_flag=$lt_allow_undefined_flag
5097
5098 # Flag that forces no undefined symbols.
5099 no_undefined_flag=$lt_no_undefined_flag
5100
5101 # Commands used to finish a libtool library installation in a directory.
5102 finish_cmds=$lt_finish_cmds
5103
5104 # Same as above, but a single script fragment to be evaled but not shown.
5105 finish_eval=$lt_finish_eval
5106
5107 # Take the output of nm and produce a listing of raw symbols and C names.
5108 global_symbol_pipe=$lt_global_symbol_pipe
5109
5110 # Transform the output of nm in a proper C declaration
5111 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
5112
5113 # Transform the output of nm in a C name address pair
5114 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
5115
5116 # This is the shared library runtime path variable.
5117 runpath_var=$runpath_var
5118
5119 # This is the shared library path variable.
5120 shlibpath_var=$shlibpath_var
5121
5122 # Is shlibpath searched before the hard-coded library search path?
5123 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5124
5125 # How to hardcode a shared library path into an executable.
5126 hardcode_action=$hardcode_action
5127
5128 # Whether we should hardcode library paths into libraries.
5129 hardcode_into_libs=$hardcode_into_libs
5130
5131 # Flag to hardcode \$libdir into a binary during linking.
5132 # This must work even if \$libdir does not exist.
5133 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
5134
5135 # Whether we need a single -rpath flag with a separated argument.
5136 hardcode_libdir_separator=$lt_hardcode_libdir_separator
5137
5138 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
5139 # resulting binary.
5140 hardcode_direct=$hardcode_direct
5141
5142 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5143 # resulting binary.
5144 hardcode_minus_L=$hardcode_minus_L
5145
5146 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5147 # the resulting binary.
5148 hardcode_shlibpath_var=$hardcode_shlibpath_var
5149
5150 # Variables whose values should be saved in libtool wrapper scripts and
5151 # restored at relink time.
5152 variables_saved_for_relink="$variables_saved_for_relink"
5153
5154 # Whether libtool must link a program against all its dependency libraries.
5155 link_all_deplibs=$link_all_deplibs
5156
5157 # Compile-time system search path for libraries
5158 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5159
5160 # Run-time system search path for libraries
5161 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5162
5163 # Fix the shell variable \$srcfile for the compiler.
5164 fix_srcfile_path="$fix_srcfile_path"
5165
5166 # Set to yes if exported symbols are required.
5167 always_export_symbols=$always_export_symbols
5168
5169 # The commands to list exported symbols.
5170 export_symbols_cmds=$lt_export_symbols_cmds
5171
5172 # The commands to extract the exported symbol list from a shared archive.
5173 extract_expsyms_cmds=$lt_extract_expsyms_cmds
5174
5175 # Symbols that should not be listed in the preloaded symbols.
5176 exclude_expsyms=$lt_exclude_expsyms
5177
5178 # Symbols that must always be exported.
5179 include_expsyms=$lt_include_expsyms
5180
5181 # ### END LIBTOOL CONFIG
5182
5183 __EOF__
5184
5185   case $host_os in
5186   aix3*)
5187     cat <<\EOF >> "${ofile}T"
5188
5189 # AIX sometimes has problems with the GCC collect2 program.  For some
5190 # reason, if we set the COLLECT_NAMES environment variable, the problems
5191 # vanish in a puff of smoke.
5192 if test "X${COLLECT_NAMES+set}" != Xset; then
5193   COLLECT_NAMES=
5194   export COLLECT_NAMES
5195 fi
5196 EOF
5197     ;;
5198   esac
5199
5200   case $host_os in
5201   cygwin* | mingw* | pw32* | os2*)
5202     cat <<'EOF' >> "${ofile}T"
5203       # This is a source program that is used to create dlls on Windows
5204       # Don't remove nor modify the starting and closing comments
5205 # /* ltdll.c starts here */
5206 # #define WIN32_LEAN_AND_MEAN
5207 # #include <windows.h>
5208 # #undef WIN32_LEAN_AND_MEAN
5209 # #include <stdio.h>
5210 #
5211 # #ifndef __CYGWIN__
5212 # #  ifdef __CYGWIN32__
5213 # #    define __CYGWIN__ __CYGWIN32__
5214 # #  endif
5215 # #endif
5216 #
5217 # #ifdef __cplusplus
5218 # extern "C" {
5219 # #endif
5220 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
5221 # #ifdef __cplusplus
5222 # }
5223 # #endif
5224 #
5225 # #ifdef __CYGWIN__
5226 # #include <cygwin/cygwin_dll.h>
5227 # DECLARE_CYGWIN_DLL( DllMain );
5228 # #endif
5229 # HINSTANCE __hDllInstance_base;
5230 #
5231 # BOOL APIENTRY
5232 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
5233 # {
5234 #   __hDllInstance_base = hInst;
5235 #   return TRUE;
5236 # }
5237 # /* ltdll.c ends here */
5238         # This is a source program that is used to create import libraries
5239         # on Windows for dlls which lack them. Don't remove nor modify the
5240         # starting and closing comments
5241 # /* impgen.c starts here */
5242 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
5243 #
5244 #  This file is part of GNU libtool.
5245 #
5246 #  This program is free software; you can redistribute it and/or modify
5247 #  it under the terms of the GNU General Public License as published by
5248 #  the Free Software Foundation; either version 2 of the License, or
5249 #  (at your option) any later version.
5250 #
5251 #  This program is distributed in the hope that it will be useful,
5252 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
5253 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5254 #  GNU General Public License for more details.
5255 #
5256 #  You should have received a copy of the GNU General Public License
5257 #  along with this program; if not, write to the Free Software
5258 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5259 #  */
5260 #
5261 # #include <stdio.h>            /* for printf() */
5262 # #include <unistd.h>           /* for open(), lseek(), read() */
5263 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
5264 # #include <string.h>           /* for strdup() */
5265 #
5266 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
5267 # #ifndef O_BINARY
5268 # #define O_BINARY 0
5269 # #endif
5270 #
5271 # static unsigned int
5272 # pe_get16 (fd, offset)
5273 #      int fd;
5274 #      int offset;
5275 # {
5276 #   unsigned char b[2];
5277 #   lseek (fd, offset, SEEK_SET);
5278 #   read (fd, b, 2);
5279 #   return b[0] + (b[1]<<8);
5280 # }
5281 #
5282 # static unsigned int
5283 # pe_get32 (fd, offset)
5284 #     int fd;
5285 #     int offset;
5286 # {
5287 #   unsigned char b[4];
5288 #   lseek (fd, offset, SEEK_SET);
5289 #   read (fd, b, 4);
5290 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5291 # }
5292 #
5293 # static unsigned int
5294 # pe_as32 (ptr)
5295 #      void *ptr;
5296 # {
5297 #   unsigned char *b = ptr;
5298 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5299 # }
5300 #
5301 # int
5302 # main (argc, argv)
5303 #     int argc;
5304 #     char *argv[];
5305 # {
5306 #     int dll;
5307 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
5308 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
5309 #     unsigned long name_rvas, nexp;
5310 #     unsigned char *expdata, *erva;
5311 #     char *filename, *dll_name;
5312 #
5313 #     filename = argv[1];
5314 #
5315 #     dll = open(filename, O_RDONLY|O_BINARY);
5316 #     if (dll < 1)
5317 #       return 1;
5318 #
5319 #     dll_name = filename;
5320 #
5321 #     for (i=0; filename[i]; i++)
5322 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
5323 #           dll_name = filename + i +1;
5324 #
5325 #     pe_header_offset = pe_get32 (dll, 0x3c);
5326 #     opthdr_ofs = pe_header_offset + 4 + 20;
5327 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
5328 #
5329 #     if (num_entries < 1) /* no exports */
5330 #       return 1;
5331 #
5332 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
5333 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
5334 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
5335 #     secptr = (pe_header_offset + 4 + 20 +
5336 #             pe_get16 (dll, pe_header_offset + 4 + 16));
5337 #
5338 #     expptr = 0;
5339 #     for (i = 0; i < nsections; i++)
5340 #     {
5341 #       char sname[8];
5342 #       unsigned long secptr1 = secptr + 40 * i;
5343 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
5344 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
5345 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
5346 #       lseek(dll, secptr1, SEEK_SET);
5347 #       read(dll, sname, 8);
5348 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
5349 #       {
5350 #           expptr = fptr + (export_rva - vaddr);
5351 #           if (export_rva + export_size > vaddr + vsize)
5352 #               export_size = vsize - (export_rva - vaddr);
5353 #           break;
5354 #       }
5355 #     }
5356 #
5357 #     expdata = (unsigned char*)malloc(export_size);
5358 #     lseek (dll, expptr, SEEK_SET);
5359 #     read (dll, expdata, export_size);
5360 #     erva = expdata - export_rva;
5361 #
5362 #     nexp = pe_as32 (expdata+24);
5363 #     name_rvas = pe_as32 (expdata+32);
5364 #
5365 #     printf ("EXPORTS\n");
5366 #     for (i = 0; i<nexp; i++)
5367 #     {
5368 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
5369 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
5370 #     }
5371 #
5372 #     return 0;
5373 # }
5374 # /* impgen.c ends here */
5375
5376 EOF
5377     ;;
5378   esac
5379
5380   # We use sed instead of cat because bash on DJGPP gets confused if
5381   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
5382   # text mode, it properly converts lines to CR/LF.  This bash problem
5383   # is reportedly fixed, but why not run on old versions too?
5384   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
5385
5386   mv -f "${ofile}T" "$ofile" || \
5387     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
5388   chmod +x "$ofile"
5389 fi
5390 ##
5391 ## END FIXME
5392
5393
5394
5395
5396
5397 # This can be used to rebuild libtool when needed
5398 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
5399
5400 # Always use our own libtool.
5401 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
5402
5403 # Prevent multiple expansion
5404
5405
5406
5407
5408 # Check whether --enable-strict-dependencies or --disable-strict-dependencies was given.
5409 if test "${enable_strict_dependencies+set}" = set; then
5410   enableval="$enable_strict_dependencies"
5411   :
5412 fi
5413
5414
5415 logdir='${localstatedir}/log/radius'
5416 echo $ac_n "checking logdir""... $ac_c" 1>&6
5417 echo "configure:5418: checking logdir" >&5
5418 # Check whether --with-logdir or --without-logdir was given.
5419 if test "${with_logdir+set}" = set; then
5420   withval="$with_logdir"
5421    case "$withval" in
5422     no)
5423         { echo "configure: error: Need logdir" 1>&2; exit 1; }
5424         ;;
5425     yes)
5426         ;;
5427     *)
5428         logdir="$withval"
5429         ;;
5430   esac 
5431
5432 fi
5433
5434
5435 echo "$ac_t""$logdir" 1>&6
5436
5437 radacctdir='${logdir}/radacct'
5438 echo $ac_n "checking radacctdir""... $ac_c" 1>&6
5439 echo "configure:5440: checking radacctdir" >&5
5440 # Check whether --with-radacctdir or --without-radacctdir was given.
5441 if test "${with_radacctdir+set}" = set; then
5442   withval="$with_radacctdir"
5443    case "$withval" in
5444     no)
5445         { echo "configure: error: Need radacctdir" 1>&2; exit 1; }
5446         ;;
5447     yes)
5448         ;;
5449     *)
5450         radacctdir="$withval"
5451         ;;
5452   esac 
5453
5454 fi
5455
5456
5457 echo "$ac_t""$radacctdir" 1>&6
5458
5459 raddbdir='${sysconfdir}/raddb'
5460 echo $ac_n "checking raddbdir""... $ac_c" 1>&6
5461 echo "configure:5462: checking raddbdir" >&5
5462 # Check whether --with-raddbdir or --without-raddbdir was given.
5463 if test "${with_raddbdir+set}" = set; then
5464   withval="$with_raddbdir"
5465    case "$withval" in
5466     no)
5467         { echo "configure: error: Need raddbdir" 1>&2; exit 1; }
5468         ;;
5469     yes)
5470         ;;
5471     *)
5472         raddbdir="$withval"
5473         ;;
5474   esac 
5475
5476 fi
5477
5478
5479 echo "$ac_t""$raddbdir" 1>&6
5480
5481 WITH_DICT_NOCASE=yes
5482 # Check whether --with-dict-nocase or --without-dict-nocase was given.
5483 if test "${with_dict_nocase+set}" = set; then
5484   withval="$with_dict_nocase"
5485     case "$withval" in
5486     yes)
5487         ;;
5488     *)
5489         WITH_DICT_NOCASE=""
5490   esac 
5491
5492 fi
5493
5494 if test "X$WITH_DICT_NOCASE" = "Xyes"; then
5495   cat >> confdefs.h <<\EOF
5496 #define WITH_DICT_NOCASE 1
5497 EOF
5498
5499 fi
5500
5501 ASCEND_BINARY=yes
5502 # Check whether --with-ascend-binary or --without-ascend-binary was given.
5503 if test "${with_ascend_binary+set}" = set; then
5504   withval="$with_ascend_binary"
5505    case "$withval" in
5506     yes)
5507         ;;
5508     *)
5509         ASCEND_BINARY=""
5510   esac 
5511
5512 fi
5513
5514 if test "X$ASCEND_BINARY" = "Xyes"; then
5515   cat >> confdefs.h <<\EOF
5516 #define ASCEND_BINARY 1
5517 EOF
5518
5519 fi
5520
5521 WITH_THREADS=yes
5522 WITH_THREAD_POOL=yes
5523 # Check whether --with-threads or --without-threads was given.
5524 if test "${with_threads+set}" = set; then
5525   withval="$with_threads"
5526    case "$withval" in
5527     yes)
5528         ;;
5529     *)
5530         WITH_THREADS=""
5531         WITH_THREAD_POOL=""
5532   esac 
5533
5534 fi
5535
5536
5537 WITH_SNMP=yes
5538 # Check whether --with-snmp or --without-snmp was given.
5539 if test "${with_snmp+set}" = set; then
5540   withval="$with_snmp"
5541    case "$withval" in
5542     yes)
5543         ;;
5544     *)
5545         WITH_SNMP=no
5546   esac 
5547
5548 fi
5549
5550
5551 # Check whether --enable-ltdl-install or --disable-ltdl-install was given.
5552 if test "${enable_ltdl_install+set}" = set; then
5553   enableval="$enable_ltdl_install"
5554   :
5555 fi
5556
5557 if test x"${enable_ltdl_install+set}" != xset; then
5558   enable_ltdl_install=yes
5559   ac_configure_args="$ac_configure_args --enable-ltdl-install"
5560 fi
5561 subdirs="libltdl"
5562
5563
5564 STATIC_MODULES=
5565 # Check whether --with-static_modules or --without-static_modules was given.
5566 if test "${with_static_modules+set}" = set; then
5567   withval="$with_static_modules"
5568   
5569   for i in $withval; do
5570     STATIC_MODULES="$STATIC_MODULES -dlpreopen ../modules/rlm_$i/rlm_$i.la"
5571   done
5572
5573 fi
5574
5575
5576 # Check whether --enable-developer or --disable-developer was given.
5577 if test "${enable_developer+set}" = set; then
5578   enableval="$enable_developer"
5579    case "$withval" in
5580     *)
5581         developer=no
5582         ;;
5583     yes)
5584         developer=yes
5585   esac 
5586
5587 fi
5588
5589
5590 if test "x$developer" != "xno" -a -d $srcdir/CVS; then
5591     developer="yes"
5592 fi
5593
5594 EXPERIMENTAL=
5595 # Check whether --with-experimental-modules or --without-experimental-modules was given.
5596 if test "${with_experimental_modules+set}" = set; then
5597   withval="$with_experimental_modules"
5598    case "$withval" in
5599     yes)
5600         EXPERIMENTAL=yes
5601         ;;
5602     *)
5603   esac 
5604
5605 fi
5606
5607
5608
5609 # Check whether --with-rlm-FOO-lib-dir or --without-rlm-FOO-lib-dir was given.
5610 if test "${with_rlm_FOO_lib_dir+set}" = set; then
5611   withval="$with_rlm_FOO_lib_dir"
5612    case "$withval" in
5613     *)
5614         ;;
5615   esac 
5616
5617 fi
5618
5619
5620 # Check whether --with-rlm-FOO-include-dir or --without-rlm-FOO-include-dir was given.
5621 if test "${with_rlm_FOO_include_dir+set}" = set; then
5622   withval="$with_rlm_FOO_include_dir"
5623    case "$withval" in
5624     *)
5625         ;;
5626   esac 
5627
5628 fi
5629
5630
5631
5632
5633 CHECKRAD=checkrad.pl
5634 # Extract the first word of "perl", so it can be a program name with args.
5635 set dummy perl; ac_word=$2
5636 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5637 echo "configure:5638: checking for $ac_word" >&5
5638 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
5639   echo $ac_n "(cached) $ac_c" 1>&6
5640 else
5641   case "$PERL" in
5642   /*)
5643   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5644   ;;
5645   ?:/*)                  
5646   ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
5647   ;;
5648   *)
5649   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5650   ac_dummy="$PATH"
5651   for ac_dir in $ac_dummy; do 
5652     test -z "$ac_dir" && ac_dir=.
5653     if test -f $ac_dir/$ac_word; then
5654       ac_cv_path_PERL="$ac_dir/$ac_word"
5655       break
5656     fi
5657   done
5658   IFS="$ac_save_ifs"
5659   test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="/usr/local/bin/perl"
5660   ;;
5661 esac
5662 fi
5663 PERL="$ac_cv_path_PERL"
5664 if test -n "$PERL"; then
5665   echo "$ac_t""$PERL" 1>&6
5666 else
5667   echo "$ac_t""no" 1>&6
5668 fi
5669
5670 if test "x$ac_cv_path_PERL" = "x"; then
5671   echo "configure: warning: perl not found - Simultaneous-Use and checkrad.pl may not work" 1>&2
5672 fi
5673 # Extract the first word of "snmpget", so it can be a program name with args.
5674 set dummy snmpget; ac_word=$2
5675 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5676 echo "configure:5677: checking for $ac_word" >&5
5677 if eval "test \"`echo '$''{'ac_cv_path_SNMPGET'+set}'`\" = set"; then
5678   echo $ac_n "(cached) $ac_c" 1>&6
5679 else
5680   case "$SNMPGET" in
5681   /*)
5682   ac_cv_path_SNMPGET="$SNMPGET" # Let the user override the test with a path.
5683   ;;
5684   ?:/*)                  
5685   ac_cv_path_SNMPGET="$SNMPGET" # Let the user override the test with a dos path.
5686   ;;
5687   *)
5688   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5689   ac_dummy="$PATH"
5690   for ac_dir in $ac_dummy; do 
5691     test -z "$ac_dir" && ac_dir=.
5692     if test -f $ac_dir/$ac_word; then
5693       ac_cv_path_SNMPGET="$ac_dir/$ac_word"
5694       break
5695     fi
5696   done
5697   IFS="$ac_save_ifs"
5698   ;;
5699 esac
5700 fi
5701 SNMPGET="$ac_cv_path_SNMPGET"
5702 if test -n "$SNMPGET"; then
5703   echo "$ac_t""$SNMPGET" 1>&6
5704 else
5705   echo "$ac_t""no" 1>&6
5706 fi
5707
5708 if test "x$ac_cv_path_SNMPGET" = "x"; then
5709   echo "configure: warning: snmpget not found - Simultaneous-Use and checkrad.pl may not work" 1>&2
5710 fi
5711
5712 # Extract the first word of "snmpwalk", so it can be a program name with args.
5713 set dummy snmpwalk; ac_word=$2
5714 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5715 echo "configure:5716: checking for $ac_word" >&5
5716 if eval "test \"`echo '$''{'ac_cv_path_SNMPWALK'+set}'`\" = set"; then
5717   echo $ac_n "(cached) $ac_c" 1>&6
5718 else
5719   case "$SNMPWALK" in
5720   /*)
5721   ac_cv_path_SNMPWALK="$SNMPWALK" # Let the user override the test with a path.
5722   ;;
5723   ?:/*)                  
5724   ac_cv_path_SNMPWALK="$SNMPWALK" # Let the user override the test with a dos path.
5725   ;;
5726   *)
5727   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5728   ac_dummy="$PATH"
5729   for ac_dir in $ac_dummy; do 
5730     test -z "$ac_dir" && ac_dir=.
5731     if test -f $ac_dir/$ac_word; then
5732       ac_cv_path_SNMPWALK="$ac_dir/$ac_word"
5733       break
5734     fi
5735   done
5736   IFS="$ac_save_ifs"
5737   ;;
5738 esac
5739 fi
5740 SNMPWALK="$ac_cv_path_SNMPWALK"
5741 if test -n "$SNMPWALK"; then
5742   echo "$ac_t""$SNMPWALK" 1>&6
5743 else
5744   echo "$ac_t""no" 1>&6
5745 fi
5746
5747 if test "x$ac_cv_path_SNMPWALK" = "x"; then
5748   echo "configure: warning: snmpwalk not found - Simultaneous-Use and checkrad.pl may not work" 1>&2
5749 fi
5750
5751 # Extract the first word of "rusers", so it can be a program name with args.
5752 set dummy rusers; ac_word=$2
5753 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5754 echo "configure:5755: checking for $ac_word" >&5
5755 if eval "test \"`echo '$''{'ac_cv_path_RUSERS'+set}'`\" = set"; then
5756   echo $ac_n "(cached) $ac_c" 1>&6
5757 else
5758   case "$RUSERS" in
5759   /*)
5760   ac_cv_path_RUSERS="$RUSERS" # Let the user override the test with a path.
5761   ;;
5762   ?:/*)                  
5763   ac_cv_path_RUSERS="$RUSERS" # Let the user override the test with a dos path.
5764   ;;
5765   *)
5766   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5767   ac_dummy="$PATH"
5768   for ac_dir in $ac_dummy; do 
5769     test -z "$ac_dir" && ac_dir=.
5770     if test -f $ac_dir/$ac_word; then
5771       ac_cv_path_RUSERS="$ac_dir/$ac_word"
5772       break
5773     fi
5774   done
5775   IFS="$ac_save_ifs"
5776   test -z "$ac_cv_path_RUSERS" && ac_cv_path_RUSERS="/usr/bin/rusers"
5777   ;;
5778 esac
5779 fi
5780 RUSERS="$ac_cv_path_RUSERS"
5781 if test -n "$RUSERS"; then
5782   echo "$ac_t""$RUSERS" 1>&6
5783 else
5784   echo "$ac_t""no" 1>&6
5785 fi
5786
5787
5788 missing_dir=`cd $ac_aux_dir && pwd`
5789 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
5790 echo "configure:5791: checking for working aclocal" >&5
5791 # Run test in a subshell; some versions of sh will print an error if
5792 # an executable is not found, even if stderr is redirected.
5793 # Redirect stdin to placate older versions of autoconf.  Sigh.
5794 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
5795    ACLOCAL=aclocal
5796    echo "$ac_t""found" 1>&6
5797 else
5798    ACLOCAL="$missing_dir/missing aclocal"
5799    echo "$ac_t""missing" 1>&6
5800 fi
5801
5802 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
5803 echo "configure:5804: checking for working autoconf" >&5
5804 # Run test in a subshell; some versions of sh will print an error if
5805 # an executable is not found, even if stderr is redirected.
5806 # Redirect stdin to placate older versions of autoconf.  Sigh.
5807 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
5808    AUTOCONF=autoconf
5809    echo "$ac_t""found" 1>&6
5810 else
5811    AUTOCONF="$missing_dir/missing autoconf"
5812    echo "$ac_t""missing" 1>&6
5813 fi
5814
5815 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
5816 echo "configure:5817: checking for working autoheader" >&5
5817 # Run test in a subshell; some versions of sh will print an error if
5818 # an executable is not found, even if stderr is redirected.
5819 # Redirect stdin to placate older versions of autoconf.  Sigh.
5820 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
5821    AUTOHEADER=autoheader
5822    echo "$ac_t""found" 1>&6
5823 else
5824    AUTOHEADER="$missing_dir/missing autoheader"
5825    echo "$ac_t""missing" 1>&6
5826 fi
5827
5828
5829 # Extract the first word of "locate", so it can be a program name with args.
5830 set dummy locate; ac_word=$2
5831 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5832 echo "configure:5833: checking for $ac_word" >&5
5833 if eval "test \"`echo '$''{'ac_cv_path_LOCATE'+set}'`\" = set"; then
5834   echo $ac_n "(cached) $ac_c" 1>&6
5835 else
5836   case "$LOCATE" in
5837   /*)
5838   ac_cv_path_LOCATE="$LOCATE" # Let the user override the test with a path.
5839   ;;
5840   ?:/*)                  
5841   ac_cv_path_LOCATE="$LOCATE" # Let the user override the test with a dos path.
5842   ;;
5843   *)
5844   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5845   ac_dummy="$PATH"
5846   for ac_dir in $ac_dummy; do 
5847     test -z "$ac_dir" && ac_dir=.
5848     if test -f $ac_dir/$ac_word; then
5849       ac_cv_path_LOCATE="$ac_dir/$ac_word"
5850       break
5851     fi
5852   done
5853   IFS="$ac_save_ifs"
5854   ;;
5855 esac
5856 fi
5857 LOCATE="$ac_cv_path_LOCATE"
5858 if test -n "$LOCATE"; then
5859   echo "$ac_t""$LOCATE" 1>&6
5860 else
5861   echo "$ac_t""no" 1>&6
5862 fi
5863
5864 # Extract the first word of "dirname", so it can be a program name with args.
5865 set dummy dirname; ac_word=$2
5866 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5867 echo "configure:5868: checking for $ac_word" >&5
5868 if eval "test \"`echo '$''{'ac_cv_path_DIRNAME'+set}'`\" = set"; then
5869   echo $ac_n "(cached) $ac_c" 1>&6
5870 else
5871   case "$DIRNAME" in
5872   /*)
5873   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
5874   ;;
5875   ?:/*)                  
5876   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a dos path.
5877   ;;
5878   *)
5879   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5880   ac_dummy="$PATH"
5881   for ac_dir in $ac_dummy; do 
5882     test -z "$ac_dir" && ac_dir=.
5883     if test -f $ac_dir/$ac_word; then
5884       ac_cv_path_DIRNAME="$ac_dir/$ac_word"
5885       break
5886     fi
5887   done
5888   IFS="$ac_save_ifs"
5889   ;;
5890 esac
5891 fi
5892 DIRNAME="$ac_cv_path_DIRNAME"
5893 if test -n "$DIRNAME"; then
5894   echo "$ac_t""$DIRNAME" 1>&6
5895 else
5896   echo "$ac_t""no" 1>&6
5897 fi
5898
5899 # Extract the first word of "grep", so it can be a program name with args.
5900 set dummy grep; ac_word=$2
5901 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5902 echo "configure:5903: checking for $ac_word" >&5
5903 if eval "test \"`echo '$''{'ac_cv_path_GREP'+set}'`\" = set"; then
5904   echo $ac_n "(cached) $ac_c" 1>&6
5905 else
5906   case "$GREP" in
5907   /*)
5908   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
5909   ;;
5910   ?:/*)                  
5911   ac_cv_path_GREP="$GREP" # Let the user override the test with a dos path.
5912   ;;
5913   *)
5914   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5915   ac_dummy="$PATH"
5916   for ac_dir in $ac_dummy; do 
5917     test -z "$ac_dir" && ac_dir=.
5918     if test -f $ac_dir/$ac_word; then
5919       ac_cv_path_GREP="$ac_dir/$ac_word"
5920       break
5921     fi
5922   done
5923   IFS="$ac_save_ifs"
5924   ;;
5925 esac
5926 fi
5927 GREP="$ac_cv_path_GREP"
5928 if test -n "$GREP"; then
5929   echo "$ac_t""$GREP" 1>&6
5930 else
5931   echo "$ac_t""no" 1>&6
5932 fi
5933
5934
5935
5936 PTHREADLIB=
5937 if test "$WITH_THREADS" = "yes"; then 
5938   if test $ac_cv_prog_suncc = "yes"; then
5939     CFLAGS="$CFLAGS -mt"
5940   fi
5941
5942   for ac_hdr in pthread.h
5943 do
5944 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5945 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5946 echo "configure:5947: checking for $ac_hdr" >&5
5947 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5948   echo $ac_n "(cached) $ac_c" 1>&6
5949 else
5950   cat > conftest.$ac_ext <<EOF
5951 #line 5952 "configure"
5952 #include "confdefs.h"
5953 #include <$ac_hdr>
5954 EOF
5955 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5956 { (eval echo configure:5957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5957 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5958 if test -z "$ac_err"; then
5959   rm -rf conftest*
5960   eval "ac_cv_header_$ac_safe=yes"
5961 else
5962   echo "$ac_err" >&5
5963   echo "configure: failed program was:" >&5
5964   cat conftest.$ac_ext >&5
5965   rm -rf conftest*
5966   eval "ac_cv_header_$ac_safe=no"
5967 fi
5968 rm -f conftest*
5969 fi
5970 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5971   echo "$ac_t""yes" 1>&6
5972     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5973   cat >> confdefs.h <<EOF
5974 #define $ac_tr_hdr 1
5975 EOF
5976  
5977 else
5978   echo "$ac_t""no" 1>&6
5979 fi
5980 done
5981
5982
5983   if test "X$ac_cv_header_pthread_h" = "X"; then
5984     { echo "configure: error: "You are trying to use threads without a POSIX <pthread.h>"" 1>&2; exit 1; }
5985   fi
5986
5987           echo $ac_n "checking for pthread_join""... $ac_c" 1>&6
5988 echo "configure:5989: checking for pthread_join" >&5
5989 if eval "test \"`echo '$''{'ac_cv_func_pthread_join'+set}'`\" = set"; then
5990   echo $ac_n "(cached) $ac_c" 1>&6
5991 else
5992   cat > conftest.$ac_ext <<EOF
5993 #line 5994 "configure"
5994 #include "confdefs.h"
5995 /* System header to define __stub macros and hopefully few prototypes,
5996     which can conflict with char pthread_join(); below.  */
5997 #include <assert.h>
5998 /* Override any gcc2 internal prototype to avoid an error.  */
5999 /* We use char because int might match the return type of a gcc2
6000     builtin and then its argument prototype would still apply.  */
6001 char pthread_join();
6002
6003 int main() {
6004
6005 /* The GNU C library defines this for functions which it implements
6006     to always fail with ENOSYS.  Some functions are actually named
6007     something starting with __ and the normal name is an alias.  */
6008 #if defined (__stub_pthread_join) || defined (__stub___pthread_join)
6009 choke me
6010 #else
6011 pthread_join();
6012 #endif
6013
6014 ; return 0; }
6015 EOF
6016 if { (eval echo configure:6017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6017   rm -rf conftest*
6018   eval "ac_cv_func_pthread_join=yes"
6019 else
6020   echo "configure: failed program was:" >&5
6021   cat conftest.$ac_ext >&5
6022   rm -rf conftest*
6023   eval "ac_cv_func_pthread_join=no"
6024 fi
6025 rm -f conftest*
6026 fi
6027
6028 if eval "test \"`echo '$ac_cv_func_'pthread_join`\" = yes"; then
6029   echo "$ac_t""yes" 1>&6
6030   PTHREADLIB=" "
6031 else
6032   echo "$ac_t""no" 1>&6
6033 fi
6034
6035
6036   echo $ac_n "checking for pthread_join in -lpthread""... $ac_c" 1>&6
6037 echo "configure:6038: checking for pthread_join in -lpthread" >&5
6038 ac_lib_var=`echo pthread'_'pthread_join | sed 'y%./+-%__p_%'`
6039 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6040   echo $ac_n "(cached) $ac_c" 1>&6
6041 else
6042   ac_save_LIBS="$LIBS"
6043 LIBS="-lpthread  $LIBS"
6044 cat > conftest.$ac_ext <<EOF
6045 #line 6046 "configure"
6046 #include "confdefs.h"
6047 /* Override any gcc2 internal prototype to avoid an error.  */
6048 /* We use char because int might match the return type of a gcc2
6049     builtin and then its argument prototype would still apply.  */
6050 char pthread_join();
6051
6052 int main() {
6053 pthread_join()
6054 ; return 0; }
6055 EOF
6056 if { (eval echo configure:6057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6057   rm -rf conftest*
6058   eval "ac_cv_lib_$ac_lib_var=yes"
6059 else
6060   echo "configure: failed program was:" >&5
6061   cat conftest.$ac_ext >&5
6062   rm -rf conftest*
6063   eval "ac_cv_lib_$ac_lib_var=no"
6064 fi
6065 rm -f conftest*
6066 LIBS="$ac_save_LIBS"
6067
6068 fi
6069 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6070   echo "$ac_t""yes" 1>&6
6071   PTHREADLIB="-lpthread"
6072   
6073 else
6074   echo "$ac_t""no" 1>&6
6075 fi
6076
6077
6078
6079   
6080 echo $ac_n "checking for library containing sem_init""... $ac_c" 1>&6
6081 echo "configure:6082: checking for library containing sem_init" >&5
6082 if eval "test \"`echo '$''{'ac_cv_search_sem_init'+set}'`\" = set"; then
6083   echo $ac_n "(cached) $ac_c" 1>&6
6084 else
6085   ac_func_search_save_LIBS="$LIBS"
6086 ac_cv_search_sem_init="no"
6087 cat > conftest.$ac_ext <<EOF
6088 #line 6089 "configure"
6089 #include "confdefs.h"
6090 /* Override any gcc2 internal prototype to avoid an error.  */
6091 /* We use char because int might match the return type of a gcc2
6092     builtin and then its argument prototype would still apply.  */
6093 char sem_init();
6094
6095 int main() {
6096 sem_init()
6097 ; return 0; }
6098 EOF
6099 if { (eval echo configure:6100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6100   rm -rf conftest*
6101   ac_cv_search_sem_init="none required"
6102 else
6103   echo "configure: failed program was:" >&5
6104   cat conftest.$ac_ext >&5
6105 fi
6106 rm -f conftest*
6107 test "$ac_cv_search_sem_init" = "no" && for i in pthread rt; do
6108 LIBS="-l$i "-lpthread"
6109    $ac_func_search_save_LIBS"
6110 cat > conftest.$ac_ext <<EOF
6111 #line 6112 "configure"
6112 #include "confdefs.h"
6113 /* Override any gcc2 internal prototype to avoid an error.  */
6114 /* We use char because int might match the return type of a gcc2
6115     builtin and then its argument prototype would still apply.  */
6116 char sem_init();
6117
6118 int main() {
6119 sem_init()
6120 ; return 0; }
6121 EOF
6122 if { (eval echo configure:6123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6123   rm -rf conftest*
6124   ac_cv_search_sem_init="-l$i"
6125 break
6126 else
6127   echo "configure: failed program was:" >&5
6128   cat conftest.$ac_ext >&5
6129 fi
6130 rm -f conftest*
6131 done
6132 LIBS="$ac_func_search_save_LIBS"
6133 fi
6134
6135 echo "$ac_t""$ac_cv_search_sem_init" 1>&6
6136 if test "$ac_cv_search_sem_init" != "no"; then
6137   test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
6138    
6139                                 
6140 else :
6141   
6142 fi
6143
6144   if test "X$PTHREADLIB" = "X"; then
6145     SAVED_CFLAGS=$CFLAGS
6146     CFLAGS="$CFLAGS -pthread -D_THREAD_SAFE"
6147     echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
6148 echo "configure:6149: checking for pthread_create in -lc_r" >&5
6149 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
6150 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6151   echo $ac_n "(cached) $ac_c" 1>&6
6152 else
6153   ac_save_LIBS="$LIBS"
6154 LIBS="-lc_r  $LIBS"
6155 cat > conftest.$ac_ext <<EOF
6156 #line 6157 "configure"
6157 #include "confdefs.h"
6158 /* Override any gcc2 internal prototype to avoid an error.  */
6159 /* We use char because int might match the return type of a gcc2
6160     builtin and then its argument prototype would still apply.  */
6161 char pthread_create();
6162
6163 int main() {
6164 pthread_create()
6165 ; return 0; }
6166 EOF
6167 if { (eval echo configure:6168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6168   rm -rf conftest*
6169   eval "ac_cv_lib_$ac_lib_var=yes"
6170 else
6171   echo "configure: failed program was:" >&5
6172   cat conftest.$ac_ext >&5
6173   rm -rf conftest*
6174   eval "ac_cv_lib_$ac_lib_var=no"
6175 fi
6176 rm -f conftest*
6177 LIBS="$ac_save_LIBS"
6178
6179 fi
6180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6181   echo "$ac_t""yes" 1>&6
6182   PTHREADLIB="-lc_r"
6183     
6184 else
6185   echo "$ac_t""no" 1>&6
6186 fi
6187
6188   fi
6189
6190   if test "x$PTHREADLIB" != "x"; then
6191     LIBS="$LIBS $PTHREADLIB"
6192     CFLAGS="$CFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
6193   fi
6194 fi
6195
6196 if test "x$PTHREADLIB" = "x"; then
6197   CFLAGS=$SAVED_CFLAGS
6198   ac_cv_header_pthread_h="no"
6199   WITH_THREADS=no
6200   WITH_THREAD_POOL=no
6201 fi
6202
6203 echo $ac_n "checking for getsockname in -lsocket""... $ac_c" 1>&6
6204 echo "configure:6205: checking for getsockname in -lsocket" >&5
6205 ac_lib_var=`echo socket'_'getsockname | sed 'y%./+-%__p_%'`
6206 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6207   echo $ac_n "(cached) $ac_c" 1>&6
6208 else
6209   ac_save_LIBS="$LIBS"
6210 LIBS="-lsocket  $LIBS"
6211 cat > conftest.$ac_ext <<EOF
6212 #line 6213 "configure"
6213 #include "confdefs.h"
6214 /* Override any gcc2 internal prototype to avoid an error.  */
6215 /* We use char because int might match the return type of a gcc2
6216     builtin and then its argument prototype would still apply.  */
6217 char getsockname();
6218
6219 int main() {
6220 getsockname()
6221 ; return 0; }
6222 EOF
6223 if { (eval echo configure:6224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6224   rm -rf conftest*
6225   eval "ac_cv_lib_$ac_lib_var=yes"
6226 else
6227   echo "configure: failed program was:" >&5
6228   cat conftest.$ac_ext >&5
6229   rm -rf conftest*
6230   eval "ac_cv_lib_$ac_lib_var=no"
6231 fi
6232 rm -f conftest*
6233 LIBS="$ac_save_LIBS"
6234
6235 fi
6236 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6237   echo "$ac_t""yes" 1>&6
6238     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6239     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6240   cat >> confdefs.h <<EOF
6241 #define $ac_tr_lib 1
6242 EOF
6243
6244   LIBS="-lsocket $LIBS"
6245
6246 else
6247   echo "$ac_t""no" 1>&6
6248 fi
6249
6250
6251 echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
6252 echo "configure:6253: checking for inet_aton in -lresolv" >&5
6253 ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
6254 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6255   echo $ac_n "(cached) $ac_c" 1>&6
6256 else
6257   ac_save_LIBS="$LIBS"
6258 LIBS="-lresolv  $LIBS"
6259 cat > conftest.$ac_ext <<EOF
6260 #line 6261 "configure"
6261 #include "confdefs.h"
6262 /* Override any gcc2 internal prototype to avoid an error.  */
6263 /* We use char because int might match the return type of a gcc2
6264     builtin and then its argument prototype would still apply.  */
6265 char inet_aton();
6266
6267 int main() {
6268 inet_aton()
6269 ; return 0; }
6270 EOF
6271 if { (eval echo configure:6272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6272   rm -rf conftest*
6273   eval "ac_cv_lib_$ac_lib_var=yes"
6274 else
6275   echo "configure: failed program was:" >&5
6276   cat conftest.$ac_ext >&5
6277   rm -rf conftest*
6278   eval "ac_cv_lib_$ac_lib_var=no"
6279 fi
6280 rm -f conftest*
6281 LIBS="$ac_save_LIBS"
6282
6283 fi
6284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6285   echo "$ac_t""yes" 1>&6
6286     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6287     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6288   cat >> confdefs.h <<EOF
6289 #define $ac_tr_lib 1
6290 EOF
6291
6292   LIBS="-lresolv $LIBS"
6293
6294 else
6295   echo "$ac_t""no" 1>&6
6296 fi
6297
6298
6299 echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6
6300 echo "configure:6301: checking for inet_ntoa in -lnsl" >&5
6301 ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'`
6302 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6303   echo $ac_n "(cached) $ac_c" 1>&6
6304 else
6305   ac_save_LIBS="$LIBS"
6306 LIBS="-lnsl  $LIBS"
6307 cat > conftest.$ac_ext <<EOF
6308 #line 6309 "configure"
6309 #include "confdefs.h"
6310 /* Override any gcc2 internal prototype to avoid an error.  */
6311 /* We use char because int might match the return type of a gcc2
6312     builtin and then its argument prototype would still apply.  */
6313 char inet_ntoa();
6314
6315 int main() {
6316 inet_ntoa()
6317 ; return 0; }
6318 EOF
6319 if { (eval echo configure:6320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6320   rm -rf conftest*
6321   eval "ac_cv_lib_$ac_lib_var=yes"
6322 else
6323   echo "configure: failed program was:" >&5
6324   cat conftest.$ac_ext >&5
6325   rm -rf conftest*
6326   eval "ac_cv_lib_$ac_lib_var=no"
6327 fi
6328 rm -f conftest*
6329 LIBS="$ac_save_LIBS"
6330
6331 fi
6332 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6333   echo "$ac_t""yes" 1>&6
6334     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6335     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6336   cat >> confdefs.h <<EOF
6337 #define $ac_tr_lib 1
6338 EOF
6339
6340   LIBS="-lnsl $LIBS"
6341
6342 else
6343   echo "$ac_t""no" 1>&6
6344 fi
6345
6346
6347
6348 ac_header_dirent=no
6349 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
6350 do
6351 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6352 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
6353 echo "configure:6354: checking for $ac_hdr that defines DIR" >&5
6354 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
6355   echo $ac_n "(cached) $ac_c" 1>&6
6356 else
6357   cat > conftest.$ac_ext <<EOF
6358 #line 6359 "configure"
6359 #include "confdefs.h"
6360 #include <sys/types.h>
6361 #include <$ac_hdr>
6362 int main() {
6363 DIR *dirp = 0;
6364 ; return 0; }
6365 EOF
6366 if { (eval echo configure:6367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6367   rm -rf conftest*
6368   eval "ac_cv_header_dirent_$ac_safe=yes"
6369 else
6370   echo "configure: failed program was:" >&5
6371   cat conftest.$ac_ext >&5
6372   rm -rf conftest*
6373   eval "ac_cv_header_dirent_$ac_safe=no"
6374 fi
6375 rm -f conftest*
6376 fi
6377 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
6378   echo "$ac_t""yes" 1>&6
6379     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6380   cat >> confdefs.h <<EOF
6381 #define $ac_tr_hdr 1
6382 EOF
6383  ac_header_dirent=$ac_hdr; break
6384 else
6385   echo "$ac_t""no" 1>&6
6386 fi
6387 done
6388 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6389 if test $ac_header_dirent = dirent.h; then
6390 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
6391 echo "configure:6392: checking for opendir in -ldir" >&5
6392 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
6393 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6394   echo $ac_n "(cached) $ac_c" 1>&6
6395 else
6396   ac_save_LIBS="$LIBS"
6397 LIBS="-ldir  $LIBS"
6398 cat > conftest.$ac_ext <<EOF
6399 #line 6400 "configure"
6400 #include "confdefs.h"
6401 /* Override any gcc2 internal prototype to avoid an error.  */
6402 /* We use char because int might match the return type of a gcc2
6403     builtin and then its argument prototype would still apply.  */
6404 char opendir();
6405
6406 int main() {
6407 opendir()
6408 ; return 0; }
6409 EOF
6410 if { (eval echo configure:6411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6411   rm -rf conftest*
6412   eval "ac_cv_lib_$ac_lib_var=yes"
6413 else
6414   echo "configure: failed program was:" >&5
6415   cat conftest.$ac_ext >&5
6416   rm -rf conftest*
6417   eval "ac_cv_lib_$ac_lib_var=no"
6418 fi
6419 rm -f conftest*
6420 LIBS="$ac_save_LIBS"
6421
6422 fi
6423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6424   echo "$ac_t""yes" 1>&6
6425   LIBS="$LIBS -ldir"
6426 else
6427   echo "$ac_t""no" 1>&6
6428 fi
6429
6430 else
6431 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
6432 echo "configure:6433: checking for opendir in -lx" >&5
6433 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
6434 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6435   echo $ac_n "(cached) $ac_c" 1>&6
6436 else
6437   ac_save_LIBS="$LIBS"
6438 LIBS="-lx  $LIBS"
6439 cat > conftest.$ac_ext <<EOF
6440 #line 6441 "configure"
6441 #include "confdefs.h"
6442 /* Override any gcc2 internal prototype to avoid an error.  */
6443 /* We use char because int might match the return type of a gcc2
6444     builtin and then its argument prototype would still apply.  */
6445 char opendir();
6446
6447 int main() {
6448 opendir()
6449 ; return 0; }
6450 EOF
6451 if { (eval echo configure:6452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6452   rm -rf conftest*
6453   eval "ac_cv_lib_$ac_lib_var=yes"
6454 else
6455   echo "configure: failed program was:" >&5
6456   cat conftest.$ac_ext >&5
6457   rm -rf conftest*
6458   eval "ac_cv_lib_$ac_lib_var=no"
6459 fi
6460 rm -f conftest*
6461 LIBS="$ac_save_LIBS"
6462
6463 fi
6464 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6465   echo "$ac_t""yes" 1>&6
6466   LIBS="$LIBS -lx"
6467 else
6468   echo "$ac_t""no" 1>&6
6469 fi
6470
6471 fi
6472
6473 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
6474 echo "configure:6475: checking for ANSI C header files" >&5
6475 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
6476   echo $ac_n "(cached) $ac_c" 1>&6
6477 else
6478   cat > conftest.$ac_ext <<EOF
6479 #line 6480 "configure"
6480 #include "confdefs.h"
6481 #include <stdlib.h>
6482 #include <stdarg.h>
6483 #include <string.h>
6484 #include <float.h>
6485 EOF
6486 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6487 { (eval echo configure:6488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6488 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6489 if test -z "$ac_err"; then
6490   rm -rf conftest*
6491   ac_cv_header_stdc=yes
6492 else
6493   echo "$ac_err" >&5
6494   echo "configure: failed program was:" >&5
6495   cat conftest.$ac_ext >&5
6496   rm -rf conftest*
6497   ac_cv_header_stdc=no
6498 fi
6499 rm -f conftest*
6500
6501 if test $ac_cv_header_stdc = yes; then
6502   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6503 cat > conftest.$ac_ext <<EOF
6504 #line 6505 "configure"
6505 #include "confdefs.h"
6506 #include <string.h>
6507 EOF
6508 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6509   egrep "memchr" >/dev/null 2>&1; then
6510   :
6511 else
6512   rm -rf conftest*
6513   ac_cv_header_stdc=no
6514 fi
6515 rm -f conftest*
6516
6517 fi
6518
6519 if test $ac_cv_header_stdc = yes; then
6520   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6521 cat > conftest.$ac_ext <<EOF
6522 #line 6523 "configure"
6523 #include "confdefs.h"
6524 #include <stdlib.h>
6525 EOF
6526 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6527   egrep "free" >/dev/null 2>&1; then
6528   :
6529 else
6530   rm -rf conftest*
6531   ac_cv_header_stdc=no
6532 fi
6533 rm -f conftest*
6534
6535 fi
6536
6537 if test $ac_cv_header_stdc = yes; then
6538   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6539 if test "$cross_compiling" = yes; then
6540   :
6541 else
6542   cat > conftest.$ac_ext <<EOF
6543 #line 6544 "configure"
6544 #include "confdefs.h"
6545 #include <ctype.h>
6546 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6547 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6548 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6549 int main () { int i; for (i = 0; i < 256; i++)
6550 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
6551 exit (0); }
6552
6553 EOF
6554 if { (eval echo configure:6555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6555 then
6556   :
6557 else
6558   echo "configure: failed program was:" >&5
6559   cat conftest.$ac_ext >&5
6560   rm -fr conftest*
6561   ac_cv_header_stdc=no
6562 fi
6563 rm -fr conftest*
6564 fi
6565
6566 fi
6567 fi
6568
6569 echo "$ac_t""$ac_cv_header_stdc" 1>&6
6570 if test $ac_cv_header_stdc = yes; then
6571   cat >> confdefs.h <<\EOF
6572 #define STDC_HEADERS 1
6573 EOF
6574
6575 fi
6576
6577 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
6578 echo "configure:6579: checking whether time.h and sys/time.h may both be included" >&5
6579 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
6580   echo $ac_n "(cached) $ac_c" 1>&6
6581 else
6582   cat > conftest.$ac_ext <<EOF
6583 #line 6584 "configure"
6584 #include "confdefs.h"
6585 #include <sys/types.h>
6586 #include <sys/time.h>
6587 #include <time.h>
6588 int main() {
6589 struct tm *tp;
6590 ; return 0; }
6591 EOF
6592 if { (eval echo configure:6593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6593   rm -rf conftest*
6594   ac_cv_header_time=yes
6595 else
6596   echo "configure: failed program was:" >&5
6597   cat conftest.$ac_ext >&5
6598   rm -rf conftest*
6599   ac_cv_header_time=no
6600 fi
6601 rm -f conftest*
6602 fi
6603
6604 echo "$ac_t""$ac_cv_header_time" 1>&6
6605 if test $ac_cv_header_time = yes; then
6606   cat >> confdefs.h <<\EOF
6607 #define TIME_WITH_SYS_TIME 1
6608 EOF
6609
6610 fi
6611
6612 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
6613 echo "configure:6614: checking for sys/wait.h that is POSIX.1 compatible" >&5
6614 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
6615   echo $ac_n "(cached) $ac_c" 1>&6
6616 else
6617   cat > conftest.$ac_ext <<EOF
6618 #line 6619 "configure"
6619 #include "confdefs.h"
6620 #include <sys/types.h>
6621 #include <sys/wait.h>
6622 #ifndef WEXITSTATUS
6623 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
6624 #endif
6625 #ifndef WIFEXITED
6626 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6627 #endif
6628 int main() {
6629 int s;
6630 wait (&s);
6631 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6632 ; return 0; }
6633 EOF
6634 if { (eval echo configure:6635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6635   rm -rf conftest*
6636   ac_cv_header_sys_wait_h=yes
6637 else
6638   echo "configure: failed program was:" >&5
6639   cat conftest.$ac_ext >&5
6640   rm -rf conftest*
6641   ac_cv_header_sys_wait_h=no
6642 fi
6643 rm -f conftest*
6644 fi
6645
6646 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
6647 if test $ac_cv_header_sys_wait_h = yes; then
6648   cat >> confdefs.h <<\EOF
6649 #define HAVE_SYS_WAIT_H 1
6650 EOF
6651
6652 fi
6653
6654
6655 for ac_hdr in \
6656         unistd.h \
6657         crypt.h \
6658         errno.h \
6659         resource.h \
6660         getopt.h \
6661         malloc.h \
6662         utmp.h \
6663         utmpx.h \
6664         signal.h \
6665         sys/select.h \
6666         syslog.h \
6667         inttypes.h \
6668         stdint.h \
6669         stdio.h \
6670         netdb.h \
6671         semaphore.h \
6672         arpa/inet.h \
6673         netinet/in.h \
6674         sys/types.h \
6675         sys/socket.h \
6676         sys/time.h \
6677         sys/wait.h \
6678         sys/security.h \
6679         prot.h \
6680         sia.h \
6681         siad.h
6682
6683 do
6684 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6685 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6686 echo "configure:6687: checking for $ac_hdr" >&5
6687 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6688   echo $ac_n "(cached) $ac_c" 1>&6
6689 else
6690   cat > conftest.$ac_ext <<EOF
6691 #line 6692 "configure"
6692 #include "confdefs.h"
6693 #include <$ac_hdr>
6694 EOF
6695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6696 { (eval echo configure:6697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6698 if test -z "$ac_err"; then
6699   rm -rf conftest*
6700   eval "ac_cv_header_$ac_safe=yes"
6701 else
6702   echo "$ac_err" >&5
6703   echo "configure: failed program was:" >&5
6704   cat conftest.$ac_ext >&5
6705   rm -rf conftest*
6706   eval "ac_cv_header_$ac_safe=no"
6707 fi
6708 rm -f conftest*
6709 fi
6710 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6711   echo "$ac_t""yes" 1>&6
6712     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6713   cat >> confdefs.h <<EOF
6714 #define $ac_tr_hdr 1
6715 EOF
6716  
6717 else
6718   echo "$ac_t""no" 1>&6
6719 fi
6720 done
6721
6722
6723 REGEX=no
6724 ac_safe=`echo "regex.h" | sed 'y%./+-%__p_%'`
6725 echo $ac_n "checking for regex.h""... $ac_c" 1>&6
6726 echo "configure:6727: checking for regex.h" >&5
6727 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6728   echo $ac_n "(cached) $ac_c" 1>&6
6729 else
6730   cat > conftest.$ac_ext <<EOF
6731 #line 6732 "configure"
6732 #include "confdefs.h"
6733 #include <regex.h>
6734 EOF
6735 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6736 { (eval echo configure:6737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6737 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6738 if test -z "$ac_err"; then
6739   rm -rf conftest*
6740   eval "ac_cv_header_$ac_safe=yes"
6741 else
6742   echo "$ac_err" >&5
6743   echo "configure: failed program was:" >&5
6744   cat conftest.$ac_ext >&5
6745   rm -rf conftest*
6746   eval "ac_cv_header_$ac_safe=no"
6747 fi
6748 rm -f conftest*
6749 fi
6750 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6751   echo "$ac_t""yes" 1>&6
6752   cat >> confdefs.h <<\EOF
6753 #define HAVE_REGEX_H 1
6754 EOF
6755
6756 else
6757   echo "$ac_t""no" 1>&6
6758 fi
6759
6760 if test "x$ac_cv_header_regex_h" = "xyes"; then
6761   REGEX_EXTENDED=no
6762   REGEX=yes
6763   cat > conftest.$ac_ext <<EOF
6764 #line 6765 "configure"
6765 #include "confdefs.h"
6766 #include <regex.h>
6767      #ifdef REG_EXTENDED
6768        yes
6769      #endif
6770      
6771 EOF
6772 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6773   egrep "yes" >/dev/null 2>&1; then
6774   rm -rf conftest*
6775   cat >> confdefs.h <<\EOF
6776 #define HAVE_REG_EXTENDED 1
6777 EOF
6778  REGEX_EXTENDED=yes
6779 fi
6780 rm -f conftest*
6781
6782 fi
6783
6784
6785
6786 if test "x$ac_cv_header_sys_security_h" = "xyes" && test "x$ac_cv_header_prot_h" = "xyes"
6787 then
6788   cat >> confdefs.h <<\EOF
6789 #define OSFC2 1
6790 EOF
6791
6792 fi
6793
6794 if test "x$ac_cv_header_sia_h" = "xyes" && test "x$ac_cv_header_siad_h" = "xyes"
6795 then
6796   cat >> confdefs.h <<\EOF
6797 #define OSFSIA 1
6798 EOF
6799
6800 fi
6801
6802
6803
6804 echo $ac_n "checking for off_t""... $ac_c" 1>&6
6805 echo "configure:6806: checking for off_t" >&5
6806 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
6807   echo $ac_n "(cached) $ac_c" 1>&6
6808 else
6809   cat > conftest.$ac_ext <<EOF
6810 #line 6811 "configure"
6811 #include "confdefs.h"
6812 #include <sys/types.h>
6813 #if STDC_HEADERS
6814 #include <stdlib.h>
6815 #include <stddef.h>
6816 #endif
6817 EOF
6818 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6819   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6820   rm -rf conftest*
6821   ac_cv_type_off_t=yes
6822 else
6823   rm -rf conftest*
6824   ac_cv_type_off_t=no
6825 fi
6826 rm -f conftest*
6827
6828 fi
6829 echo "$ac_t""$ac_cv_type_off_t" 1>&6
6830 if test $ac_cv_type_off_t = no; then
6831   cat >> confdefs.h <<\EOF
6832 #define off_t long
6833 EOF
6834
6835 fi
6836  
6837 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
6838 echo "configure:6839: checking for pid_t" >&5
6839 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
6840   echo $ac_n "(cached) $ac_c" 1>&6
6841 else
6842   cat > conftest.$ac_ext <<EOF
6843 #line 6844 "configure"
6844 #include "confdefs.h"
6845 #include <sys/types.h>
6846 #if STDC_HEADERS
6847 #include <stdlib.h>
6848 #include <stddef.h>
6849 #endif
6850 EOF
6851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6852   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6853   rm -rf conftest*
6854   ac_cv_type_pid_t=yes
6855 else
6856   rm -rf conftest*
6857   ac_cv_type_pid_t=no
6858 fi
6859 rm -f conftest*
6860
6861 fi
6862 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6863 if test $ac_cv_type_pid_t = no; then
6864   cat >> confdefs.h <<\EOF
6865 #define pid_t int
6866 EOF
6867
6868 fi
6869
6870 echo $ac_n "checking for size_t""... $ac_c" 1>&6
6871 echo "configure:6872: checking for size_t" >&5
6872 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
6873   echo $ac_n "(cached) $ac_c" 1>&6
6874 else
6875   cat > conftest.$ac_ext <<EOF
6876 #line 6877 "configure"
6877 #include "confdefs.h"
6878 #include <sys/types.h>
6879 #if STDC_HEADERS
6880 #include <stdlib.h>
6881 #include <stddef.h>
6882 #endif
6883 EOF
6884 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6885   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6886   rm -rf conftest*
6887   ac_cv_type_size_t=yes
6888 else
6889   rm -rf conftest*
6890   ac_cv_type_size_t=no
6891 fi
6892 rm -f conftest*
6893
6894 fi
6895 echo "$ac_t""$ac_cv_type_size_t" 1>&6
6896 if test $ac_cv_type_size_t = no; then
6897   cat >> confdefs.h <<\EOF
6898 #define size_t unsigned
6899 EOF
6900
6901 fi
6902
6903 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
6904 echo "configure:6905: checking for uid_t in sys/types.h" >&5
6905 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
6906   echo $ac_n "(cached) $ac_c" 1>&6
6907 else
6908   cat > conftest.$ac_ext <<EOF
6909 #line 6910 "configure"
6910 #include "confdefs.h"
6911 #include <sys/types.h>
6912 EOF
6913 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6914   egrep "uid_t" >/dev/null 2>&1; then
6915   rm -rf conftest*
6916   ac_cv_type_uid_t=yes
6917 else
6918   rm -rf conftest*
6919   ac_cv_type_uid_t=no
6920 fi
6921 rm -f conftest*
6922
6923 fi
6924
6925 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
6926 if test $ac_cv_type_uid_t = no; then
6927   cat >> confdefs.h <<\EOF
6928 #define uid_t int
6929 EOF
6930
6931   cat >> confdefs.h <<\EOF
6932 #define gid_t int
6933 EOF
6934
6935 fi
6936
6937
6938
6939   echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
6940 echo "configure:6941: checking for socklen_t" >&5
6941 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
6942   echo $ac_n "(cached) $ac_c" 1>&6
6943 else
6944    ac_cv_type_socklen_t=no
6945       cat > conftest.$ac_ext <<EOF
6946 #line 6947 "configure"
6947 #include "confdefs.h"
6948 #ifdef HAVE_SYS_TYPES_H
6949 #include <sys/types.h>
6950 #endif
6951 #ifdef HAVE_SYS_SOCKET_H
6952 #include <sys/socket.h>
6953 #endif
6954
6955 int main() {
6956 socklen_t foo
6957 ; return 0; }
6958 EOF
6959 if { (eval echo configure:6960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6960   rm -rf conftest*
6961   ac_cv_type_socklen_t=yes
6962 else
6963   echo "configure: failed program was:" >&5
6964   cat conftest.$ac_ext >&5
6965 fi
6966 rm -f conftest*
6967     
6968   
6969 fi
6970
6971 echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
6972
6973   if test "$ac_cv_type_socklen_t" != "yes"; then
6974          cat >> confdefs.h <<\EOF
6975 #define socklen_t int
6976 EOF
6977
6978   fi
6979
6980
6981
6982   echo $ac_n "checking for uint8_t""... $ac_c" 1>&6
6983 echo "configure:6984: checking for uint8_t" >&5
6984 if eval "test \"`echo '$''{'ac_cv_type_uint8_t'+set}'`\" = set"; then
6985   echo $ac_n "(cached) $ac_c" 1>&6
6986 else
6987    ac_cv_type_uint8_t=no
6988       cat > conftest.$ac_ext <<EOF
6989 #line 6990 "configure"
6990 #include "confdefs.h"
6991 #ifdef HAVE_INTTYPES_H
6992 #include <inttypes.h>
6993 #endif
6994 #ifdef HAVE_STDINT_H
6995 #include <stdint.h>
6996 #endif
6997
6998 int main() {
6999 uint8_t foo
7000 ; return 0; }
7001 EOF
7002 if { (eval echo configure:7003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7003   rm -rf conftest*
7004   ac_cv_type_uint8_t=yes
7005 else
7006   echo "configure: failed program was:" >&5
7007   cat conftest.$ac_ext >&5
7008 fi
7009 rm -f conftest*
7010     
7011   
7012 fi
7013
7014 echo "$ac_t""$ac_cv_type_uint8_t" 1>&6
7015
7016   if test "$ac_cv_type_uint8_t" != "yes"; then
7017          cat >> confdefs.h <<\EOF
7018 #define uint8_t unsigned char
7019 EOF
7020
7021   fi
7022
7023
7024
7025   echo $ac_n "checking for uint16_t""... $ac_c" 1>&6
7026 echo "configure:7027: checking for uint16_t" >&5
7027 if eval "test \"`echo '$''{'ac_cv_type_uint16_t'+set}'`\" = set"; then
7028   echo $ac_n "(cached) $ac_c" 1>&6
7029 else
7030    ac_cv_type_uint16_t=no
7031       cat > conftest.$ac_ext <<EOF
7032 #line 7033 "configure"
7033 #include "confdefs.h"
7034 #ifdef HAVE_INTTYPES_H
7035 #include <inttypes.h>
7036 #endif
7037 #ifdef HAVE_STDINT_H
7038 #include <stdint.h>
7039 #endif
7040
7041 int main() {
7042 uint16_t foo
7043 ; return 0; }
7044 EOF
7045 if { (eval echo configure:7046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7046   rm -rf conftest*
7047   ac_cv_type_uint16_t=yes
7048 else
7049   echo "configure: failed program was:" >&5
7050   cat conftest.$ac_ext >&5
7051 fi
7052 rm -f conftest*
7053     
7054   
7055 fi
7056
7057 echo "$ac_t""$ac_cv_type_uint16_t" 1>&6
7058
7059   if test "$ac_cv_type_uint16_t" != "yes"; then
7060          cat >> confdefs.h <<\EOF
7061 #define uint16_t unsigned short
7062 EOF
7063
7064   fi
7065
7066
7067
7068   echo $ac_n "checking for uint32_t""... $ac_c" 1>&6
7069 echo "configure:7070: checking for uint32_t" >&5
7070 if eval "test \"`echo '$''{'ac_cv_type_uint32_t'+set}'`\" = set"; then
7071   echo $ac_n "(cached) $ac_c" 1>&6
7072 else
7073    ac_cv_type_uint32_t=no
7074       cat > conftest.$ac_ext <<EOF
7075 #line 7076 "configure"
7076 #include "confdefs.h"
7077 #ifdef HAVE_INTTYPES_H
7078 #include <inttypes.h>
7079 #endif
7080 #ifdef HAVE_STDINT_H
7081 #include <stdint.h>
7082 #endif
7083
7084 int main() {
7085 uint32_t foo
7086 ; return 0; }
7087 EOF
7088 if { (eval echo configure:7089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7089   rm -rf conftest*
7090   ac_cv_type_uint32_t=yes
7091 else
7092   echo "configure: failed program was:" >&5
7093   cat conftest.$ac_ext >&5
7094 fi
7095 rm -f conftest*
7096     
7097   
7098 fi
7099
7100 echo "$ac_t""$ac_cv_type_uint32_t" 1>&6
7101
7102   if test "$ac_cv_type_uint32_t" != "yes"; then
7103          cat >> confdefs.h <<\EOF
7104 #define uint32_t unsigned int
7105 EOF
7106
7107   fi
7108
7109
7110 for ac_func in \
7111         getopt_long \
7112         lockf \
7113         strsignal \
7114         sigaction \
7115         sigprocmask \
7116         pthread_sigmask \
7117         snprintf \
7118         vsnprintf \
7119         setsid \
7120         strncasecmp \
7121         strcasecmp \
7122         localtime_r \
7123         ctime_r \
7124         gmtime_r \
7125         strsep \
7126         inet_aton \
7127         gethostname \
7128         setlinebuf \
7129         setvbuf \
7130         sem_init \
7131         getusershell
7132
7133 do
7134 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7135 echo "configure:7136: checking for $ac_func" >&5
7136 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7137   echo $ac_n "(cached) $ac_c" 1>&6
7138 else
7139   cat > conftest.$ac_ext <<EOF
7140 #line 7141 "configure"
7141 #include "confdefs.h"
7142 /* System header to define __stub macros and hopefully few prototypes,
7143     which can conflict with char $ac_func(); below.  */
7144 #include <assert.h>
7145 /* Override any gcc2 internal prototype to avoid an error.  */
7146 /* We use char because int might match the return type of a gcc2
7147     builtin and then its argument prototype would still apply.  */
7148 char $ac_func();
7149
7150 int main() {
7151
7152 /* The GNU C library defines this for functions which it implements
7153     to always fail with ENOSYS.  Some functions are actually named
7154     something starting with __ and the normal name is an alias.  */
7155 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7156 choke me
7157 #else
7158 $ac_func();
7159 #endif
7160
7161 ; return 0; }
7162 EOF
7163 if { (eval echo configure:7164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7164   rm -rf conftest*
7165   eval "ac_cv_func_$ac_func=yes"
7166 else
7167   echo "configure: failed program was:" >&5
7168   cat conftest.$ac_ext >&5
7169   rm -rf conftest*
7170   eval "ac_cv_func_$ac_func=no"
7171 fi
7172 rm -f conftest*
7173 fi
7174
7175 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7176   echo "$ac_t""yes" 1>&6
7177     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7178   cat >> confdefs.h <<EOF
7179 #define $ac_tr_func 1
7180 EOF
7181  
7182 else
7183   echo "$ac_t""no" 1>&6
7184 fi
7185 done
7186
7187 for ac_func in \
7188         crypt \
7189         strncasecmp \
7190         strcasecmp \
7191         inet_aton \
7192         gethostname \
7193         setlinebuf \
7194         getusershell \
7195         endusershell
7196
7197 do
7198 echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
7199 echo "configure:7200: checking whether $ac_func must be declared" >&5
7200 if eval "test \"`echo '$''{'radius_cv_decl_needed_$ac_func'+set}'`\" = set"; then
7201   echo $ac_n "(cached) $ac_c" 1>&6
7202 else
7203   cat > conftest.$ac_ext <<EOF
7204 #line 7205 "configure"
7205 #include "confdefs.h"
7206
7207 #include <stdio.h>
7208 #include <string.h>
7209 #ifdef HAVE_UNISTD_H
7210 #include <unistd.h>
7211 #endif
7212 #ifdef HAVE_CRYPT_H
7213 #include <crypt.h>
7214 #endif
7215 #ifdef HAVE_ERRNO_H
7216 #include <errno.h>
7217 #endif
7218 #ifdef HAVE_RESOURCE_H
7219 #include <resource.h>
7220 #endif
7221 #ifdef HAVE_GETOPT_H
7222 #include <getopt.h>
7223 #endif
7224 #ifdef HAVE_MALLOC_H
7225 #include <malloc.h>
7226 #endif
7227 #ifdef HAVE_UTMP_H
7228 #include <utmp.h>
7229 #endif
7230 #ifdef HAVE_UTMPX_H
7231 #include <utmpx.h>
7232 #endif
7233 #ifdef HAVE_SYS_SELECT_H
7234 #include <sys/select.h>
7235 #endif
7236 #ifdef HAVE_DLFCN_H
7237 #include <dlfcn.h>
7238 #endif
7239 #ifdef HAVE_REGEX_H
7240 #include <regex.h>
7241 #endif
7242 #ifdef HAVE_SYSLOG_H
7243 #include <syslog.h>
7244 #endif
7245 #ifdef HAVE_INTTYPES_H
7246 #include <inttypes.h>
7247 #endif
7248 #ifdef HAVE_STDINT_H
7249 #include <stdint.h>
7250 #endif
7251 #ifdef HAVE_ARPA_INET_H
7252 #include <arpa/inet.h>
7253 #endif
7254
7255 int main() {
7256 char *(*pfn) = (char *(*)) $ac_func
7257 ; return 0; }
7258 EOF
7259 if { (eval echo configure:7260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7260   rm -rf conftest*
7261   eval "radius_cv_decl_needed_$ac_func=no"
7262 else
7263   echo "configure: failed program was:" >&5
7264   cat conftest.$ac_ext >&5
7265   rm -rf conftest*
7266   eval "radius_cv_decl_needed_$ac_func=yes"
7267 fi
7268 rm -f conftest*
7269 fi
7270
7271 if eval "test \"`echo '$radius_cv_decl_needed_'$ac_func`\" = yes"; then
7272   echo "$ac_t""yes" 1>&6
7273   radius_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7274   cat >> confdefs.h <<EOF
7275 #define $radius_tr_decl 1
7276 EOF
7277
7278 else
7279   echo "$ac_t""no" 1>&6
7280 fi
7281
7282 done
7283
7284
7285 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
7286 echo "configure:7287: checking return type of signal handlers" >&5
7287 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
7288   echo $ac_n "(cached) $ac_c" 1>&6
7289 else
7290   cat > conftest.$ac_ext <<EOF
7291 #line 7292 "configure"
7292 #include "confdefs.h"
7293 #include <sys/types.h>
7294 #include <signal.h>
7295 #ifdef signal
7296 #undef signal
7297 #endif
7298 #ifdef __cplusplus
7299 extern "C" void (*signal (int, void (*)(int)))(int);
7300 #else
7301 void (*signal ()) ();
7302 #endif
7303
7304 int main() {
7305 int i;
7306 ; return 0; }
7307 EOF
7308 if { (eval echo configure:7309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7309   rm -rf conftest*
7310   ac_cv_type_signal=void
7311 else
7312   echo "configure: failed program was:" >&5
7313   cat conftest.$ac_ext >&5
7314   rm -rf conftest*
7315   ac_cv_type_signal=int
7316 fi
7317 rm -f conftest*
7318 fi
7319
7320 echo "$ac_t""$ac_cv_type_signal" 1>&6
7321 cat >> confdefs.h <<EOF
7322 #define RETSIGTYPE $ac_cv_type_signal
7323 EOF
7324
7325
7326
7327 if test "x$ac_cv_header_utmpx_h" = "xyes"
7328 then
7329  
7330   echo $ac_n "checking for ut_xtime in struct utmpx""... $ac_c" 1>&6
7331 echo "configure:7332: checking for ut_xtime in struct utmpx" >&5
7332
7333
7334   cat > conftest.$ac_ext <<EOF
7335 #line 7336 "configure"
7336 #include "confdefs.h"
7337
7338 #include <utmpx.h>
7339 #ifndef offsetof
7340 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
7341 #endif
7342
7343 int main() {
7344  int foo = offsetof(struct utmpx, ut_xtime) 
7345 ; return 0; }
7346 EOF
7347 if { (eval echo configure:7348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7348   rm -rf conftest*
7349   has_element=" "
7350 else
7351   echo "configure: failed program was:" >&5
7352   cat conftest.$ac_ext >&5
7353   rm -rf conftest*
7354   has_element=
7355 fi
7356 rm -f conftest*
7357
7358   ac_safe_type=`echo "struct utmpx" | sed 'y% %_%'`
7359   if test "x$has_element" != "x"; then
7360     echo "$ac_t""yes" 1>&6
7361     eval "ac_cv_type_${ac_safe_type}_has_ut_xtime=yes"
7362   else
7363     echo "$ac_t""no" 1>&6 
7364     eval "ac_cv_type_${ac_safe_type}_has_ut_xtime="
7365  fi
7366
7367  if test "x$ac_cv_type_struct_utmpx_ut_xtime" = "x"
7368  then
7369    cat >> confdefs.h <<\EOF
7370 #define ut_xtime ut_tv.tv_sec
7371 EOF
7372
7373  fi
7374 fi
7375
7376
7377 echo $ac_n "checking for working const""... $ac_c" 1>&6
7378 echo "configure:7379: checking for working const" >&5
7379 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
7380   echo $ac_n "(cached) $ac_c" 1>&6
7381 else
7382   cat > conftest.$ac_ext <<EOF
7383 #line 7384 "configure"
7384 #include "confdefs.h"
7385
7386 int main() {
7387
7388 /* Ultrix mips cc rejects this.  */
7389 typedef int charset[2]; const charset x;
7390 /* SunOS 4.1.1 cc rejects this.  */
7391 char const *const *ccp;
7392 char **p;
7393 /* NEC SVR4.0.2 mips cc rejects this.  */
7394 struct point {int x, y;};
7395 static struct point const zero = {0,0};
7396 /* AIX XL C 1.02.0.0 rejects this.
7397    It does not let you subtract one const X* pointer from another in an arm
7398    of an if-expression whose if-part is not a constant expression */
7399 const char *g = "string";
7400 ccp = &g + (g ? g-g : 0);
7401 /* HPUX 7.0 cc rejects these. */
7402 ++ccp;
7403 p = (char**) ccp;
7404 ccp = (char const *const *) p;
7405 { /* SCO 3.2v4 cc rejects this.  */
7406   char *t;
7407   char const *s = 0 ? (char *) 0 : (char const *) 0;
7408
7409   *t++ = 0;
7410 }
7411 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
7412   int x[] = {25, 17};
7413   const int *foo = &x[0];
7414   ++foo;
7415 }
7416 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7417   typedef const int *iptr;
7418   iptr p = 0;
7419   ++p;
7420 }
7421 { /* AIX XL C 1.02.0.0 rejects this saying
7422      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7423   struct s { int j; const int *ap[3]; };
7424   struct s *b; b->j = 5;
7425 }
7426 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7427   const int foo = 10;
7428 }
7429
7430 ; return 0; }
7431 EOF
7432 if { (eval echo configure:7433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7433   rm -rf conftest*
7434   ac_cv_c_const=yes
7435 else
7436   echo "configure: failed program was:" >&5
7437   cat conftest.$ac_ext >&5
7438   rm -rf conftest*
7439   ac_cv_c_const=no
7440 fi
7441 rm -f conftest*
7442 fi
7443
7444 echo "$ac_t""$ac_cv_c_const" 1>&6
7445 if test $ac_cv_c_const = no; then
7446   cat >> confdefs.h <<\EOF
7447 #define const 
7448 EOF
7449
7450 fi
7451  
7452
7453 echo $ac_n "checking type of OS""... $ac_c" 1>&6
7454 echo "configure:7455: checking type of OS" >&5
7455 OS=`uname -s`
7456 echo "$ac_t""$OS" 1>&6
7457 if test "$OS" = "OS/2"; then
7458         LIBPREFIX=
7459 else
7460         LIBPREFIX=lib
7461 fi
7462
7463
7464 if test "x$GCC" = "xyes"; then
7465     CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
7466 fi
7467
7468 echo $ac_n "checking for developer gcc flags""... $ac_c" 1>&6
7469 echo "configure:7470: checking for developer gcc flags" >&5
7470 if test "x$developer" = "xyes" -a "x$GCC" = "xyes"; then
7471   devflags="-g -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs"
7472   CFLAGS="$CFLAGS $devflags"
7473   INSTALLSTRIP=""
7474   echo "$ac_t""yes.  Using $devflags" 1>&6
7475 else
7476   devflags=""
7477   CFLAGS="$CFLAGS -DNDEBUG"
7478   INSTALLSTRIP="-s"
7479   echo "$ac_t""no." 1>&6
7480 fi
7481
7482
7483 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
7484 echo "configure:7485: checking for crypt in -lcrypt" >&5
7485 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
7486 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7487   echo $ac_n "(cached) $ac_c" 1>&6
7488 else
7489   ac_save_LIBS="$LIBS"
7490 LIBS="-lcrypt  $LIBS"
7491 cat > conftest.$ac_ext <<EOF
7492 #line 7493 "configure"
7493 #include "confdefs.h"
7494 /* Override any gcc2 internal prototype to avoid an error.  */
7495 /* We use char because int might match the return type of a gcc2
7496     builtin and then its argument prototype would still apply.  */
7497 char crypt();
7498
7499 int main() {
7500 crypt()
7501 ; return 0; }
7502 EOF
7503 if { (eval echo configure:7504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7504   rm -rf conftest*
7505   eval "ac_cv_lib_$ac_lib_var=yes"
7506 else
7507   echo "configure: failed program was:" >&5
7508   cat conftest.$ac_ext >&5
7509   rm -rf conftest*
7510   eval "ac_cv_lib_$ac_lib_var=no"
7511 fi
7512 rm -f conftest*
7513 LIBS="$ac_save_LIBS"
7514
7515 fi
7516 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7517   echo "$ac_t""yes" 1>&6
7518   CRYPTLIB="-lcrypt"
7519
7520 else
7521   echo "$ac_t""no" 1>&6
7522 fi
7523
7524 if test "$CRYPTLIB" != ""; then
7525   cat >> confdefs.h <<\EOF
7526 #define HAVE_CRYPT 1
7527 EOF
7528
7529 else
7530   echo $ac_n "checking for crypt""... $ac_c" 1>&6
7531 echo "configure:7532: checking for crypt" >&5
7532 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
7533   echo $ac_n "(cached) $ac_c" 1>&6
7534 else
7535   cat > conftest.$ac_ext <<EOF
7536 #line 7537 "configure"
7537 #include "confdefs.h"
7538 /* System header to define __stub macros and hopefully few prototypes,
7539     which can conflict with char crypt(); below.  */
7540 #include <assert.h>
7541 /* Override any gcc2 internal prototype to avoid an error.  */
7542 /* We use char because int might match the return type of a gcc2
7543     builtin and then its argument prototype would still apply.  */
7544 char crypt();
7545
7546 int main() {
7547
7548 /* The GNU C library defines this for functions which it implements
7549     to always fail with ENOSYS.  Some functions are actually named
7550     something starting with __ and the normal name is an alias.  */
7551 #if defined (__stub_crypt) || defined (__stub___crypt)
7552 choke me
7553 #else
7554 crypt();
7555 #endif
7556
7557 ; return 0; }
7558 EOF
7559 if { (eval echo configure:7560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7560   rm -rf conftest*
7561   eval "ac_cv_func_crypt=yes"
7562 else
7563   echo "configure: failed program was:" >&5
7564   cat conftest.$ac_ext >&5
7565   rm -rf conftest*
7566   eval "ac_cv_func_crypt=no"
7567 fi
7568 rm -f conftest*
7569 fi
7570
7571 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
7572   echo "$ac_t""yes" 1>&6
7573   cat >> confdefs.h <<\EOF
7574 #define HAVE_CRYPT 1
7575 EOF
7576
7577 else
7578   echo "$ac_t""no" 1>&6
7579 fi
7580
7581 fi
7582
7583 echo $ac_n "checking for setkey in -lcipher""... $ac_c" 1>&6
7584 echo "configure:7585: checking for setkey in -lcipher" >&5
7585 ac_lib_var=`echo cipher'_'setkey | sed 'y%./+-%__p_%'`
7586 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7587   echo $ac_n "(cached) $ac_c" 1>&6
7588 else
7589   ac_save_LIBS="$LIBS"
7590 LIBS="-lcipher  $LIBS"
7591 cat > conftest.$ac_ext <<EOF
7592 #line 7593 "configure"
7593 #include "confdefs.h"
7594 /* Override any gcc2 internal prototype to avoid an error.  */
7595 /* We use char because int might match the return type of a gcc2
7596     builtin and then its argument prototype would still apply.  */
7597 char setkey();
7598
7599 int main() {
7600 setkey()
7601 ; return 0; }
7602 EOF
7603 if { (eval echo configure:7604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7604   rm -rf conftest*
7605   eval "ac_cv_lib_$ac_lib_var=yes"
7606 else
7607   echo "configure: failed program was:" >&5
7608   cat conftest.$ac_ext >&5
7609   rm -rf conftest*
7610   eval "ac_cv_lib_$ac_lib_var=no"
7611 fi
7612 rm -f conftest*
7613 LIBS="$ac_save_LIBS"
7614
7615 fi
7616 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7617   echo "$ac_t""yes" 1>&6
7618   CRYPTLIB="${CRYPTLIB} -lcipher"
7619
7620 else
7621   echo "$ac_t""no" 1>&6
7622 fi
7623
7624
7625
7626 if test "x$WITH_SNMP" = "xyes"; then
7627   
7628         
7629         
7630
7631 echo $ac_n "checking for asn1.h""... $ac_c" 1>&6
7632 echo "configure:7633: checking for asn1.h" >&5
7633
7634 cat > conftest.$ac_ext <<EOF
7635 #line 7636 "configure"
7636 #include "confdefs.h"
7637
7638 #ifdef HAVE_SYS_TYPES_H
7639 #include <sys/types.h>
7640 #endif
7641 #ifdef HAVE_STDINT_H
7642 #include <stdint.h>
7643 #endif
7644 #ifdef HAVE_STDIO_H
7645 #include <stdio.h>
7646 #endif
7647 #ifdef HAVE_NETDB_H
7648 #include <netdb.h>
7649 #endif
7650 #ifdef HAVE_UNISTD_H
7651 #include <unistd.h>
7652 #endif
7653 #include <asn1.h>
7654 int main() {
7655  int a = 1;
7656 ; return 0; }
7657 EOF
7658 if { (eval echo configure:7659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7659   rm -rf conftest*
7660   SNMP_INCLUDE=""
7661 else
7662   echo "configure: failed program was:" >&5
7663   cat conftest.$ac_ext >&5
7664   rm -rf conftest*
7665   SNMP_INCLUDE=
7666 fi
7667 rm -f conftest*
7668
7669 if test "x$SNMP_INCLUDE" = "x"; then
7670   old_CFLAGS="$CFLAGS"
7671   for try in /usr/include/ucd-snmp /usr/local/include/ucd-snmp $snmp_include_dir; do
7672     CFLAGS="$old_CFLAGS -I$try"
7673     cat > conftest.$ac_ext <<EOF
7674 #line 7675 "configure"
7675 #include "confdefs.h"
7676
7677 #ifdef HAVE_SYS_TYPES_H
7678 #include <sys/types.h>
7679 #endif
7680 #ifdef HAVE_STDINT_H
7681 #include <stdint.h>
7682 #endif
7683 #ifdef HAVE_STDIO_H
7684 #include <stdio.h>
7685 #endif
7686 #ifdef HAVE_NETDB_H
7687 #include <netdb.h>
7688 #endif
7689 #ifdef HAVE_UNISTD_H
7690 #include <unistd.h>
7691 #endif
7692 #include <asn1.h>
7693 int main() {
7694  int a = 1;
7695 ; return 0; }
7696 EOF
7697 if { (eval echo configure:7698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7698   rm -rf conftest*
7699   SNMP_INCLUDE="-I$try"
7700 else
7701   echo "configure: failed program was:" >&5
7702   cat conftest.$ac_ext >&5
7703   rm -rf conftest*
7704   SNMP_INCLUDE=
7705 fi
7706 rm -f conftest*
7707     if test "x$SNMP_INCLUDE" != "x"; then
7708       break;
7709     fi
7710   done
7711   CFLAGS="$old_CFLAGS"
7712 fi
7713
7714 if test "x$SNMP_INCLUDE" = "x"; then
7715   echo "$ac_t""no" 1>&6
7716 else
7717   echo "$ac_t""yes" 1>&6
7718   cat >> confdefs.h <<\EOF
7719 #define HAVE_ASN1_H 1
7720 EOF
7721
7722   
7723   old_CFLAGS="$CFLAGS"
7724   CFLAGS="$CFLAGS $SNMP_INCLUDE"
7725
7726   echo $ac_n "checking for snmp.h""... $ac_c" 1>&6
7727 echo "configure:7728: checking for snmp.h" >&5
7728     cat > conftest.$ac_ext <<EOF
7729 #line 7730 "configure"
7730 #include "confdefs.h"
7731
7732 #ifdef HAVE_SYS_TYPES_H
7733 #include <sys/types.h>
7734 #endif
7735 #ifdef HAVE_STDINT_H
7736 #include <stdint.h>
7737 #endif
7738 #ifdef HAVE_STDIO_H
7739 #include <stdio.h>
7740 #endif
7741 #ifdef HAVE_NETDB_H
7742 #include <netdb.h>
7743 #endif
7744 #ifdef HAVE_UNISTD_H
7745 #include <unistd.h>
7746 #endif
7747 #ifdef HAVE_ASN1_H
7748 #include <asn1.h>
7749 #endif
7750 #include <snmp.h>
7751 int main() {
7752  int a = 1;
7753 ; return 0; }
7754 EOF
7755 if { (eval echo configure:7756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7756   rm -rf conftest*
7757   cat >> confdefs.h <<\EOF
7758 #define HAVE_SNMP_H 1
7759 EOF
7760  ac_cv_header_snmp_h=yes
7761 else
7762   echo "configure: failed program was:" >&5
7763   cat conftest.$ac_ext >&5
7764 fi
7765 rm -f conftest*
7766     if test "x$ac_cv_header_snmp_h" = "xyes"; then
7767       echo "$ac_t""yes" 1>&6
7768     else
7769       echo "$ac_t""no" 1>&6
7770     fi
7771
7772     echo $ac_n "checking for snmp_impl.h""... $ac_c" 1>&6
7773 echo "configure:7774: checking for snmp_impl.h" >&5
7774     cat > conftest.$ac_ext <<EOF
7775 #line 7776 "configure"
7776 #include "confdefs.h"
7777
7778 #ifdef HAVE_SYS_TYPES_H
7779 #include <sys/types.h>
7780 #endif
7781 #ifdef HAVE_STDINT_H
7782 #include <stdint.h>
7783 #endif
7784 #ifdef HAVE_STDIO_H
7785 #include <stdio.h>
7786 #endif
7787 #ifdef HAVE_NETDB_H
7788 #include <netdb.h>
7789 #endif
7790 #ifdef HAVE_UNISTD_H
7791 #include <unistd.h>
7792 #endif
7793 #ifdef HAVE_ASN1_H
7794 #include <asn1.h>
7795 #endif
7796 #ifdef HAVE_SNMP_H
7797 #include <snmp.h>
7798 #endif
7799 #include <snmp_impl.h>
7800 int main() {
7801  int a = 1;
7802 ; return 0; }
7803 EOF
7804 if { (eval echo configure:7805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7805   rm -rf conftest*
7806   cat >> confdefs.h <<\EOF
7807 #define HAVE_SNMP_IMPL_H 1
7808 EOF
7809  ac_cv_header_snmp_impl_h=yes
7810 else
7811   echo "configure: failed program was:" >&5
7812   cat conftest.$ac_ext >&5
7813 fi
7814 rm -f conftest*
7815     if test "x$ac_cv_header_snmp_h" = "xyes"; then
7816       echo "$ac_t""yes" 1>&6
7817     else
7818       echo "$ac_t""no" 1>&6
7819     fi
7820
7821   echo $ac_n "checking for snmp_build_var_op in -lsnmp""... $ac_c" 1>&6
7822 echo "configure:7823: checking for snmp_build_var_op in -lsnmp" >&5
7823
7824   old_LIBS="$LIBS"
7825   LIBS="$old_LIBS -lsnmp"
7826   cat > conftest.$ac_ext <<EOF
7827 #line 7828 "configure"
7828 #include "confdefs.h"
7829 extern char snmp_build_var_op();
7830 int main() {
7831  snmp_build_var_op()
7832 ; return 0; }
7833 EOF
7834 if { (eval echo configure:7835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7835   rm -rf conftest*
7836   SNMP_LIBS="-lsnmp"
7837 else
7838   echo "configure: failed program was:" >&5
7839   cat conftest.$ac_ext >&5
7840   rm -rf conftest*
7841   SNMP_LIBS=
7842 fi
7843 rm -f conftest*
7844
7845   if test "x$SNMP_LIBS" = "x"; then
7846     for try in /usr/lib /usr/local/lib /usr/local/snmp/lib $snmp_lib_dir; do
7847       LIBS="$old_LIBS -L$try -lsnmp"
7848       cat > conftest.$ac_ext <<EOF
7849 #line 7850 "configure"
7850 #include "confdefs.h"
7851 extern char snmp_build_var_op();
7852 int main() {
7853  snmp_build_var_op()
7854 ; return 0; }
7855 EOF
7856 if { (eval echo configure:7857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7857   rm -rf conftest*
7858   SNMP_LIBS="-L$try -lsnmp"
7859 else
7860   echo "configure: failed program was:" >&5
7861   cat conftest.$ac_ext >&5
7862   rm -rf conftest*
7863   SNMP_LIBS=
7864 fi
7865 rm -f conftest*
7866       if test "x$SNMP_LIBS" != "x"; then
7867         break;
7868       fi
7869       LIBS="$old_LIBS -L$try -lsnmp -lcrypto"
7870       cat > conftest.$ac_ext <<EOF
7871 #line 7872 "configure"
7872 #include "confdefs.h"
7873 extern char snmp_build_var_op();
7874 int main() {
7875  snmp_build_var_op()
7876 ; return 0; }
7877 EOF
7878 if { (eval echo configure:7879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7879   rm -rf conftest*
7880   SNMP_LIBS="-L$try -lsnmp -lcrypto"
7881 else
7882   echo "configure: failed program was:" >&5
7883   cat conftest.$ac_ext >&5
7884   rm -rf conftest*
7885   SNMP_LIBS=
7886 fi
7887 rm -f conftest*
7888       if test "x$SNMP_LIBS" != "x"; then
7889         break;
7890       fi
7891     done
7892   fi
7893   LIBS="$old_LIBS"
7894
7895           CFLAGS="$old_CFLAGS"
7896   if test "x$SNMP_LIBS" = "x"; then
7897     echo "$ac_t""no" 1>&6
7898     SNMP_INCLUDE=
7899   else
7900     echo "$ac_t""yes" 1>&6
7901     cat >> confdefs.h <<\EOF
7902 #define WITH_SNMP 1
7903 EOF
7904
7905     cat >> confdefs.h <<\EOF
7906 #define HAVE_LIBSNMP 1
7907 EOF
7908
7909   fi
7910 fi
7911
7912 fi
7913
7914 if test "X$ac_cv_func_sem_init" = "Xno"; then
7915
7916  echo $ac_n "checking for sem_init in -lposix4""... $ac_c" 1>&6
7917 echo "configure:7918: checking for sem_init in -lposix4" >&5
7918 ac_lib_var=`echo posix4'_'sem_init | sed 'y%./+-%__p_%'`
7919 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7920   echo $ac_n "(cached) $ac_c" 1>&6
7921 else
7922   ac_save_LIBS="$LIBS"
7923 LIBS="-lposix4  $LIBS"
7924 cat > conftest.$ac_ext <<EOF
7925 #line 7926 "configure"
7926 #include "confdefs.h"
7927 /* Override any gcc2 internal prototype to avoid an error.  */
7928 /* We use char because int might match the return type of a gcc2
7929     builtin and then its argument prototype would still apply.  */
7930 char sem_init();
7931
7932 int main() {
7933 sem_init()
7934 ; return 0; }
7935 EOF
7936 if { (eval echo configure:7937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7937   rm -rf conftest*
7938   eval "ac_cv_lib_$ac_lib_var=yes"
7939 else
7940   echo "configure: failed program was:" >&5
7941   cat conftest.$ac_ext >&5
7942   rm -rf conftest*
7943   eval "ac_cv_lib_$ac_lib_var=no"
7944 fi
7945 rm -f conftest*
7946 LIBS="$ac_save_LIBS"
7947
7948 fi
7949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7950   echo "$ac_t""yes" 1>&6
7951     ac_tr_lib=HAVE_LIB`echo posix4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7952     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7953   cat >> confdefs.h <<EOF
7954 #define $ac_tr_lib 1
7955 EOF
7956
7957   LIBS="-lposix4 $LIBS"
7958
7959 else
7960   echo "$ac_t""no" 1>&6
7961 fi
7962
7963
7964   if test "X$ac_cv_lib_posix4_sem_init" = "X"; then
7965     if test "$WITH_THREAD_POOL" = "yes"; then
7966       echo "configure: warning: You do not have posix semaphores.  Disabling thread pools" 1>&2
7967     fi
7968     WITH_THREAD_POOL=no
7969   fi
7970 fi
7971
7972
7973 gethostbyaddrrstyle=""
7974 echo $ac_n "checking gethostbyaddr_r() syntax""... $ac_c" 1>&6
7975 echo "configure:7976: checking gethostbyaddr_r() syntax" >&5
7976 cat > conftest.$ac_ext <<EOF
7977 #line 7978 "configure"
7978 #include "confdefs.h"
7979 #include <netdb.h>
7980 int main() {
7981  gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL)  
7982 ; return 0; }
7983 EOF
7984 if { (eval echo configure:7985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7985   rm -rf conftest*
7986   
7987         cat >> confdefs.h <<\EOF
7988 #define GETHOSTBYADDRRSTYLE SYSVSTYLE
7989 EOF
7990
7991         gethostbyaddrrstyle=SYSV
7992
7993 else
7994   echo "configure: failed program was:" >&5
7995   cat conftest.$ac_ext >&5
7996 fi
7997 rm -f conftest*
7998 cat > conftest.$ac_ext <<EOF
7999 #line 8000 "configure"
8000 #include "confdefs.h"
8001 #include <netdb.h>
8002 int main() {
8003  gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL, NULL) 
8004 ; return 0; }
8005 EOF
8006 if { (eval echo configure:8007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8007   rm -rf conftest*
8008   
8009         cat >> confdefs.h <<\EOF
8010 #define GETHOSTBYADDRRSTYLE GNUSTYLE
8011 EOF
8012
8013         gethostbyaddrrstyle=GNU
8014
8015 else
8016   echo "configure: failed program was:" >&5
8017   cat conftest.$ac_ext >&5
8018 fi
8019 rm -f conftest*
8020
8021 cat > conftest.$ac_ext <<EOF
8022 #line 8023 "configure"
8023 #include "confdefs.h"
8024 #include <netdb.h>
8025 int main() {
8026  gethostbyaddr(NULL, 0, 0)  
8027 ; return 0; }
8028 EOF
8029 if { (eval echo configure:8030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8030   rm -rf conftest*
8031   
8032         cat >> confdefs.h <<\EOF
8033 #define GETHOSTBYADDRRSTYLE BSDSTYLE
8034 EOF
8035
8036         gethostbyaddrrstyle=BSD
8037
8038 else
8039   echo "configure: failed program was:" >&5
8040   cat conftest.$ac_ext >&5
8041 fi
8042 rm -f conftest*
8043
8044 if test "x$gethostbyaddrrstyle" = "x"; then
8045         echo "$ac_t""none!  It must not exist, here." 1>&6
8046 else
8047         echo "$ac_t""${gethostbyaddrrstyle}-style" 1>&6
8048 fi
8049
8050
8051
8052 LIBTOOL="`pwd`/libtool"
8053
8054
8055
8056 top_builddir=`pwd`
8057
8058
8059 if test "x$INCLTDL" != "x";then
8060   INCLTDL='-I${top_builddir}/''libltdl'
8061 fi
8062
8063
8064 if test "$WITH_THREAD_POOL" = "yes"; then
8065         if test "$WITH_THREADS" != "yes"; then
8066     { echo "configure: error: You must have threads enabled for thread pools to work." 1>&2; exit 1; }
8067   fi
8068
8069         if test "X$PTHREADLIB" = "X"; then
8070     { echo "configure: error: You must have threading libraries for thread pools to work." 1>&2; exit 1; }
8071   fi
8072
8073 fi
8074
8075
8076 mysubdirs=
8077 if test "x$EXPERIMENTAL" = "xyes"; then
8078   for foo in `find src/modules -name configure -print`; do
8079     bar=`echo $foo | sed 's%/configure$%%g'`
8080     mysubdirs="$mysubdirs $bar"
8081   done
8082 else
8083             for foo in `find \`cat src/modules/stable | sed 's%rlm%src/modules/rlm%g'\` -name configure -print`; do
8084     bar=`echo $foo | sed 's%/configure$%%g'`
8085     mysubdirs="$mysubdirs $bar"
8086   done
8087 fi
8088
8089 MODULES=
8090 if test "x$EXPERIMENTAL" = "xyes"; then
8091   for foo in `ls src/modules | grep rlm_`; do
8092     MODULES="$MODULES $foo"
8093   done
8094 else
8095             for foo in `cat src/modules/stable`; do
8096     MODULES="$MODULES $foo"
8097    done
8098 fi
8099
8100 subdirs="libltdl $mysubdirs"
8101
8102
8103
8104
8105
8106
8107
8108 USE_SHARED_LIBS=$enable_shared
8109
8110 USE_STATIC_LIBS=$enable_static
8111
8112
8113
8114
8115
8116 export CFLAGS LIBS
8117
8118 trap '' 1 2 15
8119 cat > confcache <<\EOF
8120 # This file is a shell script that caches the results of configure
8121 # tests run on this system so they can be shared between configure
8122 # scripts and configure runs.  It is not useful on other systems.
8123 # If it contains results you don't want to keep, you may remove or edit it.
8124 #
8125 # By default, configure uses ./config.cache as the cache file,
8126 # creating it if it does not exist already.  You can give configure
8127 # the --cache-file=FILE option to use a different cache file; that is
8128 # what configure does when it calls configure scripts in
8129 # subdirectories, so they share the cache.
8130 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8131 # config.status only pays attention to the cache file if you give it the
8132 # --recheck option to rerun configure.
8133 #
8134 EOF
8135 # The following way of writing the cache mishandles newlines in values,
8136 # but we know of no workaround that is simple, portable, and efficient.
8137 # So, don't put newlines in cache variables' values.
8138 # Ultrix sh set writes to stderr and can't be redirected directly,
8139 # and sets the high bit in the cache file unless we assign to the vars.
8140 (set) 2>&1 |
8141   case `(ac_space=' '; set | grep ac_space) 2>&1` in
8142   *ac_space=\ *)
8143     # `set' does not quote correctly, so add quotes (double-quote substitution
8144     # turns \\\\ into \\, and sed turns \\ into \).
8145     sed -n \
8146       -e "s/'/'\\\\''/g" \
8147       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8148     ;;
8149   *)
8150     # `set' quotes correctly as required by POSIX, so do not add quotes.
8151     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8152     ;;
8153   esac >> confcache
8154 if cmp -s $cache_file confcache; then
8155   :
8156 else
8157   if test -w $cache_file; then
8158     echo "updating cache $cache_file"
8159     cat confcache > $cache_file
8160   else
8161     echo "not updating unwritable cache $cache_file"
8162   fi
8163 fi
8164 rm -f confcache
8165
8166 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8167
8168 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8169 # Let make expand exec_prefix.
8170 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8171
8172 # Any assignment to VPATH causes Sun make to only execute
8173 # the first set of double-colon rules, so remove it if not needed.
8174 # If there is a colon in the path, we need to keep it.
8175 if test "x$srcdir" = x.; then
8176   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
8177 fi
8178
8179 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8180
8181 DEFS=-DHAVE_CONFIG_H
8182
8183 # Without the "./", some shells look in PATH for config.status.
8184 : ${CONFIG_STATUS=./config.status}
8185
8186 echo creating $CONFIG_STATUS
8187 rm -f $CONFIG_STATUS
8188 cat > $CONFIG_STATUS <<EOF
8189 #! /bin/sh
8190 # Generated automatically by configure.
8191 # Run this file to recreate the current configuration.
8192 # This directory was configured as follows,
8193 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8194 #
8195 # $0 $ac_configure_args
8196 #
8197 # Compiler output produced by configure, useful for debugging
8198 # configure, is in ./config.log if it exists.
8199
8200 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8201 for ac_option
8202 do
8203   case "\$ac_option" in
8204   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8205     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8206     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8207   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8208     echo "$CONFIG_STATUS generated by autoconf version 2.13"
8209     exit 0 ;;
8210   -help | --help | --hel | --he | --h)
8211     echo "\$ac_cs_usage"; exit 0 ;;
8212   *) echo "\$ac_cs_usage"; exit 1 ;;
8213   esac
8214 done
8215
8216 ac_given_srcdir=$srcdir
8217
8218 trap 'rm -fr `echo "\
8219         ./Make.inc \
8220         ./src/include/build-radpaths-h \
8221         ./src/main/checkrad.pl \
8222         ./src/main/radlast \
8223         ./src/main/radtest \
8224         ./scripts/rc.radiusd \
8225         ./scripts/radwatch \
8226         ./scripts/check-radiusd-config \
8227         ./scripts/radiusd.cron.daily \
8228         ./scripts/radiusd.cron.monthly \
8229         ./scripts/cryptpasswd \
8230         ./raddb/radiusd.conf
8231  src/include/autoconf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8232 EOF
8233 cat >> $CONFIG_STATUS <<EOF
8234
8235 # Protect against being on the right side of a sed subst in config.status.
8236 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8237  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8238 $ac_vpsub
8239 $extrasub
8240 s%@SHELL@%$SHELL%g
8241 s%@CFLAGS@%$CFLAGS%g
8242 s%@CPPFLAGS@%$CPPFLAGS%g
8243 s%@CXXFLAGS@%$CXXFLAGS%g
8244 s%@FFLAGS@%$FFLAGS%g
8245 s%@DEFS@%$DEFS%g
8246 s%@LDFLAGS@%$LDFLAGS%g
8247 s%@LIBS@%$LIBS%g
8248 s%@exec_prefix@%$exec_prefix%g
8249 s%@prefix@%$prefix%g
8250 s%@program_transform_name@%$program_transform_name%g
8251 s%@bindir@%$bindir%g
8252 s%@sbindir@%$sbindir%g
8253 s%@libexecdir@%$libexecdir%g
8254 s%@datadir@%$datadir%g
8255 s%@sysconfdir@%$sysconfdir%g
8256 s%@sharedstatedir@%$sharedstatedir%g
8257 s%@localstatedir@%$localstatedir%g
8258 s%@libdir@%$libdir%g
8259 s%@includedir@%$includedir%g
8260 s%@oldincludedir@%$oldincludedir%g
8261 s%@infodir@%$infodir%g
8262 s%@mandir@%$mandir%g
8263 s%@CC@%$CC%g
8264 s%@CPP@%$CPP%g
8265 s%@RANLIB@%$RANLIB%g
8266 s%@GMAKE@%$GMAKE%g
8267 s%@MAKE@%$MAKE%g
8268 s%@host@%$host%g
8269 s%@host_alias@%$host_alias%g
8270 s%@host_cpu@%$host_cpu%g
8271 s%@host_vendor@%$host_vendor%g
8272 s%@host_os@%$host_os%g
8273 s%@build@%$build%g
8274 s%@build_alias@%$build_alias%g
8275 s%@build_cpu@%$build_cpu%g
8276 s%@build_vendor@%$build_vendor%g
8277 s%@build_os@%$build_os%g
8278 s%@LN_S@%$LN_S%g
8279 s%@OBJEXT@%$OBJEXT%g
8280 s%@EXEEXT@%$EXEEXT%g
8281 s%@ECHO@%$ECHO%g
8282 s%@STRIP@%$STRIP%g
8283 s%@LIBTOOL@%$LIBTOOL%g
8284 s%@logdir@%$logdir%g
8285 s%@radacctdir@%$radacctdir%g
8286 s%@raddbdir@%$raddbdir%g
8287 s%@subdirs@%$subdirs%g
8288 s%@PERL@%$PERL%g
8289 s%@SNMPGET@%$SNMPGET%g
8290 s%@SNMPWALK@%$SNMPWALK%g
8291 s%@RUSERS@%$RUSERS%g
8292 s%@ACLOCAL@%$ACLOCAL%g
8293 s%@AUTOCONF@%$AUTOCONF%g
8294 s%@AUTOHEADER@%$AUTOHEADER%g
8295 s%@LOCATE@%$LOCATE%g
8296 s%@DIRNAME@%$DIRNAME%g
8297 s%@GREP@%$GREP%g
8298 s%@REGEX@%$REGEX%g
8299 s%@REGEX_EXTENDED@%$REGEX_EXTENDED%g
8300 s%@LIBPREFIX@%$LIBPREFIX%g
8301 s%@CRYPTLIB@%$CRYPTLIB%g
8302 s%@SNMP_LIBS@%$SNMP_LIBS%g
8303 s%@SNMP_INCLUDE@%$SNMP_INCLUDE%g
8304 s%@LIBLTDL@%$LIBLTDL%g
8305 s%@INCLTDL@%$INCLTDL%g
8306 s%@top_builddir@%$top_builddir%g
8307 s%@MODULES@%$MODULES%g
8308 s%@INSTALLSTRIP@%$INSTALLSTRIP%g
8309 s%@USE_SHARED_LIBS@%$USE_SHARED_LIBS%g
8310 s%@USE_STATIC_LIBS@%$USE_STATIC_LIBS%g
8311 s%@STATIC_MODULES@%$STATIC_MODULES%g
8312 s%@RADIUSD_MAJOR_VERSION@%$RADIUSD_MAJOR_VERSION%g
8313 s%@RADIUSD_MINOR_VERSION@%$RADIUSD_MINOR_VERSION%g
8314 s%@RADIUSD_VERSION@%$RADIUSD_VERSION%g
8315
8316 CEOF
8317 EOF
8318
8319 cat >> $CONFIG_STATUS <<\EOF
8320
8321 # Split the substitutions into bite-sized pieces for seds with
8322 # small command number limits, like on Digital OSF/1 and HP-UX.
8323 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8324 ac_file=1 # Number of current file.
8325 ac_beg=1 # First line for current file.
8326 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8327 ac_more_lines=:
8328 ac_sed_cmds=""
8329 while $ac_more_lines; do
8330   if test $ac_beg -gt 1; then
8331     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8332   else
8333     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8334   fi
8335   if test ! -s conftest.s$ac_file; then
8336     ac_more_lines=false
8337     rm -f conftest.s$ac_file
8338   else
8339     if test -z "$ac_sed_cmds"; then
8340       ac_sed_cmds="sed -f conftest.s$ac_file"
8341     else
8342       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8343     fi
8344     ac_file=`expr $ac_file + 1`
8345     ac_beg=$ac_end
8346     ac_end=`expr $ac_end + $ac_max_sed_cmds`
8347   fi
8348 done
8349 if test -z "$ac_sed_cmds"; then
8350   ac_sed_cmds=cat
8351 fi
8352 EOF
8353
8354 cat >> $CONFIG_STATUS <<EOF
8355
8356 CONFIG_FILES=\${CONFIG_FILES-"\
8357         ./Make.inc \
8358         ./src/include/build-radpaths-h \
8359         ./src/main/checkrad.pl \
8360         ./src/main/radlast \
8361         ./src/main/radtest \
8362         ./scripts/rc.radiusd \
8363         ./scripts/radwatch \
8364         ./scripts/check-radiusd-config \
8365         ./scripts/radiusd.cron.daily \
8366         ./scripts/radiusd.cron.monthly \
8367         ./scripts/cryptpasswd \
8368         ./raddb/radiusd.conf
8369 "}
8370 EOF
8371 cat >> $CONFIG_STATUS <<\EOF
8372 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8373   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8374   case "$ac_file" in
8375   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8376        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8377   *) ac_file_in="${ac_file}.in" ;;
8378   esac
8379
8380   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8381
8382   # Remove last slash and all that follows it.  Not all systems have dirname.
8383   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8384   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8385     # The file is in a subdirectory.
8386     test ! -d "$ac_dir" && mkdir "$ac_dir"
8387     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8388     # A "../" for each directory in $ac_dir_suffix.
8389     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8390   else
8391     ac_dir_suffix= ac_dots=
8392   fi
8393
8394   case "$ac_given_srcdir" in
8395   .)  srcdir=.
8396       if test -z "$ac_dots"; then top_srcdir=.
8397       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8398   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8399   *) # Relative path.
8400     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8401     top_srcdir="$ac_dots$ac_given_srcdir" ;;
8402   esac
8403
8404
8405   echo creating "$ac_file"
8406   rm -f "$ac_file"
8407   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8408   case "$ac_file" in
8409   *Makefile*) ac_comsub="1i\\
8410 # $configure_input" ;;
8411   *) ac_comsub= ;;
8412   esac
8413
8414   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8415   sed -e "$ac_comsub
8416 s%@configure_input@%$configure_input%g
8417 s%@srcdir@%$srcdir%g
8418 s%@top_srcdir@%$top_srcdir%g
8419 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8420 fi; done
8421 rm -f conftest.s*
8422
8423 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8424 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8425 #
8426 # ac_d sets the value in "#define NAME VALUE" lines.
8427 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
8428 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
8429 ac_dC='\3'
8430 ac_dD='%g'
8431 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8432 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8433 ac_uB='\([      ]\)%\1#\2define\3'
8434 ac_uC=' '
8435 ac_uD='\4%g'
8436 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8437 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8438 ac_eB='$%\1#\2define\3'
8439 ac_eC=' '
8440 ac_eD='%g'
8441
8442 if test "${CONFIG_HEADERS+set}" != set; then
8443 EOF
8444 cat >> $CONFIG_STATUS <<EOF
8445   CONFIG_HEADERS="src/include/autoconf.h"
8446 EOF
8447 cat >> $CONFIG_STATUS <<\EOF
8448 fi
8449 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8450   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8451   case "$ac_file" in
8452   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8453        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8454   *) ac_file_in="${ac_file}.in" ;;
8455   esac
8456
8457   echo creating $ac_file
8458
8459   rm -f conftest.frag conftest.in conftest.out
8460   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8461   cat $ac_file_inputs > conftest.in
8462
8463 EOF
8464
8465 # Transform confdefs.h into a sed script conftest.vals that substitutes
8466 # the proper values into config.h.in to produce config.h.  And first:
8467 # Protect against being on the right side of a sed subst in config.status.
8468 # Protect against being in an unquoted here document in config.status.
8469 rm -f conftest.vals
8470 cat > conftest.hdr <<\EOF
8471 s/[\\&%]/\\&/g
8472 s%[\\$`]%\\&%g
8473 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8474 s%ac_d%ac_u%gp
8475 s%ac_u%ac_e%gp
8476 EOF
8477 sed -n -f conftest.hdr confdefs.h > conftest.vals
8478 rm -f conftest.hdr
8479
8480 # This sed command replaces #undef with comments.  This is necessary, for
8481 # example, in the case of _POSIX_SOURCE, which is predefined and required
8482 # on some systems where configure will not decide to define it.
8483 cat >> conftest.vals <<\EOF
8484 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8485 EOF
8486
8487 # Break up conftest.vals because some shells have a limit on
8488 # the size of here documents, and old seds have small limits too.
8489
8490 rm -f conftest.tail
8491 while :
8492 do
8493   ac_lines=`grep -c . conftest.vals`
8494   # grep -c gives empty output for an empty file on some AIX systems.
8495   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8496   # Write a limited-size here document to conftest.frag.
8497   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8498   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8499   echo 'CEOF
8500   sed -f conftest.frag conftest.in > conftest.out
8501   rm -f conftest.in
8502   mv conftest.out conftest.in
8503 ' >> $CONFIG_STATUS
8504   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8505   rm -f conftest.vals
8506   mv conftest.tail conftest.vals
8507 done
8508 rm -f conftest.vals
8509
8510 cat >> $CONFIG_STATUS <<\EOF
8511   rm -f conftest.frag conftest.h
8512   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
8513   cat conftest.in >> conftest.h
8514   rm -f conftest.in
8515   if cmp -s $ac_file conftest.h 2>/dev/null; then
8516     echo "$ac_file is unchanged"
8517     rm -f conftest.h
8518   else
8519     # Remove last slash and all that follows it.  Not all systems have dirname.
8520       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8521       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8522       # The file is in a subdirectory.
8523       test ! -d "$ac_dir" && mkdir "$ac_dir"
8524     fi
8525     rm -f $ac_file
8526     mv conftest.h $ac_file
8527   fi
8528 fi; done
8529
8530 EOF
8531 cat >> $CONFIG_STATUS <<EOF
8532
8533 EOF
8534 cat >> $CONFIG_STATUS <<\EOF
8535
8536 exit 0
8537 EOF
8538 chmod +x $CONFIG_STATUS
8539 rm -fr confdefs* $ac_clean_files
8540 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8541
8542 if test "$no_recursion" != yes; then
8543
8544   # Remove --cache-file and --srcdir arguments so they do not pile up.
8545   ac_sub_configure_args=
8546   ac_prev=
8547   for ac_arg in $ac_configure_args; do
8548     if test -n "$ac_prev"; then
8549       ac_prev=
8550       continue
8551     fi
8552     case "$ac_arg" in
8553     -cache-file | --cache-file | --cache-fil | --cache-fi \
8554     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
8555       ac_prev=cache_file ;;
8556     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
8557     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
8558       ;;
8559     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
8560       ac_prev=srcdir ;;
8561     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
8562       ;;
8563     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
8564     esac
8565   done
8566
8567   for ac_config_dir in libltdl $mysubdirs; do
8568
8569     # Do not complain, so a configure script can configure whichever
8570     # parts of a large source tree are present.
8571     if test ! -d $srcdir/$ac_config_dir; then
8572       continue
8573     fi
8574
8575     echo configuring in $ac_config_dir
8576
8577     case "$srcdir" in
8578     .) ;;
8579     *)
8580       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
8581       else
8582         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
8583       fi
8584       ;;
8585     esac
8586
8587     ac_popdir=`pwd`
8588     cd $ac_config_dir
8589
8590       # A "../" for each directory in /$ac_config_dir.
8591       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
8592
8593     case "$srcdir" in
8594     .) # No --srcdir option.  We are building in place.
8595       ac_sub_srcdir=$srcdir ;;
8596     /*) # Absolute path.
8597       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
8598     *) # Relative path.
8599       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
8600     esac
8601
8602     # Check for guested configure; otherwise get Cygnus style configure.
8603     if test -f $ac_sub_srcdir/configure; then
8604       ac_sub_configure=$ac_sub_srcdir/configure
8605     elif test -f $ac_sub_srcdir/configure.in; then
8606       ac_sub_configure=$ac_configure
8607     else
8608       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
8609       ac_sub_configure=
8610     fi
8611
8612     # The recursion is here.
8613     if test -n "$ac_sub_configure"; then
8614
8615       # Make the cache file name correct relative to the subdirectory.
8616       case "$cache_file" in
8617       /*) ac_sub_cache_file=$cache_file ;;
8618       *) # Relative path.
8619         ac_sub_cache_file="$ac_dots$cache_file" ;;
8620       esac
8621
8622       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
8623       # The eval makes quoting arguments work.
8624       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
8625       then :
8626       else
8627         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
8628       fi
8629     fi
8630
8631     cd $ac_popdir
8632   done
8633 fi
8634
8635
8636
8637
8638
8639
8640
8641 echo timestamp > src/include/stamp-h
8642 (cd ./src/include && /bin/sh ./build-radpaths-h)
8643 (cd ./src/main   && chmod +x checkrad.pl radlast radtest)
8644 (cd ./scripts    && chmod +x rc.radiusd radwatch check-radiusd-config radiusd.cron.daily radiusd.cron.monthly cryptpasswd)
8645
8646 cat >> src/include/autoconf.h <<EOF
8647
8648 #define HOSTINFO        "$host"
8649 #define RADIUSD_VERSION "$RADIUSD_VERSION"
8650 EOF
8651
8652
8653
8654
8655
8656 host=$host