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