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