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