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