915def0e64fd5a220aad6ad75b96534870d366ab
[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.198.2.5 
737 RADIUSD_MAJOR_VERSION=1
738 RADIUSD_MINOR_VERSION=0.0-pre3
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       *.$ac_ext | *.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 case "$host" in
6458 *-interix*)
6459         CFLAGS="$CFLAGS -D_ALL_SOURCE"
6460         ;;
6461 esac
6462
6463 ac_header_dirent=no
6464 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
6465 do
6466 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6467 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
6468 echo "configure:6469: checking for $ac_hdr that defines DIR" >&5
6469 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
6470   echo $ac_n "(cached) $ac_c" 1>&6
6471 else
6472   cat > conftest.$ac_ext <<EOF
6473 #line 6474 "configure"
6474 #include "confdefs.h"
6475 #include <sys/types.h>
6476 #include <$ac_hdr>
6477 int main() {
6478 DIR *dirp = 0;
6479 ; return 0; }
6480 EOF
6481 if { (eval echo configure:6482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6482   rm -rf conftest*
6483   eval "ac_cv_header_dirent_$ac_safe=yes"
6484 else
6485   echo "configure: failed program was:" >&5
6486   cat conftest.$ac_ext >&5
6487   rm -rf conftest*
6488   eval "ac_cv_header_dirent_$ac_safe=no"
6489 fi
6490 rm -f conftest*
6491 fi
6492 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
6493   echo "$ac_t""yes" 1>&6
6494     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6495   cat >> confdefs.h <<EOF
6496 #define $ac_tr_hdr 1
6497 EOF
6498  ac_header_dirent=$ac_hdr; break
6499 else
6500   echo "$ac_t""no" 1>&6
6501 fi
6502 done
6503 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6504 if test $ac_header_dirent = dirent.h; then
6505 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
6506 echo "configure:6507: checking for opendir in -ldir" >&5
6507 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
6508 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6509   echo $ac_n "(cached) $ac_c" 1>&6
6510 else
6511   ac_save_LIBS="$LIBS"
6512 LIBS="-ldir  $LIBS"
6513 cat > conftest.$ac_ext <<EOF
6514 #line 6515 "configure"
6515 #include "confdefs.h"
6516 /* Override any gcc2 internal prototype to avoid an error.  */
6517 /* We use char because int might match the return type of a gcc2
6518     builtin and then its argument prototype would still apply.  */
6519 char opendir();
6520
6521 int main() {
6522 opendir()
6523 ; return 0; }
6524 EOF
6525 if { (eval echo configure:6526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6526   rm -rf conftest*
6527   eval "ac_cv_lib_$ac_lib_var=yes"
6528 else
6529   echo "configure: failed program was:" >&5
6530   cat conftest.$ac_ext >&5
6531   rm -rf conftest*
6532   eval "ac_cv_lib_$ac_lib_var=no"
6533 fi
6534 rm -f conftest*
6535 LIBS="$ac_save_LIBS"
6536
6537 fi
6538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6539   echo "$ac_t""yes" 1>&6
6540   LIBS="$LIBS -ldir"
6541 else
6542   echo "$ac_t""no" 1>&6
6543 fi
6544
6545 else
6546 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
6547 echo "configure:6548: checking for opendir in -lx" >&5
6548 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
6549 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6550   echo $ac_n "(cached) $ac_c" 1>&6
6551 else
6552   ac_save_LIBS="$LIBS"
6553 LIBS="-lx  $LIBS"
6554 cat > conftest.$ac_ext <<EOF
6555 #line 6556 "configure"
6556 #include "confdefs.h"
6557 /* Override any gcc2 internal prototype to avoid an error.  */
6558 /* We use char because int might match the return type of a gcc2
6559     builtin and then its argument prototype would still apply.  */
6560 char opendir();
6561
6562 int main() {
6563 opendir()
6564 ; return 0; }
6565 EOF
6566 if { (eval echo configure:6567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6567   rm -rf conftest*
6568   eval "ac_cv_lib_$ac_lib_var=yes"
6569 else
6570   echo "configure: failed program was:" >&5
6571   cat conftest.$ac_ext >&5
6572   rm -rf conftest*
6573   eval "ac_cv_lib_$ac_lib_var=no"
6574 fi
6575 rm -f conftest*
6576 LIBS="$ac_save_LIBS"
6577
6578 fi
6579 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6580   echo "$ac_t""yes" 1>&6
6581   LIBS="$LIBS -lx"
6582 else
6583   echo "$ac_t""no" 1>&6
6584 fi
6585
6586 fi
6587
6588 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
6589 echo "configure:6590: checking for ANSI C header files" >&5
6590 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
6591   echo $ac_n "(cached) $ac_c" 1>&6
6592 else
6593   cat > conftest.$ac_ext <<EOF
6594 #line 6595 "configure"
6595 #include "confdefs.h"
6596 #include <stdlib.h>
6597 #include <stdarg.h>
6598 #include <string.h>
6599 #include <float.h>
6600 EOF
6601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6602 { (eval echo configure:6603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6604 if test -z "$ac_err"; then
6605   rm -rf conftest*
6606   ac_cv_header_stdc=yes
6607 else
6608   echo "$ac_err" >&5
6609   echo "configure: failed program was:" >&5
6610   cat conftest.$ac_ext >&5
6611   rm -rf conftest*
6612   ac_cv_header_stdc=no
6613 fi
6614 rm -f conftest*
6615
6616 if test $ac_cv_header_stdc = yes; then
6617   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6618 cat > conftest.$ac_ext <<EOF
6619 #line 6620 "configure"
6620 #include "confdefs.h"
6621 #include <string.h>
6622 EOF
6623 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6624   egrep "memchr" >/dev/null 2>&1; then
6625   :
6626 else
6627   rm -rf conftest*
6628   ac_cv_header_stdc=no
6629 fi
6630 rm -f conftest*
6631
6632 fi
6633
6634 if test $ac_cv_header_stdc = yes; then
6635   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6636 cat > conftest.$ac_ext <<EOF
6637 #line 6638 "configure"
6638 #include "confdefs.h"
6639 #include <stdlib.h>
6640 EOF
6641 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6642   egrep "free" >/dev/null 2>&1; then
6643   :
6644 else
6645   rm -rf conftest*
6646   ac_cv_header_stdc=no
6647 fi
6648 rm -f conftest*
6649
6650 fi
6651
6652 if test $ac_cv_header_stdc = yes; then
6653   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6654 if test "$cross_compiling" = yes; then
6655   :
6656 else
6657   cat > conftest.$ac_ext <<EOF
6658 #line 6659 "configure"
6659 #include "confdefs.h"
6660 #include <ctype.h>
6661 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6662 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6663 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6664 int main () { int i; for (i = 0; i < 256; i++)
6665 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
6666 exit (0); }
6667
6668 EOF
6669 if { (eval echo configure:6670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6670 then
6671   :
6672 else
6673   echo "configure: failed program was:" >&5
6674   cat conftest.$ac_ext >&5
6675   rm -fr conftest*
6676   ac_cv_header_stdc=no
6677 fi
6678 rm -fr conftest*
6679 fi
6680
6681 fi
6682 fi
6683
6684 echo "$ac_t""$ac_cv_header_stdc" 1>&6
6685 if test $ac_cv_header_stdc = yes; then
6686   cat >> confdefs.h <<\EOF
6687 #define STDC_HEADERS 1
6688 EOF
6689
6690 fi
6691
6692 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
6693 echo "configure:6694: checking whether time.h and sys/time.h may both be included" >&5
6694 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
6695   echo $ac_n "(cached) $ac_c" 1>&6
6696 else
6697   cat > conftest.$ac_ext <<EOF
6698 #line 6699 "configure"
6699 #include "confdefs.h"
6700 #include <sys/types.h>
6701 #include <sys/time.h>
6702 #include <time.h>
6703 int main() {
6704 struct tm *tp;
6705 ; return 0; }
6706 EOF
6707 if { (eval echo configure:6708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6708   rm -rf conftest*
6709   ac_cv_header_time=yes
6710 else
6711   echo "configure: failed program was:" >&5
6712   cat conftest.$ac_ext >&5
6713   rm -rf conftest*
6714   ac_cv_header_time=no
6715 fi
6716 rm -f conftest*
6717 fi
6718
6719 echo "$ac_t""$ac_cv_header_time" 1>&6
6720 if test $ac_cv_header_time = yes; then
6721   cat >> confdefs.h <<\EOF
6722 #define TIME_WITH_SYS_TIME 1
6723 EOF
6724
6725 fi
6726
6727 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
6728 echo "configure:6729: checking for sys/wait.h that is POSIX.1 compatible" >&5
6729 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
6730   echo $ac_n "(cached) $ac_c" 1>&6
6731 else
6732   cat > conftest.$ac_ext <<EOF
6733 #line 6734 "configure"
6734 #include "confdefs.h"
6735 #include <sys/types.h>
6736 #include <sys/wait.h>
6737 #ifndef WEXITSTATUS
6738 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
6739 #endif
6740 #ifndef WIFEXITED
6741 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6742 #endif
6743 int main() {
6744 int s;
6745 wait (&s);
6746 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6747 ; return 0; }
6748 EOF
6749 if { (eval echo configure:6750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6750   rm -rf conftest*
6751   ac_cv_header_sys_wait_h=yes
6752 else
6753   echo "configure: failed program was:" >&5
6754   cat conftest.$ac_ext >&5
6755   rm -rf conftest*
6756   ac_cv_header_sys_wait_h=no
6757 fi
6758 rm -f conftest*
6759 fi
6760
6761 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
6762 if test $ac_cv_header_sys_wait_h = yes; then
6763   cat >> confdefs.h <<\EOF
6764 #define HAVE_SYS_WAIT_H 1
6765 EOF
6766
6767 fi
6768
6769
6770 for ac_hdr in \
6771         unistd.h \
6772         crypt.h \
6773         errno.h \
6774         resource.h \
6775         getopt.h \
6776         malloc.h \
6777         utmp.h \
6778         utmpx.h \
6779         signal.h \
6780         sys/select.h \
6781         syslog.h \
6782         inttypes.h \
6783         stdint.h \
6784         stdio.h \
6785         netdb.h \
6786         semaphore.h \
6787         arpa/inet.h \
6788         netinet/in.h \
6789         sys/types.h \
6790         sys/socket.h \
6791         sys/time.h \
6792         sys/wait.h \
6793         sys/security.h \
6794         fcntl.h \
6795         sys/fcntl.h \
6796         prot.h \
6797         sia.h \
6798         siad.h
6799
6800 do
6801 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6802 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6803 echo "configure:6804: checking for $ac_hdr" >&5
6804 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6805   echo $ac_n "(cached) $ac_c" 1>&6
6806 else
6807   cat > conftest.$ac_ext <<EOF
6808 #line 6809 "configure"
6809 #include "confdefs.h"
6810 #include <$ac_hdr>
6811 EOF
6812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6813 { (eval echo configure:6814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6815 if test -z "$ac_err"; then
6816   rm -rf conftest*
6817   eval "ac_cv_header_$ac_safe=yes"
6818 else
6819   echo "$ac_err" >&5
6820   echo "configure: failed program was:" >&5
6821   cat conftest.$ac_ext >&5
6822   rm -rf conftest*
6823   eval "ac_cv_header_$ac_safe=no"
6824 fi
6825 rm -f conftest*
6826 fi
6827 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6828   echo "$ac_t""yes" 1>&6
6829     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6830   cat >> confdefs.h <<EOF
6831 #define $ac_tr_hdr 1
6832 EOF
6833  
6834 else
6835   echo "$ac_t""no" 1>&6
6836 fi
6837 done
6838
6839
6840 REGEX=no
6841 ac_safe=`echo "regex.h" | sed 'y%./+-%__p_%'`
6842 echo $ac_n "checking for regex.h""... $ac_c" 1>&6
6843 echo "configure:6844: checking for regex.h" >&5
6844 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6845   echo $ac_n "(cached) $ac_c" 1>&6
6846 else
6847   cat > conftest.$ac_ext <<EOF
6848 #line 6849 "configure"
6849 #include "confdefs.h"
6850 #include <regex.h>
6851 EOF
6852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6853 { (eval echo configure:6854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6855 if test -z "$ac_err"; then
6856   rm -rf conftest*
6857   eval "ac_cv_header_$ac_safe=yes"
6858 else
6859   echo "$ac_err" >&5
6860   echo "configure: failed program was:" >&5
6861   cat conftest.$ac_ext >&5
6862   rm -rf conftest*
6863   eval "ac_cv_header_$ac_safe=no"
6864 fi
6865 rm -f conftest*
6866 fi
6867 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6868   echo "$ac_t""yes" 1>&6
6869   cat >> confdefs.h <<\EOF
6870 #define HAVE_REGEX_H 1
6871 EOF
6872
6873 else
6874   echo "$ac_t""no" 1>&6
6875 fi
6876
6877 if test "x$ac_cv_header_regex_h" = "xyes"; then
6878   REGEX_EXTENDED=no
6879   REGEX=yes
6880   cat > conftest.$ac_ext <<EOF
6881 #line 6882 "configure"
6882 #include "confdefs.h"
6883 #include <regex.h>
6884      #ifdef REG_EXTENDED
6885        yes
6886      #endif
6887      
6888 EOF
6889 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6890   egrep "yes" >/dev/null 2>&1; then
6891   rm -rf conftest*
6892   cat >> confdefs.h <<\EOF
6893 #define HAVE_REG_EXTENDED 1
6894 EOF
6895  REGEX_EXTENDED=yes
6896 fi
6897 rm -f conftest*
6898
6899 fi
6900
6901
6902
6903 if test "x$ac_cv_header_sys_security_h" = "xyes" && test "x$ac_cv_header_prot_h" = "xyes"
6904 then
6905   cat >> confdefs.h <<\EOF
6906 #define OSFC2 1
6907 EOF
6908
6909 fi
6910
6911 if test "x$ac_cv_header_sia_h" = "xyes" && test "x$ac_cv_header_siad_h" = "xyes"
6912 then
6913   cat >> confdefs.h <<\EOF
6914 #define OSFSIA 1
6915 EOF
6916
6917 fi
6918
6919 smart_try_dir="$OPENSSL_INCLUDE"
6920 CFLAGS="$CFLAGS -DOPENSSL_NO_KRB5"
6921
6922
6923 ac_safe=`echo "openssl/ssl.h" | sed 'y%./+-%__pm%'`
6924 echo $ac_n "checking for openssl/ssl.h""... $ac_c" 1>&6
6925 echo "configure:6926: checking for openssl/ssl.h" >&5
6926
6927 smart_include=
6928 smart_include_dir=
6929
6930   old_CFLAGS="$CFLAGS"
6931   cat > conftest.$ac_ext <<EOF
6932 #line 6933 "configure"
6933 #include "confdefs.h"
6934
6935                   #include <openssl/ssl.h>
6936 int main() {
6937  int a = 1;
6938 ; return 0; }
6939 EOF
6940 if { (eval echo configure:6941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6941   rm -rf conftest*
6942   smart_include=" "
6943 else
6944   echo "configure: failed program was:" >&5
6945   cat conftest.$ac_ext >&5
6946   rm -rf conftest*
6947   smart_include=
6948 fi
6949 rm -f conftest*
6950
6951   if test "x$smart_include" = "x"; then
6952     
6953
6954 if test "x$LOCATE" != "x"; then
6955         DIRS=
6956   file=openssl/ssl.h
6957
6958   for x in `${LOCATE} $file 2>/dev/null`; do
6959                                         base=`echo $x | sed "s%/${file}%%"`
6960     if test "x$x" = "x$base"; then
6961       continue;
6962     fi
6963
6964     dir=`${DIRNAME} $x 2>/dev/null`
6965                 exclude=`echo ${dir} | ${GREP} /home`
6966     if test "x$exclude" != "x"; then
6967       continue
6968     fi
6969
6970                     already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
6971     if test "x$already" = "x"; then
6972       DIRS="$DIRS $dir"
6973     fi
6974   done
6975 fi
6976
6977 eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
6978
6979
6980     for try in $smart_try_dir $smart_include_dir /usr/local/include/ /opt/include; do
6981       CFLAGS="$old_CFLAGS -I$try"
6982
6983       cat > conftest.$ac_ext <<EOF
6984 #line 6985 "configure"
6985 #include "confdefs.h"
6986
6987                        #include <openssl/ssl.h>
6988 int main() {
6989  int a = 1;
6990 ; return 0; }
6991 EOF
6992 if { (eval echo configure:6993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6993   rm -rf conftest*
6994   smart_include="-I$try"
6995 else
6996   echo "configure: failed program was:" >&5
6997   cat conftest.$ac_ext >&5
6998   rm -rf conftest*
6999   smart_include=
7000 fi
7001 rm -f conftest*
7002
7003       if test "x$smart_include" != "x"; then
7004         break;
7005       fi
7006     done
7007     CFLAGS="$old_CFLAGS"
7008   fi
7009
7010         if test "x$smart_include" != "x"; then
7011     echo "$ac_t""yes" 1>&6
7012     eval "ac_cv_header_$ac_safe=yes"
7013     CFLAGS="$old_CFLAGS $smart_include"
7014     SMART_CFLAGS="$SMART_CFLAGS $smart_include"
7015   else
7016     echo "$ac_t""no" 1>&6 
7017 fi
7018
7019 if test "x$ac_cv_header_openssl_ssl_h" = "xyes"; then
7020   cat >> confdefs.h <<\EOF
7021 #define HAVE_OPENSSL_SSL_H 1
7022 EOF
7023
7024   old_CPPFLAGS="$CPPFLAGS"
7025   if test "x$OPENSSL_INCLUDE" != "x"; then
7026       CPPFLAGS="-I$OPENSSL_INCLUDE $CPPFLAGS"
7027   fi
7028   for ac_hdr in \
7029           openssl/err.h \
7030           openssl/crypto.h \
7031           openssl/rand.h \
7032           openssl/engine.h
7033   
7034 do
7035 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7036 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7037 echo "configure:7038: checking for $ac_hdr" >&5
7038 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7039   echo $ac_n "(cached) $ac_c" 1>&6
7040 else
7041   cat > conftest.$ac_ext <<EOF
7042 #line 7043 "configure"
7043 #include "confdefs.h"
7044 #include <$ac_hdr>
7045 EOF
7046 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7047 { (eval echo configure:7048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7048 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7049 if test -z "$ac_err"; then
7050   rm -rf conftest*
7051   eval "ac_cv_header_$ac_safe=yes"
7052 else
7053   echo "$ac_err" >&5
7054   echo "configure: failed program was:" >&5
7055   cat conftest.$ac_ext >&5
7056   rm -rf conftest*
7057   eval "ac_cv_header_$ac_safe=no"
7058 fi
7059 rm -f conftest*
7060 fi
7061 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7062   echo "$ac_t""yes" 1>&6
7063     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7064   cat >> confdefs.h <<EOF
7065 #define $ac_tr_hdr 1
7066 EOF
7067  
7068 else
7069   echo "$ac_t""no" 1>&6
7070 fi
7071 done
7072
7073   CPPFLAGS="$old_CPPFLAGS"
7074
7075   echo $ac_n "checking for OpenSSL version >= 0.9.7""... $ac_c" 1>&6
7076 echo "configure:7077: checking for OpenSSL version >= 0.9.7" >&5
7077        old_CPPFLAGS=$CPPFLAGS
7078        if test "x$OPENSSL_INCLUDE" != "x"; then
7079            CPPFLAGS="-I$OPENSSL_INCLUDE"
7080            fi
7081        cat > conftest.$ac_ext <<EOF
7082 #line 7083 "configure"
7083 #include "confdefs.h"
7084 #include <openssl/crypto.h>
7085        #if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
7086         yes
7087        #endif
7088        
7089 EOF
7090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7091   egrep "yes" >/dev/null 2>&1; then
7092   rm -rf conftest*
7093   goodssl="yes"
7094 fi
7095 rm -f conftest*
7096
7097            if test "x$goodssl" != "xyes"; then
7098              echo "$ac_t""no" 1>&6
7099              OPENSSL_INCLUDE=
7100              OPENSSL_LIBS=
7101            else
7102              echo "$ac_t""yes" 1>&6
7103
7104              # Look for the OpenSSL libraries.
7105              smart_try_dir=$OPENSSL_LIBS
7106              
7107
7108 sm_lib_safe=`echo "crypto" | sed 'y%./+-%__p_%'`
7109 sm_func_safe=`echo "DH_new" | sed 'y%./+-%__p_%'`
7110 echo $ac_n "checking for DH_new in -lcrypto""... $ac_c" 1>&6
7111 echo "configure:7112: checking for DH_new in -lcrypto" >&5
7112
7113 smart_lib=
7114 smart_lib_dir=
7115
7116   old_LIBS="$LIBS"
7117   LIBS="$LIBS -lcrypto"
7118   cat > conftest.$ac_ext <<EOF
7119 #line 7120 "configure"
7120 #include "confdefs.h"
7121 extern char DH_new();
7122 int main() {
7123  DH_new()
7124 ; return 0; }
7125 EOF
7126 if { (eval echo configure:7127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7127   rm -rf conftest*
7128   smart_lib="-lcrypto"
7129 else
7130   echo "configure: failed program was:" >&5
7131   cat conftest.$ac_ext >&5
7132 fi
7133 rm -f conftest*
7134
7135   if test "x$smart_lib" = "x"; then
7136     
7137
7138 if test "x$LOCATE" != "x"; then
7139         DIRS=
7140   file=libcrypto${libltdl_cv_shlibext}
7141
7142   for x in `${LOCATE} $file 2>/dev/null`; do
7143                                         base=`echo $x | sed "s%/${file}%%"`
7144     if test "x$x" = "x$base"; then
7145       continue;
7146     fi
7147
7148     dir=`${DIRNAME} $x 2>/dev/null`
7149                 exclude=`echo ${dir} | ${GREP} /home`
7150     if test "x$exclude" != "x"; then
7151       continue
7152     fi
7153
7154                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
7155     if test "x$already" = "x"; then
7156       DIRS="$DIRS $dir"
7157     fi
7158   done
7159 fi
7160
7161 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
7162
7163     
7164
7165 if test "x$LOCATE" != "x"; then
7166         DIRS=
7167   file=libcrypto.a
7168
7169   for x in `${LOCATE} $file 2>/dev/null`; do
7170                                         base=`echo $x | sed "s%/${file}%%"`
7171     if test "x$x" = "x$base"; then
7172       continue;
7173     fi
7174
7175     dir=`${DIRNAME} $x 2>/dev/null`
7176                 exclude=`echo ${dir} | ${GREP} /home`
7177     if test "x$exclude" != "x"; then
7178       continue
7179     fi
7180
7181                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
7182     if test "x$already" = "x"; then
7183       DIRS="$DIRS $dir"
7184     fi
7185   done
7186 fi
7187
7188 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
7189
7190
7191     for try in $smart_try_dir $smart_lib_dir /usr/local/lib/ /opt/lib; do
7192       LIBS="$old_LIBS -L$try -lcrypto"
7193
7194       cat > conftest.$ac_ext <<EOF
7195 #line 7196 "configure"
7196 #include "confdefs.h"
7197 extern char DH_new();
7198 int main() {
7199  DH_new()
7200 ; return 0; }
7201 EOF
7202 if { (eval echo configure:7203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7203   rm -rf conftest*
7204   smart_lib="-L$try -lcrypto"
7205 else
7206   echo "configure: failed program was:" >&5
7207   cat conftest.$ac_ext >&5
7208 fi
7209 rm -f conftest*
7210       if test "x$smart_lib" != "x"; then
7211         break;
7212       fi
7213     done
7214     LIBS="$old_LIBS"
7215   fi
7216
7217         if test "x$smart_lib" != "x"; then
7218     echo "$ac_t""yes" 1>&6
7219     eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
7220     LIBS="$old_LIBS $smart_lib"
7221     SMART_LIBS="$SMART_LIBS $smart_lib"
7222   else
7223     echo "$ac_t""no" 1>&6 
7224 fi
7225
7226              if test "x$ac_cv_lib_crypto_DH_new" = "xyes"; then
7227                
7228
7229 sm_lib_safe=`echo "ssl" | sed 'y%./+-%__p_%'`
7230 sm_func_safe=`echo "SSL_new" | sed 'y%./+-%__p_%'`
7231 echo $ac_n "checking for SSL_new in -lssl""... $ac_c" 1>&6
7232 echo "configure:7233: checking for SSL_new in -lssl" >&5
7233
7234 smart_lib=
7235 smart_lib_dir=
7236
7237   old_LIBS="$LIBS"
7238   LIBS="$LIBS -lssl"
7239   cat > conftest.$ac_ext <<EOF
7240 #line 7241 "configure"
7241 #include "confdefs.h"
7242 extern char SSL_new();
7243 int main() {
7244  SSL_new()
7245 ; return 0; }
7246 EOF
7247 if { (eval echo configure:7248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7248   rm -rf conftest*
7249   smart_lib="-lssl"
7250 else
7251   echo "configure: failed program was:" >&5
7252   cat conftest.$ac_ext >&5
7253 fi
7254 rm -f conftest*
7255
7256   if test "x$smart_lib" = "x"; then
7257     
7258
7259 if test "x$LOCATE" != "x"; then
7260         DIRS=
7261   file=libssl${libltdl_cv_shlibext}
7262
7263   for x in `${LOCATE} $file 2>/dev/null`; do
7264                                         base=`echo $x | sed "s%/${file}%%"`
7265     if test "x$x" = "x$base"; then
7266       continue;
7267     fi
7268
7269     dir=`${DIRNAME} $x 2>/dev/null`
7270                 exclude=`echo ${dir} | ${GREP} /home`
7271     if test "x$exclude" != "x"; then
7272       continue
7273     fi
7274
7275                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
7276     if test "x$already" = "x"; then
7277       DIRS="$DIRS $dir"
7278     fi
7279   done
7280 fi
7281
7282 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
7283
7284     
7285
7286 if test "x$LOCATE" != "x"; then
7287         DIRS=
7288   file=libssl.a
7289
7290   for x in `${LOCATE} $file 2>/dev/null`; do
7291                                         base=`echo $x | sed "s%/${file}%%"`
7292     if test "x$x" = "x$base"; then
7293       continue;
7294     fi
7295
7296     dir=`${DIRNAME} $x 2>/dev/null`
7297                 exclude=`echo ${dir} | ${GREP} /home`
7298     if test "x$exclude" != "x"; then
7299       continue
7300     fi
7301
7302                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
7303     if test "x$already" = "x"; then
7304       DIRS="$DIRS $dir"
7305     fi
7306   done
7307 fi
7308
7309 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
7310
7311
7312     for try in $smart_try_dir $smart_lib_dir /usr/local/lib/ /opt/lib; do
7313       LIBS="$old_LIBS -L$try -lssl"
7314
7315       cat > conftest.$ac_ext <<EOF
7316 #line 7317 "configure"
7317 #include "confdefs.h"
7318 extern char SSL_new();
7319 int main() {
7320  SSL_new()
7321 ; return 0; }
7322 EOF
7323 if { (eval echo configure:7324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7324   rm -rf conftest*
7325   smart_lib="-L$try -lssl"
7326 else
7327   echo "configure: failed program was:" >&5
7328   cat conftest.$ac_ext >&5
7329 fi
7330 rm -f conftest*
7331       if test "x$smart_lib" != "x"; then
7332         break;
7333       fi
7334     done
7335     LIBS="$old_LIBS"
7336   fi
7337
7338         if test "x$smart_lib" != "x"; then
7339     echo "$ac_t""yes" 1>&6
7340     eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
7341     LIBS="$old_LIBS $smart_lib"
7342     SMART_LIBS="$SMART_LIBS $smart_lib"
7343   else
7344     echo "$ac_t""no" 1>&6 
7345 fi
7346
7347                if test "x$ac_cv_lib_ssl_SSL_new" != "xyes"; then
7348                  OPENSSL_INCLUDE=
7349                  OPENSSL_LIBS=
7350                fi
7351                export OPENSSL_INCLUDE OPENSSL_LIBS
7352              fi
7353            fi
7354        CPPFLAGS=$old_CPPFLAGS
7355 fi
7356
7357
7358 echo $ac_n "checking for off_t""... $ac_c" 1>&6
7359 echo "configure:7360: checking for off_t" >&5
7360 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
7361   echo $ac_n "(cached) $ac_c" 1>&6
7362 else
7363   cat > conftest.$ac_ext <<EOF
7364 #line 7365 "configure"
7365 #include "confdefs.h"
7366 #include <sys/types.h>
7367 #if STDC_HEADERS
7368 #include <stdlib.h>
7369 #include <stddef.h>
7370 #endif
7371 EOF
7372 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7373   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7374   rm -rf conftest*
7375   ac_cv_type_off_t=yes
7376 else
7377   rm -rf conftest*
7378   ac_cv_type_off_t=no
7379 fi
7380 rm -f conftest*
7381
7382 fi
7383 echo "$ac_t""$ac_cv_type_off_t" 1>&6
7384 if test $ac_cv_type_off_t = no; then
7385   cat >> confdefs.h <<\EOF
7386 #define off_t long
7387 EOF
7388
7389 fi
7390  
7391 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
7392 echo "configure:7393: checking for pid_t" >&5
7393 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
7394   echo $ac_n "(cached) $ac_c" 1>&6
7395 else
7396   cat > conftest.$ac_ext <<EOF
7397 #line 7398 "configure"
7398 #include "confdefs.h"
7399 #include <sys/types.h>
7400 #if STDC_HEADERS
7401 #include <stdlib.h>
7402 #include <stddef.h>
7403 #endif
7404 EOF
7405 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7406   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7407   rm -rf conftest*
7408   ac_cv_type_pid_t=yes
7409 else
7410   rm -rf conftest*
7411   ac_cv_type_pid_t=no
7412 fi
7413 rm -f conftest*
7414
7415 fi
7416 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
7417 if test $ac_cv_type_pid_t = no; then
7418   cat >> confdefs.h <<\EOF
7419 #define pid_t int
7420 EOF
7421
7422 fi
7423
7424 echo $ac_n "checking for size_t""... $ac_c" 1>&6
7425 echo "configure:7426: checking for size_t" >&5
7426 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
7427   echo $ac_n "(cached) $ac_c" 1>&6
7428 else
7429   cat > conftest.$ac_ext <<EOF
7430 #line 7431 "configure"
7431 #include "confdefs.h"
7432 #include <sys/types.h>
7433 #if STDC_HEADERS
7434 #include <stdlib.h>
7435 #include <stddef.h>
7436 #endif
7437 EOF
7438 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7439   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7440   rm -rf conftest*
7441   ac_cv_type_size_t=yes
7442 else
7443   rm -rf conftest*
7444   ac_cv_type_size_t=no
7445 fi
7446 rm -f conftest*
7447
7448 fi
7449 echo "$ac_t""$ac_cv_type_size_t" 1>&6
7450 if test $ac_cv_type_size_t = no; then
7451   cat >> confdefs.h <<\EOF
7452 #define size_t unsigned
7453 EOF
7454
7455 fi
7456
7457 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
7458 echo "configure:7459: checking for uid_t in sys/types.h" >&5
7459 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
7460   echo $ac_n "(cached) $ac_c" 1>&6
7461 else
7462   cat > conftest.$ac_ext <<EOF
7463 #line 7464 "configure"
7464 #include "confdefs.h"
7465 #include <sys/types.h>
7466 EOF
7467 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7468   egrep "uid_t" >/dev/null 2>&1; then
7469   rm -rf conftest*
7470   ac_cv_type_uid_t=yes
7471 else
7472   rm -rf conftest*
7473   ac_cv_type_uid_t=no
7474 fi
7475 rm -f conftest*
7476
7477 fi
7478
7479 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
7480 if test $ac_cv_type_uid_t = no; then
7481   cat >> confdefs.h <<\EOF
7482 #define uid_t int
7483 EOF
7484
7485   cat >> confdefs.h <<\EOF
7486 #define gid_t int
7487 EOF
7488
7489 fi
7490
7491
7492
7493   echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
7494 echo "configure:7495: checking for socklen_t" >&5
7495 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
7496   echo $ac_n "(cached) $ac_c" 1>&6
7497 else
7498    ac_cv_type_socklen_t=no
7499       cat > conftest.$ac_ext <<EOF
7500 #line 7501 "configure"
7501 #include "confdefs.h"
7502 #ifdef HAVE_SYS_TYPES_H
7503 #include <sys/types.h>
7504 #endif
7505 #ifdef HAVE_SYS_SOCKET_H
7506 #include <sys/socket.h>
7507 #endif
7508
7509 int main() {
7510 socklen_t foo
7511 ; return 0; }
7512 EOF
7513 if { (eval echo configure:7514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7514   rm -rf conftest*
7515   ac_cv_type_socklen_t=yes
7516 else
7517   echo "configure: failed program was:" >&5
7518   cat conftest.$ac_ext >&5
7519 fi
7520 rm -f conftest*
7521     
7522   
7523 fi
7524
7525 echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7526
7527   if test "$ac_cv_type_socklen_t" != "yes"; then
7528          cat >> confdefs.h <<\EOF
7529 #define socklen_t int
7530 EOF
7531
7532   fi
7533
7534
7535
7536   echo $ac_n "checking for uint8_t""... $ac_c" 1>&6
7537 echo "configure:7538: checking for uint8_t" >&5
7538 if eval "test \"`echo '$''{'ac_cv_type_uint8_t'+set}'`\" = set"; then
7539   echo $ac_n "(cached) $ac_c" 1>&6
7540 else
7541    ac_cv_type_uint8_t=no
7542       cat > conftest.$ac_ext <<EOF
7543 #line 7544 "configure"
7544 #include "confdefs.h"
7545 #ifdef HAVE_INTTYPES_H
7546 #include <inttypes.h>
7547 #endif
7548 #ifdef HAVE_STDINT_H
7549 #include <stdint.h>
7550 #endif
7551
7552 int main() {
7553 uint8_t foo
7554 ; return 0; }
7555 EOF
7556 if { (eval echo configure:7557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7557   rm -rf conftest*
7558   ac_cv_type_uint8_t=yes
7559 else
7560   echo "configure: failed program was:" >&5
7561   cat conftest.$ac_ext >&5
7562 fi
7563 rm -f conftest*
7564     
7565   
7566 fi
7567
7568 echo "$ac_t""$ac_cv_type_uint8_t" 1>&6
7569
7570   if test "$ac_cv_type_uint8_t" != "yes"; then
7571          cat >> confdefs.h <<\EOF
7572 #define uint8_t unsigned char
7573 EOF
7574
7575   fi
7576
7577
7578
7579   echo $ac_n "checking for uint16_t""... $ac_c" 1>&6
7580 echo "configure:7581: checking for uint16_t" >&5
7581 if eval "test \"`echo '$''{'ac_cv_type_uint16_t'+set}'`\" = set"; then
7582   echo $ac_n "(cached) $ac_c" 1>&6
7583 else
7584    ac_cv_type_uint16_t=no
7585       cat > conftest.$ac_ext <<EOF
7586 #line 7587 "configure"
7587 #include "confdefs.h"
7588 #ifdef HAVE_INTTYPES_H
7589 #include <inttypes.h>
7590 #endif
7591 #ifdef HAVE_STDINT_H
7592 #include <stdint.h>
7593 #endif
7594
7595 int main() {
7596 uint16_t foo
7597 ; return 0; }
7598 EOF
7599 if { (eval echo configure:7600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7600   rm -rf conftest*
7601   ac_cv_type_uint16_t=yes
7602 else
7603   echo "configure: failed program was:" >&5
7604   cat conftest.$ac_ext >&5
7605 fi
7606 rm -f conftest*
7607     
7608   
7609 fi
7610
7611 echo "$ac_t""$ac_cv_type_uint16_t" 1>&6
7612
7613   if test "$ac_cv_type_uint16_t" != "yes"; then
7614          cat >> confdefs.h <<\EOF
7615 #define uint16_t unsigned short
7616 EOF
7617
7618   fi
7619
7620
7621
7622   echo $ac_n "checking for uint32_t""... $ac_c" 1>&6
7623 echo "configure:7624: checking for uint32_t" >&5
7624 if eval "test \"`echo '$''{'ac_cv_type_uint32_t'+set}'`\" = set"; then
7625   echo $ac_n "(cached) $ac_c" 1>&6
7626 else
7627    ac_cv_type_uint32_t=no
7628       cat > conftest.$ac_ext <<EOF
7629 #line 7630 "configure"
7630 #include "confdefs.h"
7631 #ifdef HAVE_INTTYPES_H
7632 #include <inttypes.h>
7633 #endif
7634 #ifdef HAVE_STDINT_H
7635 #include <stdint.h>
7636 #endif
7637
7638 int main() {
7639 uint32_t foo
7640 ; return 0; }
7641 EOF
7642 if { (eval echo configure:7643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7643   rm -rf conftest*
7644   ac_cv_type_uint32_t=yes
7645 else
7646   echo "configure: failed program was:" >&5
7647   cat conftest.$ac_ext >&5
7648 fi
7649 rm -f conftest*
7650     
7651   
7652 fi
7653
7654 echo "$ac_t""$ac_cv_type_uint32_t" 1>&6
7655
7656   if test "$ac_cv_type_uint32_t" != "yes"; then
7657          cat >> confdefs.h <<\EOF
7658 #define uint32_t unsigned int
7659 EOF
7660
7661   fi
7662
7663
7664 for ac_func in \
7665         getopt_long \
7666         lockf \
7667         strsignal \
7668         sigaction \
7669         sigprocmask \
7670         pthread_sigmask \
7671         snprintf \
7672         vsnprintf \
7673         setsid \
7674         strncasecmp \
7675         strcasecmp \
7676         localtime_r \
7677         ctime_r \
7678         gmtime_r \
7679         strsep \
7680         inet_aton \
7681         inet_pton \
7682         inet_ntop \
7683         gethostname \
7684         setlinebuf \
7685         setvbuf \
7686         getusershell \
7687         initgroups
7688
7689 do
7690 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7691 echo "configure:7692: checking for $ac_func" >&5
7692 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7693   echo $ac_n "(cached) $ac_c" 1>&6
7694 else
7695   cat > conftest.$ac_ext <<EOF
7696 #line 7697 "configure"
7697 #include "confdefs.h"
7698 /* System header to define __stub macros and hopefully few prototypes,
7699     which can conflict with char $ac_func(); below.  */
7700 #include <assert.h>
7701 /* Override any gcc2 internal prototype to avoid an error.  */
7702 /* We use char because int might match the return type of a gcc2
7703     builtin and then its argument prototype would still apply.  */
7704 char $ac_func();
7705
7706 int main() {
7707
7708 /* The GNU C library defines this for functions which it implements
7709     to always fail with ENOSYS.  Some functions are actually named
7710     something starting with __ and the normal name is an alias.  */
7711 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7712 choke me
7713 #else
7714 $ac_func();
7715 #endif
7716
7717 ; return 0; }
7718 EOF
7719 if { (eval echo configure:7720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7720   rm -rf conftest*
7721   eval "ac_cv_func_$ac_func=yes"
7722 else
7723   echo "configure: failed program was:" >&5
7724   cat conftest.$ac_ext >&5
7725   rm -rf conftest*
7726   eval "ac_cv_func_$ac_func=no"
7727 fi
7728 rm -f conftest*
7729 fi
7730
7731 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7732   echo "$ac_t""yes" 1>&6
7733     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7734   cat >> confdefs.h <<EOF
7735 #define $ac_tr_func 1
7736 EOF
7737  
7738 else
7739   echo "$ac_t""no" 1>&6
7740 fi
7741 done
7742
7743 for ac_func in \
7744         crypt \
7745         strncasecmp \
7746         strcasecmp \
7747         inet_aton \
7748         gethostname \
7749         setlinebuf \
7750         getusershell \
7751         endusershell
7752
7753 do
7754 echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
7755 echo "configure:7756: checking whether $ac_func must be declared" >&5
7756 if eval "test \"`echo '$''{'radius_cv_decl_needed_$ac_func'+set}'`\" = set"; then
7757   echo $ac_n "(cached) $ac_c" 1>&6
7758 else
7759   cat > conftest.$ac_ext <<EOF
7760 #line 7761 "configure"
7761 #include "confdefs.h"
7762
7763 #include <stdio.h>
7764 #include <string.h>
7765 #ifdef HAVE_UNISTD_H
7766 #include <unistd.h>
7767 #endif
7768 #ifdef HAVE_CRYPT_H
7769 #include <crypt.h>
7770 #endif
7771 #ifdef HAVE_ERRNO_H
7772 #include <errno.h>
7773 #endif
7774 #ifdef HAVE_RESOURCE_H
7775 #include <resource.h>
7776 #endif
7777 #ifdef HAVE_GETOPT_H
7778 #include <getopt.h>
7779 #endif
7780 #ifdef HAVE_MALLOC_H
7781 #include <malloc.h>
7782 #endif
7783 #ifdef HAVE_UTMP_H
7784 #include <utmp.h>
7785 #endif
7786 #ifdef HAVE_UTMPX_H
7787 #include <utmpx.h>
7788 #endif
7789 #ifdef HAVE_SYS_SELECT_H
7790 #include <sys/select.h>
7791 #endif
7792 #ifdef HAVE_DLFCN_H
7793 #include <dlfcn.h>
7794 #endif
7795 #ifdef HAVE_REGEX_H
7796 #include <regex.h>
7797 #endif
7798 #ifdef HAVE_SYSLOG_H
7799 #include <syslog.h>
7800 #endif
7801 #ifdef HAVE_INTTYPES_H
7802 #include <inttypes.h>
7803 #endif
7804 #ifdef HAVE_STDINT_H
7805 #include <stdint.h>
7806 #endif
7807 #ifdef HAVE_ARPA_INET_H
7808 #include <arpa/inet.h>
7809 #endif
7810
7811 int main() {
7812 char *(*pfn) = (char *(*)) $ac_func
7813 ; return 0; }
7814 EOF
7815 if { (eval echo configure:7816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7816   rm -rf conftest*
7817   eval "radius_cv_decl_needed_$ac_func=no"
7818 else
7819   echo "configure: failed program was:" >&5
7820   cat conftest.$ac_ext >&5
7821   rm -rf conftest*
7822   eval "radius_cv_decl_needed_$ac_func=yes"
7823 fi
7824 rm -f conftest*
7825 fi
7826
7827 if eval "test \"`echo '$radius_cv_decl_needed_'$ac_func`\" = yes"; then
7828   echo "$ac_t""yes" 1>&6
7829   radius_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7830   cat >> confdefs.h <<EOF
7831 #define $radius_tr_decl 1
7832 EOF
7833
7834 else
7835   echo "$ac_t""no" 1>&6
7836 fi
7837
7838 done
7839
7840
7841 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
7842 echo "configure:7843: checking return type of signal handlers" >&5
7843 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
7844   echo $ac_n "(cached) $ac_c" 1>&6
7845 else
7846   cat > conftest.$ac_ext <<EOF
7847 #line 7848 "configure"
7848 #include "confdefs.h"
7849 #include <sys/types.h>
7850 #include <signal.h>
7851 #ifdef signal
7852 #undef signal
7853 #endif
7854 #ifdef __cplusplus
7855 extern "C" void (*signal (int, void (*)(int)))(int);
7856 #else
7857 void (*signal ()) ();
7858 #endif
7859
7860 int main() {
7861 int i;
7862 ; return 0; }
7863 EOF
7864 if { (eval echo configure:7865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7865   rm -rf conftest*
7866   ac_cv_type_signal=void
7867 else
7868   echo "configure: failed program was:" >&5
7869   cat conftest.$ac_ext >&5
7870   rm -rf conftest*
7871   ac_cv_type_signal=int
7872 fi
7873 rm -f conftest*
7874 fi
7875
7876 echo "$ac_t""$ac_cv_type_signal" 1>&6
7877 cat >> confdefs.h <<EOF
7878 #define RETSIGTYPE $ac_cv_type_signal
7879 EOF
7880
7881
7882
7883 if test "x$ac_cv_header_utmpx_h" = "xyes"
7884 then
7885  
7886   echo $ac_n "checking for ut_xtime in struct utmpx""... $ac_c" 1>&6
7887 echo "configure:7888: checking for ut_xtime in struct utmpx" >&5
7888
7889
7890   cat > conftest.$ac_ext <<EOF
7891 #line 7892 "configure"
7892 #include "confdefs.h"
7893
7894 #include <utmpx.h>
7895 #ifndef offsetof
7896 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
7897 #endif
7898
7899 int main() {
7900  int foo = offsetof(struct utmpx, ut_xtime) 
7901 ; return 0; }
7902 EOF
7903 if { (eval echo configure:7904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7904   rm -rf conftest*
7905   has_element=" "
7906 else
7907   echo "configure: failed program was:" >&5
7908   cat conftest.$ac_ext >&5
7909   rm -rf conftest*
7910   has_element=
7911 fi
7912 rm -f conftest*
7913
7914   ac_safe_type=`echo "struct utmpx" | sed 'y% %_%'`
7915   if test "x$has_element" != "x"; then
7916     echo "$ac_t""yes" 1>&6
7917     eval "ac_cv_type_${ac_safe_type}_has_ut_xtime=yes"
7918   else
7919     echo "$ac_t""no" 1>&6 
7920     eval "ac_cv_type_${ac_safe_type}_has_ut_xtime="
7921  fi
7922
7923  if test "x$ac_cv_type_struct_utmpx_has_ut_xtime" = "x"
7924  then
7925    cat >> confdefs.h <<\EOF
7926 #define ut_xtime ut_tv.tv_sec
7927 EOF
7928
7929  fi
7930 fi
7931
7932
7933   echo $ac_n "checking for ipi_addr in struct in_pktinfo""... $ac_c" 1>&6
7934 echo "configure:7935: checking for ipi_addr in struct in_pktinfo" >&5
7935
7936
7937   cat > conftest.$ac_ext <<EOF
7938 #line 7939 "configure"
7939 #include "confdefs.h"
7940
7941 #include <netinet/in.h>
7942 #ifndef offsetof
7943 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
7944 #endif
7945
7946 int main() {
7947  int foo = offsetof(struct in_pktinfo, ipi_addr) 
7948 ; return 0; }
7949 EOF
7950 if { (eval echo configure:7951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7951   rm -rf conftest*
7952   has_element=" "
7953 else
7954   echo "configure: failed program was:" >&5
7955   cat conftest.$ac_ext >&5
7956   rm -rf conftest*
7957   has_element=
7958 fi
7959 rm -f conftest*
7960
7961   ac_safe_type=`echo "struct in_pktinfo" | sed 'y% %_%'`
7962   if test "x$has_element" != "x"; then
7963     echo "$ac_t""yes" 1>&6
7964     eval "ac_cv_type_${ac_safe_type}_has_ipi_addr=yes"
7965   else
7966     echo "$ac_t""no" 1>&6 
7967     eval "ac_cv_type_${ac_safe_type}_has_ipi_addr="
7968  fi
7969
7970 if test "x$ac_cv_type_struct_in_pktinfo_has_ipi_addr" = "xyes"
7971 then
7972         cat >> confdefs.h <<\EOF
7973 #define HAVE_IP_PKTINFO 1
7974 EOF
7975
7976 fi
7977
7978
7979 echo $ac_n "checking for working const""... $ac_c" 1>&6
7980 echo "configure:7981: checking for working const" >&5
7981 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
7982   echo $ac_n "(cached) $ac_c" 1>&6
7983 else
7984   cat > conftest.$ac_ext <<EOF
7985 #line 7986 "configure"
7986 #include "confdefs.h"
7987
7988 int main() {
7989
7990 /* Ultrix mips cc rejects this.  */
7991 typedef int charset[2]; const charset x;
7992 /* SunOS 4.1.1 cc rejects this.  */
7993 char const *const *ccp;
7994 char **p;
7995 /* NEC SVR4.0.2 mips cc rejects this.  */
7996 struct point {int x, y;};
7997 static struct point const zero = {0,0};
7998 /* AIX XL C 1.02.0.0 rejects this.
7999    It does not let you subtract one const X* pointer from another in an arm
8000    of an if-expression whose if-part is not a constant expression */
8001 const char *g = "string";
8002 ccp = &g + (g ? g-g : 0);
8003 /* HPUX 7.0 cc rejects these. */
8004 ++ccp;
8005 p = (char**) ccp;
8006 ccp = (char const *const *) p;
8007 { /* SCO 3.2v4 cc rejects this.  */
8008   char *t;
8009   char const *s = 0 ? (char *) 0 : (char const *) 0;
8010
8011   *t++ = 0;
8012 }
8013 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
8014   int x[] = {25, 17};
8015   const int *foo = &x[0];
8016   ++foo;
8017 }
8018 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8019   typedef const int *iptr;
8020   iptr p = 0;
8021   ++p;
8022 }
8023 { /* AIX XL C 1.02.0.0 rejects this saying
8024      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8025   struct s { int j; const int *ap[3]; };
8026   struct s *b; b->j = 5;
8027 }
8028 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8029   const int foo = 10;
8030 }
8031
8032 ; return 0; }
8033 EOF
8034 if { (eval echo configure:8035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8035   rm -rf conftest*
8036   ac_cv_c_const=yes
8037 else
8038   echo "configure: failed program was:" >&5
8039   cat conftest.$ac_ext >&5
8040   rm -rf conftest*
8041   ac_cv_c_const=no
8042 fi
8043 rm -f conftest*
8044 fi
8045
8046 echo "$ac_t""$ac_cv_c_const" 1>&6
8047 if test $ac_cv_c_const = no; then
8048   cat >> confdefs.h <<\EOF
8049 #define const 
8050 EOF
8051
8052 fi
8053  
8054
8055 echo $ac_n "checking type of OS""... $ac_c" 1>&6
8056 echo "configure:8057: checking type of OS" >&5
8057 OS=`uname -s`
8058 echo "$ac_t""$OS" 1>&6
8059 if test "$OS" = "OS/2"; then
8060         LIBPREFIX=
8061 else
8062         LIBPREFIX=lib
8063 fi
8064
8065
8066 if test "x$GCC" = "xyes"; then
8067     CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
8068 fi
8069
8070 echo $ac_n "checking for developer gcc flags""... $ac_c" 1>&6
8071 echo "configure:8072: checking for developer gcc flags" >&5
8072 if test "x$developer" = "xyes" -a "x$GCC" = "xyes"; then
8073   devflags="-g -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -W -Wredundant-decls -Wundef"
8074   CFLAGS="$CFLAGS $devflags"
8075   INSTALLSTRIP=""
8076   echo "$ac_t""yes.  Using $devflags" 1>&6
8077 else
8078   devflags=""
8079   CFLAGS="$CFLAGS -DNDEBUG"
8080   INSTALLSTRIP="-s"
8081   echo "$ac_t""no." 1>&6
8082 fi
8083
8084
8085 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8086 echo "configure:8087: checking for crypt in -lcrypt" >&5
8087 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8088 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8089   echo $ac_n "(cached) $ac_c" 1>&6
8090 else
8091   ac_save_LIBS="$LIBS"
8092 LIBS="-lcrypt  $LIBS"
8093 cat > conftest.$ac_ext <<EOF
8094 #line 8095 "configure"
8095 #include "confdefs.h"
8096 /* Override any gcc2 internal prototype to avoid an error.  */
8097 /* We use char because int might match the return type of a gcc2
8098     builtin and then its argument prototype would still apply.  */
8099 char crypt();
8100
8101 int main() {
8102 crypt()
8103 ; return 0; }
8104 EOF
8105 if { (eval echo configure:8106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8106   rm -rf conftest*
8107   eval "ac_cv_lib_$ac_lib_var=yes"
8108 else
8109   echo "configure: failed program was:" >&5
8110   cat conftest.$ac_ext >&5
8111   rm -rf conftest*
8112   eval "ac_cv_lib_$ac_lib_var=no"
8113 fi
8114 rm -f conftest*
8115 LIBS="$ac_save_LIBS"
8116
8117 fi
8118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8119   echo "$ac_t""yes" 1>&6
8120   CRYPTLIB="-lcrypt"
8121
8122 else
8123   echo "$ac_t""no" 1>&6
8124 fi
8125
8126 if test "$CRYPTLIB" != ""; then
8127   cat >> confdefs.h <<\EOF
8128 #define HAVE_CRYPT 1
8129 EOF
8130
8131 else
8132   echo $ac_n "checking for crypt""... $ac_c" 1>&6
8133 echo "configure:8134: checking for crypt" >&5
8134 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
8135   echo $ac_n "(cached) $ac_c" 1>&6
8136 else
8137   cat > conftest.$ac_ext <<EOF
8138 #line 8139 "configure"
8139 #include "confdefs.h"
8140 /* System header to define __stub macros and hopefully few prototypes,
8141     which can conflict with char crypt(); below.  */
8142 #include <assert.h>
8143 /* Override any gcc2 internal prototype to avoid an error.  */
8144 /* We use char because int might match the return type of a gcc2
8145     builtin and then its argument prototype would still apply.  */
8146 char crypt();
8147
8148 int main() {
8149
8150 /* The GNU C library defines this for functions which it implements
8151     to always fail with ENOSYS.  Some functions are actually named
8152     something starting with __ and the normal name is an alias.  */
8153 #if defined (__stub_crypt) || defined (__stub___crypt)
8154 choke me
8155 #else
8156 crypt();
8157 #endif
8158
8159 ; return 0; }
8160 EOF
8161 if { (eval echo configure:8162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8162   rm -rf conftest*
8163   eval "ac_cv_func_crypt=yes"
8164 else
8165   echo "configure: failed program was:" >&5
8166   cat conftest.$ac_ext >&5
8167   rm -rf conftest*
8168   eval "ac_cv_func_crypt=no"
8169 fi
8170 rm -f conftest*
8171 fi
8172
8173 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
8174   echo "$ac_t""yes" 1>&6
8175   cat >> confdefs.h <<\EOF
8176 #define HAVE_CRYPT 1
8177 EOF
8178
8179 else
8180   echo "$ac_t""no" 1>&6
8181 fi
8182
8183 fi
8184
8185 echo $ac_n "checking for setkey in -lcipher""... $ac_c" 1>&6
8186 echo "configure:8187: checking for setkey in -lcipher" >&5
8187 ac_lib_var=`echo cipher'_'setkey | sed 'y%./+-%__p_%'`
8188 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8189   echo $ac_n "(cached) $ac_c" 1>&6
8190 else
8191   ac_save_LIBS="$LIBS"
8192 LIBS="-lcipher  $LIBS"
8193 cat > conftest.$ac_ext <<EOF
8194 #line 8195 "configure"
8195 #include "confdefs.h"
8196 /* Override any gcc2 internal prototype to avoid an error.  */
8197 /* We use char because int might match the return type of a gcc2
8198     builtin and then its argument prototype would still apply.  */
8199 char setkey();
8200
8201 int main() {
8202 setkey()
8203 ; return 0; }
8204 EOF
8205 if { (eval echo configure:8206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8206   rm -rf conftest*
8207   eval "ac_cv_lib_$ac_lib_var=yes"
8208 else
8209   echo "configure: failed program was:" >&5
8210   cat conftest.$ac_ext >&5
8211   rm -rf conftest*
8212   eval "ac_cv_lib_$ac_lib_var=no"
8213 fi
8214 rm -f conftest*
8215 LIBS="$ac_save_LIBS"
8216
8217 fi
8218 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8219   echo "$ac_t""yes" 1>&6
8220   CRYPTLIB="${CRYPTLIB} -lcipher"
8221
8222 else
8223   echo "$ac_t""no" 1>&6
8224 fi
8225
8226
8227
8228 if test "x$WITH_SNMP" = "xyes"; then
8229   
8230         
8231         
8232
8233 echo $ac_n "checking for asn1.h,snmp.h,snmp_impl.h""... $ac_c" 1>&6
8234 echo "configure:8235: checking for asn1.h,snmp.h,snmp_impl.h" >&5
8235
8236 cat > conftest.$ac_ext <<EOF
8237 #line 8238 "configure"
8238 #include "confdefs.h"
8239
8240 #ifdef HAVE_SYS_TYPES_H
8241 #include <sys/types.h>
8242 #endif
8243 #ifdef HAVE_STDINT_H
8244 #include <stdint.h>
8245 #endif
8246 #ifdef HAVE_STDIO_H
8247 #include <stdio.h>
8248 #endif
8249 #ifdef HAVE_NETDB_H
8250 #include <netdb.h>
8251 #endif
8252 #ifdef HAVE_UNISTD_H
8253 #include <unistd.h>
8254 #endif
8255 #include <ucd-snmp/asn1.h>
8256 #include <ucd-snmp/snmp.h>
8257 #include <ucd-snmp/snmp_impl.h>
8258 int main() {
8259  int a = 1;
8260 ; return 0; }
8261 EOF
8262 if { (eval echo configure:8263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8263   rm -rf conftest*
8264   SNMP_INCLUDE="";ucdsnmp=yes
8265 else
8266   echo "configure: failed program was:" >&5
8267   cat conftest.$ac_ext >&5
8268   rm -rf conftest*
8269   ucdsnmp=
8270 fi
8271 rm -f conftest*
8272
8273 if test "x$ucdsnmp" = "x"; then
8274   old_CFLAGS="$CFLAGS"
8275   for try in /usr/include /usr/local/include $snmp_include_dir; do
8276     CFLAGS="$old_CFLAGS -I$try"
8277     cat > conftest.$ac_ext <<EOF
8278 #line 8279 "configure"
8279 #include "confdefs.h"
8280
8281 #ifdef HAVE_SYS_TYPES_H
8282 #include <sys/types.h>
8283 #endif
8284 #ifdef HAVE_STDINT_H
8285 #include <stdint.h>
8286 #endif
8287 #ifdef HAVE_STDIO_H
8288 #include <stdio.h>
8289 #endif
8290 #ifdef HAVE_NETDB_H
8291 #include <netdb.h>
8292 #endif
8293 #ifdef HAVE_UNISTD_H
8294 #include <unistd.h>
8295 #endif
8296 #include <ucd-snmp/asn1.h>
8297 #include <ucd-snmp/snmp.h>
8298 #include <ucd-snmp/snmp_impl.h>
8299 int main() {
8300  int a = 1;
8301 ; return 0; }
8302 EOF
8303 if { (eval echo configure:8304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8304   rm -rf conftest*
8305   SNMP_INCLUDE="-I$try";ucdsnmp=yes
8306 else
8307   echo "configure: failed program was:" >&5
8308   cat conftest.$ac_ext >&5
8309   rm -rf conftest*
8310   ucdsnmp=
8311 fi
8312 rm -f conftest*
8313     if test "x$ucdsnmp" != "x"; then
8314       break;
8315     fi
8316   done
8317   CFLAGS="$old_CFLAGS"
8318 fi
8319
8320 if test "x$ucdsnmp" = "x"; then
8321   old_CFLAGS="$CFLAGS"
8322   for try in /usr/include/ucd-snmp /usr/local/include/ucd-snmp $snmp_include_dir; do
8323     CFLAGS="$old_CFLAGS -I$try"
8324 cat > conftest.$ac_ext <<EOF
8325 #line 8326 "configure"
8326 #include "confdefs.h"
8327
8328 #ifdef HAVE_SYS_TYPES_H
8329 #include <sys/types.h>
8330 #endif
8331 #ifdef HAVE_STDINT_H
8332 #include <stdint.h>
8333 #endif
8334 #ifdef HAVE_STDIO_H
8335 #include <stdio.h>
8336 #endif
8337 #ifdef HAVE_NETDB_H
8338 #include <netdb.h>
8339 #endif
8340 #ifdef HAVE_UNISTD_H
8341 #include <unistd.h>
8342 #endif
8343 #include <asn1.h>
8344 #include <snmp.h>
8345 #include <snmp_impl.h>
8346 int main() {
8347  int a = 1;
8348 ; return 0; }
8349 EOF
8350 if { (eval echo configure:8351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8351   rm -rf conftest*
8352   SNMP_INCLUDE="";ucdsnmp=no
8353 else
8354   echo "configure: failed program was:" >&5
8355   cat conftest.$ac_ext >&5
8356   rm -rf conftest*
8357   ucdsnmp=
8358 fi
8359 rm -f conftest*
8360     if test "x$ucdsnmp" != "x"; then
8361       break;
8362     fi
8363   done
8364   CFLAGS="$old_CFLAGS"
8365 fi
8366
8367 if test "x$ucdsnmp" = "x"; then
8368   old_CFLAGS="$CFLAGS"
8369   for try in /usr/include/ucd-snmp /usr/local/include/ucd-snmp $snmp_include_dir; do
8370     CFLAGS="$old_CFLAGS -I$try"
8371     cat > conftest.$ac_ext <<EOF
8372 #line 8373 "configure"
8373 #include "confdefs.h"
8374
8375 #ifdef HAVE_SYS_TYPES_H
8376 #include <sys/types.h>
8377 #endif
8378 #ifdef HAVE_STDINT_H
8379 #include <stdint.h>
8380 #endif
8381 #ifdef HAVE_STDIO_H
8382 #include <stdio.h>
8383 #endif
8384 #ifdef HAVE_NETDB_H
8385 #include <netdb.h>
8386 #endif
8387 #ifdef HAVE_UNISTD_H
8388 #include <unistd.h>
8389 #endif
8390 #include <asn1.h>
8391 #include <snmp.h>
8392 #include <snmp_impl.h>
8393 int main() {
8394  int a = 1;
8395 ; return 0; }
8396 EOF
8397 if { (eval echo configure:8398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8398   rm -rf conftest*
8399   SNMP_INCLUDE="-I$try";ucdsnmp=no
8400 else
8401   echo "configure: failed program was:" >&5
8402   cat conftest.$ac_ext >&5
8403   rm -rf conftest*
8404   ucdsnmp=
8405 fi
8406 rm -f conftest*
8407     if test "x$ucdsnmp" != "x"; then
8408       break;
8409     fi
8410   done
8411   CFLAGS="$old_CFLAGS"
8412 fi
8413
8414 if test "x$ucdsnmp" = "x"; then
8415   echo "$ac_t""no" 1>&6
8416 else
8417   if test "x$ucdsnmp" = "xyes"; then
8418     echo "$ac_t""(ucd-snmp)yes" 1>&6
8419     cat >> confdefs.h <<\EOF
8420 #define HAVE_UCD_SNMP_ASN1_SNMP_SNMPIMPL_H 1
8421 EOF
8422
8423   else
8424     echo "$ac_t""yes" 1>&6
8425     cat >> confdefs.h <<\EOF
8426 #define HAVE_ASN1_SNMP_SNMPIMPL_H 1
8427 EOF
8428
8429   fi
8430   echo $ac_n "checking for snmp_build_var_op in -lsnmp""... $ac_c" 1>&6
8431 echo "configure:8432: checking for snmp_build_var_op in -lsnmp" >&5
8432
8433   old_LIBS="$LIBS"
8434   LIBS="$old_LIBS -lsnmp"
8435   cat > conftest.$ac_ext <<EOF
8436 #line 8437 "configure"
8437 #include "confdefs.h"
8438 extern char snmp_build_var_op();
8439 int main() {
8440  snmp_build_var_op()
8441 ; return 0; }
8442 EOF
8443 if { (eval echo configure:8444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8444   rm -rf conftest*
8445   SNMP_LIBS="-lsnmp"
8446 else
8447   echo "configure: failed program was:" >&5
8448   cat conftest.$ac_ext >&5
8449   rm -rf conftest*
8450   SNMP_LIBS=
8451 fi
8452 rm -f conftest*
8453
8454   if test "x$SNMP_LIBS" = "x"; then
8455     for try in /usr/lib /usr/local/lib /usr/local/snmp/lib $snmp_lib_dir; do
8456       LIBS="$old_LIBS -L$try -lsnmp"
8457       cat > conftest.$ac_ext <<EOF
8458 #line 8459 "configure"
8459 #include "confdefs.h"
8460 extern char snmp_build_var_op();
8461 int main() {
8462  snmp_build_var_op()
8463 ; return 0; }
8464 EOF
8465 if { (eval echo configure:8466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8466   rm -rf conftest*
8467   SNMP_LIBS="-L$try -lsnmp"
8468 else
8469   echo "configure: failed program was:" >&5
8470   cat conftest.$ac_ext >&5
8471   rm -rf conftest*
8472   SNMP_LIBS=
8473 fi
8474 rm -f conftest*
8475       if test "x$SNMP_LIBS" != "x"; then
8476         break;
8477       fi
8478       LIBS="$old_LIBS -L$try -lsnmp -lcrypto"
8479       cat > conftest.$ac_ext <<EOF
8480 #line 8481 "configure"
8481 #include "confdefs.h"
8482 extern char snmp_build_var_op();
8483 int main() {
8484  snmp_build_var_op()
8485 ; return 0; }
8486 EOF
8487 if { (eval echo configure:8488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8488   rm -rf conftest*
8489   SNMP_LIBS="-L$try -lsnmp -lcrypto"
8490 else
8491   echo "configure: failed program was:" >&5
8492   cat conftest.$ac_ext >&5
8493   rm -rf conftest*
8494   SNMP_LIBS=
8495 fi
8496 rm -f conftest*
8497       if test "x$SNMP_LIBS" != "x"; then
8498         break;
8499       fi
8500     done
8501   fi
8502   LIBS="$old_LIBS"
8503
8504           CFLAGS="$old_CFLAGS"
8505   if test "x$SNMP_LIBS" = "x"; then
8506     echo "$ac_t""no" 1>&6
8507     SNMP_INCLUDE=
8508   else
8509     echo "$ac_t""yes" 1>&6
8510     cat >> confdefs.h <<\EOF
8511 #define WITH_SNMP 1
8512 EOF
8513
8514     cat >> confdefs.h <<\EOF
8515 #define HAVE_LIBSNMP 1
8516 EOF
8517
8518   fi
8519 fi
8520
8521 fi
8522
8523 gethostbyaddrrstyle=""
8524 echo $ac_n "checking gethostbyaddr_r() syntax""... $ac_c" 1>&6
8525 echo "configure:8526: checking gethostbyaddr_r() syntax" >&5
8526 case "$host" in
8527 *-freebsd*)
8528         cat >> confdefs.h <<\EOF
8529 #define GETHOSTBYADDRRSTYLE BSDSTYLE
8530 EOF
8531
8532         gethostbyaddrrstyle=BSD
8533         echo "configure: warning: FreeBSD overridden to BSD-style" 1>&2
8534         ;;
8535 esac
8536 if test "x$gethostbyaddrrstyle" = "x"; then
8537         cat > conftest.$ac_ext <<EOF
8538 #line 8539 "configure"
8539 #include "confdefs.h"
8540
8541 #include <stdio.h>
8542 #include <netdb.h>
8543
8544 int main() {
8545  gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL, NULL) 
8546 ; return 0; }
8547 EOF
8548 if { (eval echo configure:8549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8549   rm -rf conftest*
8550   
8551         cat >> confdefs.h <<\EOF
8552 #define GETHOSTBYADDRRSTYLE GNUSTYLE
8553 EOF
8554
8555         gethostbyaddrrstyle=GNU
8556
8557 else
8558   echo "configure: failed program was:" >&5
8559   cat conftest.$ac_ext >&5
8560 fi
8561 rm -f conftest*
8562 fi
8563 if test "x$gethostbyaddrrstyle" = "x"; then
8564         cat > conftest.$ac_ext <<EOF
8565 #line 8566 "configure"
8566 #include "confdefs.h"
8567
8568 #include <stdio.h>
8569 #include <netdb.h>
8570
8571 int main() {
8572  gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL)  
8573 ; return 0; }
8574 EOF
8575 if { (eval echo configure:8576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8576   rm -rf conftest*
8577   
8578                 cat >> confdefs.h <<\EOF
8579 #define GETHOSTBYADDRRSTYLE SYSVSTYLE
8580 EOF
8581
8582                 gethostbyaddrrstyle=SYSV
8583         
8584 else
8585   echo "configure: failed program was:" >&5
8586   cat conftest.$ac_ext >&5
8587 fi
8588 rm -f conftest*
8589 fi
8590 if test "x$gethostbyaddrrstyle" = "x"; then
8591         cat > conftest.$ac_ext <<EOF
8592 #line 8593 "configure"
8593 #include "confdefs.h"
8594
8595 #include <stdio.h>
8596 #include <netdb.h>
8597
8598 int main() {
8599  gethostbyaddr(NULL, 0, 0)  
8600 ; return 0; }
8601 EOF
8602 if { (eval echo configure:8603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8603   rm -rf conftest*
8604   
8605                 cat >> confdefs.h <<\EOF
8606 #define GETHOSTBYADDRRSTYLE BSDSTYLE
8607 EOF
8608
8609                 gethostbyaddrrstyle=BSD
8610         
8611 else
8612   echo "configure: failed program was:" >&5
8613   cat conftest.$ac_ext >&5
8614 fi
8615 rm -f conftest*
8616 fi
8617
8618 if test "x$gethostbyaddrrstyle" = "x"; then
8619         echo "$ac_t""none!  It must not exist, here." 1>&6
8620 else
8621         echo "$ac_t""${gethostbyaddrrstyle}-style" 1>&6
8622 fi
8623
8624 if test "x$gethostbyaddrrstyle" = "xBSD"; then
8625         echo "configure: warning:  ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** " 1>&2
8626 fi
8627
8628 gethostbynamerstyle=""
8629 echo $ac_n "checking gethostbyname_r() syntax""... $ac_c" 1>&6
8630 echo "configure:8631: checking gethostbyname_r() syntax" >&5
8631 cat > conftest.$ac_ext <<EOF
8632 #line 8633 "configure"
8633 #include "confdefs.h"
8634
8635 #include <stdio.h>
8636 #include <netdb.h>
8637
8638 int main() {
8639  gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL) 
8640 ; return 0; }
8641 EOF
8642 if { (eval echo configure:8643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8643   rm -rf conftest*
8644   
8645         cat >> confdefs.h <<\EOF
8646 #define GETHOSTBYNAMERSTYLE GNUSTYLE
8647 EOF
8648
8649         gethostbynamerstyle=GNU
8650
8651 else
8652   echo "configure: failed program was:" >&5
8653   cat conftest.$ac_ext >&5
8654 fi
8655 rm -f conftest*
8656 if test "x$gethostbynamerstyle" = "x"; then
8657         cat > conftest.$ac_ext <<EOF
8658 #line 8659 "configure"
8659 #include "confdefs.h"
8660
8661 #include <stdio.h>
8662 #include <netdb.h>
8663
8664 int main() {
8665  gethostbyname_r(NULL, NULL, NULL, 0, NULL)  
8666 ; return 0; }
8667 EOF
8668 if { (eval echo configure:8669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8669   rm -rf conftest*
8670   
8671                 cat >> confdefs.h <<\EOF
8672 #define GETHOSTBYNAMERSTYLE SYSVSTYLE
8673 EOF
8674
8675                 gethostbynamerstyle=SYSV
8676         
8677 else
8678   echo "configure: failed program was:" >&5
8679   cat conftest.$ac_ext >&5
8680 fi
8681 rm -f conftest*
8682 fi
8683 if test "x$gethostbynamerstyle" = "x"; then
8684         cat > conftest.$ac_ext <<EOF
8685 #line 8686 "configure"
8686 #include "confdefs.h"
8687
8688 #include <stdio.h>
8689 #include <netdb.h>
8690
8691 int main() {
8692  gethostbyname(NULL)  
8693 ; return 0; }
8694 EOF
8695 if { (eval echo configure:8696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8696   rm -rf conftest*
8697   
8698                 cat >> confdefs.h <<\EOF
8699 #define GETHOSTBYNAMERSTYLE BSDSTYLE
8700 EOF
8701
8702                 gethostbynamerstyle=BSD
8703         
8704 else
8705   echo "configure: failed program was:" >&5
8706   cat conftest.$ac_ext >&5
8707 fi
8708 rm -f conftest*
8709 fi
8710
8711 if test "x$gethostbynamerstyle" = "x"; then
8712         echo "$ac_t""none!  It must not exist, here." 1>&6
8713 else
8714         echo "$ac_t""${gethostbynamerstyle}-style" 1>&6
8715 fi
8716
8717 if test "x$gethostbynamerstyle" = "xBSD"; then
8718         echo "configure: warning:  ****** BSD-style gethostbyname might NOT be thread-safe! ****** " 1>&2
8719 fi
8720
8721 ctimerstyle=""
8722 echo $ac_n "checking ctime_r() syntax""... $ac_c" 1>&6
8723 echo "configure:8724: checking ctime_r() syntax" >&5
8724 cat > conftest.$ac_ext <<EOF
8725 #line 8726 "configure"
8726 #include "confdefs.h"
8727
8728 #include <time.h>
8729
8730 int main() {
8731  ctime_r(NULL, NULL, 0) 
8732 ; return 0; }
8733 EOF
8734 if { (eval echo configure:8735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8735   rm -rf conftest*
8736   
8737         cat >> confdefs.h <<\EOF
8738 #define CTIMERSTYLE SOLARISSTYLE
8739 EOF
8740
8741         ctimerstyle="SOLARIS"
8742
8743 else
8744   echo "configure: failed program was:" >&5
8745   cat conftest.$ac_ext >&5
8746 fi
8747 rm -f conftest*
8748 if test "x$ctimerstyle" = "x"; then
8749         cat > conftest.$ac_ext <<EOF
8750 #line 8751 "configure"
8751 #include "confdefs.h"
8752
8753 #include <time.h>
8754
8755 int main() {
8756  ctime_r(NULL, NULL) 
8757 ; return 0; }
8758 EOF
8759 if { (eval echo configure:8760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8760   rm -rf conftest*
8761   
8762                 cat >> confdefs.h <<\EOF
8763 #define CTIMERSTYLE POSIXSTYLE
8764 EOF
8765
8766                 ctimerstyle="POSIX"
8767         
8768 else
8769   echo "configure: failed program was:" >&5
8770   cat conftest.$ac_ext >&5
8771 fi
8772 rm -f conftest*
8773 fi
8774
8775 if test "x$ctimerstyle" = "x"; then
8776         echo "$ac_t""none!  It must not exist, here." 1>&6
8777 else
8778         echo "$ac_t""${ctimerstyle}-style" 1>&6
8779 fi
8780
8781
8782 if test x"$rad_enable_largefiles" = xyes ; then
8783     echo $ac_n "checking for largefile linkage""... $ac_c" 1>&6
8784 echo "configure:8785: checking for largefile linkage" >&5
8785     case "$host" in
8786     *-aix4.01*)
8787         echo "$ac_t""no" 1>&6
8788         { echo "configure: error: AIX before 4.2 does not support large files" 1>&2; exit 1; }
8789         ;;
8790     *-aix4*)
8791         echo "$ac_t""ok" 1>&6
8792         LFS_CFLAGS="-D_LARGE_FILES"
8793         LFS_LDFLAGS=""
8794         LFS_LIBS=""
8795         ;;
8796     *-hpux*)
8797         echo "$ac_t""ok" 1>&6
8798         LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
8799         LFS_LDFLAGS=""
8800         LFS_LIBS=""
8801         ;;
8802     *-irix*)
8803         echo "$ac_t""no" 1>&6
8804         { echo "configure: error: Large files not supported on this platform" 1>&2; exit 1; }
8805         ;;
8806     *-linux*)
8807         echo "$ac_t""maybe" 1>&6
8808         LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
8809         LFS_LDFLAGS=""
8810         LFS_LIBS=""
8811         cat >> confdefs.h <<\EOF
8812 #define _GNU_SOURCE 1
8813 EOF
8814
8815         ;;
8816     *-solaris*)
8817         echo "$ac_t""ok" 1>&6
8818         # Extract the first word of "getconf", so it can be a program name with args.
8819 set dummy getconf; ac_word=$2
8820 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8821 echo "configure:8822: checking for $ac_word" >&5
8822 if eval "test \"`echo '$''{'ac_cv_path_GETCONF'+set}'`\" = set"; then
8823   echo $ac_n "(cached) $ac_c" 1>&6
8824 else
8825   case "$GETCONF" in
8826   /*)
8827   ac_cv_path_GETCONF="$GETCONF" # Let the user override the test with a path.
8828   ;;
8829   ?:/*)                  
8830   ac_cv_path_GETCONF="$GETCONF" # Let the user override the test with a dos path.
8831   ;;
8832   *)
8833   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8834   ac_dummy="$PATH"
8835   for ac_dir in $ac_dummy; do 
8836     test -z "$ac_dir" && ac_dir=.
8837     if test -f $ac_dir/$ac_word; then
8838       ac_cv_path_GETCONF="$ac_dir/$ac_word"
8839       break
8840     fi
8841   done
8842   IFS="$ac_save_ifs"
8843   ;;
8844 esac
8845 fi
8846 GETCONF="$ac_cv_path_GETCONF"
8847 if test -n "$GETCONF"; then
8848   echo "$ac_t""$GETCONF" 1>&6
8849 else
8850   echo "$ac_t""no" 1>&6
8851 fi
8852
8853         if test -z "$GETCONF" ; then
8854             { echo "configure: error: getconf required to configure large file support" 1>&2; exit 1; }
8855         fi
8856         LFS_CFLAGS=`$GETCONF LFS_CFLAGS`
8857         LFS_LDFLAGS=`$GETCONF LFS_LDFLAGS`
8858         LFS_LIBS=`$GETCONF LFS_LIBS`
8859         ;;
8860     *)
8861         echo "$ac_t""maybe" 1>&6
8862         LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
8863         LFS_LDFLAGS=""
8864         LFS_LIBS=""
8865         ;;
8866     esac
8867     
8868     
8869     
8870 fi
8871
8872
8873
8874
8875 top_builddir=`pwd`
8876 export top_builddir
8877 echo "$ac_t""top_builddir=$top_builddir" 1>&6
8878
8879
8880
8881 if test "x$INCLTDL" != "x";then
8882   INCLTDL='-I${top_builddir}/''libltdl'
8883 fi
8884
8885
8886
8887 mysubdirs=
8888 if test "x$EXPERIMENTAL" = "xyes"; then
8889   bar=`ls -1 src/modules/rlm_*/configure | sed 's%/configure%%'`
8890     mysubdirs=`echo $bar`
8891 else
8892         for bar in `cat src/modules/stable`; do
8893     if test -f src/modules/$bar/configure; then
8894       mysubdirs="$mysubdirs src/modules/$bar"
8895     fi
8896   done
8897 fi
8898
8899 MODULES=
8900 if test "x$EXPERIMENTAL" = "xyes"; then
8901   for foo in `ls -1 src/modules | grep rlm_`; do
8902     MODULES="$MODULES $foo"
8903   done
8904 else
8905             for foo in `cat src/modules/stable`; do
8906     MODULES="$MODULES $foo"
8907    done
8908 fi
8909
8910 subdirs="'libltdl' $mysubdirs"
8911
8912
8913
8914
8915
8916
8917
8918 USE_SHARED_LIBS=$enable_shared
8919
8920 USE_STATIC_LIBS=$enable_static
8921
8922
8923
8924
8925
8926 export CFLAGS LIBS
8927
8928 trap '' 1 2 15
8929 cat > confcache <<\EOF
8930 # This file is a shell script that caches the results of configure
8931 # tests run on this system so they can be shared between configure
8932 # scripts and configure runs.  It is not useful on other systems.
8933 # If it contains results you don't want to keep, you may remove or edit it.
8934 #
8935 # By default, configure uses ./config.cache as the cache file,
8936 # creating it if it does not exist already.  You can give configure
8937 # the --cache-file=FILE option to use a different cache file; that is
8938 # what configure does when it calls configure scripts in
8939 # subdirectories, so they share the cache.
8940 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8941 # config.status only pays attention to the cache file if you give it the
8942 # --recheck option to rerun configure.
8943 #
8944 EOF
8945 # The following way of writing the cache mishandles newlines in values,
8946 # but we know of no workaround that is simple, portable, and efficient.
8947 # So, don't put newlines in cache variables' values.
8948 # Ultrix sh set writes to stderr and can't be redirected directly,
8949 # and sets the high bit in the cache file unless we assign to the vars.
8950 (set) 2>&1 |
8951   case `(ac_space=' '; set | grep ac_space) 2>&1` in
8952   *ac_space=\ *)
8953     # `set' does not quote correctly, so add quotes (double-quote substitution
8954     # turns \\\\ into \\, and sed turns \\ into \).
8955     sed -n \
8956       -e "s/'/'\\\\''/g" \
8957       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8958     ;;
8959   *)
8960     # `set' quotes correctly as required by POSIX, so do not add quotes.
8961     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8962     ;;
8963   esac >> confcache
8964 if cmp -s $cache_file confcache; then
8965   :
8966 else
8967   if test -w $cache_file; then
8968     echo "updating cache $cache_file"
8969     cat confcache > $cache_file
8970   else
8971     echo "not updating unwritable cache $cache_file"
8972   fi
8973 fi
8974 rm -f confcache
8975
8976 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8977
8978 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8979 # Let make expand exec_prefix.
8980 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8981
8982 # Any assignment to VPATH causes Sun make to only execute
8983 # the first set of double-colon rules, so remove it if not needed.
8984 # If there is a colon in the path, we need to keep it.
8985 if test "x$srcdir" = x.; then
8986   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
8987 fi
8988
8989 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8990
8991 DEFS=-DHAVE_CONFIG_H
8992
8993 # Without the "./", some shells look in PATH for config.status.
8994 : ${CONFIG_STATUS=./config.status}
8995
8996 echo creating $CONFIG_STATUS
8997 rm -f $CONFIG_STATUS
8998 cat > $CONFIG_STATUS <<EOF
8999 #! /bin/sh
9000 # Generated automatically by configure.
9001 # Run this file to recreate the current configuration.
9002 # This directory was configured as follows,
9003 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9004 #
9005 # $0 $ac_configure_args
9006 #
9007 # Compiler output produced by configure, useful for debugging
9008 # configure, is in ./config.log if it exists.
9009
9010 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9011 for ac_option
9012 do
9013   case "\$ac_option" in
9014   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9015     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9016     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9017   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9018     echo "$CONFIG_STATUS generated by autoconf version 2.13"
9019     exit 0 ;;
9020   -help | --help | --hel | --he | --h)
9021     echo "\$ac_cs_usage"; exit 0 ;;
9022   *) echo "\$ac_cs_usage"; exit 1 ;;
9023   esac
9024 done
9025
9026 ac_given_srcdir=$srcdir
9027
9028 trap 'rm -fr `echo "\
9029         ./Make.inc \
9030         ./src/include/build-radpaths-h \
9031         ./src/main/Makefile \
9032         ./src/main/checkrad.pl \
9033         ./src/main/radlast \
9034         ./src/main/radtest \
9035         ./scripts/rc.radiusd \
9036         ./scripts/radwatch \
9037         ./scripts/check-radiusd-config \
9038         ./scripts/radiusd.cron.daily \
9039         ./scripts/radiusd.cron.monthly \
9040         ./scripts/cryptpasswd \
9041         ./raddb/dictionary \
9042         ./raddb/radiusd.conf
9043  src/include/autoconf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9044 EOF
9045 cat >> $CONFIG_STATUS <<EOF
9046
9047 # Protect against being on the right side of a sed subst in config.status.
9048 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9049  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9050 $ac_vpsub
9051 $extrasub
9052 s%@SHELL@%$SHELL%g
9053 s%@CFLAGS@%$CFLAGS%g
9054 s%@CPPFLAGS@%$CPPFLAGS%g
9055 s%@CXXFLAGS@%$CXXFLAGS%g
9056 s%@FFLAGS@%$FFLAGS%g
9057 s%@DEFS@%$DEFS%g
9058 s%@LDFLAGS@%$LDFLAGS%g
9059 s%@LIBS@%$LIBS%g
9060 s%@exec_prefix@%$exec_prefix%g
9061 s%@prefix@%$prefix%g
9062 s%@program_transform_name@%$program_transform_name%g
9063 s%@bindir@%$bindir%g
9064 s%@sbindir@%$sbindir%g
9065 s%@libexecdir@%$libexecdir%g
9066 s%@datadir@%$datadir%g
9067 s%@sysconfdir@%$sysconfdir%g
9068 s%@sharedstatedir@%$sharedstatedir%g
9069 s%@localstatedir@%$localstatedir%g
9070 s%@libdir@%$libdir%g
9071 s%@includedir@%$includedir%g
9072 s%@oldincludedir@%$oldincludedir%g
9073 s%@infodir@%$infodir%g
9074 s%@mandir@%$mandir%g
9075 s%@CC@%$CC%g
9076 s%@CPP@%$CPP%g
9077 s%@RANLIB@%$RANLIB%g
9078 s%@abs_top_builddir@%$abs_top_builddir%g
9079 s%@GMAKE@%$GMAKE%g
9080 s%@MAKE@%$MAKE%g
9081 s%@subdirs@%$subdirs%g
9082 s%@LIBLTDLPATH@%$LIBLTDLPATH%g
9083 s%@LIBTOOL@%$LIBTOOL%g
9084 s%@host@%$host%g
9085 s%@host_alias@%$host_alias%g
9086 s%@host_cpu@%$host_cpu%g
9087 s%@host_vendor@%$host_vendor%g
9088 s%@host_os@%$host_os%g
9089 s%@build@%$build%g
9090 s%@build_alias@%$build_alias%g
9091 s%@build_cpu@%$build_cpu%g
9092 s%@build_vendor@%$build_vendor%g
9093 s%@build_os@%$build_os%g
9094 s%@LN_S@%$LN_S%g
9095 s%@OBJEXT@%$OBJEXT%g
9096 s%@EXEEXT@%$EXEEXT%g
9097 s%@ECHO@%$ECHO%g
9098 s%@STRIP@%$STRIP%g
9099 s%@logdir@%$logdir%g
9100 s%@radacctdir@%$radacctdir%g
9101 s%@raddbdir@%$raddbdir%g
9102 s%@OPENSSL_INCLUDE@%$OPENSSL_INCLUDE%g
9103 s%@OPENSSL_LIBS@%$OPENSSL_LIBS%g
9104 s%@PERL@%$PERL%g
9105 s%@SNMPGET@%$SNMPGET%g
9106 s%@SNMPWALK@%$SNMPWALK%g
9107 s%@RUSERS@%$RUSERS%g
9108 s%@ACLOCAL@%$ACLOCAL%g
9109 s%@AUTOCONF@%$AUTOCONF%g
9110 s%@AUTOHEADER@%$AUTOHEADER%g
9111 s%@LOCATE@%$LOCATE%g
9112 s%@DIRNAME@%$DIRNAME%g
9113 s%@GREP@%$GREP%g
9114 s%@REGEX@%$REGEX%g
9115 s%@REGEX_EXTENDED@%$REGEX_EXTENDED%g
9116 s%@LIBPREFIX@%$LIBPREFIX%g
9117 s%@CRYPTLIB@%$CRYPTLIB%g
9118 s%@SNMP_LIBS@%$SNMP_LIBS%g
9119 s%@SNMP_INCLUDE@%$SNMP_INCLUDE%g
9120 s%@GETCONF@%$GETCONF%g
9121 s%@LFS_CFLAGS@%$LFS_CFLAGS%g
9122 s%@LFS_LDFLAGS@%$LFS_LDFLAGS%g
9123 s%@LFS_LIBS@%$LFS_LIBS%g
9124 s%@HOSTINFO@%$HOSTINFO%g
9125 s%@LIBLTDL@%$LIBLTDL%g
9126 s%@INCLTDL@%$INCLTDL%g
9127 s%@MODULES@%$MODULES%g
9128 s%@INSTALLSTRIP@%$INSTALLSTRIP%g
9129 s%@USE_SHARED_LIBS@%$USE_SHARED_LIBS%g
9130 s%@USE_STATIC_LIBS@%$USE_STATIC_LIBS%g
9131 s%@STATIC_MODULES@%$STATIC_MODULES%g
9132 s%@RADIUSD_MAJOR_VERSION@%$RADIUSD_MAJOR_VERSION%g
9133 s%@RADIUSD_MINOR_VERSION@%$RADIUSD_MINOR_VERSION%g
9134 s%@RADIUSD_VERSION@%$RADIUSD_VERSION%g
9135
9136 CEOF
9137 EOF
9138
9139 cat >> $CONFIG_STATUS <<\EOF
9140
9141 # Split the substitutions into bite-sized pieces for seds with
9142 # small command number limits, like on Digital OSF/1 and HP-UX.
9143 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9144 ac_file=1 # Number of current file.
9145 ac_beg=1 # First line for current file.
9146 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9147 ac_more_lines=:
9148 ac_sed_cmds=""
9149 while $ac_more_lines; do
9150   if test $ac_beg -gt 1; then
9151     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9152   else
9153     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9154   fi
9155   if test ! -s conftest.s$ac_file; then
9156     ac_more_lines=false
9157     rm -f conftest.s$ac_file
9158   else
9159     if test -z "$ac_sed_cmds"; then
9160       ac_sed_cmds="sed -f conftest.s$ac_file"
9161     else
9162       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9163     fi
9164     ac_file=`expr $ac_file + 1`
9165     ac_beg=$ac_end
9166     ac_end=`expr $ac_end + $ac_max_sed_cmds`
9167   fi
9168 done
9169 if test -z "$ac_sed_cmds"; then
9170   ac_sed_cmds=cat
9171 fi
9172 EOF
9173
9174 cat >> $CONFIG_STATUS <<EOF
9175
9176 CONFIG_FILES=\${CONFIG_FILES-"\
9177         ./Make.inc \
9178         ./src/include/build-radpaths-h \
9179         ./src/main/Makefile \
9180         ./src/main/checkrad.pl \
9181         ./src/main/radlast \
9182         ./src/main/radtest \
9183         ./scripts/rc.radiusd \
9184         ./scripts/radwatch \
9185         ./scripts/check-radiusd-config \
9186         ./scripts/radiusd.cron.daily \
9187         ./scripts/radiusd.cron.monthly \
9188         ./scripts/cryptpasswd \
9189         ./raddb/dictionary \
9190         ./raddb/radiusd.conf
9191 "}
9192 EOF
9193 cat >> $CONFIG_STATUS <<\EOF
9194 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9195   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9196   case "$ac_file" in
9197   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9198        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9199   *) ac_file_in="${ac_file}.in" ;;
9200   esac
9201
9202   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9203
9204   # Remove last slash and all that follows it.  Not all systems have dirname.
9205   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9206   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9207     # The file is in a subdirectory.
9208     test ! -d "$ac_dir" && mkdir "$ac_dir"
9209     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9210     # A "../" for each directory in $ac_dir_suffix.
9211     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9212   else
9213     ac_dir_suffix= ac_dots=
9214   fi
9215
9216   case "$ac_given_srcdir" in
9217   .)  srcdir=.
9218       if test -z "$ac_dots"; then top_srcdir=.
9219       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9220   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9221   *) # Relative path.
9222     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9223     top_srcdir="$ac_dots$ac_given_srcdir" ;;
9224   esac
9225
9226
9227   echo creating "$ac_file"
9228   rm -f "$ac_file"
9229   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9230   case "$ac_file" in
9231   *Makefile*) ac_comsub="1i\\
9232 # $configure_input" ;;
9233   *) ac_comsub= ;;
9234   esac
9235
9236   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9237   sed -e "$ac_comsub
9238 s%@configure_input@%$configure_input%g
9239 s%@srcdir@%$srcdir%g
9240 s%@top_srcdir@%$top_srcdir%g
9241 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9242 fi; done
9243 rm -f conftest.s*
9244
9245 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9246 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9247 #
9248 # ac_d sets the value in "#define NAME VALUE" lines.
9249 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
9250 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
9251 ac_dC='\3'
9252 ac_dD='%g'
9253 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9254 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9255 ac_uB='\([      ]\)%\1#\2define\3'
9256 ac_uC=' '
9257 ac_uD='\4%g'
9258 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9259 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9260 ac_eB='$%\1#\2define\3'
9261 ac_eC=' '
9262 ac_eD='%g'
9263
9264 if test "${CONFIG_HEADERS+set}" != set; then
9265 EOF
9266 cat >> $CONFIG_STATUS <<EOF
9267   CONFIG_HEADERS="src/include/autoconf.h"
9268 EOF
9269 cat >> $CONFIG_STATUS <<\EOF
9270 fi
9271 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9272   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9273   case "$ac_file" in
9274   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9275        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9276   *) ac_file_in="${ac_file}.in" ;;
9277   esac
9278
9279   echo creating $ac_file
9280
9281   rm -f conftest.frag conftest.in conftest.out
9282   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9283   cat $ac_file_inputs > conftest.in
9284
9285 EOF
9286
9287 # Transform confdefs.h into a sed script conftest.vals that substitutes
9288 # the proper values into config.h.in to produce config.h.  And first:
9289 # Protect against being on the right side of a sed subst in config.status.
9290 # Protect against being in an unquoted here document in config.status.
9291 rm -f conftest.vals
9292 cat > conftest.hdr <<\EOF
9293 s/[\\&%]/\\&/g
9294 s%[\\$`]%\\&%g
9295 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9296 s%ac_d%ac_u%gp
9297 s%ac_u%ac_e%gp
9298 EOF
9299 sed -n -f conftest.hdr confdefs.h > conftest.vals
9300 rm -f conftest.hdr
9301
9302 # This sed command replaces #undef with comments.  This is necessary, for
9303 # example, in the case of _POSIX_SOURCE, which is predefined and required
9304 # on some systems where configure will not decide to define it.
9305 cat >> conftest.vals <<\EOF
9306 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9307 EOF
9308
9309 # Break up conftest.vals because some shells have a limit on
9310 # the size of here documents, and old seds have small limits too.
9311
9312 rm -f conftest.tail
9313 while :
9314 do
9315   ac_lines=`grep -c . conftest.vals`
9316   # grep -c gives empty output for an empty file on some AIX systems.
9317   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9318   # Write a limited-size here document to conftest.frag.
9319   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9320   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9321   echo 'CEOF
9322   sed -f conftest.frag conftest.in > conftest.out
9323   rm -f conftest.in
9324   mv conftest.out conftest.in
9325 ' >> $CONFIG_STATUS
9326   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9327   rm -f conftest.vals
9328   mv conftest.tail conftest.vals
9329 done
9330 rm -f conftest.vals
9331
9332 cat >> $CONFIG_STATUS <<\EOF
9333   rm -f conftest.frag conftest.h
9334   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
9335   cat conftest.in >> conftest.h
9336   rm -f conftest.in
9337   if cmp -s $ac_file conftest.h 2>/dev/null; then
9338     echo "$ac_file is unchanged"
9339     rm -f conftest.h
9340   else
9341     # Remove last slash and all that follows it.  Not all systems have dirname.
9342       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9343       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9344       # The file is in a subdirectory.
9345       test ! -d "$ac_dir" && mkdir "$ac_dir"
9346     fi
9347     rm -f $ac_file
9348     mv conftest.h $ac_file
9349   fi
9350 fi; done
9351
9352 EOF
9353 cat >> $CONFIG_STATUS <<EOF
9354
9355 EOF
9356 cat >> $CONFIG_STATUS <<\EOF
9357
9358 exit 0
9359 EOF
9360 chmod +x $CONFIG_STATUS
9361 rm -fr confdefs* $ac_clean_files
9362 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9363
9364 if test "$no_recursion" != yes; then
9365
9366   # Remove --cache-file and --srcdir arguments so they do not pile up.
9367   ac_sub_configure_args=
9368   ac_prev=
9369   for ac_arg in $ac_configure_args; do
9370     if test -n "$ac_prev"; then
9371       ac_prev=
9372       continue
9373     fi
9374     case "$ac_arg" in
9375     -cache-file | --cache-file | --cache-fil | --cache-fi \
9376     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
9377       ac_prev=cache_file ;;
9378     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
9379     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
9380       ;;
9381     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
9382       ac_prev=srcdir ;;
9383     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
9384       ;;
9385     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
9386     esac
9387   done
9388
9389   for ac_config_dir in 'libltdl' $mysubdirs; do
9390
9391     # Do not complain, so a configure script can configure whichever
9392     # parts of a large source tree are present.
9393     if test ! -d $srcdir/$ac_config_dir; then
9394       continue
9395     fi
9396
9397     echo configuring in $ac_config_dir
9398
9399     case "$srcdir" in
9400     .) ;;
9401     *)
9402       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
9403       else
9404         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
9405       fi
9406       ;;
9407     esac
9408
9409     ac_popdir=`pwd`
9410     cd $ac_config_dir
9411
9412       # A "../" for each directory in /$ac_config_dir.
9413       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
9414
9415     case "$srcdir" in
9416     .) # No --srcdir option.  We are building in place.
9417       ac_sub_srcdir=$srcdir ;;
9418     /*) # Absolute path.
9419       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
9420     *) # Relative path.
9421       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
9422     esac
9423
9424     # Check for guested configure; otherwise get Cygnus style configure.
9425     if test -f $ac_sub_srcdir/configure; then
9426       ac_sub_configure=$ac_sub_srcdir/configure
9427     elif test -f $ac_sub_srcdir/configure.in; then
9428       ac_sub_configure=$ac_configure
9429     else
9430       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
9431       ac_sub_configure=
9432     fi
9433
9434     # The recursion is here.
9435     if test -n "$ac_sub_configure"; then
9436
9437       # Make the cache file name correct relative to the subdirectory.
9438       case "$cache_file" in
9439       /*) ac_sub_cache_file=$cache_file ;;
9440       *) # Relative path.
9441         ac_sub_cache_file="$ac_dots$cache_file" ;;
9442       esac
9443
9444       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
9445       # The eval makes quoting arguments work.
9446       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
9447       then :
9448       else
9449         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
9450       fi
9451     fi
9452
9453     cd "$ac_popdir"
9454   done
9455 fi
9456
9457
9458
9459
9460
9461
9462 echo timestamp > src/include/stamp-h
9463 (cd ./src/include && /bin/sh ./build-radpaths-h)
9464 (cd ./src/main   && chmod +x checkrad.pl radlast radtest)
9465 (cd ./scripts    && chmod +x rc.radiusd radwatch check-radiusd-config radiusd.cron.daily radiusd.cron.monthly cryptpasswd)
9466
9467
9468
9469