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