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