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