]> www.wagner.pp.ru Git - oss/catdoc.git/blob - configure
Recreated CVS repository from working copy
[oss/catdoc.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-wish=fullpath    allows to specify full path for Tk interpreter to 
16                           avoid checking, which requires X"
17 ac_help="$ac_help
18   --with-install-root=path
19                            allows to install catdoc into other directory 
20                            than compilied-in path points to"
21 ac_help="$ac_help
22   --with-input=charset     set default charset to expect in 8-bit word files"
23 ac_help="$ac_help
24   --with-output=charset    set default charset to output"
25 ac_help="$ac_help
26   --disable-charset-check  allow make in charsets directory to succeed 
27                            even if files for default charsets are not found"
28 ac_help="$ac_help
29   --disable-wordview       Do not install tcl-tk
30                                                 wrapper"
31 ac_help="$ac_help
32   --disable-langinfo     Do not use system
33 locale for output encoding"
34
35 # Initialize some variables set by options.
36 # The variables have the same names as the options, with
37 # dashes changed to underlines.
38 build=NONE
39 cache_file=./config.cache
40 exec_prefix=NONE
41 host=NONE
42 no_create=
43 nonopt=NONE
44 no_recursion=
45 prefix=NONE
46 program_prefix=NONE
47 program_suffix=NONE
48 program_transform_name=s,x,x,
49 silent=
50 site=
51 srcdir=
52 target=NONE
53 verbose=
54 x_includes=NONE
55 x_libraries=NONE
56 bindir='${exec_prefix}/bin'
57 sbindir='${exec_prefix}/sbin'
58 libexecdir='${exec_prefix}/libexec'
59 datadir='${prefix}/share'
60 sysconfdir='${prefix}/etc'
61 sharedstatedir='${prefix}/com'
62 localstatedir='${prefix}/var'
63 libdir='${exec_prefix}/lib'
64 includedir='${prefix}/include'
65 oldincludedir='/usr/include'
66 infodir='${prefix}/info'
67 mandir='${prefix}/man'
68
69 # Initialize some other variables.
70 subdirs=
71 MFLAGS= MAKEFLAGS=
72 SHELL=${CONFIG_SHELL-/bin/sh}
73 # Maximum number of lines to put in a shell here document.
74 ac_max_here_lines=12
75
76 ac_prev=
77 for ac_option
78 do
79
80   # If the previous option needs an argument, assign it.
81   if test -n "$ac_prev"; then
82     eval "$ac_prev=\$ac_option"
83     ac_prev=
84     continue
85   fi
86
87   case "$ac_option" in
88   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
89   *) ac_optarg= ;;
90   esac
91
92   # Accept the important Cygnus configure options, so we can diagnose typos.
93
94   case "$ac_option" in
95
96   -bindir | --bindir | --bindi | --bind | --bin | --bi)
97     ac_prev=bindir ;;
98   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
99     bindir="$ac_optarg" ;;
100
101   -build | --build | --buil | --bui | --bu)
102     ac_prev=build ;;
103   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
104     build="$ac_optarg" ;;
105
106   -cache-file | --cache-file | --cache-fil | --cache-fi \
107   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
108     ac_prev=cache_file ;;
109   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
110   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
111     cache_file="$ac_optarg" ;;
112
113   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
114     ac_prev=datadir ;;
115   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
116   | --da=*)
117     datadir="$ac_optarg" ;;
118
119   -disable-* | --disable-*)
120     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
121     # Reject names that are not valid shell variable names.
122     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
123       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
124     fi
125     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
126     eval "enable_${ac_feature}=no" ;;
127
128   -enable-* | --enable-*)
129     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
130     # Reject names that are not valid shell variable names.
131     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
132       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
133     fi
134     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
135     case "$ac_option" in
136       *=*) ;;
137       *) ac_optarg=yes ;;
138     esac
139     eval "enable_${ac_feature}='$ac_optarg'" ;;
140
141   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
142   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
143   | --exec | --exe | --ex)
144     ac_prev=exec_prefix ;;
145   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
146   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
147   | --exec=* | --exe=* | --ex=*)
148     exec_prefix="$ac_optarg" ;;
149
150   -gas | --gas | --ga | --g)
151     # Obsolete; use --with-gas.
152     with_gas=yes ;;
153
154   -help | --help | --hel | --he)
155     # Omit some internal or obsolete options to make the list less imposing.
156     # This message is too long to be a string in the A/UX 3.1 sh.
157     cat << EOF
158 Usage: configure [options] [host]
159 Options: [defaults in brackets after descriptions]
160 Configuration:
161   --cache-file=FILE       cache test results in FILE
162   --help                  print this message
163   --no-create             do not create output files
164   --quiet, --silent       do not print \`checking...' messages
165   --version               print the version of autoconf that created configure
166 Directory and file names:
167   --prefix=PREFIX         install architecture-independent files in PREFIX
168                           [$ac_default_prefix]
169   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
170                           [same as prefix]
171   --bindir=DIR            user executables in DIR [EPREFIX/bin]
172   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
173   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
174   --datadir=DIR           read-only architecture-independent data in DIR
175                           [PREFIX/share]
176   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
177   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
178                           [PREFIX/com]
179   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
180   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
181   --includedir=DIR        C header files in DIR [PREFIX/include]
182   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
183   --infodir=DIR           info documentation in DIR [PREFIX/info]
184   --mandir=DIR            man documentation in DIR [PREFIX/man]
185   --srcdir=DIR            find the sources in DIR [configure dir or ..]
186   --program-prefix=PREFIX prepend PREFIX to installed program names
187   --program-suffix=SUFFIX append SUFFIX to installed program names
188   --program-transform-name=PROGRAM
189                           run sed PROGRAM on installed program names
190 EOF
191     cat << EOF
192 Host type:
193   --build=BUILD           configure for building on BUILD [BUILD=HOST]
194   --host=HOST             configure for HOST [guessed]
195   --target=TARGET         configure for TARGET [TARGET=HOST]
196 Features and packages:
197   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
198   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
199   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
200   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
201   --x-includes=DIR        X include files are in DIR
202   --x-libraries=DIR       X library files are in DIR
203 EOF
204     if test -n "$ac_help"; then
205       echo "--enable and --with options recognized:$ac_help"
206     fi
207     exit 0 ;;
208
209   -host | --host | --hos | --ho)
210     ac_prev=host ;;
211   -host=* | --host=* | --hos=* | --ho=*)
212     host="$ac_optarg" ;;
213
214   -includedir | --includedir | --includedi | --included | --include \
215   | --includ | --inclu | --incl | --inc)
216     ac_prev=includedir ;;
217   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
218   | --includ=* | --inclu=* | --incl=* | --inc=*)
219     includedir="$ac_optarg" ;;
220
221   -infodir | --infodir | --infodi | --infod | --info | --inf)
222     ac_prev=infodir ;;
223   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
224     infodir="$ac_optarg" ;;
225
226   -libdir | --libdir | --libdi | --libd)
227     ac_prev=libdir ;;
228   -libdir=* | --libdir=* | --libdi=* | --libd=*)
229     libdir="$ac_optarg" ;;
230
231   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
232   | --libexe | --libex | --libe)
233     ac_prev=libexecdir ;;
234   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
235   | --libexe=* | --libex=* | --libe=*)
236     libexecdir="$ac_optarg" ;;
237
238   -localstatedir | --localstatedir | --localstatedi | --localstated \
239   | --localstate | --localstat | --localsta | --localst \
240   | --locals | --local | --loca | --loc | --lo)
241     ac_prev=localstatedir ;;
242   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
243   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
244   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
245     localstatedir="$ac_optarg" ;;
246
247   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
248     ac_prev=mandir ;;
249   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
250     mandir="$ac_optarg" ;;
251
252   -nfp | --nfp | --nf)
253     # Obsolete; use --without-fp.
254     with_fp=no ;;
255
256   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
257   | --no-cr | --no-c)
258     no_create=yes ;;
259
260   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
261   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
262     no_recursion=yes ;;
263
264   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
265   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
266   | --oldin | --oldi | --old | --ol | --o)
267     ac_prev=oldincludedir ;;
268   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
269   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
270   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
271     oldincludedir="$ac_optarg" ;;
272
273   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
274     ac_prev=prefix ;;
275   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
276     prefix="$ac_optarg" ;;
277
278   -program-prefix | --program-prefix | --program-prefi | --program-pref \
279   | --program-pre | --program-pr | --program-p)
280     ac_prev=program_prefix ;;
281   -program-prefix=* | --program-prefix=* | --program-prefi=* \
282   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
283     program_prefix="$ac_optarg" ;;
284
285   -program-suffix | --program-suffix | --program-suffi | --program-suff \
286   | --program-suf | --program-su | --program-s)
287     ac_prev=program_suffix ;;
288   -program-suffix=* | --program-suffix=* | --program-suffi=* \
289   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
290     program_suffix="$ac_optarg" ;;
291
292   -program-transform-name | --program-transform-name \
293   | --program-transform-nam | --program-transform-na \
294   | --program-transform-n | --program-transform- \
295   | --program-transform | --program-transfor \
296   | --program-transfo | --program-transf \
297   | --program-trans | --program-tran \
298   | --progr-tra | --program-tr | --program-t)
299     ac_prev=program_transform_name ;;
300   -program-transform-name=* | --program-transform-name=* \
301   | --program-transform-nam=* | --program-transform-na=* \
302   | --program-transform-n=* | --program-transform-=* \
303   | --program-transform=* | --program-transfor=* \
304   | --program-transfo=* | --program-transf=* \
305   | --program-trans=* | --program-tran=* \
306   | --progr-tra=* | --program-tr=* | --program-t=*)
307     program_transform_name="$ac_optarg" ;;
308
309   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
310   | -silent | --silent | --silen | --sile | --sil)
311     silent=yes ;;
312
313   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
314     ac_prev=sbindir ;;
315   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
316   | --sbi=* | --sb=*)
317     sbindir="$ac_optarg" ;;
318
319   -sharedstatedir | --sharedstatedir | --sharedstatedi \
320   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
321   | --sharedst | --shareds | --shared | --share | --shar \
322   | --sha | --sh)
323     ac_prev=sharedstatedir ;;
324   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
325   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
326   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
327   | --sha=* | --sh=*)
328     sharedstatedir="$ac_optarg" ;;
329
330   -site | --site | --sit)
331     ac_prev=site ;;
332   -site=* | --site=* | --sit=*)
333     site="$ac_optarg" ;;
334
335   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
336     ac_prev=srcdir ;;
337   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
338     srcdir="$ac_optarg" ;;
339
340   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
341   | --syscon | --sysco | --sysc | --sys | --sy)
342     ac_prev=sysconfdir ;;
343   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
344   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
345     sysconfdir="$ac_optarg" ;;
346
347   -target | --target | --targe | --targ | --tar | --ta | --t)
348     ac_prev=target ;;
349   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
350     target="$ac_optarg" ;;
351
352   -v | -verbose | --verbose | --verbos | --verbo | --verb)
353     verbose=yes ;;
354
355   -version | --version | --versio | --versi | --vers)
356     echo "configure generated by autoconf version 2.13"
357     exit 0 ;;
358
359   -with-* | --with-*)
360     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
361     # Reject names that are not valid shell variable names.
362     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
363       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
364     fi
365     ac_package=`echo $ac_package| sed 's/-/_/g'`
366     case "$ac_option" in
367       *=*) ;;
368       *) ac_optarg=yes ;;
369     esac
370     eval "with_${ac_package}='$ac_optarg'" ;;
371
372   -without-* | --without-*)
373     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
374     # Reject names that are not valid shell variable names.
375     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
376       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
377     fi
378     ac_package=`echo $ac_package| sed 's/-/_/g'`
379     eval "with_${ac_package}=no" ;;
380
381   --x)
382     # Obsolete; use --with-x.
383     with_x=yes ;;
384
385   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
386   | --x-incl | --x-inc | --x-in | --x-i)
387     ac_prev=x_includes ;;
388   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
389   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
390     x_includes="$ac_optarg" ;;
391
392   -x-libraries | --x-libraries | --x-librarie | --x-librari \
393   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
394     ac_prev=x_libraries ;;
395   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
396   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
397     x_libraries="$ac_optarg" ;;
398
399   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
400     ;;
401
402   *)
403     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
404       echo "configure: warning: $ac_option: invalid host type" 1>&2
405     fi
406     if test "x$nonopt" != xNONE; then
407       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
408     fi
409     nonopt="$ac_option"
410     ;;
411
412   esac
413 done
414
415 if test -n "$ac_prev"; then
416   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
417 fi
418
419 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
420
421 # File descriptor usage:
422 # 0 standard input
423 # 1 file creation
424 # 2 errors and warnings
425 # 3 some systems may open it to /dev/tty
426 # 4 used on the Kubota Titan
427 # 6 checking for... messages and results
428 # 5 compiler messages saved in config.log
429 if test "$silent" = yes; then
430   exec 6>/dev/null
431 else
432   exec 6>&1
433 fi
434 exec 5>./config.log
435
436 echo "\
437 This file contains any messages produced by compilers while
438 running configure, to aid debugging if configure makes a mistake.
439 " 1>&5
440
441 # Strip out --no-create and --no-recursion so they do not pile up.
442 # Also quote any args containing shell metacharacters.
443 ac_configure_args=
444 for ac_arg
445 do
446   case "$ac_arg" in
447   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
448   | --no-cr | --no-c) ;;
449   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
450   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
451   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
452   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
453   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
454   esac
455 done
456
457 # NLS nuisances.
458 # Only set these to C if already set.  These must not be set unconditionally
459 # because not all systems understand e.g. LANG=C (notably SCO).
460 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
461 # Non-C LC_CTYPE values break the ctype check.
462 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
463 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
464 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
465 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
466
467 # confdefs.h avoids OS command line length limits that DEFS can exceed.
468 rm -rf conftest* confdefs.h
469 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
470 echo > confdefs.h
471
472 # A filename unique to this package, relative to the directory that
473 # configure is in, which we can look for to find out if srcdir is correct.
474 ac_unique_file=acconfig.h
475
476 # Find the source files, if location was not specified.
477 if test -z "$srcdir"; then
478   ac_srcdir_defaulted=yes
479   # Try the directory containing this script, then its parent.
480   ac_prog=$0
481   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
482   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
483   srcdir=$ac_confdir
484   if test ! -r $srcdir/$ac_unique_file; then
485     srcdir=..
486   fi
487 else
488   ac_srcdir_defaulted=no
489 fi
490 if test ! -r $srcdir/$ac_unique_file; then
491   if test "$ac_srcdir_defaulted" = yes; then
492     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
493   else
494     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
495   fi
496 fi
497 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
498
499 # Prefer explicitly selected file to automatically selected ones.
500 if test -z "$CONFIG_SITE"; then
501   if test "x$prefix" != xNONE; then
502     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
503   else
504     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
505   fi
506 fi
507 for ac_site_file in $CONFIG_SITE; do
508   if test -r "$ac_site_file"; then
509     echo "loading site script $ac_site_file"
510     . "$ac_site_file"
511   fi
512 done
513
514 if test -r "$cache_file"; then
515   echo "loading cache $cache_file"
516   . $cache_file
517 else
518   echo "creating cache $cache_file"
519   > $cache_file
520 fi
521
522 ac_ext=c
523 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
524 ac_cpp='$CPP $CPPFLAGS'
525 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
526 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
527 cross_compiling=$ac_cv_prog_cc_cross
528
529 ac_exeext=
530 ac_objext=o
531 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
532   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
533   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
534     ac_n= ac_c='
535 ' ac_t='        '
536   else
537     ac_n=-n ac_c= ac_t=
538   fi
539 else
540   ac_n= ac_c='\c' ac_t=
541 fi
542
543
544 catdoc_version=0.94
545 # Extract the first word of "gcc", so it can be a program name with args.
546 set dummy gcc; ac_word=$2
547 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
548 echo "configure:549: checking for $ac_word" >&5
549 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
550   echo $ac_n "(cached) $ac_c" 1>&6
551 else
552   if test -n "$CC"; then
553   ac_cv_prog_CC="$CC" # Let the user override the test.
554 else
555   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
556   ac_dummy="$PATH"
557   for ac_dir in $ac_dummy; do
558     test -z "$ac_dir" && ac_dir=.
559     if test -f $ac_dir/$ac_word; then
560       ac_cv_prog_CC="gcc"
561       break
562     fi
563   done
564   IFS="$ac_save_ifs"
565 fi
566 fi
567 CC="$ac_cv_prog_CC"
568 if test -n "$CC"; then
569   echo "$ac_t""$CC" 1>&6
570 else
571   echo "$ac_t""no" 1>&6
572 fi
573
574 if test -z "$CC"; then
575   # Extract the first word of "cc", so it can be a program name with args.
576 set dummy cc; ac_word=$2
577 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
578 echo "configure:579: checking for $ac_word" >&5
579 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
580   echo $ac_n "(cached) $ac_c" 1>&6
581 else
582   if test -n "$CC"; then
583   ac_cv_prog_CC="$CC" # Let the user override the test.
584 else
585   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
586   ac_prog_rejected=no
587   ac_dummy="$PATH"
588   for ac_dir in $ac_dummy; do
589     test -z "$ac_dir" && ac_dir=.
590     if test -f $ac_dir/$ac_word; then
591       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
592         ac_prog_rejected=yes
593         continue
594       fi
595       ac_cv_prog_CC="cc"
596       break
597     fi
598   done
599   IFS="$ac_save_ifs"
600 if test $ac_prog_rejected = yes; then
601   # We found a bogon in the path, so make sure we never use it.
602   set dummy $ac_cv_prog_CC
603   shift
604   if test $# -gt 0; then
605     # We chose a different compiler from the bogus one.
606     # However, it has the same basename, so the bogon will be chosen
607     # first if we set CC to just the basename; use the full file name.
608     shift
609     set dummy "$ac_dir/$ac_word" "$@"
610     shift
611     ac_cv_prog_CC="$@"
612   fi
613 fi
614 fi
615 fi
616 CC="$ac_cv_prog_CC"
617 if test -n "$CC"; then
618   echo "$ac_t""$CC" 1>&6
619 else
620   echo "$ac_t""no" 1>&6
621 fi
622
623   if test -z "$CC"; then
624     case "`uname -s`" in
625     *win32* | *WIN32*)
626       # Extract the first word of "cl", so it can be a program name with args.
627 set dummy cl; ac_word=$2
628 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
629 echo "configure:630: checking for $ac_word" >&5
630 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
631   echo $ac_n "(cached) $ac_c" 1>&6
632 else
633   if test -n "$CC"; then
634   ac_cv_prog_CC="$CC" # Let the user override the test.
635 else
636   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
637   ac_dummy="$PATH"
638   for ac_dir in $ac_dummy; do
639     test -z "$ac_dir" && ac_dir=.
640     if test -f $ac_dir/$ac_word; then
641       ac_cv_prog_CC="cl"
642       break
643     fi
644   done
645   IFS="$ac_save_ifs"
646 fi
647 fi
648 CC="$ac_cv_prog_CC"
649 if test -n "$CC"; then
650   echo "$ac_t""$CC" 1>&6
651 else
652   echo "$ac_t""no" 1>&6
653 fi
654  ;;
655     esac
656   fi
657   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
658 fi
659
660 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
661 echo "configure:662: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
662
663 ac_ext=c
664 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
665 ac_cpp='$CPP $CPPFLAGS'
666 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
667 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
668 cross_compiling=$ac_cv_prog_cc_cross
669
670 cat > conftest.$ac_ext << EOF
671
672 #line 673 "configure"
673 #include "confdefs.h"
674
675 main(){return(0);}
676 EOF
677 if { (eval echo configure:678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
678   ac_cv_prog_cc_works=yes
679   # If we can't run a trivial program, we are probably using a cross compiler.
680   if (./conftest; exit) 2>/dev/null; then
681     ac_cv_prog_cc_cross=no
682   else
683     ac_cv_prog_cc_cross=yes
684   fi
685 else
686   echo "configure: failed program was:" >&5
687   cat conftest.$ac_ext >&5
688   ac_cv_prog_cc_works=no
689 fi
690 rm -fr conftest*
691 ac_ext=c
692 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
693 ac_cpp='$CPP $CPPFLAGS'
694 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
695 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
696 cross_compiling=$ac_cv_prog_cc_cross
697
698 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
699 if test $ac_cv_prog_cc_works = no; then
700   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
701 fi
702 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
703 echo "configure:704: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
704 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
705 cross_compiling=$ac_cv_prog_cc_cross
706
707 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
708 echo "configure:709: checking whether we are using GNU C" >&5
709 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
710   echo $ac_n "(cached) $ac_c" 1>&6
711 else
712   cat > conftest.c <<EOF
713 #ifdef __GNUC__
714   yes;
715 #endif
716 EOF
717 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
718   ac_cv_prog_gcc=yes
719 else
720   ac_cv_prog_gcc=no
721 fi
722 fi
723
724 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
725
726 if test $ac_cv_prog_gcc = yes; then
727   GCC=yes
728 else
729   GCC=
730 fi
731
732 ac_test_CFLAGS="${CFLAGS+set}"
733 ac_save_CFLAGS="$CFLAGS"
734 CFLAGS=
735 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
736 echo "configure:737: checking whether ${CC-cc} accepts -g" >&5
737 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
738   echo $ac_n "(cached) $ac_c" 1>&6
739 else
740   echo 'void f(){}' > conftest.c
741 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
742   ac_cv_prog_cc_g=yes
743 else
744   ac_cv_prog_cc_g=no
745 fi
746 rm -f conftest*
747
748 fi
749
750 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
751 if test "$ac_test_CFLAGS" = set; then
752   CFLAGS="$ac_save_CFLAGS"
753 elif test $ac_cv_prog_cc_g = yes; then
754   if test "$GCC" = yes; then
755     CFLAGS="-g -O2"
756   else
757     CFLAGS="-g"
758   fi
759 else
760   if test "$GCC" = yes; then
761     CFLAGS="-O2"
762   else
763     CFLAGS=
764   fi
765 fi
766
767 case ${CC} in
768 *djgpp*) ac_cv_c_bigendian=no
769                 ac_cv_func_setvbuf_reversed=no
770 ;;
771 *)
772 ;;
773 esac
774 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
775 echo "configure:776: checking whether byte ordering is bigendian" >&5
776 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
777   echo $ac_n "(cached) $ac_c" 1>&6
778 else
779   ac_cv_c_bigendian=unknown
780 # See if sys/param.h defines the BYTE_ORDER macro.
781 cat > conftest.$ac_ext <<EOF
782 #line 783 "configure"
783 #include "confdefs.h"
784 #include <sys/types.h>
785 #include <sys/param.h>
786 int main() {
787
788 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
789  bogus endian macros
790 #endif
791 ; return 0; }
792 EOF
793 if { (eval echo configure:794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
794   rm -rf conftest*
795   # It does; now see whether it defined to BIG_ENDIAN or not.
796 cat > conftest.$ac_ext <<EOF
797 #line 798 "configure"
798 #include "confdefs.h"
799 #include <sys/types.h>
800 #include <sys/param.h>
801 int main() {
802
803 #if BYTE_ORDER != BIG_ENDIAN
804  not big endian
805 #endif
806 ; return 0; }
807 EOF
808 if { (eval echo configure:809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
809   rm -rf conftest*
810   ac_cv_c_bigendian=yes
811 else
812   echo "configure: failed program was:" >&5
813   cat conftest.$ac_ext >&5
814   rm -rf conftest*
815   ac_cv_c_bigendian=no
816 fi
817 rm -f conftest*
818 else
819   echo "configure: failed program was:" >&5
820   cat conftest.$ac_ext >&5
821 fi
822 rm -f conftest*
823 if test $ac_cv_c_bigendian = unknown; then
824 if test "$cross_compiling" = yes; then
825     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
826 else
827   cat > conftest.$ac_ext <<EOF
828 #line 829 "configure"
829 #include "confdefs.h"
830 main () {
831   /* Are we little or big endian?  From Harbison&Steele.  */
832   union
833   {
834     long l;
835     char c[sizeof (long)];
836   } u;
837   u.l = 1;
838   exit (u.c[sizeof (long) - 1] == 1);
839 }
840 EOF
841 if { (eval echo configure:842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
842 then
843   ac_cv_c_bigendian=no
844 else
845   echo "configure: failed program was:" >&5
846   cat conftest.$ac_ext >&5
847   rm -fr conftest*
848   ac_cv_c_bigendian=yes
849 fi
850 rm -fr conftest*
851 fi
852
853 fi
854 fi
855
856 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
857 if test $ac_cv_c_bigendian = yes; then
858   cat >> confdefs.h <<\EOF
859 #define WORDS_BIGENDIAN 1
860 EOF
861
862 fi
863
864 ac_aux_dir=
865 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
866   if test -f $ac_dir/install-sh; then
867     ac_aux_dir=$ac_dir
868     ac_install_sh="$ac_aux_dir/install-sh -c"
869     break
870   elif test -f $ac_dir/install.sh; then
871     ac_aux_dir=$ac_dir
872     ac_install_sh="$ac_aux_dir/install.sh -c"
873     break
874   fi
875 done
876 if test -z "$ac_aux_dir"; then
877   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
878 fi
879 ac_config_guess=$ac_aux_dir/config.guess
880 ac_config_sub=$ac_aux_dir/config.sub
881 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
882
883 # Find a good install program.  We prefer a C program (faster),
884 # so one script is as good as another.  But avoid the broken or
885 # incompatible versions:
886 # SysV /etc/install, /usr/sbin/install
887 # SunOS /usr/etc/install
888 # IRIX /sbin/install
889 # AIX /bin/install
890 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
891 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
892 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
893 # ./install, which can be erroneously created by make from ./install.sh.
894 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
895 echo "configure:896: checking for a BSD compatible install" >&5
896 if test -z "$INSTALL"; then
897 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
898   echo $ac_n "(cached) $ac_c" 1>&6
899 else
900     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
901   for ac_dir in $PATH; do
902     # Account for people who put trailing slashes in PATH elements.
903     case "$ac_dir/" in
904     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
905     *)
906       # OSF1 and SCO ODT 3.0 have their own names for install.
907       # Don't use installbsd from OSF since it installs stuff as root
908       # by default.
909       for ac_prog in ginstall scoinst install; do
910         if test -f $ac_dir/$ac_prog; then
911           if test $ac_prog = install &&
912             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
913             # AIX install.  It has an incompatible calling convention.
914             :
915           else
916             ac_cv_path_install="$ac_dir/$ac_prog -c"
917             break 2
918           fi
919         fi
920       done
921       ;;
922     esac
923   done
924   IFS="$ac_save_IFS"
925
926 fi
927   if test "${ac_cv_path_install+set}" = set; then
928     INSTALL="$ac_cv_path_install"
929   else
930     # As a last resort, use the slow shell script.  We don't cache a
931     # path for INSTALL within a source directory, because that will
932     # break other packages using the cache if that directory is
933     # removed, or if the path is relative.
934     INSTALL="$ac_install_sh"
935   fi
936 fi
937 echo "$ac_t""$INSTALL" 1>&6
938
939 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
940 # It thinks the first close brace ends the variable substitution.
941 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
942
943 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
944
945 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
946
947 if test "$enable_wordview" != "no" ;then
948 # Check whether --with-wish or --without-wish was given.
949 if test "${with_wish+set}" = set; then
950   withval="$with_wish"
951   WISH=$withval
952 else
953   
954 for ac_prog in wish wish8.1 wish8.2 wish8.3 wish8.4
955 do
956 # Extract the first word of "$ac_prog", so it can be a program name with args.
957 set dummy $ac_prog; ac_word=$2
958 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
959 echo "configure:960: checking for $ac_word" >&5
960 if eval "test \"`echo '$''{'ac_cv_path_WISH'+set}'`\" = set"; then
961   echo $ac_n "(cached) $ac_c" 1>&6
962 else
963   case "$WISH" in
964   /*)
965   ac_cv_path_WISH="$WISH" # Let the user override the test with a path.
966   ;;
967   ?:/*)                  
968   ac_cv_path_WISH="$WISH" # Let the user override the test with a dos path.
969   ;;
970   *)
971   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
972   ac_dummy="$PATH"
973   for ac_dir in $ac_dummy; do 
974     test -z "$ac_dir" && ac_dir=.
975     if test -f $ac_dir/$ac_word; then
976       ac_cv_path_WISH="$ac_dir/$ac_word"
977       break
978     fi
979   done
980   IFS="$ac_save_ifs"
981   ;;
982 esac
983 fi
984 WISH="$ac_cv_path_WISH"
985 if test -n "$WISH"; then
986   echo "$ac_t""$WISH" 1>&6
987 else
988   echo "$ac_t""no" 1>&6
989 fi
990
991 test -n "$WISH" && break
992 done
993
994 if test -n "$WISH"; then
995 echo $ac_n "checking checking if wish version is 8.1 or above ""... $ac_c" 1>&6
996 echo "configure:997: checking checking if wish version is 8.1 or above " >&5
997 if eval "test \"`echo '$''{'GOOD_WISH'+set}'`\" = set"; then
998   echo $ac_n "(cached) $ac_c" 1>&6
999 else
1000   echo 'if {[info tclversion]>=7.6} {
1001  puts -nonewline "yes"
1002 } else {
1003  puts -nonewline "no"
1004
1005 exit'>tmp$$.tcl
1006 GOOD_WISH=`$WISH tmp$$.tcl`
1007 rm tmp$$.tcl 
1008
1009 fi
1010
1011 echo "$ac_t""$GOOD_WISH" 1>&6
1012 if test "$GOOD_WISH" != yes; then
1013 enable_wordview=no
1014 fi
1015 fi
1016
1017 fi
1018
1019 fi
1020 # Check whether --with-install-root or --without-install-root was given.
1021 if test "${with_install_root+set}" = set; then
1022   withval="$with_install_root"
1023   installroot=$withval
1024 fi
1025
1026 replsuffix=.replchars
1027 specsuffix=.specchars
1028 targetcharset=koi8-r
1029 sourcecharset=cp1251
1030 # Check whether --with-input or --without-input was given.
1031 if test "${with_input+set}" = set; then
1032   withval="$with_input"
1033   sourcecharset=$withval
1034 else
1035   sourcecharset=cp1251
1036 fi
1037
1038 # Check whether --with-output or --without-output was given.
1039 if test "${with_output+set}" = set; then
1040   withval="$with_output"
1041   targetcharset=$withval
1042 else
1043   targetcharset=koi8-r
1044 fi
1045
1046 if test "$targetcharset" = "utf-8";  then
1047 charsetcheck="$sourcecharset.txt"
1048 else
1049 charsetcheck="$sourcecharset.txt $targetcharset.txt"
1050 fi
1051 # Check whether --enable-charset-check or --disable-charset-check was given.
1052 if test "${enable_charset_check+set}" = set; then
1053   enableval="$enable_charset_check"
1054   if test "$enable_charset_check" = no;
1055 then
1056  charsetcheck=""
1057 fi
1058 fi
1059  
1060 test -z "$manext" && manext=.1
1061 test -z "$man1dir" && man1dir=\${prefix}/man/man1
1062 if test -n "$WISH"; then
1063 # Check whether --enable-wordview or --disable-wordview was given.
1064 if test "${enable_wordview+set}" = set; then
1065   enableval="$enable_wordview"
1066   :
1067 fi
1068
1069 fi
1070 if test "$enable_wordview" = no; then
1071          installtargets=install-catdoc 
1072           buildtargets="catdoc xls2csv catppt"
1073 else   
1074         installtargets="install-catdoc install-wordview"
1075         buildtargets="catdoc xls2csv catppt wordview"
1076 fi
1077
1078 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1079 echo "configure:1080: checking how to run the C preprocessor" >&5
1080 # On Suns, sometimes $CPP names a directory.
1081 if test -n "$CPP" && test -d "$CPP"; then
1082   CPP=
1083 fi
1084 if test -z "$CPP"; then
1085 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1086   echo $ac_n "(cached) $ac_c" 1>&6
1087 else
1088     # This must be in double quotes, not single quotes, because CPP may get
1089   # substituted into the Makefile and "${CC-cc}" will confuse make.
1090   CPP="${CC-cc} -E"
1091   # On the NeXT, cc -E runs the code through the compiler's parser,
1092   # not just through cpp.
1093   cat > conftest.$ac_ext <<EOF
1094 #line 1095 "configure"
1095 #include "confdefs.h"
1096 #include <assert.h>
1097 Syntax Error
1098 EOF
1099 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1100 { (eval echo configure:1101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1101 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1102 if test -z "$ac_err"; then
1103   :
1104 else
1105   echo "$ac_err" >&5
1106   echo "configure: failed program was:" >&5
1107   cat conftest.$ac_ext >&5
1108   rm -rf conftest*
1109   CPP="${CC-cc} -E -traditional-cpp"
1110   cat > conftest.$ac_ext <<EOF
1111 #line 1112 "configure"
1112 #include "confdefs.h"
1113 #include <assert.h>
1114 Syntax Error
1115 EOF
1116 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1117 { (eval echo configure:1118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1118 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1119 if test -z "$ac_err"; then
1120   :
1121 else
1122   echo "$ac_err" >&5
1123   echo "configure: failed program was:" >&5
1124   cat conftest.$ac_ext >&5
1125   rm -rf conftest*
1126   CPP="${CC-cc} -nologo -E"
1127   cat > conftest.$ac_ext <<EOF
1128 #line 1129 "configure"
1129 #include "confdefs.h"
1130 #include <assert.h>
1131 Syntax Error
1132 EOF
1133 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1134 { (eval echo configure:1135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1135 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1136 if test -z "$ac_err"; then
1137   :
1138 else
1139   echo "$ac_err" >&5
1140   echo "configure: failed program was:" >&5
1141   cat conftest.$ac_ext >&5
1142   rm -rf conftest*
1143   CPP=/lib/cpp
1144 fi
1145 rm -f conftest*
1146 fi
1147 rm -f conftest*
1148 fi
1149 rm -f conftest*
1150   ac_cv_prog_CPP="$CPP"
1151 fi
1152   CPP="$ac_cv_prog_CPP"
1153 else
1154   ac_cv_prog_CPP="$CPP"
1155 fi
1156 echo "$ac_t""$CPP" 1>&6
1157
1158 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1159 echo "configure:1160: checking for ANSI C header files" >&5
1160 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1161   echo $ac_n "(cached) $ac_c" 1>&6
1162 else
1163   cat > conftest.$ac_ext <<EOF
1164 #line 1165 "configure"
1165 #include "confdefs.h"
1166 #include <stdlib.h>
1167 #include <stdarg.h>
1168 #include <string.h>
1169 #include <float.h>
1170 EOF
1171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1172 { (eval echo configure:1173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1174 if test -z "$ac_err"; then
1175   rm -rf conftest*
1176   ac_cv_header_stdc=yes
1177 else
1178   echo "$ac_err" >&5
1179   echo "configure: failed program was:" >&5
1180   cat conftest.$ac_ext >&5
1181   rm -rf conftest*
1182   ac_cv_header_stdc=no
1183 fi
1184 rm -f conftest*
1185
1186 if test $ac_cv_header_stdc = yes; then
1187   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1188 cat > conftest.$ac_ext <<EOF
1189 #line 1190 "configure"
1190 #include "confdefs.h"
1191 #include <string.h>
1192 EOF
1193 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1194   egrep "memchr" >/dev/null 2>&1; then
1195   :
1196 else
1197   rm -rf conftest*
1198   ac_cv_header_stdc=no
1199 fi
1200 rm -f conftest*
1201
1202 fi
1203
1204 if test $ac_cv_header_stdc = yes; then
1205   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1206 cat > conftest.$ac_ext <<EOF
1207 #line 1208 "configure"
1208 #include "confdefs.h"
1209 #include <stdlib.h>
1210 EOF
1211 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1212   egrep "free" >/dev/null 2>&1; then
1213   :
1214 else
1215   rm -rf conftest*
1216   ac_cv_header_stdc=no
1217 fi
1218 rm -f conftest*
1219
1220 fi
1221
1222 if test $ac_cv_header_stdc = yes; then
1223   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1224 if test "$cross_compiling" = yes; then
1225   :
1226 else
1227   cat > conftest.$ac_ext <<EOF
1228 #line 1229 "configure"
1229 #include "confdefs.h"
1230 #include <ctype.h>
1231 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1232 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1233 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1234 int main () { int i; for (i = 0; i < 256; i++)
1235 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1236 exit (0); }
1237
1238 EOF
1239 if { (eval echo configure:1240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1240 then
1241   :
1242 else
1243   echo "configure: failed program was:" >&5
1244   cat conftest.$ac_ext >&5
1245   rm -fr conftest*
1246   ac_cv_header_stdc=no
1247 fi
1248 rm -fr conftest*
1249 fi
1250
1251 fi
1252 fi
1253
1254 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1255 if test $ac_cv_header_stdc = yes; then
1256   cat >> confdefs.h <<\EOF
1257 #define STDC_HEADERS 1
1258 EOF
1259
1260 fi
1261
1262 for ac_hdr in unistd.h
1263 do
1264 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1265 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1266 echo "configure:1267: checking for $ac_hdr" >&5
1267 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1268   echo $ac_n "(cached) $ac_c" 1>&6
1269 else
1270   cat > conftest.$ac_ext <<EOF
1271 #line 1272 "configure"
1272 #include "confdefs.h"
1273 #include <$ac_hdr>
1274 EOF
1275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1276 { (eval echo configure:1277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1277 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1278 if test -z "$ac_err"; then
1279   rm -rf conftest*
1280   eval "ac_cv_header_$ac_safe=yes"
1281 else
1282   echo "$ac_err" >&5
1283   echo "configure: failed program was:" >&5
1284   cat conftest.$ac_ext >&5
1285   rm -rf conftest*
1286   eval "ac_cv_header_$ac_safe=no"
1287 fi
1288 rm -f conftest*
1289 fi
1290 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1291   echo "$ac_t""yes" 1>&6
1292     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1293   cat >> confdefs.h <<EOF
1294 #define $ac_tr_hdr 1
1295 EOF
1296  
1297 else
1298   echo "$ac_t""no" 1>&6
1299 fi
1300 done
1301
1302
1303 if test -z "$enable_langinfo"; then
1304 enable_langinfo=yes
1305 fi
1306 # Check whether --enable-langinfo or --disable-langinfo was given.
1307 if test "${enable_langinfo+set}" = set; then
1308   enableval="$enable_langinfo"
1309   
1310         if test "$enable_langinfo" = yes; then 
1311         ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
1312 echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
1313 echo "configure:1314: checking for langinfo.h" >&5
1314 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1315   echo $ac_n "(cached) $ac_c" 1>&6
1316 else
1317   cat > conftest.$ac_ext <<EOF
1318 #line 1319 "configure"
1319 #include "confdefs.h"
1320 #include <langinfo.h>
1321 EOF
1322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1323 { (eval echo configure:1324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1325 if test -z "$ac_err"; then
1326   rm -rf conftest*
1327   eval "ac_cv_header_$ac_safe=yes"
1328 else
1329   echo "$ac_err" >&5
1330   echo "configure: failed program was:" >&5
1331   cat conftest.$ac_ext >&5
1332   rm -rf conftest*
1333   eval "ac_cv_header_$ac_safe=no"
1334 fi
1335 rm -f conftest*
1336 fi
1337 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1338   echo "$ac_t""yes" 1>&6
1339   
1340  echo $ac_n "checking For nl_langinfo(CODESET)""... $ac_c" 1>&6
1341 echo "configure:1342: checking For nl_langinfo(CODESET)" >&5
1342 cat > conftest.$ac_ext <<EOF
1343 #line 1344 "configure"
1344 #include "confdefs.h"
1345 #include <langinfo.h>
1346 int main() {
1347 nl_langinfo(CODESET);
1348 ; return 0; }
1349 EOF
1350 if { (eval echo configure:1351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1351   rm -rf conftest*
1352   
1353                cat >> confdefs.h <<\EOF
1354 #define HAVE_LANGINFO 1
1355 EOF
1356
1357                enable_langinfo=yes
1358                
1359 else
1360   echo "configure: failed program was:" >&5
1361   cat conftest.$ac_ext >&5
1362   rm -rf conftest*
1363   enable_langinfo=no
1364 fi
1365 rm -f conftest*
1366 echo "$ac_t""$enable_langinfo" 1>&6
1367                
1368 else
1369   echo "$ac_t""no" 1>&6
1370 enable_langinfo=no
1371 fi
1372
1373
1374         fi
1375 fi
1376
1377         
1378         
1379 echo $ac_n "checking for working const""... $ac_c" 1>&6
1380 echo "configure:1381: checking for working const" >&5
1381 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1382   echo $ac_n "(cached) $ac_c" 1>&6
1383 else
1384   cat > conftest.$ac_ext <<EOF
1385 #line 1386 "configure"
1386 #include "confdefs.h"
1387
1388 int main() {
1389
1390 /* Ultrix mips cc rejects this.  */
1391 typedef int charset[2]; const charset x;
1392 /* SunOS 4.1.1 cc rejects this.  */
1393 char const *const *ccp;
1394 char **p;
1395 /* NEC SVR4.0.2 mips cc rejects this.  */
1396 struct point {int x, y;};
1397 static struct point const zero = {0,0};
1398 /* AIX XL C 1.02.0.0 rejects this.
1399    It does not let you subtract one const X* pointer from another in an arm
1400    of an if-expression whose if-part is not a constant expression */
1401 const char *g = "string";
1402 ccp = &g + (g ? g-g : 0);
1403 /* HPUX 7.0 cc rejects these. */
1404 ++ccp;
1405 p = (char**) ccp;
1406 ccp = (char const *const *) p;
1407 { /* SCO 3.2v4 cc rejects this.  */
1408   char *t;
1409   char const *s = 0 ? (char *) 0 : (char const *) 0;
1410
1411   *t++ = 0;
1412 }
1413 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1414   int x[] = {25, 17};
1415   const int *foo = &x[0];
1416   ++foo;
1417 }
1418 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1419   typedef const int *iptr;
1420   iptr p = 0;
1421   ++p;
1422 }
1423 { /* AIX XL C 1.02.0.0 rejects this saying
1424      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1425   struct s { int j; const int *ap[3]; };
1426   struct s *b; b->j = 5;
1427 }
1428 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1429   const int foo = 10;
1430 }
1431
1432 ; return 0; }
1433 EOF
1434 if { (eval echo configure:1435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1435   rm -rf conftest*
1436   ac_cv_c_const=yes
1437 else
1438   echo "configure: failed program was:" >&5
1439   cat conftest.$ac_ext >&5
1440   rm -rf conftest*
1441   ac_cv_c_const=no
1442 fi
1443 rm -f conftest*
1444 fi
1445
1446 echo "$ac_t""$ac_cv_c_const" 1>&6
1447 if test $ac_cv_c_const = no; then
1448   cat >> confdefs.h <<\EOF
1449 #define const 
1450 EOF
1451
1452 fi
1453
1454
1455 echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
1456 echo "configure:1457: checking whether setvbuf arguments are reversed" >&5
1457 if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
1458   echo $ac_n "(cached) $ac_c" 1>&6
1459 else
1460   if test "$cross_compiling" = yes; then
1461     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1462 else
1463   cat > conftest.$ac_ext <<EOF
1464 #line 1465 "configure"
1465 #include "confdefs.h"
1466 #include <stdio.h>
1467 /* If setvbuf has the reversed format, exit 0. */
1468 main () {
1469   /* This call has the arguments reversed.
1470      A reversed system may check and see that the address of main
1471      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
1472   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
1473     exit(1);
1474   putc('\r', stdout);
1475   exit(0);                      /* Non-reversed systems segv here.  */
1476 }
1477 EOF
1478 if { (eval echo configure:1479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1479 then
1480   ac_cv_func_setvbuf_reversed=yes
1481 else
1482   echo "configure: failed program was:" >&5
1483   cat conftest.$ac_ext >&5
1484   rm -fr conftest*
1485   ac_cv_func_setvbuf_reversed=no
1486 fi
1487 rm -fr conftest*
1488 fi
1489
1490 rm -f core core.* *.core
1491 fi
1492
1493 echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6
1494 if test $ac_cv_func_setvbuf_reversed = yes; then
1495   cat >> confdefs.h <<\EOF
1496 #define SETVBUF_REVERSED 1
1497 EOF
1498
1499 fi
1500
1501
1502 if test "$GCC" = "yes"; then
1503         CFLAGS="-g -O2 -Wall"
1504 fi
1505
1506 cat >> confdefs.h <<EOF
1507 #define SOURCE_CHARSET "$sourcecharset"
1508 EOF
1509
1510 cat >> confdefs.h <<EOF
1511 #define TARGET_CHARSET "$targetcharset"
1512 EOF
1513
1514 cat >> confdefs.h <<EOF
1515 #define SPEC_EXT "$specsuffix"
1516 EOF
1517
1518 cat >> confdefs.h <<EOF
1519 #define REPL_EXT "$replsuffix"
1520 EOF
1521
1522 cat >> confdefs.h <<EOF
1523 #define UNKNOWN_CHAR "?"
1524 EOF
1525
1526 for ac_func in strdup strtol
1527 do
1528 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1529 echo "configure:1530: checking for $ac_func" >&5
1530 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1531   echo $ac_n "(cached) $ac_c" 1>&6
1532 else
1533   cat > conftest.$ac_ext <<EOF
1534 #line 1535 "configure"
1535 #include "confdefs.h"
1536 /* System header to define __stub macros and hopefully few prototypes,
1537     which can conflict with char $ac_func(); below.  */
1538 #include <assert.h>
1539 /* Override any gcc2 internal prototype to avoid an error.  */
1540 /* We use char because int might match the return type of a gcc2
1541     builtin and then its argument prototype would still apply.  */
1542 char $ac_func();
1543
1544 int main() {
1545
1546 /* The GNU C library defines this for functions which it implements
1547     to always fail with ENOSYS.  Some functions are actually named
1548     something starting with __ and the normal name is an alias.  */
1549 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1550 choke me
1551 #else
1552 $ac_func();
1553 #endif
1554
1555 ; return 0; }
1556 EOF
1557 if { (eval echo configure:1558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1558   rm -rf conftest*
1559   eval "ac_cv_func_$ac_func=yes"
1560 else
1561   echo "configure: failed program was:" >&5
1562   cat conftest.$ac_ext >&5
1563   rm -rf conftest*
1564   eval "ac_cv_func_$ac_func=no"
1565 fi
1566 rm -f conftest*
1567 fi
1568
1569 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1570   echo "$ac_t""yes" 1>&6
1571     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1572   cat >> confdefs.h <<EOF
1573 #define $ac_tr_func 1
1574 EOF
1575  
1576 else
1577   echo "$ac_t""no" 1>&6
1578 fi
1579 done
1580
1581 for ac_func in strftime
1582 do
1583 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1584 echo "configure:1585: checking for $ac_func" >&5
1585 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1586   echo $ac_n "(cached) $ac_c" 1>&6
1587 else
1588   cat > conftest.$ac_ext <<EOF
1589 #line 1590 "configure"
1590 #include "confdefs.h"
1591 /* System header to define __stub macros and hopefully few prototypes,
1592     which can conflict with char $ac_func(); below.  */
1593 #include <assert.h>
1594 /* Override any gcc2 internal prototype to avoid an error.  */
1595 /* We use char because int might match the return type of a gcc2
1596     builtin and then its argument prototype would still apply.  */
1597 char $ac_func();
1598
1599 int main() {
1600
1601 /* The GNU C library defines this for functions which it implements
1602     to always fail with ENOSYS.  Some functions are actually named
1603     something starting with __ and the normal name is an alias.  */
1604 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1605 choke me
1606 #else
1607 $ac_func();
1608 #endif
1609
1610 ; return 0; }
1611 EOF
1612 if { (eval echo configure:1613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1613   rm -rf conftest*
1614   eval "ac_cv_func_$ac_func=yes"
1615 else
1616   echo "configure: failed program was:" >&5
1617   cat conftest.$ac_ext >&5
1618   rm -rf conftest*
1619   eval "ac_cv_func_$ac_func=no"
1620 fi
1621 rm -f conftest*
1622 fi
1623
1624 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1625   echo "$ac_t""yes" 1>&6
1626     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1627   cat >> confdefs.h <<EOF
1628 #define $ac_tr_func 1
1629 EOF
1630  
1631 else
1632   echo "$ac_t""no" 1>&6
1633 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
1634 fi
1635 done
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652 trap '' 1 2 15
1653 cat > confcache <<\EOF
1654 # This file is a shell script that caches the results of configure
1655 # tests run on this system so they can be shared between configure
1656 # scripts and configure runs.  It is not useful on other systems.
1657 # If it contains results you don't want to keep, you may remove or edit it.
1658 #
1659 # By default, configure uses ./config.cache as the cache file,
1660 # creating it if it does not exist already.  You can give configure
1661 # the --cache-file=FILE option to use a different cache file; that is
1662 # what configure does when it calls configure scripts in
1663 # subdirectories, so they share the cache.
1664 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1665 # config.status only pays attention to the cache file if you give it the
1666 # --recheck option to rerun configure.
1667 #
1668 EOF
1669 # The following way of writing the cache mishandles newlines in values,
1670 # but we know of no workaround that is simple, portable, and efficient.
1671 # So, don't put newlines in cache variables' values.
1672 # Ultrix sh set writes to stderr and can't be redirected directly,
1673 # and sets the high bit in the cache file unless we assign to the vars.
1674 (set) 2>&1 |
1675   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1676   *ac_space=\ *)
1677     # `set' does not quote correctly, so add quotes (double-quote substitution
1678     # turns \\\\ into \\, and sed turns \\ into \).
1679     sed -n \
1680       -e "s/'/'\\\\''/g" \
1681       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1682     ;;
1683   *)
1684     # `set' quotes correctly as required by POSIX, so do not add quotes.
1685     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1686     ;;
1687   esac >> confcache
1688 if cmp -s $cache_file confcache; then
1689   :
1690 else
1691   if test -w $cache_file; then
1692     echo "updating cache $cache_file"
1693     cat confcache > $cache_file
1694   else
1695     echo "not updating unwritable cache $cache_file"
1696   fi
1697 fi
1698 rm -f confcache
1699
1700 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1701
1702 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1703 # Let make expand exec_prefix.
1704 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1705
1706 # Any assignment to VPATH causes Sun make to only execute
1707 # the first set of double-colon rules, so remove it if not needed.
1708 # If there is a colon in the path, we need to keep it.
1709 if test "x$srcdir" = x.; then
1710   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1711 fi
1712
1713 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1714
1715 DEFS=-DHAVE_CONFIG_H
1716
1717 # Without the "./", some shells look in PATH for config.status.
1718 : ${CONFIG_STATUS=./config.status}
1719
1720 echo creating $CONFIG_STATUS
1721 rm -f $CONFIG_STATUS
1722 cat > $CONFIG_STATUS <<EOF
1723 #! /bin/sh
1724 # Generated automatically by configure.
1725 # Run this file to recreate the current configuration.
1726 # This directory was configured as follows,
1727 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1728 #
1729 # $0 $ac_configure_args
1730 #
1731 # Compiler output produced by configure, useful for debugging
1732 # configure, is in ./config.log if it exists.
1733
1734 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1735 for ac_option
1736 do
1737   case "\$ac_option" in
1738   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1739     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1740     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1741   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1742     echo "$CONFIG_STATUS generated by autoconf version 2.13"
1743     exit 0 ;;
1744   -help | --help | --hel | --he | --h)
1745     echo "\$ac_cs_usage"; exit 0 ;;
1746   *) echo "\$ac_cs_usage"; exit 1 ;;
1747   esac
1748 done
1749
1750 ac_given_srcdir=$srcdir
1751 ac_given_INSTALL="$INSTALL"
1752
1753 trap 'rm -fr `echo "doc/Makefile charsets/Makefile src/Makefile Makefile doc/catdoc.1 doc/xls2csv.1 doc/wordview.1 doc/catppt.1 src/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1754 EOF
1755 cat >> $CONFIG_STATUS <<EOF
1756
1757 # Protect against being on the right side of a sed subst in config.status.
1758 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1759  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1760 $ac_vpsub
1761 $extrasub
1762 s%@SHELL@%$SHELL%g
1763 s%@CFLAGS@%$CFLAGS%g
1764 s%@CPPFLAGS@%$CPPFLAGS%g
1765 s%@CXXFLAGS@%$CXXFLAGS%g
1766 s%@FFLAGS@%$FFLAGS%g
1767 s%@DEFS@%$DEFS%g
1768 s%@LDFLAGS@%$LDFLAGS%g
1769 s%@LIBS@%$LIBS%g
1770 s%@exec_prefix@%$exec_prefix%g
1771 s%@prefix@%$prefix%g
1772 s%@program_transform_name@%$program_transform_name%g
1773 s%@bindir@%$bindir%g
1774 s%@sbindir@%$sbindir%g
1775 s%@libexecdir@%$libexecdir%g
1776 s%@datadir@%$datadir%g
1777 s%@sysconfdir@%$sysconfdir%g
1778 s%@sharedstatedir@%$sharedstatedir%g
1779 s%@localstatedir@%$localstatedir%g
1780 s%@libdir@%$libdir%g
1781 s%@includedir@%$includedir%g
1782 s%@oldincludedir@%$oldincludedir%g
1783 s%@infodir@%$infodir%g
1784 s%@mandir@%$mandir%g
1785 s%@CC@%$CC%g
1786 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1787 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
1788 s%@INSTALL_DATA@%$INSTALL_DATA%g
1789 s%@WISH@%$WISH%g
1790 s%@CPP@%$CPP%g
1791 s%@LIBOBJS@%$LIBOBJS%g
1792 s%@specsuffix@%$specsuffix%g
1793 s%@replsuffix@%$replsuffix%g
1794 s%@buildtargets@%$buildtargets%g
1795 s%@installtargets@%$installtargets%g
1796 s%@targetcharset@%$targetcharset%g
1797 s%@sourcecharset@%$sourcecharset%g
1798 s%@man1dir@%$man1dir%g
1799 s%@manext@%$manext%g
1800 s%@charsetcheck@%$charsetcheck%g
1801 s%@installroot@%$installroot%g
1802 s%@catdoc_version@%$catdoc_version%g
1803 s%@WORDS_BIGENDIAN DEFS@%$WORDS_BIGENDIAN DEFS%g
1804
1805 CEOF
1806 EOF
1807
1808 cat >> $CONFIG_STATUS <<\EOF
1809
1810 # Split the substitutions into bite-sized pieces for seds with
1811 # small command number limits, like on Digital OSF/1 and HP-UX.
1812 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1813 ac_file=1 # Number of current file.
1814 ac_beg=1 # First line for current file.
1815 ac_end=$ac_max_sed_cmds # Line after last line for current file.
1816 ac_more_lines=:
1817 ac_sed_cmds=""
1818 while $ac_more_lines; do
1819   if test $ac_beg -gt 1; then
1820     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1821   else
1822     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1823   fi
1824   if test ! -s conftest.s$ac_file; then
1825     ac_more_lines=false
1826     rm -f conftest.s$ac_file
1827   else
1828     if test -z "$ac_sed_cmds"; then
1829       ac_sed_cmds="sed -f conftest.s$ac_file"
1830     else
1831       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1832     fi
1833     ac_file=`expr $ac_file + 1`
1834     ac_beg=$ac_end
1835     ac_end=`expr $ac_end + $ac_max_sed_cmds`
1836   fi
1837 done
1838 if test -z "$ac_sed_cmds"; then
1839   ac_sed_cmds=cat
1840 fi
1841 EOF
1842
1843 cat >> $CONFIG_STATUS <<EOF
1844
1845 CONFIG_FILES=\${CONFIG_FILES-"doc/Makefile charsets/Makefile src/Makefile Makefile doc/catdoc.1 doc/xls2csv.1 doc/wordview.1 doc/catppt.1"}
1846 EOF
1847 cat >> $CONFIG_STATUS <<\EOF
1848 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1849   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1850   case "$ac_file" in
1851   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1852        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1853   *) ac_file_in="${ac_file}.in" ;;
1854   esac
1855
1856   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1857
1858   # Remove last slash and all that follows it.  Not all systems have dirname.
1859   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1860   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1861     # The file is in a subdirectory.
1862     test ! -d "$ac_dir" && mkdir "$ac_dir"
1863     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1864     # A "../" for each directory in $ac_dir_suffix.
1865     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1866   else
1867     ac_dir_suffix= ac_dots=
1868   fi
1869
1870   case "$ac_given_srcdir" in
1871   .)  srcdir=.
1872       if test -z "$ac_dots"; then top_srcdir=.
1873       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1874   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1875   *) # Relative path.
1876     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1877     top_srcdir="$ac_dots$ac_given_srcdir" ;;
1878   esac
1879
1880   case "$ac_given_INSTALL" in
1881   [/$]*) INSTALL="$ac_given_INSTALL" ;;
1882   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1883   esac
1884
1885   echo creating "$ac_file"
1886   rm -f "$ac_file"
1887   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1888   case "$ac_file" in
1889   *Makefile*) ac_comsub="1i\\
1890 # $configure_input" ;;
1891   *) ac_comsub= ;;
1892   esac
1893
1894   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1895   sed -e "$ac_comsub
1896 s%@configure_input@%$configure_input%g
1897 s%@srcdir@%$srcdir%g
1898 s%@top_srcdir@%$top_srcdir%g
1899 s%@INSTALL@%$INSTALL%g
1900 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1901 fi; done
1902 rm -f conftest.s*
1903
1904 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1905 # NAME is the cpp macro being defined and VALUE is the value it is being given.
1906 #
1907 # ac_d sets the value in "#define NAME VALUE" lines.
1908 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
1909 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
1910 ac_dC='\3'
1911 ac_dD='%g'
1912 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1913 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1914 ac_uB='\([      ]\)%\1#\2define\3'
1915 ac_uC=' '
1916 ac_uD='\4%g'
1917 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1918 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1919 ac_eB='$%\1#\2define\3'
1920 ac_eC=' '
1921 ac_eD='%g'
1922
1923 if test "${CONFIG_HEADERS+set}" != set; then
1924 EOF
1925 cat >> $CONFIG_STATUS <<EOF
1926   CONFIG_HEADERS="src/config.h"
1927 EOF
1928 cat >> $CONFIG_STATUS <<\EOF
1929 fi
1930 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
1931   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1932   case "$ac_file" in
1933   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1934        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1935   *) ac_file_in="${ac_file}.in" ;;
1936   esac
1937
1938   echo creating $ac_file
1939
1940   rm -f conftest.frag conftest.in conftest.out
1941   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1942   cat $ac_file_inputs > conftest.in
1943
1944 EOF
1945
1946 # Transform confdefs.h into a sed script conftest.vals that substitutes
1947 # the proper values into config.h.in to produce config.h.  And first:
1948 # Protect against being on the right side of a sed subst in config.status.
1949 # Protect against being in an unquoted here document in config.status.
1950 rm -f conftest.vals
1951 cat > conftest.hdr <<\EOF
1952 s/[\\&%]/\\&/g
1953 s%[\\$`]%\\&%g
1954 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
1955 s%ac_d%ac_u%gp
1956 s%ac_u%ac_e%gp
1957 EOF
1958 sed -n -f conftest.hdr confdefs.h > conftest.vals
1959 rm -f conftest.hdr
1960
1961 # This sed command replaces #undef with comments.  This is necessary, for
1962 # example, in the case of _POSIX_SOURCE, which is predefined and required
1963 # on some systems where configure will not decide to define it.
1964 cat >> conftest.vals <<\EOF
1965 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
1966 EOF
1967
1968 # Break up conftest.vals because some shells have a limit on
1969 # the size of here documents, and old seds have small limits too.
1970
1971 rm -f conftest.tail
1972 while :
1973 do
1974   ac_lines=`grep -c . conftest.vals`
1975   # grep -c gives empty output for an empty file on some AIX systems.
1976   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
1977   # Write a limited-size here document to conftest.frag.
1978   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
1979   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1980   echo 'CEOF
1981   sed -f conftest.frag conftest.in > conftest.out
1982   rm -f conftest.in
1983   mv conftest.out conftest.in
1984 ' >> $CONFIG_STATUS
1985   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
1986   rm -f conftest.vals
1987   mv conftest.tail conftest.vals
1988 done
1989 rm -f conftest.vals
1990
1991 cat >> $CONFIG_STATUS <<\EOF
1992   rm -f conftest.frag conftest.h
1993   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
1994   cat conftest.in >> conftest.h
1995   rm -f conftest.in
1996   if cmp -s $ac_file conftest.h 2>/dev/null; then
1997     echo "$ac_file is unchanged"
1998     rm -f conftest.h
1999   else
2000     # Remove last slash and all that follows it.  Not all systems have dirname.
2001       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2002       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2003       # The file is in a subdirectory.
2004       test ! -d "$ac_dir" && mkdir "$ac_dir"
2005     fi
2006     rm -f $ac_file
2007     mv conftest.h $ac_file
2008   fi
2009 fi; done
2010
2011 EOF
2012 cat >> $CONFIG_STATUS <<EOF
2013
2014 EOF
2015 cat >> $CONFIG_STATUS <<\EOF
2016
2017 exit 0
2018 EOF
2019 chmod +x $CONFIG_STATUS
2020 rm -fr confdefs* $ac_clean_files
2021 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2022