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