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