Generated from configure.in
[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-shared[=PKGS]  build shared libraries [default=yes]"
20 ac_help="$ac_help
21   --enable-static[=PKGS]  build static libraries [default=yes]"
22 ac_help="$ac_help
23   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
24 ac_help="$ac_help
25   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
26
27 # Find the correct PATH separator.  Usually this is `:', but
28 # DJGPP uses `;' like DOS.
29 if test "X${PATH_SEPARATOR+set}" != Xset; then
30   UNAME=${UNAME-`uname 2>/dev/null`}
31   case X$UNAME in
32     *-DOS) lt_cv_sys_path_separator=';' ;;
33     *)     lt_cv_sys_path_separator=':' ;;
34   esac
35   PATH_SEPARATOR=$lt_cv_sys_path_separator
36 fi
37
38
39 # Check that we are running under the correct shell.
40 SHELL=${CONFIG_SHELL-/bin/sh}
41
42 case X$ECHO in
43 X*--fallback-echo)
44   # Remove one level of quotation (which was required for Make).
45   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
46   ;;
47 esac
48
49 echo=${ECHO-echo}
50 if test "X$1" = X--no-reexec; then
51   # Discard the --no-reexec flag, and continue.
52   shift
53 elif test "X$1" = X--fallback-echo; then
54   # Avoid inline document here, it may be left over
55   :
56 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
57   # Yippee, $echo works!
58   :
59 else
60   # Restart under the correct shell.
61   exec $SHELL "$0" --no-reexec ${1+"$@"}
62 fi
63
64 if test "X$1" = X--fallback-echo; then
65   # used as fallback echo
66   shift
67   cat <<EOF
68
69 EOF
70   exit 0
71 fi
72
73 # The HP-UX ksh and POSIX shell print the target directory to stdout
74 # if CDPATH is set.
75 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
76
77 if test -z "$ECHO"; then
78 if test "X${echo_test_string+set}" != Xset; then
79 # find a string as large as possible, as long as the shell can cope with it
80   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
81     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
82     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
83        echo_test_string="`eval $cmd`" &&
84        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
85     then
86       break
87     fi
88   done
89 fi
90
91 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
92    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
93    test "X$echo_testing_string" = "X$echo_test_string"; then
94   :
95 else
96   # The Solaris, AIX, and Digital Unix default echo programs unquote
97   # backslashes.  This makes it impossible to quote backslashes using
98   #   echo "$something" | sed 's/\\/\\\\/g'
99   #
100   # So, first we look for a working echo in the user's PATH.
101
102   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
103   for dir in $PATH /usr/ucb; do
104     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
105        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
106        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
107        test "X$echo_testing_string" = "X$echo_test_string"; then
108       echo="$dir/echo"
109       break
110     fi
111   done
112   IFS="$save_ifs"
113
114   if test "X$echo" = Xecho; then
115     # We didn't find a better echo, so look for alternatives.
116     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
117        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
118        test "X$echo_testing_string" = "X$echo_test_string"; then
119       # This shell has a builtin print -r that does the trick.
120       echo='print -r'
121     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
122          test "X$CONFIG_SHELL" != X/bin/ksh; then
123       # If we have ksh, try running configure again with it.
124       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
125       export ORIGINAL_CONFIG_SHELL
126       CONFIG_SHELL=/bin/ksh
127       export CONFIG_SHELL
128       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
129     else
130       # Try using printf.
131       echo='printf %s\n'
132       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
133          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
134          test "X$echo_testing_string" = "X$echo_test_string"; then
135         # Cool, printf works
136         :
137       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
138            test "X$echo_testing_string" = 'X\t' &&
139            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
140            test "X$echo_testing_string" = "X$echo_test_string"; then
141         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
142         export CONFIG_SHELL
143         SHELL="$CONFIG_SHELL"
144         export SHELL
145         echo="$CONFIG_SHELL $0 --fallback-echo"
146       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
147            test "X$echo_testing_string" = 'X\t' &&
148            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
149            test "X$echo_testing_string" = "X$echo_test_string"; then
150         echo="$CONFIG_SHELL $0 --fallback-echo"
151       else
152         # maybe with a smaller string...
153         prev=:
154
155         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
156           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
157           then
158             break
159           fi
160           prev="$cmd"
161         done
162
163         if test "$prev" != 'sed 50q "$0"'; then
164           echo_test_string=`eval $prev`
165           export echo_test_string
166           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
167         else
168           # Oops.  We lost completely, so just stick with echo.
169           echo=echo
170         fi
171       fi
172     fi
173   fi
174 fi
175 fi
176
177 # Copy echo and quote the copy suitably for passing to libtool from
178 # the Makefile, instead of quoting the original, which is used later.
179 ECHO=$echo
180 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
181    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
182 fi
183
184
185 ac_help="$ac_help
186   --disable-libtool-lock  avoid locking (might break parallel builds)"
187 ac_help="$ac_help
188   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
189
190 # Initialize some variables set by options.
191 # The variables have the same names as the options, with
192 # dashes changed to underlines.
193 build=NONE
194 cache_file=./config.cache
195 exec_prefix=NONE
196 host=NONE
197 no_create=
198 nonopt=NONE
199 no_recursion=
200 prefix=NONE
201 program_prefix=NONE
202 program_suffix=NONE
203 program_transform_name=s,x,x,
204 silent=
205 site=
206 srcdir=
207 target=NONE
208 verbose=
209 x_includes=NONE
210 x_libraries=NONE
211 bindir='${exec_prefix}/bin'
212 sbindir='${exec_prefix}/sbin'
213 libexecdir='${exec_prefix}/libexec'
214 datadir='${prefix}/share'
215 sysconfdir='${prefix}/etc'
216 sharedstatedir='${prefix}/com'
217 localstatedir='${prefix}/var'
218 libdir='${exec_prefix}/lib'
219 includedir='${prefix}/include'
220 oldincludedir='/usr/include'
221 infodir='${prefix}/info'
222 mandir='${prefix}/man'
223
224 # Initialize some other variables.
225 subdirs=
226 MFLAGS= MAKEFLAGS=
227 SHELL=${CONFIG_SHELL-/bin/sh}
228 # Maximum number of lines to put in a shell here document.
229 ac_max_here_lines=12
230
231 ac_prev=
232 for ac_option
233 do
234
235   # If the previous option needs an argument, assign it.
236   if test -n "$ac_prev"; then
237     eval "$ac_prev=\$ac_option"
238     ac_prev=
239     continue
240   fi
241
242   case "$ac_option" in
243   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
244   *) ac_optarg= ;;
245   esac
246
247   # Accept the important Cygnus configure options, so we can diagnose typos.
248
249   case "$ac_option" in
250
251   -bindir | --bindir | --bindi | --bind | --bin | --bi)
252     ac_prev=bindir ;;
253   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
254     bindir="$ac_optarg" ;;
255
256   -build | --build | --buil | --bui | --bu)
257     ac_prev=build ;;
258   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
259     build="$ac_optarg" ;;
260
261   -cache-file | --cache-file | --cache-fil | --cache-fi \
262   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
263     ac_prev=cache_file ;;
264   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
265   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
266     cache_file="$ac_optarg" ;;
267
268   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
269     ac_prev=datadir ;;
270   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
271   | --da=*)
272     datadir="$ac_optarg" ;;
273
274   -disable-* | --disable-*)
275     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
276     # Reject names that are not valid shell variable names.
277     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
278       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
279     fi
280     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
281     eval "enable_${ac_feature}=no" ;;
282
283   -enable-* | --enable-*)
284     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
285     # Reject names that are not valid shell variable names.
286     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
287       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
288     fi
289     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
290     case "$ac_option" in
291       *=*) ;;
292       *) ac_optarg=yes ;;
293     esac
294     eval "enable_${ac_feature}='$ac_optarg'" ;;
295
296   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
297   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
298   | --exec | --exe | --ex)
299     ac_prev=exec_prefix ;;
300   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
301   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
302   | --exec=* | --exe=* | --ex=*)
303     exec_prefix="$ac_optarg" ;;
304
305   -gas | --gas | --ga | --g)
306     # Obsolete; use --with-gas.
307     with_gas=yes ;;
308
309   -help | --help | --hel | --he)
310     # Omit some internal or obsolete options to make the list less imposing.
311     # This message is too long to be a string in the A/UX 3.1 sh.
312     cat << EOF
313 Usage: configure [options] [host]
314 Options: [defaults in brackets after descriptions]
315 Configuration:
316   --cache-file=FILE       cache test results in FILE
317   --help                  print this message
318   --no-create             do not create output files
319   --quiet, --silent       do not print \`checking...' messages
320   --version               print the version of autoconf that created configure
321 Directory and file names:
322   --prefix=PREFIX         install architecture-independent files in PREFIX
323                           [$ac_default_prefix]
324   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
325                           [same as prefix]
326   --bindir=DIR            user executables in DIR [EPREFIX/bin]
327   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
328   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
329   --datadir=DIR           read-only architecture-independent data in DIR
330                           [PREFIX/share]
331   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
332   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
333                           [PREFIX/com]
334   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
335   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
336   --includedir=DIR        C header files in DIR [PREFIX/include]
337   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
338   --infodir=DIR           info documentation in DIR [PREFIX/info]
339   --mandir=DIR            man documentation in DIR [PREFIX/man]
340   --srcdir=DIR            find the sources in DIR [configure dir or ..]
341   --program-prefix=PREFIX prepend PREFIX to installed program names
342   --program-suffix=SUFFIX append SUFFIX to installed program names
343   --program-transform-name=PROGRAM
344                           run sed PROGRAM on installed program names
345 EOF
346     cat << EOF
347 Host type:
348   --build=BUILD           configure for building on BUILD [BUILD=HOST]
349   --host=HOST             configure for HOST [guessed]
350   --target=TARGET         configure for TARGET [TARGET=HOST]
351 Features and packages:
352   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
353   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
354   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
355   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
356   --x-includes=DIR        X include files are in DIR
357   --x-libraries=DIR       X library files are in DIR
358 EOF
359     if test -n "$ac_help"; then
360       echo "--enable and --with options recognized:$ac_help"
361     fi
362     exit 0 ;;
363
364   -host | --host | --hos | --ho)
365     ac_prev=host ;;
366   -host=* | --host=* | --hos=* | --ho=*)
367     host="$ac_optarg" ;;
368
369   -includedir | --includedir | --includedi | --included | --include \
370   | --includ | --inclu | --incl | --inc)
371     ac_prev=includedir ;;
372   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
373   | --includ=* | --inclu=* | --incl=* | --inc=*)
374     includedir="$ac_optarg" ;;
375
376   -infodir | --infodir | --infodi | --infod | --info | --inf)
377     ac_prev=infodir ;;
378   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
379     infodir="$ac_optarg" ;;
380
381   -libdir | --libdir | --libdi | --libd)
382     ac_prev=libdir ;;
383   -libdir=* | --libdir=* | --libdi=* | --libd=*)
384     libdir="$ac_optarg" ;;
385
386   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
387   | --libexe | --libex | --libe)
388     ac_prev=libexecdir ;;
389   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
390   | --libexe=* | --libex=* | --libe=*)
391     libexecdir="$ac_optarg" ;;
392
393   -localstatedir | --localstatedir | --localstatedi | --localstated \
394   | --localstate | --localstat | --localsta | --localst \
395   | --locals | --local | --loca | --loc | --lo)
396     ac_prev=localstatedir ;;
397   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
398   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
399   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
400     localstatedir="$ac_optarg" ;;
401
402   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
403     ac_prev=mandir ;;
404   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
405     mandir="$ac_optarg" ;;
406
407   -nfp | --nfp | --nf)
408     # Obsolete; use --without-fp.
409     with_fp=no ;;
410
411   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
412   | --no-cr | --no-c)
413     no_create=yes ;;
414
415   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
416   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
417     no_recursion=yes ;;
418
419   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
420   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
421   | --oldin | --oldi | --old | --ol | --o)
422     ac_prev=oldincludedir ;;
423   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
424   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
425   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
426     oldincludedir="$ac_optarg" ;;
427
428   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
429     ac_prev=prefix ;;
430   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
431     prefix="$ac_optarg" ;;
432
433   -program-prefix | --program-prefix | --program-prefi | --program-pref \
434   | --program-pre | --program-pr | --program-p)
435     ac_prev=program_prefix ;;
436   -program-prefix=* | --program-prefix=* | --program-prefi=* \
437   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
438     program_prefix="$ac_optarg" ;;
439
440   -program-suffix | --program-suffix | --program-suffi | --program-suff \
441   | --program-suf | --program-su | --program-s)
442     ac_prev=program_suffix ;;
443   -program-suffix=* | --program-suffix=* | --program-suffi=* \
444   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
445     program_suffix="$ac_optarg" ;;
446
447   -program-transform-name | --program-transform-name \
448   | --program-transform-nam | --program-transform-na \
449   | --program-transform-n | --program-transform- \
450   | --program-transform | --program-transfor \
451   | --program-transfo | --program-transf \
452   | --program-trans | --program-tran \
453   | --progr-tra | --program-tr | --program-t)
454     ac_prev=program_transform_name ;;
455   -program-transform-name=* | --program-transform-name=* \
456   | --program-transform-nam=* | --program-transform-na=* \
457   | --program-transform-n=* | --program-transform-=* \
458   | --program-transform=* | --program-transfor=* \
459   | --program-transfo=* | --program-transf=* \
460   | --program-trans=* | --program-tran=* \
461   | --progr-tra=* | --program-tr=* | --program-t=*)
462     program_transform_name="$ac_optarg" ;;
463
464   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
465   | -silent | --silent | --silen | --sile | --sil)
466     silent=yes ;;
467
468   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
469     ac_prev=sbindir ;;
470   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
471   | --sbi=* | --sb=*)
472     sbindir="$ac_optarg" ;;
473
474   -sharedstatedir | --sharedstatedir | --sharedstatedi \
475   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
476   | --sharedst | --shareds | --shared | --share | --shar \
477   | --sha | --sh)
478     ac_prev=sharedstatedir ;;
479   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
480   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
481   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
482   | --sha=* | --sh=*)
483     sharedstatedir="$ac_optarg" ;;
484
485   -site | --site | --sit)
486     ac_prev=site ;;
487   -site=* | --site=* | --sit=*)
488     site="$ac_optarg" ;;
489
490   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
491     ac_prev=srcdir ;;
492   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
493     srcdir="$ac_optarg" ;;
494
495   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
496   | --syscon | --sysco | --sysc | --sys | --sy)
497     ac_prev=sysconfdir ;;
498   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
499   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
500     sysconfdir="$ac_optarg" ;;
501
502   -target | --target | --targe | --targ | --tar | --ta | --t)
503     ac_prev=target ;;
504   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
505     target="$ac_optarg" ;;
506
507   -v | -verbose | --verbose | --verbos | --verbo | --verb)
508     verbose=yes ;;
509
510   -version | --version | --versio | --versi | --vers)
511     echo "configure generated by autoconf version 2.13"
512     exit 0 ;;
513
514   -with-* | --with-*)
515     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
516     # Reject names that are not valid shell variable names.
517     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
518       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
519     fi
520     ac_package=`echo $ac_package| sed 's/-/_/g'`
521     case "$ac_option" in
522       *=*) ;;
523       *) ac_optarg=yes ;;
524     esac
525     eval "with_${ac_package}='$ac_optarg'" ;;
526
527   -without-* | --without-*)
528     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
529     # Reject names that are not valid shell variable names.
530     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
531       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
532     fi
533     ac_package=`echo $ac_package| sed 's/-/_/g'`
534     eval "with_${ac_package}=no" ;;
535
536   --x)
537     # Obsolete; use --with-x.
538     with_x=yes ;;
539
540   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
541   | --x-incl | --x-inc | --x-in | --x-i)
542     ac_prev=x_includes ;;
543   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
544   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
545     x_includes="$ac_optarg" ;;
546
547   -x-libraries | --x-libraries | --x-librarie | --x-librari \
548   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
549     ac_prev=x_libraries ;;
550   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
551   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
552     x_libraries="$ac_optarg" ;;
553
554   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
555     ;;
556
557   *)
558     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
559       echo "configure: warning: $ac_option: invalid host type" 1>&2
560     fi
561     if test "x$nonopt" != xNONE; then
562       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
563     fi
564     nonopt="$ac_option"
565     ;;
566
567   esac
568 done
569
570 if test -n "$ac_prev"; then
571   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
572 fi
573
574 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
575
576 # File descriptor usage:
577 # 0 standard input
578 # 1 file creation
579 # 2 errors and warnings
580 # 3 some systems may open it to /dev/tty
581 # 4 used on the Kubota Titan
582 # 6 checking for... messages and results
583 # 5 compiler messages saved in config.log
584 if test "$silent" = yes; then
585   exec 6>/dev/null
586 else
587   exec 6>&1
588 fi
589 exec 5>./config.log
590
591 echo "\
592 This file contains any messages produced by compilers while
593 running configure, to aid debugging if configure makes a mistake.
594 " 1>&5
595
596 # Strip out --no-create and --no-recursion so they do not pile up.
597 # Also quote any args containing shell metacharacters.
598 ac_configure_args=
599 for ac_arg
600 do
601   case "$ac_arg" in
602   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
603   | --no-cr | --no-c) ;;
604   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
605   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
606   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
607   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
608   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
609   esac
610 done
611
612 # NLS nuisances.
613 # Only set these to C if already set.  These must not be set unconditionally
614 # because not all systems understand e.g. LANG=C (notably SCO).
615 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
616 # Non-C LC_CTYPE values break the ctype check.
617 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
618 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
619 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
620 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
621
622 # confdefs.h avoids OS command line length limits that DEFS can exceed.
623 rm -rf conftest* confdefs.h
624 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
625 echo > confdefs.h
626
627 # A filename unique to this package, relative to the directory that
628 # configure is in, which we can look for to find out if srcdir is correct.
629 ac_unique_file=src/
630
631 # Find the source files, if location was not specified.
632 if test -z "$srcdir"; then
633   ac_srcdir_defaulted=yes
634   # Try the directory containing this script, then its parent.
635   ac_prog=$0
636   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
637   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
638   srcdir=$ac_confdir
639   if test ! -r $srcdir/$ac_unique_file; then
640     srcdir=..
641   fi
642 else
643   ac_srcdir_defaulted=no
644 fi
645 if test ! -r $srcdir/$ac_unique_file; then
646   if test "$ac_srcdir_defaulted" = yes; then
647     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
648   else
649     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
650   fi
651 fi
652 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
653
654 # Prefer explicitly selected file to automatically selected ones.
655 if test -z "$CONFIG_SITE"; then
656   if test "x$prefix" != xNONE; then
657     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
658   else
659     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
660   fi
661 fi
662 for ac_site_file in $CONFIG_SITE; do
663   if test -r "$ac_site_file"; then
664     echo "loading site script $ac_site_file"
665     . "$ac_site_file"
666   fi
667 done
668
669 if test -r "$cache_file"; then
670   echo "loading cache $cache_file"
671   . $cache_file
672 else
673   echo "creating cache $cache_file"
674   > $cache_file
675 fi
676
677 ac_ext=c
678 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
679 ac_cpp='$CPP $CPPFLAGS'
680 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
681 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
682 cross_compiling=$ac_cv_prog_cc_cross
683
684 ac_exeext=
685 ac_objext=o
686 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
687   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
688   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
689     ac_n= ac_c='
690 ' ac_t='        '
691   else
692     ac_n=-n ac_c= ac_t=
693   fi
694 else
695   ac_n= ac_c='\c' ac_t=
696 fi
697
698
699
700 # Check whether --enable-checkmem or --disable-checkmem was given.
701 if test "${enable_checkmem+set}" = set; then
702   enableval="$enable_checkmem"
703   CHECKMEM=true
704 fi
705
706 # Check whether --enable-debug or --disable-debug was given.
707 if test "${enable_debug+set}" = set; then
708   enableval="$enable_debug"
709   DEBUG=true
710 fi
711
712
713 PACKAGE=swftools
714 VERSION=0.4.4-pre9
715 # -Winline?
716
717 if test "x$CHECKMEM" '!=' "x";then
718     DEBUG=yes
719 fi
720 if test "x$DEBUG" '!=' "x";then
721     CFLAGS="-Wparentheses -Wimplicit -Wreturn-type -g $CFLAGS"
722     CXXFLAGS="-Wparentheses -Wimplicit -Wreturn-type -g $CXXFLAGS"
723 else
724     CFLAGS="-Wparentheses -Wimplicit -Wreturn-type -O -fomit-frame-pointer $CFLAGS"
725     CXXFLAGS="-Wparentheses -Wimplicit -Wreturn-type -O -fomit-frame-pointer $CXXFLAGS"
726 fi
727
728 export PACKAGE VERSION CFLAGS CXXFLAGS
729
730  ac_aux_dir=
731 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
732   if test -f $ac_dir/install-sh; then
733     ac_aux_dir=$ac_dir
734     ac_install_sh="$ac_aux_dir/install-sh -c"
735     break
736   elif test -f $ac_dir/install.sh; then
737     ac_aux_dir=$ac_dir
738     ac_install_sh="$ac_aux_dir/install.sh -c"
739     break
740   fi
741 done
742 if test -z "$ac_aux_dir"; then
743   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
744 fi
745 ac_config_guess=$ac_aux_dir/config.guess
746 ac_config_sub=$ac_aux_dir/config.sub
747 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
748
749
750 # Make sure we can run config.sub.
751 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
752 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
753 fi
754
755 echo $ac_n "checking host system type""... $ac_c" 1>&6
756 echo "configure:757: checking host system type" >&5
757
758 host_alias=$host
759 case "$host_alias" in
760 NONE)
761   case $nonopt in
762   NONE)
763     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
764     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
765     fi ;;
766   *) host_alias=$nonopt ;;
767   esac ;;
768 esac
769
770 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
771 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
772 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
773 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
774 echo "$ac_t""$host" 1>&6
775
776 MACOSX=
777 case $host_os in
778     *darwin* ) 
779         MACOSX=yes
780         CFLAGS="$CFLAGS -fno-rtti"
781         CXXFLAGS="$CXXFLAGS -fno-rtti"
782         ;;
783 esac
784  # Extract the first word of "gcc", so it can be a program name with args.
785 set dummy gcc; ac_word=$2
786 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
787 echo "configure:788: checking for $ac_word" >&5
788 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
789   echo $ac_n "(cached) $ac_c" 1>&6
790 else
791   if test -n "$CC"; then
792   ac_cv_prog_CC="$CC" # Let the user override the test.
793 else
794   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
795   ac_dummy="$PATH"
796   for ac_dir in $ac_dummy; do
797     test -z "$ac_dir" && ac_dir=.
798     if test -f $ac_dir/$ac_word; then
799       ac_cv_prog_CC="gcc"
800       break
801     fi
802   done
803   IFS="$ac_save_ifs"
804 fi
805 fi
806 CC="$ac_cv_prog_CC"
807 if test -n "$CC"; then
808   echo "$ac_t""$CC" 1>&6
809 else
810   echo "$ac_t""no" 1>&6
811 fi
812
813 if test -z "$CC"; then
814   # Extract the first word of "cc", so it can be a program name with args.
815 set dummy cc; ac_word=$2
816 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
817 echo "configure:818: checking for $ac_word" >&5
818 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
819   echo $ac_n "(cached) $ac_c" 1>&6
820 else
821   if test -n "$CC"; then
822   ac_cv_prog_CC="$CC" # Let the user override the test.
823 else
824   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
825   ac_prog_rejected=no
826   ac_dummy="$PATH"
827   for ac_dir in $ac_dummy; do
828     test -z "$ac_dir" && ac_dir=.
829     if test -f $ac_dir/$ac_word; then
830       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
831         ac_prog_rejected=yes
832         continue
833       fi
834       ac_cv_prog_CC="cc"
835       break
836     fi
837   done
838   IFS="$ac_save_ifs"
839 if test $ac_prog_rejected = yes; then
840   # We found a bogon in the path, so make sure we never use it.
841   set dummy $ac_cv_prog_CC
842   shift
843   if test $# -gt 0; then
844     # We chose a different compiler from the bogus one.
845     # However, it has the same basename, so the bogon will be chosen
846     # first if we set CC to just the basename; use the full file name.
847     shift
848     set dummy "$ac_dir/$ac_word" "$@"
849     shift
850     ac_cv_prog_CC="$@"
851   fi
852 fi
853 fi
854 fi
855 CC="$ac_cv_prog_CC"
856 if test -n "$CC"; then
857   echo "$ac_t""$CC" 1>&6
858 else
859   echo "$ac_t""no" 1>&6
860 fi
861
862   if test -z "$CC"; then
863     case "`uname -s`" in
864     *win32* | *WIN32*)
865       # Extract the first word of "cl", so it can be a program name with args.
866 set dummy cl; ac_word=$2
867 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
868 echo "configure:869: checking for $ac_word" >&5
869 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
870   echo $ac_n "(cached) $ac_c" 1>&6
871 else
872   if test -n "$CC"; then
873   ac_cv_prog_CC="$CC" # Let the user override the test.
874 else
875   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
876   ac_dummy="$PATH"
877   for ac_dir in $ac_dummy; do
878     test -z "$ac_dir" && ac_dir=.
879     if test -f $ac_dir/$ac_word; then
880       ac_cv_prog_CC="cl"
881       break
882     fi
883   done
884   IFS="$ac_save_ifs"
885 fi
886 fi
887 CC="$ac_cv_prog_CC"
888 if test -n "$CC"; then
889   echo "$ac_t""$CC" 1>&6
890 else
891   echo "$ac_t""no" 1>&6
892 fi
893  ;;
894     esac
895   fi
896   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
897 fi
898
899 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
900 echo "configure:901: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
901
902 ac_ext=c
903 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
904 ac_cpp='$CPP $CPPFLAGS'
905 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
906 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
907 cross_compiling=$ac_cv_prog_cc_cross
908
909 cat > conftest.$ac_ext << EOF
910
911 #line 912 "configure"
912 #include "confdefs.h"
913
914 main(){return(0);}
915 EOF
916 if { (eval echo configure:917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
917   ac_cv_prog_cc_works=yes
918   # If we can't run a trivial program, we are probably using a cross compiler.
919   if (./conftest; exit) 2>/dev/null; then
920     ac_cv_prog_cc_cross=no
921   else
922     ac_cv_prog_cc_cross=yes
923   fi
924 else
925   echo "configure: failed program was:" >&5
926   cat conftest.$ac_ext >&5
927   ac_cv_prog_cc_works=no
928 fi
929 rm -fr conftest*
930 ac_ext=c
931 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
932 ac_cpp='$CPP $CPPFLAGS'
933 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
934 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
935 cross_compiling=$ac_cv_prog_cc_cross
936
937 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
938 if test $ac_cv_prog_cc_works = no; then
939   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
940 fi
941 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
942 echo "configure:943: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
943 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
944 cross_compiling=$ac_cv_prog_cc_cross
945
946 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
947 echo "configure:948: checking whether we are using GNU C" >&5
948 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
949   echo $ac_n "(cached) $ac_c" 1>&6
950 else
951   cat > conftest.c <<EOF
952 #ifdef __GNUC__
953   yes;
954 #endif
955 EOF
956 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
957   ac_cv_prog_gcc=yes
958 else
959   ac_cv_prog_gcc=no
960 fi
961 fi
962
963 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
964
965 if test $ac_cv_prog_gcc = yes; then
966   GCC=yes
967 else
968   GCC=
969 fi
970
971 ac_test_CFLAGS="${CFLAGS+set}"
972 ac_save_CFLAGS="$CFLAGS"
973 CFLAGS=
974 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
975 echo "configure:976: checking whether ${CC-cc} accepts -g" >&5
976 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
977   echo $ac_n "(cached) $ac_c" 1>&6
978 else
979   echo 'void f(){}' > conftest.c
980 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
981   ac_cv_prog_cc_g=yes
982 else
983   ac_cv_prog_cc_g=no
984 fi
985 rm -f conftest*
986
987 fi
988
989 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
990 if test "$ac_test_CFLAGS" = set; then
991   CFLAGS="$ac_save_CFLAGS"
992 elif test $ac_cv_prog_cc_g = yes; then
993   if test "$GCC" = yes; then
994     CFLAGS="-g -O2"
995   else
996     CFLAGS="-g"
997   fi
998 else
999   if test "$GCC" = yes; then
1000     CFLAGS="-O2"
1001   else
1002     CFLAGS=
1003   fi
1004 fi
1005
1006  for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1007 do
1008 # Extract the first word of "$ac_prog", so it can be a program name with args.
1009 set dummy $ac_prog; ac_word=$2
1010 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1011 echo "configure:1012: checking for $ac_word" >&5
1012 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1013   echo $ac_n "(cached) $ac_c" 1>&6
1014 else
1015   if test -n "$CXX"; then
1016   ac_cv_prog_CXX="$CXX" # Let the user override the test.
1017 else
1018   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1019   ac_dummy="$PATH"
1020   for ac_dir in $ac_dummy; do
1021     test -z "$ac_dir" && ac_dir=.
1022     if test -f $ac_dir/$ac_word; then
1023       ac_cv_prog_CXX="$ac_prog"
1024       break
1025     fi
1026   done
1027   IFS="$ac_save_ifs"
1028 fi
1029 fi
1030 CXX="$ac_cv_prog_CXX"
1031 if test -n "$CXX"; then
1032   echo "$ac_t""$CXX" 1>&6
1033 else
1034   echo "$ac_t""no" 1>&6
1035 fi
1036
1037 test -n "$CXX" && break
1038 done
1039 test -n "$CXX" || CXX="gcc"
1040
1041
1042 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1043 echo "configure:1044: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1044
1045 ac_ext=C
1046 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1047 ac_cpp='$CXXCPP $CPPFLAGS'
1048 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1049 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1050 cross_compiling=$ac_cv_prog_cxx_cross
1051
1052 cat > conftest.$ac_ext << EOF
1053
1054 #line 1055 "configure"
1055 #include "confdefs.h"
1056
1057 int main(){return(0);}
1058 EOF
1059 if { (eval echo configure:1060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1060   ac_cv_prog_cxx_works=yes
1061   # If we can't run a trivial program, we are probably using a cross compiler.
1062   if (./conftest; exit) 2>/dev/null; then
1063     ac_cv_prog_cxx_cross=no
1064   else
1065     ac_cv_prog_cxx_cross=yes
1066   fi
1067 else
1068   echo "configure: failed program was:" >&5
1069   cat conftest.$ac_ext >&5
1070   ac_cv_prog_cxx_works=no
1071 fi
1072 rm -fr conftest*
1073 ac_ext=c
1074 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1075 ac_cpp='$CPP $CPPFLAGS'
1076 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1077 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1078 cross_compiling=$ac_cv_prog_cc_cross
1079
1080 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1081 if test $ac_cv_prog_cxx_works = no; then
1082   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1083 fi
1084 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1085 echo "configure:1086: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1086 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1087 cross_compiling=$ac_cv_prog_cxx_cross
1088
1089 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1090 echo "configure:1091: checking whether we are using GNU C++" >&5
1091 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1092   echo $ac_n "(cached) $ac_c" 1>&6
1093 else
1094   cat > conftest.C <<EOF
1095 #ifdef __GNUC__
1096   yes;
1097 #endif
1098 EOF
1099 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1100   ac_cv_prog_gxx=yes
1101 else
1102   ac_cv_prog_gxx=no
1103 fi
1104 fi
1105
1106 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1107
1108 if test $ac_cv_prog_gxx = yes; then
1109   GXX=yes
1110 else
1111   GXX=
1112 fi
1113
1114 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1115 ac_save_CXXFLAGS="$CXXFLAGS"
1116 CXXFLAGS=
1117 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1118 echo "configure:1119: checking whether ${CXX-g++} accepts -g" >&5
1119 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1120   echo $ac_n "(cached) $ac_c" 1>&6
1121 else
1122   echo 'void f(){}' > conftest.cc
1123 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1124   ac_cv_prog_cxx_g=yes
1125 else
1126   ac_cv_prog_cxx_g=no
1127 fi
1128 rm -f conftest*
1129
1130 fi
1131
1132 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1133 if test "$ac_test_CXXFLAGS" = set; then
1134   CXXFLAGS="$ac_save_CXXFLAGS"
1135 elif test $ac_cv_prog_cxx_g = yes; then
1136   if test "$GXX" = yes; then
1137     CXXFLAGS="-g -O2"
1138   else
1139     CXXFLAGS="-g"
1140   fi
1141 else
1142   if test "$GXX" = yes; then
1143     CXXFLAGS="-O2"
1144   else
1145     CXXFLAGS=
1146   fi
1147 fi
1148
1149
1150 if test "x$CHECKMEM" '!=' "x";then
1151     CC="ccmalloc $CC"
1152     CXX="ccmalloc $CXX"
1153     #echo running again
1154     #unset ac_cv_prog_CC
1155     #unset ac_cv_prog_CXX
1156     #AC_PROG_CC
1157     #AC_PROG_CXX
1158 fi
1159  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1160 echo "configure:1161: checking how to run the C preprocessor" >&5
1161 # On Suns, sometimes $CPP names a directory.
1162 if test -n "$CPP" && test -d "$CPP"; then
1163   CPP=
1164 fi
1165 if test -z "$CPP"; then
1166 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1167   echo $ac_n "(cached) $ac_c" 1>&6
1168 else
1169     # This must be in double quotes, not single quotes, because CPP may get
1170   # substituted into the Makefile and "${CC-cc}" will confuse make.
1171   CPP="${CC-cc} -E"
1172   # On the NeXT, cc -E runs the code through the compiler's parser,
1173   # not just through cpp.
1174   cat > conftest.$ac_ext <<EOF
1175 #line 1176 "configure"
1176 #include "confdefs.h"
1177 #include <assert.h>
1178 Syntax Error
1179 EOF
1180 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1181 { (eval echo configure:1182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1182 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1183 if test -z "$ac_err"; then
1184   :
1185 else
1186   echo "$ac_err" >&5
1187   echo "configure: failed program was:" >&5
1188   cat conftest.$ac_ext >&5
1189   rm -rf conftest*
1190   CPP="${CC-cc} -E -traditional-cpp"
1191   cat > conftest.$ac_ext <<EOF
1192 #line 1193 "configure"
1193 #include "confdefs.h"
1194 #include <assert.h>
1195 Syntax Error
1196 EOF
1197 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1198 { (eval echo configure:1199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1199 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1200 if test -z "$ac_err"; then
1201   :
1202 else
1203   echo "$ac_err" >&5
1204   echo "configure: failed program was:" >&5
1205   cat conftest.$ac_ext >&5
1206   rm -rf conftest*
1207   CPP="${CC-cc} -nologo -E"
1208   cat > conftest.$ac_ext <<EOF
1209 #line 1210 "configure"
1210 #include "confdefs.h"
1211 #include <assert.h>
1212 Syntax Error
1213 EOF
1214 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1215 { (eval echo configure:1216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1216 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1217 if test -z "$ac_err"; then
1218   :
1219 else
1220   echo "$ac_err" >&5
1221   echo "configure: failed program was:" >&5
1222   cat conftest.$ac_ext >&5
1223   rm -rf conftest*
1224   CPP=/lib/cpp
1225 fi
1226 rm -f conftest*
1227 fi
1228 rm -f conftest*
1229 fi
1230 rm -f conftest*
1231   ac_cv_prog_CPP="$CPP"
1232 fi
1233   CPP="$ac_cv_prog_CPP"
1234 else
1235   ac_cv_prog_CPP="$CPP"
1236 fi
1237 echo "$ac_t""$CPP" 1>&6
1238
1239
1240  # Extract the first word of "ranlib", so it can be a program name with args.
1241 set dummy ranlib; ac_word=$2
1242 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1243 echo "configure:1244: checking for $ac_word" >&5
1244 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1245   echo $ac_n "(cached) $ac_c" 1>&6
1246 else
1247   if test -n "$RANLIB"; then
1248   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1249 else
1250   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1251   ac_dummy="$PATH"
1252   for ac_dir in $ac_dummy; do
1253     test -z "$ac_dir" && ac_dir=.
1254     if test -f $ac_dir/$ac_word; then
1255       ac_cv_prog_RANLIB="ranlib"
1256       break
1257     fi
1258   done
1259   IFS="$ac_save_ifs"
1260   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1261 fi
1262 fi
1263 RANLIB="$ac_cv_prog_RANLIB"
1264 if test -n "$RANLIB"; then
1265   echo "$ac_t""$RANLIB" 1>&6
1266 else
1267   echo "$ac_t""no" 1>&6
1268 fi
1269
1270  echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1271 echo "configure:1272: checking whether ${MAKE-make} sets \${MAKE}" >&5
1272 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1273 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1274   echo $ac_n "(cached) $ac_c" 1>&6
1275 else
1276   cat > conftestmake <<\EOF
1277 all:
1278         @echo 'ac_maketemp="${MAKE}"'
1279 EOF
1280 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1281 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1282 if test -n "$ac_maketemp"; then
1283   eval ac_cv_prog_make_${ac_make}_set=yes
1284 else
1285   eval ac_cv_prog_make_${ac_make}_set=no
1286 fi
1287 rm -f conftestmake
1288 fi
1289 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1290   echo "$ac_t""yes" 1>&6
1291   SET_MAKE=
1292 else
1293   echo "$ac_t""no" 1>&6
1294   SET_MAKE="MAKE=${MAKE-make}"
1295 fi
1296
1297  # Find a good install program.  We prefer a C program (faster),
1298 # so one script is as good as another.  But avoid the broken or
1299 # incompatible versions:
1300 # SysV /etc/install, /usr/sbin/install
1301 # SunOS /usr/etc/install
1302 # IRIX /sbin/install
1303 # AIX /bin/install
1304 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1305 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1306 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1307 # ./install, which can be erroneously created by make from ./install.sh.
1308 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1309 echo "configure:1310: checking for a BSD compatible install" >&5
1310 if test -z "$INSTALL"; then
1311 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1312   echo $ac_n "(cached) $ac_c" 1>&6
1313 else
1314     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1315   for ac_dir in $PATH; do
1316     # Account for people who put trailing slashes in PATH elements.
1317     case "$ac_dir/" in
1318     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1319     *)
1320       # OSF1 and SCO ODT 3.0 have their own names for install.
1321       # Don't use installbsd from OSF since it installs stuff as root
1322       # by default.
1323       for ac_prog in ginstall scoinst install; do
1324         if test -f $ac_dir/$ac_prog; then
1325           if test $ac_prog = install &&
1326             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1327             # AIX install.  It has an incompatible calling convention.
1328             :
1329           else
1330             ac_cv_path_install="$ac_dir/$ac_prog -c"
1331             break 2
1332           fi
1333         fi
1334       done
1335       ;;
1336     esac
1337   done
1338   IFS="$ac_save_IFS"
1339
1340 fi
1341   if test "${ac_cv_path_install+set}" = set; then
1342     INSTALL="$ac_cv_path_install"
1343   else
1344     # As a last resort, use the slow shell script.  We don't cache a
1345     # path for INSTALL within a source directory, because that will
1346     # break other packages using the cache if that directory is
1347     # removed, or if the path is relative.
1348     INSTALL="$ac_install_sh"
1349   fi
1350 fi
1351 echo "$ac_t""$INSTALL" 1>&6
1352
1353 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1354 # It thinks the first close brace ends the variable substitution.
1355 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1356
1357 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1358
1359 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1360
1361  echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1362 echo "configure:1363: checking whether ln -s works" >&5
1363 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1364   echo $ac_n "(cached) $ac_c" 1>&6
1365 else
1366   rm -f conftestdata
1367 if ln -s X conftestdata 2>/dev/null
1368 then
1369   rm -f conftestdata
1370   ac_cv_prog_LN_S="ln -s"
1371 else
1372   ac_cv_prog_LN_S=ln
1373 fi
1374 fi
1375 LN_S="$ac_cv_prog_LN_S"
1376 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1377   echo "$ac_t""yes" 1>&6
1378 else
1379   echo "$ac_t""no" 1>&6
1380 fi
1381
1382  # Find the correct PATH separator.  Usually this is `:', but
1383 # DJGPP uses `;' like DOS.
1384 if test "X${PATH_SEPARATOR+set}" != Xset; then
1385   UNAME=${UNAME-`uname 2>/dev/null`}
1386   case X$UNAME in
1387     *-DOS) lt_cv_sys_path_separator=';' ;;
1388     *)     lt_cv_sys_path_separator=':' ;;
1389   esac
1390   PATH_SEPARATOR=$lt_cv_sys_path_separator
1391 fi
1392
1393 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1394 echo "configure:1395: checking for Cygwin environment" >&5
1395 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1396   echo $ac_n "(cached) $ac_c" 1>&6
1397 else
1398   cat > conftest.$ac_ext <<EOF
1399 #line 1400 "configure"
1400 #include "confdefs.h"
1401
1402 int main() {
1403
1404 #ifndef __CYGWIN__
1405 #define __CYGWIN__ __CYGWIN32__
1406 #endif
1407 return __CYGWIN__;
1408 ; return 0; }
1409 EOF
1410 if { (eval echo configure:1411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1411   rm -rf conftest*
1412   ac_cv_cygwin=yes
1413 else
1414   echo "configure: failed program was:" >&5
1415   cat conftest.$ac_ext >&5
1416   rm -rf conftest*
1417   ac_cv_cygwin=no
1418 fi
1419 rm -f conftest*
1420 rm -f conftest*
1421 fi
1422
1423 echo "$ac_t""$ac_cv_cygwin" 1>&6
1424 CYGWIN=
1425 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1426 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1427 echo "configure:1428: checking for mingw32 environment" >&5
1428 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1429   echo $ac_n "(cached) $ac_c" 1>&6
1430 else
1431   cat > conftest.$ac_ext <<EOF
1432 #line 1433 "configure"
1433 #include "confdefs.h"
1434
1435 int main() {
1436 return __MINGW32__;
1437 ; return 0; }
1438 EOF
1439 if { (eval echo configure:1440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1440   rm -rf conftest*
1441   ac_cv_mingw32=yes
1442 else
1443   echo "configure: failed program was:" >&5
1444   cat conftest.$ac_ext >&5
1445   rm -rf conftest*
1446   ac_cv_mingw32=no
1447 fi
1448 rm -f conftest*
1449 rm -f conftest*
1450 fi
1451
1452 echo "$ac_t""$ac_cv_mingw32" 1>&6
1453 MINGW32=
1454 test "$ac_cv_mingw32" = yes && MINGW32=yes
1455 # Check whether --enable-shared or --disable-shared was given.
1456 if test "${enable_shared+set}" = set; then
1457   enableval="$enable_shared"
1458   p=${PACKAGE-default}
1459 case $enableval in
1460 yes) enable_shared=yes ;;
1461 no) enable_shared=no ;;
1462 *)
1463   enable_shared=no
1464   # Look at the argument we got.  We use all the common list separators.
1465   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1466   for pkg in $enableval; do
1467     if test "X$pkg" = "X$p"; then
1468       enable_shared=yes
1469     fi
1470   done
1471   IFS="$ac_save_ifs"
1472   ;;
1473 esac
1474 else
1475   enable_shared=yes
1476 fi
1477
1478 # Check whether --enable-static or --disable-static was given.
1479 if test "${enable_static+set}" = set; then
1480   enableval="$enable_static"
1481   p=${PACKAGE-default}
1482 case $enableval in
1483 yes) enable_static=yes ;;
1484 no) enable_static=no ;;
1485 *)
1486   enable_static=no
1487   # Look at the argument we got.  We use all the common list separators.
1488   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1489   for pkg in $enableval; do
1490     if test "X$pkg" = "X$p"; then
1491       enable_static=yes
1492     fi
1493   done
1494   IFS="$ac_save_ifs"
1495   ;;
1496 esac
1497 else
1498   enable_static=yes
1499 fi
1500
1501 # Check whether --enable-fast-install or --disable-fast-install was given.
1502 if test "${enable_fast_install+set}" = set; then
1503   enableval="$enable_fast_install"
1504   p=${PACKAGE-default}
1505 case $enableval in
1506 yes) enable_fast_install=yes ;;
1507 no) enable_fast_install=no ;;
1508 *)
1509   enable_fast_install=no
1510   # Look at the argument we got.  We use all the common list separators.
1511   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1512   for pkg in $enableval; do
1513     if test "X$pkg" = "X$p"; then
1514       enable_fast_install=yes
1515     fi
1516   done
1517   IFS="$ac_save_ifs"
1518   ;;
1519 esac
1520 else
1521   enable_fast_install=yes
1522 fi
1523
1524 echo $ac_n "checking build system type""... $ac_c" 1>&6
1525 echo "configure:1526: checking build system type" >&5
1526
1527 build_alias=$build
1528 case "$build_alias" in
1529 NONE)
1530   case $nonopt in
1531   NONE) build_alias=$host_alias ;;
1532   *) build_alias=$nonopt ;;
1533   esac ;;
1534 esac
1535
1536 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1537 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1538 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1539 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1540 echo "$ac_t""$build" 1>&6
1541
1542 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1543 if test "${with_gnu_ld+set}" = set; then
1544   withval="$with_gnu_ld"
1545   test "$withval" = no || with_gnu_ld=yes
1546 else
1547   with_gnu_ld=no
1548 fi
1549
1550 ac_prog=ld
1551 if test "$GCC" = yes; then
1552   # Check if gcc -print-prog-name=ld gives a path.
1553   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1554 echo "configure:1555: checking for ld used by GCC" >&5
1555   case $host in
1556   *-*-mingw*)
1557     # gcc leaves a trailing carriage return which upsets mingw
1558     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1559   *)
1560     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1561   esac
1562   case $ac_prog in
1563     # Accept absolute paths.
1564     [\\/]* | [A-Za-z]:[\\/]*)
1565       re_direlt='/[^/][^/]*/\.\./'
1566       # Canonicalize the path of ld
1567       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1568       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1569         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1570       done
1571       test -z "$LD" && LD="$ac_prog"
1572       ;;
1573   "")
1574     # If it fails, then pretend we aren't using GCC.
1575     ac_prog=ld
1576     ;;
1577   *)
1578     # If it is relative, then search for the first ld in PATH.
1579     with_gnu_ld=unknown
1580     ;;
1581   esac
1582 elif test "$with_gnu_ld" = yes; then
1583   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1584 echo "configure:1585: checking for GNU ld" >&5
1585 else
1586   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1587 echo "configure:1588: checking for non-GNU ld" >&5
1588 fi
1589 if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1590   echo $ac_n "(cached) $ac_c" 1>&6
1591 else
1592   if test -z "$LD"; then
1593   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1594   for ac_dir in $PATH; do
1595     test -z "$ac_dir" && ac_dir=.
1596     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1597       lt_cv_path_LD="$ac_dir/$ac_prog"
1598       # Check to see if the program is GNU ld.  I'd rather use --version,
1599       # but apparently some GNU ld's only accept -v.
1600       # Break only if it was the GNU/non-GNU ld that we prefer.
1601       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1602         test "$with_gnu_ld" != no && break
1603       else
1604         test "$with_gnu_ld" != yes && break
1605       fi
1606     fi
1607   done
1608   IFS="$ac_save_ifs"
1609 else
1610   lt_cv_path_LD="$LD" # Let the user override the test with a path.
1611 fi
1612 fi
1613
1614 LD="$lt_cv_path_LD"
1615 if test -n "$LD"; then
1616   echo "$ac_t""$LD" 1>&6
1617 else
1618   echo "$ac_t""no" 1>&6
1619 fi
1620 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1621 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1622 echo "configure:1623: checking if the linker ($LD) is GNU ld" >&5
1623 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1624   echo $ac_n "(cached) $ac_c" 1>&6
1625 else
1626   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1627 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1628   lt_cv_prog_gnu_ld=yes
1629 else
1630   lt_cv_prog_gnu_ld=no
1631 fi
1632 fi
1633
1634 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1635 with_gnu_ld=$lt_cv_prog_gnu_ld
1636
1637
1638 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1639 echo "configure:1640: checking for $LD option to reload object files" >&5
1640 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1641   echo $ac_n "(cached) $ac_c" 1>&6
1642 else
1643   lt_cv_ld_reload_flag='-r'
1644 fi
1645
1646 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1647 reload_flag=$lt_cv_ld_reload_flag
1648 test -n "$reload_flag" && reload_flag=" $reload_flag"
1649
1650 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1651 echo "configure:1652: checking for BSD-compatible nm" >&5
1652 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1653   echo $ac_n "(cached) $ac_c" 1>&6
1654 else
1655   if test -n "$NM"; then
1656   # Let the user override the test.
1657   lt_cv_path_NM="$NM"
1658 else
1659   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1660   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1661     test -z "$ac_dir" && ac_dir=.
1662     tmp_nm=$ac_dir/${ac_tool_prefix}nm
1663     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1664       # Check to see if the nm accepts a BSD-compat flag.
1665       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1666       #   nm: unknown option "B" ignored
1667       # Tru64's nm complains that /dev/null is an invalid object file
1668       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1669         lt_cv_path_NM="$tmp_nm -B"
1670         break
1671       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1672         lt_cv_path_NM="$tmp_nm -p"
1673         break
1674       else
1675         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1676         continue # so that we can try to find one that supports BSD flags
1677       fi
1678     fi
1679   done
1680   IFS="$ac_save_ifs"
1681   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1682 fi
1683 fi
1684
1685 NM="$lt_cv_path_NM"
1686 echo "$ac_t""$NM" 1>&6
1687
1688 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1689 echo "configure:1690: checking how to recognise dependant libraries" >&5
1690 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1691   echo $ac_n "(cached) $ac_c" 1>&6
1692 else
1693   lt_cv_file_magic_cmd='$MAGIC_CMD'
1694 lt_cv_file_magic_test_file=
1695 lt_cv_deplibs_check_method='unknown'
1696 # Need to set the preceding variable on all platforms that support
1697 # interlibrary dependencies.
1698 # 'none' -- dependencies not supported.
1699 # `unknown' -- same as none, but documents that we really don't know.
1700 # 'pass_all' -- all dependencies passed with no checks.
1701 # 'test_compile' -- check by making test program.
1702 # 'file_magic [[regex]]' -- check by looking for files in library path
1703 # which responds to the $file_magic_cmd with a given egrep regex.
1704 # If you have `file' or equivalent on your system and you're not sure
1705 # whether `pass_all' will *always* work, you probably want this one.
1706
1707 case $host_os in
1708 aix4* | aix5*)
1709   lt_cv_deplibs_check_method=pass_all
1710   ;;
1711
1712 beos*)
1713   lt_cv_deplibs_check_method=pass_all
1714   ;;
1715
1716 bsdi4*)
1717   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1718   lt_cv_file_magic_cmd='/usr/bin/file -L'
1719   lt_cv_file_magic_test_file=/shlib/libc.so
1720   ;;
1721
1722 cygwin* | mingw* | pw32*)
1723   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1724   lt_cv_file_magic_cmd='$OBJDUMP -f'
1725   ;;
1726
1727 darwin* | rhapsody*)
1728   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1729   lt_cv_file_magic_cmd='/usr/bin/file -L'
1730   case "$host_os" in
1731   rhapsody* | darwin1.[012])
1732     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
1733     ;;
1734   *) # Darwin 1.3 on
1735     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1736     ;;
1737   esac
1738   ;;
1739
1740 freebsd*)
1741   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1742     case $host_cpu in
1743     i*86 )
1744       # Not sure whether the presence of OpenBSD here was a mistake.
1745       # Let's accept both of them until this is cleared up.
1746       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1747       lt_cv_file_magic_cmd=/usr/bin/file
1748       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1749       ;;
1750     esac
1751   else
1752     lt_cv_deplibs_check_method=pass_all
1753   fi
1754   ;;
1755
1756 gnu*)
1757   lt_cv_deplibs_check_method=pass_all
1758   ;;
1759
1760 hpux10.20*|hpux11*)
1761   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1762   lt_cv_file_magic_cmd=/usr/bin/file
1763   lt_cv_file_magic_test_file=/usr/lib/libc.sl
1764   ;;
1765
1766 irix5* | irix6* | nonstopux*)
1767   case $host_os in
1768   irix5* | nonstopux*)
1769     # this will be overridden with pass_all, but let us keep it just in case
1770     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1771     ;;
1772   *)
1773     case $LD in
1774     *-32|*"-32 ") libmagic=32-bit;;
1775     *-n32|*"-n32 ") libmagic=N32;;
1776     *-64|*"-64 ") libmagic=64-bit;;
1777     *) libmagic=never-match;;
1778     esac
1779     # this will be overridden with pass_all, but let us keep it just in case
1780     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
1781     ;;
1782   esac
1783   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1784   lt_cv_deplibs_check_method=pass_all
1785   ;;
1786
1787 # This must be Linux ELF.
1788 linux-gnu*)
1789   case $host_cpu in
1790   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
1791     lt_cv_deplibs_check_method=pass_all ;;
1792   *)
1793     # glibc up to 2.1.1 does not perform some relocations on ARM
1794     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
1795   esac
1796   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1797   ;;
1798
1799 netbsd*)
1800   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1801     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1802   else
1803     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
1804   fi
1805   ;;
1806
1807 newos6*)
1808   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
1809   lt_cv_file_magic_cmd=/usr/bin/file
1810   lt_cv_file_magic_test_file=/usr/lib/libnls.so
1811   ;;
1812
1813 openbsd*)
1814   lt_cv_file_magic_cmd=/usr/bin/file
1815   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1816   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1817     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
1818   else
1819     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
1820   fi
1821   ;;
1822
1823 osf3* | osf4* | osf5*)
1824   # this will be overridden with pass_all, but let us keep it just in case
1825   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
1826   lt_cv_file_magic_test_file=/shlib/libc.so
1827   lt_cv_deplibs_check_method=pass_all
1828   ;;
1829
1830 sco3.2v5*)
1831   lt_cv_deplibs_check_method=pass_all
1832   ;;
1833
1834 solaris*)
1835   lt_cv_deplibs_check_method=pass_all
1836   lt_cv_file_magic_test_file=/lib/libc.so
1837   ;;
1838
1839 sysv5uw[78]* | sysv4*uw2*)
1840   lt_cv_deplibs_check_method=pass_all
1841   ;;
1842
1843 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1844   case $host_vendor in
1845   motorola)
1846     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]'
1847     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
1848     ;;
1849   ncr)
1850     lt_cv_deplibs_check_method=pass_all
1851     ;;
1852   sequent)
1853     lt_cv_file_magic_cmd='/bin/file'
1854     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
1855     ;;
1856   sni)
1857     lt_cv_file_magic_cmd='/bin/file'
1858     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
1859     lt_cv_file_magic_test_file=/lib/libc.so
1860     ;;
1861   esac
1862   ;;
1863 esac
1864
1865 fi
1866
1867 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
1868 file_magic_cmd=$lt_cv_file_magic_cmd
1869 deplibs_check_method=$lt_cv_deplibs_check_method
1870
1871 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1872 echo "configure:1873: checking for object suffix" >&5
1873 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1874   echo $ac_n "(cached) $ac_c" 1>&6
1875 else
1876   rm -f conftest*
1877 echo 'int i = 1;' > conftest.$ac_ext
1878 if { (eval echo configure:1879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1879   for ac_file in conftest.*; do
1880     case $ac_file in
1881     *.c) ;;
1882     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1883     esac
1884   done
1885 else
1886   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1887 fi
1888 rm -f conftest*
1889 fi
1890
1891 echo "$ac_t""$ac_cv_objext" 1>&6
1892 OBJEXT=$ac_cv_objext
1893 ac_objext=$ac_cv_objext
1894
1895
1896
1897 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1898 echo "configure:1899: checking for executable suffix" >&5
1899 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1900   echo $ac_n "(cached) $ac_c" 1>&6
1901 else
1902   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1903   ac_cv_exeext=.exe
1904 else
1905   rm -f conftest*
1906   echo 'int main () { return 0; }' > conftest.$ac_ext
1907   ac_cv_exeext=
1908   if { (eval echo configure:1909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1909     for file in conftest.*; do
1910       case $file in
1911       *.c | *.o | *.obj) ;;
1912       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1913       esac
1914     done
1915   else
1916     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1917   fi
1918   rm -f conftest*
1919   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1920 fi
1921 fi
1922
1923 EXEEXT=""
1924 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1925 echo "$ac_t""${ac_cv_exeext}" 1>&6
1926 ac_exeext=$EXEEXT
1927
1928 if test $host != $build; then
1929   ac_tool_prefix=${host_alias}-
1930 else
1931   ac_tool_prefix=
1932 fi
1933
1934
1935
1936
1937 # Check for command to grab the raw symbol name followed by C symbol from nm.
1938 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
1939 echo "configure:1940: checking command to parse $NM output" >&5
1940 if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then
1941   echo $ac_n "(cached) $ac_c" 1>&6
1942 else
1943   
1944 # These are sane defaults that work on at least a few old systems.
1945 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
1946
1947 # Character class describing NM global symbol codes.
1948 symcode='[BCDEGRST]'
1949
1950 # Regexp to match symbols that can be accessed directly from C.
1951 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1952
1953 # Transform the above into a raw symbol and a C symbol.
1954 symxfrm='\1 \2\3 \3'
1955
1956 # Transform an extracted symbol line into a proper C declaration
1957 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1958
1959 # Transform an extracted symbol line into symbol name and symbol address
1960 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'"
1961
1962 # Define system-specific variables.
1963 case $host_os in
1964 aix*)
1965   symcode='[BCDT]'
1966   ;;
1967 cygwin* | mingw* | pw32*)
1968   symcode='[ABCDGISTW]'
1969   ;;
1970 hpux*) # Its linker distinguishes data from code symbols
1971   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
1972   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'"
1973   ;;
1974 irix* | nonstopux*)
1975   symcode='[BCDEGRST]'
1976   ;;
1977 solaris* | sysv5*)
1978   symcode='[BDT]'
1979   ;;
1980 sysv4)
1981   symcode='[DFNSTU]'
1982   ;;
1983 esac
1984
1985 # Handle CRLF in mingw tool chain
1986 opt_cr=
1987 case $host_os in
1988 mingw*)
1989   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1990   ;;
1991 esac
1992
1993 # If we're using GNU nm, then use its standard symbol codes.
1994 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1995   symcode='[ABCDGISTW]'
1996 fi
1997
1998 # Try without a prefix undercore, then with it.
1999 for ac_symprfx in "" "_"; do
2000
2001   # Write the raw and C identifiers.
2002 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
2003
2004   # Check to see that the pipe works correctly.
2005   pipe_works=no
2006   rm -f conftest*
2007   cat > conftest.$ac_ext <<EOF
2008 #ifdef __cplusplus
2009 extern "C" {
2010 #endif
2011 char nm_test_var;
2012 void nm_test_func(){}
2013 #ifdef __cplusplus
2014 }
2015 #endif
2016 int main(){nm_test_var='a';nm_test_func();return(0);}
2017 EOF
2018
2019   if { (eval echo configure:2020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2020     # Now try to grab the symbols.
2021     nlist=conftest.nm
2022     if { (eval echo configure:2023: \"$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
2023       # Try sorting and uniquifying the output.
2024       if sort "$nlist" | uniq > "$nlist"T; then
2025         mv -f "$nlist"T "$nlist"
2026       else
2027         rm -f "$nlist"T
2028       fi
2029
2030       # Make sure that we snagged all the symbols we need.
2031       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
2032         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
2033           cat <<EOF > conftest.$ac_ext
2034 #ifdef __cplusplus
2035 extern "C" {
2036 #endif
2037
2038 EOF
2039           # Now generate the symbol file.
2040           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
2041
2042           cat <<EOF >> conftest.$ac_ext
2043 #if defined (__STDC__) && __STDC__
2044 # define lt_ptr void *
2045 #else
2046 # define lt_ptr char *
2047 # define const
2048 #endif
2049
2050 /* The mapping between symbol names and symbols. */
2051 const struct {
2052   const char *name;
2053   lt_ptr address;
2054 }
2055 lt_preloaded_symbols[] =
2056 {
2057 EOF
2058           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
2059           cat <<\EOF >> conftest.$ac_ext
2060   {0, (lt_ptr) 0}
2061 };
2062
2063 #ifdef __cplusplus
2064 }
2065 #endif
2066 EOF
2067           # Now try linking the two files.
2068           mv conftest.$ac_objext conftstm.$ac_objext
2069           save_LIBS="$LIBS"
2070           save_CFLAGS="$CFLAGS"
2071           LIBS="conftstm.$ac_objext"
2072           CFLAGS="$CFLAGS$no_builtin_flag"
2073           if { (eval echo configure:2074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2074             pipe_works=yes
2075           fi
2076           LIBS="$save_LIBS"
2077           CFLAGS="$save_CFLAGS"
2078         else
2079           echo "cannot find nm_test_func in $nlist" >&5
2080         fi
2081       else
2082         echo "cannot find nm_test_var in $nlist" >&5
2083       fi
2084     else
2085       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
2086     fi
2087   else
2088     echo "$progname: failed program was:" >&5
2089     cat conftest.$ac_ext >&5
2090   fi
2091   rm -f conftest* conftst*
2092
2093   # Do not use the global_symbol_pipe unless it works.
2094   if test "$pipe_works" = yes; then
2095     break
2096   else
2097     lt_cv_sys_global_symbol_pipe=
2098   fi
2099 done
2100
2101 fi
2102
2103 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
2104 if test -z "$lt_cv_sys_global_symbol_pipe"; then
2105   global_symbol_to_cdecl=
2106   global_symbol_to_c_name_address=
2107 else
2108   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
2109   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
2110 fi
2111 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
2112 then
2113   echo "$ac_t""failed" 1>&6
2114 else
2115   echo "$ac_t""ok" 1>&6
2116 fi
2117
2118 for ac_hdr in dlfcn.h
2119 do
2120 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2121 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2122 echo "configure:2123: checking for $ac_hdr" >&5
2123 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2124   echo $ac_n "(cached) $ac_c" 1>&6
2125 else
2126   cat > conftest.$ac_ext <<EOF
2127 #line 2128 "configure"
2128 #include "confdefs.h"
2129 #include <$ac_hdr>
2130 EOF
2131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2132 { (eval echo configure:2133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2134 if test -z "$ac_err"; then
2135   rm -rf conftest*
2136   eval "ac_cv_header_$ac_safe=yes"
2137 else
2138   echo "$ac_err" >&5
2139   echo "configure: failed program was:" >&5
2140   cat conftest.$ac_ext >&5
2141   rm -rf conftest*
2142   eval "ac_cv_header_$ac_safe=no"
2143 fi
2144 rm -f conftest*
2145 fi
2146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2147   echo "$ac_t""yes" 1>&6
2148     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2149   cat >> confdefs.h <<EOF
2150 #define $ac_tr_hdr 1
2151 EOF
2152  
2153 else
2154   echo "$ac_t""no" 1>&6
2155 fi
2156 done
2157
2158
2159
2160
2161
2162 # Only perform the check for file, if the check method requires it
2163 case $deplibs_check_method in
2164 file_magic*)
2165   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2166     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
2167 echo "configure:2168: checking for ${ac_tool_prefix}file" >&5
2168 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2169   echo $ac_n "(cached) $ac_c" 1>&6
2170 else
2171   case $MAGIC_CMD in
2172   /*)
2173   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2174   ;;
2175   ?:/*)
2176   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2177   ;;
2178   *)
2179   ac_save_MAGIC_CMD="$MAGIC_CMD"
2180   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2181   ac_dummy="/usr/bin:$PATH"
2182   for ac_dir in $ac_dummy; do
2183     test -z "$ac_dir" && ac_dir=.
2184     if test -f $ac_dir/${ac_tool_prefix}file; then
2185       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
2186       if test -n "$file_magic_test_file"; then
2187         case $deplibs_check_method in
2188         "file_magic "*)
2189           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2190           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2191           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2192             egrep "$file_magic_regex" > /dev/null; then
2193             :
2194           else
2195             cat <<EOF 1>&2
2196
2197 *** Warning: the command libtool uses to detect shared libraries,
2198 *** $file_magic_cmd, produces output that libtool cannot recognize.
2199 *** The result is that libtool may fail to recognize shared libraries
2200 *** as such.  This will affect the creation of libtool libraries that
2201 *** depend on shared libraries, but programs linked with such libtool
2202 *** libraries will work regardless of this problem.  Nevertheless, you
2203 *** may want to report the problem to your system manager and/or to
2204 *** bug-libtool@gnu.org
2205
2206 EOF
2207           fi ;;
2208         esac
2209       fi
2210       break
2211     fi
2212   done
2213   IFS="$ac_save_ifs"
2214   MAGIC_CMD="$ac_save_MAGIC_CMD"
2215   ;;
2216 esac
2217 fi
2218
2219 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2220 if test -n "$MAGIC_CMD"; then
2221   echo "$ac_t""$MAGIC_CMD" 1>&6
2222 else
2223   echo "$ac_t""no" 1>&6
2224 fi
2225
2226 if test -z "$lt_cv_path_MAGIC_CMD"; then
2227   if test -n "$ac_tool_prefix"; then
2228     echo $ac_n "checking for file""... $ac_c" 1>&6
2229 echo "configure:2230: checking for file" >&5
2230 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2231   echo $ac_n "(cached) $ac_c" 1>&6
2232 else
2233   case $MAGIC_CMD in
2234   /*)
2235   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2236   ;;
2237   ?:/*)
2238   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2239   ;;
2240   *)
2241   ac_save_MAGIC_CMD="$MAGIC_CMD"
2242   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2243   ac_dummy="/usr/bin:$PATH"
2244   for ac_dir in $ac_dummy; do
2245     test -z "$ac_dir" && ac_dir=.
2246     if test -f $ac_dir/file; then
2247       lt_cv_path_MAGIC_CMD="$ac_dir/file"
2248       if test -n "$file_magic_test_file"; then
2249         case $deplibs_check_method in
2250         "file_magic "*)
2251           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2252           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2253           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2254             egrep "$file_magic_regex" > /dev/null; then
2255             :
2256           else
2257             cat <<EOF 1>&2
2258
2259 *** Warning: the command libtool uses to detect shared libraries,
2260 *** $file_magic_cmd, produces output that libtool cannot recognize.
2261 *** The result is that libtool may fail to recognize shared libraries
2262 *** as such.  This will affect the creation of libtool libraries that
2263 *** depend on shared libraries, but programs linked with such libtool
2264 *** libraries will work regardless of this problem.  Nevertheless, you
2265 *** may want to report the problem to your system manager and/or to
2266 *** bug-libtool@gnu.org
2267
2268 EOF
2269           fi ;;
2270         esac
2271       fi
2272       break
2273     fi
2274   done
2275   IFS="$ac_save_ifs"
2276   MAGIC_CMD="$ac_save_MAGIC_CMD"
2277   ;;
2278 esac
2279 fi
2280
2281 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2282 if test -n "$MAGIC_CMD"; then
2283   echo "$ac_t""$MAGIC_CMD" 1>&6
2284 else
2285   echo "$ac_t""no" 1>&6
2286 fi
2287
2288   else
2289     MAGIC_CMD=:
2290   fi
2291 fi
2292
2293   fi
2294   ;;
2295 esac
2296
2297 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2298 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2299 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2300 echo "configure:2301: checking for $ac_word" >&5
2301 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2302   echo $ac_n "(cached) $ac_c" 1>&6
2303 else
2304   if test -n "$RANLIB"; then
2305   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2306 else
2307   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2308   ac_dummy="$PATH"
2309   for ac_dir in $ac_dummy; do
2310     test -z "$ac_dir" && ac_dir=.
2311     if test -f $ac_dir/$ac_word; then
2312       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2313       break
2314     fi
2315   done
2316   IFS="$ac_save_ifs"
2317 fi
2318 fi
2319 RANLIB="$ac_cv_prog_RANLIB"
2320 if test -n "$RANLIB"; then
2321   echo "$ac_t""$RANLIB" 1>&6
2322 else
2323   echo "$ac_t""no" 1>&6
2324 fi
2325
2326
2327 if test -z "$ac_cv_prog_RANLIB"; then
2328 if test -n "$ac_tool_prefix"; then
2329   # Extract the first word of "ranlib", so it can be a program name with args.
2330 set dummy ranlib; ac_word=$2
2331 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2332 echo "configure:2333: checking for $ac_word" >&5
2333 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2334   echo $ac_n "(cached) $ac_c" 1>&6
2335 else
2336   if test -n "$RANLIB"; then
2337   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2338 else
2339   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2340   ac_dummy="$PATH"
2341   for ac_dir in $ac_dummy; do
2342     test -z "$ac_dir" && ac_dir=.
2343     if test -f $ac_dir/$ac_word; then
2344       ac_cv_prog_RANLIB="ranlib"
2345       break
2346     fi
2347   done
2348   IFS="$ac_save_ifs"
2349   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2350 fi
2351 fi
2352 RANLIB="$ac_cv_prog_RANLIB"
2353 if test -n "$RANLIB"; then
2354   echo "$ac_t""$RANLIB" 1>&6
2355 else
2356   echo "$ac_t""no" 1>&6
2357 fi
2358
2359 else
2360   RANLIB=":"
2361 fi
2362 fi
2363
2364 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2365 set dummy ${ac_tool_prefix}strip; ac_word=$2
2366 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2367 echo "configure:2368: checking for $ac_word" >&5
2368 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2369   echo $ac_n "(cached) $ac_c" 1>&6
2370 else
2371   if test -n "$STRIP"; then
2372   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2373 else
2374   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2375   ac_dummy="$PATH"
2376   for ac_dir in $ac_dummy; do
2377     test -z "$ac_dir" && ac_dir=.
2378     if test -f $ac_dir/$ac_word; then
2379       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2380       break
2381     fi
2382   done
2383   IFS="$ac_save_ifs"
2384 fi
2385 fi
2386 STRIP="$ac_cv_prog_STRIP"
2387 if test -n "$STRIP"; then
2388   echo "$ac_t""$STRIP" 1>&6
2389 else
2390   echo "$ac_t""no" 1>&6
2391 fi
2392
2393
2394 if test -z "$ac_cv_prog_STRIP"; then
2395 if test -n "$ac_tool_prefix"; then
2396   # Extract the first word of "strip", so it can be a program name with args.
2397 set dummy strip; ac_word=$2
2398 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2399 echo "configure:2400: checking for $ac_word" >&5
2400 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2401   echo $ac_n "(cached) $ac_c" 1>&6
2402 else
2403   if test -n "$STRIP"; then
2404   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2405 else
2406   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2407   ac_dummy="$PATH"
2408   for ac_dir in $ac_dummy; do
2409     test -z "$ac_dir" && ac_dir=.
2410     if test -f $ac_dir/$ac_word; then
2411       ac_cv_prog_STRIP="strip"
2412       break
2413     fi
2414   done
2415   IFS="$ac_save_ifs"
2416   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2417 fi
2418 fi
2419 STRIP="$ac_cv_prog_STRIP"
2420 if test -n "$STRIP"; then
2421   echo "$ac_t""$STRIP" 1>&6
2422 else
2423   echo "$ac_t""no" 1>&6
2424 fi
2425
2426 else
2427   STRIP=":"
2428 fi
2429 fi
2430
2431
2432 enable_dlopen=no
2433 enable_win32_dll=no
2434
2435 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2436 if test "${enable_libtool_lock+set}" = set; then
2437   enableval="$enable_libtool_lock"
2438   :
2439 fi
2440
2441 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2442
2443 # Some flags need to be propagated to the compiler or linker for good
2444 # libtool support.
2445 case $host in
2446 *-*-irix6*)
2447   # Find out which ABI we are using.
2448   echo '#line 2449 "configure"' > conftest.$ac_ext
2449   if { (eval echo configure:2450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2450     case `/usr/bin/file conftest.$ac_objext` in
2451     *32-bit*)
2452       LD="${LD-ld} -32"
2453       ;;
2454     *N32*)
2455       LD="${LD-ld} -n32"
2456       ;;
2457     *64-bit*)
2458       LD="${LD-ld} -64"
2459       ;;
2460     esac
2461   fi
2462   rm -rf conftest*
2463   ;;
2464
2465 *-*-sco3.2v5*)
2466   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2467   SAVE_CFLAGS="$CFLAGS"
2468   CFLAGS="$CFLAGS -belf"
2469   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2470 echo "configure:2471: checking whether the C compiler needs -belf" >&5
2471 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2472   echo $ac_n "(cached) $ac_c" 1>&6
2473 else
2474   
2475      ac_ext=c
2476 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2477 ac_cpp='$CPP $CPPFLAGS'
2478 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2479 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2480 cross_compiling=$ac_cv_prog_cc_cross
2481
2482      cat > conftest.$ac_ext <<EOF
2483 #line 2484 "configure"
2484 #include "confdefs.h"
2485
2486 int main() {
2487
2488 ; return 0; }
2489 EOF
2490 if { (eval echo configure:2491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2491   rm -rf conftest*
2492   lt_cv_cc_needs_belf=yes
2493 else
2494   echo "configure: failed program was:" >&5
2495   cat conftest.$ac_ext >&5
2496   rm -rf conftest*
2497   lt_cv_cc_needs_belf=no
2498 fi
2499 rm -f conftest*
2500      ac_ext=c
2501 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2502 ac_cpp='$CPP $CPPFLAGS'
2503 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2504 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2505 cross_compiling=$ac_cv_prog_cc_cross
2506
2507 fi
2508
2509 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2510   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2511     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2512     CFLAGS="$SAVE_CFLAGS"
2513   fi
2514   ;;
2515
2516
2517 esac
2518
2519 # Sed substitution that helps us do robust quoting.  It backslashifies
2520 # metacharacters that are still active within double-quoted strings.
2521 Xsed='sed -e s/^X//'
2522 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
2523
2524 # Same as above, but do not quote variable references.
2525 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
2526
2527 # Sed substitution to delay expansion of an escaped shell variable in a
2528 # double_quote_subst'ed string.
2529 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2530
2531 # Constants:
2532 rm="rm -f"
2533
2534 # Global variables:
2535 default_ofile=libtool
2536 can_build_shared=yes
2537
2538 # All known linkers require a `.a' archive for static linking (except M$VC,
2539 # which needs '.lib').
2540 libext=a
2541 ltmain="$ac_aux_dir/ltmain.sh"
2542 ofile="$default_ofile"
2543 with_gnu_ld="$lt_cv_prog_gnu_ld"
2544 need_locks="$enable_libtool_lock"
2545
2546 old_CC="$CC"
2547 old_CFLAGS="$CFLAGS"
2548
2549 # Set sane defaults for various variables
2550 test -z "$AR" && AR=ar
2551 test -z "$AR_FLAGS" && AR_FLAGS=cru
2552 test -z "$AS" && AS=as
2553 test -z "$CC" && CC=cc
2554 test -z "$DLLTOOL" && DLLTOOL=dlltool
2555 test -z "$LD" && LD=ld
2556 test -z "$LN_S" && LN_S="ln -s"
2557 test -z "$MAGIC_CMD" && MAGIC_CMD=file
2558 test -z "$NM" && NM=nm
2559 test -z "$OBJDUMP" && OBJDUMP=objdump
2560 test -z "$RANLIB" && RANLIB=:
2561 test -z "$STRIP" && STRIP=:
2562 test -z "$ac_objext" && ac_objext=o
2563
2564 if test x"$host" != x"$build"; then
2565   ac_tool_prefix=${host_alias}-
2566 else
2567   ac_tool_prefix=
2568 fi
2569
2570 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
2571 case $host_os in
2572 linux-gnu*) ;;
2573 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
2574 esac
2575
2576 case $host_os in
2577 aix3*)
2578   # AIX sometimes has problems with the GCC collect2 program.  For some
2579   # reason, if we set the COLLECT_NAMES environment variable, the problems
2580   # vanish in a puff of smoke.
2581   if test "X${COLLECT_NAMES+set}" != Xset; then
2582     COLLECT_NAMES=
2583     export COLLECT_NAMES
2584   fi
2585   ;;
2586 esac
2587
2588 # Determine commands to create old-style static archives.
2589 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
2590 old_postinstall_cmds='chmod 644 $oldlib'
2591 old_postuninstall_cmds=
2592
2593 if test -n "$RANLIB"; then
2594   case $host_os in
2595   openbsd*)
2596     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
2597     ;;
2598   *)
2599     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
2600     ;;
2601   esac
2602   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2603 fi
2604
2605 # Allow CC to be a program name with arguments.
2606 set dummy $CC
2607 compiler="$2"
2608
2609 echo $ac_n "checking for objdir""... $ac_c" 1>&6
2610 echo "configure:2611: checking for objdir" >&5
2611 rm -f .libs 2>/dev/null
2612 mkdir .libs 2>/dev/null
2613 if test -d .libs; then
2614   objdir=.libs
2615 else
2616   # MS-DOS does not allow filenames that begin with a dot.
2617   objdir=_libs
2618 fi
2619 rmdir .libs 2>/dev/null
2620 echo "$ac_t""$objdir" 1>&6
2621
2622
2623 # Check whether --with-pic or --without-pic was given.
2624 if test "${with_pic+set}" = set; then
2625   withval="$with_pic"
2626   pic_mode="$withval"
2627 else
2628   pic_mode=default
2629 fi
2630
2631 test -z "$pic_mode" && pic_mode=default
2632
2633 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
2634 # in isolation, and that seeing it set (from the cache) indicates that
2635 # the associated values are set (in the cache) correctly too.
2636 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
2637 echo "configure:2638: checking for $compiler option to produce PIC" >&5
2638 if eval "test \"`echo '$''{'lt_cv_prog_cc_pic'+set}'`\" = set"; then
2639   echo $ac_n "(cached) $ac_c" 1>&6
2640 else
2641    lt_cv_prog_cc_pic=
2642   lt_cv_prog_cc_shlib=
2643   lt_cv_prog_cc_wl=
2644   lt_cv_prog_cc_static=
2645   lt_cv_prog_cc_no_builtin=
2646   lt_cv_prog_cc_can_build_shared=$can_build_shared
2647
2648   if test "$GCC" = yes; then
2649     lt_cv_prog_cc_wl='-Wl,'
2650     lt_cv_prog_cc_static='-static'
2651
2652     case $host_os in
2653     aix*)
2654       # Below there is a dirty hack to force normal static linking with -ldl
2655       # The problem is because libdl dynamically linked with both libc and
2656       # libC (AIX C++ library), which obviously doesn't included in libraries
2657       # list by gcc. This cause undefined symbols with -static flags.
2658       # This hack allows C programs to be linked with "-static -ldl", but
2659       # not sure about C++ programs.
2660       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
2661       ;;
2662     amigaos*)
2663       # FIXME: we need at least 68020 code to build shared libraries, but
2664       # adding the `-m68020' flag to GCC prevents building anything better,
2665       # like `-m68040'.
2666       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
2667       ;;
2668     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
2669       # PIC is the default for these OSes.
2670       ;;
2671     darwin* | rhapsody*)
2672       # PIC is the default on this platform
2673       # Common symbols not allowed in MH_DYLIB files
2674       lt_cv_prog_cc_pic='-fno-common'
2675       ;;
2676     cygwin* | mingw* | pw32* | os2*)
2677       # This hack is so that the source file can tell whether it is being
2678       # built for inclusion in a dll (and should export symbols for example).
2679       lt_cv_prog_cc_pic='-DDLL_EXPORT'
2680       ;;
2681     sysv4*MP*)
2682       if test -d /usr/nec; then
2683          lt_cv_prog_cc_pic=-Kconform_pic
2684       fi
2685       ;;
2686     *)
2687       lt_cv_prog_cc_pic='-fPIC'
2688       ;;
2689     esac
2690   else
2691     # PORTME Check for PIC flags for the system compiler.
2692     case $host_os in
2693     aix3* | aix4* | aix5*)
2694       lt_cv_prog_cc_wl='-Wl,'
2695       # All AIX code is PIC.
2696       if test "$host_cpu" = ia64; then
2697         # AIX 5 now supports IA64 processor
2698         lt_cv_prog_cc_static='-Bstatic'
2699       else
2700         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
2701       fi
2702       ;;
2703
2704     hpux9* | hpux10* | hpux11*)
2705       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
2706       lt_cv_prog_cc_wl='-Wl,'
2707       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
2708       lt_cv_prog_cc_pic='+Z'
2709       ;;
2710
2711     irix5* | irix6* | nonstopux*)
2712       lt_cv_prog_cc_wl='-Wl,'
2713       lt_cv_prog_cc_static='-non_shared'
2714       # PIC (with -KPIC) is the default.
2715       ;;
2716
2717     cygwin* | mingw* | pw32* | os2*)
2718       # This hack is so that the source file can tell whether it is being
2719       # built for inclusion in a dll (and should export symbols for example).
2720       lt_cv_prog_cc_pic='-DDLL_EXPORT'
2721       ;;
2722
2723     newsos6)
2724       lt_cv_prog_cc_pic='-KPIC'
2725       lt_cv_prog_cc_static='-Bstatic'
2726       ;;
2727
2728     osf3* | osf4* | osf5*)
2729       # All OSF/1 code is PIC.
2730       lt_cv_prog_cc_wl='-Wl,'
2731       lt_cv_prog_cc_static='-non_shared'
2732       ;;
2733
2734     sco3.2v5*)
2735       lt_cv_prog_cc_pic='-Kpic'
2736       lt_cv_prog_cc_static='-dn'
2737       lt_cv_prog_cc_shlib='-belf'
2738       ;;
2739
2740     solaris*)
2741       lt_cv_prog_cc_pic='-KPIC'
2742       lt_cv_prog_cc_static='-Bstatic'
2743       lt_cv_prog_cc_wl='-Wl,'
2744       ;;
2745
2746     sunos4*)
2747       lt_cv_prog_cc_pic='-PIC'
2748       lt_cv_prog_cc_static='-Bstatic'
2749       lt_cv_prog_cc_wl='-Qoption ld '
2750       ;;
2751
2752     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2753       lt_cv_prog_cc_pic='-KPIC'
2754       lt_cv_prog_cc_static='-Bstatic'
2755       if test "x$host_vendor" = xsni; then
2756         lt_cv_prog_cc_wl='-LD'
2757       else
2758         lt_cv_prog_cc_wl='-Wl,'
2759       fi
2760       ;;
2761
2762     uts4*)
2763       lt_cv_prog_cc_pic='-pic'
2764       lt_cv_prog_cc_static='-Bstatic'
2765       ;;
2766
2767     sysv4*MP*)
2768       if test -d /usr/nec ;then
2769         lt_cv_prog_cc_pic='-Kconform_pic'
2770         lt_cv_prog_cc_static='-Bstatic'
2771       fi
2772       ;;
2773
2774     *)
2775       lt_cv_prog_cc_can_build_shared=no
2776       ;;
2777     esac
2778   fi
2779
2780 fi
2781
2782 if test -z "$lt_cv_prog_cc_pic"; then
2783   echo "$ac_t""none" 1>&6
2784 else
2785   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
2786
2787   # Check to make sure the pic_flag actually works.
2788   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
2789 echo "configure:2790: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
2790   if eval "test \"`echo '$''{'lt_cv_prog_cc_pic_works'+set}'`\" = set"; then
2791   echo $ac_n "(cached) $ac_c" 1>&6
2792 else
2793       save_CFLAGS="$CFLAGS"
2794     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
2795     cat > conftest.$ac_ext <<EOF
2796 #line 2797 "configure"
2797 #include "confdefs.h"
2798
2799 int main() {
2800
2801 ; return 0; }
2802 EOF
2803 if { (eval echo configure:2804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2804   rm -rf conftest*
2805         case $host_os in
2806       hpux9* | hpux10* | hpux11*)
2807         # On HP-UX, both CC and GCC only warn that PIC is supported... then
2808         # they create non-PIC objects.  So, if there were any warnings, we
2809         # assume that PIC is not supported.
2810         if test -s conftest.err; then
2811           lt_cv_prog_cc_pic_works=no
2812         else
2813           lt_cv_prog_cc_pic_works=yes
2814         fi
2815         ;;
2816       *)
2817         lt_cv_prog_cc_pic_works=yes
2818         ;;
2819       esac
2820     
2821 else
2822   echo "configure: failed program was:" >&5
2823   cat conftest.$ac_ext >&5
2824   rm -rf conftest*
2825         lt_cv_prog_cc_pic_works=no
2826     
2827 fi
2828 rm -f conftest*
2829     CFLAGS="$save_CFLAGS"
2830   
2831 fi
2832
2833
2834   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
2835     lt_cv_prog_cc_pic=
2836     lt_cv_prog_cc_can_build_shared=no
2837   else
2838     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
2839   fi
2840
2841   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
2842 fi
2843
2844 # Check for any special shared library compilation flags.
2845 if test -n "$lt_cv_prog_cc_shlib"; then
2846   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
2847   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
2848   else
2849    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
2850     lt_cv_prog_cc_can_build_shared=no
2851   fi
2852 fi
2853
2854 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
2855 echo "configure:2856: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
2856 if eval "test \"`echo '$''{'lt_cv_prog_cc_static_works'+set}'`\" = set"; then
2857   echo $ac_n "(cached) $ac_c" 1>&6
2858 else
2859     lt_cv_prog_cc_static_works=no
2860   save_LDFLAGS="$LDFLAGS"
2861   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
2862   cat > conftest.$ac_ext <<EOF
2863 #line 2864 "configure"
2864 #include "confdefs.h"
2865
2866 int main() {
2867
2868 ; return 0; }
2869 EOF
2870 if { (eval echo configure:2871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2871   rm -rf conftest*
2872   lt_cv_prog_cc_static_works=yes
2873 else
2874   echo "configure: failed program was:" >&5
2875   cat conftest.$ac_ext >&5
2876 fi
2877 rm -f conftest*
2878   LDFLAGS="$save_LDFLAGS"
2879
2880 fi
2881
2882
2883 # Belt *and* braces to stop my trousers falling down:
2884 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
2885 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
2886
2887 pic_flag="$lt_cv_prog_cc_pic"
2888 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
2889 wl="$lt_cv_prog_cc_wl"
2890 link_static_flag="$lt_cv_prog_cc_static"
2891 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
2892 can_build_shared="$lt_cv_prog_cc_can_build_shared"
2893
2894
2895 # Check to see if options -o and -c are simultaneously supported by compiler
2896 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
2897 echo "configure:2898: checking if $compiler supports -c -o file.$ac_objext" >&5
2898 if eval "test \"`echo '$''{'lt_cv_compiler_c_o'+set}'`\" = set"; then
2899   echo $ac_n "(cached) $ac_c" 1>&6
2900 else
2901   
2902 $rm -r conftest 2>/dev/null
2903 mkdir conftest
2904 cd conftest
2905 echo "int some_variable = 0;" > conftest.$ac_ext
2906 mkdir out
2907 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
2908 # that will create temporary files in the current directory regardless of
2909 # the output directory.  Thus, making CWD read-only will cause this test
2910 # to fail, enabling locking or at least warning the user not to do parallel
2911 # builds.
2912 chmod -w .
2913 save_CFLAGS="$CFLAGS"
2914 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
2915 compiler_c_o=no
2916 if { (eval echo configure:2917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
2917   # The compiler can only warn and ignore the option if not recognized
2918   # So say no if there are warnings
2919   if test -s out/conftest.err; then
2920     lt_cv_compiler_c_o=no
2921   else
2922     lt_cv_compiler_c_o=yes
2923   fi
2924 else
2925   # Append any errors to the config.log.
2926   cat out/conftest.err 1>&5
2927   lt_cv_compiler_c_o=no
2928 fi
2929 CFLAGS="$save_CFLAGS"
2930 chmod u+w .
2931 $rm conftest* out/*
2932 rmdir out
2933 cd ..
2934 rmdir conftest
2935 $rm -r conftest 2>/dev/null
2936
2937 fi
2938
2939 compiler_c_o=$lt_cv_compiler_c_o
2940 echo "$ac_t""$compiler_c_o" 1>&6
2941
2942 if test x"$compiler_c_o" = x"yes"; then
2943   # Check to see if we can write to a .lo
2944   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
2945 echo "configure:2946: checking if $compiler supports -c -o file.lo" >&5
2946   if eval "test \"`echo '$''{'lt_cv_compiler_o_lo'+set}'`\" = set"; then
2947   echo $ac_n "(cached) $ac_c" 1>&6
2948 else
2949   
2950   lt_cv_compiler_o_lo=no
2951   save_CFLAGS="$CFLAGS"
2952   CFLAGS="$CFLAGS -c -o conftest.lo"
2953   save_objext="$ac_objext"
2954   ac_objext=lo
2955   cat > conftest.$ac_ext <<EOF
2956 #line 2957 "configure"
2957 #include "confdefs.h"
2958
2959 int main() {
2960 int some_variable = 0;
2961 ; return 0; }
2962 EOF
2963 if { (eval echo configure:2964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2964   rm -rf conftest*
2965       # The compiler can only warn and ignore the option if not recognized
2966     # So say no if there are warnings
2967     if test -s conftest.err; then
2968       lt_cv_compiler_o_lo=no
2969     else
2970       lt_cv_compiler_o_lo=yes
2971     fi
2972   
2973 else
2974   echo "configure: failed program was:" >&5
2975   cat conftest.$ac_ext >&5
2976 fi
2977 rm -f conftest*
2978   ac_objext="$save_objext"
2979   CFLAGS="$save_CFLAGS"
2980   
2981 fi
2982
2983   compiler_o_lo=$lt_cv_compiler_o_lo
2984   echo "$ac_t""$compiler_o_lo" 1>&6
2985 else
2986   compiler_o_lo=no
2987 fi
2988
2989 # Check to see if we can do hard links to lock some files if needed
2990 hard_links="nottested"
2991 if test "$compiler_c_o" = no && test "$need_locks" != no; then
2992   # do not overwrite the value of need_locks provided by the user
2993   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
2994 echo "configure:2995: checking if we can lock with hard links" >&5
2995   hard_links=yes
2996   $rm conftest*
2997   ln conftest.a conftest.b 2>/dev/null && hard_links=no
2998   touch conftest.a
2999   ln conftest.a conftest.b 2>&5 || hard_links=no
3000   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3001   echo "$ac_t""$hard_links" 1>&6
3002   if test "$hard_links" = no; then
3003     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
3004     need_locks=warn
3005   fi
3006 else
3007   need_locks=no
3008 fi
3009
3010 if test "$GCC" = yes; then
3011   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
3012   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
3013 echo "configure:3014: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
3014   echo "int some_variable = 0;" > conftest.$ac_ext
3015   save_CFLAGS="$CFLAGS"
3016   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
3017   compiler_rtti_exceptions=no
3018   cat > conftest.$ac_ext <<EOF
3019 #line 3020 "configure"
3020 #include "confdefs.h"
3021
3022 int main() {
3023 int some_variable = 0;
3024 ; return 0; }
3025 EOF
3026 if { (eval echo configure:3027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3027   rm -rf conftest*
3028       # The compiler can only warn and ignore the option if not recognized
3029     # So say no if there are warnings
3030     if test -s conftest.err; then
3031       compiler_rtti_exceptions=no
3032     else
3033       compiler_rtti_exceptions=yes
3034     fi
3035   
3036 else
3037   echo "configure: failed program was:" >&5
3038   cat conftest.$ac_ext >&5
3039 fi
3040 rm -f conftest*
3041   CFLAGS="$save_CFLAGS"
3042   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
3043
3044   if test "$compiler_rtti_exceptions" = "yes"; then
3045     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
3046   else
3047     no_builtin_flag=' -fno-builtin'
3048   fi
3049 fi
3050
3051 # See if the linker supports building shared libraries.
3052 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
3053 echo "configure:3054: checking whether the linker ($LD) supports shared libraries" >&5
3054
3055 allow_undefined_flag=
3056 no_undefined_flag=
3057 need_lib_prefix=unknown
3058 need_version=unknown
3059 # when you set need_version to no, make sure it does not cause -set_version
3060 # flags to be left without arguments
3061 archive_cmds=
3062 archive_expsym_cmds=
3063 old_archive_from_new_cmds=
3064 old_archive_from_expsyms_cmds=
3065 export_dynamic_flag_spec=
3066 whole_archive_flag_spec=
3067 thread_safe_flag_spec=
3068 hardcode_into_libs=no
3069 hardcode_libdir_flag_spec=
3070 hardcode_libdir_separator=
3071 hardcode_direct=no
3072 hardcode_minus_L=no
3073 hardcode_shlibpath_var=unsupported
3074 runpath_var=
3075 link_all_deplibs=unknown
3076 always_export_symbols=no
3077 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
3078 # include_expsyms should be a list of space-separated symbols to be *always*
3079 # included in the symbol list
3080 include_expsyms=
3081 # exclude_expsyms can be an egrep regular expression of symbols to exclude
3082 # it will be wrapped by ` (' and `)$', so one must not match beginning or
3083 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
3084 # as well as any symbol that contains `d'.
3085 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
3086 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
3087 # platforms (ab)use it in PIC code, but their linkers get confused if
3088 # the symbol is explicitly referenced.  Since portable code cannot
3089 # rely on this symbol name, it's probably fine to never include it in
3090 # preloaded symbol tables.
3091 extract_expsyms_cmds=
3092
3093 case $host_os in
3094 cygwin* | mingw* | pw32*)
3095   # FIXME: the MSVC++ port hasn't been tested in a loooong time
3096   # When not using gcc, we currently assume that we are using
3097   # Microsoft Visual C++.
3098   if test "$GCC" != yes; then
3099     with_gnu_ld=no
3100   fi
3101   ;;
3102 openbsd*)
3103   with_gnu_ld=no
3104   ;;
3105 esac
3106
3107 ld_shlibs=yes
3108 if test "$with_gnu_ld" = yes; then
3109   # If archive_cmds runs LD, not CC, wlarc should be empty
3110   wlarc='${wl}'
3111
3112   # See if GNU ld supports shared libraries.
3113   case $host_os in
3114   aix3* | aix4* | aix5*)
3115     # On AIX, the GNU linker is very broken
3116     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
3117     ld_shlibs=no
3118     cat <<EOF 1>&2
3119
3120 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
3121 *** to be unable to reliably create shared libraries on AIX.
3122 *** Therefore, libtool is disabling shared libraries support.  If you
3123 *** really care for shared libraries, you may want to modify your PATH
3124 *** so that a non-GNU linker is found, and then restart.
3125
3126 EOF
3127     ;;
3128
3129   amigaos*)
3130     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)'
3131     hardcode_libdir_flag_spec='-L$libdir'
3132     hardcode_minus_L=yes
3133
3134     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
3135     # that the semantics of dynamic libraries on AmigaOS, at least up
3136     # to version 4, is to share data among multiple programs linked
3137     # with the same dynamic library.  Since this doesn't match the
3138     # behavior of shared libraries on other platforms, we can use
3139     # them.
3140     ld_shlibs=no
3141     ;;
3142
3143   beos*)
3144     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
3145       allow_undefined_flag=unsupported
3146       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3147       # support --undefined.  This deserves some investigation.  FIXME
3148       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3149     else
3150       ld_shlibs=no
3151     fi
3152     ;;
3153
3154   cygwin* | mingw* | pw32*)
3155     # hardcode_libdir_flag_spec is actually meaningless, as there is
3156     # no search path for DLLs.
3157     hardcode_libdir_flag_spec='-L$libdir'
3158     allow_undefined_flag=unsupported
3159     always_export_symbols=yes
3160
3161     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
3162       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
3163       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
3164       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
3165       else $CC -o impgen impgen.c ; fi)~
3166       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
3167
3168     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
3169
3170     # cygwin and mingw dlls have different entry points and sets of symbols
3171     # to exclude.
3172     # FIXME: what about values for MSVC?
3173     dll_entry=__cygwin_dll_entry@12
3174     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
3175     case $host_os in
3176     mingw*)
3177       # mingw values
3178       dll_entry=_DllMainCRTStartup@12
3179       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
3180       ;;
3181     esac
3182
3183     # mingw and cygwin differ, and it's simplest to just exclude the union
3184     # of the two symbol sets.
3185     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
3186
3187     # recent cygwin and mingw systems supply a stub DllMain which the user
3188     # can override, but on older systems we have to supply one (in ltdll.c)
3189     if test "x$lt_cv_need_dllmain" = "xyes"; then
3190       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
3191       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~
3192         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
3193     else
3194       ltdll_obj=
3195       ltdll_cmds=
3196     fi
3197
3198     # Extract the symbol export list from an `--export-all' def file,
3199     # then regenerate the def file from the symbol export list, so that
3200     # the compiled dll only exports the symbol export list.
3201     # Be careful not to strip the DATA tag left be newer dlltools.
3202     export_symbols_cmds="$ltdll_cmds"'
3203       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
3204       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
3205
3206     # If the export-symbols file already is a .def file (1st line
3207     # is EXPORTS), use it as is.
3208     # If DATA tags from a recent dlltool are present, honour them!
3209     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
3210         cp $export_symbols $output_objdir/$soname-def;
3211       else
3212         echo EXPORTS > $output_objdir/$soname-def;
3213         _lt_hint=1;
3214         cat $export_symbols | while read symbol; do
3215          set dummy \$symbol;
3216          case \$# in
3217            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
3218            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
3219          esac;
3220          _lt_hint=`expr 1 + \$_lt_hint`;
3221         done;
3222       fi~
3223       '"$ltdll_cmds"'
3224       $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~
3225       $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~
3226       $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~
3227       $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~
3228       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
3229     ;;
3230
3231   netbsd*)
3232     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3233       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
3234       wlarc=
3235     else
3236       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3237       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3238     fi
3239     ;;
3240
3241   solaris* | sysv5*)
3242     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
3243       ld_shlibs=no
3244       cat <<EOF 1>&2
3245
3246 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
3247 *** create shared libraries on Solaris systems.  Therefore, libtool
3248 *** is disabling shared libraries support.  We urge you to upgrade GNU
3249 *** binutils to release 2.9.1 or newer.  Another option is to modify
3250 *** your PATH or compiler configuration so that the native linker is
3251 *** used, and then restart.
3252
3253 EOF
3254     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
3255       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3256       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3257     else
3258       ld_shlibs=no
3259     fi
3260     ;;
3261
3262   sunos4*)
3263     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3264     wlarc=
3265     hardcode_direct=yes
3266     hardcode_shlibpath_var=no
3267     ;;
3268
3269   *)
3270     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
3271       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3272       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3273     else
3274       ld_shlibs=no
3275     fi
3276     ;;
3277   esac
3278
3279   if test "$ld_shlibs" = yes; then
3280     runpath_var=LD_RUN_PATH
3281     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
3282     export_dynamic_flag_spec='${wl}--export-dynamic'
3283     case $host_os in
3284     cygwin* | mingw* | pw32*)
3285       # dlltool doesn't understand --whole-archive et. al.
3286       whole_archive_flag_spec=
3287       ;;
3288     *)
3289       # ancient GNU ld didn't support --whole-archive et. al.
3290       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
3291         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3292       else
3293         whole_archive_flag_spec=
3294       fi
3295       ;;
3296     esac
3297   fi
3298 else
3299   # PORTME fill in a description of your system's linker (not GNU ld)
3300   case $host_os in
3301   aix3*)
3302     allow_undefined_flag=unsupported
3303     always_export_symbols=yes
3304     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'
3305     # Note: this linker hardcodes the directories in LIBPATH if there
3306     # are no directories specified by -L.
3307     hardcode_minus_L=yes
3308     if test "$GCC" = yes && test -z "$link_static_flag"; then
3309       # Neither direct hardcoding nor static linking is supported with a
3310       # broken collect2.
3311       hardcode_direct=unsupported
3312     fi
3313     ;;
3314
3315   aix4* | aix5*)
3316     if test "$host_cpu" = ia64; then
3317       # On IA64, the linker does run time linking by default, so we don't
3318       # have to do anything special.
3319       aix_use_runtimelinking=no
3320       exp_sym_flag='-Bexport'
3321       no_entry_flag=""
3322     else
3323       aix_use_runtimelinking=no
3324
3325       # Test if we are trying to use run time linking or normal
3326       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3327       # need to do runtime linking.
3328       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
3329         for ld_flag in $LDFLAGS; do
3330           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
3331             aix_use_runtimelinking=yes
3332             break
3333           fi
3334         done
3335       esac
3336
3337       exp_sym_flag='-bexport'
3338       no_entry_flag='-bnoentry'
3339     fi
3340
3341     # When large executables or shared objects are built, AIX ld can
3342     # have problems creating the table of contents.  If linking a library
3343     # or program results in "error TOC overflow" add -mminimal-toc to
3344     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3345     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3346
3347     hardcode_direct=yes
3348     archive_cmds=''
3349     hardcode_libdir_separator=':'
3350     if test "$GCC" = yes; then
3351       case $host_os in aix4.[012]|aix4.[012].*)
3352         collect2name=`${CC} -print-prog-name=collect2`
3353         if test -f "$collect2name" && \
3354           strings "$collect2name" | grep resolve_lib_name >/dev/null
3355         then
3356           # We have reworked collect2
3357           hardcode_direct=yes
3358         else
3359           # We have old collect2
3360           hardcode_direct=unsupported
3361           # It fails to find uninstalled libraries when the uninstalled
3362           # path is not listed in the libpath.  Setting hardcode_minus_L
3363           # to unsupported forces relinking
3364           hardcode_minus_L=yes
3365           hardcode_libdir_flag_spec='-L$libdir'
3366           hardcode_libdir_separator=
3367         fi
3368       esac
3369
3370       shared_flag='-shared'
3371     else
3372       # not using gcc
3373       if test "$host_cpu" = ia64; then
3374         shared_flag='${wl}-G'
3375       else
3376         if test "$aix_use_runtimelinking" = yes; then
3377           shared_flag='${wl}-G'
3378         else
3379           shared_flag='${wl}-bM:SRE'
3380         fi
3381       fi
3382     fi
3383
3384     # It seems that -bexpall can do strange things, so it is better to
3385     # generate a list of symbols to export.
3386     always_export_symbols=yes
3387     if test "$aix_use_runtimelinking" = yes; then
3388       # Warning - without using the other runtime loading flags (-brtl),
3389       # -berok will link without error, but may produce a broken library.
3390       allow_undefined_flag='-berok'
3391       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
3392       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"
3393     else
3394       if test "$host_cpu" = ia64; then
3395         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
3396         allow_undefined_flag="-z nodefs"
3397         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"
3398       else
3399         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
3400         # Warning - without using the other run time loading flags,
3401         # -berok will link without error, but may produce a broken library.
3402         allow_undefined_flag='${wl}-berok'
3403         # This is a bit strange, but is similar to how AIX traditionally builds
3404         # it's shared libraries.
3405         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'
3406       fi
3407     fi
3408     ;;
3409
3410   amigaos*)
3411     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)'
3412     hardcode_libdir_flag_spec='-L$libdir'
3413     hardcode_minus_L=yes
3414     # see comment about different semantics on the GNU ld section
3415     ld_shlibs=no
3416     ;;
3417
3418   cygwin* | mingw* | pw32*)
3419     # When not using gcc, we currently assume that we are using
3420     # Microsoft Visual C++.
3421     # hardcode_libdir_flag_spec is actually meaningless, as there is
3422     # no search path for DLLs.
3423     hardcode_libdir_flag_spec=' '
3424     allow_undefined_flag=unsupported
3425     # Tell ltmain to make .lib files, not .a files.
3426     libext=lib
3427     # FIXME: Setting linknames here is a bad hack.
3428     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
3429     # The linker will automatically build a .lib file if we build a DLL.
3430     old_archive_from_new_cmds='true'
3431     # FIXME: Should let the user specify the lib program.
3432     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
3433     fix_srcfile_path='`cygpath -w "$srcfile"`'
3434     ;;
3435
3436   darwin* | rhapsody*)
3437     case "$host_os" in
3438     rhapsody* | darwin1.[012])
3439       allow_undefined_flag='-undefined suppress'
3440       ;;
3441     *) # Darwin 1.3 on
3442       allow_undefined_flag='-flat_namespace -undefined suppress'
3443       ;;
3444     esac
3445     # FIXME: Relying on posixy $() will cause problems for
3446     #        cross-compilation, but unfortunately the echo tests do not
3447     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
3448     #        `"' quotes if we put them in here... so don't!
3449     archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
3450     # We need to add '_' to the symbols in $export_symbols first
3451     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
3452     hardcode_direct=yes
3453     hardcode_shlibpath_var=no
3454     whole_archive_flag_spec='-all_load $convenience'
3455     ;;
3456
3457   freebsd1*)
3458     ld_shlibs=no
3459     ;;
3460
3461   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
3462   # support.  Future versions do this automatically, but an explicit c++rt0.o
3463   # does not break anything, and helps significantly (at the cost of a little
3464   # extra space).
3465   freebsd2.2*)
3466     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
3467     hardcode_libdir_flag_spec='-R$libdir'
3468     hardcode_direct=yes
3469     hardcode_shlibpath_var=no
3470     ;;
3471
3472   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
3473   freebsd2*)
3474     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3475     hardcode_direct=yes
3476     hardcode_minus_L=yes
3477     hardcode_shlibpath_var=no
3478     ;;
3479
3480   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
3481   freebsd*)
3482     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
3483     hardcode_libdir_flag_spec='-R$libdir'
3484     hardcode_direct=yes
3485     hardcode_shlibpath_var=no
3486     ;;
3487
3488   hpux9* | hpux10* | hpux11*)
3489     case $host_os in
3490     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' ;;
3491     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
3492     esac
3493     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
3494     hardcode_libdir_separator=:
3495     hardcode_direct=yes
3496     hardcode_minus_L=yes # Not in the search PATH, but as the default
3497                          # location of the library.
3498     export_dynamic_flag_spec='${wl}-E'
3499     ;;
3500
3501   irix5* | irix6* | nonstopux*)
3502     if test "$GCC" = yes; then
3503       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'
3504     else
3505       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'
3506     fi
3507     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
3508     hardcode_libdir_separator=:
3509     link_all_deplibs=yes
3510     ;;
3511
3512   netbsd*)
3513     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3514       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
3515     else
3516       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
3517     fi
3518     hardcode_libdir_flag_spec='-R$libdir'
3519     hardcode_direct=yes
3520     hardcode_shlibpath_var=no
3521     ;;
3522
3523   newsos6)
3524     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3525     hardcode_direct=yes
3526     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
3527     hardcode_libdir_separator=:
3528     hardcode_shlibpath_var=no
3529     ;;
3530
3531   openbsd*)
3532     hardcode_direct=yes
3533     hardcode_shlibpath_var=no
3534     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3535       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
3536       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
3537       export_dynamic_flag_spec='${wl}-E'
3538     else
3539       case "$host_os" in
3540       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
3541         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3542         hardcode_libdir_flag_spec='-R$libdir'
3543         ;;
3544       *)
3545         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
3546         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
3547         ;;
3548       esac
3549     fi
3550     ;;
3551
3552   os2*)
3553     hardcode_libdir_flag_spec='-L$libdir'
3554     hardcode_minus_L=yes
3555     allow_undefined_flag=unsupported
3556     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'
3557     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
3558     ;;
3559
3560   osf3*)
3561     if test "$GCC" = yes; then
3562       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
3563       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'
3564     else
3565       allow_undefined_flag=' -expect_unresolved \*'
3566       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'
3567     fi
3568     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
3569     hardcode_libdir_separator=:
3570     ;;
3571
3572   osf4* | osf5*)        # as osf3* with the addition of -msym flag
3573     if test "$GCC" = yes; then
3574       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
3575       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'
3576       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
3577     else
3578       allow_undefined_flag=' -expect_unresolved \*'
3579       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'
3580       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
3581       $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'
3582
3583       #Both c and cxx compiler support -rpath directly
3584       hardcode_libdir_flag_spec='-rpath $libdir'
3585     fi
3586     hardcode_libdir_separator=:
3587     ;;
3588
3589   sco3.2v5*)
3590     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3591     hardcode_shlibpath_var=no
3592     runpath_var=LD_RUN_PATH
3593     hardcode_runpath_var=yes
3594     export_dynamic_flag_spec='${wl}-Bexport'
3595     ;;
3596
3597   solaris*)
3598     # gcc --version < 3.0 without binutils cannot create self contained
3599     # shared libraries reliably, requiring libgcc.a to resolve some of
3600     # the object symbols generated in some cases.  Libraries that use
3601     # assert need libgcc.a to resolve __eprintf, for example.  Linking
3602     # a copy of libgcc.a into every shared library to guarantee resolving
3603     # such symbols causes other problems:  According to Tim Van Holder
3604     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
3605     # (to the application) exception stack for one thing.
3606     no_undefined_flag=' -z defs'
3607     if test "$GCC" = yes; then
3608       case `$CC --version 2>/dev/null` in
3609       [12].*)
3610         cat <<EOF 1>&2
3611
3612 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
3613 *** create self contained shared libraries on Solaris systems, without
3614 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
3615 *** -no-undefined support, which will at least allow you to build shared
3616 *** libraries.  However, you may find that when you link such libraries
3617 *** into an application without using GCC, you have to manually add
3618 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
3619 *** upgrade to a newer version of GCC.  Another option is to rebuild your
3620 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
3621
3622 EOF
3623         no_undefined_flag=
3624         ;;
3625       esac
3626     fi
3627     # $CC -shared without GNU ld will not create a library from C++
3628     # object files and a static libstdc++, better avoid it by now
3629     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
3630     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3631                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
3632     hardcode_libdir_flag_spec='-R$libdir'
3633     hardcode_shlibpath_var=no
3634     case $host_os in
3635     solaris2.[0-5] | solaris2.[0-5].*) ;;
3636     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
3637       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
3638     esac
3639     link_all_deplibs=yes
3640     ;;
3641
3642   sunos4*)
3643     if test "x$host_vendor" = xsequent; then
3644       # Use $CC to link under sequent, because it throws in some extra .o
3645       # files that make .init and .fini sections work.
3646       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
3647     else
3648       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
3649     fi
3650     hardcode_libdir_flag_spec='-L$libdir'
3651     hardcode_direct=yes
3652     hardcode_minus_L=yes
3653     hardcode_shlibpath_var=no
3654     ;;
3655
3656   sysv4)
3657     if test "x$host_vendor" = xsno; then
3658       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
3659       hardcode_direct=yes # is this really true???
3660     else
3661       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3662       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
3663     fi
3664     runpath_var='LD_RUN_PATH'
3665     hardcode_shlibpath_var=no
3666     ;;
3667
3668   sysv4.3*)
3669     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3670     hardcode_shlibpath_var=no
3671     export_dynamic_flag_spec='-Bexport'
3672     ;;
3673
3674   sysv5*)
3675     no_undefined_flag=' -z text'
3676     # $CC -shared without GNU ld will not create a library from C++
3677     # object files and a static libstdc++, better avoid it by now
3678     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
3679     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3680                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
3681     hardcode_libdir_flag_spec=
3682     hardcode_shlibpath_var=no
3683     runpath_var='LD_RUN_PATH'
3684     ;;
3685
3686   uts4*)
3687     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3688     hardcode_libdir_flag_spec='-L$libdir'
3689     hardcode_shlibpath_var=no
3690     ;;
3691
3692   dgux*)
3693     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3694     hardcode_libdir_flag_spec='-L$libdir'
3695     hardcode_shlibpath_var=no
3696     ;;
3697
3698   sysv4*MP*)
3699     if test -d /usr/nec; then
3700       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3701       hardcode_shlibpath_var=no
3702       runpath_var=LD_RUN_PATH
3703       hardcode_runpath_var=yes
3704       ld_shlibs=yes
3705     fi
3706     ;;
3707
3708   sysv4.2uw2*)
3709     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
3710     hardcode_direct=yes
3711     hardcode_minus_L=no
3712     hardcode_shlibpath_var=no
3713     hardcode_runpath_var=yes
3714     runpath_var=LD_RUN_PATH
3715     ;;
3716
3717   sysv5uw7* | unixware7*)
3718     no_undefined_flag='${wl}-z ${wl}text'
3719     if test "$GCC" = yes; then
3720       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
3721     else
3722       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
3723     fi
3724     runpath_var='LD_RUN_PATH'
3725     hardcode_shlibpath_var=no
3726     ;;
3727
3728   *)
3729     ld_shlibs=no
3730     ;;
3731   esac
3732 fi
3733 echo "$ac_t""$ld_shlibs" 1>&6
3734 test "$ld_shlibs" = no && can_build_shared=no
3735
3736 # Check hardcoding attributes.
3737 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
3738 echo "configure:3739: checking how to hardcode library paths into programs" >&5
3739 hardcode_action=
3740 if test -n "$hardcode_libdir_flag_spec" || \
3741    test -n "$runpath_var"; then
3742
3743   # We can hardcode non-existant directories.
3744   if test "$hardcode_direct" != no &&
3745      # If the only mechanism to avoid hardcoding is shlibpath_var, we
3746      # have to relink, otherwise we might link with an installed library
3747      # when we should be linking with a yet-to-be-installed one
3748      ## test "$hardcode_shlibpath_var" != no &&
3749      test "$hardcode_minus_L" != no; then
3750     # Linking always hardcodes the temporary library directory.
3751     hardcode_action=relink
3752   else
3753     # We can link without hardcoding, and we can hardcode nonexisting dirs.
3754     hardcode_action=immediate
3755   fi
3756 else
3757   # We cannot hardcode anything, or else we can only hardcode existing
3758   # directories.
3759   hardcode_action=unsupported
3760 fi
3761 echo "$ac_t""$hardcode_action" 1>&6
3762
3763 striplib=
3764 old_striplib=
3765 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
3766 echo "configure:3767: checking whether stripping libraries is possible" >&5
3767 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
3768   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3769   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3770   echo "$ac_t""yes" 1>&6
3771 else
3772   echo "$ac_t""no" 1>&6
3773 fi
3774
3775 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3776 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3777
3778 # PORTME Fill in your ld.so characteristics
3779 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
3780 echo "configure:3781: checking dynamic linker characteristics" >&5
3781 library_names_spec=
3782 libname_spec='lib$name'
3783 soname_spec=
3784 postinstall_cmds=
3785 postuninstall_cmds=
3786 finish_cmds=
3787 finish_eval=
3788 shlibpath_var=
3789 shlibpath_overrides_runpath=unknown
3790 version_type=none
3791 dynamic_linker="$host_os ld.so"
3792 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3793 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3794
3795 case $host_os in
3796 aix3*)
3797   version_type=linux
3798   library_names_spec='${libname}${release}.so$versuffix $libname.a'
3799   shlibpath_var=LIBPATH
3800
3801   # AIX has no versioning support, so we append a major version to the name.
3802   soname_spec='${libname}${release}.so$major'
3803   ;;
3804
3805 aix4* | aix5*)
3806   version_type=linux
3807   if test "$host_cpu" = ia64; then
3808     # AIX 5 supports IA64
3809     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
3810     shlibpath_var=LD_LIBRARY_PATH
3811   else
3812     # With GCC up to 2.95.x, collect2 would create an import file
3813     # for dependence libraries.  The import file would start with
3814     # the line `#! .'.  This would cause the generated library to
3815     # depend on `.', always an invalid library.  This was fixed in
3816     # development snapshots of GCC prior to 3.0.
3817     case $host_os in
3818       aix4 | aix4.[01] | aix4.[01].*)
3819         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3820              echo ' yes '
3821              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
3822           :
3823         else
3824           can_build_shared=no
3825         fi
3826         ;;
3827     esac
3828     # AIX (on Power*) has no versioning support, so currently we can
3829     # not hardcode correct soname into executable. Probably we can
3830     # add versioning support to collect2, so additional links can
3831     # be useful in future.
3832     if test "$aix_use_runtimelinking" = yes; then
3833       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3834       # instead of lib<name>.a to let people know that these are not
3835       # typical AIX shared libraries.
3836       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3837     else
3838       # We preserve .a as extension for shared libraries through AIX4.2
3839       # and later when we are not doing run time linking.
3840       library_names_spec='${libname}${release}.a $libname.a'
3841       soname_spec='${libname}${release}.so$major'
3842     fi
3843     shlibpath_var=LIBPATH
3844   fi
3845   ;;
3846
3847 amigaos*)
3848   library_names_spec='$libname.ixlibrary $libname.a'
3849   # Create ${libname}_ixlibrary.a entries in /sys/libs.
3850   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'
3851   ;;
3852
3853 beos*)
3854   library_names_spec='${libname}.so'
3855   dynamic_linker="$host_os ld.so"
3856   shlibpath_var=LIBRARY_PATH
3857   ;;
3858
3859 bsdi4*)
3860   version_type=linux
3861   need_version=no
3862   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3863   soname_spec='${libname}${release}.so$major'
3864   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3865   shlibpath_var=LD_LIBRARY_PATH
3866   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3867   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3868   export_dynamic_flag_spec=-rdynamic
3869   # the default ld.so.conf also contains /usr/contrib/lib and
3870   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3871   # libtool to hard-code these into programs
3872   ;;
3873
3874 cygwin* | mingw* | pw32*)
3875   version_type=windows
3876   need_version=no
3877   need_lib_prefix=no
3878   case $GCC,$host_os in
3879   yes,cygwin*)
3880     library_names_spec='$libname.dll.a'
3881     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
3882     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
3883       dldir=$destdir/`dirname \$dlpath`~
3884       test -d \$dldir || mkdir -p \$dldir~
3885       $install_prog .libs/$dlname \$dldir/$dlname'
3886     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
3887       dlpath=$dir/\$dldll~
3888        $rm \$dlpath'
3889     ;;
3890   yes,mingw*)
3891     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
3892     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
3893     ;;
3894   yes,pw32*)
3895     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
3896     ;;
3897   *)
3898     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
3899     ;;
3900   esac
3901   dynamic_linker='Win32 ld.exe'
3902   # FIXME: first we should search . and the directory the executable is in
3903   shlibpath_var=PATH
3904   ;;
3905
3906 darwin* | rhapsody*)
3907   dynamic_linker="$host_os dyld"
3908   version_type=darwin
3909   need_lib_prefix=no
3910   need_version=no
3911   # FIXME: Relying on posixy $() will cause problems for
3912   #        cross-compilation, but unfortunately the echo tests do not
3913   #        yet detect zsh echo's removal of \ escapes.
3914   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)'
3915   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
3916   shlibpath_overrides_runpath=yes
3917   shlibpath_var=DYLD_LIBRARY_PATH
3918   ;;
3919
3920 freebsd1*)
3921   dynamic_linker=no
3922   ;;
3923
3924 freebsd*)
3925   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
3926   version_type=freebsd-$objformat
3927   case $version_type in
3928     freebsd-elf*)
3929       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
3930       need_version=no
3931       need_lib_prefix=no
3932       ;;
3933     freebsd-*)
3934       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
3935       need_version=yes
3936       ;;
3937   esac
3938   shlibpath_var=LD_LIBRARY_PATH
3939   case $host_os in
3940   freebsd2*)
3941     shlibpath_overrides_runpath=yes
3942     ;;
3943   *)
3944     shlibpath_overrides_runpath=no
3945     hardcode_into_libs=yes
3946     ;;
3947   esac
3948   ;;
3949
3950 gnu*)
3951   version_type=linux
3952   need_lib_prefix=no
3953   need_version=no
3954   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
3955   soname_spec='${libname}${release}.so$major'
3956   shlibpath_var=LD_LIBRARY_PATH
3957   hardcode_into_libs=yes
3958   ;;
3959
3960 hpux9* | hpux10* | hpux11*)
3961   # Give a soname corresponding to the major version so that dld.sl refuses to
3962   # link against other versions.
3963   dynamic_linker="$host_os dld.sl"
3964   version_type=sunos
3965   need_lib_prefix=no
3966   need_version=no
3967   shlibpath_var=SHLIB_PATH
3968   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3969   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
3970   soname_spec='${libname}${release}.sl$major'
3971   # HP-UX runs *really* slowly unless shared libraries are mode 555.
3972   postinstall_cmds='chmod 555 $lib'
3973   ;;
3974
3975 irix5* | irix6* | nonstopux*)
3976   case $host_os in
3977     nonstopux*) version_type=nonstopux ;;
3978     *)          version_type=irix ;;
3979   esac
3980   need_lib_prefix=no
3981   need_version=no
3982   soname_spec='${libname}${release}.so$major'
3983   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
3984   case $host_os in
3985   irix5* | nonstopux*)
3986     libsuff= shlibsuff=
3987     ;;
3988   *)
3989     case $LD in # libtool.m4 will add one of these switches to LD
3990     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
3991     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
3992     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
3993     *) libsuff= shlibsuff= libmagic=never-match;;
3994     esac
3995     ;;
3996   esac
3997   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3998   shlibpath_overrides_runpath=no
3999   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4000   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4001   ;;
4002
4003 # No shared lib support for Linux oldld, aout, or coff.
4004 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
4005   dynamic_linker=no
4006   ;;
4007
4008 # This must be Linux ELF.
4009 linux-gnu*)
4010   version_type=linux
4011   need_lib_prefix=no
4012   need_version=no
4013   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4014   soname_spec='${libname}${release}.so$major'
4015   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4016   shlibpath_var=LD_LIBRARY_PATH
4017   shlibpath_overrides_runpath=no
4018   # This implies no fast_install, which is unacceptable.
4019   # Some rework will be needed to allow for fast_install
4020   # before this can be enabled.
4021   hardcode_into_libs=yes
4022
4023   # We used to test for /lib/ld.so.1 and disable shared libraries on
4024   # powerpc, because MkLinux only supported shared libraries with the
4025   # GNU dynamic linker.  Since this was broken with cross compilers,
4026   # most powerpc-linux boxes support dynamic linking these days and
4027   # people can always --disable-shared, the test was removed, and we
4028   # assume the GNU/Linux dynamic linker is in use.
4029   dynamic_linker='GNU/Linux ld.so'
4030   ;;
4031
4032 netbsd*)
4033   version_type=sunos
4034   need_lib_prefix=no
4035   need_version=no
4036   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4037     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
4038     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4039     dynamic_linker='NetBSD (a.out) ld.so'
4040   else
4041     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
4042     soname_spec='${libname}${release}.so$major'
4043     dynamic_linker='NetBSD ld.elf_so'
4044   fi
4045   shlibpath_var=LD_LIBRARY_PATH
4046   shlibpath_overrides_runpath=yes
4047   hardcode_into_libs=yes
4048   ;;
4049
4050 newsos6)
4051   version_type=linux
4052   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4053   shlibpath_var=LD_LIBRARY_PATH
4054   shlibpath_overrides_runpath=yes
4055   ;;
4056
4057 openbsd*)
4058   version_type=sunos
4059   need_lib_prefix=no
4060   need_version=no
4061   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4062     case "$host_os" in
4063     openbsd2.[89] | openbsd2.[89].*)
4064       shlibpath_overrides_runpath=no
4065       ;;
4066     *)
4067       shlibpath_overrides_runpath=yes
4068       ;;
4069     esac
4070   else
4071     shlibpath_overrides_runpath=yes
4072   fi
4073   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
4074   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4075   shlibpath_var=LD_LIBRARY_PATH
4076   ;;
4077
4078 os2*)
4079   libname_spec='$name'
4080   need_lib_prefix=no
4081   library_names_spec='$libname.dll $libname.a'
4082   dynamic_linker='OS/2 ld.exe'
4083   shlibpath_var=LIBPATH
4084   ;;
4085
4086 osf3* | osf4* | osf5*)
4087   version_type=osf
4088   need_version=no
4089   soname_spec='${libname}${release}.so'
4090   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
4091   shlibpath_var=LD_LIBRARY_PATH
4092   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4093   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4094   ;;
4095
4096 sco3.2v5*)
4097   version_type=osf
4098   soname_spec='${libname}${release}.so$major'
4099   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4100   shlibpath_var=LD_LIBRARY_PATH
4101   ;;
4102
4103 solaris*)
4104   version_type=linux
4105   need_lib_prefix=no
4106   need_version=no
4107   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4108   soname_spec='${libname}${release}.so$major'
4109   shlibpath_var=LD_LIBRARY_PATH
4110   shlibpath_overrides_runpath=yes
4111   hardcode_into_libs=yes
4112   # ldd complains unless libraries are executable
4113   postinstall_cmds='chmod +x $lib'
4114   ;;
4115
4116 sunos4*)
4117   version_type=sunos
4118   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
4119   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4120   shlibpath_var=LD_LIBRARY_PATH
4121   shlibpath_overrides_runpath=yes
4122   if test "$with_gnu_ld" = yes; then
4123     need_lib_prefix=no
4124   fi
4125   need_version=yes
4126   ;;
4127
4128 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4129   version_type=linux
4130   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4131   soname_spec='${libname}${release}.so$major'
4132   shlibpath_var=LD_LIBRARY_PATH
4133   case $host_vendor in
4134     sni)
4135       shlibpath_overrides_runpath=no
4136       ;;
4137     motorola)
4138       need_lib_prefix=no
4139       need_version=no
4140       shlibpath_overrides_runpath=no
4141       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4142       ;;
4143   esac
4144   ;;
4145
4146 uts4*)
4147   version_type=linux
4148   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4149   soname_spec='${libname}${release}.so$major'
4150   shlibpath_var=LD_LIBRARY_PATH
4151   ;;
4152
4153 dgux*)
4154   version_type=linux
4155   need_lib_prefix=no
4156   need_version=no
4157   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4158   soname_spec='${libname}${release}.so$major'
4159   shlibpath_var=LD_LIBRARY_PATH
4160   ;;
4161
4162 sysv4*MP*)
4163   if test -d /usr/nec ;then
4164     version_type=linux
4165     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
4166     soname_spec='$libname.so.$major'
4167     shlibpath_var=LD_LIBRARY_PATH
4168   fi
4169   ;;
4170
4171 *)
4172   dynamic_linker=no
4173   ;;
4174 esac
4175 echo "$ac_t""$dynamic_linker" 1>&6
4176 test "$dynamic_linker" = no && can_build_shared=no
4177
4178 # Report the final consequences.
4179 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
4180 echo "configure:4181: checking if libtool supports shared libraries" >&5
4181 echo "$ac_t""$can_build_shared" 1>&6
4182
4183 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
4184 echo "configure:4185: checking whether to build shared libraries" >&5
4185 test "$can_build_shared" = "no" && enable_shared=no
4186
4187 # On AIX, shared libraries and static libraries use the same namespace, and
4188 # are all built from PIC.
4189 case "$host_os" in
4190 aix3*)
4191   test "$enable_shared" = yes && enable_static=no
4192   if test -n "$RANLIB"; then
4193     archive_cmds="$archive_cmds~\$RANLIB \$lib"
4194     postinstall_cmds='$RANLIB $lib'
4195   fi
4196   ;;
4197
4198 aix4*)
4199   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4200     test "$enable_shared" = yes && enable_static=no
4201   fi
4202   ;;
4203 esac
4204 echo "$ac_t""$enable_shared" 1>&6
4205
4206 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
4207 echo "configure:4208: checking whether to build static libraries" >&5
4208 # Make sure either enable_shared or enable_static is yes.
4209 test "$enable_shared" = yes || enable_static=yes
4210 echo "$ac_t""$enable_static" 1>&6
4211
4212 if test "$hardcode_action" = relink; then
4213   # Fast installation is not supported
4214   enable_fast_install=no
4215 elif test "$shlibpath_overrides_runpath" = yes ||
4216      test "$enable_shared" = no; then
4217   # Fast installation is not necessary
4218   enable_fast_install=needless
4219 fi
4220
4221 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4222 if test "$GCC" = yes; then
4223   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4224 fi
4225
4226 if test "x$enable_dlopen" != xyes; then
4227   enable_dlopen=unknown
4228   enable_dlopen_self=unknown
4229   enable_dlopen_self_static=unknown
4230 else
4231   lt_cv_dlopen=no
4232   lt_cv_dlopen_libs=
4233
4234   case $host_os in
4235   beos*)
4236     lt_cv_dlopen="load_add_on"
4237     lt_cv_dlopen_libs=
4238     lt_cv_dlopen_self=yes
4239     ;;
4240
4241   cygwin* | mingw* | pw32*)
4242     lt_cv_dlopen="LoadLibrary"
4243     lt_cv_dlopen_libs=
4244    ;;
4245
4246   *)
4247     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
4248 echo "configure:4249: checking for shl_load" >&5
4249 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
4250   echo $ac_n "(cached) $ac_c" 1>&6
4251 else
4252   cat > conftest.$ac_ext <<EOF
4253 #line 4254 "configure"
4254 #include "confdefs.h"
4255 /* System header to define __stub macros and hopefully few prototypes,
4256     which can conflict with char shl_load(); below.  */
4257 #include <assert.h>
4258 /* Override any gcc2 internal prototype to avoid an error.  */
4259 /* We use char because int might match the return type of a gcc2
4260     builtin and then its argument prototype would still apply.  */
4261 char shl_load();
4262
4263 int main() {
4264
4265 /* The GNU C library defines this for functions which it implements
4266     to always fail with ENOSYS.  Some functions are actually named
4267     something starting with __ and the normal name is an alias.  */
4268 #if defined (__stub_shl_load) || defined (__stub___shl_load)
4269 choke me
4270 #else
4271 shl_load();
4272 #endif
4273
4274 ; return 0; }
4275 EOF
4276 if { (eval echo configure:4277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4277   rm -rf conftest*
4278   eval "ac_cv_func_shl_load=yes"
4279 else
4280   echo "configure: failed program was:" >&5
4281   cat conftest.$ac_ext >&5
4282   rm -rf conftest*
4283   eval "ac_cv_func_shl_load=no"
4284 fi
4285 rm -f conftest*
4286 fi
4287
4288 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
4289   echo "$ac_t""yes" 1>&6
4290   lt_cv_dlopen="shl_load"
4291 else
4292   echo "$ac_t""no" 1>&6
4293 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
4294 echo "configure:4295: checking for shl_load in -ldld" >&5
4295 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
4296 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4297   echo $ac_n "(cached) $ac_c" 1>&6
4298 else
4299   ac_save_LIBS="$LIBS"
4300 LIBS="-ldld  $LIBS"
4301 cat > conftest.$ac_ext <<EOF
4302 #line 4303 "configure"
4303 #include "confdefs.h"
4304 /* Override any gcc2 internal prototype to avoid an error.  */
4305 /* We use char because int might match the return type of a gcc2
4306     builtin and then its argument prototype would still apply.  */
4307 char shl_load();
4308
4309 int main() {
4310 shl_load()
4311 ; return 0; }
4312 EOF
4313 if { (eval echo configure:4314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4314   rm -rf conftest*
4315   eval "ac_cv_lib_$ac_lib_var=yes"
4316 else
4317   echo "configure: failed program was:" >&5
4318   cat conftest.$ac_ext >&5
4319   rm -rf conftest*
4320   eval "ac_cv_lib_$ac_lib_var=no"
4321 fi
4322 rm -f conftest*
4323 LIBS="$ac_save_LIBS"
4324
4325 fi
4326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4327   echo "$ac_t""yes" 1>&6
4328   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
4329 else
4330   echo "$ac_t""no" 1>&6
4331 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
4332 echo "configure:4333: checking for dlopen" >&5
4333 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
4334   echo $ac_n "(cached) $ac_c" 1>&6
4335 else
4336   cat > conftest.$ac_ext <<EOF
4337 #line 4338 "configure"
4338 #include "confdefs.h"
4339 /* System header to define __stub macros and hopefully few prototypes,
4340     which can conflict with char dlopen(); below.  */
4341 #include <assert.h>
4342 /* Override any gcc2 internal prototype to avoid an error.  */
4343 /* We use char because int might match the return type of a gcc2
4344     builtin and then its argument prototype would still apply.  */
4345 char dlopen();
4346
4347 int main() {
4348
4349 /* The GNU C library defines this for functions which it implements
4350     to always fail with ENOSYS.  Some functions are actually named
4351     something starting with __ and the normal name is an alias.  */
4352 #if defined (__stub_dlopen) || defined (__stub___dlopen)
4353 choke me
4354 #else
4355 dlopen();
4356 #endif
4357
4358 ; return 0; }
4359 EOF
4360 if { (eval echo configure:4361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4361   rm -rf conftest*
4362   eval "ac_cv_func_dlopen=yes"
4363 else
4364   echo "configure: failed program was:" >&5
4365   cat conftest.$ac_ext >&5
4366   rm -rf conftest*
4367   eval "ac_cv_func_dlopen=no"
4368 fi
4369 rm -f conftest*
4370 fi
4371
4372 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
4373   echo "$ac_t""yes" 1>&6
4374   lt_cv_dlopen="dlopen"
4375 else
4376   echo "$ac_t""no" 1>&6
4377 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4378 echo "configure:4379: checking for dlopen in -ldl" >&5
4379 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4380 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4381   echo $ac_n "(cached) $ac_c" 1>&6
4382 else
4383   ac_save_LIBS="$LIBS"
4384 LIBS="-ldl  $LIBS"
4385 cat > conftest.$ac_ext <<EOF
4386 #line 4387 "configure"
4387 #include "confdefs.h"
4388 /* Override any gcc2 internal prototype to avoid an error.  */
4389 /* We use char because int might match the return type of a gcc2
4390     builtin and then its argument prototype would still apply.  */
4391 char dlopen();
4392
4393 int main() {
4394 dlopen()
4395 ; return 0; }
4396 EOF
4397 if { (eval echo configure:4398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4398   rm -rf conftest*
4399   eval "ac_cv_lib_$ac_lib_var=yes"
4400 else
4401   echo "configure: failed program was:" >&5
4402   cat conftest.$ac_ext >&5
4403   rm -rf conftest*
4404   eval "ac_cv_lib_$ac_lib_var=no"
4405 fi
4406 rm -f conftest*
4407 LIBS="$ac_save_LIBS"
4408
4409 fi
4410 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4411   echo "$ac_t""yes" 1>&6
4412   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
4413 else
4414   echo "$ac_t""no" 1>&6
4415 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
4416 echo "configure:4417: checking for dlopen in -lsvld" >&5
4417 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'`
4418 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4419   echo $ac_n "(cached) $ac_c" 1>&6
4420 else
4421   ac_save_LIBS="$LIBS"
4422 LIBS="-lsvld  $LIBS"
4423 cat > conftest.$ac_ext <<EOF
4424 #line 4425 "configure"
4425 #include "confdefs.h"
4426 /* Override any gcc2 internal prototype to avoid an error.  */
4427 /* We use char because int might match the return type of a gcc2
4428     builtin and then its argument prototype would still apply.  */
4429 char dlopen();
4430
4431 int main() {
4432 dlopen()
4433 ; return 0; }
4434 EOF
4435 if { (eval echo configure:4436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4436   rm -rf conftest*
4437   eval "ac_cv_lib_$ac_lib_var=yes"
4438 else
4439   echo "configure: failed program was:" >&5
4440   cat conftest.$ac_ext >&5
4441   rm -rf conftest*
4442   eval "ac_cv_lib_$ac_lib_var=no"
4443 fi
4444 rm -f conftest*
4445 LIBS="$ac_save_LIBS"
4446
4447 fi
4448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4449   echo "$ac_t""yes" 1>&6
4450   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
4451 else
4452   echo "$ac_t""no" 1>&6
4453 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
4454 echo "configure:4455: checking for dld_link in -ldld" >&5
4455 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
4456 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4457   echo $ac_n "(cached) $ac_c" 1>&6
4458 else
4459   ac_save_LIBS="$LIBS"
4460 LIBS="-ldld  $LIBS"
4461 cat > conftest.$ac_ext <<EOF
4462 #line 4463 "configure"
4463 #include "confdefs.h"
4464 /* Override any gcc2 internal prototype to avoid an error.  */
4465 /* We use char because int might match the return type of a gcc2
4466     builtin and then its argument prototype would still apply.  */
4467 char dld_link();
4468
4469 int main() {
4470 dld_link()
4471 ; return 0; }
4472 EOF
4473 if { (eval echo configure:4474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4474   rm -rf conftest*
4475   eval "ac_cv_lib_$ac_lib_var=yes"
4476 else
4477   echo "configure: failed program was:" >&5
4478   cat conftest.$ac_ext >&5
4479   rm -rf conftest*
4480   eval "ac_cv_lib_$ac_lib_var=no"
4481 fi
4482 rm -f conftest*
4483 LIBS="$ac_save_LIBS"
4484
4485 fi
4486 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4487   echo "$ac_t""yes" 1>&6
4488   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
4489 else
4490   echo "$ac_t""no" 1>&6
4491 fi
4492
4493               
4494 fi
4495
4496             
4497 fi
4498
4499           
4500 fi
4501
4502         
4503 fi
4504
4505       
4506 fi
4507
4508     ;;
4509   esac
4510
4511   if test "x$lt_cv_dlopen" != xno; then
4512     enable_dlopen=yes
4513   else
4514     enable_dlopen=no
4515   fi
4516
4517   case $lt_cv_dlopen in
4518   dlopen)
4519     save_CPPFLAGS="$CPPFLAGS"
4520         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
4521
4522     save_LDFLAGS="$LDFLAGS"
4523     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
4524
4525     save_LIBS="$LIBS"
4526     LIBS="$lt_cv_dlopen_libs $LIBS"
4527
4528     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
4529 echo "configure:4530: checking whether a program can dlopen itself" >&5
4530 if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then
4531   echo $ac_n "(cached) $ac_c" 1>&6
4532 else
4533           if test "$cross_compiling" = yes; then :
4534   lt_cv_dlopen_self=cross
4535 else
4536     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
4537   lt_status=$lt_dlunknown
4538   cat > conftest.$ac_ext <<EOF
4539 #line 4540 "configure"
4540 #include "confdefs.h"
4541
4542 #if HAVE_DLFCN_H
4543 #include <dlfcn.h>
4544 #endif
4545
4546 #include <stdio.h>
4547
4548 #ifdef RTLD_GLOBAL
4549 #  define LT_DLGLOBAL           RTLD_GLOBAL
4550 #else
4551 #  ifdef DL_GLOBAL
4552 #    define LT_DLGLOBAL         DL_GLOBAL
4553 #  else
4554 #    define LT_DLGLOBAL         0
4555 #  endif
4556 #endif
4557
4558 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
4559    find out it does not work in some platform. */
4560 #ifndef LT_DLLAZY_OR_NOW
4561 #  ifdef RTLD_LAZY
4562 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
4563 #  else
4564 #    ifdef DL_LAZY
4565 #      define LT_DLLAZY_OR_NOW          DL_LAZY
4566 #    else
4567 #      ifdef RTLD_NOW
4568 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
4569 #      else
4570 #        ifdef DL_NOW
4571 #          define LT_DLLAZY_OR_NOW      DL_NOW
4572 #        else
4573 #          define LT_DLLAZY_OR_NOW      0
4574 #        endif
4575 #      endif
4576 #    endif
4577 #  endif
4578 #endif
4579
4580 #ifdef __cplusplus
4581 extern "C" void exit (int);
4582 #endif
4583
4584 void fnord() { int i=42;}
4585 int main ()
4586 {
4587   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
4588   int status = $lt_dlunknown;
4589
4590   if (self)
4591     {
4592       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
4593       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
4594       /* dlclose (self); */
4595     }
4596
4597     exit (status);
4598 }
4599 EOF
4600   if { (eval echo configure:4601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
4601     (./conftest; exit; ) 2>/dev/null
4602     lt_status=$?
4603     case x$lt_status in
4604       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
4605       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
4606       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
4607     esac
4608   else :
4609     # compilation failed
4610     lt_cv_dlopen_self=no
4611   fi
4612 fi
4613 rm -fr conftest*
4614
4615     
4616 fi
4617
4618 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
4619
4620     if test "x$lt_cv_dlopen_self" = xyes; then
4621       LDFLAGS="$LDFLAGS $link_static_flag"
4622       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
4623 echo "configure:4624: checking whether a statically linked program can dlopen itself" >&5
4624 if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then
4625   echo $ac_n "(cached) $ac_c" 1>&6
4626 else
4627           if test "$cross_compiling" = yes; then :
4628   lt_cv_dlopen_self_static=cross
4629 else
4630     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
4631   lt_status=$lt_dlunknown
4632   cat > conftest.$ac_ext <<EOF
4633 #line 4634 "configure"
4634 #include "confdefs.h"
4635
4636 #if HAVE_DLFCN_H
4637 #include <dlfcn.h>
4638 #endif
4639
4640 #include <stdio.h>
4641
4642 #ifdef RTLD_GLOBAL
4643 #  define LT_DLGLOBAL           RTLD_GLOBAL
4644 #else
4645 #  ifdef DL_GLOBAL
4646 #    define LT_DLGLOBAL         DL_GLOBAL
4647 #  else
4648 #    define LT_DLGLOBAL         0
4649 #  endif
4650 #endif
4651
4652 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
4653    find out it does not work in some platform. */
4654 #ifndef LT_DLLAZY_OR_NOW
4655 #  ifdef RTLD_LAZY
4656 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
4657 #  else
4658 #    ifdef DL_LAZY
4659 #      define LT_DLLAZY_OR_NOW          DL_LAZY
4660 #    else
4661 #      ifdef RTLD_NOW
4662 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
4663 #      else
4664 #        ifdef DL_NOW
4665 #          define LT_DLLAZY_OR_NOW      DL_NOW
4666 #        else
4667 #          define LT_DLLAZY_OR_NOW      0
4668 #        endif
4669 #      endif
4670 #    endif
4671 #  endif
4672 #endif
4673
4674 #ifdef __cplusplus
4675 extern "C" void exit (int);
4676 #endif
4677
4678 void fnord() { int i=42;}
4679 int main ()
4680 {
4681   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
4682   int status = $lt_dlunknown;
4683
4684   if (self)
4685     {
4686       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
4687       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
4688       /* dlclose (self); */
4689     }
4690
4691     exit (status);
4692 }
4693 EOF
4694   if { (eval echo configure:4695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
4695     (./conftest; exit; ) 2>/dev/null
4696     lt_status=$?
4697     case x$lt_status in
4698       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
4699       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
4700       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
4701     esac
4702   else :
4703     # compilation failed
4704     lt_cv_dlopen_self_static=no
4705   fi
4706 fi
4707 rm -fr conftest*
4708
4709       
4710 fi
4711
4712 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
4713     fi
4714
4715     CPPFLAGS="$save_CPPFLAGS"
4716     LDFLAGS="$save_LDFLAGS"
4717     LIBS="$save_LIBS"
4718     ;;
4719   esac
4720
4721   case $lt_cv_dlopen_self in
4722   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4723   *) enable_dlopen_self=unknown ;;
4724   esac
4725
4726   case $lt_cv_dlopen_self_static in
4727   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4728   *) enable_dlopen_self_static=unknown ;;
4729   esac
4730 fi
4731
4732
4733 if test "$enable_shared" = yes && test "$GCC" = yes; then
4734   case $archive_cmds in
4735   *'~'*)
4736     # FIXME: we may have to deal with multi-command sequences.
4737     ;;
4738   '$CC '*)
4739     # Test whether the compiler implicitly links with -lc since on some
4740     # systems, -lgcc has to come before -lc. If gcc already passes -lc
4741     # to ld, don't add -lc before -lgcc.
4742     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
4743 echo "configure:4744: checking whether -lc should be explicitly linked in" >&5
4744     if eval "test \"`echo '$''{'lt_cv_archive_cmds_need_lc'+set}'`\" = set"; then
4745   echo $ac_n "(cached) $ac_c" 1>&6
4746 else
4747   $rm conftest*
4748     echo 'static int dummy;' > conftest.$ac_ext
4749
4750     if { (eval echo configure:4751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4751       soname=conftest
4752       lib=conftest
4753       libobjs=conftest.$ac_objext
4754       deplibs=
4755       wl=$lt_cv_prog_cc_wl
4756       compiler_flags=-v
4757       linker_flags=-v
4758       verstring=
4759       output_objdir=.
4760       libname=conftest
4761       save_allow_undefined_flag=$allow_undefined_flag
4762       allow_undefined_flag=
4763       if { (eval echo configure:4764: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
4764       then
4765         lt_cv_archive_cmds_need_lc=no
4766       else
4767         lt_cv_archive_cmds_need_lc=yes
4768       fi
4769       allow_undefined_flag=$save_allow_undefined_flag
4770     else
4771       cat conftest.err 1>&5
4772     fi
4773 fi
4774
4775     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
4776     ;;
4777   esac
4778 fi
4779 need_lc=${lt_cv_archive_cmds_need_lc-yes}
4780
4781 # The second clause should only fire when bootstrapping the
4782 # libtool distribution, otherwise you forgot to ship ltmain.sh
4783 # with your package, and you will get complaints that there are
4784 # no rules to generate ltmain.sh.
4785 if test -f "$ltmain"; then
4786   :
4787 else
4788   # If there is no Makefile yet, we rely on a make rule to execute
4789   # `config.status --recheck' to rerun these tests and create the
4790   # libtool script then.
4791   test -f Makefile && make "$ltmain"
4792 fi
4793
4794 if test -f "$ltmain"; then
4795   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
4796   $rm -f "${ofile}T"
4797
4798   echo creating $ofile
4799
4800   # Now quote all the things that may contain metacharacters while being
4801   # careful not to overquote the AC_SUBSTed values.  We take copies of the
4802   # variables and quote the copies for generation of the libtool script.
4803   for var in echo old_CC old_CFLAGS \
4804     AR AR_FLAGS CC LD LN_S NM SHELL \
4805     reload_flag reload_cmds wl \
4806     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
4807     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
4808     library_names_spec soname_spec \
4809     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
4810     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
4811     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
4812     old_striplib striplib file_magic_cmd export_symbols_cmds \
4813     deplibs_check_method allow_undefined_flag no_undefined_flag \
4814     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
4815     global_symbol_to_c_name_address \
4816     hardcode_libdir_flag_spec hardcode_libdir_separator  \
4817     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4818     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
4819
4820     case $var in
4821     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
4822     old_postinstall_cmds | old_postuninstall_cmds | \
4823     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
4824     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
4825     postinstall_cmds | postuninstall_cmds | \
4826     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4827       # Double-quote double-evaled strings.
4828       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4829       ;;
4830     *)
4831       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4832       ;;
4833     esac
4834   done
4835
4836   cat <<__EOF__ > "${ofile}T"
4837 #! $SHELL
4838
4839 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4840 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4841 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4842 #
4843 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
4844 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4845 #
4846 # This program is free software; you can redistribute it and/or modify
4847 # it under the terms of the GNU General Public License as published by
4848 # the Free Software Foundation; either version 2 of the License, or
4849 # (at your option) any later version.
4850 #
4851 # This program is distributed in the hope that it will be useful, but
4852 # WITHOUT ANY WARRANTY; without even the implied warranty of
4853 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4854 # General Public License for more details.
4855 #
4856 # You should have received a copy of the GNU General Public License
4857 # along with this program; if not, write to the Free Software
4858 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4859 #
4860 # As a special exception to the GNU General Public License, if you
4861 # distribute this file as part of a program that contains a
4862 # configuration script generated by Autoconf, you may include it under
4863 # the same distribution terms that you use for the rest of that program.
4864
4865 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4866 Xsed="sed -e s/^X//"
4867
4868 # The HP-UX ksh and POSIX shell print the target directory to stdout
4869 # if CDPATH is set.
4870 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4871
4872 # ### BEGIN LIBTOOL CONFIG
4873
4874 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4875
4876 # Shell to use when invoking shell scripts.
4877 SHELL=$lt_SHELL
4878
4879 # Whether or not to build shared libraries.
4880 build_libtool_libs=$enable_shared
4881
4882 # Whether or not to build static libraries.
4883 build_old_libs=$enable_static
4884
4885 # Whether or not to add -lc for building shared libraries.
4886 build_libtool_need_lc=$need_lc
4887
4888 # Whether or not to optimize for fast installation.
4889 fast_install=$enable_fast_install
4890
4891 # The host system.
4892 host_alias=$host_alias
4893 host=$host
4894
4895 # An echo program that does not interpret backslashes.
4896 echo=$lt_echo
4897
4898 # The archiver.
4899 AR=$lt_AR
4900 AR_FLAGS=$lt_AR_FLAGS
4901
4902 # The default C compiler.
4903 CC=$lt_CC
4904
4905 # Is the compiler the GNU C compiler?
4906 with_gcc=$GCC
4907
4908 # The linker used to build libraries.
4909 LD=$lt_LD
4910
4911 # Whether we need hard or soft links.
4912 LN_S=$lt_LN_S
4913
4914 # A BSD-compatible nm program.
4915 NM=$lt_NM
4916
4917 # A symbol stripping program
4918 STRIP=$STRIP
4919
4920 # Used to examine libraries when file_magic_cmd begins "file"
4921 MAGIC_CMD=$MAGIC_CMD
4922
4923 # Used on cygwin: DLL creation program.
4924 DLLTOOL="$DLLTOOL"
4925
4926 # Used on cygwin: object dumper.
4927 OBJDUMP="$OBJDUMP"
4928
4929 # Used on cygwin: assembler.
4930 AS="$AS"
4931
4932 # The name of the directory that contains temporary libtool files.
4933 objdir=$objdir
4934
4935 # How to create reloadable object files.
4936 reload_flag=$lt_reload_flag
4937 reload_cmds=$lt_reload_cmds
4938
4939 # How to pass a linker flag through the compiler.
4940 wl=$lt_wl
4941
4942 # Object file suffix (normally "o").
4943 objext="$ac_objext"
4944
4945 # Old archive suffix (normally "a").
4946 libext="$libext"
4947
4948 # Executable file suffix (normally "").
4949 exeext="$exeext"
4950
4951 # Additional compiler flags for building library objects.
4952 pic_flag=$lt_pic_flag
4953 pic_mode=$pic_mode
4954
4955 # Does compiler simultaneously support -c and -o options?
4956 compiler_c_o=$lt_compiler_c_o
4957
4958 # Can we write directly to a .lo ?
4959 compiler_o_lo=$lt_compiler_o_lo
4960
4961 # Must we lock files when doing compilation ?
4962 need_locks=$lt_need_locks
4963
4964 # Do we need the lib prefix for modules?
4965 need_lib_prefix=$need_lib_prefix
4966
4967 # Do we need a version for libraries?
4968 need_version=$need_version
4969
4970 # Whether dlopen is supported.
4971 dlopen_support=$enable_dlopen
4972
4973 # Whether dlopen of programs is supported.
4974 dlopen_self=$enable_dlopen_self
4975
4976 # Whether dlopen of statically linked programs is supported.
4977 dlopen_self_static=$enable_dlopen_self_static
4978
4979 # Compiler flag to prevent dynamic linking.
4980 link_static_flag=$lt_link_static_flag
4981
4982 # Compiler flag to turn off builtin functions.
4983 no_builtin_flag=$lt_no_builtin_flag
4984
4985 # Compiler flag to allow reflexive dlopens.
4986 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
4987
4988 # Compiler flag to generate shared objects directly from archives.
4989 whole_archive_flag_spec=$lt_whole_archive_flag_spec
4990
4991 # Compiler flag to generate thread-safe objects.
4992 thread_safe_flag_spec=$lt_thread_safe_flag_spec
4993
4994 # Library versioning type.
4995 version_type=$version_type
4996
4997 # Format of library name prefix.
4998 libname_spec=$lt_libname_spec
4999
5000 # List of archive names.  First name is the real one, the rest are links.
5001 # The last name is the one that the linker finds with -lNAME.
5002 library_names_spec=$lt_library_names_spec
5003
5004 # The coded name of the library, if different from the real name.
5005 soname_spec=$lt_soname_spec
5006
5007 # Commands used to build and install an old-style archive.
5008 RANLIB=$lt_RANLIB
5009 old_archive_cmds=$lt_old_archive_cmds
5010 old_postinstall_cmds=$lt_old_postinstall_cmds
5011 old_postuninstall_cmds=$lt_old_postuninstall_cmds
5012
5013 # Create an old-style archive from a shared archive.
5014 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
5015
5016 # Create a temporary old-style archive to link instead of a shared archive.
5017 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
5018
5019 # Commands used to build and install a shared archive.
5020 archive_cmds=$lt_archive_cmds
5021 archive_expsym_cmds=$lt_archive_expsym_cmds
5022 postinstall_cmds=$lt_postinstall_cmds
5023 postuninstall_cmds=$lt_postuninstall_cmds
5024
5025 # Commands to strip libraries.
5026 old_striplib=$lt_old_striplib
5027 striplib=$lt_striplib
5028
5029 # Method to check whether dependent libraries are shared objects.
5030 deplibs_check_method=$lt_deplibs_check_method
5031
5032 # Command to use when deplibs_check_method == file_magic.
5033 file_magic_cmd=$lt_file_magic_cmd
5034
5035 # Flag that allows shared libraries with undefined symbols to be built.
5036 allow_undefined_flag=$lt_allow_undefined_flag
5037
5038 # Flag that forces no undefined symbols.
5039 no_undefined_flag=$lt_no_undefined_flag
5040
5041 # Commands used to finish a libtool library installation in a directory.
5042 finish_cmds=$lt_finish_cmds
5043
5044 # Same as above, but a single script fragment to be evaled but not shown.
5045 finish_eval=$lt_finish_eval
5046
5047 # Take the output of nm and produce a listing of raw symbols and C names.
5048 global_symbol_pipe=$lt_global_symbol_pipe
5049
5050 # Transform the output of nm in a proper C declaration
5051 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
5052
5053 # Transform the output of nm in a C name address pair
5054 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
5055
5056 # This is the shared library runtime path variable.
5057 runpath_var=$runpath_var
5058
5059 # This is the shared library path variable.
5060 shlibpath_var=$shlibpath_var
5061
5062 # Is shlibpath searched before the hard-coded library search path?
5063 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5064
5065 # How to hardcode a shared library path into an executable.
5066 hardcode_action=$hardcode_action
5067
5068 # Whether we should hardcode library paths into libraries.
5069 hardcode_into_libs=$hardcode_into_libs
5070
5071 # Flag to hardcode \$libdir into a binary during linking.
5072 # This must work even if \$libdir does not exist.
5073 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
5074
5075 # Whether we need a single -rpath flag with a separated argument.
5076 hardcode_libdir_separator=$lt_hardcode_libdir_separator
5077
5078 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
5079 # resulting binary.
5080 hardcode_direct=$hardcode_direct
5081
5082 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5083 # resulting binary.
5084 hardcode_minus_L=$hardcode_minus_L
5085
5086 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5087 # the resulting binary.
5088 hardcode_shlibpath_var=$hardcode_shlibpath_var
5089
5090 # Variables whose values should be saved in libtool wrapper scripts and
5091 # restored at relink time.
5092 variables_saved_for_relink="$variables_saved_for_relink"
5093
5094 # Whether libtool must link a program against all its dependency libraries.
5095 link_all_deplibs=$link_all_deplibs
5096
5097 # Compile-time system search path for libraries
5098 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5099
5100 # Run-time system search path for libraries
5101 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5102
5103 # Fix the shell variable \$srcfile for the compiler.
5104 fix_srcfile_path="$fix_srcfile_path"
5105
5106 # Set to yes if exported symbols are required.
5107 always_export_symbols=$always_export_symbols
5108
5109 # The commands to list exported symbols.
5110 export_symbols_cmds=$lt_export_symbols_cmds
5111
5112 # The commands to extract the exported symbol list from a shared archive.
5113 extract_expsyms_cmds=$lt_extract_expsyms_cmds
5114
5115 # Symbols that should not be listed in the preloaded symbols.
5116 exclude_expsyms=$lt_exclude_expsyms
5117
5118 # Symbols that must always be exported.
5119 include_expsyms=$lt_include_expsyms
5120
5121 # ### END LIBTOOL CONFIG
5122
5123 __EOF__
5124
5125   case $host_os in
5126   aix3*)
5127     cat <<\EOF >> "${ofile}T"
5128
5129 # AIX sometimes has problems with the GCC collect2 program.  For some
5130 # reason, if we set the COLLECT_NAMES environment variable, the problems
5131 # vanish in a puff of smoke.
5132 if test "X${COLLECT_NAMES+set}" != Xset; then
5133   COLLECT_NAMES=
5134   export COLLECT_NAMES
5135 fi
5136 EOF
5137     ;;
5138   esac
5139
5140   case $host_os in
5141   cygwin* | mingw* | pw32* | os2*)
5142     cat <<'EOF' >> "${ofile}T"
5143       # This is a source program that is used to create dlls on Windows
5144       # Don't remove nor modify the starting and closing comments
5145 # /* ltdll.c starts here */
5146 # #define WIN32_LEAN_AND_MEAN
5147 # #include <windows.h>
5148 # #undef WIN32_LEAN_AND_MEAN
5149 # #include <stdio.h>
5150 #
5151 # #ifndef __CYGWIN__
5152 # #  ifdef __CYGWIN32__
5153 # #    define __CYGWIN__ __CYGWIN32__
5154 # #  endif
5155 # #endif
5156 #
5157 # #ifdef __cplusplus
5158 # extern "C" {
5159 # #endif
5160 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
5161 # #ifdef __cplusplus
5162 # }
5163 # #endif
5164 #
5165 # #ifdef __CYGWIN__
5166 # #include <cygwin/cygwin_dll.h>
5167 # DECLARE_CYGWIN_DLL( DllMain );
5168 # #endif
5169 # HINSTANCE __hDllInstance_base;
5170 #
5171 # BOOL APIENTRY
5172 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
5173 # {
5174 #   __hDllInstance_base = hInst;
5175 #   return TRUE;
5176 # }
5177 # /* ltdll.c ends here */
5178         # This is a source program that is used to create import libraries
5179         # on Windows for dlls which lack them. Don't remove nor modify the
5180         # starting and closing comments
5181 # /* impgen.c starts here */
5182 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
5183 #
5184 #  This file is part of GNU libtool.
5185 #
5186 #  This program is free software; you can redistribute it and/or modify
5187 #  it under the terms of the GNU General Public License as published by
5188 #  the Free Software Foundation; either version 2 of the License, or
5189 #  (at your option) any later version.
5190 #
5191 #  This program is distributed in the hope that it will be useful,
5192 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
5193 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5194 #  GNU General Public License for more details.
5195 #
5196 #  You should have received a copy of the GNU General Public License
5197 #  along with this program; if not, write to the Free Software
5198 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5199 #  */
5200 #
5201 # #include <stdio.h>            /* for printf() */
5202 # #include <unistd.h>           /* for open(), lseek(), read() */
5203 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
5204 # #include <string.h>           /* for strdup() */
5205 #
5206 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
5207 # #ifndef O_BINARY
5208 # #define O_BINARY 0
5209 # #endif
5210 #
5211 # static unsigned int
5212 # pe_get16 (fd, offset)
5213 #      int fd;
5214 #      int offset;
5215 # {
5216 #   unsigned char b[2];
5217 #   lseek (fd, offset, SEEK_SET);
5218 #   read (fd, b, 2);
5219 #   return b[0] + (b[1]<<8);
5220 # }
5221 #
5222 # static unsigned int
5223 # pe_get32 (fd, offset)
5224 #     int fd;
5225 #     int offset;
5226 # {
5227 #   unsigned char b[4];
5228 #   lseek (fd, offset, SEEK_SET);
5229 #   read (fd, b, 4);
5230 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5231 # }
5232 #
5233 # static unsigned int
5234 # pe_as32 (ptr)
5235 #      void *ptr;
5236 # {
5237 #   unsigned char *b = ptr;
5238 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5239 # }
5240 #
5241 # int
5242 # main (argc, argv)
5243 #     int argc;
5244 #     char *argv[];
5245 # {
5246 #     int dll;
5247 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
5248 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
5249 #     unsigned long name_rvas, nexp;
5250 #     unsigned char *expdata, *erva;
5251 #     char *filename, *dll_name;
5252 #
5253 #     filename = argv[1];
5254 #
5255 #     dll = open(filename, O_RDONLY|O_BINARY);
5256 #     if (dll < 1)
5257 #       return 1;
5258 #
5259 #     dll_name = filename;
5260 #
5261 #     for (i=0; filename[i]; i++)
5262 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
5263 #           dll_name = filename + i +1;
5264 #
5265 #     pe_header_offset = pe_get32 (dll, 0x3c);
5266 #     opthdr_ofs = pe_header_offset + 4 + 20;
5267 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
5268 #
5269 #     if (num_entries < 1) /* no exports */
5270 #       return 1;
5271 #
5272 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
5273 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
5274 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
5275 #     secptr = (pe_header_offset + 4 + 20 +
5276 #             pe_get16 (dll, pe_header_offset + 4 + 16));
5277 #
5278 #     expptr = 0;
5279 #     for (i = 0; i < nsections; i++)
5280 #     {
5281 #       char sname[8];
5282 #       unsigned long secptr1 = secptr + 40 * i;
5283 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
5284 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
5285 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
5286 #       lseek(dll, secptr1, SEEK_SET);
5287 #       read(dll, sname, 8);
5288 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
5289 #       {
5290 #           expptr = fptr + (export_rva - vaddr);
5291 #           if (export_rva + export_size > vaddr + vsize)
5292 #               export_size = vsize - (export_rva - vaddr);
5293 #           break;
5294 #       }
5295 #     }
5296 #
5297 #     expdata = (unsigned char*)malloc(export_size);
5298 #     lseek (dll, expptr, SEEK_SET);
5299 #     read (dll, expdata, export_size);
5300 #     erva = expdata - export_rva;
5301 #
5302 #     nexp = pe_as32 (expdata+24);
5303 #     name_rvas = pe_as32 (expdata+32);
5304 #
5305 #     printf ("EXPORTS\n");
5306 #     for (i = 0; i<nexp; i++)
5307 #     {
5308 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
5309 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
5310 #     }
5311 #
5312 #     return 0;
5313 # }
5314 # /* impgen.c ends here */
5315
5316 EOF
5317     ;;
5318   esac
5319
5320   # We use sed instead of cat because bash on DJGPP gets confused if
5321   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
5322   # text mode, it properly converts lines to CR/LF.  This bash problem
5323   # is reportedly fixed, but why not run on old versions too?
5324   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
5325
5326   mv -f "${ofile}T" "$ofile" || \
5327     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
5328   chmod +x "$ofile"
5329 fi
5330
5331
5332
5333
5334
5335 # This can be used to rebuild libtool when needed
5336 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
5337
5338 # Always use our own libtool.
5339 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
5340
5341 # Prevent multiple expansion
5342
5343
5344  for ac_prog in gzip uncompress compress
5345 do
5346 # Extract the first word of "$ac_prog", so it can be a program name with args.
5347 set dummy $ac_prog; ac_word=$2
5348 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5349 echo "configure:5350: checking for $ac_word" >&5
5350 if eval "test \"`echo '$''{'ac_cv_prog_UNCOMPRESS'+set}'`\" = set"; then
5351   echo $ac_n "(cached) $ac_c" 1>&6
5352 else
5353   if test -n "$UNCOMPRESS"; then
5354   ac_cv_prog_UNCOMPRESS="$UNCOMPRESS" # Let the user override the test.
5355 else
5356   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5357   ac_dummy="$PATH"
5358   for ac_dir in $ac_dummy; do
5359     test -z "$ac_dir" && ac_dir=.
5360     if test -f $ac_dir/$ac_word; then
5361       ac_cv_prog_UNCOMPRESS="$ac_prog"
5362       break
5363     fi
5364   done
5365   IFS="$ac_save_ifs"
5366 fi
5367 fi
5368 UNCOMPRESS="$ac_cv_prog_UNCOMPRESS"
5369 if test -n "$UNCOMPRESS"; then
5370   echo "$ac_t""$UNCOMPRESS" 1>&6
5371 else
5372   echo "$ac_t""no" 1>&6
5373 fi
5374
5375 test -n "$UNCOMPRESS" && break
5376 done
5377
5378
5379  
5380
5381 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
5382 echo "configure:5383: checking for executable suffix" >&5
5383 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
5384   echo $ac_n "(cached) $ac_c" 1>&6
5385 else
5386   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
5387   ac_cv_exeext=.exe
5388 else
5389   rm -f conftest*
5390   echo 'int main () { return 0; }' > conftest.$ac_ext
5391   ac_cv_exeext=
5392   if { (eval echo configure:5393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
5393     for file in conftest.*; do
5394       case $file in
5395       *.c | *.o | *.obj) ;;
5396       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
5397       esac
5398     done
5399   else
5400     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
5401   fi
5402   rm -f conftest*
5403   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
5404 fi
5405 fi
5406
5407 EXEEXT=""
5408 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
5409 echo "$ac_t""${ac_cv_exeext}" 1>&6
5410 ac_exeext=$EXEEXT
5411
5412
5413
5414 echo $ac_n "checking for target system""... $ac_c" 1>&6
5415 echo "configure:5416: checking for target system" >&5
5416
5417 # Make sure we can run config.sub.
5418 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
5419 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
5420 fi
5421
5422 echo $ac_n "checking host system type""... $ac_c" 1>&6
5423 echo "configure:5424: checking host system type" >&5
5424
5425 host_alias=$host
5426 case "$host_alias" in
5427 NONE)
5428   case $nonopt in
5429   NONE)
5430     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
5431     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
5432     fi ;;
5433   *) host_alias=$nonopt ;;
5434   esac ;;
5435 esac
5436
5437 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
5438 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
5439 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
5440 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
5441 echo "$ac_t""$host" 1>&6
5442
5443 CYGWIN=
5444 MINGW=
5445 case $host_os in
5446     *cygwin* ) CYGWIN=yes;;
5447     *mingw* ) MINGW=yes;;
5448 esac
5449
5450 AR=ar
5451 if test "x$CXX" == "xi586-mingw32msvc-g++"; then
5452 #fix for the debian distribution of mingw
5453     if test -x "/usr/i586-mingw32msvc/bin/ar";then
5454         AR="/usr/i586-mingw32msvc/bin/ar"
5455     fi
5456     if test -x "/usr/i586-mingw32msvc/bin/ranlib";then
5457         RANLIB="/usr/i586-mingw32msvc/bin/ranlib"
5458     fi
5459 fi
5460
5461
5462  
5463
5464 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
5465 echo "configure:5466: checking for executable suffix" >&5
5466 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
5467   echo $ac_n "(cached) $ac_c" 1>&6
5468 else
5469   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
5470   ac_cv_exeext=.exe
5471 else
5472   rm -f conftest*
5473   echo 'int main () { return 0; }' > conftest.$ac_ext
5474   ac_cv_exeext=
5475   if { (eval echo configure:5476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
5476     for file in conftest.*; do
5477       case $file in
5478       *.c | *.o | *.obj) ;;
5479       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
5480       esac
5481     done
5482   else
5483     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
5484   fi
5485   rm -f conftest*
5486   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
5487 fi
5488 fi
5489
5490 EXEEXT=""
5491 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
5492 echo "$ac_t""${ac_cv_exeext}" 1>&6
5493 ac_exeext=$EXEEXT
5494
5495
5496 if test "x${CYGWIN}" = "xyes"; then
5497     cat >> confdefs.h <<EOF
5498 #define CYGWIN 1
5499 EOF
5500
5501     echo "$ac_t""cygwin" 1>&6
5502 else
5503     if test "x${MINGW}" = "xyes"; then
5504         cat >> confdefs.h <<EOF
5505 #define MINGW 1
5506 EOF
5507
5508         WIN32=1
5509         cat >> confdefs.h <<EOF
5510 #define WIN32 1
5511 EOF
5512
5513         LIBS="$LIBS -lws2_32"
5514         echo "$ac_t""mingw" 1>&6
5515     else
5516         LINUX=1
5517         export LINUX
5518         cat >> confdefs.h <<EOF
5519 #define LINUX 1
5520 EOF
5521
5522         echo "$ac_t""" 1>&6
5523     fi
5524 fi
5525
5526
5527 # The following tries to make use of includes and libraries in
5528 # /usr/local, too. Notice: A -I/usr/local/include might break
5529 # things (MingW, cross-compiling etc.) in the same way as -I/usr/include, 
5530 # especially on systems which link /usr/local to /usr, so it has yet
5531 # to be seen how useful this is.
5532 if test -d /usr/local/lib; then
5533     LDFLAGS="$LDFLAGS -L/usr/local/lib"
5534 fi
5535 if test -d /usr/local/include; then
5536 # Leave that alone. It's causing trouble e.g. with gcc 3.2 on gentoo.
5537 #   CPPFLAGS="$CPPFLAGS -I/usr/local/include"
5538     echo > /dev/null
5539 fi
5540
5541  echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
5542 echo "configure:5543: checking for sin in -lm" >&5
5543 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
5544 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5545   echo $ac_n "(cached) $ac_c" 1>&6
5546 else
5547   ac_save_LIBS="$LIBS"
5548 LIBS="-lm  $LIBS"
5549 cat > conftest.$ac_ext <<EOF
5550 #line 5551 "configure"
5551 #include "confdefs.h"
5552 /* Override any gcc2 internal prototype to avoid an error.  */
5553 /* We use char because int might match the return type of a gcc2
5554     builtin and then its argument prototype would still apply.  */
5555 char sin();
5556
5557 int main() {
5558 sin()
5559 ; return 0; }
5560 EOF
5561 if { (eval echo configure:5562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5562   rm -rf conftest*
5563   eval "ac_cv_lib_$ac_lib_var=yes"
5564 else
5565   echo "configure: failed program was:" >&5
5566   cat conftest.$ac_ext >&5
5567   rm -rf conftest*
5568   eval "ac_cv_lib_$ac_lib_var=no"
5569 fi
5570 rm -f conftest*
5571 LIBS="$ac_save_LIBS"
5572
5573 fi
5574 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5575   echo "$ac_t""yes" 1>&6
5576     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5577     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5578   cat >> confdefs.h <<EOF
5579 #define $ac_tr_lib 1
5580 EOF
5581
5582   LIBS="-lm $LIBS"
5583
5584 else
5585   echo "$ac_t""no" 1>&6
5586 echo "Error: Math library not found.";
5587  exit;
5588  
5589 fi
5590
5591  echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
5592 echo "configure:5593: checking for deflate in -lz" >&5
5593 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
5594 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5595   echo $ac_n "(cached) $ac_c" 1>&6
5596 else
5597   ac_save_LIBS="$LIBS"
5598 LIBS="-lz  $LIBS"
5599 cat > conftest.$ac_ext <<EOF
5600 #line 5601 "configure"
5601 #include "confdefs.h"
5602 /* Override any gcc2 internal prototype to avoid an error.  */
5603 /* We use char because int might match the return type of a gcc2
5604     builtin and then its argument prototype would still apply.  */
5605 char deflate();
5606
5607 int main() {
5608 deflate()
5609 ; return 0; }
5610 EOF
5611 if { (eval echo configure:5612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5612   rm -rf conftest*
5613   eval "ac_cv_lib_$ac_lib_var=yes"
5614 else
5615   echo "configure: failed program was:" >&5
5616   cat conftest.$ac_ext >&5
5617   rm -rf conftest*
5618   eval "ac_cv_lib_$ac_lib_var=no"
5619 fi
5620 rm -f conftest*
5621 LIBS="$ac_save_LIBS"
5622
5623 fi
5624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5625   echo "$ac_t""yes" 1>&6
5626     ac_tr_lib=HAVE_LIB`echo z | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5627     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5628   cat >> confdefs.h <<EOF
5629 #define $ac_tr_lib 1
5630 EOF
5631
5632   LIBS="-lz $LIBS"
5633
5634 else
5635   echo "$ac_t""no" 1>&6
5636 DISABLEPNG2SWF=true;
5637  MISSINGLIBS="${MISSINGLIBS} zlib"
5638  ZLIBMISSING=true;
5639  
5640 fi
5641
5642  echo $ac_n "checking for jpeg_write_raw_data in -ljpeg""... $ac_c" 1>&6
5643 echo "configure:5644: checking for jpeg_write_raw_data in -ljpeg" >&5
5644 ac_lib_var=`echo jpeg'_'jpeg_write_raw_data | sed 'y%./+-%__p_%'`
5645 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5646   echo $ac_n "(cached) $ac_c" 1>&6
5647 else
5648   ac_save_LIBS="$LIBS"
5649 LIBS="-ljpeg  $LIBS"
5650 cat > conftest.$ac_ext <<EOF
5651 #line 5652 "configure"
5652 #include "confdefs.h"
5653 /* Override any gcc2 internal prototype to avoid an error.  */
5654 /* We use char because int might match the return type of a gcc2
5655     builtin and then its argument prototype would still apply.  */
5656 char jpeg_write_raw_data();
5657
5658 int main() {
5659 jpeg_write_raw_data()
5660 ; return 0; }
5661 EOF
5662 if { (eval echo configure:5663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5663   rm -rf conftest*
5664   eval "ac_cv_lib_$ac_lib_var=yes"
5665 else
5666   echo "configure: failed program was:" >&5
5667   cat conftest.$ac_ext >&5
5668   rm -rf conftest*
5669   eval "ac_cv_lib_$ac_lib_var=no"
5670 fi
5671 rm -f conftest*
5672 LIBS="$ac_save_LIBS"
5673
5674 fi
5675 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5676   echo "$ac_t""yes" 1>&6
5677     ac_tr_lib=HAVE_LIB`echo jpeg | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5678     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5679   cat >> confdefs.h <<EOF
5680 #define $ac_tr_lib 1
5681 EOF
5682
5683   LIBS="-ljpeg $LIBS"
5684
5685 else
5686   echo "$ac_t""no" 1>&6
5687 DISABLEPDF2SWF=true;
5688  DISABLEJPEG2SWF=true;
5689  MISSINGLIBS="${MISSINGLIBS} jpeglib"
5690  
5691 fi
5692
5693  echo $ac_n "checking for T1_LoadFont in -lt1""... $ac_c" 1>&6
5694 echo "configure:5695: checking for T1_LoadFont in -lt1" >&5
5695 ac_lib_var=`echo t11'_'T1_LoadFont | sed 'y%./+-%__p_%'`
5696 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5697   echo $ac_n "(cached) $ac_c" 1>&6
5698 else
5699   ac_save_LIBS="$LIBS"
5700 LIBS="-lt11  $LIBS"
5701 cat > conftest.$ac_ext <<EOF
5702 #line 5703 "configure"
5703 #include "confdefs.h"
5704 /* Override any gcc2 internal prototype to avoid an error.  */
5705 /* We use char because int might match the return type of a gcc2
5706     builtin and then its argument prototype would still apply.  */
5707 char T1_LoadFont();
5708
5709 int main() {
5710 T1_LoadFont()
5711 ; return 0; }
5712 EOF
5713 if { (eval echo configure:5714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5714   rm -rf conftest*
5715   eval "ac_cv_lib_$ac_lib_var=yes"
5716 else
5717   echo "configure: failed program was:" >&5
5718   cat conftest.$ac_ext >&5
5719   rm -rf conftest*
5720   eval "ac_cv_lib_$ac_lib_var=no"
5721 fi
5722 rm -f conftest*
5723 LIBS="$ac_save_LIBS"
5724
5725 fi
5726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5727   echo "$ac_t""yes" 1>&6
5728     ac_tr_lib=HAVE_LIB`echo t1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5729     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5730   cat >> confdefs.h <<EOF
5731 #define $ac_tr_lib 1
5732 EOF
5733
5734   LIBS="-lt1 $LIBS"
5735
5736 else
5737   echo "$ac_t""no" 1>&6
5738 DISABLEPDF2SWF=true;
5739  MISSINGLIBS="${MISSINGLIBS} t1lib"
5740  
5741 fi
5742
5743
5744
5745 echo $ac_n "checking for byte order""... $ac_c" 1>&6
5746 echo "configure:5747: checking for byte order" >&5
5747 if test "$cross_compiling" = yes; then
5748   CROSSCOMPILE=1
5749 else
5750   cat > conftest.$ac_ext <<EOF
5751 #line 5752 "configure"
5752 #include "confdefs.h"
5753
5754 int main (int argc, char *argv[])
5755 {
5756     int i = 1;
5757     return *(char*)&i;
5758 }
5759
5760 EOF
5761 if { (eval echo configure:5762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5762 then
5763   BIGENDIAN=1
5764 else
5765   echo "configure: failed program was:" >&5
5766   cat conftest.$ac_ext >&5
5767   rm -fr conftest*
5768   LITTLEENDIAN=1
5769 fi
5770 rm -fr conftest*
5771 fi
5772
5773 export CROSSCOMPILE 
5774
5775 if test "x${CROSSCOMPILE}" = "x1"; then
5776  echo "$ac_t""we are cross compiling- trying to guess from system type" 1>&6
5777  
5778 # Do some error checking and defaulting for the host and target type.
5779 # The inputs are:
5780 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
5781 #
5782 # The rules are:
5783 # 1. You are not allowed to specify --host, --target, and nonopt at the
5784 #    same time.
5785 # 2. Host defaults to nonopt.
5786 # 3. If nonopt is not specified, then host defaults to the current host,
5787 #    as determined by config.guess.
5788 # 4. Target and build default to nonopt.
5789 # 5. If nonopt is not specified, then target and build default to host.
5790
5791 # The aliases save the names the user supplied, while $host etc.
5792 # will get canonicalized.
5793 case $host---$target---$nonopt in
5794 NONE---*---* | *---NONE---* | *---*---NONE) ;;
5795 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
5796 esac
5797
5798
5799 # Make sure we can run config.sub.
5800 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
5801 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
5802 fi
5803
5804 echo $ac_n "checking host system type""... $ac_c" 1>&6
5805 echo "configure:5806: checking host system type" >&5
5806
5807 host_alias=$host
5808 case "$host_alias" in
5809 NONE)
5810   case $nonopt in
5811   NONE)
5812     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
5813     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
5814     fi ;;
5815   *) host_alias=$nonopt ;;
5816   esac ;;
5817 esac
5818
5819 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
5820 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
5821 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
5822 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
5823 echo "$ac_t""$host" 1>&6
5824
5825 echo $ac_n "checking target system type""... $ac_c" 1>&6
5826 echo "configure:5827: checking target system type" >&5
5827
5828 target_alias=$target
5829 case "$target_alias" in
5830 NONE)
5831   case $nonopt in
5832   NONE) target_alias=$host_alias ;;
5833   *) target_alias=$nonopt ;;
5834   esac ;;
5835 esac
5836
5837 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
5838 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
5839 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
5840 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
5841 echo "$ac_t""$target" 1>&6
5842
5843 echo $ac_n "checking build system type""... $ac_c" 1>&6
5844 echo "configure:5845: checking build system type" >&5
5845
5846 build_alias=$build
5847 case "$build_alias" in
5848 NONE)
5849   case $nonopt in
5850   NONE) build_alias=$host_alias ;;
5851   *) build_alias=$nonopt ;;
5852   esac ;;
5853 esac
5854
5855 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
5856 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
5857 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
5858 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
5859 echo "$ac_t""$build" 1>&6
5860
5861 test "$host_alias" != "$target_alias" &&
5862   test "$program_prefix$program_suffix$program_transform_name" = \
5863     NONENONEs,x,x, &&
5864   program_prefix=${target_alias}-
5865
5866  echo $ac_n "checking for byte order, try 2""... $ac_c" 1>&6
5867 echo "configure:5868: checking for byte order, try 2" >&5
5868  case "${target}" in
5869   *86* | *-pc-* )
5870      LITTLEENDIAN=1
5871      ;;
5872   *sparc* | *68* | *88k* | *mac* | *Mac* | *sun* | *Sun* | *Amiga* | *amiga* )
5873      BIGENDIAN=1
5874      ;;
5875  esac
5876 fi
5877
5878 export LITTLEENDIAN
5879 if test "x${LITTLEENDIAN}" = "x1"; then
5880 echo "$ac_t""little endian" 1>&6
5881 BYTEORDERCHECKOK=1
5882 fi
5883 export BIGENDIAN
5884 if test "x${BIGENDIAN}" = "x1"; then
5885 echo "$ac_t""big endian" 1>&6
5886 BYTEORDERCHECKOK=1
5887 WORDS_BIGENDIAN=1
5888 export WORDS_BIGENDIAN
5889 cat >> confdefs.h <<EOF
5890 #define WORDS_BIGENDIAN 1
5891 EOF
5892
5893 fi
5894 if test "x${BYTEORDERCHECKOK}" != "x1"; then
5895 echo "$ac_t""unknown" 1>&6
5896 echo Byte order could not determined.
5897 exit 1
5898 fi
5899
5900
5901
5902 echo $ac_n "checking whether system() can handle command substitution""... $ac_c" 1>&6
5903 echo "configure:5904: checking whether system() can handle command substitution" >&5
5904 if test "$cross_compiling" = yes; then
5905   CROSSCOMPILE=1
5906 else
5907   cat > conftest.$ac_ext <<EOF
5908 #line 5909 "configure"
5909 #include "confdefs.h"
5910
5911 #include "stdlib.h"
5912 int main (int argc, char*argv[])
5913 {
5914     return system("test `touch config.tmp2`");
5915 }
5916
5917 EOF
5918 if { (eval echo configure:5919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5919 then
5920   OK=OK
5921 else
5922   echo "configure: failed program was:" >&5
5923   cat conftest.$ac_ext >&5
5924 fi
5925 rm -fr conftest*
5926 fi
5927
5928
5929 if test "x${OK}" = "xOK";then
5930     test -f config.tmp2 || OK=
5931 fi
5932
5933 if test "x${CROSSCOMPILE}" = "x1";then
5934     OK=OK;
5935 fi
5936 if test "x${OK}" = "xOK";then
5937 rm -f config.tmp2
5938 echo "$ac_t""yes" 1>&6
5939 SYSTEM_BACKTICKS=1
5940 export SYSTEM_BACKTICKS
5941 cat >> confdefs.h <<EOF
5942 #define SYSTEM_BACKTICKS 1
5943 EOF
5944
5945 else
5946 echo "$ac_t""no" 1>&6
5947 fi
5948
5949
5950
5951 if test "$program_transform_name" = s,x,x,; then
5952   program_transform_name=
5953 else
5954   # Double any \ or $.  echo might interpret backslashes.
5955   cat <<\EOF_SED > conftestsed
5956 s,\\,\\\\,g; s,\$,$$,g
5957 EOF_SED
5958   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
5959   rm -f conftestsed
5960 fi
5961 test "$program_prefix" != NONE &&
5962   program_transform_name="s,^,${program_prefix},; $program_transform_name"
5963 # Use a double $ so make ignores it.
5964 test "$program_suffix" != NONE &&
5965   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
5966
5967 # sed with no file args requires a program.
5968 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
5969
5970
5971  
5972  ac_header_dirent=no
5973 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
5974 do
5975 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5976 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
5977 echo "configure:5978: checking for $ac_hdr that defines DIR" >&5
5978 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
5979   echo $ac_n "(cached) $ac_c" 1>&6
5980 else
5981   cat > conftest.$ac_ext <<EOF
5982 #line 5983 "configure"
5983 #include "confdefs.h"
5984 #include <sys/types.h>
5985 #include <$ac_hdr>
5986 int main() {
5987 DIR *dirp = 0;
5988 ; return 0; }
5989 EOF
5990 if { (eval echo configure:5991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5991   rm -rf conftest*
5992   eval "ac_cv_header_dirent_$ac_safe=yes"
5993 else
5994   echo "configure: failed program was:" >&5
5995   cat conftest.$ac_ext >&5
5996   rm -rf conftest*
5997   eval "ac_cv_header_dirent_$ac_safe=no"
5998 fi
5999 rm -f conftest*
6000 fi
6001 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
6002   echo "$ac_t""yes" 1>&6
6003     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6004   cat >> confdefs.h <<EOF
6005 #define $ac_tr_hdr 1
6006 EOF
6007  ac_header_dirent=$ac_hdr; break
6008 else
6009   echo "$ac_t""no" 1>&6
6010 fi
6011 done
6012 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6013 if test $ac_header_dirent = dirent.h; then
6014 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
6015 echo "configure:6016: checking for opendir in -ldir" >&5
6016 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
6017 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6018   echo $ac_n "(cached) $ac_c" 1>&6
6019 else
6020   ac_save_LIBS="$LIBS"
6021 LIBS="-ldir  $LIBS"
6022 cat > conftest.$ac_ext <<EOF
6023 #line 6024 "configure"
6024 #include "confdefs.h"
6025 /* Override any gcc2 internal prototype to avoid an error.  */
6026 /* We use char because int might match the return type of a gcc2
6027     builtin and then its argument prototype would still apply.  */
6028 char opendir();
6029
6030 int main() {
6031 opendir()
6032 ; return 0; }
6033 EOF
6034 if { (eval echo configure:6035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6035   rm -rf conftest*
6036   eval "ac_cv_lib_$ac_lib_var=yes"
6037 else
6038   echo "configure: failed program was:" >&5
6039   cat conftest.$ac_ext >&5
6040   rm -rf conftest*
6041   eval "ac_cv_lib_$ac_lib_var=no"
6042 fi
6043 rm -f conftest*
6044 LIBS="$ac_save_LIBS"
6045
6046 fi
6047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6048   echo "$ac_t""yes" 1>&6
6049   LIBS="$LIBS -ldir"
6050 else
6051   echo "$ac_t""no" 1>&6
6052 fi
6053
6054 else
6055 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
6056 echo "configure:6057: checking for opendir in -lx" >&5
6057 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
6058 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6059   echo $ac_n "(cached) $ac_c" 1>&6
6060 else
6061   ac_save_LIBS="$LIBS"
6062 LIBS="-lx  $LIBS"
6063 cat > conftest.$ac_ext <<EOF
6064 #line 6065 "configure"
6065 #include "confdefs.h"
6066 /* Override any gcc2 internal prototype to avoid an error.  */
6067 /* We use char because int might match the return type of a gcc2
6068     builtin and then its argument prototype would still apply.  */
6069 char opendir();
6070
6071 int main() {
6072 opendir()
6073 ; return 0; }
6074 EOF
6075 if { (eval echo configure:6076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6076   rm -rf conftest*
6077   eval "ac_cv_lib_$ac_lib_var=yes"
6078 else
6079   echo "configure: failed program was:" >&5
6080   cat conftest.$ac_ext >&5
6081   rm -rf conftest*
6082   eval "ac_cv_lib_$ac_lib_var=no"
6083 fi
6084 rm -f conftest*
6085 LIBS="$ac_save_LIBS"
6086
6087 fi
6088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6089   echo "$ac_t""yes" 1>&6
6090   LIBS="$LIBS -lx"
6091 else
6092   echo "$ac_t""no" 1>&6
6093 fi
6094
6095 fi
6096
6097  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
6098 echo "configure:6099: checking for ANSI C header files" >&5
6099 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
6100   echo $ac_n "(cached) $ac_c" 1>&6
6101 else
6102   cat > conftest.$ac_ext <<EOF
6103 #line 6104 "configure"
6104 #include "confdefs.h"
6105 #include <stdlib.h>
6106 #include <stdarg.h>
6107 #include <string.h>
6108 #include <float.h>
6109 EOF
6110 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6111 { (eval echo configure:6112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6112 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6113 if test -z "$ac_err"; then
6114   rm -rf conftest*
6115   ac_cv_header_stdc=yes
6116 else
6117   echo "$ac_err" >&5
6118   echo "configure: failed program was:" >&5
6119   cat conftest.$ac_ext >&5
6120   rm -rf conftest*
6121   ac_cv_header_stdc=no
6122 fi
6123 rm -f conftest*
6124
6125 if test $ac_cv_header_stdc = yes; then
6126   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6127 cat > conftest.$ac_ext <<EOF
6128 #line 6129 "configure"
6129 #include "confdefs.h"
6130 #include <string.h>
6131 EOF
6132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6133   egrep "memchr" >/dev/null 2>&1; then
6134   :
6135 else
6136   rm -rf conftest*
6137   ac_cv_header_stdc=no
6138 fi
6139 rm -f conftest*
6140
6141 fi
6142
6143 if test $ac_cv_header_stdc = yes; then
6144   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6145 cat > conftest.$ac_ext <<EOF
6146 #line 6147 "configure"
6147 #include "confdefs.h"
6148 #include <stdlib.h>
6149 EOF
6150 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6151   egrep "free" >/dev/null 2>&1; then
6152   :
6153 else
6154   rm -rf conftest*
6155   ac_cv_header_stdc=no
6156 fi
6157 rm -f conftest*
6158
6159 fi
6160
6161 if test $ac_cv_header_stdc = yes; then
6162   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6163 if test "$cross_compiling" = yes; then
6164   :
6165 else
6166   cat > conftest.$ac_ext <<EOF
6167 #line 6168 "configure"
6168 #include "confdefs.h"
6169 #include <ctype.h>
6170 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6171 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6172 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6173 int main () { int i; for (i = 0; i < 256; i++)
6174 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
6175 exit (0); }
6176
6177 EOF
6178 if { (eval echo configure:6179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6179 then
6180   :
6181 else
6182   echo "configure: failed program was:" >&5
6183   cat conftest.$ac_ext >&5
6184   rm -fr conftest*
6185   ac_cv_header_stdc=no
6186 fi
6187 rm -fr conftest*
6188 fi
6189
6190 fi
6191 fi
6192
6193 echo "$ac_t""$ac_cv_header_stdc" 1>&6
6194 if test $ac_cv_header_stdc = yes; then
6195   cat >> confdefs.h <<\EOF
6196 #define STDC_HEADERS 1
6197 EOF
6198
6199 fi
6200
6201  for ac_hdr in zlib.h jpeglib.h t11lib.h sys/stat.h sys/types.h dirent.h sys/bsdtypes.h sys/ndir.h sys/dir.h ndir.h
6202 do
6203 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6204 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6205 echo "configure:6206: checking for $ac_hdr" >&5
6206 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6207   echo $ac_n "(cached) $ac_c" 1>&6
6208 else
6209   cat > conftest.$ac_ext <<EOF
6210 #line 6211 "configure"
6211 #include "confdefs.h"
6212 #include <$ac_hdr>
6213 EOF
6214 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6215 { (eval echo configure:6216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6216 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6217 if test -z "$ac_err"; then
6218   rm -rf conftest*
6219   eval "ac_cv_header_$ac_safe=yes"
6220 else
6221   echo "$ac_err" >&5
6222   echo "configure: failed program was:" >&5
6223   cat conftest.$ac_ext >&5
6224   rm -rf conftest*
6225   eval "ac_cv_header_$ac_safe=no"
6226 fi
6227 rm -f conftest*
6228 fi
6229 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6230   echo "$ac_t""yes" 1>&6
6231     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6232   cat >> confdefs.h <<EOF
6233 #define $ac_tr_hdr 1
6234 EOF
6235  
6236 else
6237   echo "$ac_t""no" 1>&6
6238 fi
6239 done
6240
6241
6242 if test "x${ac_cv_header_jpeglib_h}" != "xyes"; then
6243  DISABLEPDF2SWF=true;
6244  DISABLEJPEG2SWF=true;
6245  MISSINGLIBS="${MISSINGLIBS} jpeglib.h"
6246 fi
6247 if test "x${ac_cv_header_t1lib_h}" != "xyes"; then
6248  DISABLEPDF2SWF=true;
6249  MISSINGLIBS="${MISSINGLIBS} t1lib.h"
6250 fi
6251 if test "x${ac_cv_header_zlib_h}" != "xyes"; then
6252  DISABLEPNG2SWF=true;
6253  MISSINGLIBS="${MISSINGLIBS} zlib.h"
6254  ZLIBMISSING=true;
6255 fi
6256
6257 cat >> confdefs.h <<EOF
6258 #define PACKAGE "$PACKAGE"
6259 EOF
6260
6261 cat >> confdefs.h <<EOF
6262 #define VERSION "$VERSION"
6263 EOF
6264
6265
6266
6267
6268
6269
6270
6271  echo $ac_n "checking for working const""... $ac_c" 1>&6
6272 echo "configure:6273: checking for working const" >&5
6273 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6274   echo $ac_n "(cached) $ac_c" 1>&6
6275 else
6276   cat > conftest.$ac_ext <<EOF
6277 #line 6278 "configure"
6278 #include "confdefs.h"
6279
6280 int main() {
6281
6282 /* Ultrix mips cc rejects this.  */
6283 typedef int charset[2]; const charset x;
6284 /* SunOS 4.1.1 cc rejects this.  */
6285 char const *const *ccp;
6286 char **p;
6287 /* NEC SVR4.0.2 mips cc rejects this.  */
6288 struct point {int x, y;};
6289 static struct point const zero = {0,0};
6290 /* AIX XL C 1.02.0.0 rejects this.
6291    It does not let you subtract one const X* pointer from another in an arm
6292    of an if-expression whose if-part is not a constant expression */
6293 const char *g = "string";
6294 ccp = &g + (g ? g-g : 0);
6295 /* HPUX 7.0 cc rejects these. */
6296 ++ccp;
6297 p = (char**) ccp;
6298 ccp = (char const *const *) p;
6299 { /* SCO 3.2v4 cc rejects this.  */
6300   char *t;
6301   char const *s = 0 ? (char *) 0 : (char const *) 0;
6302
6303   *t++ = 0;
6304 }
6305 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
6306   int x[] = {25, 17};
6307   const int *foo = &x[0];
6308   ++foo;
6309 }
6310 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6311   typedef const int *iptr;
6312   iptr p = 0;
6313   ++p;
6314 }
6315 { /* AIX XL C 1.02.0.0 rejects this saying
6316      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6317   struct s { int j; const int *ap[3]; };
6318   struct s *b; b->j = 5;
6319 }
6320 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6321   const int foo = 10;
6322 }
6323
6324 ; return 0; }
6325 EOF
6326 if { (eval echo configure:6327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6327   rm -rf conftest*
6328   ac_cv_c_const=yes
6329 else
6330   echo "configure: failed program was:" >&5
6331   cat conftest.$ac_ext >&5
6332   rm -rf conftest*
6333   ac_cv_c_const=no
6334 fi
6335 rm -f conftest*
6336 fi
6337
6338 echo "$ac_t""$ac_cv_c_const" 1>&6
6339 if test $ac_cv_c_const = no; then
6340   cat >> confdefs.h <<\EOF
6341 #define const 
6342 EOF
6343
6344 fi
6345
6346  echo $ac_n "checking for inline""... $ac_c" 1>&6
6347 echo "configure:6348: checking for inline" >&5
6348 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
6349   echo $ac_n "(cached) $ac_c" 1>&6
6350 else
6351   ac_cv_c_inline=no
6352 for ac_kw in inline __inline__ __inline; do
6353   cat > conftest.$ac_ext <<EOF
6354 #line 6355 "configure"
6355 #include "confdefs.h"
6356
6357 int main() {
6358 } $ac_kw foo() {
6359 ; return 0; }
6360 EOF
6361 if { (eval echo configure:6362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6362   rm -rf conftest*
6363   ac_cv_c_inline=$ac_kw; break
6364 else
6365   echo "configure: failed program was:" >&5
6366   cat conftest.$ac_ext >&5
6367 fi
6368 rm -f conftest*
6369 done
6370
6371 fi
6372
6373 echo "$ac_t""$ac_cv_c_inline" 1>&6
6374 case "$ac_cv_c_inline" in
6375   inline | yes) ;;
6376   no) cat >> confdefs.h <<\EOF
6377 #define inline 
6378 EOF
6379  ;;
6380   *)  cat >> confdefs.h <<EOF
6381 #define inline $ac_cv_c_inline
6382 EOF
6383  ;;
6384 esac
6385
6386  echo $ac_n "checking for off_t""... $ac_c" 1>&6
6387 echo "configure:6388: checking for off_t" >&5
6388 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
6389   echo $ac_n "(cached) $ac_c" 1>&6
6390 else
6391   cat > conftest.$ac_ext <<EOF
6392 #line 6393 "configure"
6393 #include "confdefs.h"
6394 #include <sys/types.h>
6395 #if STDC_HEADERS
6396 #include <stdlib.h>
6397 #include <stddef.h>
6398 #endif
6399 EOF
6400 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6401   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6402   rm -rf conftest*
6403   ac_cv_type_off_t=yes
6404 else
6405   rm -rf conftest*
6406   ac_cv_type_off_t=no
6407 fi
6408 rm -f conftest*
6409
6410 fi
6411 echo "$ac_t""$ac_cv_type_off_t" 1>&6
6412 if test $ac_cv_type_off_t = no; then
6413   cat >> confdefs.h <<\EOF
6414 #define off_t long
6415 EOF
6416
6417 fi
6418
6419  echo $ac_n "checking for size_t""... $ac_c" 1>&6
6420 echo "configure:6421: checking for size_t" >&5
6421 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
6422   echo $ac_n "(cached) $ac_c" 1>&6
6423 else
6424   cat > conftest.$ac_ext <<EOF
6425 #line 6426 "configure"
6426 #include "confdefs.h"
6427 #include <sys/types.h>
6428 #if STDC_HEADERS
6429 #include <stdlib.h>
6430 #include <stddef.h>
6431 #endif
6432 EOF
6433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6434   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6435   rm -rf conftest*
6436   ac_cv_type_size_t=yes
6437 else
6438   rm -rf conftest*
6439   ac_cv_type_size_t=no
6440 fi
6441 rm -f conftest*
6442
6443 fi
6444 echo "$ac_t""$ac_cv_type_size_t" 1>&6
6445 if test $ac_cv_type_size_t = no; then
6446   cat >> confdefs.h <<\EOF
6447 #define size_t unsigned
6448 EOF
6449
6450 fi
6451
6452  echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
6453 echo "configure:6454: checking whether struct tm is in sys/time.h or time.h" >&5
6454 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
6455   echo $ac_n "(cached) $ac_c" 1>&6
6456 else
6457   cat > conftest.$ac_ext <<EOF
6458 #line 6459 "configure"
6459 #include "confdefs.h"
6460 #include <sys/types.h>
6461 #include <time.h>
6462 int main() {
6463 struct tm *tp; tp->tm_sec;
6464 ; return 0; }
6465 EOF
6466 if { (eval echo configure:6467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6467   rm -rf conftest*
6468   ac_cv_struct_tm=time.h
6469 else
6470   echo "configure: failed program was:" >&5
6471   cat conftest.$ac_ext >&5
6472   rm -rf conftest*
6473   ac_cv_struct_tm=sys/time.h
6474 fi
6475 rm -f conftest*
6476 fi
6477
6478 echo "$ac_t""$ac_cv_struct_tm" 1>&6
6479 if test $ac_cv_struct_tm = sys/time.h; then
6480   cat >> confdefs.h <<\EOF
6481 #define TM_IN_SYS_TIME 1
6482 EOF
6483
6484 fi
6485
6486  echo $ac_n "checking for boolean""... $ac_c" 1>&6
6487 echo "configure:6488: checking for boolean" >&5
6488 if eval "test \"`echo '$''{'ac_cv_type_boolean'+set}'`\" = set"; then
6489   echo $ac_n "(cached) $ac_c" 1>&6
6490 else
6491   cat > conftest.$ac_ext <<EOF
6492 #line 6493 "configure"
6493 #include "confdefs.h"
6494 #include <sys/types.h>
6495 #if STDC_HEADERS
6496 #include <stdlib.h>
6497 #include <stddef.h>
6498 #endif
6499 EOF
6500 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6501   egrep "(^|[^a-zA-Z_0-9])boolean[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6502   rm -rf conftest*
6503   ac_cv_type_boolean=yes
6504 else
6505   rm -rf conftest*
6506   ac_cv_type_boolean=no
6507 fi
6508 rm -f conftest*
6509
6510 fi
6511 echo "$ac_t""$ac_cv_type_boolean" 1>&6
6512 if test $ac_cv_type_boolean = no; then
6513   cat >> confdefs.h <<\EOF
6514 #define boolean int
6515 EOF
6516
6517 fi
6518
6519  echo $ac_n "checking for bool""... $ac_c" 1>&6
6520 echo "configure:6521: checking for bool" >&5
6521 if eval "test \"`echo '$''{'ac_cv_type_bool'+set}'`\" = set"; then
6522   echo $ac_n "(cached) $ac_c" 1>&6
6523 else
6524   cat > conftest.$ac_ext <<EOF
6525 #line 6526 "configure"
6526 #include "confdefs.h"
6527 #include <sys/types.h>
6528 #if STDC_HEADERS
6529 #include <stdlib.h>
6530 #include <stddef.h>
6531 #endif
6532 EOF
6533 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6534   egrep "(^|[^a-zA-Z_0-9])bool[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6535   rm -rf conftest*
6536   ac_cv_type_bool=yes
6537 else
6538   rm -rf conftest*
6539   ac_cv_type_bool=no
6540 fi
6541 rm -f conftest*
6542
6543 fi
6544 echo "$ac_t""$ac_cv_type_bool" 1>&6
6545 if test $ac_cv_type_bool = no; then
6546   cat >> confdefs.h <<\EOF
6547 #define bool char
6548 EOF
6549
6550 fi
6551
6552      
6553  for ac_func in popen mkstemp stat lrand48 rand srand48 srand
6554 do
6555 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6556 echo "configure:6557: checking for $ac_func" >&5
6557 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6558   echo $ac_n "(cached) $ac_c" 1>&6
6559 else
6560   cat > conftest.$ac_ext <<EOF
6561 #line 6562 "configure"
6562 #include "confdefs.h"
6563 /* System header to define __stub macros and hopefully few prototypes,
6564     which can conflict with char $ac_func(); below.  */
6565 #include <assert.h>
6566 /* Override any gcc2 internal prototype to avoid an error.  */
6567 /* We use char because int might match the return type of a gcc2
6568     builtin and then its argument prototype would still apply.  */
6569 char $ac_func();
6570
6571 int main() {
6572
6573 /* The GNU C library defines this for functions which it implements
6574     to always fail with ENOSYS.  Some functions are actually named
6575     something starting with __ and the normal name is an alias.  */
6576 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6577 choke me
6578 #else
6579 $ac_func();
6580 #endif
6581
6582 ; return 0; }
6583 EOF
6584 if { (eval echo configure:6585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6585   rm -rf conftest*
6586   eval "ac_cv_func_$ac_func=yes"
6587 else
6588   echo "configure: failed program was:" >&5
6589   cat conftest.$ac_ext >&5
6590   rm -rf conftest*
6591   eval "ac_cv_func_$ac_func=no"
6592 fi
6593 rm -f conftest*
6594 fi
6595
6596 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6597   echo "$ac_t""yes" 1>&6
6598     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6599   cat >> confdefs.h <<EOF
6600 #define $ac_tr_func 1
6601 EOF
6602  
6603 else
6604   echo "$ac_t""no" 1>&6
6605 fi
6606 done
6607
6608  
6609 echo $ac_n "checking whether we can compile the avifile test program""... $ac_c" 1>&6
6610 echo "configure:6611: checking whether we can compile the avifile test program" >&5
6611
6612 cat > conftest.cpp << EOF
6613 #include <avifile/version.h>
6614 #if (AVIFILE_MAJOR_VERSION == 0) && (AVIFILE_MINOR_VERSION>=6) 
6615    #include <avifile.h>
6616    #include <aviplay.h>
6617    #include <fourcc.h>
6618    #include <creators.h>
6619    #include <StreamInfo.h>
6620    #define VERSION6
6621 #else
6622    #include <avifile.h>
6623    #include <aviplay.h>
6624    #include <aviutil.h>
6625    #define Width width
6626    #define Height height
6627    #define Data data
6628    #define Bpp bpp
6629 #endif
6630
6631 int main (int argc, char*argv)
6632 {
6633   IAviReadFile* player;
6634   IAviReadStream* astream;
6635   IAviReadStream* vstream;
6636   player = CreateIAviReadFile(0);
6637   astream = player->GetStream(0, AviStream::Audio);
6638   vstream = player->GetStream(0, AviStream::Video);
6639   vstream -> StartStreaming();
6640   astream -> StartStreaming();
6641 #ifndef VERSION6
6642   MainAVIHeader head;
6643   player->GetFileHeader(&head);
6644   head.dwMicroSecPerFrame;
6645   head.dwTotalFrames;
6646   head.dwStreams;
6647   head.dwWidth;
6648   head.dwHeight;
6649   head.dwMicroSecPerFrame;
6650   astream->GetEndPos(),
6651   astream->GetEndTime());
6652   player->StreamCount();
6653 #else
6654   StreamInfo*audioinfo;
6655   StreamInfo*videoinfo;
6656   audioinfo = astream->GetStreamInfo();
6657   videoinfo = vstream->GetStreamInfo();
6658   videoinfo->GetVideoWidth();
6659   videoinfo->GetVideoHeight();
6660   audioinfo->GetAudioSamplesPerSec();
6661   videoinfo->GetFps();
6662 #endif
6663   CImage*img = vstream->GetFrame();
6664   img->ToRGB();
6665   img->Data();
6666   img->Bpp();
6667   img->Width();
6668   img->Height();
6669   WAVEFORMATEX wave;
6670   astream->GetAudioFormatInfo(&wave,0);
6671   uint_t a,b;
6672   astream->ReadFrames(0,0,0,a,b);
6673 }
6674 EOF
6675
6676 ac_link='$CXX $CPPFLAGS $CXXFLAGS `avifile-config --cflags` `avifile-config --libs` conftest.cpp -o conftest${ac_exeext}'
6677 if { (eval echo avi2swf.m4:71: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6678   echo "$ac_t""yes" 1>&6
6679   AVIFILE=true
6680   export AVIFILE
6681   cat >> confdefs.h <<EOF
6682 #define AVIFILE true
6683 EOF
6684
6685 else
6686   echo "configure: failed program was:" >&5
6687   cat conftest.$ac_ext >&5
6688   echo "$ac_t""no" 1>&6
6689 fi
6690 rm -f conftest*
6691
6692
6693 avi2swf="avi2swf/Makefile"
6694 if test "x${AVIFILE}" != "xtrue"; then
6695  echo "* Couldn't compile the avifile test program."
6696  echo "* Disabling avi2swf tool..."
6697  echo all install uninstall clean: > avi2swf/Makefile
6698  avi2swf=
6699 fi
6700
6701 if test "x${UNCOMPRESS}" = "xgzip"; then
6702     cat >> confdefs.h <<EOF
6703 #define USE_GZIP 1
6704 EOF
6705
6706 fi
6707
6708
6709 JPEG2SWF='jpeg2swf' #$(EXEEXT)
6710 export JPEG2SWF
6711 PNG2SWF='png2swf' #$(EXEEXT)
6712 export PNG2SWF
6713 if test "x${DISABLEPDF2SWF}" = "xtrue"; then
6714   echo "***************************************************"
6715   echo "The following headers/libraries are missing: " ${MISSINGLIBS}
6716   if test "x${DISABLEPDF2SWF}" = "xtrue"; then
6717     echo "Disabling pdf2swf tool..."
6718     rm -f pdf2swf/Makefile
6719     echo all install uninstall clean: > pdf2swf/Makefile
6720   fi
6721   if test "x${DISABLEJPEG2SWF}" = "xtrue"; then
6722     echo "Disabling jpeg2swf tool..."
6723     JPEG2SWF=
6724     export JPEG2SWF
6725   fi
6726   if test "x${DISABLEPNG2SWF}" = "xtrue"; then
6727     echo "Disabling png2swf tool..."
6728     PNG2SWF=
6729     export PNG2SWF
6730   fi
6731   if test "x${ZLIBMISSING}" = "xtrue"; then
6732     echo
6733     echo "Warning! Without zlib, you will not be able to read"
6734     echo "or write compressed Flash MX files!"
6735   fi
6736   echo "***************************************************"
6737   FILES="./release Makefile.common ${avi2swf} Makefile lib/lame/Makefile lib/Makefile src/Makefile swfs/Makefile"
6738 else
6739   FILES="./release Makefile.common ${avi2swf} Makefile lib/lame/Makefile lib/Makefile src/Makefile pdf2swf/Makefile pdf2swf/xpdf/Makefile pdf2swf/ttf2pt1/Makefile swfs/Makefile"
6740 fi
6741
6742
6743
6744 trap '' 1 2 15
6745 cat > confcache <<\EOF
6746 # This file is a shell script that caches the results of configure
6747 # tests run on this system so they can be shared between configure
6748 # scripts and configure runs.  It is not useful on other systems.
6749 # If it contains results you don't want to keep, you may remove or edit it.
6750 #
6751 # By default, configure uses ./config.cache as the cache file,
6752 # creating it if it does not exist already.  You can give configure
6753 # the --cache-file=FILE option to use a different cache file; that is
6754 # what configure does when it calls configure scripts in
6755 # subdirectories, so they share the cache.
6756 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6757 # config.status only pays attention to the cache file if you give it the
6758 # --recheck option to rerun configure.
6759 #
6760 EOF
6761 # The following way of writing the cache mishandles newlines in values,
6762 # but we know of no workaround that is simple, portable, and efficient.
6763 # So, don't put newlines in cache variables' values.
6764 # Ultrix sh set writes to stderr and can't be redirected directly,
6765 # and sets the high bit in the cache file unless we assign to the vars.
6766 (set) 2>&1 |
6767   case `(ac_space=' '; set | grep ac_space) 2>&1` in
6768   *ac_space=\ *)
6769     # `set' does not quote correctly, so add quotes (double-quote substitution
6770     # turns \\\\ into \\, and sed turns \\ into \).
6771     sed -n \
6772       -e "s/'/'\\\\''/g" \
6773       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6774     ;;
6775   *)
6776     # `set' quotes correctly as required by POSIX, so do not add quotes.
6777     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6778     ;;
6779   esac >> confcache
6780 if cmp -s $cache_file confcache; then
6781   :
6782 else
6783   if test -w $cache_file; then
6784     echo "updating cache $cache_file"
6785     cat confcache > $cache_file
6786   else
6787     echo "not updating unwritable cache $cache_file"
6788   fi
6789 fi
6790 rm -f confcache
6791
6792 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6793
6794 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6795 # Let make expand exec_prefix.
6796 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6797
6798 # Any assignment to VPATH causes Sun make to only execute
6799 # the first set of double-colon rules, so remove it if not needed.
6800 # If there is a colon in the path, we need to keep it.
6801 if test "x$srcdir" = x.; then
6802   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
6803 fi
6804
6805 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6806
6807 DEFS=-DHAVE_CONFIG_H
6808
6809 # Without the "./", some shells look in PATH for config.status.
6810 : ${CONFIG_STATUS=./config.status}
6811
6812 echo creating $CONFIG_STATUS
6813 rm -f $CONFIG_STATUS
6814 cat > $CONFIG_STATUS <<EOF
6815 #! /bin/sh
6816 # Generated automatically by configure.
6817 # Run this file to recreate the current configuration.
6818 # This directory was configured as follows,
6819 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6820 #
6821 # $0 $ac_configure_args
6822 #
6823 # Compiler output produced by configure, useful for debugging
6824 # configure, is in ./config.log if it exists.
6825
6826 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6827 for ac_option
6828 do
6829   case "\$ac_option" in
6830   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6831     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6832     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6833   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6834     echo "$CONFIG_STATUS generated by autoconf version 2.13"
6835     exit 0 ;;
6836   -help | --help | --hel | --he | --h)
6837     echo "\$ac_cs_usage"; exit 0 ;;
6838   *) echo "\$ac_cs_usage"; exit 1 ;;
6839   esac
6840 done
6841
6842 ac_given_srcdir=$srcdir
6843 ac_given_INSTALL="$INSTALL"
6844
6845 trap 'rm -fr `echo "${FILES} config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6846 EOF
6847 cat >> $CONFIG_STATUS <<EOF
6848
6849 # Protect against being on the right side of a sed subst in config.status.
6850 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6851  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6852 $ac_vpsub
6853 $extrasub
6854 s%@SHELL@%$SHELL%g
6855 s%@CFLAGS@%$CFLAGS%g
6856 s%@CPPFLAGS@%$CPPFLAGS%g
6857 s%@CXXFLAGS@%$CXXFLAGS%g
6858 s%@FFLAGS@%$FFLAGS%g
6859 s%@DEFS@%$DEFS%g
6860 s%@LDFLAGS@%$LDFLAGS%g
6861 s%@LIBS@%$LIBS%g
6862 s%@exec_prefix@%$exec_prefix%g
6863 s%@prefix@%$prefix%g
6864 s%@program_transform_name@%$program_transform_name%g
6865 s%@bindir@%$bindir%g
6866 s%@sbindir@%$sbindir%g
6867 s%@libexecdir@%$libexecdir%g
6868 s%@datadir@%$datadir%g
6869 s%@sysconfdir@%$sysconfdir%g
6870 s%@sharedstatedir@%$sharedstatedir%g
6871 s%@localstatedir@%$localstatedir%g
6872 s%@libdir@%$libdir%g
6873 s%@includedir@%$includedir%g
6874 s%@oldincludedir@%$oldincludedir%g
6875 s%@infodir@%$infodir%g
6876 s%@mandir@%$mandir%g
6877 s%@host@%$host%g
6878 s%@host_alias@%$host_alias%g
6879 s%@host_cpu@%$host_cpu%g
6880 s%@host_vendor@%$host_vendor%g
6881 s%@host_os@%$host_os%g
6882 s%@CC@%$CC%g
6883 s%@CXX@%$CXX%g
6884 s%@CPP@%$CPP%g
6885 s%@RANLIB@%$RANLIB%g
6886 s%@SET_MAKE@%$SET_MAKE%g
6887 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6888 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6889 s%@INSTALL_DATA@%$INSTALL_DATA%g
6890 s%@LN_S@%$LN_S%g
6891 s%@build@%$build%g
6892 s%@build_alias@%$build_alias%g
6893 s%@build_cpu@%$build_cpu%g
6894 s%@build_vendor@%$build_vendor%g
6895 s%@build_os@%$build_os%g
6896 s%@OBJEXT@%$OBJEXT%g
6897 s%@EXEEXT@%$EXEEXT%g
6898 s%@ECHO@%$ECHO%g
6899 s%@STRIP@%$STRIP%g
6900 s%@LIBTOOL@%$LIBTOOL%g
6901 s%@UNCOMPRESS@%$UNCOMPRESS%g
6902 s%@AR@%$AR%g
6903 s%@target@%$target%g
6904 s%@target_alias@%$target_alias%g
6905 s%@target_cpu@%$target_cpu%g
6906 s%@target_vendor@%$target_vendor%g
6907 s%@target_os@%$target_os%g
6908 s%@WORDS_BIGENDIAN@%$WORDS_BIGENDIAN%g
6909 s%@SYSTEM_BACKTICKS@%$SYSTEM_BACKTICKS%g
6910 s%@PACKAGE@%$PACKAGE%g
6911 s%@VERSION@%$VERSION%g
6912 s%@HAVE_UNISTD_H@%$HAVE_UNISTD_H%g
6913 s%@USE_GZIP@%$USE_GZIP%g
6914 s%@JPEG2SWF@%$JPEG2SWF%g
6915 s%@PNG2SWF@%$PNG2SWF%g
6916
6917 CEOF
6918 EOF
6919
6920 cat >> $CONFIG_STATUS <<\EOF
6921
6922 # Split the substitutions into bite-sized pieces for seds with
6923 # small command number limits, like on Digital OSF/1 and HP-UX.
6924 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6925 ac_file=1 # Number of current file.
6926 ac_beg=1 # First line for current file.
6927 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6928 ac_more_lines=:
6929 ac_sed_cmds=""
6930 while $ac_more_lines; do
6931   if test $ac_beg -gt 1; then
6932     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6933   else
6934     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6935   fi
6936   if test ! -s conftest.s$ac_file; then
6937     ac_more_lines=false
6938     rm -f conftest.s$ac_file
6939   else
6940     if test -z "$ac_sed_cmds"; then
6941       ac_sed_cmds="sed -f conftest.s$ac_file"
6942     else
6943       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6944     fi
6945     ac_file=`expr $ac_file + 1`
6946     ac_beg=$ac_end
6947     ac_end=`expr $ac_end + $ac_max_sed_cmds`
6948   fi
6949 done
6950 if test -z "$ac_sed_cmds"; then
6951   ac_sed_cmds=cat
6952 fi
6953 EOF
6954
6955 cat >> $CONFIG_STATUS <<EOF
6956
6957 CONFIG_FILES=\${CONFIG_FILES-"${FILES}"}
6958 EOF
6959 cat >> $CONFIG_STATUS <<\EOF
6960 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6961   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6962   case "$ac_file" in
6963   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6964        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6965   *) ac_file_in="${ac_file}.in" ;;
6966   esac
6967
6968   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6969
6970   # Remove last slash and all that follows it.  Not all systems have dirname.
6971   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6972   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6973     # The file is in a subdirectory.
6974     test ! -d "$ac_dir" && mkdir "$ac_dir"
6975     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6976     # A "../" for each directory in $ac_dir_suffix.
6977     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6978   else
6979     ac_dir_suffix= ac_dots=
6980   fi
6981
6982   case "$ac_given_srcdir" in
6983   .)  srcdir=.
6984       if test -z "$ac_dots"; then top_srcdir=.
6985       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6986   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6987   *) # Relative path.
6988     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6989     top_srcdir="$ac_dots$ac_given_srcdir" ;;
6990   esac
6991
6992   case "$ac_given_INSTALL" in
6993   [/$]*) INSTALL="$ac_given_INSTALL" ;;
6994   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6995   esac
6996
6997   echo creating "$ac_file"
6998   rm -f "$ac_file"
6999   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7000   case "$ac_file" in
7001   *Makefile*) ac_comsub="1i\\
7002 # $configure_input" ;;
7003   *) ac_comsub= ;;
7004   esac
7005
7006   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7007   sed -e "$ac_comsub
7008 s%@configure_input@%$configure_input%g
7009 s%@srcdir@%$srcdir%g
7010 s%@top_srcdir@%$top_srcdir%g
7011 s%@INSTALL@%$INSTALL%g
7012 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7013 fi; done
7014 rm -f conftest.s*
7015
7016 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7017 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7018 #
7019 # ac_d sets the value in "#define NAME VALUE" lines.
7020 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
7021 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
7022 ac_dC='\3'
7023 ac_dD='%g'
7024 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7025 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7026 ac_uB='\([      ]\)%\1#\2define\3'
7027 ac_uC=' '
7028 ac_uD='\4%g'
7029 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7030 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7031 ac_eB='$%\1#\2define\3'
7032 ac_eC=' '
7033 ac_eD='%g'
7034
7035 if test "${CONFIG_HEADERS+set}" != set; then
7036 EOF
7037 cat >> $CONFIG_STATUS <<EOF
7038   CONFIG_HEADERS="config.h"
7039 EOF
7040 cat >> $CONFIG_STATUS <<\EOF
7041 fi
7042 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7043   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7044   case "$ac_file" in
7045   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7046        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7047   *) ac_file_in="${ac_file}.in" ;;
7048   esac
7049
7050   echo creating $ac_file
7051
7052   rm -f conftest.frag conftest.in conftest.out
7053   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7054   cat $ac_file_inputs > conftest.in
7055
7056 EOF
7057
7058 # Transform confdefs.h into a sed script conftest.vals that substitutes
7059 # the proper values into config.h.in to produce config.h.  And first:
7060 # Protect against being on the right side of a sed subst in config.status.
7061 # Protect against being in an unquoted here document in config.status.
7062 rm -f conftest.vals
7063 cat > conftest.hdr <<\EOF
7064 s/[\\&%]/\\&/g
7065 s%[\\$`]%\\&%g
7066 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7067 s%ac_d%ac_u%gp
7068 s%ac_u%ac_e%gp
7069 EOF
7070 sed -n -f conftest.hdr confdefs.h > conftest.vals
7071 rm -f conftest.hdr
7072
7073 # This sed command replaces #undef with comments.  This is necessary, for
7074 # example, in the case of _POSIX_SOURCE, which is predefined and required
7075 # on some systems where configure will not decide to define it.
7076 cat >> conftest.vals <<\EOF
7077 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7078 EOF
7079
7080 # Break up conftest.vals because some shells have a limit on
7081 # the size of here documents, and old seds have small limits too.
7082
7083 rm -f conftest.tail
7084 while :
7085 do
7086   ac_lines=`grep -c . conftest.vals`
7087   # grep -c gives empty output for an empty file on some AIX systems.
7088   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7089   # Write a limited-size here document to conftest.frag.
7090   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7091   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7092   echo 'CEOF
7093   sed -f conftest.frag conftest.in > conftest.out
7094   rm -f conftest.in
7095   mv conftest.out conftest.in
7096 ' >> $CONFIG_STATUS
7097   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7098   rm -f conftest.vals
7099   mv conftest.tail conftest.vals
7100 done
7101 rm -f conftest.vals
7102
7103 cat >> $CONFIG_STATUS <<\EOF
7104   rm -f conftest.frag conftest.h
7105   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
7106   cat conftest.in >> conftest.h
7107   rm -f conftest.in
7108   if cmp -s $ac_file conftest.h 2>/dev/null; then
7109     echo "$ac_file is unchanged"
7110     rm -f conftest.h
7111   else
7112     # Remove last slash and all that follows it.  Not all systems have dirname.
7113       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7114       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7115       # The file is in a subdirectory.
7116       test ! -d "$ac_dir" && mkdir "$ac_dir"
7117     fi
7118     rm -f $ac_file
7119     mv conftest.h $ac_file
7120   fi
7121 fi; done
7122
7123 EOF
7124 cat >> $CONFIG_STATUS <<EOF
7125
7126 EOF
7127 cat >> $CONFIG_STATUS <<\EOF
7128
7129 exit 0
7130 EOF
7131 chmod +x $CONFIG_STATUS
7132 rm -fr confdefs* $ac_clean_files
7133 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7134
7135
7136 if test "x${srcdir}" != "x."; then
7137     echo "Warning: --srcdir is not supported"
7138 fi