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