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