moved extern declaration up to prevent compile-time errors.
[swftools.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   --enable-checkmem       turn on ccmalloc debugging"
16 ac_help="$ac_help
17   --enable-debug          turn on debugging"
18 ac_help="$ac_help
19   --enable-optimizations  turn on compiler optimizations (recommended for avi2swf)"
20 ac_help="$ac_help
21   --disable-mp3           don't compile any mp3 code in"
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
194 # Initialize some variables set by options.
195 # The variables have the same names as the options, with
196 # dashes changed to underlines.
197 build=NONE
198 cache_file=./config.cache
199 exec_prefix=NONE
200 host=NONE
201 no_create=
202 nonopt=NONE
203 no_recursion=
204 prefix=NONE
205 program_prefix=NONE
206 program_suffix=NONE
207 program_transform_name=s,x,x,
208 silent=
209 site=
210 srcdir=
211 target=NONE
212 verbose=
213 x_includes=NONE
214 x_libraries=NONE
215 bindir='${exec_prefix}/bin'
216 sbindir='${exec_prefix}/sbin'
217 libexecdir='${exec_prefix}/libexec'
218 datadir='${prefix}/share'
219 sysconfdir='${prefix}/etc'
220 sharedstatedir='${prefix}/com'
221 localstatedir='${prefix}/var'
222 libdir='${exec_prefix}/lib'
223 includedir='${prefix}/include'
224 oldincludedir='/usr/include'
225 infodir='${prefix}/info'
226 mandir='${prefix}/man'
227
228 # Initialize some other variables.
229 subdirs=
230 MFLAGS= MAKEFLAGS=
231 SHELL=${CONFIG_SHELL-/bin/sh}
232 # Maximum number of lines to put in a shell here document.
233 ac_max_here_lines=12
234
235 ac_prev=
236 for ac_option
237 do
238
239   # If the previous option needs an argument, assign it.
240   if test -n "$ac_prev"; then
241     eval "$ac_prev=\$ac_option"
242     ac_prev=
243     continue
244   fi
245
246   case "$ac_option" in
247   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
248   *) ac_optarg= ;;
249   esac
250
251   # Accept the important Cygnus configure options, so we can diagnose typos.
252
253   case "$ac_option" in
254
255   -bindir | --bindir | --bindi | --bind | --bin | --bi)
256     ac_prev=bindir ;;
257   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
258     bindir="$ac_optarg" ;;
259
260   -build | --build | --buil | --bui | --bu)
261     ac_prev=build ;;
262   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
263     build="$ac_optarg" ;;
264
265   -cache-file | --cache-file | --cache-fil | --cache-fi \
266   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
267     ac_prev=cache_file ;;
268   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
269   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
270     cache_file="$ac_optarg" ;;
271
272   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
273     ac_prev=datadir ;;
274   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
275   | --da=*)
276     datadir="$ac_optarg" ;;
277
278   -disable-* | --disable-*)
279     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
280     # Reject names that are not valid shell variable names.
281     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
282       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
283     fi
284     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
285     eval "enable_${ac_feature}=no" ;;
286
287   -enable-* | --enable-*)
288     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
289     # Reject names that are not valid shell variable names.
290     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
291       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
292     fi
293     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
294     case "$ac_option" in
295       *=*) ;;
296       *) ac_optarg=yes ;;
297     esac
298     eval "enable_${ac_feature}='$ac_optarg'" ;;
299
300   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
301   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
302   | --exec | --exe | --ex)
303     ac_prev=exec_prefix ;;
304   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
305   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
306   | --exec=* | --exe=* | --ex=*)
307     exec_prefix="$ac_optarg" ;;
308
309   -gas | --gas | --ga | --g)
310     # Obsolete; use --with-gas.
311     with_gas=yes ;;
312
313   -help | --help | --hel | --he)
314     # Omit some internal or obsolete options to make the list less imposing.
315     # This message is too long to be a string in the A/UX 3.1 sh.
316     cat << EOF
317 Usage: configure [options] [host]
318 Options: [defaults in brackets after descriptions]
319 Configuration:
320   --cache-file=FILE       cache test results in FILE
321   --help                  print this message
322   --no-create             do not create output files
323   --quiet, --silent       do not print \`checking...' messages
324   --version               print the version of autoconf that created configure
325 Directory and file names:
326   --prefix=PREFIX         install architecture-independent files in PREFIX
327                           [$ac_default_prefix]
328   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
329                           [same as prefix]
330   --bindir=DIR            user executables in DIR [EPREFIX/bin]
331   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
332   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
333   --datadir=DIR           read-only architecture-independent data in DIR
334                           [PREFIX/share]
335   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
336   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
337                           [PREFIX/com]
338   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
339   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
340   --includedir=DIR        C header files in DIR [PREFIX/include]
341   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
342   --infodir=DIR           info documentation in DIR [PREFIX/info]
343   --mandir=DIR            man documentation in DIR [PREFIX/man]
344   --srcdir=DIR            find the sources in DIR [configure dir or ..]
345   --program-prefix=PREFIX prepend PREFIX to installed program names
346   --program-suffix=SUFFIX append SUFFIX to installed program names
347   --program-transform-name=PROGRAM
348                           run sed PROGRAM on installed program names
349 EOF
350     cat << EOF
351 Host type:
352   --build=BUILD           configure for building on BUILD [BUILD=HOST]
353   --host=HOST             configure for HOST [guessed]
354   --target=TARGET         configure for TARGET [TARGET=HOST]
355 Features and packages:
356   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
357   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
358   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
359   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
360   --x-includes=DIR        X include files are in DIR
361   --x-libraries=DIR       X library files are in DIR
362 EOF
363     if test -n "$ac_help"; then
364       echo "--enable and --with options recognized:$ac_help"
365     fi
366     exit 0 ;;
367
368   -host | --host | --hos | --ho)
369     ac_prev=host ;;
370   -host=* | --host=* | --hos=* | --ho=*)
371     host="$ac_optarg" ;;
372
373   -includedir | --includedir | --includedi | --included | --include \
374   | --includ | --inclu | --incl | --inc)
375     ac_prev=includedir ;;
376   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
377   | --includ=* | --inclu=* | --incl=* | --inc=*)
378     includedir="$ac_optarg" ;;
379
380   -infodir | --infodir | --infodi | --infod | --info | --inf)
381     ac_prev=infodir ;;
382   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
383     infodir="$ac_optarg" ;;
384
385   -libdir | --libdir | --libdi | --libd)
386     ac_prev=libdir ;;
387   -libdir=* | --libdir=* | --libdi=* | --libd=*)
388     libdir="$ac_optarg" ;;
389
390   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
391   | --libexe | --libex | --libe)
392     ac_prev=libexecdir ;;
393   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
394   | --libexe=* | --libex=* | --libe=*)
395     libexecdir="$ac_optarg" ;;
396
397   -localstatedir | --localstatedir | --localstatedi | --localstated \
398   | --localstate | --localstat | --localsta | --localst \
399   | --locals | --local | --loca | --loc | --lo)
400     ac_prev=localstatedir ;;
401   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
402   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
403   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
404     localstatedir="$ac_optarg" ;;
405
406   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
407     ac_prev=mandir ;;
408   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
409     mandir="$ac_optarg" ;;
410
411   -nfp | --nfp | --nf)
412     # Obsolete; use --without-fp.
413     with_fp=no ;;
414
415   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
416   | --no-cr | --no-c)
417     no_create=yes ;;
418
419   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
420   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
421     no_recursion=yes ;;
422
423   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
424   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
425   | --oldin | --oldi | --old | --ol | --o)
426     ac_prev=oldincludedir ;;
427   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
428   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
429   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
430     oldincludedir="$ac_optarg" ;;
431
432   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
433     ac_prev=prefix ;;
434   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
435     prefix="$ac_optarg" ;;
436
437   -program-prefix | --program-prefix | --program-prefi | --program-pref \
438   | --program-pre | --program-pr | --program-p)
439     ac_prev=program_prefix ;;
440   -program-prefix=* | --program-prefix=* | --program-prefi=* \
441   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
442     program_prefix="$ac_optarg" ;;
443
444   -program-suffix | --program-suffix | --program-suffi | --program-suff \
445   | --program-suf | --program-su | --program-s)
446     ac_prev=program_suffix ;;
447   -program-suffix=* | --program-suffix=* | --program-suffi=* \
448   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
449     program_suffix="$ac_optarg" ;;
450
451   -program-transform-name | --program-transform-name \
452   | --program-transform-nam | --program-transform-na \
453   | --program-transform-n | --program-transform- \
454   | --program-transform | --program-transfor \
455   | --program-transfo | --program-transf \
456   | --program-trans | --program-tran \
457   | --progr-tra | --program-tr | --program-t)
458     ac_prev=program_transform_name ;;
459   -program-transform-name=* | --program-transform-name=* \
460   | --program-transform-nam=* | --program-transform-na=* \
461   | --program-transform-n=* | --program-transform-=* \
462   | --program-transform=* | --program-transfor=* \
463   | --program-transfo=* | --program-transf=* \
464   | --program-trans=* | --program-tran=* \
465   | --progr-tra=* | --program-tr=* | --program-t=*)
466     program_transform_name="$ac_optarg" ;;
467
468   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
469   | -silent | --silent | --silen | --sile | --sil)
470     silent=yes ;;
471
472   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
473     ac_prev=sbindir ;;
474   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
475   | --sbi=* | --sb=*)
476     sbindir="$ac_optarg" ;;
477
478   -sharedstatedir | --sharedstatedir | --sharedstatedi \
479   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
480   | --sharedst | --shareds | --shared | --share | --shar \
481   | --sha | --sh)
482     ac_prev=sharedstatedir ;;
483   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
484   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
485   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
486   | --sha=* | --sh=*)
487     sharedstatedir="$ac_optarg" ;;
488
489   -site | --site | --sit)
490     ac_prev=site ;;
491   -site=* | --site=* | --sit=*)
492     site="$ac_optarg" ;;
493
494   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
495     ac_prev=srcdir ;;
496   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
497     srcdir="$ac_optarg" ;;
498
499   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
500   | --syscon | --sysco | --sysc | --sys | --sy)
501     ac_prev=sysconfdir ;;
502   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
503   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
504     sysconfdir="$ac_optarg" ;;
505
506   -target | --target | --targe | --targ | --tar | --ta | --t)
507     ac_prev=target ;;
508   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
509     target="$ac_optarg" ;;
510
511   -v | -verbose | --verbose | --verbos | --verbo | --verb)
512     verbose=yes ;;
513
514   -version | --version | --versio | --versi | --vers)
515     echo "configure generated by autoconf version 2.13"
516     exit 0 ;;
517
518   -with-* | --with-*)
519     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
520     # Reject names that are not valid shell variable names.
521     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
522       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
523     fi
524     ac_package=`echo $ac_package| sed 's/-/_/g'`
525     case "$ac_option" in
526       *=*) ;;
527       *) ac_optarg=yes ;;
528     esac
529     eval "with_${ac_package}='$ac_optarg'" ;;
530
531   -without-* | --without-*)
532     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
533     # Reject names that are not valid shell variable names.
534     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
535       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
536     fi
537     ac_package=`echo $ac_package| sed 's/-/_/g'`
538     eval "with_${ac_package}=no" ;;
539
540   --x)
541     # Obsolete; use --with-x.
542     with_x=yes ;;
543
544   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
545   | --x-incl | --x-inc | --x-in | --x-i)
546     ac_prev=x_includes ;;
547   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
548   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
549     x_includes="$ac_optarg" ;;
550
551   -x-libraries | --x-libraries | --x-librarie | --x-librari \
552   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
553     ac_prev=x_libraries ;;
554   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
555   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
556     x_libraries="$ac_optarg" ;;
557
558   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
559     ;;
560
561   *)
562     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
563       echo "configure: warning: $ac_option: invalid host type" 1>&2
564     fi
565     if test "x$nonopt" != xNONE; then
566       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
567     fi
568     nonopt="$ac_option"
569     ;;
570
571   esac
572 done
573
574 if test -n "$ac_prev"; then
575   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
576 fi
577
578 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
579
580 # File descriptor usage:
581 # 0 standard input
582 # 1 file creation
583 # 2 errors and warnings
584 # 3 some systems may open it to /dev/tty
585 # 4 used on the Kubota Titan
586 # 6 checking for... messages and results
587 # 5 compiler messages saved in config.log
588 if test "$silent" = yes; then
589   exec 6>/dev/null
590 else
591   exec 6>&1
592 fi
593 exec 5>./config.log
594
595 echo "\
596 This file contains any messages produced by compilers while
597 running configure, to aid debugging if configure makes a mistake.
598 " 1>&5
599
600 # Strip out --no-create and --no-recursion so they do not pile up.
601 # Also quote any args containing shell metacharacters.
602 ac_configure_args=
603 for ac_arg
604 do
605   case "$ac_arg" in
606   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
607   | --no-cr | --no-c) ;;
608   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
609   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
610   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
611   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
612   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
613   esac
614 done
615
616 # NLS nuisances.
617 # Only set these to C if already set.  These must not be set unconditionally
618 # because not all systems understand e.g. LANG=C (notably SCO).
619 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
620 # Non-C LC_CTYPE values break the ctype check.
621 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
622 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
623 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
624 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
625
626 # confdefs.h avoids OS command line length limits that DEFS can exceed.
627 rm -rf conftest* confdefs.h
628 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
629 echo > confdefs.h
630
631 # A filename unique to this package, relative to the directory that
632 # configure is in, which we can look for to find out if srcdir is correct.
633 ac_unique_file=src/
634
635 # Find the source files, if location was not specified.
636 if test -z "$srcdir"; then
637   ac_srcdir_defaulted=yes
638   # Try the directory containing this script, then its parent.
639   ac_prog=$0
640   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
641   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
642   srcdir=$ac_confdir
643   if test ! -r $srcdir/$ac_unique_file; then
644     srcdir=..
645   fi
646 else
647   ac_srcdir_defaulted=no
648 fi
649 if test ! -r $srcdir/$ac_unique_file; then
650   if test "$ac_srcdir_defaulted" = yes; then
651     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
652   else
653     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
654   fi
655 fi
656 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
657
658 # Prefer explicitly selected file to automatically selected ones.
659 if test -z "$CONFIG_SITE"; then
660   if test "x$prefix" != xNONE; then
661     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
662   else
663     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
664   fi
665 fi
666 for ac_site_file in $CONFIG_SITE; do
667   if test -r "$ac_site_file"; then
668     echo "loading site script $ac_site_file"
669     . "$ac_site_file"
670   fi
671 done
672
673 if test -r "$cache_file"; then
674   echo "loading cache $cache_file"
675   . $cache_file
676 else
677   echo "creating cache $cache_file"
678   > $cache_file
679 fi
680
681 ac_ext=c
682 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
683 ac_cpp='$CPP $CPPFLAGS'
684 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
685 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
686 cross_compiling=$ac_cv_prog_cc_cross
687
688 ac_exeext=
689 ac_objext=o
690 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
691   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
692   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
693     ac_n= ac_c='
694 ' ac_t='        '
695   else
696     ac_n=-n ac_c= ac_t=
697   fi
698 else
699   ac_n= ac_c='\c' ac_t=
700 fi
701
702
703
704 # Check whether --enable-checkmem or --disable-checkmem was given.
705 if test "${enable_checkmem+set}" = set; then
706   enableval="$enable_checkmem"
707   CHECKMEM=true
708 fi
709
710 # Check whether --enable-debug or --disable-debug was given.
711 if test "${enable_debug+set}" = set; then
712   enableval="$enable_debug"
713   DEBUG=true
714 fi
715
716 # Check whether --enable-optimizations or --disable-optimizations was given.
717 if test "${enable_optimizations+set}" = set; then
718   enableval="$enable_optimizations"
719   OPTIMIZE=true
720 fi
721
722 # Check whether --enable-mp3 or --disable-mp3 was given.
723 if test "${enable_mp3+set}" = set; then
724   enableval="$enable_mp3"
725   NO_MP3=true
726 fi
727
728
729 PACKAGE=swftools
730 VERSION=2003-11-17-2016
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745 # -Winline?
746
747 if test "x$CHECKMEM" '!=' "x";then
748     DEBUG=yes
749 fi
750 if test "x$DEBUG" '!=' "x";then
751     CFLAGS="-Wparentheses -Wimplicit -Wreturn-type -pg -g $CFLAGS"
752     CXXFLAGS="-Wparentheses -Wimplicit -Wreturn-type -pg -g $CXXFLAGS"
753     STRIP="@echo debug enabled, not stripping "
754     export STRIP
755     
756 else if test "x$OPTIMIZE" '!=' "x"; then
757         CFLAGS="-Wparentheses -Wimplicit -Wreturn-type -Winline -O3 -fomit-frame-pointer $CFLAGS"
758         CXXFLAGS="-Wparentheses -Wimplicit -Wreturn-type -Winline -O3 -fomit-frame-pointer $CXXFLAGS"
759      else
760         CFLAGS="-Wparentheses -Wimplicit -Wreturn-type -O -fomit-frame-pointer $CFLAGS"
761         CXXFLAGS="-Wparentheses -Wimplicit -Wreturn-type -O -fomit-frame-pointer $CXXFLAGS"
762      fi
763 fi
764
765 export PACKAGE VERSION CFLAGS CXXFLAGS
766
767  ac_aux_dir=
768 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
769   if test -f $ac_dir/install-sh; then
770     ac_aux_dir=$ac_dir
771     ac_install_sh="$ac_aux_dir/install-sh -c"
772     break
773   elif test -f $ac_dir/install.sh; then
774     ac_aux_dir=$ac_dir
775     ac_install_sh="$ac_aux_dir/install.sh -c"
776     break
777   fi
778 done
779 if test -z "$ac_aux_dir"; then
780   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
781 fi
782 ac_config_guess=$ac_aux_dir/config.guess
783 ac_config_sub=$ac_aux_dir/config.sub
784 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
785
786
787 # Make sure we can run config.sub.
788 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
789 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
790 fi
791
792 echo $ac_n "checking host system type""... $ac_c" 1>&6
793 echo "configure:794: checking host system type" >&5
794
795 host_alias=$host
796 case "$host_alias" in
797 NONE)
798   case $nonopt in
799   NONE)
800     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
801     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
802     fi ;;
803   *) host_alias=$nonopt ;;
804   esac ;;
805 esac
806
807 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
808 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
809 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
810 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
811 echo "$ac_t""$host" 1>&6
812
813 MACOSX=
814 case $host_os in
815     *darwin* ) 
816         MACOSX=yes
817         CFLAGS="$CFLAGS -fno-rtti"
818         CXXFLAGS="$CXXFLAGS -fno-rtti"
819         ;;
820 esac
821  # Extract the first word of "gcc", so it can be a program name with args.
822 set dummy gcc; ac_word=$2
823 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
824 echo "configure:825: checking for $ac_word" >&5
825 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
826   echo $ac_n "(cached) $ac_c" 1>&6
827 else
828   if test -n "$CC"; then
829   ac_cv_prog_CC="$CC" # Let the user override the test.
830 else
831   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
832   ac_dummy="$PATH"
833   for ac_dir in $ac_dummy; do
834     test -z "$ac_dir" && ac_dir=.
835     if test -f $ac_dir/$ac_word; then
836       ac_cv_prog_CC="gcc"
837       break
838     fi
839   done
840   IFS="$ac_save_ifs"
841 fi
842 fi
843 CC="$ac_cv_prog_CC"
844 if test -n "$CC"; then
845   echo "$ac_t""$CC" 1>&6
846 else
847   echo "$ac_t""no" 1>&6
848 fi
849
850 if test -z "$CC"; then
851   # Extract the first word of "cc", so it can be a program name with args.
852 set dummy cc; ac_word=$2
853 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
854 echo "configure:855: checking for $ac_word" >&5
855 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
856   echo $ac_n "(cached) $ac_c" 1>&6
857 else
858   if test -n "$CC"; then
859   ac_cv_prog_CC="$CC" # Let the user override the test.
860 else
861   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
862   ac_prog_rejected=no
863   ac_dummy="$PATH"
864   for ac_dir in $ac_dummy; do
865     test -z "$ac_dir" && ac_dir=.
866     if test -f $ac_dir/$ac_word; then
867       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
868         ac_prog_rejected=yes
869         continue
870       fi
871       ac_cv_prog_CC="cc"
872       break
873     fi
874   done
875   IFS="$ac_save_ifs"
876 if test $ac_prog_rejected = yes; then
877   # We found a bogon in the path, so make sure we never use it.
878   set dummy $ac_cv_prog_CC
879   shift
880   if test $# -gt 0; then
881     # We chose a different compiler from the bogus one.
882     # However, it has the same basename, so the bogon will be chosen
883     # first if we set CC to just the basename; use the full file name.
884     shift
885     set dummy "$ac_dir/$ac_word" "$@"
886     shift
887     ac_cv_prog_CC="$@"
888   fi
889 fi
890 fi
891 fi
892 CC="$ac_cv_prog_CC"
893 if test -n "$CC"; then
894   echo "$ac_t""$CC" 1>&6
895 else
896   echo "$ac_t""no" 1>&6
897 fi
898
899   if test -z "$CC"; then
900     case "`uname -s`" in
901     *win32* | *WIN32*)
902       # Extract the first word of "cl", so it can be a program name with args.
903 set dummy cl; ac_word=$2
904 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
905 echo "configure:906: checking for $ac_word" >&5
906 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
907   echo $ac_n "(cached) $ac_c" 1>&6
908 else
909   if test -n "$CC"; then
910   ac_cv_prog_CC="$CC" # Let the user override the test.
911 else
912   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
913   ac_dummy="$PATH"
914   for ac_dir in $ac_dummy; do
915     test -z "$ac_dir" && ac_dir=.
916     if test -f $ac_dir/$ac_word; then
917       ac_cv_prog_CC="cl"
918       break
919     fi
920   done
921   IFS="$ac_save_ifs"
922 fi
923 fi
924 CC="$ac_cv_prog_CC"
925 if test -n "$CC"; then
926   echo "$ac_t""$CC" 1>&6
927 else
928   echo "$ac_t""no" 1>&6
929 fi
930  ;;
931     esac
932   fi
933   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
934 fi
935
936 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
937 echo "configure:938: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
938
939 ac_ext=c
940 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
941 ac_cpp='$CPP $CPPFLAGS'
942 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
943 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
944 cross_compiling=$ac_cv_prog_cc_cross
945
946 cat > conftest.$ac_ext << EOF
947
948 #line 949 "configure"
949 #include "confdefs.h"
950
951 main(){return(0);}
952 EOF
953 if { (eval echo configure:954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
954   ac_cv_prog_cc_works=yes
955   # If we can't run a trivial program, we are probably using a cross compiler.
956   if (./conftest; exit) 2>/dev/null; then
957     ac_cv_prog_cc_cross=no
958   else
959     ac_cv_prog_cc_cross=yes
960   fi
961 else
962   echo "configure: failed program was:" >&5
963   cat conftest.$ac_ext >&5
964   ac_cv_prog_cc_works=no
965 fi
966 rm -fr conftest*
967 ac_ext=c
968 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
969 ac_cpp='$CPP $CPPFLAGS'
970 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
971 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
972 cross_compiling=$ac_cv_prog_cc_cross
973
974 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
975 if test $ac_cv_prog_cc_works = no; then
976   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
977 fi
978 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
979 echo "configure:980: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
980 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
981 cross_compiling=$ac_cv_prog_cc_cross
982
983 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
984 echo "configure:985: checking whether we are using GNU C" >&5
985 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
986   echo $ac_n "(cached) $ac_c" 1>&6
987 else
988   cat > conftest.c <<EOF
989 #ifdef __GNUC__
990   yes;
991 #endif
992 EOF
993 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
994   ac_cv_prog_gcc=yes
995 else
996   ac_cv_prog_gcc=no
997 fi
998 fi
999
1000 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1001
1002 if test $ac_cv_prog_gcc = yes; then
1003   GCC=yes
1004 else
1005   GCC=
1006 fi
1007
1008 ac_test_CFLAGS="${CFLAGS+set}"
1009 ac_save_CFLAGS="$CFLAGS"
1010 CFLAGS=
1011 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1012 echo "configure:1013: checking whether ${CC-cc} accepts -g" >&5
1013 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1014   echo $ac_n "(cached) $ac_c" 1>&6
1015 else
1016   echo 'void f(){}' > conftest.c
1017 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1018   ac_cv_prog_cc_g=yes
1019 else
1020   ac_cv_prog_cc_g=no
1021 fi
1022 rm -f conftest*
1023
1024 fi
1025
1026 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1027 if test "$ac_test_CFLAGS" = set; then
1028   CFLAGS="$ac_save_CFLAGS"
1029 elif test $ac_cv_prog_cc_g = yes; then
1030   if test "$GCC" = yes; then
1031     CFLAGS="-g -O2"
1032   else
1033     CFLAGS="-g"
1034   fi
1035 else
1036   if test "$GCC" = yes; then
1037     CFLAGS="-O2"
1038   else
1039     CFLAGS=
1040   fi
1041 fi
1042
1043  for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1044 do
1045 # Extract the first word of "$ac_prog", so it can be a program name with args.
1046 set dummy $ac_prog; ac_word=$2
1047 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1048 echo "configure:1049: checking for $ac_word" >&5
1049 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1050   echo $ac_n "(cached) $ac_c" 1>&6
1051 else
1052   if test -n "$CXX"; then
1053   ac_cv_prog_CXX="$CXX" # Let the user override the test.
1054 else
1055   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1056   ac_dummy="$PATH"
1057   for ac_dir in $ac_dummy; do
1058     test -z "$ac_dir" && ac_dir=.
1059     if test -f $ac_dir/$ac_word; then
1060       ac_cv_prog_CXX="$ac_prog"
1061       break
1062     fi
1063   done
1064   IFS="$ac_save_ifs"
1065 fi
1066 fi
1067 CXX="$ac_cv_prog_CXX"
1068 if test -n "$CXX"; then
1069   echo "$ac_t""$CXX" 1>&6
1070 else
1071   echo "$ac_t""no" 1>&6
1072 fi
1073
1074 test -n "$CXX" && break
1075 done
1076 test -n "$CXX" || CXX="gcc"
1077
1078
1079 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1080 echo "configure:1081: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1081
1082 ac_ext=C
1083 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1084 ac_cpp='$CXXCPP $CPPFLAGS'
1085 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1086 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1087 cross_compiling=$ac_cv_prog_cxx_cross
1088
1089 cat > conftest.$ac_ext << EOF
1090
1091 #line 1092 "configure"
1092 #include "confdefs.h"
1093
1094 int main(){return(0);}
1095 EOF
1096 if { (eval echo configure:1097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1097   ac_cv_prog_cxx_works=yes
1098   # If we can't run a trivial program, we are probably using a cross compiler.
1099   if (./conftest; exit) 2>/dev/null; then
1100     ac_cv_prog_cxx_cross=no
1101   else
1102     ac_cv_prog_cxx_cross=yes
1103   fi
1104 else
1105   echo "configure: failed program was:" >&5
1106   cat conftest.$ac_ext >&5
1107   ac_cv_prog_cxx_works=no
1108 fi
1109 rm -fr conftest*
1110 ac_ext=c
1111 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1112 ac_cpp='$CPP $CPPFLAGS'
1113 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1114 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1115 cross_compiling=$ac_cv_prog_cc_cross
1116
1117 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1118 if test $ac_cv_prog_cxx_works = no; then
1119   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1120 fi
1121 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1122 echo "configure:1123: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1123 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1124 cross_compiling=$ac_cv_prog_cxx_cross
1125
1126 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1127 echo "configure:1128: checking whether we are using GNU C++" >&5
1128 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1129   echo $ac_n "(cached) $ac_c" 1>&6
1130 else
1131   cat > conftest.C <<EOF
1132 #ifdef __GNUC__
1133   yes;
1134 #endif
1135 EOF
1136 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1137   ac_cv_prog_gxx=yes
1138 else
1139   ac_cv_prog_gxx=no
1140 fi
1141 fi
1142
1143 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1144
1145 if test $ac_cv_prog_gxx = yes; then
1146   GXX=yes
1147 else
1148   GXX=
1149 fi
1150
1151 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1152 ac_save_CXXFLAGS="$CXXFLAGS"
1153 CXXFLAGS=
1154 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1155 echo "configure:1156: checking whether ${CXX-g++} accepts -g" >&5
1156 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1157   echo $ac_n "(cached) $ac_c" 1>&6
1158 else
1159   echo 'void f(){}' > conftest.cc
1160 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1161   ac_cv_prog_cxx_g=yes
1162 else
1163   ac_cv_prog_cxx_g=no
1164 fi
1165 rm -f conftest*
1166
1167 fi
1168
1169 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1170 if test "$ac_test_CXXFLAGS" = set; then
1171   CXXFLAGS="$ac_save_CXXFLAGS"
1172 elif test $ac_cv_prog_cxx_g = yes; then
1173   if test "$GXX" = yes; then
1174     CXXFLAGS="-g -O2"
1175   else
1176     CXXFLAGS="-g"
1177   fi
1178 else
1179   if test "$GXX" = yes; then
1180     CXXFLAGS="-O2"
1181   else
1182     CXXFLAGS=
1183   fi
1184 fi
1185
1186
1187 if test "x$CHECKMEM" '!=' "x";then
1188     CC="ccmalloc $CC"
1189     CXX="ccmalloc $CXX"
1190     #echo running again
1191     #unset ac_cv_prog_CC
1192     #unset ac_cv_prog_CXX
1193     #AC_PROG_CC
1194     #AC_PROG_CXX
1195 fi
1196  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1197 echo "configure:1198: checking how to run the C preprocessor" >&5
1198 # On Suns, sometimes $CPP names a directory.
1199 if test -n "$CPP" && test -d "$CPP"; then
1200   CPP=
1201 fi
1202 if test -z "$CPP"; then
1203 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1204   echo $ac_n "(cached) $ac_c" 1>&6
1205 else
1206     # This must be in double quotes, not single quotes, because CPP may get
1207   # substituted into the Makefile and "${CC-cc}" will confuse make.
1208   CPP="${CC-cc} -E"
1209   # On the NeXT, cc -E runs the code through the compiler's parser,
1210   # not just through cpp.
1211   cat > conftest.$ac_ext <<EOF
1212 #line 1213 "configure"
1213 #include "confdefs.h"
1214 #include <assert.h>
1215 Syntax Error
1216 EOF
1217 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1218 { (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1219 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1220 if test -z "$ac_err"; then
1221   :
1222 else
1223   echo "$ac_err" >&5
1224   echo "configure: failed program was:" >&5
1225   cat conftest.$ac_ext >&5
1226   rm -rf conftest*
1227   CPP="${CC-cc} -E -traditional-cpp"
1228   cat > conftest.$ac_ext <<EOF
1229 #line 1230 "configure"
1230 #include "confdefs.h"
1231 #include <assert.h>
1232 Syntax Error
1233 EOF
1234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1235 { (eval echo configure:1236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1237 if test -z "$ac_err"; then
1238   :
1239 else
1240   echo "$ac_err" >&5
1241   echo "configure: failed program was:" >&5
1242   cat conftest.$ac_ext >&5
1243   rm -rf conftest*
1244   CPP="${CC-cc} -nologo -E"
1245   cat > conftest.$ac_ext <<EOF
1246 #line 1247 "configure"
1247 #include "confdefs.h"
1248 #include <assert.h>
1249 Syntax Error
1250 EOF
1251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1252 { (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1254 if test -z "$ac_err"; then
1255   :
1256 else
1257   echo "$ac_err" >&5
1258   echo "configure: failed program was:" >&5
1259   cat conftest.$ac_ext >&5
1260   rm -rf conftest*
1261   CPP=/lib/cpp
1262 fi
1263 rm -f conftest*
1264 fi
1265 rm -f conftest*
1266 fi
1267 rm -f conftest*
1268   ac_cv_prog_CPP="$CPP"
1269 fi
1270   CPP="$ac_cv_prog_CPP"
1271 else
1272   ac_cv_prog_CPP="$CPP"
1273 fi
1274 echo "$ac_t""$CPP" 1>&6
1275
1276
1277  # Extract the first word of "ranlib", so it can be a program name with args.
1278 set dummy ranlib; ac_word=$2
1279 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1280 echo "configure:1281: checking for $ac_word" >&5
1281 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1282   echo $ac_n "(cached) $ac_c" 1>&6
1283 else
1284   if test -n "$RANLIB"; then
1285   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1286 else
1287   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1288   ac_dummy="$PATH"
1289   for ac_dir in $ac_dummy; do
1290     test -z "$ac_dir" && ac_dir=.
1291     if test -f $ac_dir/$ac_word; then
1292       ac_cv_prog_RANLIB="ranlib"
1293       break
1294     fi
1295   done
1296   IFS="$ac_save_ifs"
1297   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1298 fi
1299 fi
1300 RANLIB="$ac_cv_prog_RANLIB"
1301 if test -n "$RANLIB"; then
1302   echo "$ac_t""$RANLIB" 1>&6
1303 else
1304   echo "$ac_t""no" 1>&6
1305 fi
1306
1307  echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1308 echo "configure:1309: checking whether ${MAKE-make} sets \${MAKE}" >&5
1309 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1310 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1311   echo $ac_n "(cached) $ac_c" 1>&6
1312 else
1313   cat > conftestmake <<\EOF
1314 all:
1315         @echo 'ac_maketemp="${MAKE}"'
1316 EOF
1317 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1318 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1319 if test -n "$ac_maketemp"; then
1320   eval ac_cv_prog_make_${ac_make}_set=yes
1321 else
1322   eval ac_cv_prog_make_${ac_make}_set=no
1323 fi
1324 rm -f conftestmake
1325 fi
1326 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1327   echo "$ac_t""yes" 1>&6
1328   SET_MAKE=
1329 else
1330   echo "$ac_t""no" 1>&6
1331   SET_MAKE="MAKE=${MAKE-make}"
1332 fi
1333
1334  # Find a good install program.  We prefer a C program (faster),
1335 # so one script is as good as another.  But avoid the broken or
1336 # incompatible versions:
1337 # SysV /etc/install, /usr/sbin/install
1338 # SunOS /usr/etc/install
1339 # IRIX /sbin/install
1340 # AIX /bin/install
1341 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1342 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1343 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1344 # ./install, which can be erroneously created by make from ./install.sh.
1345 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1346 echo "configure:1347: checking for a BSD compatible install" >&5
1347 if test -z "$INSTALL"; then
1348 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1349   echo $ac_n "(cached) $ac_c" 1>&6
1350 else
1351     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1352   for ac_dir in $PATH; do
1353     # Account for people who put trailing slashes in PATH elements.
1354     case "$ac_dir/" in
1355     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1356     *)
1357       # OSF1 and SCO ODT 3.0 have their own names for install.
1358       # Don't use installbsd from OSF since it installs stuff as root
1359       # by default.
1360       for ac_prog in ginstall scoinst install; do
1361         if test -f $ac_dir/$ac_prog; then
1362           if test $ac_prog = install &&
1363             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1364             # AIX install.  It has an incompatible calling convention.
1365             :
1366           else
1367             ac_cv_path_install="$ac_dir/$ac_prog -c"
1368             break 2
1369           fi
1370         fi
1371       done
1372       ;;
1373     esac
1374   done
1375   IFS="$ac_save_IFS"
1376
1377 fi
1378   if test "${ac_cv_path_install+set}" = set; then
1379     INSTALL="$ac_cv_path_install"
1380   else
1381     # As a last resort, use the slow shell script.  We don't cache a
1382     # path for INSTALL within a source directory, because that will
1383     # break other packages using the cache if that directory is
1384     # removed, or if the path is relative.
1385     INSTALL="$ac_install_sh"
1386   fi
1387 fi
1388 echo "$ac_t""$INSTALL" 1>&6
1389
1390 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1391 # It thinks the first close brace ends the variable substitution.
1392 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1393
1394 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1395
1396 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1397
1398  echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1399 echo "configure:1400: checking whether ln -s works" >&5
1400 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1401   echo $ac_n "(cached) $ac_c" 1>&6
1402 else
1403   rm -f conftestdata
1404 if ln -s X conftestdata 2>/dev/null
1405 then
1406   rm -f conftestdata
1407   ac_cv_prog_LN_S="ln -s"
1408 else
1409   ac_cv_prog_LN_S=ln
1410 fi
1411 fi
1412 LN_S="$ac_cv_prog_LN_S"
1413 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1414   echo "$ac_t""yes" 1>&6
1415 else
1416   echo "$ac_t""no" 1>&6
1417 fi
1418
1419  # Find the correct PATH separator.  Usually this is `:', but
1420 # DJGPP uses `;' like DOS.
1421 if test "X${PATH_SEPARATOR+set}" != Xset; then
1422   UNAME=${UNAME-`uname 2>/dev/null`}
1423   case X$UNAME in
1424     *-DOS) lt_cv_sys_path_separator=';' ;;
1425     *)     lt_cv_sys_path_separator=':' ;;
1426   esac
1427   PATH_SEPARATOR=$lt_cv_sys_path_separator
1428 fi
1429
1430 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1431 echo "configure:1432: checking for Cygwin environment" >&5
1432 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1433   echo $ac_n "(cached) $ac_c" 1>&6
1434 else
1435   cat > conftest.$ac_ext <<EOF
1436 #line 1437 "configure"
1437 #include "confdefs.h"
1438
1439 int main() {
1440
1441 #ifndef __CYGWIN__
1442 #define __CYGWIN__ __CYGWIN32__
1443 #endif
1444 return __CYGWIN__;
1445 ; return 0; }
1446 EOF
1447 if { (eval echo configure:1448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1448   rm -rf conftest*
1449   ac_cv_cygwin=yes
1450 else
1451   echo "configure: failed program was:" >&5
1452   cat conftest.$ac_ext >&5
1453   rm -rf conftest*
1454   ac_cv_cygwin=no
1455 fi
1456 rm -f conftest*
1457 rm -f conftest*
1458 fi
1459
1460 echo "$ac_t""$ac_cv_cygwin" 1>&6
1461 CYGWIN=
1462 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1463 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1464 echo "configure:1465: checking for mingw32 environment" >&5
1465 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1466   echo $ac_n "(cached) $ac_c" 1>&6
1467 else
1468   cat > conftest.$ac_ext <<EOF
1469 #line 1470 "configure"
1470 #include "confdefs.h"
1471
1472 int main() {
1473 return __MINGW32__;
1474 ; return 0; }
1475 EOF
1476 if { (eval echo configure:1477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1477   rm -rf conftest*
1478   ac_cv_mingw32=yes
1479 else
1480   echo "configure: failed program was:" >&5
1481   cat conftest.$ac_ext >&5
1482   rm -rf conftest*
1483   ac_cv_mingw32=no
1484 fi
1485 rm -f conftest*
1486 rm -f conftest*
1487 fi
1488
1489 echo "$ac_t""$ac_cv_mingw32" 1>&6
1490 MINGW32=
1491 test "$ac_cv_mingw32" = yes && MINGW32=yes
1492 # Check whether --enable-shared or --disable-shared was given.
1493 if test "${enable_shared+set}" = set; then
1494   enableval="$enable_shared"
1495   p=${PACKAGE-default}
1496 case $enableval in
1497 yes) enable_shared=yes ;;
1498 no) enable_shared=no ;;
1499 *)
1500   enable_shared=no
1501   # Look at the argument we got.  We use all the common list separators.
1502   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1503   for pkg in $enableval; do
1504     if test "X$pkg" = "X$p"; then
1505       enable_shared=yes
1506     fi
1507   done
1508   IFS="$ac_save_ifs"
1509   ;;
1510 esac
1511 else
1512   enable_shared=yes
1513 fi
1514
1515 # Check whether --enable-static or --disable-static was given.
1516 if test "${enable_static+set}" = set; then
1517   enableval="$enable_static"
1518   p=${PACKAGE-default}
1519 case $enableval in
1520 yes) enable_static=yes ;;
1521 no) enable_static=no ;;
1522 *)
1523   enable_static=no
1524   # Look at the argument we got.  We use all the common list separators.
1525   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1526   for pkg in $enableval; do
1527     if test "X$pkg" = "X$p"; then
1528       enable_static=yes
1529     fi
1530   done
1531   IFS="$ac_save_ifs"
1532   ;;
1533 esac
1534 else
1535   enable_static=yes
1536 fi
1537
1538 # Check whether --enable-fast-install or --disable-fast-install was given.
1539 if test "${enable_fast_install+set}" = set; then
1540   enableval="$enable_fast_install"
1541   p=${PACKAGE-default}
1542 case $enableval in
1543 yes) enable_fast_install=yes ;;
1544 no) enable_fast_install=no ;;
1545 *)
1546   enable_fast_install=no
1547   # Look at the argument we got.  We use all the common list separators.
1548   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1549   for pkg in $enableval; do
1550     if test "X$pkg" = "X$p"; then
1551       enable_fast_install=yes
1552     fi
1553   done
1554   IFS="$ac_save_ifs"
1555   ;;
1556 esac
1557 else
1558   enable_fast_install=yes
1559 fi
1560
1561 echo $ac_n "checking build system type""... $ac_c" 1>&6
1562 echo "configure:1563: checking build system type" >&5
1563
1564 build_alias=$build
1565 case "$build_alias" in
1566 NONE)
1567   case $nonopt in
1568   NONE) build_alias=$host_alias ;;
1569   *) build_alias=$nonopt ;;
1570   esac ;;
1571 esac
1572
1573 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1574 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1575 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1576 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1577 echo "$ac_t""$build" 1>&6
1578
1579 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1580 if test "${with_gnu_ld+set}" = set; then
1581   withval="$with_gnu_ld"
1582   test "$withval" = no || with_gnu_ld=yes
1583 else
1584   with_gnu_ld=no
1585 fi
1586
1587 ac_prog=ld
1588 if test "$GCC" = yes; then
1589   # Check if gcc -print-prog-name=ld gives a path.
1590   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1591 echo "configure:1592: checking for ld used by GCC" >&5
1592   case $host in
1593   *-*-mingw*)
1594     # gcc leaves a trailing carriage return which upsets mingw
1595     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1596   *)
1597     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1598   esac
1599   case $ac_prog in
1600     # Accept absolute paths.
1601     [\\/]* | [A-Za-z]:[\\/]*)
1602       re_direlt='/[^/][^/]*/\.\./'
1603       # Canonicalize the path of ld
1604       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1605       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1606         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1607       done
1608       test -z "$LD" && LD="$ac_prog"
1609       ;;
1610   "")
1611     # If it fails, then pretend we aren't using GCC.
1612     ac_prog=ld
1613     ;;
1614   *)
1615     # If it is relative, then search for the first ld in PATH.
1616     with_gnu_ld=unknown
1617     ;;
1618   esac
1619 elif test "$with_gnu_ld" = yes; then
1620   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1621 echo "configure:1622: checking for GNU ld" >&5
1622 else
1623   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1624 echo "configure:1625: checking for non-GNU ld" >&5
1625 fi
1626 if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1627   echo $ac_n "(cached) $ac_c" 1>&6
1628 else
1629   if test -z "$LD"; then
1630   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1631   for ac_dir in $PATH; do
1632     test -z "$ac_dir" && ac_dir=.
1633     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1634       lt_cv_path_LD="$ac_dir/$ac_prog"
1635       # Check to see if the program is GNU ld.  I'd rather use --version,
1636       # but apparently some GNU ld's only accept -v.
1637       # Break only if it was the GNU/non-GNU ld that we prefer.
1638       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1639         test "$with_gnu_ld" != no && break
1640       else
1641         test "$with_gnu_ld" != yes && break
1642       fi
1643     fi
1644   done
1645   IFS="$ac_save_ifs"
1646 else
1647   lt_cv_path_LD="$LD" # Let the user override the test with a path.
1648 fi
1649 fi
1650
1651 LD="$lt_cv_path_LD"
1652 if test -n "$LD"; then
1653   echo "$ac_t""$LD" 1>&6
1654 else
1655   echo "$ac_t""no" 1>&6
1656 fi
1657 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1658 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1659 echo "configure:1660: checking if the linker ($LD) is GNU ld" >&5
1660 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1661   echo $ac_n "(cached) $ac_c" 1>&6
1662 else
1663   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1664 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1665   lt_cv_prog_gnu_ld=yes
1666 else
1667   lt_cv_prog_gnu_ld=no
1668 fi
1669 fi
1670
1671 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1672 with_gnu_ld=$lt_cv_prog_gnu_ld
1673
1674
1675 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1676 echo "configure:1677: checking for $LD option to reload object files" >&5
1677 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1678   echo $ac_n "(cached) $ac_c" 1>&6
1679 else
1680   lt_cv_ld_reload_flag='-r'
1681 fi
1682
1683 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1684 reload_flag=$lt_cv_ld_reload_flag
1685 test -n "$reload_flag" && reload_flag=" $reload_flag"
1686
1687 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1688 echo "configure:1689: checking for BSD-compatible nm" >&5
1689 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1690   echo $ac_n "(cached) $ac_c" 1>&6
1691 else
1692   if test -n "$NM"; then
1693   # Let the user override the test.
1694   lt_cv_path_NM="$NM"
1695 else
1696   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1697   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1698     test -z "$ac_dir" && ac_dir=.
1699     tmp_nm=$ac_dir/${ac_tool_prefix}nm
1700     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1701       # Check to see if the nm accepts a BSD-compat flag.
1702       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1703       #   nm: unknown option "B" ignored
1704       # Tru64's nm complains that /dev/null is an invalid object file
1705       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1706         lt_cv_path_NM="$tmp_nm -B"
1707         break
1708       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1709         lt_cv_path_NM="$tmp_nm -p"
1710         break
1711       else
1712         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1713         continue # so that we can try to find one that supports BSD flags
1714       fi
1715     fi
1716   done
1717   IFS="$ac_save_ifs"
1718   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1719 fi
1720 fi
1721
1722 NM="$lt_cv_path_NM"
1723 echo "$ac_t""$NM" 1>&6
1724
1725 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1726 echo "configure:1727: checking how to recognise dependant libraries" >&5
1727 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1728   echo $ac_n "(cached) $ac_c" 1>&6
1729 else
1730   lt_cv_file_magic_cmd='$MAGIC_CMD'
1731 lt_cv_file_magic_test_file=
1732 lt_cv_deplibs_check_method='unknown'
1733 # Need to set the preceding variable on all platforms that support
1734 # interlibrary dependencies.
1735 # 'none' -- dependencies not supported.
1736 # `unknown' -- same as none, but documents that we really don't know.
1737 # 'pass_all' -- all dependencies passed with no checks.
1738 # 'test_compile' -- check by making test program.
1739 # 'file_magic [[regex]]' -- check by looking for files in library path
1740 # which responds to the $file_magic_cmd with a given egrep regex.
1741 # If you have `file' or equivalent on your system and you're not sure
1742 # whether `pass_all' will *always* work, you probably want this one.
1743
1744 case $host_os in
1745 aix4* | aix5*)
1746   lt_cv_deplibs_check_method=pass_all
1747   ;;
1748
1749 beos*)
1750   lt_cv_deplibs_check_method=pass_all
1751   ;;
1752
1753 bsdi4*)
1754   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1755   lt_cv_file_magic_cmd='/usr/bin/file -L'
1756   lt_cv_file_magic_test_file=/shlib/libc.so
1757   ;;
1758
1759 cygwin* | mingw* | pw32*)
1760   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1761   lt_cv_file_magic_cmd='$OBJDUMP -f'
1762   ;;
1763
1764 darwin* | rhapsody*)
1765   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1766   lt_cv_file_magic_cmd='/usr/bin/file -L'
1767   case "$host_os" in
1768   rhapsody* | darwin1.[012])
1769     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
1770     ;;
1771   *) # Darwin 1.3 on
1772     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1773     ;;
1774   esac
1775   ;;
1776
1777 freebsd*)
1778   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1779     case $host_cpu in
1780     i*86 )
1781       # Not sure whether the presence of OpenBSD here was a mistake.
1782       # Let's accept both of them until this is cleared up.
1783       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1784       lt_cv_file_magic_cmd=/usr/bin/file
1785       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1786       ;;
1787     esac
1788   else
1789     lt_cv_deplibs_check_method=pass_all
1790   fi
1791   ;;
1792
1793 gnu*)
1794   lt_cv_deplibs_check_method=pass_all
1795   ;;
1796
1797 hpux10.20*|hpux11*)
1798   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1799   lt_cv_file_magic_cmd=/usr/bin/file
1800   lt_cv_file_magic_test_file=/usr/lib/libc.sl
1801   ;;
1802
1803 irix5* | irix6* | nonstopux*)
1804   case $host_os in
1805   irix5* | nonstopux*)
1806     # this will be overridden with pass_all, but let us keep it just in case
1807     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1808     ;;
1809   *)
1810     case $LD in
1811     *-32|*"-32 ") libmagic=32-bit;;
1812     *-n32|*"-n32 ") libmagic=N32;;
1813     *-64|*"-64 ") libmagic=64-bit;;
1814     *) libmagic=never-match;;
1815     esac
1816     # this will be overridden with pass_all, but let us keep it just in case
1817     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
1818     ;;
1819   esac
1820   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1821   lt_cv_deplibs_check_method=pass_all
1822   ;;
1823
1824 # This must be Linux ELF.
1825 linux-gnu*)
1826   case $host_cpu in
1827   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
1828     lt_cv_deplibs_check_method=pass_all ;;
1829   *)
1830     # glibc up to 2.1.1 does not perform some relocations on ARM
1831     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
1832   esac
1833   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1834   ;;
1835
1836 netbsd*)
1837   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1838     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1839   else
1840     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
1841   fi
1842   ;;
1843
1844 newos6*)
1845   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
1846   lt_cv_file_magic_cmd=/usr/bin/file
1847   lt_cv_file_magic_test_file=/usr/lib/libnls.so
1848   ;;
1849
1850 openbsd*)
1851   lt_cv_file_magic_cmd=/usr/bin/file
1852   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1853   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1854     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
1855   else
1856     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
1857   fi
1858   ;;
1859
1860 osf3* | osf4* | osf5*)
1861   # this will be overridden with pass_all, but let us keep it just in case
1862   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
1863   lt_cv_file_magic_test_file=/shlib/libc.so
1864   lt_cv_deplibs_check_method=pass_all
1865   ;;
1866
1867 sco3.2v5*)
1868   lt_cv_deplibs_check_method=pass_all
1869   ;;
1870
1871 solaris*)
1872   lt_cv_deplibs_check_method=pass_all
1873   lt_cv_file_magic_test_file=/lib/libc.so
1874   ;;
1875
1876 sysv5uw[78]* | sysv4*uw2*)
1877   lt_cv_deplibs_check_method=pass_all
1878   ;;
1879
1880 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1881   case $host_vendor in
1882   motorola)
1883     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]'
1884     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
1885     ;;
1886   ncr)
1887     lt_cv_deplibs_check_method=pass_all
1888     ;;
1889   sequent)
1890     lt_cv_file_magic_cmd='/bin/file'
1891     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
1892     ;;
1893   sni)
1894     lt_cv_file_magic_cmd='/bin/file'
1895     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
1896     lt_cv_file_magic_test_file=/lib/libc.so
1897     ;;
1898   esac
1899   ;;
1900 esac
1901
1902 fi
1903
1904 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
1905 file_magic_cmd=$lt_cv_file_magic_cmd
1906 deplibs_check_method=$lt_cv_deplibs_check_method
1907
1908 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1909 echo "configure:1910: checking for object suffix" >&5
1910 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1911   echo $ac_n "(cached) $ac_c" 1>&6
1912 else
1913   rm -f conftest*
1914 echo 'int i = 1;' > conftest.$ac_ext
1915 if { (eval echo configure:1916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1916   for ac_file in conftest.*; do
1917     case $ac_file in
1918     *.c) ;;
1919     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1920     esac
1921   done
1922 else
1923   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1924 fi
1925 rm -f conftest*
1926 fi
1927
1928 echo "$ac_t""$ac_cv_objext" 1>&6
1929 OBJEXT=$ac_cv_objext
1930 ac_objext=$ac_cv_objext
1931
1932
1933
1934 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1935 echo "configure:1936: checking for executable suffix" >&5
1936 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1937   echo $ac_n "(cached) $ac_c" 1>&6
1938 else
1939   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1940   ac_cv_exeext=.exe
1941 else
1942   rm -f conftest*
1943   echo 'int main () { return 0; }' > conftest.$ac_ext
1944   ac_cv_exeext=
1945   if { (eval echo configure:1946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1946     for file in conftest.*; do
1947       case $file in
1948       *.c | *.o | *.obj) ;;
1949       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1950       esac
1951     done
1952   else
1953     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1954   fi
1955   rm -f conftest*
1956   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1957 fi
1958 fi
1959
1960 EXEEXT=""
1961 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1962 echo "$ac_t""${ac_cv_exeext}" 1>&6
1963 ac_exeext=$EXEEXT
1964
1965 if test $host != $build; then
1966   ac_tool_prefix=${host_alias}-
1967 else
1968   ac_tool_prefix=
1969 fi
1970
1971
1972
1973
1974 # Check for command to grab the raw symbol name followed by C symbol from nm.
1975 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
1976 echo "configure:1977: checking command to parse $NM output" >&5
1977 if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then
1978   echo $ac_n "(cached) $ac_c" 1>&6
1979 else
1980   
1981 # These are sane defaults that work on at least a few old systems.
1982 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
1983
1984 # Character class describing NM global symbol codes.
1985 symcode='[BCDEGRST]'
1986
1987 # Regexp to match symbols that can be accessed directly from C.
1988 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1989
1990 # Transform the above into a raw symbol and a C symbol.
1991 symxfrm='\1 \2\3 \3'
1992
1993 # Transform an extracted symbol line into a proper C declaration
1994 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1995
1996 # Transform an extracted symbol line into symbol name and symbol address
1997 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'"
1998
1999 # Define system-specific variables.
2000 case $host_os in
2001 aix*)
2002   symcode='[BCDT]'
2003   ;;
2004 cygwin* | mingw* | pw32*)
2005   symcode='[ABCDGISTW]'
2006   ;;
2007 hpux*) # Its linker distinguishes data from code symbols
2008   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
2009   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'"
2010   ;;
2011 irix* | nonstopux*)
2012   symcode='[BCDEGRST]'
2013   ;;
2014 solaris* | sysv5*)
2015   symcode='[BDT]'
2016   ;;
2017 sysv4)
2018   symcode='[DFNSTU]'
2019   ;;
2020 esac
2021
2022 # Handle CRLF in mingw tool chain
2023 opt_cr=
2024 case $host_os in
2025 mingw*)
2026   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
2027   ;;
2028 esac
2029
2030 # If we're using GNU nm, then use its standard symbol codes.
2031 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
2032   symcode='[ABCDGISTW]'
2033 fi
2034
2035 # Try without a prefix undercore, then with it.
2036 for ac_symprfx in "" "_"; do
2037
2038   # Write the raw and C identifiers.
2039 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
2040
2041   # Check to see that the pipe works correctly.
2042   pipe_works=no
2043   rm -f conftest*
2044   cat > conftest.$ac_ext <<EOF
2045 #ifdef __cplusplus
2046 extern "C" {
2047 #endif
2048 char nm_test_var;
2049 void nm_test_func(){}
2050 #ifdef __cplusplus
2051 }
2052 #endif
2053 int main(){nm_test_var='a';nm_test_func();return(0);}
2054 EOF
2055
2056   if { (eval echo configure:2057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2057     # Now try to grab the symbols.
2058     nlist=conftest.nm
2059     if { (eval echo configure:2060: \"$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
2060       # Try sorting and uniquifying the output.
2061       if sort "$nlist" | uniq > "$nlist"T; then
2062         mv -f "$nlist"T "$nlist"
2063       else
2064         rm -f "$nlist"T
2065       fi
2066
2067       # Make sure that we snagged all the symbols we need.
2068       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
2069         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
2070           cat <<EOF > conftest.$ac_ext
2071 #ifdef __cplusplus
2072 extern "C" {
2073 #endif
2074
2075 EOF
2076           # Now generate the symbol file.
2077           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
2078
2079           cat <<EOF >> conftest.$ac_ext
2080 #if defined (__STDC__) && __STDC__
2081 # define lt_ptr void *
2082 #else
2083 # define lt_ptr char *
2084 # define const
2085 #endif
2086
2087 /* The mapping between symbol names and symbols. */
2088 const struct {
2089   const char *name;
2090   lt_ptr address;
2091 }
2092 lt_preloaded_symbols[] =
2093 {
2094 EOF
2095           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
2096           cat <<\EOF >> conftest.$ac_ext
2097   {0, (lt_ptr) 0}
2098 };
2099
2100 #ifdef __cplusplus
2101 }
2102 #endif
2103 EOF
2104           # Now try linking the two files.
2105           mv conftest.$ac_objext conftstm.$ac_objext
2106           save_LIBS="$LIBS"
2107           save_CFLAGS="$CFLAGS"
2108           LIBS="conftstm.$ac_objext"
2109           CFLAGS="$CFLAGS$no_builtin_flag"
2110           if { (eval echo configure:2111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2111             pipe_works=yes
2112           fi
2113           LIBS="$save_LIBS"
2114           CFLAGS="$save_CFLAGS"
2115         else
2116           echo "cannot find nm_test_func in $nlist" >&5
2117         fi
2118       else
2119         echo "cannot find nm_test_var in $nlist" >&5
2120       fi
2121     else
2122       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
2123     fi
2124   else
2125     echo "$progname: failed program was:" >&5
2126     cat conftest.$ac_ext >&5
2127   fi
2128   rm -f conftest* conftst*
2129
2130   # Do not use the global_symbol_pipe unless it works.
2131   if test "$pipe_works" = yes; then
2132     break
2133   else
2134     lt_cv_sys_global_symbol_pipe=
2135   fi
2136 done
2137
2138 fi
2139
2140 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
2141 if test -z "$lt_cv_sys_global_symbol_pipe"; then
2142   global_symbol_to_cdecl=
2143   global_symbol_to_c_name_address=
2144 else
2145   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
2146   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
2147 fi
2148 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
2149 then
2150   echo "$ac_t""failed" 1>&6
2151 else
2152   echo "$ac_t""ok" 1>&6
2153 fi
2154
2155 for ac_hdr in dlfcn.h
2156 do
2157 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2158 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2159 echo "configure:2160: checking for $ac_hdr" >&5
2160 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2161   echo $ac_n "(cached) $ac_c" 1>&6
2162 else
2163   cat > conftest.$ac_ext <<EOF
2164 #line 2165 "configure"
2165 #include "confdefs.h"
2166 #include <$ac_hdr>
2167 EOF
2168 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2169 { (eval echo configure:2170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2170 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2171 if test -z "$ac_err"; then
2172   rm -rf conftest*
2173   eval "ac_cv_header_$ac_safe=yes"
2174 else
2175   echo "$ac_err" >&5
2176   echo "configure: failed program was:" >&5
2177   cat conftest.$ac_ext >&5
2178   rm -rf conftest*
2179   eval "ac_cv_header_$ac_safe=no"
2180 fi
2181 rm -f conftest*
2182 fi
2183 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2184   echo "$ac_t""yes" 1>&6
2185     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2186   cat >> confdefs.h <<EOF
2187 #define $ac_tr_hdr 1
2188 EOF
2189  
2190 else
2191   echo "$ac_t""no" 1>&6
2192 fi
2193 done
2194
2195
2196
2197
2198
2199 # Only perform the check for file, if the check method requires it
2200 case $deplibs_check_method in
2201 file_magic*)
2202   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2203     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
2204 echo "configure:2205: checking for ${ac_tool_prefix}file" >&5
2205 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2206   echo $ac_n "(cached) $ac_c" 1>&6
2207 else
2208   case $MAGIC_CMD in
2209   /*)
2210   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2211   ;;
2212   ?:/*)
2213   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2214   ;;
2215   *)
2216   ac_save_MAGIC_CMD="$MAGIC_CMD"
2217   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2218   ac_dummy="/usr/bin:$PATH"
2219   for ac_dir in $ac_dummy; do
2220     test -z "$ac_dir" && ac_dir=.
2221     if test -f $ac_dir/${ac_tool_prefix}file; then
2222       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
2223       if test -n "$file_magic_test_file"; then
2224         case $deplibs_check_method in
2225         "file_magic "*)
2226           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2227           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2228           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2229             egrep "$file_magic_regex" > /dev/null; then
2230             :
2231           else
2232             cat <<EOF 1>&2
2233
2234 *** Warning: the command libtool uses to detect shared libraries,
2235 *** $file_magic_cmd, produces output that libtool cannot recognize.
2236 *** The result is that libtool may fail to recognize shared libraries
2237 *** as such.  This will affect the creation of libtool libraries that
2238 *** depend on shared libraries, but programs linked with such libtool
2239 *** libraries will work regardless of this problem.  Nevertheless, you
2240 *** may want to report the problem to your system manager and/or to
2241 *** bug-libtool@gnu.org
2242
2243 EOF
2244           fi ;;
2245         esac
2246       fi
2247       break
2248     fi
2249   done
2250   IFS="$ac_save_ifs"
2251   MAGIC_CMD="$ac_save_MAGIC_CMD"
2252   ;;
2253 esac
2254 fi
2255
2256 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2257 if test -n "$MAGIC_CMD"; then
2258   echo "$ac_t""$MAGIC_CMD" 1>&6
2259 else
2260   echo "$ac_t""no" 1>&6
2261 fi
2262
2263 if test -z "$lt_cv_path_MAGIC_CMD"; then
2264   if test -n "$ac_tool_prefix"; then
2265     echo $ac_n "checking for file""... $ac_c" 1>&6
2266 echo "configure:2267: checking for file" >&5
2267 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2268   echo $ac_n "(cached) $ac_c" 1>&6
2269 else
2270   case $MAGIC_CMD in
2271   /*)
2272   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2273   ;;
2274   ?:/*)
2275   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2276   ;;
2277   *)
2278   ac_save_MAGIC_CMD="$MAGIC_CMD"
2279   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2280   ac_dummy="/usr/bin:$PATH"
2281   for ac_dir in $ac_dummy; do
2282     test -z "$ac_dir" && ac_dir=.
2283     if test -f $ac_dir/file; then
2284       lt_cv_path_MAGIC_CMD="$ac_dir/file"
2285       if test -n "$file_magic_test_file"; then
2286         case $deplibs_check_method in
2287         "file_magic "*)
2288           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2289           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2290           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2291             egrep "$file_magic_regex" > /dev/null; then
2292             :
2293           else
2294             cat <<EOF 1>&2
2295
2296 *** Warning: the command libtool uses to detect shared libraries,
2297 *** $file_magic_cmd, produces output that libtool cannot recognize.
2298 *** The result is that libtool may fail to recognize shared libraries
2299 *** as such.  This will affect the creation of libtool libraries that
2300 *** depend on shared libraries, but programs linked with such libtool
2301 *** libraries will work regardless of this problem.  Nevertheless, you
2302 *** may want to report the problem to your system manager and/or to
2303 *** bug-libtool@gnu.org
2304
2305 EOF
2306           fi ;;
2307         esac
2308       fi
2309       break
2310     fi
2311   done
2312   IFS="$ac_save_ifs"
2313   MAGIC_CMD="$ac_save_MAGIC_CMD"
2314   ;;
2315 esac
2316 fi
2317
2318 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2319 if test -n "$MAGIC_CMD"; then
2320   echo "$ac_t""$MAGIC_CMD" 1>&6
2321 else
2322   echo "$ac_t""no" 1>&6
2323 fi
2324
2325   else
2326     MAGIC_CMD=:
2327   fi
2328 fi
2329
2330   fi
2331   ;;
2332 esac
2333
2334 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2335 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2336 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2337 echo "configure:2338: checking for $ac_word" >&5
2338 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2339   echo $ac_n "(cached) $ac_c" 1>&6
2340 else
2341   if test -n "$RANLIB"; then
2342   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2343 else
2344   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2345   ac_dummy="$PATH"
2346   for ac_dir in $ac_dummy; do
2347     test -z "$ac_dir" && ac_dir=.
2348     if test -f $ac_dir/$ac_word; then
2349       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2350       break
2351     fi
2352   done
2353   IFS="$ac_save_ifs"
2354 fi
2355 fi
2356 RANLIB="$ac_cv_prog_RANLIB"
2357 if test -n "$RANLIB"; then
2358   echo "$ac_t""$RANLIB" 1>&6
2359 else
2360   echo "$ac_t""no" 1>&6
2361 fi
2362
2363
2364 if test -z "$ac_cv_prog_RANLIB"; then
2365 if test -n "$ac_tool_prefix"; then
2366   # Extract the first word of "ranlib", so it can be a program name with args.
2367 set dummy ranlib; ac_word=$2
2368 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2369 echo "configure:2370: checking for $ac_word" >&5
2370 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2371   echo $ac_n "(cached) $ac_c" 1>&6
2372 else
2373   if test -n "$RANLIB"; then
2374   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2375 else
2376   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2377   ac_dummy="$PATH"
2378   for ac_dir in $ac_dummy; do
2379     test -z "$ac_dir" && ac_dir=.
2380     if test -f $ac_dir/$ac_word; then
2381       ac_cv_prog_RANLIB="ranlib"
2382       break
2383     fi
2384   done
2385   IFS="$ac_save_ifs"
2386   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2387 fi
2388 fi
2389 RANLIB="$ac_cv_prog_RANLIB"
2390 if test -n "$RANLIB"; then
2391   echo "$ac_t""$RANLIB" 1>&6
2392 else
2393   echo "$ac_t""no" 1>&6
2394 fi
2395
2396 else
2397   RANLIB=":"
2398 fi
2399 fi
2400
2401 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2402 set dummy ${ac_tool_prefix}strip; ac_word=$2
2403 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2404 echo "configure:2405: checking for $ac_word" >&5
2405 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2406   echo $ac_n "(cached) $ac_c" 1>&6
2407 else
2408   if test -n "$STRIP"; then
2409   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2410 else
2411   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2412   ac_dummy="$PATH"
2413   for ac_dir in $ac_dummy; do
2414     test -z "$ac_dir" && ac_dir=.
2415     if test -f $ac_dir/$ac_word; then
2416       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2417       break
2418     fi
2419   done
2420   IFS="$ac_save_ifs"
2421 fi
2422 fi
2423 STRIP="$ac_cv_prog_STRIP"
2424 if test -n "$STRIP"; then
2425   echo "$ac_t""$STRIP" 1>&6
2426 else
2427   echo "$ac_t""no" 1>&6
2428 fi
2429
2430
2431 if test -z "$ac_cv_prog_STRIP"; then
2432 if test -n "$ac_tool_prefix"; then
2433   # Extract the first word of "strip", so it can be a program name with args.
2434 set dummy strip; ac_word=$2
2435 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2436 echo "configure:2437: checking for $ac_word" >&5
2437 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2438   echo $ac_n "(cached) $ac_c" 1>&6
2439 else
2440   if test -n "$STRIP"; then
2441   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2442 else
2443   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2444   ac_dummy="$PATH"
2445   for ac_dir in $ac_dummy; do
2446     test -z "$ac_dir" && ac_dir=.
2447     if test -f $ac_dir/$ac_word; then
2448       ac_cv_prog_STRIP="strip"
2449       break
2450     fi
2451   done
2452   IFS="$ac_save_ifs"
2453   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2454 fi
2455 fi
2456 STRIP="$ac_cv_prog_STRIP"
2457 if test -n "$STRIP"; then
2458   echo "$ac_t""$STRIP" 1>&6
2459 else
2460   echo "$ac_t""no" 1>&6
2461 fi
2462
2463 else
2464   STRIP=":"
2465 fi
2466 fi
2467
2468
2469 enable_dlopen=no
2470 enable_win32_dll=no
2471
2472 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2473 if test "${enable_libtool_lock+set}" = set; then
2474   enableval="$enable_libtool_lock"
2475   :
2476 fi
2477
2478 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2479
2480 # Some flags need to be propagated to the compiler or linker for good
2481 # libtool support.
2482 case $host in
2483 *-*-irix6*)
2484   # Find out which ABI we are using.
2485   echo '#line 2486 "configure"' > conftest.$ac_ext
2486   if { (eval echo configure:2487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2487     case `/usr/bin/file conftest.$ac_objext` in
2488     *32-bit*)
2489       LD="${LD-ld} -32"
2490       ;;
2491     *N32*)
2492       LD="${LD-ld} -n32"
2493       ;;
2494     *64-bit*)
2495       LD="${LD-ld} -64"
2496       ;;
2497     esac
2498   fi
2499   rm -rf conftest*
2500   ;;
2501
2502 *-*-sco3.2v5*)
2503   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2504   SAVE_CFLAGS="$CFLAGS"
2505   CFLAGS="$CFLAGS -belf"
2506   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2507 echo "configure:2508: checking whether the C compiler needs -belf" >&5
2508 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2509   echo $ac_n "(cached) $ac_c" 1>&6
2510 else
2511   
2512      ac_ext=c
2513 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2514 ac_cpp='$CPP $CPPFLAGS'
2515 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2516 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2517 cross_compiling=$ac_cv_prog_cc_cross
2518
2519      cat > conftest.$ac_ext <<EOF
2520 #line 2521 "configure"
2521 #include "confdefs.h"
2522
2523 int main() {
2524
2525 ; return 0; }
2526 EOF
2527 if { (eval echo configure:2528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2528   rm -rf conftest*
2529   lt_cv_cc_needs_belf=yes
2530 else
2531   echo "configure: failed program was:" >&5
2532   cat conftest.$ac_ext >&5
2533   rm -rf conftest*
2534   lt_cv_cc_needs_belf=no
2535 fi
2536 rm -f conftest*
2537      ac_ext=c
2538 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2539 ac_cpp='$CPP $CPPFLAGS'
2540 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2541 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2542 cross_compiling=$ac_cv_prog_cc_cross
2543
2544 fi
2545
2546 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2547   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2548     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2549     CFLAGS="$SAVE_CFLAGS"
2550   fi
2551   ;;
2552
2553
2554 esac
2555
2556 # Sed substitution that helps us do robust quoting.  It backslashifies
2557 # metacharacters that are still active within double-quoted strings.
2558 Xsed='sed -e s/^X//'
2559 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
2560
2561 # Same as above, but do not quote variable references.
2562 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
2563
2564 # Sed substitution to delay expansion of an escaped shell variable in a
2565 # double_quote_subst'ed string.
2566 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2567
2568 # Constants:
2569 rm="rm -f"
2570
2571 # Global variables:
2572 default_ofile=libtool
2573 can_build_shared=yes
2574
2575 # All known linkers require a `.a' archive for static linking (except M$VC,
2576 # which needs '.lib').
2577 libext=a
2578 ltmain="$ac_aux_dir/ltmain.sh"
2579 ofile="$default_ofile"
2580 with_gnu_ld="$lt_cv_prog_gnu_ld"
2581 need_locks="$enable_libtool_lock"
2582
2583 old_CC="$CC"
2584 old_CFLAGS="$CFLAGS"
2585
2586 # Set sane defaults for various variables
2587 test -z "$AR" && AR=ar
2588 test -z "$AR_FLAGS" && AR_FLAGS=cru
2589 test -z "$AS" && AS=as
2590 test -z "$CC" && CC=cc
2591 test -z "$DLLTOOL" && DLLTOOL=dlltool
2592 test -z "$LD" && LD=ld
2593 test -z "$LN_S" && LN_S="ln -s"
2594 test -z "$MAGIC_CMD" && MAGIC_CMD=file
2595 test -z "$NM" && NM=nm
2596 test -z "$OBJDUMP" && OBJDUMP=objdump
2597 test -z "$RANLIB" && RANLIB=:
2598 test -z "$STRIP" && STRIP=:
2599 test -z "$ac_objext" && ac_objext=o
2600
2601 if test x"$host" != x"$build"; then
2602   ac_tool_prefix=${host_alias}-
2603 else
2604   ac_tool_prefix=
2605 fi
2606
2607 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
2608 case $host_os in
2609 linux-gnu*) ;;
2610 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
2611 esac
2612
2613 case $host_os in
2614 aix3*)
2615   # AIX sometimes has problems with the GCC collect2 program.  For some
2616   # reason, if we set the COLLECT_NAMES environment variable, the problems
2617   # vanish in a puff of smoke.
2618   if test "X${COLLECT_NAMES+set}" != Xset; then
2619     COLLECT_NAMES=
2620     export COLLECT_NAMES
2621   fi
2622   ;;
2623 esac
2624
2625 # Determine commands to create old-style static archives.
2626 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
2627 old_postinstall_cmds='chmod 644 $oldlib'
2628 old_postuninstall_cmds=
2629
2630 if test -n "$RANLIB"; then
2631   case $host_os in
2632   openbsd*)
2633     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
2634     ;;
2635   *)
2636     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
2637     ;;
2638   esac
2639   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2640 fi
2641
2642 # Allow CC to be a program name with arguments.
2643 set dummy $CC
2644 compiler="$2"
2645
2646 echo $ac_n "checking for objdir""... $ac_c" 1>&6
2647 echo "configure:2648: checking for objdir" >&5
2648 rm -f .libs 2>/dev/null
2649 mkdir .libs 2>/dev/null
2650 if test -d .libs; then
2651   objdir=.libs
2652 else
2653   # MS-DOS does not allow filenames that begin with a dot.
2654   objdir=_libs
2655 fi
2656 rmdir .libs 2>/dev/null
2657 echo "$ac_t""$objdir" 1>&6
2658
2659
2660 # Check whether --with-pic or --without-pic was given.
2661 if test "${with_pic+set}" = set; then
2662   withval="$with_pic"
2663   pic_mode="$withval"
2664 else
2665   pic_mode=default
2666 fi
2667
2668 test -z "$pic_mode" && pic_mode=default
2669
2670 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
2671 # in isolation, and that seeing it set (from the cache) indicates that
2672 # the associated values are set (in the cache) correctly too.
2673 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
2674 echo "configure:2675: checking for $compiler option to produce PIC" >&5
2675 if eval "test \"`echo '$''{'lt_cv_prog_cc_pic'+set}'`\" = set"; then
2676   echo $ac_n "(cached) $ac_c" 1>&6
2677 else
2678    lt_cv_prog_cc_pic=
2679   lt_cv_prog_cc_shlib=
2680   lt_cv_prog_cc_wl=
2681   lt_cv_prog_cc_static=
2682   lt_cv_prog_cc_no_builtin=
2683   lt_cv_prog_cc_can_build_shared=$can_build_shared
2684
2685   if test "$GCC" = yes; then
2686     lt_cv_prog_cc_wl='-Wl,'
2687     lt_cv_prog_cc_static='-static'
2688
2689     case $host_os in
2690     aix*)
2691       # Below there is a dirty hack to force normal static linking with -ldl
2692       # The problem is because libdl dynamically linked with both libc and
2693       # libC (AIX C++ library), which obviously doesn't included in libraries
2694       # list by gcc. This cause undefined symbols with -static flags.
2695       # This hack allows C programs to be linked with "-static -ldl", but
2696       # not sure about C++ programs.
2697       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
2698       ;;
2699     amigaos*)
2700       # FIXME: we need at least 68020 code to build shared libraries, but
2701       # adding the `-m68020' flag to GCC prevents building anything better,
2702       # like `-m68040'.
2703       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
2704       ;;
2705     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
2706       # PIC is the default for these OSes.
2707       ;;
2708     darwin* | rhapsody*)
2709       # PIC is the default on this platform
2710       # Common symbols not allowed in MH_DYLIB files
2711       lt_cv_prog_cc_pic='-fno-common'
2712       ;;
2713     cygwin* | mingw* | pw32* | os2*)
2714       # This hack is so that the source file can tell whether it is being
2715       # built for inclusion in a dll (and should export symbols for example).
2716       lt_cv_prog_cc_pic='-DDLL_EXPORT'
2717       ;;
2718     sysv4*MP*)
2719       if test -d /usr/nec; then
2720          lt_cv_prog_cc_pic=-Kconform_pic
2721       fi
2722       ;;
2723     *)
2724       lt_cv_prog_cc_pic='-fPIC'
2725       ;;
2726     esac
2727   else
2728     # PORTME Check for PIC flags for the system compiler.
2729     case $host_os in
2730     aix3* | aix4* | aix5*)
2731       lt_cv_prog_cc_wl='-Wl,'
2732       # All AIX code is PIC.
2733       if test "$host_cpu" = ia64; then
2734         # AIX 5 now supports IA64 processor
2735         lt_cv_prog_cc_static='-Bstatic'
2736       else
2737         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
2738       fi
2739       ;;
2740
2741     hpux9* | hpux10* | hpux11*)
2742       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
2743       lt_cv_prog_cc_wl='-Wl,'
2744       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
2745       lt_cv_prog_cc_pic='+Z'
2746       ;;
2747
2748     irix5* | irix6* | nonstopux*)
2749       lt_cv_prog_cc_wl='-Wl,'
2750       lt_cv_prog_cc_static='-non_shared'
2751       # PIC (with -KPIC) is the default.
2752       ;;
2753
2754     cygwin* | mingw* | pw32* | os2*)
2755       # This hack is so that the source file can tell whether it is being
2756       # built for inclusion in a dll (and should export symbols for example).
2757       lt_cv_prog_cc_pic='-DDLL_EXPORT'
2758       ;;
2759
2760     newsos6)
2761       lt_cv_prog_cc_pic='-KPIC'
2762       lt_cv_prog_cc_static='-Bstatic'
2763       ;;
2764
2765     osf3* | osf4* | osf5*)
2766       # All OSF/1 code is PIC.
2767       lt_cv_prog_cc_wl='-Wl,'
2768       lt_cv_prog_cc_static='-non_shared'
2769       ;;
2770
2771     sco3.2v5*)
2772       lt_cv_prog_cc_pic='-Kpic'
2773       lt_cv_prog_cc_static='-dn'
2774       lt_cv_prog_cc_shlib='-belf'
2775       ;;
2776
2777     solaris*)
2778       lt_cv_prog_cc_pic='-KPIC'
2779       lt_cv_prog_cc_static='-Bstatic'
2780       lt_cv_prog_cc_wl='-Wl,'
2781       ;;
2782
2783     sunos4*)
2784       lt_cv_prog_cc_pic='-PIC'
2785       lt_cv_prog_cc_static='-Bstatic'
2786       lt_cv_prog_cc_wl='-Qoption ld '
2787       ;;
2788
2789     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2790       lt_cv_prog_cc_pic='-KPIC'
2791       lt_cv_prog_cc_static='-Bstatic'
2792       if test "x$host_vendor" = xsni; then
2793         lt_cv_prog_cc_wl='-LD'
2794       else
2795         lt_cv_prog_cc_wl='-Wl,'
2796       fi
2797       ;;
2798
2799     uts4*)
2800       lt_cv_prog_cc_pic='-pic'
2801       lt_cv_prog_cc_static='-Bstatic'
2802       ;;
2803
2804     sysv4*MP*)
2805       if test -d /usr/nec ;then
2806         lt_cv_prog_cc_pic='-Kconform_pic'
2807         lt_cv_prog_cc_static='-Bstatic'
2808       fi
2809       ;;
2810
2811     *)
2812       lt_cv_prog_cc_can_build_shared=no
2813       ;;
2814     esac
2815   fi
2816
2817 fi
2818
2819 if test -z "$lt_cv_prog_cc_pic"; then
2820   echo "$ac_t""none" 1>&6
2821 else
2822   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
2823
2824   # Check to make sure the pic_flag actually works.
2825   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
2826 echo "configure:2827: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
2827   if eval "test \"`echo '$''{'lt_cv_prog_cc_pic_works'+set}'`\" = set"; then
2828   echo $ac_n "(cached) $ac_c" 1>&6
2829 else
2830       save_CFLAGS="$CFLAGS"
2831     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
2832     cat > conftest.$ac_ext <<EOF
2833 #line 2834 "configure"
2834 #include "confdefs.h"
2835
2836 int main() {
2837
2838 ; return 0; }
2839 EOF
2840 if { (eval echo configure:2841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2841   rm -rf conftest*
2842         case $host_os in
2843       hpux9* | hpux10* | hpux11*)
2844         # On HP-UX, both CC and GCC only warn that PIC is supported... then
2845         # they create non-PIC objects.  So, if there were any warnings, we
2846         # assume that PIC is not supported.
2847         if test -s conftest.err; then
2848           lt_cv_prog_cc_pic_works=no
2849         else
2850           lt_cv_prog_cc_pic_works=yes
2851         fi
2852         ;;
2853       *)
2854         lt_cv_prog_cc_pic_works=yes
2855         ;;
2856       esac
2857     
2858 else
2859   echo "configure: failed program was:" >&5
2860   cat conftest.$ac_ext >&5
2861   rm -rf conftest*
2862         lt_cv_prog_cc_pic_works=no
2863     
2864 fi
2865 rm -f conftest*
2866     CFLAGS="$save_CFLAGS"
2867   
2868 fi
2869
2870
2871   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
2872     lt_cv_prog_cc_pic=
2873     lt_cv_prog_cc_can_build_shared=no
2874   else
2875     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
2876   fi
2877
2878   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
2879 fi
2880
2881 # Check for any special shared library compilation flags.
2882 if test -n "$lt_cv_prog_cc_shlib"; then
2883   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
2884   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
2885   else
2886    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
2887     lt_cv_prog_cc_can_build_shared=no
2888   fi
2889 fi
2890
2891 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
2892 echo "configure:2893: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
2893 if eval "test \"`echo '$''{'lt_cv_prog_cc_static_works'+set}'`\" = set"; then
2894   echo $ac_n "(cached) $ac_c" 1>&6
2895 else
2896     lt_cv_prog_cc_static_works=no
2897   save_LDFLAGS="$LDFLAGS"
2898   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
2899   cat > conftest.$ac_ext <<EOF
2900 #line 2901 "configure"
2901 #include "confdefs.h"
2902
2903 int main() {
2904
2905 ; return 0; }
2906 EOF
2907 if { (eval echo configure:2908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2908   rm -rf conftest*
2909   lt_cv_prog_cc_static_works=yes
2910 else
2911   echo "configure: failed program was:" >&5
2912   cat conftest.$ac_ext >&5
2913 fi
2914 rm -f conftest*
2915   LDFLAGS="$save_LDFLAGS"
2916
2917 fi
2918
2919
2920 # Belt *and* braces to stop my trousers falling down:
2921 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
2922 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
2923
2924 pic_flag="$lt_cv_prog_cc_pic"
2925 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
2926 wl="$lt_cv_prog_cc_wl"
2927 link_static_flag="$lt_cv_prog_cc_static"
2928 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
2929 can_build_shared="$lt_cv_prog_cc_can_build_shared"
2930
2931
2932 # Check to see if options -o and -c are simultaneously supported by compiler
2933 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
2934 echo "configure:2935: checking if $compiler supports -c -o file.$ac_objext" >&5
2935 if eval "test \"`echo '$''{'lt_cv_compiler_c_o'+set}'`\" = set"; then
2936   echo $ac_n "(cached) $ac_c" 1>&6
2937 else
2938   
2939 $rm -r conftest 2>/dev/null
2940 mkdir conftest
2941 cd conftest
2942 echo "int some_variable = 0;" > conftest.$ac_ext
2943 mkdir out
2944 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
2945 # that will create temporary files in the current directory regardless of
2946 # the output directory.  Thus, making CWD read-only will cause this test
2947 # to fail, enabling locking or at least warning the user not to do parallel
2948 # builds.
2949 chmod -w .
2950 save_CFLAGS="$CFLAGS"
2951 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
2952 compiler_c_o=no
2953 if { (eval echo configure:2954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
2954   # The compiler can only warn and ignore the option if not recognized
2955   # So say no if there are warnings
2956   if test -s out/conftest.err; then
2957     lt_cv_compiler_c_o=no
2958   else
2959     lt_cv_compiler_c_o=yes
2960   fi
2961 else
2962   # Append any errors to the config.log.
2963   cat out/conftest.err 1>&5
2964   lt_cv_compiler_c_o=no
2965 fi
2966 CFLAGS="$save_CFLAGS"
2967 chmod u+w .
2968 $rm conftest* out/*
2969 rmdir out
2970 cd ..
2971 rmdir conftest
2972 $rm -r conftest 2>/dev/null
2973
2974 fi
2975
2976 compiler_c_o=$lt_cv_compiler_c_o
2977 echo "$ac_t""$compiler_c_o" 1>&6
2978
2979 if test x"$compiler_c_o" = x"yes"; then
2980   # Check to see if we can write to a .lo
2981   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
2982 echo "configure:2983: checking if $compiler supports -c -o file.lo" >&5
2983   if eval "test \"`echo '$''{'lt_cv_compiler_o_lo'+set}'`\" = set"; then
2984   echo $ac_n "(cached) $ac_c" 1>&6
2985 else
2986   
2987   lt_cv_compiler_o_lo=no
2988   save_CFLAGS="$CFLAGS"
2989   CFLAGS="$CFLAGS -c -o conftest.lo"
2990   save_objext="$ac_objext"
2991   ac_objext=lo
2992   cat > conftest.$ac_ext <<EOF
2993 #line 2994 "configure"
2994 #include "confdefs.h"
2995
2996 int main() {
2997 int some_variable = 0;
2998 ; return 0; }
2999 EOF
3000 if { (eval echo configure:3001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3001   rm -rf conftest*
3002       # The compiler can only warn and ignore the option if not recognized
3003     # So say no if there are warnings
3004     if test -s conftest.err; then
3005       lt_cv_compiler_o_lo=no
3006     else
3007       lt_cv_compiler_o_lo=yes
3008     fi
3009   
3010 else
3011   echo "configure: failed program was:" >&5
3012   cat conftest.$ac_ext >&5
3013 fi
3014 rm -f conftest*
3015   ac_objext="$save_objext"
3016   CFLAGS="$save_CFLAGS"
3017   
3018 fi
3019
3020   compiler_o_lo=$lt_cv_compiler_o_lo
3021   echo "$ac_t""$compiler_o_lo" 1>&6
3022 else
3023   compiler_o_lo=no
3024 fi
3025
3026 # Check to see if we can do hard links to lock some files if needed
3027 hard_links="nottested"
3028 if test "$compiler_c_o" = no && test "$need_locks" != no; then
3029   # do not overwrite the value of need_locks provided by the user
3030   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
3031 echo "configure:3032: checking if we can lock with hard links" >&5
3032   hard_links=yes
3033   $rm conftest*
3034   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3035   touch conftest.a
3036   ln conftest.a conftest.b 2>&5 || hard_links=no
3037   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3038   echo "$ac_t""$hard_links" 1>&6
3039   if test "$hard_links" = no; then
3040     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
3041     need_locks=warn
3042   fi
3043 else
3044   need_locks=no
3045 fi
3046
3047 if test "$GCC" = yes; then
3048   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
3049   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
3050 echo "configure:3051: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
3051   echo "int some_variable = 0;" > conftest.$ac_ext
3052   save_CFLAGS="$CFLAGS"
3053   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
3054   compiler_rtti_exceptions=no
3055   cat > conftest.$ac_ext <<EOF
3056 #line 3057 "configure"
3057 #include "confdefs.h"
3058
3059 int main() {
3060 int some_variable = 0;
3061 ; return 0; }
3062 EOF
3063 if { (eval echo configure:3064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3064   rm -rf conftest*
3065       # The compiler can only warn and ignore the option if not recognized
3066     # So say no if there are warnings
3067     if test -s conftest.err; then
3068       compiler_rtti_exceptions=no
3069     else
3070       compiler_rtti_exceptions=yes
3071     fi
3072   
3073 else
3074   echo "configure: failed program was:" >&5
3075   cat conftest.$ac_ext >&5
3076 fi
3077 rm -f conftest*
3078   CFLAGS="$save_CFLAGS"
3079   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
3080
3081   if test "$compiler_rtti_exceptions" = "yes"; then
3082     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
3083   else
3084     no_builtin_flag=' -fno-builtin'
3085   fi
3086 fi
3087
3088 # See if the linker supports building shared libraries.
3089 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
3090 echo "configure:3091: checking whether the linker ($LD) supports shared libraries" >&5
3091
3092 allow_undefined_flag=
3093 no_undefined_flag=
3094 need_lib_prefix=unknown
3095 need_version=unknown
3096 # when you set need_version to no, make sure it does not cause -set_version
3097 # flags to be left without arguments
3098 archive_cmds=
3099 archive_expsym_cmds=
3100 old_archive_from_new_cmds=
3101 old_archive_from_expsyms_cmds=
3102 export_dynamic_flag_spec=
3103 whole_archive_flag_spec=
3104 thread_safe_flag_spec=
3105 hardcode_into_libs=no
3106 hardcode_libdir_flag_spec=
3107 hardcode_libdir_separator=
3108 hardcode_direct=no
3109 hardcode_minus_L=no
3110 hardcode_shlibpath_var=unsupported
3111 runpath_var=
3112 link_all_deplibs=unknown
3113 always_export_symbols=no
3114 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
3115 # include_expsyms should be a list of space-separated symbols to be *always*
3116 # included in the symbol list
3117 include_expsyms=
3118 # exclude_expsyms can be an egrep regular expression of symbols to exclude
3119 # it will be wrapped by ` (' and `)$', so one must not match beginning or
3120 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
3121 # as well as any symbol that contains `d'.
3122 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
3123 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
3124 # platforms (ab)use it in PIC code, but their linkers get confused if
3125 # the symbol is explicitly referenced.  Since portable code cannot
3126 # rely on this symbol name, it's probably fine to never include it in
3127 # preloaded symbol tables.
3128 extract_expsyms_cmds=
3129
3130 case $host_os in
3131 cygwin* | mingw* | pw32*)
3132   # FIXME: the MSVC++ port hasn't been tested in a loooong time
3133   # When not using gcc, we currently assume that we are using
3134   # Microsoft Visual C++.
3135   if test "$GCC" != yes; then
3136     with_gnu_ld=no
3137   fi
3138   ;;
3139 openbsd*)
3140   with_gnu_ld=no
3141   ;;
3142 esac
3143
3144 ld_shlibs=yes
3145 if test "$with_gnu_ld" = yes; then
3146   # If archive_cmds runs LD, not CC, wlarc should be empty
3147   wlarc='${wl}'
3148
3149   # See if GNU ld supports shared libraries.
3150   case $host_os in
3151   aix3* | aix4* | aix5*)
3152     # On AIX, the GNU linker is very broken
3153     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
3154     ld_shlibs=no
3155     cat <<EOF 1>&2
3156
3157 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
3158 *** to be unable to reliably create shared libraries on AIX.
3159 *** Therefore, libtool is disabling shared libraries support.  If you
3160 *** really care for shared libraries, you may want to modify your PATH
3161 *** so that a non-GNU linker is found, and then restart.
3162
3163 EOF
3164     ;;
3165
3166   amigaos*)
3167     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)'
3168     hardcode_libdir_flag_spec='-L$libdir'
3169     hardcode_minus_L=yes
3170
3171     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
3172     # that the semantics of dynamic libraries on AmigaOS, at least up
3173     # to version 4, is to share data among multiple programs linked
3174     # with the same dynamic library.  Since this doesn't match the
3175     # behavior of shared libraries on other platforms, we can use
3176     # them.
3177     ld_shlibs=no
3178     ;;
3179
3180   beos*)
3181     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
3182       allow_undefined_flag=unsupported
3183       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3184       # support --undefined.  This deserves some investigation.  FIXME
3185       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3186     else
3187       ld_shlibs=no
3188     fi
3189     ;;
3190
3191   cygwin* | mingw* | pw32*)
3192     # hardcode_libdir_flag_spec is actually meaningless, as there is
3193     # no search path for DLLs.
3194     hardcode_libdir_flag_spec='-L$libdir'
3195     allow_undefined_flag=unsupported
3196     always_export_symbols=yes
3197
3198     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
3199       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
3200       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
3201       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
3202       else $CC -o impgen impgen.c ; fi)~
3203       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
3204
3205     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
3206
3207     # cygwin and mingw dlls have different entry points and sets of symbols
3208     # to exclude.
3209     # FIXME: what about values for MSVC?
3210     dll_entry=__cygwin_dll_entry@12
3211     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
3212     case $host_os in
3213     mingw*)
3214       # mingw values
3215       dll_entry=_DllMainCRTStartup@12
3216       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
3217       ;;
3218     esac
3219
3220     # mingw and cygwin differ, and it's simplest to just exclude the union
3221     # of the two symbol sets.
3222     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
3223
3224     # recent cygwin and mingw systems supply a stub DllMain which the user
3225     # can override, but on older systems we have to supply one (in ltdll.c)
3226     if test "x$lt_cv_need_dllmain" = "xyes"; then
3227       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
3228       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~
3229         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
3230     else
3231       ltdll_obj=
3232       ltdll_cmds=
3233     fi
3234
3235     # Extract the symbol export list from an `--export-all' def file,
3236     # then regenerate the def file from the symbol export list, so that
3237     # the compiled dll only exports the symbol export list.
3238     # Be careful not to strip the DATA tag left be newer dlltools.
3239     export_symbols_cmds="$ltdll_cmds"'
3240       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
3241       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
3242
3243     # If the export-symbols file already is a .def file (1st line
3244     # is EXPORTS), use it as is.
3245     # If DATA tags from a recent dlltool are present, honour them!
3246     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
3247         cp $export_symbols $output_objdir/$soname-def;
3248       else
3249         echo EXPORTS > $output_objdir/$soname-def;
3250         _lt_hint=1;
3251         cat $export_symbols | while read symbol; do
3252          set dummy \$symbol;
3253          case \$# in
3254            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
3255            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
3256          esac;
3257          _lt_hint=`expr 1 + \$_lt_hint`;
3258         done;
3259       fi~
3260       '"$ltdll_cmds"'
3261       $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~
3262       $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~
3263       $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~
3264       $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~
3265       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
3266     ;;
3267
3268   netbsd*)
3269     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3270       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
3271       wlarc=
3272     else
3273       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3274       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3275     fi
3276     ;;
3277
3278   solaris* | sysv5*)
3279     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
3280       ld_shlibs=no
3281       cat <<EOF 1>&2
3282
3283 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
3284 *** create shared libraries on Solaris systems.  Therefore, libtool
3285 *** is disabling shared libraries support.  We urge you to upgrade GNU
3286 *** binutils to release 2.9.1 or newer.  Another option is to modify
3287 *** your PATH or compiler configuration so that the native linker is
3288 *** used, and then restart.
3289
3290 EOF
3291     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
3292       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3293       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3294     else
3295       ld_shlibs=no
3296     fi
3297     ;;
3298
3299   sunos4*)
3300     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3301     wlarc=
3302     hardcode_direct=yes
3303     hardcode_shlibpath_var=no
3304     ;;
3305
3306   *)
3307     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
3308       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3309       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3310     else
3311       ld_shlibs=no
3312     fi
3313     ;;
3314   esac
3315
3316   if test "$ld_shlibs" = yes; then
3317     runpath_var=LD_RUN_PATH
3318     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
3319     export_dynamic_flag_spec='${wl}--export-dynamic'
3320     case $host_os in
3321     cygwin* | mingw* | pw32*)
3322       # dlltool doesn't understand --whole-archive et. al.
3323       whole_archive_flag_spec=
3324       ;;
3325     *)
3326       # ancient GNU ld didn't support --whole-archive et. al.
3327       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
3328         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3329       else
3330         whole_archive_flag_spec=
3331       fi
3332       ;;
3333     esac
3334   fi
3335 else
3336   # PORTME fill in a description of your system's linker (not GNU ld)
3337   case $host_os in
3338   aix3*)
3339     allow_undefined_flag=unsupported
3340     always_export_symbols=yes
3341     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'
3342     # Note: this linker hardcodes the directories in LIBPATH if there
3343     # are no directories specified by -L.
3344     hardcode_minus_L=yes
3345     if test "$GCC" = yes && test -z "$link_static_flag"; then
3346       # Neither direct hardcoding nor static linking is supported with a
3347       # broken collect2.
3348       hardcode_direct=unsupported
3349     fi
3350     ;;
3351
3352   aix4* | aix5*)
3353     if test "$host_cpu" = ia64; then
3354       # On IA64, the linker does run time linking by default, so we don't
3355       # have to do anything special.
3356       aix_use_runtimelinking=no
3357       exp_sym_flag='-Bexport'
3358       no_entry_flag=""
3359     else
3360       aix_use_runtimelinking=no
3361
3362       # Test if we are trying to use run time linking or normal
3363       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3364       # need to do runtime linking.
3365       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
3366         for ld_flag in $LDFLAGS; do
3367           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
3368             aix_use_runtimelinking=yes
3369             break
3370           fi
3371         done
3372       esac
3373
3374       exp_sym_flag='-bexport'
3375       no_entry_flag='-bnoentry'
3376     fi
3377
3378     # When large executables or shared objects are built, AIX ld can
3379     # have problems creating the table of contents.  If linking a library
3380     # or program results in "error TOC overflow" add -mminimal-toc to
3381     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3382     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3383
3384     hardcode_direct=yes
3385     archive_cmds=''
3386     hardcode_libdir_separator=':'
3387     if test "$GCC" = yes; then
3388       case $host_os in aix4.[012]|aix4.[012].*)
3389         collect2name=`${CC} -print-prog-name=collect2`
3390         if test -f "$collect2name" && \
3391           strings "$collect2name" | grep resolve_lib_name >/dev/null
3392         then
3393           # We have reworked collect2
3394           hardcode_direct=yes
3395         else
3396           # We have old collect2
3397           hardcode_direct=unsupported
3398           # It fails to find uninstalled libraries when the uninstalled
3399           # path is not listed in the libpath.  Setting hardcode_minus_L
3400           # to unsupported forces relinking
3401           hardcode_minus_L=yes
3402           hardcode_libdir_flag_spec='-L$libdir'
3403           hardcode_libdir_separator=
3404         fi
3405       esac
3406
3407       shared_flag='-shared'
3408     else
3409       # not using gcc
3410       if test "$host_cpu" = ia64; then
3411         shared_flag='${wl}-G'
3412       else
3413         if test "$aix_use_runtimelinking" = yes; then
3414           shared_flag='${wl}-G'
3415         else
3416           shared_flag='${wl}-bM:SRE'
3417         fi
3418       fi
3419     fi
3420
3421     # It seems that -bexpall can do strange things, so it is better to
3422     # generate a list of symbols to export.
3423     always_export_symbols=yes
3424     if test "$aix_use_runtimelinking" = yes; then
3425       # Warning - without using the other runtime loading flags (-brtl),
3426       # -berok will link without error, but may produce a broken library.
3427       allow_undefined_flag='-berok'
3428       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
3429       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"
3430     else
3431       if test "$host_cpu" = ia64; then
3432         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
3433         allow_undefined_flag="-z nodefs"
3434         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"
3435       else
3436         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
3437         # Warning - without using the other run time loading flags,
3438         # -berok will link without error, but may produce a broken library.
3439         allow_undefined_flag='${wl}-berok'
3440         # This is a bit strange, but is similar to how AIX traditionally builds
3441         # it's shared libraries.
3442         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'
3443       fi
3444     fi
3445     ;;
3446
3447   amigaos*)
3448     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)'
3449     hardcode_libdir_flag_spec='-L$libdir'
3450     hardcode_minus_L=yes
3451     # see comment about different semantics on the GNU ld section
3452     ld_shlibs=no
3453     ;;
3454
3455   cygwin* | mingw* | pw32*)
3456     # When not using gcc, we currently assume that we are using
3457     # Microsoft Visual C++.
3458     # hardcode_libdir_flag_spec is actually meaningless, as there is
3459     # no search path for DLLs.
3460     hardcode_libdir_flag_spec=' '
3461     allow_undefined_flag=unsupported
3462     # Tell ltmain to make .lib files, not .a files.
3463     libext=lib
3464     # FIXME: Setting linknames here is a bad hack.
3465     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
3466     # The linker will automatically build a .lib file if we build a DLL.
3467     old_archive_from_new_cmds='true'
3468     # FIXME: Should let the user specify the lib program.
3469     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
3470     fix_srcfile_path='`cygpath -w "$srcfile"`'
3471     ;;
3472
3473   darwin* | rhapsody*)
3474     case "$host_os" in
3475     rhapsody* | darwin1.[012])
3476       allow_undefined_flag='-undefined suppress'
3477       ;;
3478     *) # Darwin 1.3 on
3479       allow_undefined_flag='-flat_namespace -undefined suppress'
3480       ;;
3481     esac
3482     # FIXME: Relying on posixy $() will cause problems for
3483     #        cross-compilation, but unfortunately the echo tests do not
3484     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
3485     #        `"' quotes if we put them in here... so don't!
3486     archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
3487     # We need to add '_' to the symbols in $export_symbols first
3488     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
3489     hardcode_direct=yes
3490     hardcode_shlibpath_var=no
3491     whole_archive_flag_spec='-all_load $convenience'
3492     ;;
3493
3494   freebsd1*)
3495     ld_shlibs=no
3496     ;;
3497
3498   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
3499   # support.  Future versions do this automatically, but an explicit c++rt0.o
3500   # does not break anything, and helps significantly (at the cost of a little
3501   # extra space).
3502   freebsd2.2*)
3503     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
3504     hardcode_libdir_flag_spec='-R$libdir'
3505     hardcode_direct=yes
3506     hardcode_shlibpath_var=no
3507     ;;
3508
3509   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
3510   freebsd2*)
3511     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3512     hardcode_direct=yes
3513     hardcode_minus_L=yes
3514     hardcode_shlibpath_var=no
3515     ;;
3516
3517   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
3518   freebsd*)
3519     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
3520     hardcode_libdir_flag_spec='-R$libdir'
3521     hardcode_direct=yes
3522     hardcode_shlibpath_var=no
3523     ;;
3524
3525   hpux9* | hpux10* | hpux11*)
3526     case $host_os in
3527     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' ;;
3528     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
3529     esac
3530     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
3531     hardcode_libdir_separator=:
3532     hardcode_direct=yes
3533     hardcode_minus_L=yes # Not in the search PATH, but as the default
3534                          # location of the library.
3535     export_dynamic_flag_spec='${wl}-E'
3536     ;;
3537
3538   irix5* | irix6* | nonstopux*)
3539     if test "$GCC" = yes; then
3540       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'
3541     else
3542       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'
3543     fi
3544     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
3545     hardcode_libdir_separator=:
3546     link_all_deplibs=yes
3547     ;;
3548
3549   netbsd*)
3550     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3551       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
3552     else
3553       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
3554     fi
3555     hardcode_libdir_flag_spec='-R$libdir'
3556     hardcode_direct=yes
3557     hardcode_shlibpath_var=no
3558     ;;
3559
3560   newsos6)
3561     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3562     hardcode_direct=yes
3563     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
3564     hardcode_libdir_separator=:
3565     hardcode_shlibpath_var=no
3566     ;;
3567
3568   openbsd*)
3569     hardcode_direct=yes
3570     hardcode_shlibpath_var=no
3571     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3572       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
3573       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
3574       export_dynamic_flag_spec='${wl}-E'
3575     else
3576       case "$host_os" in
3577       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
3578         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3579         hardcode_libdir_flag_spec='-R$libdir'
3580         ;;
3581       *)
3582         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
3583         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
3584         ;;
3585       esac
3586     fi
3587     ;;
3588
3589   os2*)
3590     hardcode_libdir_flag_spec='-L$libdir'
3591     hardcode_minus_L=yes
3592     allow_undefined_flag=unsupported
3593     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'
3594     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
3595     ;;
3596
3597   osf3*)
3598     if test "$GCC" = yes; then
3599       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
3600       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'
3601     else
3602       allow_undefined_flag=' -expect_unresolved \*'
3603       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'
3604     fi
3605     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
3606     hardcode_libdir_separator=:
3607     ;;
3608
3609   osf4* | osf5*)        # as osf3* with the addition of -msym flag
3610     if test "$GCC" = yes; then
3611       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
3612       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'
3613       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
3614     else
3615       allow_undefined_flag=' -expect_unresolved \*'
3616       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'
3617       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
3618       $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'
3619
3620       #Both c and cxx compiler support -rpath directly
3621       hardcode_libdir_flag_spec='-rpath $libdir'
3622     fi
3623     hardcode_libdir_separator=:
3624     ;;
3625
3626   sco3.2v5*)
3627     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3628     hardcode_shlibpath_var=no
3629     runpath_var=LD_RUN_PATH
3630     hardcode_runpath_var=yes
3631     export_dynamic_flag_spec='${wl}-Bexport'
3632     ;;
3633
3634   solaris*)
3635     # gcc --version < 3.0 without binutils cannot create self contained
3636     # shared libraries reliably, requiring libgcc.a to resolve some of
3637     # the object symbols generated in some cases.  Libraries that use
3638     # assert need libgcc.a to resolve __eprintf, for example.  Linking
3639     # a copy of libgcc.a into every shared library to guarantee resolving
3640     # such symbols causes other problems:  According to Tim Van Holder
3641     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
3642     # (to the application) exception stack for one thing.
3643     no_undefined_flag=' -z defs'
3644     if test "$GCC" = yes; then
3645       case `$CC --version 2>/dev/null` in
3646       [12].*)
3647         cat <<EOF 1>&2
3648
3649 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
3650 *** create self contained shared libraries on Solaris systems, without
3651 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
3652 *** -no-undefined support, which will at least allow you to build shared
3653 *** libraries.  However, you may find that when you link such libraries
3654 *** into an application without using GCC, you have to manually add
3655 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
3656 *** upgrade to a newer version of GCC.  Another option is to rebuild your
3657 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
3658
3659 EOF
3660         no_undefined_flag=
3661         ;;
3662       esac
3663     fi
3664     # $CC -shared without GNU ld will not create a library from C++
3665     # object files and a static libstdc++, better avoid it by now
3666     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
3667     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3668                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
3669     hardcode_libdir_flag_spec='-R$libdir'
3670     hardcode_shlibpath_var=no
3671     case $host_os in
3672     solaris2.[0-5] | solaris2.[0-5].*) ;;
3673     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
3674       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
3675     esac
3676     link_all_deplibs=yes
3677     ;;
3678
3679   sunos4*)
3680     if test "x$host_vendor" = xsequent; then
3681       # Use $CC to link under sequent, because it throws in some extra .o
3682       # files that make .init and .fini sections work.
3683       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
3684     else
3685       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
3686     fi
3687     hardcode_libdir_flag_spec='-L$libdir'
3688     hardcode_direct=yes
3689     hardcode_minus_L=yes
3690     hardcode_shlibpath_var=no
3691     ;;
3692
3693   sysv4)
3694     if test "x$host_vendor" = xsno; then
3695       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
3696       hardcode_direct=yes # is this really true???
3697     else
3698       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3699       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
3700     fi
3701     runpath_var='LD_RUN_PATH'
3702     hardcode_shlibpath_var=no
3703     ;;
3704
3705   sysv4.3*)
3706     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3707     hardcode_shlibpath_var=no
3708     export_dynamic_flag_spec='-Bexport'
3709     ;;
3710
3711   sysv5*)
3712     no_undefined_flag=' -z text'
3713     # $CC -shared without GNU ld will not create a library from C++
3714     # object files and a static libstdc++, better avoid it by now
3715     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
3716     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3717                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
3718     hardcode_libdir_flag_spec=
3719     hardcode_shlibpath_var=no
3720     runpath_var='LD_RUN_PATH'
3721     ;;
3722
3723   uts4*)
3724     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3725     hardcode_libdir_flag_spec='-L$libdir'
3726     hardcode_shlibpath_var=no
3727     ;;
3728
3729   dgux*)
3730     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3731     hardcode_libdir_flag_spec='-L$libdir'
3732     hardcode_shlibpath_var=no
3733     ;;
3734
3735   sysv4*MP*)
3736     if test -d /usr/nec; then
3737       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3738       hardcode_shlibpath_var=no
3739       runpath_var=LD_RUN_PATH
3740       hardcode_runpath_var=yes
3741       ld_shlibs=yes
3742     fi
3743     ;;
3744
3745   sysv4.2uw2*)
3746     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
3747     hardcode_direct=yes
3748     hardcode_minus_L=no
3749     hardcode_shlibpath_var=no
3750     hardcode_runpath_var=yes
3751     runpath_var=LD_RUN_PATH
3752     ;;
3753
3754   sysv5uw7* | unixware7*)
3755     no_undefined_flag='${wl}-z ${wl}text'
3756     if test "$GCC" = yes; then
3757       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
3758     else
3759       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
3760     fi
3761     runpath_var='LD_RUN_PATH'
3762     hardcode_shlibpath_var=no
3763     ;;
3764
3765   *)
3766     ld_shlibs=no
3767     ;;
3768   esac
3769 fi
3770 echo "$ac_t""$ld_shlibs" 1>&6
3771 test "$ld_shlibs" = no && can_build_shared=no
3772
3773 # Check hardcoding attributes.
3774 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
3775 echo "configure:3776: checking how to hardcode library paths into programs" >&5
3776 hardcode_action=
3777 if test -n "$hardcode_libdir_flag_spec" || \
3778    test -n "$runpath_var"; then
3779
3780   # We can hardcode non-existant directories.
3781   if test "$hardcode_direct" != no &&
3782      # If the only mechanism to avoid hardcoding is shlibpath_var, we
3783      # have to relink, otherwise we might link with an installed library
3784      # when we should be linking with a yet-to-be-installed one
3785      ## test "$hardcode_shlibpath_var" != no &&
3786      test "$hardcode_minus_L" != no; then
3787     # Linking always hardcodes the temporary library directory.
3788     hardcode_action=relink
3789   else
3790     # We can link without hardcoding, and we can hardcode nonexisting dirs.
3791     hardcode_action=immediate
3792   fi
3793 else
3794   # We cannot hardcode anything, or else we can only hardcode existing
3795   # directories.
3796   hardcode_action=unsupported
3797 fi
3798 echo "$ac_t""$hardcode_action" 1>&6
3799
3800 striplib=
3801 old_striplib=
3802 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
3803 echo "configure:3804: checking whether stripping libraries is possible" >&5
3804 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
3805   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3806   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3807   echo "$ac_t""yes" 1>&6
3808 else
3809   echo "$ac_t""no" 1>&6
3810 fi
3811
3812 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3813 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3814
3815 # PORTME Fill in your ld.so characteristics
3816 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
3817 echo "configure:3818: checking dynamic linker characteristics" >&5
3818 library_names_spec=
3819 libname_spec='lib$name'
3820 soname_spec=
3821 postinstall_cmds=
3822 postuninstall_cmds=
3823 finish_cmds=
3824 finish_eval=
3825 shlibpath_var=
3826 shlibpath_overrides_runpath=unknown
3827 version_type=none
3828 dynamic_linker="$host_os ld.so"
3829 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3830 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3831
3832 case $host_os in
3833 aix3*)
3834   version_type=linux
3835   library_names_spec='${libname}${release}.so$versuffix $libname.a'
3836   shlibpath_var=LIBPATH
3837
3838   # AIX has no versioning support, so we append a major version to the name.
3839   soname_spec='${libname}${release}.so$major'
3840   ;;
3841
3842 aix4* | aix5*)
3843   version_type=linux
3844   if test "$host_cpu" = ia64; then
3845     # AIX 5 supports IA64
3846     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
3847     shlibpath_var=LD_LIBRARY_PATH
3848   else
3849     # With GCC up to 2.95.x, collect2 would create an import file
3850     # for dependence libraries.  The import file would start with
3851     # the line `#! .'.  This would cause the generated library to
3852     # depend on `.', always an invalid library.  This was fixed in
3853     # development snapshots of GCC prior to 3.0.
3854     case $host_os in
3855       aix4 | aix4.[01] | aix4.[01].*)
3856         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3857              echo ' yes '
3858              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
3859           :
3860         else
3861           can_build_shared=no
3862         fi
3863         ;;
3864     esac
3865     # AIX (on Power*) has no versioning support, so currently we can
3866     # not hardcode correct soname into executable. Probably we can
3867     # add versioning support to collect2, so additional links can
3868     # be useful in future.
3869     if test "$aix_use_runtimelinking" = yes; then
3870       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3871       # instead of lib<name>.a to let people know that these are not
3872       # typical AIX shared libraries.
3873       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3874     else
3875       # We preserve .a as extension for shared libraries through AIX4.2
3876       # and later when we are not doing run time linking.
3877       library_names_spec='${libname}${release}.a $libname.a'
3878       soname_spec='${libname}${release}.so$major'
3879     fi
3880     shlibpath_var=LIBPATH
3881   fi
3882   ;;
3883
3884 amigaos*)
3885   library_names_spec='$libname.ixlibrary $libname.a'
3886   # Create ${libname}_ixlibrary.a entries in /sys/libs.
3887   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'
3888   ;;
3889
3890 beos*)
3891   library_names_spec='${libname}.so'
3892   dynamic_linker="$host_os ld.so"
3893   shlibpath_var=LIBRARY_PATH
3894   ;;
3895
3896 bsdi4*)
3897   version_type=linux
3898   need_version=no
3899   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3900   soname_spec='${libname}${release}.so$major'
3901   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3902   shlibpath_var=LD_LIBRARY_PATH
3903   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3904   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3905   export_dynamic_flag_spec=-rdynamic
3906   # the default ld.so.conf also contains /usr/contrib/lib and
3907   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3908   # libtool to hard-code these into programs
3909   ;;
3910
3911 cygwin* | mingw* | pw32*)
3912   version_type=windows
3913   need_version=no
3914   need_lib_prefix=no
3915   case $GCC,$host_os in
3916   yes,cygwin*)
3917     library_names_spec='$libname.dll.a'
3918     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
3919     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
3920       dldir=$destdir/`dirname \$dlpath`~
3921       test -d \$dldir || mkdir -p \$dldir~
3922       $install_prog .libs/$dlname \$dldir/$dlname'
3923     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
3924       dlpath=$dir/\$dldll~
3925        $rm \$dlpath'
3926     ;;
3927   yes,mingw*)
3928     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
3929     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
3930     ;;
3931   yes,pw32*)
3932     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
3933     ;;
3934   *)
3935     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
3936     ;;
3937   esac
3938   dynamic_linker='Win32 ld.exe'
3939   # FIXME: first we should search . and the directory the executable is in
3940   shlibpath_var=PATH
3941   ;;
3942
3943 darwin* | rhapsody*)
3944   dynamic_linker="$host_os dyld"
3945   version_type=darwin
3946   need_lib_prefix=no
3947   need_version=no
3948   # FIXME: Relying on posixy $() will cause problems for
3949   #        cross-compilation, but unfortunately the echo tests do not
3950   #        yet detect zsh echo's removal of \ escapes.
3951   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)'
3952   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
3953   shlibpath_overrides_runpath=yes
3954   shlibpath_var=DYLD_LIBRARY_PATH
3955   ;;
3956
3957 freebsd1*)
3958   dynamic_linker=no
3959   ;;
3960
3961 freebsd*)
3962   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
3963   version_type=freebsd-$objformat
3964   case $version_type in
3965     freebsd-elf*)
3966       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
3967       need_version=no
3968       need_lib_prefix=no
3969       ;;
3970     freebsd-*)
3971       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
3972       need_version=yes
3973       ;;
3974   esac
3975   shlibpath_var=LD_LIBRARY_PATH
3976   case $host_os in
3977   freebsd2*)
3978     shlibpath_overrides_runpath=yes
3979     ;;
3980   *)
3981     shlibpath_overrides_runpath=no
3982     hardcode_into_libs=yes
3983     ;;
3984   esac
3985   ;;
3986
3987 gnu*)
3988   version_type=linux
3989   need_lib_prefix=no
3990   need_version=no
3991   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
3992   soname_spec='${libname}${release}.so$major'
3993   shlibpath_var=LD_LIBRARY_PATH
3994   hardcode_into_libs=yes
3995   ;;
3996
3997 hpux9* | hpux10* | hpux11*)
3998   # Give a soname corresponding to the major version so that dld.sl refuses to
3999   # link against other versions.
4000   dynamic_linker="$host_os dld.sl"
4001   version_type=sunos
4002   need_lib_prefix=no
4003   need_version=no
4004   shlibpath_var=SHLIB_PATH
4005   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4006   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
4007   soname_spec='${libname}${release}.sl$major'
4008   # HP-UX runs *really* slowly unless shared libraries are mode 555.
4009   postinstall_cmds='chmod 555 $lib'
4010   ;;