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