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