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