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