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
15 # Initialize some variables set by options.
16 # The variables have the same names as the options, with
17 # dashes changed to underlines.
18 build=NONE
19 cache_file=./config.cache
20 exec_prefix=NONE
21 host=NONE
22 no_create=
23 nonopt=NONE
24 no_recursion=
25 prefix=NONE
26 program_prefix=NONE
27 program_suffix=NONE
28 program_transform_name=s,x,x,
29 silent=
30 site=
31 srcdir=
32 target=NONE
33 verbose=
34 x_includes=NONE
35 x_libraries=NONE
36 bindir='${exec_prefix}/bin'
37 sbindir='${exec_prefix}/sbin'
38 libexecdir='${exec_prefix}/libexec'
39 datadir='${prefix}/share'
40 sysconfdir='${prefix}/etc'
41 sharedstatedir='${prefix}/com'
42 localstatedir='${prefix}/var'
43 libdir='${exec_prefix}/lib'
44 includedir='${prefix}/include'
45 oldincludedir='/usr/include'
46 infodir='${prefix}/info'
47 mandir='${prefix}/man'
48
49 # Initialize some other variables.
50 subdirs=
51 MFLAGS= MAKEFLAGS=
52 SHELL=${CONFIG_SHELL-/bin/sh}
53 # Maximum number of lines to put in a shell here document.
54 ac_max_here_lines=12
55
56 ac_prev=
57 for ac_option
58 do
59
60   # If the previous option needs an argument, assign it.
61   if test -n "$ac_prev"; then
62     eval "$ac_prev=\$ac_option"
63     ac_prev=
64     continue
65   fi
66
67   case "$ac_option" in
68   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
69   *) ac_optarg= ;;
70   esac
71
72   # Accept the important Cygnus configure options, so we can diagnose typos.
73
74   case "$ac_option" in
75
76   -bindir | --bindir | --bindi | --bind | --bin | --bi)
77     ac_prev=bindir ;;
78   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
79     bindir="$ac_optarg" ;;
80
81   -build | --build | --buil | --bui | --bu)
82     ac_prev=build ;;
83   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
84     build="$ac_optarg" ;;
85
86   -cache-file | --cache-file | --cache-fil | --cache-fi \
87   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
88     ac_prev=cache_file ;;
89   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
90   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
91     cache_file="$ac_optarg" ;;
92
93   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
94     ac_prev=datadir ;;
95   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
96   | --da=*)
97     datadir="$ac_optarg" ;;
98
99   -disable-* | --disable-*)
100     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
101     # Reject names that are not valid shell variable names.
102     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
103       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
104     fi
105     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
106     eval "enable_${ac_feature}=no" ;;
107
108   -enable-* | --enable-*)
109     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
110     # Reject names that are not valid shell variable names.
111     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
112       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
113     fi
114     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
115     case "$ac_option" in
116       *=*) ;;
117       *) ac_optarg=yes ;;
118     esac
119     eval "enable_${ac_feature}='$ac_optarg'" ;;
120
121   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
122   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
123   | --exec | --exe | --ex)
124     ac_prev=exec_prefix ;;
125   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
126   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
127   | --exec=* | --exe=* | --ex=*)
128     exec_prefix="$ac_optarg" ;;
129
130   -gas | --gas | --ga | --g)
131     # Obsolete; use --with-gas.
132     with_gas=yes ;;
133
134   -help | --help | --hel | --he)
135     # Omit some internal or obsolete options to make the list less imposing.
136     # This message is too long to be a string in the A/UX 3.1 sh.
137     cat << EOF
138 Usage: configure [options] [host]
139 Options: [defaults in brackets after descriptions]
140 Configuration:
141   --cache-file=FILE       cache test results in FILE
142   --help                  print this message
143   --no-create             do not create output files
144   --quiet, --silent       do not print \`checking...' messages
145   --version               print the version of autoconf that created configure
146 Directory and file names:
147   --prefix=PREFIX         install architecture-independent files in PREFIX
148                           [$ac_default_prefix]
149   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
150                           [same as prefix]
151   --bindir=DIR            user executables in DIR [EPREFIX/bin]
152   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
153   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
154   --datadir=DIR           read-only architecture-independent data in DIR
155                           [PREFIX/share]
156   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
157   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
158                           [PREFIX/com]
159   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
160   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
161   --includedir=DIR        C header files in DIR [PREFIX/include]
162   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
163   --infodir=DIR           info documentation in DIR [PREFIX/info]
164   --mandir=DIR            man documentation in DIR [PREFIX/man]
165   --srcdir=DIR            find the sources in DIR [configure dir or ..]
166   --program-prefix=PREFIX prepend PREFIX to installed program names
167   --program-suffix=SUFFIX append SUFFIX to installed program names
168   --program-transform-name=PROGRAM
169                           run sed PROGRAM on installed program names
170 EOF
171     cat << EOF
172 Host type:
173   --build=BUILD           configure for building on BUILD [BUILD=HOST]
174   --host=HOST             configure for HOST [guessed]
175   --target=TARGET         configure for TARGET [TARGET=HOST]
176 Features and packages:
177   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
178   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
179   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
180   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
181   --x-includes=DIR        X include files are in DIR
182   --x-libraries=DIR       X library files are in DIR
183 EOF
184     if test -n "$ac_help"; then
185       echo "--enable and --with options recognized:$ac_help"
186     fi
187     exit 0 ;;
188
189   -host | --host | --hos | --ho)
190     ac_prev=host ;;
191   -host=* | --host=* | --hos=* | --ho=*)
192     host="$ac_optarg" ;;
193
194   -includedir | --includedir | --includedi | --included | --include \
195   | --includ | --inclu | --incl | --inc)
196     ac_prev=includedir ;;
197   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
198   | --includ=* | --inclu=* | --incl=* | --inc=*)
199     includedir="$ac_optarg" ;;
200
201   -infodir | --infodir | --infodi | --infod | --info | --inf)
202     ac_prev=infodir ;;
203   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
204     infodir="$ac_optarg" ;;
205
206   -libdir | --libdir | --libdi | --libd)
207     ac_prev=libdir ;;
208   -libdir=* | --libdir=* | --libdi=* | --libd=*)
209     libdir="$ac_optarg" ;;
210
211   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
212   | --libexe | --libex | --libe)
213     ac_prev=libexecdir ;;
214   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
215   | --libexe=* | --libex=* | --libe=*)
216     libexecdir="$ac_optarg" ;;
217
218   -localstatedir | --localstatedir | --localstatedi | --localstated \
219   | --localstate | --localstat | --localsta | --localst \
220   | --locals | --local | --loca | --loc | --lo)
221     ac_prev=localstatedir ;;
222   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
223   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
224   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
225     localstatedir="$ac_optarg" ;;
226
227   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
228     ac_prev=mandir ;;
229   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
230     mandir="$ac_optarg" ;;
231
232   -nfp | --nfp | --nf)
233     # Obsolete; use --without-fp.
234     with_fp=no ;;
235
236   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
237   | --no-cr | --no-c)
238     no_create=yes ;;
239
240   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
241   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
242     no_recursion=yes ;;
243
244   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
245   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
246   | --oldin | --oldi | --old | --ol | --o)
247     ac_prev=oldincludedir ;;
248   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
249   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
250   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
251     oldincludedir="$ac_optarg" ;;
252
253   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
254     ac_prev=prefix ;;
255   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
256     prefix="$ac_optarg" ;;
257
258   -program-prefix | --program-prefix | --program-prefi | --program-pref \
259   | --program-pre | --program-pr | --program-p)
260     ac_prev=program_prefix ;;
261   -program-prefix=* | --program-prefix=* | --program-prefi=* \
262   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
263     program_prefix="$ac_optarg" ;;
264
265   -program-suffix | --program-suffix | --program-suffi | --program-suff \
266   | --program-suf | --program-su | --program-s)
267     ac_prev=program_suffix ;;
268   -program-suffix=* | --program-suffix=* | --program-suffi=* \
269   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
270     program_suffix="$ac_optarg" ;;
271
272   -program-transform-name | --program-transform-name \
273   | --program-transform-nam | --program-transform-na \
274   | --program-transform-n | --program-transform- \
275   | --program-transform | --program-transfor \
276   | --program-transfo | --program-transf \
277   | --program-trans | --program-tran \
278   | --progr-tra | --program-tr | --program-t)
279     ac_prev=program_transform_name ;;
280   -program-transform-name=* | --program-transform-name=* \
281   | --program-transform-nam=* | --program-transform-na=* \
282   | --program-transform-n=* | --program-transform-=* \
283   | --program-transform=* | --program-transfor=* \
284   | --program-transfo=* | --program-transf=* \
285   | --program-trans=* | --program-tran=* \
286   | --progr-tra=* | --program-tr=* | --program-t=*)
287     program_transform_name="$ac_optarg" ;;
288
289   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
290   | -silent | --silent | --silen | --sile | --sil)
291     silent=yes ;;
292
293   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
294     ac_prev=sbindir ;;
295   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
296   | --sbi=* | --sb=*)
297     sbindir="$ac_optarg" ;;
298
299   -sharedstatedir | --sharedstatedir | --sharedstatedi \
300   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
301   | --sharedst | --shareds | --shared | --share | --shar \
302   | --sha | --sh)
303     ac_prev=sharedstatedir ;;
304   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
305   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
306   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
307   | --sha=* | --sh=*)
308     sharedstatedir="$ac_optarg" ;;
309
310   -site | --site | --sit)
311     ac_prev=site ;;
312   -site=* | --site=* | --sit=*)
313     site="$ac_optarg" ;;
314
315   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
316     ac_prev=srcdir ;;
317   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
318     srcdir="$ac_optarg" ;;
319
320   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
321   | --syscon | --sysco | --sysc | --sys | --sy)
322     ac_prev=sysconfdir ;;
323   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
324   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
325     sysconfdir="$ac_optarg" ;;
326
327   -target | --target | --targe | --targ | --tar | --ta | --t)
328     ac_prev=target ;;
329   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
330     target="$ac_optarg" ;;
331
332   -v | -verbose | --verbose | --verbos | --verbo | --verb)
333     verbose=yes ;;
334
335   -version | --version | --versio | --versi | --vers)
336     echo "configure generated by autoconf version 2.13"
337     exit 0 ;;
338
339   -with-* | --with-*)
340     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
341     # Reject names that are not valid shell variable names.
342     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
343       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
344     fi
345     ac_package=`echo $ac_package| sed 's/-/_/g'`
346     case "$ac_option" in
347       *=*) ;;
348       *) ac_optarg=yes ;;
349     esac
350     eval "with_${ac_package}='$ac_optarg'" ;;
351
352   -without-* | --without-*)
353     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
354     # Reject names that are not valid shell variable names.
355     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
356       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
357     fi
358     ac_package=`echo $ac_package| sed 's/-/_/g'`
359     eval "with_${ac_package}=no" ;;
360
361   --x)
362     # Obsolete; use --with-x.
363     with_x=yes ;;
364
365   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
366   | --x-incl | --x-inc | --x-in | --x-i)
367     ac_prev=x_includes ;;
368   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
369   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
370     x_includes="$ac_optarg" ;;
371
372   -x-libraries | --x-libraries | --x-librarie | --x-librari \
373   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
374     ac_prev=x_libraries ;;
375   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
376   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
377     x_libraries="$ac_optarg" ;;
378
379   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
380     ;;
381
382   *)
383     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
384       echo "configure: warning: $ac_option: invalid host type" 1>&2
385     fi
386     if test "x$nonopt" != xNONE; then
387       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
388     fi
389     nonopt="$ac_option"
390     ;;
391
392   esac
393 done
394
395 if test -n "$ac_prev"; then
396   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
397 fi
398
399 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
400
401 # File descriptor usage:
402 # 0 standard input
403 # 1 file creation
404 # 2 errors and warnings
405 # 3 some systems may open it to /dev/tty
406 # 4 used on the Kubota Titan
407 # 6 checking for... messages and results
408 # 5 compiler messages saved in config.log
409 if test "$silent" = yes; then
410   exec 6>/dev/null
411 else
412   exec 6>&1
413 fi
414 exec 5>./config.log
415
416 echo "\
417 This file contains any messages produced by compilers while
418 running configure, to aid debugging if configure makes a mistake.
419 " 1>&5
420
421 # Strip out --no-create and --no-recursion so they do not pile up.
422 # Also quote any args containing shell metacharacters.
423 ac_configure_args=
424 for ac_arg
425 do
426   case "$ac_arg" in
427   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
428   | --no-cr | --no-c) ;;
429   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
430   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
431   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
432   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
433   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
434   esac
435 done
436
437 # NLS nuisances.
438 # Only set these to C if already set.  These must not be set unconditionally
439 # because not all systems understand e.g. LANG=C (notably SCO).
440 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
441 # Non-C LC_CTYPE values break the ctype check.
442 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
443 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
444 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
445 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
446
447 # confdefs.h avoids OS command line length limits that DEFS can exceed.
448 rm -rf conftest* confdefs.h
449 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
450 echo > confdefs.h
451
452 # A filename unique to this package, relative to the directory that
453 # configure is in, which we can look for to find out if srcdir is correct.
454 ac_unique_file=src/
455
456 # Find the source files, if location was not specified.
457 if test -z "$srcdir"; then
458   ac_srcdir_defaulted=yes
459   # Try the directory containing this script, then its parent.
460   ac_prog=$0
461   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
462   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
463   srcdir=$ac_confdir
464   if test ! -r $srcdir/$ac_unique_file; then
465     srcdir=..
466   fi
467 else
468   ac_srcdir_defaulted=no
469 fi
470 if test ! -r $srcdir/$ac_unique_file; then
471   if test "$ac_srcdir_defaulted" = yes; then
472     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
473   else
474     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
475   fi
476 fi
477 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
478
479 # Prefer explicitly selected file to automatically selected ones.
480 if test -z "$CONFIG_SITE"; then
481   if test "x$prefix" != xNONE; then
482     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
483   else
484     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
485   fi
486 fi
487 for ac_site_file in $CONFIG_SITE; do
488   if test -r "$ac_site_file"; then
489     echo "loading site script $ac_site_file"
490     . "$ac_site_file"
491   fi
492 done
493
494 if test -r "$cache_file"; then
495   echo "loading cache $cache_file"
496   . $cache_file
497 else
498   echo "creating cache $cache_file"
499   > $cache_file
500 fi
501
502 ac_ext=c
503 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
504 ac_cpp='$CPP $CPPFLAGS'
505 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
506 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
507 cross_compiling=$ac_cv_prog_cc_cross
508
509 ac_exeext=
510 ac_objext=o
511 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
512   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
513   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
514     ac_n= ac_c='
515 ' ac_t='        '
516   else
517     ac_n=-n ac_c= ac_t=
518   fi
519 else
520   ac_n= ac_c='\c' ac_t=
521 fi
522
523
524 if test "$program_transform_name" = s,x,x,; then
525   program_transform_name=
526 else
527   # Double any \ or $.  echo might interpret backslashes.
528   cat <<\EOF_SED > conftestsed
529 s,\\,\\\\,g; s,\$,$$,g
530 EOF_SED
531   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
532   rm -f conftestsed
533 fi
534 test "$program_prefix" != NONE &&
535   program_transform_name="s,^,${program_prefix},; $program_transform_name"
536 # Use a double $ so make ignores it.
537 test "$program_suffix" != NONE &&
538   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
539
540 # sed with no file args requires a program.
541 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
542
543
544 export PACKAGE=swftools
545 export VERSION=0.2.0
546
547 export CFLAGS="-O2 -fomit-frame-pointer"
548 export CXXFLAGS="-O2 -fomit-frame-pointer"
549
550  # Extract the first word of "gcc", so it can be a program name with args.
551 set dummy gcc; ac_word=$2
552 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
553 echo "configure:554: checking for $ac_word" >&5
554 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
555   echo $ac_n "(cached) $ac_c" 1>&6
556 else
557   if test -n "$CC"; then
558   ac_cv_prog_CC="$CC" # Let the user override the test.
559 else
560   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
561   ac_dummy="$PATH"
562   for ac_dir in $ac_dummy; do
563     test -z "$ac_dir" && ac_dir=.
564     if test -f $ac_dir/$ac_word; then
565       ac_cv_prog_CC="gcc"
566       break
567     fi
568   done
569   IFS="$ac_save_ifs"
570 fi
571 fi
572 CC="$ac_cv_prog_CC"
573 if test -n "$CC"; then
574   echo "$ac_t""$CC" 1>&6
575 else
576   echo "$ac_t""no" 1>&6
577 fi
578
579 if test -z "$CC"; then
580   # Extract the first word of "cc", so it can be a program name with args.
581 set dummy cc; ac_word=$2
582 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
583 echo "configure:584: checking for $ac_word" >&5
584 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
585   echo $ac_n "(cached) $ac_c" 1>&6
586 else
587   if test -n "$CC"; then
588   ac_cv_prog_CC="$CC" # Let the user override the test.
589 else
590   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
591   ac_prog_rejected=no
592   ac_dummy="$PATH"
593   for ac_dir in $ac_dummy; do
594     test -z "$ac_dir" && ac_dir=.
595     if test -f $ac_dir/$ac_word; then
596       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
597         ac_prog_rejected=yes
598         continue
599       fi
600       ac_cv_prog_CC="cc"
601       break
602     fi
603   done
604   IFS="$ac_save_ifs"
605 if test $ac_prog_rejected = yes; then
606   # We found a bogon in the path, so make sure we never use it.
607   set dummy $ac_cv_prog_CC
608   shift
609   if test $# -gt 0; then
610     # We chose a different compiler from the bogus one.
611     # However, it has the same basename, so the bogon will be chosen
612     # first if we set CC to just the basename; use the full file name.
613     shift
614     set dummy "$ac_dir/$ac_word" "$@"
615     shift
616     ac_cv_prog_CC="$@"
617   fi
618 fi
619 fi
620 fi
621 CC="$ac_cv_prog_CC"
622 if test -n "$CC"; then
623   echo "$ac_t""$CC" 1>&6
624 else
625   echo "$ac_t""no" 1>&6
626 fi
627
628   if test -z "$CC"; then
629     case "`uname -s`" in
630     *win32* | *WIN32*)
631       # Extract the first word of "cl", so it can be a program name with args.
632 set dummy cl; ac_word=$2
633 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
634 echo "configure:635: checking for $ac_word" >&5
635 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
636   echo $ac_n "(cached) $ac_c" 1>&6
637 else
638   if test -n "$CC"; then
639   ac_cv_prog_CC="$CC" # Let the user override the test.
640 else
641   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
642   ac_dummy="$PATH"
643   for ac_dir in $ac_dummy; do
644     test -z "$ac_dir" && ac_dir=.
645     if test -f $ac_dir/$ac_word; then
646       ac_cv_prog_CC="cl"
647       break
648     fi
649   done
650   IFS="$ac_save_ifs"
651 fi
652 fi
653 CC="$ac_cv_prog_CC"
654 if test -n "$CC"; then
655   echo "$ac_t""$CC" 1>&6
656 else
657   echo "$ac_t""no" 1>&6
658 fi
659  ;;
660     esac
661   fi
662   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
663 fi
664
665 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
666 echo "configure:667: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
667
668 ac_ext=c
669 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
670 ac_cpp='$CPP $CPPFLAGS'
671 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
672 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
673 cross_compiling=$ac_cv_prog_cc_cross
674
675 cat > conftest.$ac_ext << EOF
676
677 #line 678 "configure"
678 #include "confdefs.h"
679
680 main(){return(0);}
681 EOF
682 if { (eval echo configure:683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
683   ac_cv_prog_cc_works=yes
684   # If we can't run a trivial program, we are probably using a cross compiler.
685   if (./conftest; exit) 2>/dev/null; then
686     ac_cv_prog_cc_cross=no
687   else
688     ac_cv_prog_cc_cross=yes
689   fi
690 else
691   echo "configure: failed program was:" >&5
692   cat conftest.$ac_ext >&5
693   ac_cv_prog_cc_works=no
694 fi
695 rm -fr conftest*
696 ac_ext=c
697 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
698 ac_cpp='$CPP $CPPFLAGS'
699 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
700 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
701 cross_compiling=$ac_cv_prog_cc_cross
702
703 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
704 if test $ac_cv_prog_cc_works = no; then
705   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
706 fi
707 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
708 echo "configure:709: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
709 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
710 cross_compiling=$ac_cv_prog_cc_cross
711
712 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
713 echo "configure:714: checking whether we are using GNU C" >&5
714 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
715   echo $ac_n "(cached) $ac_c" 1>&6
716 else
717   cat > conftest.c <<EOF
718 #ifdef __GNUC__
719   yes;
720 #endif
721 EOF
722 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
723   ac_cv_prog_gcc=yes
724 else
725   ac_cv_prog_gcc=no
726 fi
727 fi
728
729 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
730
731 if test $ac_cv_prog_gcc = yes; then
732   GCC=yes
733 else
734   GCC=
735 fi
736
737 ac_test_CFLAGS="${CFLAGS+set}"
738 ac_save_CFLAGS="$CFLAGS"
739 CFLAGS=
740 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
741 echo "configure:742: checking whether ${CC-cc} accepts -g" >&5
742 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
743   echo $ac_n "(cached) $ac_c" 1>&6
744 else
745   echo 'void f(){}' > conftest.c
746 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
747   ac_cv_prog_cc_g=yes
748 else
749   ac_cv_prog_cc_g=no
750 fi
751 rm -f conftest*
752
753 fi
754
755 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
756 if test "$ac_test_CFLAGS" = set; then
757   CFLAGS="$ac_save_CFLAGS"
758 elif test $ac_cv_prog_cc_g = yes; then
759   if test "$GCC" = yes; then
760     CFLAGS="-g -O2"
761   else
762     CFLAGS="-g"
763   fi
764 else
765   if test "$GCC" = yes; then
766     CFLAGS="-O2"
767   else
768     CFLAGS=
769   fi
770 fi
771
772  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
773 echo "configure:774: checking how to run the C preprocessor" >&5
774 # On Suns, sometimes $CPP names a directory.
775 if test -n "$CPP" && test -d "$CPP"; then
776   CPP=
777 fi
778 if test -z "$CPP"; then
779 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
780   echo $ac_n "(cached) $ac_c" 1>&6
781 else
782     # This must be in double quotes, not single quotes, because CPP may get
783   # substituted into the Makefile and "${CC-cc}" will confuse make.
784   CPP="${CC-cc} -E"
785   # On the NeXT, cc -E runs the code through the compiler's parser,
786   # not just through cpp.
787   cat > conftest.$ac_ext <<EOF
788 #line 789 "configure"
789 #include "confdefs.h"
790 #include <assert.h>
791 Syntax Error
792 EOF
793 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
794 { (eval echo configure:795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
795 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
796 if test -z "$ac_err"; then
797   :
798 else
799   echo "$ac_err" >&5
800   echo "configure: failed program was:" >&5
801   cat conftest.$ac_ext >&5
802   rm -rf conftest*
803   CPP="${CC-cc} -E -traditional-cpp"
804   cat > conftest.$ac_ext <<EOF
805 #line 806 "configure"
806 #include "confdefs.h"
807 #include <assert.h>
808 Syntax Error
809 EOF
810 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
811 { (eval echo configure:812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
812 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
813 if test -z "$ac_err"; then
814   :
815 else
816   echo "$ac_err" >&5
817   echo "configure: failed program was:" >&5
818   cat conftest.$ac_ext >&5
819   rm -rf conftest*
820   CPP="${CC-cc} -nologo -E"
821   cat > conftest.$ac_ext <<EOF
822 #line 823 "configure"
823 #include "confdefs.h"
824 #include <assert.h>
825 Syntax Error
826 EOF
827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
828 { (eval echo configure:829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
830 if test -z "$ac_err"; then
831   :
832 else
833   echo "$ac_err" >&5
834   echo "configure: failed program was:" >&5
835   cat conftest.$ac_ext >&5
836   rm -rf conftest*
837   CPP=/lib/cpp
838 fi
839 rm -f conftest*
840 fi
841 rm -f conftest*
842 fi
843 rm -f conftest*
844   ac_cv_prog_CPP="$CPP"
845 fi
846   CPP="$ac_cv_prog_CPP"
847 else
848   ac_cv_prog_CPP="$CPP"
849 fi
850 echo "$ac_t""$CPP" 1>&6
851
852  for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
853 do
854 # Extract the first word of "$ac_prog", so it can be a program name with args.
855 set dummy $ac_prog; ac_word=$2
856 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
857 echo "configure:858: checking for $ac_word" >&5
858 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
859   echo $ac_n "(cached) $ac_c" 1>&6
860 else
861   if test -n "$CXX"; then
862   ac_cv_prog_CXX="$CXX" # Let the user override the test.
863 else
864   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
865   ac_dummy="$PATH"
866   for ac_dir in $ac_dummy; do
867     test -z "$ac_dir" && ac_dir=.
868     if test -f $ac_dir/$ac_word; then
869       ac_cv_prog_CXX="$ac_prog"
870       break
871     fi
872   done
873   IFS="$ac_save_ifs"
874 fi
875 fi
876 CXX="$ac_cv_prog_CXX"
877 if test -n "$CXX"; then
878   echo "$ac_t""$CXX" 1>&6
879 else
880   echo "$ac_t""no" 1>&6
881 fi
882
883 test -n "$CXX" && break
884 done
885 test -n "$CXX" || CXX="gcc"
886
887
888 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
889 echo "configure:890: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
890
891 ac_ext=C
892 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
893 ac_cpp='$CXXCPP $CPPFLAGS'
894 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
895 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
896 cross_compiling=$ac_cv_prog_cxx_cross
897
898 cat > conftest.$ac_ext << EOF
899
900 #line 901 "configure"
901 #include "confdefs.h"
902
903 int main(){return(0);}
904 EOF
905 if { (eval echo configure:906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
906   ac_cv_prog_cxx_works=yes
907   # If we can't run a trivial program, we are probably using a cross compiler.
908   if (./conftest; exit) 2>/dev/null; then
909     ac_cv_prog_cxx_cross=no
910   else
911     ac_cv_prog_cxx_cross=yes
912   fi
913 else
914   echo "configure: failed program was:" >&5
915   cat conftest.$ac_ext >&5
916   ac_cv_prog_cxx_works=no
917 fi
918 rm -fr conftest*
919 ac_ext=c
920 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
921 ac_cpp='$CPP $CPPFLAGS'
922 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
923 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
924 cross_compiling=$ac_cv_prog_cc_cross
925
926 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
927 if test $ac_cv_prog_cxx_works = no; then
928   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
929 fi
930 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
931 echo "configure:932: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
932 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
933 cross_compiling=$ac_cv_prog_cxx_cross
934
935 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
936 echo "configure:937: checking whether we are using GNU C++" >&5
937 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
938   echo $ac_n "(cached) $ac_c" 1>&6
939 else
940   cat > conftest.C <<EOF
941 #ifdef __GNUC__
942   yes;
943 #endif
944 EOF
945 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
946   ac_cv_prog_gxx=yes
947 else
948   ac_cv_prog_gxx=no
949 fi
950 fi
951
952 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
953
954 if test $ac_cv_prog_gxx = yes; then
955   GXX=yes
956 else
957   GXX=
958 fi
959
960 ac_test_CXXFLAGS="${CXXFLAGS+set}"
961 ac_save_CXXFLAGS="$CXXFLAGS"
962 CXXFLAGS=
963 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
964 echo "configure:965: checking whether ${CXX-g++} accepts -g" >&5
965 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
966   echo $ac_n "(cached) $ac_c" 1>&6
967 else
968   echo 'void f(){}' > conftest.cc
969 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
970   ac_cv_prog_cxx_g=yes
971 else
972   ac_cv_prog_cxx_g=no
973 fi
974 rm -f conftest*
975
976 fi
977
978 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
979 if test "$ac_test_CXXFLAGS" = set; then
980   CXXFLAGS="$ac_save_CXXFLAGS"
981 elif test $ac_cv_prog_cxx_g = yes; then
982   if test "$GXX" = yes; then
983     CXXFLAGS="-g -O2"
984   else
985     CXXFLAGS="-g"
986   fi
987 else
988   if test "$GXX" = yes; then
989     CXXFLAGS="-O2"
990   else
991     CXXFLAGS=
992   fi
993 fi
994
995  # Extract the first word of "ranlib", so it can be a program name with args.
996 set dummy ranlib; ac_word=$2
997 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
998 echo "configure:999: checking for $ac_word" >&5
999 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1000   echo $ac_n "(cached) $ac_c" 1>&6
1001 else
1002   if test -n "$RANLIB"; then
1003   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1004 else
1005   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1006   ac_dummy="$PATH"
1007   for ac_dir in $ac_dummy; do
1008     test -z "$ac_dir" && ac_dir=.
1009     if test -f $ac_dir/$ac_word; then
1010       ac_cv_prog_RANLIB="ranlib"
1011       break
1012     fi
1013   done
1014   IFS="$ac_save_ifs"
1015   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1016 fi
1017 fi
1018 RANLIB="$ac_cv_prog_RANLIB"
1019 if test -n "$RANLIB"; then
1020   echo "$ac_t""$RANLIB" 1>&6
1021 else
1022   echo "$ac_t""no" 1>&6
1023 fi
1024
1025  echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1026 echo "configure:1027: checking whether ${MAKE-make} sets \${MAKE}" >&5
1027 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1028 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1029   echo $ac_n "(cached) $ac_c" 1>&6
1030 else
1031   cat > conftestmake <<\EOF
1032 all:
1033         @echo 'ac_maketemp="${MAKE}"'
1034 EOF
1035 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1036 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1037 if test -n "$ac_maketemp"; then
1038   eval ac_cv_prog_make_${ac_make}_set=yes
1039 else
1040   eval ac_cv_prog_make_${ac_make}_set=no
1041 fi
1042 rm -f conftestmake
1043 fi
1044 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1045   echo "$ac_t""yes" 1>&6
1046   SET_MAKE=
1047 else
1048   echo "$ac_t""no" 1>&6
1049   SET_MAKE="MAKE=${MAKE-make}"
1050 fi
1051
1052  ac_aux_dir=
1053 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1054   if test -f $ac_dir/install-sh; then
1055     ac_aux_dir=$ac_dir
1056     ac_install_sh="$ac_aux_dir/install-sh -c"
1057     break
1058   elif test -f $ac_dir/install.sh; then
1059     ac_aux_dir=$ac_dir
1060     ac_install_sh="$ac_aux_dir/install.sh -c"
1061     break
1062   fi
1063 done
1064 if test -z "$ac_aux_dir"; then
1065   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1066 fi
1067 ac_config_guess=$ac_aux_dir/config.guess
1068 ac_config_sub=$ac_aux_dir/config.sub
1069 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1070
1071 # Find a good install program.  We prefer a C program (faster),
1072 # so one script is as good as another.  But avoid the broken or
1073 # incompatible versions:
1074 # SysV /etc/install, /usr/sbin/install
1075 # SunOS /usr/etc/install
1076 # IRIX /sbin/install
1077 # AIX /bin/install
1078 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1079 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1080 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1081 # ./install, which can be erroneously created by make from ./install.sh.
1082 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1083 echo "configure:1084: checking for a BSD compatible install" >&5
1084 if test -z "$INSTALL"; then
1085 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1086   echo $ac_n "(cached) $ac_c" 1>&6
1087 else
1088     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1089   for ac_dir in $PATH; do
1090     # Account for people who put trailing slashes in PATH elements.
1091     case "$ac_dir/" in
1092     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1093     *)
1094       # OSF1 and SCO ODT 3.0 have their own names for install.
1095       # Don't use installbsd from OSF since it installs stuff as root
1096       # by default.
1097       for ac_prog in ginstall scoinst install; do
1098         if test -f $ac_dir/$ac_prog; then
1099           if test $ac_prog = install &&
1100             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1101             # AIX install.  It has an incompatible calling convention.
1102             :
1103           else
1104             ac_cv_path_install="$ac_dir/$ac_prog -c"
1105             break 2
1106           fi
1107         fi
1108       done
1109       ;;
1110     esac
1111   done
1112   IFS="$ac_save_IFS"
1113
1114 fi
1115   if test "${ac_cv_path_install+set}" = set; then
1116     INSTALL="$ac_cv_path_install"
1117   else
1118     # As a last resort, use the slow shell script.  We don't cache a
1119     # path for INSTALL within a source directory, because that will
1120     # break other packages using the cache if that directory is
1121     # removed, or if the path is relative.
1122     INSTALL="$ac_install_sh"
1123   fi
1124 fi
1125 echo "$ac_t""$INSTALL" 1>&6
1126
1127 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1128 # It thinks the first close brace ends the variable substitution.
1129 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1130
1131 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1132
1133 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1134
1135  echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1136 echo "configure:1137: checking whether ln -s works" >&5
1137 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1138   echo $ac_n "(cached) $ac_c" 1>&6
1139 else
1140   rm -f conftestdata
1141 if ln -s X conftestdata 2>/dev/null
1142 then
1143   rm -f conftestdata
1144   ac_cv_prog_LN_S="ln -s"
1145 else
1146   ac_cv_prog_LN_S=ln
1147 fi
1148 fi
1149 LN_S="$ac_cv_prog_LN_S"
1150 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1151   echo "$ac_t""yes" 1>&6
1152 else
1153   echo "$ac_t""no" 1>&6
1154 fi
1155
1156  #AC_PROG_GZIP
1157  for ac_prog in gzip uncompress compress
1158 do
1159 # Extract the first word of "$ac_prog", so it can be a program name with args.
1160 set dummy $ac_prog; ac_word=$2
1161 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1162 echo "configure:1163: checking for $ac_word" >&5
1163 if eval "test \"`echo '$''{'ac_cv_prog_UNCOMPRESS'+set}'`\" = set"; then
1164   echo $ac_n "(cached) $ac_c" 1>&6
1165 else
1166   if test -n "$UNCOMPRESS"; then
1167   ac_cv_prog_UNCOMPRESS="$UNCOMPRESS" # Let the user override the test.
1168 else
1169   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1170   ac_dummy="$PATH"
1171   for ac_dir in $ac_dummy; do
1172     test -z "$ac_dir" && ac_dir=.
1173     if test -f $ac_dir/$ac_word; then
1174       ac_cv_prog_UNCOMPRESS="$ac_prog"
1175       break
1176     fi
1177   done
1178   IFS="$ac_save_ifs"
1179 fi
1180 fi
1181 UNCOMPRESS="$ac_cv_prog_UNCOMPRESS"
1182 if test -n "$UNCOMPRESS"; then
1183   echo "$ac_t""$UNCOMPRESS" 1>&6
1184 else
1185   echo "$ac_t""no" 1>&6
1186 fi
1187
1188 test -n "$UNCOMPRESS" && break
1189 done
1190
1191
1192  echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1193 echo "configure:1194: checking for Cygwin environment" >&5
1194 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1195   echo $ac_n "(cached) $ac_c" 1>&6
1196 else
1197   cat > conftest.$ac_ext <<EOF
1198 #line 1199 "configure"
1199 #include "confdefs.h"
1200
1201 int main() {
1202
1203 #ifndef __CYGWIN__
1204 #define __CYGWIN__ __CYGWIN32__
1205 #endif
1206 return __CYGWIN__;
1207 ; return 0; }
1208 EOF
1209 if { (eval echo configure:1210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1210   rm -rf conftest*
1211   ac_cv_cygwin=yes
1212 else
1213   echo "configure: failed program was:" >&5
1214   cat conftest.$ac_ext >&5
1215   rm -rf conftest*
1216   ac_cv_cygwin=no
1217 fi
1218 rm -f conftest*
1219 rm -f conftest*
1220 fi
1221
1222 echo "$ac_t""$ac_cv_cygwin" 1>&6
1223 CYGWIN=
1224 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1225 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1226 echo "configure:1227: checking for mingw32 environment" >&5
1227 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1228   echo $ac_n "(cached) $ac_c" 1>&6
1229 else
1230   cat > conftest.$ac_ext <<EOF
1231 #line 1232 "configure"
1232 #include "confdefs.h"
1233
1234 int main() {
1235 return __MINGW32__;
1236 ; return 0; }
1237 EOF
1238 if { (eval echo configure:1239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1239   rm -rf conftest*
1240   ac_cv_mingw32=yes
1241 else
1242   echo "configure: failed program was:" >&5
1243   cat conftest.$ac_ext >&5
1244   rm -rf conftest*
1245   ac_cv_mingw32=no
1246 fi
1247 rm -f conftest*
1248 rm -f conftest*
1249 fi
1250
1251 echo "$ac_t""$ac_cv_mingw32" 1>&6
1252 MINGW32=
1253 test "$ac_cv_mingw32" = yes && MINGW32=yes
1254
1255
1256 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1257 echo "configure:1258: checking for executable suffix" >&5
1258 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1259   echo $ac_n "(cached) $ac_c" 1>&6
1260 else
1261   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1262   ac_cv_exeext=.exe
1263 else
1264   rm -f conftest*
1265   echo 'int main () { return 0; }' > conftest.$ac_ext
1266   ac_cv_exeext=
1267   if { (eval echo configure:1268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1268     for file in conftest.*; do
1269       case $file in
1270       *.c | *.o | *.obj) ;;
1271       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1272       esac
1273     done
1274   else
1275     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1276   fi
1277   rm -f conftest*
1278   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1279 fi
1280 fi
1281
1282 EXEEXT=""
1283 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1284 echo "$ac_t""${ac_cv_exeext}" 1>&6
1285 ac_exeext=$EXEEXT
1286
1287
1288  echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
1289 echo "configure:1290: checking for sin in -lm" >&5
1290 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
1291 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1292   echo $ac_n "(cached) $ac_c" 1>&6
1293 else
1294   ac_save_LIBS="$LIBS"
1295 LIBS="-lm  $LIBS"
1296 cat > conftest.$ac_ext <<EOF
1297 #line 1298 "configure"
1298 #include "confdefs.h"
1299 /* Override any gcc2 internal prototype to avoid an error.  */
1300 /* We use char because int might match the return type of a gcc2
1301     builtin and then its argument prototype would still apply.  */
1302 char sin();
1303
1304 int main() {
1305 sin()
1306 ; return 0; }
1307 EOF
1308 if { (eval echo configure:1309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1309   rm -rf conftest*
1310   eval "ac_cv_lib_$ac_lib_var=yes"
1311 else
1312   echo "configure: failed program was:" >&5
1313   cat conftest.$ac_ext >&5
1314   rm -rf conftest*
1315   eval "ac_cv_lib_$ac_lib_var=no"
1316 fi
1317 rm -f conftest*
1318 LIBS="$ac_save_LIBS"
1319
1320 fi
1321 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1322   echo "$ac_t""yes" 1>&6
1323     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1324     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1325   cat >> confdefs.h <<EOF
1326 #define $ac_tr_lib 1
1327 EOF
1328
1329   LIBS="-lm $LIBS"
1330
1331 else
1332   echo "$ac_t""no" 1>&6
1333 echo "Error: Math library not found.";
1334  exit;
1335  
1336 fi
1337
1338  echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
1339 echo "configure:1340: checking for deflate in -lz" >&5
1340 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
1341 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1342   echo $ac_n "(cached) $ac_c" 1>&6
1343 else
1344   ac_save_LIBS="$LIBS"
1345 LIBS="-lz  $LIBS"
1346 cat > conftest.$ac_ext <<EOF
1347 #line 1348 "configure"
1348 #include "confdefs.h"
1349 /* Override any gcc2 internal prototype to avoid an error.  */
1350 /* We use char because int might match the return type of a gcc2
1351     builtin and then its argument prototype would still apply.  */
1352 char deflate();
1353
1354 int main() {
1355 deflate()
1356 ; return 0; }
1357 EOF
1358 if { (eval echo configure:1359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1359   rm -rf conftest*
1360   eval "ac_cv_lib_$ac_lib_var=yes"
1361 else
1362   echo "configure: failed program was:" >&5
1363   cat conftest.$ac_ext >&5
1364   rm -rf conftest*
1365   eval "ac_cv_lib_$ac_lib_var=no"
1366 fi
1367 rm -f conftest*
1368 LIBS="$ac_save_LIBS"
1369
1370 fi
1371 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1372   echo "$ac_t""yes" 1>&6
1373     ac_tr_lib=HAVE_LIB`echo z | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1374     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1375   cat >> confdefs.h <<EOF
1376 #define $ac_tr_lib 1
1377 EOF
1378
1379   LIBS="-lz $LIBS"
1380
1381 else
1382   echo "$ac_t""no" 1>&6
1383 echo "Error: The zlib compression library is required."
1384  DISABLEPDF2SWF=true; 
1385  MISSINGLIBS="${MISSINGLIBS} zlib"
1386  
1387 fi
1388
1389  echo $ac_n "checking for jpeg_write_raw_data in -ljpeg""... $ac_c" 1>&6
1390 echo "configure:1391: checking for jpeg_write_raw_data in -ljpeg" >&5
1391 ac_lib_var=`echo jpeg'_'jpeg_write_raw_data | sed 'y%./+-%__p_%'`
1392 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1393   echo $ac_n "(cached) $ac_c" 1>&6
1394 else
1395   ac_save_LIBS="$LIBS"
1396 LIBS="-ljpeg  $LIBS"
1397 cat > conftest.$ac_ext <<EOF
1398 #line 1399 "configure"
1399 #include "confdefs.h"
1400 /* Override any gcc2 internal prototype to avoid an error.  */
1401 /* We use char because int might match the return type of a gcc2
1402     builtin and then its argument prototype would still apply.  */
1403 char jpeg_write_raw_data();
1404
1405 int main() {
1406 jpeg_write_raw_data()
1407 ; return 0; }
1408 EOF
1409 if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1410   rm -rf conftest*
1411   eval "ac_cv_lib_$ac_lib_var=yes"
1412 else
1413   echo "configure: failed program was:" >&5
1414   cat conftest.$ac_ext >&5
1415   rm -rf conftest*
1416   eval "ac_cv_lib_$ac_lib_var=no"
1417 fi
1418 rm -f conftest*
1419 LIBS="$ac_save_LIBS"
1420
1421 fi
1422 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1423   echo "$ac_t""yes" 1>&6
1424     ac_tr_lib=HAVE_LIB`echo jpeg | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1425     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1426   cat >> confdefs.h <<EOF
1427 #define $ac_tr_lib 1
1428 EOF
1429
1430   LIBS="-ljpeg $LIBS"
1431
1432 else
1433   echo "$ac_t""no" 1>&6
1434 DISABLEPDF2SWF=true;
1435  DISABLEJPEG2SWF=true;
1436  MISSINGLIBS="${MISSINGLIBS} jpeglib"
1437  
1438 fi
1439
1440  echo $ac_n "checking for T1_LoadFont in -lt1""... $ac_c" 1>&6
1441 echo "configure:1442: checking for T1_LoadFont in -lt1" >&5
1442 ac_lib_var=`echo t1'_'T1_LoadFont | sed 'y%./+-%__p_%'`
1443 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1444   echo $ac_n "(cached) $ac_c" 1>&6
1445 else
1446   ac_save_LIBS="$LIBS"
1447 LIBS="-lt1  $LIBS"
1448 cat > conftest.$ac_ext <<EOF
1449 #line 1450 "configure"
1450 #include "confdefs.h"
1451 /* Override any gcc2 internal prototype to avoid an error.  */
1452 /* We use char because int might match the return type of a gcc2
1453     builtin and then its argument prototype would still apply.  */
1454 char T1_LoadFont();
1455
1456 int main() {
1457 T1_LoadFont()
1458 ; return 0; }
1459 EOF
1460 if { (eval echo configure:1461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1461   rm -rf conftest*
1462   eval "ac_cv_lib_$ac_lib_var=yes"
1463 else
1464   echo "configure: failed program was:" >&5
1465   cat conftest.$ac_ext >&5
1466   rm -rf conftest*
1467   eval "ac_cv_lib_$ac_lib_var=no"
1468 fi
1469 rm -f conftest*
1470 LIBS="$ac_save_LIBS"
1471
1472 fi
1473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1474   echo "$ac_t""yes" 1>&6
1475     ac_tr_lib=HAVE_LIB`echo t1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1476     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1477   cat >> confdefs.h <<EOF
1478 #define $ac_tr_lib 1
1479 EOF
1480
1481   LIBS="-lt1 $LIBS"
1482
1483 else
1484   echo "$ac_t""no" 1>&6
1485 DISABLEPDF2SWF=true;
1486  MISSINGLIBS="${MISSINGLIBS} T1lib"
1487  
1488 fi
1489
1490
1491
1492  
1493  ac_header_dirent=no
1494 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1495 do
1496 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1497 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1498 echo "configure:1499: checking for $ac_hdr that defines DIR" >&5
1499 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1500   echo $ac_n "(cached) $ac_c" 1>&6
1501 else
1502   cat > conftest.$ac_ext <<EOF
1503 #line 1504 "configure"
1504 #include "confdefs.h"
1505 #include <sys/types.h>
1506 #include <$ac_hdr>
1507 int main() {
1508 DIR *dirp = 0;
1509 ; return 0; }
1510 EOF
1511 if { (eval echo configure:1512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1512   rm -rf conftest*
1513   eval "ac_cv_header_dirent_$ac_safe=yes"
1514 else
1515   echo "configure: failed program was:" >&5
1516   cat conftest.$ac_ext >&5
1517   rm -rf conftest*
1518   eval "ac_cv_header_dirent_$ac_safe=no"
1519 fi
1520 rm -f conftest*
1521 fi
1522 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1523   echo "$ac_t""yes" 1>&6
1524     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1525   cat >> confdefs.h <<EOF
1526 #define $ac_tr_hdr 1
1527 EOF
1528  ac_header_dirent=$ac_hdr; break
1529 else
1530   echo "$ac_t""no" 1>&6
1531 fi
1532 done
1533 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1534 if test $ac_header_dirent = dirent.h; then
1535 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1536 echo "configure:1537: checking for opendir in -ldir" >&5
1537 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1538 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1539   echo $ac_n "(cached) $ac_c" 1>&6
1540 else
1541   ac_save_LIBS="$LIBS"
1542 LIBS="-ldir  $LIBS"
1543 cat > conftest.$ac_ext <<EOF
1544 #line 1545 "configure"
1545 #include "confdefs.h"
1546 /* Override any gcc2 internal prototype to avoid an error.  */
1547 /* We use char because int might match the return type of a gcc2
1548     builtin and then its argument prototype would still apply.  */
1549 char opendir();
1550
1551 int main() {
1552 opendir()
1553 ; return 0; }
1554 EOF
1555 if { (eval echo configure:1556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1556   rm -rf conftest*
1557   eval "ac_cv_lib_$ac_lib_var=yes"
1558 else
1559   echo "configure: failed program was:" >&5
1560   cat conftest.$ac_ext >&5
1561   rm -rf conftest*
1562   eval "ac_cv_lib_$ac_lib_var=no"
1563 fi
1564 rm -f conftest*
1565 LIBS="$ac_save_LIBS"
1566
1567 fi
1568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1569   echo "$ac_t""yes" 1>&6
1570   LIBS="$LIBS -ldir"
1571 else
1572   echo "$ac_t""no" 1>&6
1573 fi
1574
1575 else
1576 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1577 echo "configure:1578: checking for opendir in -lx" >&5
1578 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1579 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1580   echo $ac_n "(cached) $ac_c" 1>&6
1581 else
1582   ac_save_LIBS="$LIBS"
1583 LIBS="-lx  $LIBS"
1584 cat > conftest.$ac_ext <<EOF
1585 #line 1586 "configure"
1586 #include "confdefs.h"
1587 /* Override any gcc2 internal prototype to avoid an error.  */
1588 /* We use char because int might match the return type of a gcc2
1589     builtin and then its argument prototype would still apply.  */
1590 char opendir();
1591
1592 int main() {
1593 opendir()
1594 ; return 0; }
1595 EOF
1596 if { (eval echo configure:1597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1597   rm -rf conftest*
1598   eval "ac_cv_lib_$ac_lib_var=yes"
1599 else
1600   echo "configure: failed program was:" >&5
1601   cat conftest.$ac_ext >&5
1602   rm -rf conftest*
1603   eval "ac_cv_lib_$ac_lib_var=no"
1604 fi
1605 rm -f conftest*
1606 LIBS="$ac_save_LIBS"
1607
1608 fi
1609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1610   echo "$ac_t""yes" 1>&6
1611   LIBS="$LIBS -lx"
1612 else
1613   echo "$ac_t""no" 1>&6
1614 fi
1615
1616 fi
1617
1618  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1619 echo "configure:1620: checking for ANSI C header files" >&5
1620 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1621   echo $ac_n "(cached) $ac_c" 1>&6
1622 else
1623   cat > conftest.$ac_ext <<EOF
1624 #line 1625 "configure"
1625 #include "confdefs.h"
1626 #include <stdlib.h>
1627 #include <stdarg.h>
1628 #include <string.h>
1629 #include <float.h>
1630 EOF
1631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1632 { (eval echo configure:1633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1634 if test -z "$ac_err"; then
1635   rm -rf conftest*
1636   ac_cv_header_stdc=yes
1637 else
1638   echo "$ac_err" >&5
1639   echo "configure: failed program was:" >&5
1640   cat conftest.$ac_ext >&5
1641   rm -rf conftest*
1642   ac_cv_header_stdc=no
1643 fi
1644 rm -f conftest*
1645
1646 if test $ac_cv_header_stdc = yes; then
1647   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1648 cat > conftest.$ac_ext <<EOF
1649 #line 1650 "configure"
1650 #include "confdefs.h"
1651 #include <string.h>
1652 EOF
1653 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1654   egrep "memchr" >/dev/null 2>&1; then
1655   :
1656 else
1657   rm -rf conftest*
1658   ac_cv_header_stdc=no
1659 fi
1660 rm -f conftest*
1661
1662 fi
1663
1664 if test $ac_cv_header_stdc = yes; then
1665   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1666 cat > conftest.$ac_ext <<EOF
1667 #line 1668 "configure"
1668 #include "confdefs.h"
1669 #include <stdlib.h>
1670 EOF
1671 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1672   egrep "free" >/dev/null 2>&1; then
1673   :
1674 else
1675   rm -rf conftest*
1676   ac_cv_header_stdc=no
1677 fi
1678 rm -f conftest*
1679
1680 fi
1681
1682 if test $ac_cv_header_stdc = yes; then
1683   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1684 if test "$cross_compiling" = yes; then
1685   :
1686 else
1687   cat > conftest.$ac_ext <<EOF
1688 #line 1689 "configure"
1689 #include "confdefs.h"
1690 #include <ctype.h>
1691 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1692 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1693 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1694 int main () { int i; for (i = 0; i < 256; i++)
1695 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1696 exit (0); }
1697
1698 EOF
1699 if { (eval echo configure:1700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1700 then
1701   :
1702 else
1703   echo "configure: failed program was:" >&5
1704   cat conftest.$ac_ext >&5
1705   rm -fr conftest*
1706   ac_cv_header_stdc=no
1707 fi
1708 rm -fr conftest*
1709 fi
1710
1711 fi
1712 fi
1713
1714 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1715 if test $ac_cv_header_stdc = yes; then
1716   cat >> confdefs.h <<\EOF
1717 #define STDC_HEADERS 1
1718 EOF
1719
1720 fi
1721
1722  for ac_hdr in math.h fcntl.h limits.h malloc.h unistd.h memory.h zlib.h jpeglib.h t1lib.h sys/stat.h sys/types.h
1723 do
1724 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1725 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1726 echo "configure:1727: checking for $ac_hdr" >&5
1727 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1728   echo $ac_n "(cached) $ac_c" 1>&6
1729 else
1730   cat > conftest.$ac_ext <<EOF
1731 #line 1732 "configure"
1732 #include "confdefs.h"
1733 #include <$ac_hdr>
1734 EOF
1735 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1736 { (eval echo configure:1737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1737 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1738 if test -z "$ac_err"; then
1739   rm -rf conftest*
1740   eval "ac_cv_header_$ac_safe=yes"
1741 else
1742   echo "$ac_err" >&5
1743   echo "configure: failed program was:" >&5
1744   cat conftest.$ac_ext >&5
1745   rm -rf conftest*
1746   eval "ac_cv_header_$ac_safe=no"
1747 fi
1748 rm -f conftest*
1749 fi
1750 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1751   echo "$ac_t""yes" 1>&6
1752     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1753   cat >> confdefs.h <<EOF
1754 #define $ac_tr_hdr 1
1755 EOF
1756  
1757 else
1758   echo "$ac_t""no" 1>&6
1759 fi
1760 done
1761
1762
1763 if test "x${ac_cv_header_jpeglib_h}" != "xyes"; then
1764  DISABLEPDF2SWF=true;
1765  DISABLEJPEG2SWF=true;
1766  MISSINGLIBS="${MISSINGLIBS} jpeglib.h"
1767 fi
1768 if test "x${ac_cv_header_t1lib_h}" != "xyes"; then
1769  DISABLEPDF2SWF=true;
1770  MISSINGLIBS="${MISSINGLIBS} t1lib.h"
1771 fi
1772 if test "x${ac_cv_header_zlib_h}" != "xyes"; then
1773  DISABLEPDF2SWF=true;
1774  MISSINGLIBS="${MISSINGLIBS} zlib.h"
1775 fi
1776
1777 cat >> confdefs.h <<EOF
1778 #define PACKAGE "$PACKAGE"
1779 EOF
1780
1781 cat >> confdefs.h <<EOF
1782 #define VERSION "$VERSION"
1783 EOF
1784
1785
1786
1787
1788
1789
1790
1791  echo $ac_n "checking for working const""... $ac_c" 1>&6
1792 echo "configure:1793: checking for working const" >&5
1793 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1794   echo $ac_n "(cached) $ac_c" 1>&6
1795 else
1796   cat > conftest.$ac_ext <<EOF
1797 #line 1798 "configure"
1798 #include "confdefs.h"
1799
1800 int main() {
1801
1802 /* Ultrix mips cc rejects this.  */
1803 typedef int charset[2]; const charset x;
1804 /* SunOS 4.1.1 cc rejects this.  */
1805 char const *const *ccp;
1806 char **p;
1807 /* NEC SVR4.0.2 mips cc rejects this.  */
1808 struct point {int x, y;};
1809 static struct point const zero = {0,0};
1810 /* AIX XL C 1.02.0.0 rejects this.
1811    It does not let you subtract one const X* pointer from another in an arm
1812    of an if-expression whose if-part is not a constant expression */
1813 const char *g = "string";
1814 ccp = &g + (g ? g-g : 0);
1815 /* HPUX 7.0 cc rejects these. */
1816 ++ccp;
1817 p = (char**) ccp;
1818 ccp = (char const *const *) p;
1819 { /* SCO 3.2v4 cc rejects this.  */
1820   char *t;
1821   char const *s = 0 ? (char *) 0 : (char const *) 0;
1822
1823   *t++ = 0;
1824 }
1825 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1826   int x[] = {25, 17};
1827   const int *foo = &x[0];
1828   ++foo;
1829 }
1830 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1831   typedef const int *iptr;
1832   iptr p = 0;
1833   ++p;
1834 }
1835 { /* AIX XL C 1.02.0.0 rejects this saying
1836      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1837   struct s { int j; const int *ap[3]; };
1838   struct s *b; b->j = 5;
1839 }
1840 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1841   const int foo = 10;
1842 }
1843
1844 ; return 0; }
1845 EOF
1846 if { (eval echo configure:1847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1847   rm -rf conftest*
1848   ac_cv_c_const=yes
1849 else
1850   echo "configure: failed program was:" >&5
1851   cat conftest.$ac_ext >&5
1852   rm -rf conftest*
1853   ac_cv_c_const=no
1854 fi
1855 rm -f conftest*
1856 fi
1857
1858 echo "$ac_t""$ac_cv_c_const" 1>&6
1859 if test $ac_cv_c_const = no; then
1860   cat >> confdefs.h <<\EOF
1861 #define const 
1862 EOF
1863
1864 fi
1865
1866  echo $ac_n "checking for inline""... $ac_c" 1>&6
1867 echo "configure:1868: checking for inline" >&5
1868 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1869   echo $ac_n "(cached) $ac_c" 1>&6
1870 else
1871   ac_cv_c_inline=no
1872 for ac_kw in inline __inline__ __inline; do
1873   cat > conftest.$ac_ext <<EOF
1874 #line 1875 "configure"
1875 #include "confdefs.h"
1876
1877 int main() {
1878 } $ac_kw foo() {
1879 ; return 0; }
1880 EOF
1881 if { (eval echo configure:1882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1882   rm -rf conftest*
1883   ac_cv_c_inline=$ac_kw; break
1884 else
1885   echo "configure: failed program was:" >&5
1886   cat conftest.$ac_ext >&5
1887 fi
1888 rm -f conftest*
1889 done
1890
1891 fi
1892
1893 echo "$ac_t""$ac_cv_c_inline" 1>&6
1894 case "$ac_cv_c_inline" in
1895   inline | yes) ;;
1896   no) cat >> confdefs.h <<\EOF
1897 #define inline 
1898 EOF
1899  ;;
1900   *)  cat >> confdefs.h <<EOF
1901 #define inline $ac_cv_c_inline
1902 EOF
1903  ;;
1904 esac
1905
1906  echo $ac_n "checking for off_t""... $ac_c" 1>&6
1907 echo "configure:1908: checking for off_t" >&5
1908 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1909   echo $ac_n "(cached) $ac_c" 1>&6
1910 else
1911   cat > conftest.$ac_ext <<EOF
1912 #line 1913 "configure"
1913 #include "confdefs.h"
1914 #include <sys/types.h>
1915 #if STDC_HEADERS
1916 #include <stdlib.h>
1917 #include <stddef.h>
1918 #endif
1919 EOF
1920 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1921   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1922   rm -rf conftest*
1923   ac_cv_type_off_t=yes
1924 else
1925   rm -rf conftest*
1926   ac_cv_type_off_t=no
1927 fi
1928 rm -f conftest*
1929
1930 fi
1931 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1932 if test $ac_cv_type_off_t = no; then
1933   cat >> confdefs.h <<\EOF
1934 #define off_t long
1935 EOF
1936
1937 fi
1938
1939  echo $ac_n "checking for size_t""... $ac_c" 1>&6
1940 echo "configure:1941: checking for size_t" >&5
1941 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1942   echo $ac_n "(cached) $ac_c" 1>&6
1943 else
1944   cat > conftest.$ac_ext <<EOF
1945 #line 1946 "configure"
1946 #include "confdefs.h"
1947 #include <sys/types.h>
1948 #if STDC_HEADERS
1949 #include <stdlib.h>
1950 #include <stddef.h>
1951 #endif
1952 EOF
1953 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1954   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1955   rm -rf conftest*
1956   ac_cv_type_size_t=yes
1957 else
1958   rm -rf conftest*
1959   ac_cv_type_size_t=no
1960 fi
1961 rm -f conftest*
1962
1963 fi
1964 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1965 if test $ac_cv_type_size_t = no; then
1966   cat >> confdefs.h <<\EOF
1967 #define size_t unsigned
1968 EOF
1969
1970 fi
1971
1972  echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
1973 echo "configure:1974: checking whether struct tm is in sys/time.h or time.h" >&5
1974 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
1975   echo $ac_n "(cached) $ac_c" 1>&6
1976 else
1977   cat > conftest.$ac_ext <<EOF
1978 #line 1979 "configure"
1979 #include "confdefs.h"
1980 #include <sys/types.h>
1981 #include <time.h>
1982 int main() {
1983 struct tm *tp; tp->tm_sec;
1984 ; return 0; }
1985 EOF
1986 if { (eval echo configure:1987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1987   rm -rf conftest*
1988   ac_cv_struct_tm=time.h
1989 else
1990   echo "configure: failed program was:" >&5
1991   cat conftest.$ac_ext >&5
1992   rm -rf conftest*
1993   ac_cv_struct_tm=sys/time.h
1994 fi
1995 rm -f conftest*
1996 fi
1997
1998 echo "$ac_t""$ac_cv_struct_tm" 1>&6
1999 if test $ac_cv_struct_tm = sys/time.h; then
2000   cat >> confdefs.h <<\EOF
2001 #define TM_IN_SYS_TIME 1
2002 EOF
2003
2004 fi
2005
2006  echo $ac_n "checking for boolean""... $ac_c" 1>&6
2007 echo "configure:2008: checking for boolean" >&5
2008 if eval "test \"`echo '$''{'ac_cv_type_boolean'+set}'`\" = set"; then
2009   echo $ac_n "(cached) $ac_c" 1>&6
2010 else
2011   cat > conftest.$ac_ext <<EOF
2012 #line 2013 "configure"
2013 #include "confdefs.h"
2014 #include <sys/types.h>
2015 #if STDC_HEADERS
2016 #include <stdlib.h>
2017 #include <stddef.h>
2018 #endif
2019 EOF
2020 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2021   egrep "(^|[^a-zA-Z_0-9])boolean[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2022   rm -rf conftest*
2023   ac_cv_type_boolean=yes
2024 else
2025   rm -rf conftest*
2026   ac_cv_type_boolean=no
2027 fi
2028 rm -f conftest*
2029
2030 fi
2031 echo "$ac_t""$ac_cv_type_boolean" 1>&6
2032 if test $ac_cv_type_boolean = no; then
2033   cat >> confdefs.h <<\EOF
2034 #define boolean int
2035 EOF
2036
2037 fi
2038
2039      
2040  echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
2041 echo "configure:2042: checking for 8-bit clean memcmp" >&5
2042 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
2043   echo $ac_n "(cached) $ac_c" 1>&6
2044 else
2045   if test "$cross_compiling" = yes; then
2046   ac_cv_func_memcmp_clean=no
2047 else
2048   cat > conftest.$ac_ext <<EOF
2049 #line 2050 "configure"
2050 #include "confdefs.h"
2051
2052 main()
2053 {
2054   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
2055   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
2056 }
2057
2058 EOF
2059 if { (eval echo configure:2060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2060 then
2061   ac_cv_func_memcmp_clean=yes
2062 else
2063   echo "configure: failed program was:" >&5
2064   cat conftest.$ac_ext >&5
2065   rm -fr conftest*
2066   ac_cv_func_memcmp_clean=no
2067 fi
2068 rm -fr conftest*
2069 fi
2070
2071 fi
2072
2073 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
2074 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
2075
2076  for ac_hdr in unistd.h
2077 do
2078 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2079 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2080 echo "configure:2081: checking for $ac_hdr" >&5
2081 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2082   echo $ac_n "(cached) $ac_c" 1>&6
2083 else
2084   cat > conftest.$ac_ext <<EOF
2085 #line 2086 "configure"
2086 #include "confdefs.h"
2087 #include <$ac_hdr>
2088 EOF
2089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2090 { (eval echo configure:2091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2091 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2092 if test -z "$ac_err"; then
2093   rm -rf conftest*
2094   eval "ac_cv_header_$ac_safe=yes"
2095 else
2096   echo "$ac_err" >&5
2097   echo "configure: failed program was:" >&5
2098   cat conftest.$ac_ext >&5
2099   rm -rf conftest*
2100   eval "ac_cv_header_$ac_safe=no"
2101 fi
2102 rm -f conftest*
2103 fi
2104 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2105   echo "$ac_t""yes" 1>&6
2106     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2107   cat >> confdefs.h <<EOF
2108 #define $ac_tr_hdr 1
2109 EOF
2110  
2111 else
2112   echo "$ac_t""no" 1>&6
2113 fi
2114 done
2115
2116 for ac_func in getpagesize
2117 do
2118 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2119 echo "configure:2120: checking for $ac_func" >&5
2120 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2121   echo $ac_n "(cached) $ac_c" 1>&6
2122 else
2123   cat > conftest.$ac_ext <<EOF
2124 #line 2125 "configure"
2125 #include "confdefs.h"
2126 /* System header to define __stub macros and hopefully few prototypes,
2127     which can conflict with char $ac_func(); below.  */
2128 #include <assert.h>
2129 /* Override any gcc2 internal prototype to avoid an error.  */
2130 /* We use char because int might match the return type of a gcc2
2131     builtin and then its argument prototype would still apply.  */
2132 char $ac_func();
2133
2134 int main() {
2135
2136 /* The GNU C library defines this for functions which it implements
2137     to always fail with ENOSYS.  Some functions are actually named
2138     something starting with __ and the normal name is an alias.  */
2139 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2140 choke me
2141 #else
2142 $ac_func();
2143 #endif
2144
2145 ; return 0; }
2146 EOF
2147 if { (eval echo configure:2148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2148   rm -rf conftest*
2149   eval "ac_cv_func_$ac_func=yes"
2150 else
2151   echo "configure: failed program was:" >&5
2152   cat conftest.$ac_ext >&5
2153   rm -rf conftest*
2154   eval "ac_cv_func_$ac_func=no"
2155 fi
2156 rm -f conftest*
2157 fi
2158
2159 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2160   echo "$ac_t""yes" 1>&6
2161     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2162   cat >> confdefs.h <<EOF
2163 #define $ac_tr_func 1
2164 EOF
2165  
2166 else
2167   echo "$ac_t""no" 1>&6
2168 fi
2169 done
2170
2171 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2172 echo "configure:2173: checking for working mmap" >&5
2173 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2174   echo $ac_n "(cached) $ac_c" 1>&6
2175 else
2176   if test "$cross_compiling" = yes; then
2177   ac_cv_func_mmap_fixed_mapped=no
2178 else
2179   cat > conftest.$ac_ext <<EOF
2180 #line 2181 "configure"
2181 #include "confdefs.h"
2182
2183 /* Thanks to Mike Haertel and Jim Avera for this test.
2184    Here is a matrix of mmap possibilities:
2185         mmap private not fixed
2186         mmap private fixed at somewhere currently unmapped
2187         mmap private fixed at somewhere already mapped
2188         mmap shared not fixed
2189         mmap shared fixed at somewhere currently unmapped
2190         mmap shared fixed at somewhere already mapped
2191    For private mappings, we should verify that changes cannot be read()
2192    back from the file, nor mmap's back from the file at a different
2193    address.  (There have been systems where private was not correctly
2194    implemented like the infamous i386 svr4.0, and systems where the
2195    VM page cache was not coherent with the filesystem buffer cache
2196    like early versions of FreeBSD and possibly contemporary NetBSD.)
2197    For shared mappings, we should conversely verify that changes get
2198    propogated back to all the places they're supposed to be.
2199
2200    Grep wants private fixed already mapped.
2201    The main things grep needs to know about mmap are:
2202    * does it exist and is it safe to write into the mmap'd area
2203    * how to use it (BSD variants)  */
2204 #include <sys/types.h>
2205 #include <fcntl.h>
2206 #include <sys/mman.h>
2207
2208 /* This mess was copied from the GNU getpagesize.h.  */
2209 #ifndef HAVE_GETPAGESIZE
2210 # ifdef HAVE_UNISTD_H
2211 #  include <unistd.h>
2212 # endif
2213
2214 /* Assume that all systems that can run configure have sys/param.h.  */
2215 # ifndef HAVE_SYS_PARAM_H
2216 #  define HAVE_SYS_PARAM_H 1
2217 # endif
2218
2219 # ifdef _SC_PAGESIZE
2220 #  define getpagesize() sysconf(_SC_PAGESIZE)
2221 # else /* no _SC_PAGESIZE */
2222 #  ifdef HAVE_SYS_PARAM_H
2223 #   include <sys/param.h>
2224 #   ifdef EXEC_PAGESIZE
2225 #    define getpagesize() EXEC_PAGESIZE
2226 #   else /* no EXEC_PAGESIZE */
2227 #    ifdef NBPG
2228 #     define getpagesize() NBPG * CLSIZE
2229 #     ifndef CLSIZE
2230 #      define CLSIZE 1
2231 #     endif /* no CLSIZE */
2232 #    else /* no NBPG */
2233 #     ifdef NBPC
2234 #      define getpagesize() NBPC
2235 #     else /* no NBPC */
2236 #      ifdef PAGESIZE
2237 #       define getpagesize() PAGESIZE
2238 #      endif /* PAGESIZE */
2239 #     endif /* no NBPC */
2240 #    endif /* no NBPG */
2241 #   endif /* no EXEC_PAGESIZE */
2242 #  else /* no HAVE_SYS_PARAM_H */
2243 #   define getpagesize() 8192   /* punt totally */
2244 #  endif /* no HAVE_SYS_PARAM_H */
2245 # endif /* no _SC_PAGESIZE */
2246
2247 #endif /* no HAVE_GETPAGESIZE */
2248
2249 #ifdef __cplusplus
2250 extern "C" { void *malloc(unsigned); }
2251 #else
2252 char *malloc();
2253 #endif
2254
2255 int
2256 main()
2257 {
2258         char *data, *data2, *data3;
2259         int i, pagesize;
2260         int fd;
2261
2262         pagesize = getpagesize();
2263
2264         /*
2265          * First, make a file with some known garbage in it.
2266          */
2267         data = malloc(pagesize);
2268         if (!data)
2269                 exit(1);
2270         for (i = 0; i < pagesize; ++i)
2271                 *(data + i) = rand();
2272         umask(0);
2273         fd = creat("conftestmmap", 0600);
2274         if (fd < 0)
2275                 exit(1);
2276         if (write(fd, data, pagesize) != pagesize)
2277                 exit(1);
2278         close(fd);
2279
2280         /*
2281          * Next, try to mmap the file at a fixed address which
2282          * already has something else allocated at it.  If we can,
2283          * also make sure that we see the same garbage.
2284          */
2285         fd = open("conftestmmap", O_RDWR);
2286         if (fd < 0)
2287                 exit(1);
2288         data2 = malloc(2 * pagesize);
2289         if (!data2)
2290                 exit(1);
2291         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2292         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2293             MAP_PRIVATE | MAP_FIXED, fd, 0L))
2294                 exit(1);
2295         for (i = 0; i < pagesize; ++i)
2296                 if (*(data + i) != *(data2 + i))
2297                         exit(1);
2298
2299         /*
2300          * Finally, make sure that changes to the mapped area
2301          * do not percolate back to the file as seen by read().
2302          * (This is a bug on some variants of i386 svr4.0.)
2303          */
2304         for (i = 0; i < pagesize; ++i)
2305                 *(data2 + i) = *(data2 + i) + 1;
2306         data3 = malloc(pagesize);
2307         if (!data3)
2308                 exit(1);
2309         if (read(fd, data3, pagesize) != pagesize)
2310                 exit(1);
2311         for (i = 0; i < pagesize; ++i)
2312                 if (*(data + i) != *(data3 + i))
2313                         exit(1);
2314         close(fd);
2315         unlink("conftestmmap");
2316         exit(0);
2317 }
2318
2319 EOF
2320 if { (eval echo configure:2321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2321 then
2322   ac_cv_func_mmap_fixed_mapped=yes
2323 else
2324   echo "configure: failed program was:" >&5
2325   cat conftest.$ac_ext >&5
2326   rm -fr conftest*
2327   ac_cv_func_mmap_fixed_mapped=no
2328 fi
2329 rm -fr conftest*
2330 fi
2331
2332 fi
2333
2334 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2335 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2336   cat >> confdefs.h <<\EOF
2337 #define HAVE_MMAP 1
2338 EOF
2339
2340 fi
2341
2342  echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2343 echo "configure:2344: checking for vprintf" >&5
2344 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2345   echo $ac_n "(cached) $ac_c" 1>&6
2346 else
2347   cat > conftest.$ac_ext <<EOF
2348 #line 2349 "configure"
2349 #include "confdefs.h"
2350 /* System header to define __stub macros and hopefully few prototypes,
2351     which can conflict with char vprintf(); below.  */
2352 #include <assert.h>
2353 /* Override any gcc2 internal prototype to avoid an error.  */
2354 /* We use char because int might match the return type of a gcc2
2355     builtin and then its argument prototype would still apply.  */
2356 char vprintf();
2357
2358 int main() {
2359
2360 /* The GNU C library defines this for functions which it implements
2361     to always fail with ENOSYS.  Some functions are actually named
2362     something starting with __ and the normal name is an alias.  */
2363 #if defined (__stub_vprintf) || defined (__stub___vprintf)
2364 choke me
2365 #else
2366 vprintf();
2367 #endif
2368
2369 ; return 0; }
2370 EOF
2371 if { (eval echo configure:2372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2372   rm -rf conftest*
2373   eval "ac_cv_func_vprintf=yes"
2374 else
2375   echo "configure: failed program was:" >&5
2376   cat conftest.$ac_ext >&5
2377   rm -rf conftest*
2378   eval "ac_cv_func_vprintf=no"
2379 fi
2380 rm -f conftest*
2381 fi
2382
2383 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2384   echo "$ac_t""yes" 1>&6
2385   cat >> confdefs.h <<\EOF
2386 #define HAVE_VPRINTF 1
2387 EOF
2388
2389 else
2390   echo "$ac_t""no" 1>&6
2391 fi
2392
2393 if test "$ac_cv_func_vprintf" != yes; then
2394 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2395 echo "configure:2396: checking for _doprnt" >&5
2396 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2397   echo $ac_n "(cached) $ac_c" 1>&6
2398 else
2399   cat > conftest.$ac_ext <<EOF
2400 #line 2401 "configure"
2401 #include "confdefs.h"
2402 /* System header to define __stub macros and hopefully few prototypes,
2403     which can conflict with char _doprnt(); below.  */
2404 #include <assert.h>
2405 /* Override any gcc2 internal prototype to avoid an error.  */
2406 /* We use char because int might match the return type of a gcc2
2407     builtin and then its argument prototype would still apply.  */
2408 char _doprnt();
2409
2410 int main() {
2411
2412 /* The GNU C library defines this for functions which it implements
2413     to always fail with ENOSYS.  Some functions are actually named
2414     something starting with __ and the normal name is an alias.  */
2415 #if defined (__stub__doprnt) || defined (__stub____doprnt)
2416 choke me
2417 #else
2418 _doprnt();
2419 #endif
2420
2421 ; return 0; }
2422 EOF
2423 if { (eval echo configure:2424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2424   rm -rf conftest*
2425   eval "ac_cv_func__doprnt=yes"
2426 else
2427   echo "configure: failed program was:" >&5
2428   cat conftest.$ac_ext >&5
2429   rm -rf conftest*
2430   eval "ac_cv_func__doprnt=no"
2431 fi
2432 rm -f conftest*
2433 fi
2434
2435 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2436   echo "$ac_t""yes" 1>&6
2437   cat >> confdefs.h <<\EOF
2438 #define HAVE_DOPRNT 1
2439 EOF
2440
2441 else
2442   echo "$ac_t""no" 1>&6
2443 fi
2444
2445 fi
2446
2447  for ac_func in getcwd putenv socket strcspn strdup strerror strstr
2448 do
2449 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2450 echo "configure:2451: checking for $ac_func" >&5
2451 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2452   echo $ac_n "(cached) $ac_c" 1>&6
2453 else
2454   cat > conftest.$ac_ext <<EOF
2455 #line 2456 "configure"
2456 #include "confdefs.h"
2457 /* System header to define __stub macros and hopefully few prototypes,
2458     which can conflict with char $ac_func(); below.  */
2459 #include <assert.h>
2460 /* Override any gcc2 internal prototype to avoid an error.  */
2461 /* We use char because int might match the return type of a gcc2
2462     builtin and then its argument prototype would still apply.  */
2463 char $ac_func();
2464
2465 int main() {
2466
2467 /* The GNU C library defines this for functions which it implements
2468     to always fail with ENOSYS.  Some functions are actually named
2469     something starting with __ and the normal name is an alias.  */
2470 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2471 choke me
2472 #else
2473 $ac_func();
2474 #endif
2475
2476 ; return 0; }
2477 EOF
2478 if { (eval echo configure:2479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2479   rm -rf conftest*
2480   eval "ac_cv_func_$ac_func=yes"
2481 else
2482   echo "configure: failed program was:" >&5
2483   cat conftest.$ac_ext >&5
2484   rm -rf conftest*
2485   eval "ac_cv_func_$ac_func=no"
2486 fi
2487 rm -f conftest*
2488 fi
2489
2490 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2491   echo "$ac_t""yes" 1>&6
2492     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2493   cat >> confdefs.h <<EOF
2494 #define $ac_tr_func 1
2495 EOF
2496  
2497 else
2498   echo "$ac_t""no" 1>&6
2499 fi
2500 done
2501
2502
2503 if test "x${UNCOMPRESS}" = "xgzip"; then
2504     cat >> confdefs.h <<EOF
2505 #define USE_GZIP 1
2506 EOF
2507
2508 fi
2509
2510
2511 export JPEG2SWF='jpeg2swf$(EXEEXT)'
2512 if test "x${DISABLEPDF2SWF}" = "xtrue"; then
2513   echo "***************************************************"
2514   echo "The following headers/libraries are missing: " ${MISSINGLIBS}
2515   echo "Disabling pdf2swf tool..."
2516   rm -f pdf2swf/Makefile
2517   echo all: > pdf2swf/Makefile
2518   echo install: >> pdf2swf/Makefile
2519   if test "x${DISABLEJPEG2SWF}" = "xtrue"; then
2520     echo "Disabling jpeg2swf tool..."
2521     export JPEG2SWF=
2522   fi
2523   echo "***************************************************"
2524   FILES="./release Makefile lib/Makefile src/Makefile"
2525 else
2526   FILES="./release Makefile lib/Makefile src/Makefile pdf2swf/Makefile pdf2swf/xpdf/Makefile pdf2swf/ttf2pt1/Makefile pdf2swf/fonts/Makefile"
2527 fi
2528
2529
2530 trap '' 1 2 15
2531 cat > confcache <<\EOF
2532 # This file is a shell script that caches the results of configure
2533 # tests run on this system so they can be shared between configure
2534 # scripts and configure runs.  It is not useful on other systems.
2535 # If it contains results you don't want to keep, you may remove or edit it.
2536 #
2537 # By default, configure uses ./config.cache as the cache file,
2538 # creating it if it does not exist already.  You can give configure
2539 # the --cache-file=FILE option to use a different cache file; that is
2540 # what configure does when it calls configure scripts in
2541 # subdirectories, so they share the cache.
2542 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2543 # config.status only pays attention to the cache file if you give it the
2544 # --recheck option to rerun configure.
2545 #
2546 EOF
2547 # The following way of writing the cache mishandles newlines in values,
2548 # but we know of no workaround that is simple, portable, and efficient.
2549 # So, don't put newlines in cache variables' values.
2550 # Ultrix sh set writes to stderr and can't be redirected directly,
2551 # and sets the high bit in the cache file unless we assign to the vars.
2552 (set) 2>&1 |
2553   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2554   *ac_space=\ *)
2555     # `set' does not quote correctly, so add quotes (double-quote substitution
2556     # turns \\\\ into \\, and sed turns \\ into \).
2557     sed -n \
2558       -e "s/'/'\\\\''/g" \
2559       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2560     ;;
2561   *)
2562     # `set' quotes correctly as required by POSIX, so do not add quotes.
2563     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2564     ;;
2565   esac >> confcache
2566 if cmp -s $cache_file confcache; then
2567   :
2568 else
2569   if test -w $cache_file; then
2570     echo "updating cache $cache_file"
2571     cat confcache > $cache_file
2572   else
2573     echo "not updating unwritable cache $cache_file"
2574   fi
2575 fi
2576 rm -f confcache
2577
2578 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2579
2580 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2581 # Let make expand exec_prefix.
2582 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2583
2584 # Any assignment to VPATH causes Sun make to only execute
2585 # the first set of double-colon rules, so remove it if not needed.
2586 # If there is a colon in the path, we need to keep it.
2587 if test "x$srcdir" = x.; then
2588   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2589 fi
2590
2591 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2592
2593 DEFS=-DHAVE_CONFIG_H
2594
2595 # Without the "./", some shells look in PATH for config.status.
2596 : ${CONFIG_STATUS=./config.status}
2597
2598 echo creating $CONFIG_STATUS
2599 rm -f $CONFIG_STATUS
2600 cat > $CONFIG_STATUS <<EOF
2601 #! /bin/sh
2602 # Generated automatically by configure.
2603 # Run this file to recreate the current configuration.
2604 # This directory was configured as follows,
2605 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2606 #
2607 # $0 $ac_configure_args
2608 #
2609 # Compiler output produced by configure, useful for debugging
2610 # configure, is in ./config.log if it exists.
2611
2612 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2613 for ac_option
2614 do
2615   case "\$ac_option" in
2616   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2617     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2618     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2619   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2620     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2621     exit 0 ;;
2622   -help | --help | --hel | --he | --h)
2623     echo "\$ac_cs_usage"; exit 0 ;;
2624   *) echo "\$ac_cs_usage"; exit 1 ;;
2625   esac
2626 done
2627
2628 ac_given_srcdir=$srcdir
2629 ac_given_INSTALL="$INSTALL"
2630
2631 trap 'rm -fr `echo "${FILES} config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2632 EOF
2633 cat >> $CONFIG_STATUS <<EOF
2634
2635 # Protect against being on the right side of a sed subst in config.status.
2636 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2637  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2638 $ac_vpsub
2639 $extrasub
2640 s%@SHELL@%$SHELL%g
2641 s%@CFLAGS@%$CFLAGS%g
2642 s%@CPPFLAGS@%$CPPFLAGS%g
2643 s%@CXXFLAGS@%$CXXFLAGS%g
2644 s%@FFLAGS@%$FFLAGS%g
2645 s%@DEFS@%$DEFS%g
2646 s%@LDFLAGS@%$LDFLAGS%g
2647 s%@LIBS@%$LIBS%g
2648 s%@exec_prefix@%$exec_prefix%g
2649 s%@prefix@%$prefix%g
2650 s%@program_transform_name@%$program_transform_name%g
2651 s%@bindir@%$bindir%g
2652 s%@sbindir@%$sbindir%g
2653 s%@libexecdir@%$libexecdir%g
2654 s%@datadir@%$datadir%g
2655 s%@sysconfdir@%$sysconfdir%g
2656 s%@sharedstatedir@%$sharedstatedir%g
2657 s%@localstatedir@%$localstatedir%g
2658 s%@libdir@%$libdir%g
2659 s%@includedir@%$includedir%g
2660 s%@oldincludedir@%$oldincludedir%g
2661 s%@infodir@%$infodir%g
2662 s%@mandir@%$mandir%g
2663 s%@CC@%$CC%g
2664 s%@CPP@%$CPP%g
2665 s%@CXX@%$CXX%g
2666 s%@RANLIB@%$RANLIB%g
2667 s%@SET_MAKE@%$SET_MAKE%g
2668 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2669 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2670 s%@INSTALL_DATA@%$INSTALL_DATA%g
2671 s%@LN_S@%$LN_S%g
2672 s%@UNCOMPRESS@%$UNCOMPRESS%g
2673 s%@EXEEXT@%$EXEEXT%g
2674 s%@PACKAGE@%$PACKAGE%g
2675 s%@VERSION@%$VERSION%g
2676 s%@HAVE_UNISTD_H@%$HAVE_UNISTD_H%g
2677 s%@LIBOBJS@%$LIBOBJS%g
2678 s%@USE_GZIP@%$USE_GZIP%g
2679 s%@JPEG2SWF@%$JPEG2SWF%g
2680
2681 CEOF
2682 EOF
2683
2684 cat >> $CONFIG_STATUS <<\EOF
2685
2686 # Split the substitutions into bite-sized pieces for seds with
2687 # small command number limits, like on Digital OSF/1 and HP-UX.
2688 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2689 ac_file=1 # Number of current file.
2690 ac_beg=1 # First line for current file.
2691 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2692 ac_more_lines=:
2693 ac_sed_cmds=""
2694 while $ac_more_lines; do
2695   if test $ac_beg -gt 1; then
2696     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2697   else
2698     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2699   fi
2700   if test ! -s conftest.s$ac_file; then
2701     ac_more_lines=false
2702     rm -f conftest.s$ac_file
2703   else
2704     if test -z "$ac_sed_cmds"; then
2705       ac_sed_cmds="sed -f conftest.s$ac_file"
2706     else
2707       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2708     fi
2709     ac_file=`expr $ac_file + 1`
2710     ac_beg=$ac_end
2711     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2712   fi
2713 done
2714 if test -z "$ac_sed_cmds"; then
2715   ac_sed_cmds=cat
2716 fi
2717 EOF
2718
2719 cat >> $CONFIG_STATUS <<EOF
2720
2721 CONFIG_FILES=\${CONFIG_FILES-"${FILES}"}
2722 EOF
2723 cat >> $CONFIG_STATUS <<\EOF
2724 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2725   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2726   case "$ac_file" in
2727   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2728        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2729   *) ac_file_in="${ac_file}.in" ;;
2730   esac
2731
2732   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2733
2734   # Remove last slash and all that follows it.  Not all systems have dirname.
2735   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2736   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2737     # The file is in a subdirectory.
2738     test ! -d "$ac_dir" && mkdir "$ac_dir"
2739     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2740     # A "../" for each directory in $ac_dir_suffix.
2741     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2742   else
2743     ac_dir_suffix= ac_dots=
2744   fi
2745
2746   case "$ac_given_srcdir" in
2747   .)  srcdir=.
2748       if test -z "$ac_dots"; then top_srcdir=.
2749       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2750   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2751   *) # Relative path.
2752     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2753     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2754   esac
2755
2756   case "$ac_given_INSTALL" in
2757   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2758   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2759   esac
2760
2761   echo creating "$ac_file"
2762   rm -f "$ac_file"
2763   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2764   case "$ac_file" in
2765   *Makefile*) ac_comsub="1i\\
2766 # $configure_input" ;;
2767   *) ac_comsub= ;;
2768   esac
2769
2770   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2771   sed -e "$ac_comsub
2772 s%@configure_input@%$configure_input%g
2773 s%@srcdir@%$srcdir%g
2774 s%@top_srcdir@%$top_srcdir%g
2775 s%@INSTALL@%$INSTALL%g
2776 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2777 fi; done
2778 rm -f conftest.s*
2779
2780 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2781 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2782 #
2783 # ac_d sets the value in "#define NAME VALUE" lines.
2784 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2785 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2786 ac_dC='\3'
2787 ac_dD='%g'
2788 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2789 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2790 ac_uB='\([      ]\)%\1#\2define\3'
2791 ac_uC=' '
2792 ac_uD='\4%g'
2793 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2794 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2795 ac_eB='$%\1#\2define\3'
2796 ac_eC=' '
2797 ac_eD='%g'
2798
2799 if test "${CONFIG_HEADERS+set}" != set; then
2800 EOF
2801 cat >> $CONFIG_STATUS <<EOF
2802   CONFIG_HEADERS="config.h"
2803 EOF
2804 cat >> $CONFIG_STATUS <<\EOF
2805 fi
2806 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2807   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2808   case "$ac_file" in
2809   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2810        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2811   *) ac_file_in="${ac_file}.in" ;;
2812   esac
2813
2814   echo creating $ac_file
2815
2816   rm -f conftest.frag conftest.in conftest.out
2817   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2818   cat $ac_file_inputs > conftest.in
2819
2820 EOF
2821
2822 # Transform confdefs.h into a sed script conftest.vals that substitutes
2823 # the proper values into config.h.in to produce config.h.  And first:
2824 # Protect against being on the right side of a sed subst in config.status.
2825 # Protect against being in an unquoted here document in config.status.
2826 rm -f conftest.vals
2827 cat > conftest.hdr <<\EOF
2828 s/[\\&%]/\\&/g
2829 s%[\\$`]%\\&%g
2830 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2831 s%ac_d%ac_u%gp
2832 s%ac_u%ac_e%gp
2833 EOF
2834 sed -n -f conftest.hdr confdefs.h > conftest.vals
2835 rm -f conftest.hdr
2836
2837 # This sed command replaces #undef with comments.  This is necessary, for
2838 # example, in the case of _POSIX_SOURCE, which is predefined and required
2839 # on some systems where configure will not decide to define it.
2840 cat >> conftest.vals <<\EOF
2841 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2842 EOF
2843
2844 # Break up conftest.vals because some shells have a limit on
2845 # the size of here documents, and old seds have small limits too.
2846
2847 rm -f conftest.tail
2848 while :
2849 do
2850   ac_lines=`grep -c . conftest.vals`
2851   # grep -c gives empty output for an empty file on some AIX systems.
2852   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2853   # Write a limited-size here document to conftest.frag.
2854   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2855   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2856   echo 'CEOF
2857   sed -f conftest.frag conftest.in > conftest.out
2858   rm -f conftest.in
2859   mv conftest.out conftest.in
2860 ' >> $CONFIG_STATUS
2861   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2862   rm -f conftest.vals
2863   mv conftest.tail conftest.vals
2864 done
2865 rm -f conftest.vals
2866
2867 cat >> $CONFIG_STATUS <<\EOF
2868   rm -f conftest.frag conftest.h
2869   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2870   cat conftest.in >> conftest.h
2871   rm -f conftest.in
2872   if cmp -s $ac_file conftest.h 2>/dev/null; then
2873     echo "$ac_file is unchanged"
2874     rm -f conftest.h
2875   else
2876     # Remove last slash and all that follows it.  Not all systems have dirname.
2877       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2878       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2879       # The file is in a subdirectory.
2880       test ! -d "$ac_dir" && mkdir "$ac_dir"
2881     fi
2882     rm -f $ac_file
2883     mv conftest.h $ac_file
2884   fi
2885 fi; done
2886
2887 EOF
2888 cat >> $CONFIG_STATUS <<EOF
2889
2890 EOF
2891 cat >> $CONFIG_STATUS <<\EOF
2892
2893 exit 0
2894 EOF
2895 chmod +x $CONFIG_STATUS
2896 rm -fr confdefs* $ac_clean_files
2897 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2898