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