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