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