More verbose change log for enhanced GnuPG key selection support.
[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=cvs4
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 #
1382 # the following will cause an existing older ltconfig to fail, so
1383 # we ignore this at the expense of the cache file... Checking this 
1384 # will just take longer ... bummer!
1385 #libtool_flags="--cache-file=$cache_file"
1386 #
1387 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1388 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1389 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1390 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1391 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1392
1393
1394 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1395 if test "${enable_libtool_lock+set}" = set; then
1396   enableval="$enable_libtool_lock"
1397   :
1398 fi
1399
1400 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1401 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1402
1403 # Some flags need to be propagated to the compiler or linker for good
1404 # libtool support.
1405 case "$lt_target" in
1406 *-*-irix6*)
1407   # Find out which ABI we are using.
1408   echo '#line 1409 "configure"' > conftest.$ac_ext
1409   if { (eval echo configure:1410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1410     case "`/usr/bin/file conftest.o`" in
1411     *32-bit*)
1412       LD="${LD-ld} -32"
1413       ;;
1414     *N32*)
1415       LD="${LD-ld} -n32"
1416       ;;
1417     *64-bit*)
1418       LD="${LD-ld} -64"
1419       ;;
1420     esac
1421   fi
1422   rm -rf conftest*
1423   ;;
1424
1425 *-*-sco3.2v5*)
1426   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1427   SAVE_CFLAGS="$CFLAGS"
1428   CFLAGS="$CFLAGS -belf"
1429   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1430 echo "configure:1431: checking whether the C compiler needs -belf" >&5
1431 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1432   echo $ac_n "(cached) $ac_c" 1>&6
1433 else
1434   cat > conftest.$ac_ext <<EOF
1435 #line 1436 "configure"
1436 #include "confdefs.h"
1437
1438 int main() {
1439
1440 ; return 0; }
1441 EOF
1442 if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1443   rm -rf conftest*
1444   lt_cv_cc_needs_belf=yes
1445 else
1446   echo "configure: failed program was:" >&5
1447   cat conftest.$ac_ext >&5
1448   rm -rf conftest*
1449   lt_cv_cc_needs_belf=no
1450 fi
1451 rm -f conftest*
1452 fi
1453
1454 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1455   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1456     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1457     CFLAGS="$SAVE_CFLAGS"
1458   fi
1459   ;;
1460
1461
1462 esac
1463
1464
1465 # Save cache, so that ltconfig can load it
1466 cat > confcache <<\EOF
1467 # This file is a shell script that caches the results of configure
1468 # tests run on this system so they can be shared between configure
1469 # scripts and configure runs.  It is not useful on other systems.
1470 # If it contains results you don't want to keep, you may remove or edit it.
1471 #
1472 # By default, configure uses ./config.cache as the cache file,
1473 # creating it if it does not exist already.  You can give configure
1474 # the --cache-file=FILE option to use a different cache file; that is
1475 # what configure does when it calls configure scripts in
1476 # subdirectories, so they share the cache.
1477 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1478 # config.status only pays attention to the cache file if you give it the
1479 # --recheck option to rerun configure.
1480 #
1481 EOF
1482 # The following way of writing the cache mishandles newlines in values,
1483 # but we know of no workaround that is simple, portable, and efficient.
1484 # So, don't put newlines in cache variables' values.
1485 # Ultrix sh set writes to stderr and can't be redirected directly,
1486 # and sets the high bit in the cache file unless we assign to the vars.
1487 (set) 2>&1 |
1488   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1489   *ac_space=\ *)
1490     # `set' does not quote correctly, so add quotes (double-quote substitution
1491     # turns \\\\ into \\, and sed turns \\ into \).
1492     sed -n \
1493       -e "s/'/'\\\\''/g" \
1494       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1495     ;;
1496   *)
1497     # `set' quotes correctly as required by POSIX, so do not add quotes.
1498     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1499     ;;
1500   esac >> confcache
1501 if cmp -s $cache_file confcache; then
1502   :
1503 else
1504   if test -w $cache_file; then
1505     echo "updating cache $cache_file"
1506     cat confcache > $cache_file
1507   else
1508     echo "not updating unwritable cache $cache_file"
1509   fi
1510 fi
1511 rm -f confcache
1512
1513
1514 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1515 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1516 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1517 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1518 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1519 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1520 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
1521 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1522
1523 # Reload cache, that may have been modified by ltconfig
1524 if test -r "$cache_file"; then
1525   echo "loading cache $cache_file"
1526   . $cache_file
1527 else
1528   echo "creating cache $cache_file"
1529   > $cache_file
1530 fi
1531
1532
1533 # This can be used to rebuild libtool when needed
1534 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1535
1536 # Always use our own libtool.
1537 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1538
1539 # Redirect the config.log output again, so that the ltconfig log is not
1540 # clobbered by the next message.
1541 exec 5>>./config.log
1542
1543 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1544 echo "configure:1545: checking whether to enable maintainer-specific portions of Makefiles" >&5
1545     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1546 if test "${enable_maintainer_mode+set}" = set; then
1547   enableval="$enable_maintainer_mode"
1548   USE_MAINTAINER_MODE=$enableval
1549 else
1550   USE_MAINTAINER_MODE=no
1551 fi
1552
1553   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1554   
1555
1556 if test $USE_MAINTAINER_MODE = yes; then
1557   MAINTAINER_MODE_TRUE=
1558   MAINTAINER_MODE_FALSE='#'
1559 else
1560   MAINTAINER_MODE_TRUE='#'
1561   MAINTAINER_MODE_FALSE=
1562 fi
1563   MAINT=$MAINTAINER_MODE_TRUE
1564   
1565
1566
1567 if test "$program_transform_name" = s,x,x,; then
1568   program_transform_name=
1569 else
1570   # Double any \ or $.  echo might interpret backslashes.
1571   cat <<\EOF_SED > conftestsed
1572 s,\\,\\\\,g; s,\$,$$,g
1573 EOF_SED
1574   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1575   rm -f conftestsed
1576 fi
1577 test "$program_prefix" != NONE &&
1578   program_transform_name="s,^,${program_prefix},; $program_transform_name"
1579 # Use a double $ so make ignores it.
1580 test "$program_suffix" != NONE &&
1581   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1582
1583 # sed with no file args requires a program.
1584 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1585
1586 # Extract the first word of "gcc", so it can be a program name with args.
1587 set dummy gcc; ac_word=$2
1588 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1589 echo "configure:1590: checking for $ac_word" >&5
1590 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1591   echo $ac_n "(cached) $ac_c" 1>&6
1592 else
1593   if test -n "$CC"; then
1594   ac_cv_prog_CC="$CC" # Let the user override the test.
1595 else
1596   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1597   ac_dummy="$PATH"
1598   for ac_dir in $ac_dummy; do
1599     test -z "$ac_dir" && ac_dir=.
1600     if test -f $ac_dir/$ac_word; then
1601       ac_cv_prog_CC="gcc"
1602       break
1603     fi
1604   done
1605   IFS="$ac_save_ifs"
1606 fi
1607 fi
1608 CC="$ac_cv_prog_CC"
1609 if test -n "$CC"; then
1610   echo "$ac_t""$CC" 1>&6
1611 else
1612   echo "$ac_t""no" 1>&6
1613 fi
1614
1615 if test -z "$CC"; then
1616   # Extract the first word of "cc", so it can be a program name with args.
1617 set dummy cc; ac_word=$2
1618 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1619 echo "configure:1620: checking for $ac_word" >&5
1620 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1621   echo $ac_n "(cached) $ac_c" 1>&6
1622 else
1623   if test -n "$CC"; then
1624   ac_cv_prog_CC="$CC" # Let the user override the test.
1625 else
1626   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1627   ac_prog_rejected=no
1628   ac_dummy="$PATH"
1629   for ac_dir in $ac_dummy; do
1630     test -z "$ac_dir" && ac_dir=.
1631     if test -f $ac_dir/$ac_word; then
1632       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1633         ac_prog_rejected=yes
1634         continue
1635       fi
1636       ac_cv_prog_CC="cc"
1637       break
1638     fi
1639   done
1640   IFS="$ac_save_ifs"
1641 if test $ac_prog_rejected = yes; then
1642   # We found a bogon in the path, so make sure we never use it.
1643   set dummy $ac_cv_prog_CC
1644   shift
1645   if test $# -gt 0; then
1646     # We chose a different compiler from the bogus one.
1647     # However, it has the same basename, so the bogon will be chosen
1648     # first if we set CC to just the basename; use the full file name.
1649     shift
1650     set dummy "$ac_dir/$ac_word" "$@"
1651     shift
1652     ac_cv_prog_CC="$@"
1653   fi
1654 fi
1655 fi
1656 fi
1657 CC="$ac_cv_prog_CC"
1658 if test -n "$CC"; then
1659   echo "$ac_t""$CC" 1>&6
1660 else
1661   echo "$ac_t""no" 1>&6
1662 fi
1663
1664   if test -z "$CC"; then
1665     case "`uname -s`" in
1666     *win32* | *WIN32*)
1667       # Extract the first word of "cl", so it can be a program name with args.
1668 set dummy cl; ac_word=$2
1669 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1670 echo "configure:1671: checking for $ac_word" >&5
1671 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1672   echo $ac_n "(cached) $ac_c" 1>&6
1673 else
1674   if test -n "$CC"; then
1675   ac_cv_prog_CC="$CC" # Let the user override the test.
1676 else
1677   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1678   ac_dummy="$PATH"
1679   for ac_dir in $ac_dummy; do
1680     test -z "$ac_dir" && ac_dir=.
1681     if test -f $ac_dir/$ac_word; then
1682       ac_cv_prog_CC="cl"
1683       break
1684     fi
1685   done
1686   IFS="$ac_save_ifs"
1687 fi
1688 fi
1689 CC="$ac_cv_prog_CC"
1690 if test -n "$CC"; then
1691   echo "$ac_t""$CC" 1>&6
1692 else
1693   echo "$ac_t""no" 1>&6
1694 fi
1695  ;;
1696     esac
1697   fi
1698   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1699 fi
1700
1701 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1702 echo "configure:1703: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1703
1704 ac_ext=c
1705 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1706 ac_cpp='$CPP $CPPFLAGS'
1707 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1708 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1709 cross_compiling=$ac_cv_prog_cc_cross
1710
1711 cat > conftest.$ac_ext << EOF
1712
1713 #line 1714 "configure"
1714 #include "confdefs.h"
1715
1716 main(){return(0);}
1717 EOF
1718 if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1719   ac_cv_prog_cc_works=yes
1720   # If we can't run a trivial program, we are probably using a cross compiler.
1721   if (./conftest; exit) 2>/dev/null; then
1722     ac_cv_prog_cc_cross=no
1723   else
1724     ac_cv_prog_cc_cross=yes
1725   fi
1726 else
1727   echo "configure: failed program was:" >&5
1728   cat conftest.$ac_ext >&5
1729   ac_cv_prog_cc_works=no
1730 fi
1731 rm -fr conftest*
1732 ac_ext=c
1733 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1734 ac_cpp='$CPP $CPPFLAGS'
1735 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1736 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1737 cross_compiling=$ac_cv_prog_cc_cross
1738
1739 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1740 if test $ac_cv_prog_cc_works = no; then
1741   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1742 fi
1743 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1744 echo "configure:1745: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1745 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1746 cross_compiling=$ac_cv_prog_cc_cross
1747
1748 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1749 echo "configure:1750: checking whether we are using GNU C" >&5
1750 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1751   echo $ac_n "(cached) $ac_c" 1>&6
1752 else
1753   cat > conftest.c <<EOF
1754 #ifdef __GNUC__
1755   yes;
1756 #endif
1757 EOF
1758 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1759   ac_cv_prog_gcc=yes
1760 else
1761   ac_cv_prog_gcc=no
1762 fi
1763 fi
1764
1765 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1766
1767 if test $ac_cv_prog_gcc = yes; then
1768   GCC=yes
1769 else
1770   GCC=
1771 fi
1772
1773 ac_test_CFLAGS="${CFLAGS+set}"
1774 ac_save_CFLAGS="$CFLAGS"
1775 CFLAGS=
1776 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1777 echo "configure:1778: checking whether ${CC-cc} accepts -g" >&5
1778 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1779   echo $ac_n "(cached) $ac_c" 1>&6
1780 else
1781   echo 'void f(){}' > conftest.c
1782 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1783   ac_cv_prog_cc_g=yes
1784 else
1785   ac_cv_prog_cc_g=no
1786 fi
1787 rm -f conftest*
1788
1789 fi
1790
1791 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1792 if test "$ac_test_CFLAGS" = set; then
1793   CFLAGS="$ac_save_CFLAGS"
1794 elif test $ac_cv_prog_cc_g = yes; then
1795   if test "$GCC" = yes; then
1796     CFLAGS="-g -O2"
1797   else
1798     CFLAGS="-g"
1799   fi
1800 else
1801   if test "$GCC" = yes; then
1802     CFLAGS="-O2"
1803   else
1804     CFLAGS=
1805   fi
1806 fi
1807
1808 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1809 echo "configure:1810: checking for POSIXized ISC" >&5
1810 if test -d /etc/conf/kconfig.d &&
1811   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1812 then
1813   echo "$ac_t""yes" 1>&6
1814   ISC=yes # If later tests want to check for ISC.
1815   cat >> confdefs.h <<\EOF
1816 #define _POSIX_SOURCE 1
1817 EOF
1818
1819   if test "$GCC" = yes; then
1820     CC="$CC -posix"
1821   else
1822     CC="$CC -Xp"
1823   fi
1824 else
1825   echo "$ac_t""no" 1>&6
1826   ISC=
1827 fi
1828
1829
1830
1831
1832 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1833 echo "configure:1834: checking for ${CC-cc} option to accept ANSI C" >&5
1834 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
1835   echo $ac_n "(cached) $ac_c" 1>&6
1836 else
1837   am_cv_prog_cc_stdc=no
1838 ac_save_CC="$CC"
1839 # Don't try gcc -ansi; that turns off useful extensions and
1840 # breaks some systems' header files.
1841 # AIX                   -qlanglvl=ansi
1842 # Ultrix and OSF/1      -std1
1843 # HP-UX                 -Aa -D_HPUX_SOURCE
1844 # SVR4                  -Xc -D__EXTENSIONS__
1845 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1846 do
1847   CC="$ac_save_CC $ac_arg"
1848   cat > conftest.$ac_ext <<EOF
1849 #line 1850 "configure"
1850 #include "confdefs.h"
1851 #include <stdarg.h>
1852 #include <stdio.h>
1853 #include <sys/types.h>
1854 #include <sys/stat.h>
1855 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1856 struct buf { int x; };
1857 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1858 static char *e (p, i)
1859      char **p;
1860      int i;
1861 {
1862   return p[i];
1863 }
1864 static char *f (char * (*g) (char **, int), char **p, ...)
1865 {
1866   char *s;
1867   va_list v;
1868   va_start (v,p);
1869   s = g (p, va_arg (v,int));
1870   va_end (v);
1871   return s;
1872 }
1873 int test (int i, double x);
1874 struct s1 {int (*f) (int a);};
1875 struct s2 {int (*f) (double a);};
1876 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1877 int argc;
1878 char **argv;
1879
1880 int main() {
1881
1882 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1883
1884 ; return 0; }
1885 EOF
1886 if { (eval echo configure:1887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1887   rm -rf conftest*
1888   am_cv_prog_cc_stdc="$ac_arg"; break
1889 else
1890   echo "configure: failed program was:" >&5
1891   cat conftest.$ac_ext >&5
1892 fi
1893 rm -f conftest*
1894 done
1895 CC="$ac_save_CC"
1896
1897 fi
1898
1899 if test -z "$am_cv_prog_cc_stdc"; then
1900   echo "$ac_t""none needed" 1>&6
1901 else
1902   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1903 fi
1904 case "x$am_cv_prog_cc_stdc" in
1905   x|xno) ;;
1906   *) CC="$CC $am_cv_prog_cc_stdc" ;;
1907 esac
1908
1909 # Find a good install program.  We prefer a C program (faster),
1910 # so one script is as good as another.  But avoid the broken or
1911 # incompatible versions:
1912 # SysV /etc/install, /usr/sbin/install
1913 # SunOS /usr/etc/install
1914 # IRIX /sbin/install
1915 # AIX /bin/install
1916 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1917 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1918 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1919 # ./install, which can be erroneously created by make from ./install.sh.
1920 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1921 echo "configure:1922: checking for a BSD compatible install" >&5
1922 if test -z "$INSTALL"; then
1923 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1924   echo $ac_n "(cached) $ac_c" 1>&6
1925 else
1926     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1927   for ac_dir in $PATH; do
1928     # Account for people who put trailing slashes in PATH elements.
1929     case "$ac_dir/" in
1930     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1931     *)
1932       # OSF1 and SCO ODT 3.0 have their own names for install.
1933       # Don't use installbsd from OSF since it installs stuff as root
1934       # by default.
1935       for ac_prog in ginstall scoinst install; do
1936         if test -f $ac_dir/$ac_prog; then
1937           if test $ac_prog = install &&
1938             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1939             # AIX install.  It has an incompatible calling convention.
1940             :
1941           else
1942             ac_cv_path_install="$ac_dir/$ac_prog -c"
1943             break 2
1944           fi
1945         fi
1946       done
1947       ;;
1948     esac
1949   done
1950   IFS="$ac_save_IFS"
1951
1952 fi
1953   if test "${ac_cv_path_install+set}" = set; then
1954     INSTALL="$ac_cv_path_install"
1955   else
1956     # As a last resort, use the slow shell script.  We don't cache a
1957     # path for INSTALL within a source directory, because that will
1958     # break other packages using the cache if that directory is
1959     # removed, or if the path is relative.
1960     INSTALL="$ac_install_sh"
1961   fi
1962 fi
1963 echo "$ac_t""$INSTALL" 1>&6
1964
1965 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1966 # It thinks the first close brace ends the variable substitution.
1967 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1968
1969 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1970
1971 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1972
1973 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1974 echo "configure:1975: checking whether ln -s works" >&5
1975 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1976   echo $ac_n "(cached) $ac_c" 1>&6
1977 else
1978   rm -f conftestdata
1979 if ln -s X conftestdata 2>/dev/null
1980 then
1981   rm -f conftestdata
1982   ac_cv_prog_LN_S="ln -s"
1983 else
1984   ac_cv_prog_LN_S=ln
1985 fi
1986 fi
1987 LN_S="$ac_cv_prog_LN_S"
1988 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1989   echo "$ac_t""yes" 1>&6
1990 else
1991   echo "$ac_t""no" 1>&6
1992 fi
1993
1994 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1995 echo "configure:1996: checking whether ${MAKE-make} sets \${MAKE}" >&5
1996 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1997 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1998   echo $ac_n "(cached) $ac_c" 1>&6
1999 else
2000   cat > conftestmake <<\EOF
2001 all:
2002         @echo 'ac_maketemp="${MAKE}"'
2003 EOF
2004 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2005 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2006 if test -n "$ac_maketemp"; then
2007   eval ac_cv_prog_make_${ac_make}_set=yes
2008 else
2009   eval ac_cv_prog_make_${ac_make}_set=no
2010 fi
2011 rm -f conftestmake
2012 fi
2013 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2014   echo "$ac_t""yes" 1>&6
2015   SET_MAKE=
2016 else
2017   echo "$ac_t""no" 1>&6
2018   SET_MAKE="MAKE=${MAKE-make}"
2019 fi
2020
2021 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2022 echo "configure:2023: checking how to run the C preprocessor" >&5
2023 # On Suns, sometimes $CPP names a directory.
2024 if test -n "$CPP" && test -d "$CPP"; then
2025   CPP=
2026 fi
2027 if test -z "$CPP"; then
2028 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2029   echo $ac_n "(cached) $ac_c" 1>&6
2030 else
2031     # This must be in double quotes, not single quotes, because CPP may get
2032   # substituted into the Makefile and "${CC-cc}" will confuse make.
2033   CPP="${CC-cc} -E"
2034   # On the NeXT, cc -E runs the code through the compiler's parser,
2035   # not just through cpp.
2036   cat > conftest.$ac_ext <<EOF
2037 #line 2038 "configure"
2038 #include "confdefs.h"
2039 #include <assert.h>
2040 Syntax Error
2041 EOF
2042 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2043 { (eval echo configure:2044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2044 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2045 if test -z "$ac_err"; then
2046   :
2047 else
2048   echo "$ac_err" >&5
2049   echo "configure: failed program was:" >&5
2050   cat conftest.$ac_ext >&5
2051   rm -rf conftest*
2052   CPP="${CC-cc} -E -traditional-cpp"
2053   cat > conftest.$ac_ext <<EOF
2054 #line 2055 "configure"
2055 #include "confdefs.h"
2056 #include <assert.h>
2057 Syntax Error
2058 EOF
2059 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2060 { (eval echo configure:2061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2061 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2062 if test -z "$ac_err"; then
2063   :
2064 else
2065   echo "$ac_err" >&5
2066   echo "configure: failed program was:" >&5
2067   cat conftest.$ac_ext >&5
2068   rm -rf conftest*
2069   CPP="${CC-cc} -nologo -E"
2070   cat > conftest.$ac_ext <<EOF
2071 #line 2072 "configure"
2072 #include "confdefs.h"
2073 #include <assert.h>
2074 Syntax Error
2075 EOF
2076 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2077 { (eval echo configure:2078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2078 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2079 if test -z "$ac_err"; then
2080   :
2081 else
2082   echo "$ac_err" >&5
2083   echo "configure: failed program was:" >&5
2084   cat conftest.$ac_ext >&5
2085   rm -rf conftest*
2086   CPP=/lib/cpp
2087 fi
2088 rm -f conftest*
2089 fi
2090 rm -f conftest*
2091 fi
2092 rm -f conftest*
2093   ac_cv_prog_CPP="$CPP"
2094 fi
2095   CPP="$ac_cv_prog_CPP"
2096 else
2097   ac_cv_prog_CPP="$CPP"
2098 fi
2099 echo "$ac_t""$CPP" 1>&6
2100
2101
2102
2103         test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
2104
2105         for k in ac ; do ACLOCAL="$ACLOCAL -I $k" ; done
2106
2107
2108 ALL_LINGUAS="cs de el es fr it ja ko nl pt_BR ru zh_CN.GB2312 zh_TW.Big5"
2109 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2110 echo "configure:2111: checking for ANSI C header files" >&5
2111 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2112   echo $ac_n "(cached) $ac_c" 1>&6
2113 else
2114   cat > conftest.$ac_ext <<EOF
2115 #line 2116 "configure"
2116 #include "confdefs.h"
2117 #include <stdlib.h>
2118 #include <stdarg.h>
2119 #include <string.h>
2120 #include <float.h>
2121 EOF
2122 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2123 { (eval echo configure:2124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2124 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2125 if test -z "$ac_err"; then
2126   rm -rf conftest*
2127   ac_cv_header_stdc=yes
2128 else
2129   echo "$ac_err" >&5
2130   echo "configure: failed program was:" >&5
2131   cat conftest.$ac_ext >&5
2132   rm -rf conftest*
2133   ac_cv_header_stdc=no
2134 fi
2135 rm -f conftest*
2136
2137 if test $ac_cv_header_stdc = yes; then
2138   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2139 cat > conftest.$ac_ext <<EOF
2140 #line 2141 "configure"
2141 #include "confdefs.h"
2142 #include <string.h>
2143 EOF
2144 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2145   egrep "memchr" >/dev/null 2>&1; then
2146   :
2147 else
2148   rm -rf conftest*
2149   ac_cv_header_stdc=no
2150 fi
2151 rm -f conftest*
2152
2153 fi
2154
2155 if test $ac_cv_header_stdc = yes; then
2156   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2157 cat > conftest.$ac_ext <<EOF
2158 #line 2159 "configure"
2159 #include "confdefs.h"
2160 #include <stdlib.h>
2161 EOF
2162 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2163   egrep "free" >/dev/null 2>&1; then
2164   :
2165 else
2166   rm -rf conftest*
2167   ac_cv_header_stdc=no
2168 fi
2169 rm -f conftest*
2170
2171 fi
2172
2173 if test $ac_cv_header_stdc = yes; then
2174   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2175 if test "$cross_compiling" = yes; then
2176   :
2177 else
2178   cat > conftest.$ac_ext <<EOF
2179 #line 2180 "configure"
2180 #include "confdefs.h"
2181 #include <ctype.h>
2182 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2183 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2184 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2185 int main () { int i; for (i = 0; i < 256; i++)
2186 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2187 exit (0); }
2188
2189 EOF
2190 if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2191 then
2192   :
2193 else
2194   echo "configure: failed program was:" >&5
2195   cat conftest.$ac_ext >&5
2196   rm -fr conftest*
2197   ac_cv_header_stdc=no
2198 fi
2199 rm -fr conftest*
2200 fi
2201
2202 fi
2203 fi
2204
2205 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2206 if test $ac_cv_header_stdc = yes; then
2207   cat >> confdefs.h <<\EOF
2208 #define STDC_HEADERS 1
2209 EOF
2210
2211 fi
2212
2213 echo $ac_n "checking for working const""... $ac_c" 1>&6
2214 echo "configure:2215: checking for working const" >&5
2215 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2216   echo $ac_n "(cached) $ac_c" 1>&6
2217 else
2218   cat > conftest.$ac_ext <<EOF
2219 #line 2220 "configure"
2220 #include "confdefs.h"
2221
2222 int main() {
2223
2224 /* Ultrix mips cc rejects this.  */
2225 typedef int charset[2]; const charset x;
2226 /* SunOS 4.1.1 cc rejects this.  */
2227 char const *const *ccp;
2228 char **p;
2229 /* NEC SVR4.0.2 mips cc rejects this.  */
2230 struct point {int x, y;};
2231 static struct point const zero = {0,0};
2232 /* AIX XL C 1.02.0.0 rejects this.
2233    It does not let you subtract one const X* pointer from another in an arm
2234    of an if-expression whose if-part is not a constant expression */
2235 const char *g = "string";
2236 ccp = &g + (g ? g-g : 0);
2237 /* HPUX 7.0 cc rejects these. */
2238 ++ccp;
2239 p = (char**) ccp;
2240 ccp = (char const *const *) p;
2241 { /* SCO 3.2v4 cc rejects this.  */
2242   char *t;
2243   char const *s = 0 ? (char *) 0 : (char const *) 0;
2244
2245   *t++ = 0;
2246 }
2247 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2248   int x[] = {25, 17};
2249   const int *foo = &x[0];
2250   ++foo;
2251 }
2252 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2253   typedef const int *iptr;
2254   iptr p = 0;
2255   ++p;
2256 }
2257 { /* AIX XL C 1.02.0.0 rejects this saying
2258      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2259   struct s { int j; const int *ap[3]; };
2260   struct s *b; b->j = 5;
2261 }
2262 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2263   const int foo = 10;
2264 }
2265
2266 ; return 0; }
2267 EOF
2268 if { (eval echo configure:2269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2269   rm -rf conftest*
2270   ac_cv_c_const=yes
2271 else
2272   echo "configure: failed program was:" >&5
2273   cat conftest.$ac_ext >&5
2274   rm -rf conftest*
2275   ac_cv_c_const=no
2276 fi
2277 rm -f conftest*
2278 fi
2279
2280 echo "$ac_t""$ac_cv_c_const" 1>&6
2281 if test $ac_cv_c_const = no; then
2282   cat >> confdefs.h <<\EOF
2283 #define const 
2284 EOF
2285
2286 fi
2287
2288 echo $ac_n "checking for inline""... $ac_c" 1>&6
2289 echo "configure:2290: checking for inline" >&5
2290 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2291   echo $ac_n "(cached) $ac_c" 1>&6
2292 else
2293   ac_cv_c_inline=no
2294 for ac_kw in inline __inline__ __inline; do
2295   cat > conftest.$ac_ext <<EOF
2296 #line 2297 "configure"
2297 #include "confdefs.h"
2298
2299 int main() {
2300 } $ac_kw foo() {
2301 ; return 0; }
2302 EOF
2303 if { (eval echo configure:2304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2304   rm -rf conftest*
2305   ac_cv_c_inline=$ac_kw; break
2306 else
2307   echo "configure: failed program was:" >&5
2308   cat conftest.$ac_ext >&5
2309 fi
2310 rm -f conftest*
2311 done
2312
2313 fi
2314
2315 echo "$ac_t""$ac_cv_c_inline" 1>&6
2316 case "$ac_cv_c_inline" in
2317   inline | yes) ;;
2318   no) cat >> confdefs.h <<\EOF
2319 #define inline 
2320 EOF
2321  ;;
2322   *)  cat >> confdefs.h <<EOF
2323 #define inline $ac_cv_c_inline
2324 EOF
2325  ;;
2326 esac
2327
2328 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2329 echo "configure:2330: checking for off_t" >&5
2330 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2331   echo $ac_n "(cached) $ac_c" 1>&6
2332 else
2333   cat > conftest.$ac_ext <<EOF
2334 #line 2335 "configure"
2335 #include "confdefs.h"
2336 #include <sys/types.h>
2337 #if STDC_HEADERS
2338 #include <stdlib.h>
2339 #include <stddef.h>
2340 #endif
2341 EOF
2342 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2343   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2344   rm -rf conftest*
2345   ac_cv_type_off_t=yes
2346 else
2347   rm -rf conftest*
2348   ac_cv_type_off_t=no
2349 fi
2350 rm -f conftest*
2351
2352 fi
2353 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2354 if test $ac_cv_type_off_t = no; then
2355   cat >> confdefs.h <<\EOF
2356 #define off_t long
2357 EOF
2358
2359 fi
2360
2361 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2362 echo "configure:2363: checking for size_t" >&5
2363 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2364   echo $ac_n "(cached) $ac_c" 1>&6
2365 else
2366   cat > conftest.$ac_ext <<EOF
2367 #line 2368 "configure"
2368 #include "confdefs.h"
2369 #include <sys/types.h>
2370 #if STDC_HEADERS
2371 #include <stdlib.h>
2372 #include <stddef.h>
2373 #endif
2374 EOF
2375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2376   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2377   rm -rf conftest*
2378   ac_cv_type_size_t=yes
2379 else
2380   rm -rf conftest*
2381   ac_cv_type_size_t=no
2382 fi
2383 rm -f conftest*
2384
2385 fi
2386 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2387 if test $ac_cv_type_size_t = no; then
2388   cat >> confdefs.h <<\EOF
2389 #define size_t unsigned
2390 EOF
2391
2392 fi
2393
2394 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2395 # for constant arguments.  Useless!
2396 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2397 echo "configure:2398: checking for working alloca.h" >&5
2398 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2399   echo $ac_n "(cached) $ac_c" 1>&6
2400 else
2401   cat > conftest.$ac_ext <<EOF
2402 #line 2403 "configure"
2403 #include "confdefs.h"
2404 #include <alloca.h>
2405 int main() {
2406 char *p = alloca(2 * sizeof(int));
2407 ; return 0; }
2408 EOF
2409 if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2410   rm -rf conftest*
2411   ac_cv_header_alloca_h=yes
2412 else
2413   echo "configure: failed program was:" >&5
2414   cat conftest.$ac_ext >&5
2415   rm -rf conftest*
2416   ac_cv_header_alloca_h=no
2417 fi
2418 rm -f conftest*
2419 fi
2420
2421 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2422 if test $ac_cv_header_alloca_h = yes; then
2423   cat >> confdefs.h <<\EOF
2424 #define HAVE_ALLOCA_H 1
2425 EOF
2426
2427 fi
2428
2429 echo $ac_n "checking for alloca""... $ac_c" 1>&6
2430 echo "configure:2431: checking for alloca" >&5
2431 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2432   echo $ac_n "(cached) $ac_c" 1>&6
2433 else
2434   cat > conftest.$ac_ext <<EOF
2435 #line 2436 "configure"
2436 #include "confdefs.h"
2437
2438 #ifdef __GNUC__
2439 # define alloca __builtin_alloca
2440 #else
2441 # ifdef _MSC_VER
2442 #  include <malloc.h>
2443 #  define alloca _alloca
2444 # else
2445 #  if HAVE_ALLOCA_H
2446 #   include <alloca.h>
2447 #  else
2448 #   ifdef _AIX
2449  #pragma alloca
2450 #   else
2451 #    ifndef alloca /* predefined by HP cc +Olibcalls */
2452 char *alloca ();
2453 #    endif
2454 #   endif
2455 #  endif
2456 # endif
2457 #endif
2458
2459 int main() {
2460 char *p = (char *) alloca(1);
2461 ; return 0; }
2462 EOF
2463 if { (eval echo configure:2464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2464   rm -rf conftest*
2465   ac_cv_func_alloca_works=yes
2466 else
2467   echo "configure: failed program was:" >&5
2468   cat conftest.$ac_ext >&5
2469   rm -rf conftest*
2470   ac_cv_func_alloca_works=no
2471 fi
2472 rm -f conftest*
2473 fi
2474
2475 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2476 if test $ac_cv_func_alloca_works = yes; then
2477   cat >> confdefs.h <<\EOF
2478 #define HAVE_ALLOCA 1
2479 EOF
2480
2481 fi
2482
2483 if test $ac_cv_func_alloca_works = no; then
2484   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2485   # that cause trouble.  Some versions do not even contain alloca or
2486   # contain a buggy version.  If you still want to use their alloca,
2487   # use ar to extract alloca.o from them instead of compiling alloca.c.
2488   ALLOCA=alloca.${ac_objext}
2489   cat >> confdefs.h <<\EOF
2490 #define C_ALLOCA 1
2491 EOF
2492
2493
2494 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2495 echo "configure:2496: checking whether alloca needs Cray hooks" >&5
2496 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2497   echo $ac_n "(cached) $ac_c" 1>&6
2498 else
2499   cat > conftest.$ac_ext <<EOF
2500 #line 2501 "configure"
2501 #include "confdefs.h"
2502 #if defined(CRAY) && ! defined(CRAY2)
2503 webecray
2504 #else
2505 wenotbecray
2506 #endif
2507
2508 EOF
2509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2510   egrep "webecray" >/dev/null 2>&1; then
2511   rm -rf conftest*
2512   ac_cv_os_cray=yes
2513 else
2514   rm -rf conftest*
2515   ac_cv_os_cray=no
2516 fi
2517 rm -f conftest*
2518
2519 fi
2520
2521 echo "$ac_t""$ac_cv_os_cray" 1>&6
2522 if test $ac_cv_os_cray = yes; then
2523 for ac_func in _getb67 GETB67 getb67; do
2524   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2525 echo "configure:2526: checking for $ac_func" >&5
2526 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2527   echo $ac_n "(cached) $ac_c" 1>&6
2528 else
2529   cat > conftest.$ac_ext <<EOF
2530 #line 2531 "configure"
2531 #include "confdefs.h"
2532 /* System header to define __stub macros and hopefully few prototypes,
2533     which can conflict with char $ac_func(); below.  */
2534 #include <assert.h>
2535 /* Override any gcc2 internal prototype to avoid an error.  */
2536 /* We use char because int might match the return type of a gcc2
2537     builtin and then its argument prototype would still apply.  */
2538 char $ac_func();
2539
2540 int main() {
2541
2542 /* The GNU C library defines this for functions which it implements
2543     to always fail with ENOSYS.  Some functions are actually named
2544     something starting with __ and the normal name is an alias.  */
2545 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2546 choke me
2547 #else
2548 $ac_func();
2549 #endif
2550
2551 ; return 0; }
2552 EOF
2553 if { (eval echo configure:2554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2554   rm -rf conftest*
2555   eval "ac_cv_func_$ac_func=yes"
2556 else
2557   echo "configure: failed program was:" >&5
2558   cat conftest.$ac_ext >&5
2559   rm -rf conftest*
2560   eval "ac_cv_func_$ac_func=no"
2561 fi
2562 rm -f conftest*
2563 fi
2564
2565 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2566   echo "$ac_t""yes" 1>&6
2567   cat >> confdefs.h <<EOF
2568 #define CRAY_STACKSEG_END $ac_func
2569 EOF
2570
2571   break
2572 else
2573   echo "$ac_t""no" 1>&6
2574 fi
2575
2576 done
2577 fi
2578
2579 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2580 echo "configure:2581: checking stack direction for C alloca" >&5
2581 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2582   echo $ac_n "(cached) $ac_c" 1>&6
2583 else
2584   if test "$cross_compiling" = yes; then
2585   ac_cv_c_stack_direction=0
2586 else
2587   cat > conftest.$ac_ext <<EOF
2588 #line 2589 "configure"
2589 #include "confdefs.h"
2590 find_stack_direction ()
2591 {
2592   static char *addr = 0;
2593   auto char dummy;
2594   if (addr == 0)
2595     {
2596       addr = &dummy;
2597       return find_stack_direction ();
2598     }
2599   else
2600     return (&dummy > addr) ? 1 : -1;
2601 }
2602 main ()
2603 {
2604   exit (find_stack_direction() < 0);
2605 }
2606 EOF
2607 if { (eval echo configure:2608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2608 then
2609   ac_cv_c_stack_direction=1
2610 else
2611   echo "configure: failed program was:" >&5
2612   cat conftest.$ac_ext >&5
2613   rm -fr conftest*
2614   ac_cv_c_stack_direction=-1
2615 fi
2616 rm -fr conftest*
2617 fi
2618
2619 fi
2620
2621 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2622 cat >> confdefs.h <<EOF
2623 #define STACK_DIRECTION $ac_cv_c_stack_direction
2624 EOF
2625
2626 fi
2627
2628 for ac_hdr in unistd.h
2629 do
2630 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2631 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2632 echo "configure:2633: checking for $ac_hdr" >&5
2633 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2634   echo $ac_n "(cached) $ac_c" 1>&6
2635 else
2636   cat > conftest.$ac_ext <<EOF
2637 #line 2638 "configure"
2638 #include "confdefs.h"
2639 #include <$ac_hdr>
2640 EOF
2641 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2642 { (eval echo configure:2643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2643 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2644 if test -z "$ac_err"; then
2645   rm -rf conftest*
2646   eval "ac_cv_header_$ac_safe=yes"
2647 else
2648   echo "$ac_err" >&5
2649   echo "configure: failed program was:" >&5
2650   cat conftest.$ac_ext >&5
2651   rm -rf conftest*
2652   eval "ac_cv_header_$ac_safe=no"
2653 fi
2654 rm -f conftest*
2655 fi
2656 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2657   echo "$ac_t""yes" 1>&6
2658     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2659   cat >> confdefs.h <<EOF
2660 #define $ac_tr_hdr 1
2661 EOF
2662  
2663 else
2664   echo "$ac_t""no" 1>&6
2665 fi
2666 done
2667
2668 for ac_func in getpagesize
2669 do
2670 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2671 echo "configure:2672: checking for $ac_func" >&5
2672 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2673   echo $ac_n "(cached) $ac_c" 1>&6
2674 else
2675   cat > conftest.$ac_ext <<EOF
2676 #line 2677 "configure"
2677 #include "confdefs.h"
2678 /* System header to define __stub macros and hopefully few prototypes,
2679     which can conflict with char $ac_func(); below.  */
2680 #include <assert.h>
2681 /* Override any gcc2 internal prototype to avoid an error.  */
2682 /* We use char because int might match the return type of a gcc2
2683     builtin and then its argument prototype would still apply.  */
2684 char $ac_func();
2685
2686 int main() {
2687
2688 /* The GNU C library defines this for functions which it implements
2689     to always fail with ENOSYS.  Some functions are actually named
2690     something starting with __ and the normal name is an alias.  */
2691 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2692 choke me
2693 #else
2694 $ac_func();
2695 #endif
2696
2697 ; return 0; }
2698 EOF
2699 if { (eval echo configure:2700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2700   rm -rf conftest*
2701   eval "ac_cv_func_$ac_func=yes"
2702 else
2703   echo "configure: failed program was:" >&5
2704   cat conftest.$ac_ext >&5
2705   rm -rf conftest*
2706   eval "ac_cv_func_$ac_func=no"
2707 fi
2708 rm -f conftest*
2709 fi
2710
2711 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2712   echo "$ac_t""yes" 1>&6
2713     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2714   cat >> confdefs.h <<EOF
2715 #define $ac_tr_func 1
2716 EOF
2717  
2718 else
2719   echo "$ac_t""no" 1>&6
2720 fi
2721 done
2722
2723 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2724 echo "configure:2725: checking for working mmap" >&5
2725 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2726   echo $ac_n "(cached) $ac_c" 1>&6
2727 else
2728   if test "$cross_compiling" = yes; then
2729   ac_cv_func_mmap_fixed_mapped=no
2730 else
2731   cat > conftest.$ac_ext <<EOF
2732 #line 2733 "configure"
2733 #include "confdefs.h"
2734
2735 /* Thanks to Mike Haertel and Jim Avera for this test.
2736    Here is a matrix of mmap possibilities:
2737         mmap private not fixed
2738         mmap private fixed at somewhere currently unmapped
2739         mmap private fixed at somewhere already mapped
2740         mmap shared not fixed
2741         mmap shared fixed at somewhere currently unmapped
2742         mmap shared fixed at somewhere already mapped
2743    For private mappings, we should verify that changes cannot be read()
2744    back from the file, nor mmap's back from the file at a different
2745    address.  (There have been systems where private was not correctly
2746    implemented like the infamous i386 svr4.0, and systems where the
2747    VM page cache was not coherent with the filesystem buffer cache
2748    like early versions of FreeBSD and possibly contemporary NetBSD.)
2749    For shared mappings, we should conversely verify that changes get
2750    propogated back to all the places they're supposed to be.
2751
2752    Grep wants private fixed already mapped.
2753    The main things grep needs to know about mmap are:
2754    * does it exist and is it safe to write into the mmap'd area
2755    * how to use it (BSD variants)  */
2756 #include <sys/types.h>
2757 #include <fcntl.h>
2758 #include <sys/mman.h>
2759
2760 /* This mess was copied from the GNU getpagesize.h.  */
2761 #ifndef HAVE_GETPAGESIZE
2762 # ifdef HAVE_UNISTD_H
2763 #  include <unistd.h>
2764 # endif
2765
2766 /* Assume that all systems that can run configure have sys/param.h.  */
2767 # ifndef HAVE_SYS_PARAM_H
2768 #  define HAVE_SYS_PARAM_H 1
2769 # endif
2770
2771 # ifdef _SC_PAGESIZE
2772 #  define getpagesize() sysconf(_SC_PAGESIZE)
2773 # else /* no _SC_PAGESIZE */
2774 #  ifdef HAVE_SYS_PARAM_H
2775 #   include <sys/param.h>
2776 #   ifdef EXEC_PAGESIZE
2777 #    define getpagesize() EXEC_PAGESIZE
2778 #   else /* no EXEC_PAGESIZE */
2779 #    ifdef NBPG
2780 #     define getpagesize() NBPG * CLSIZE
2781 #     ifndef CLSIZE
2782 #      define CLSIZE 1
2783 #     endif /* no CLSIZE */
2784 #    else /* no NBPG */
2785 #     ifdef NBPC
2786 #      define getpagesize() NBPC
2787 #     else /* no NBPC */
2788 #      ifdef PAGESIZE
2789 #       define getpagesize() PAGESIZE
2790 #      endif /* PAGESIZE */
2791 #     endif /* no NBPC */
2792 #    endif /* no NBPG */
2793 #   endif /* no EXEC_PAGESIZE */
2794 #  else /* no HAVE_SYS_PARAM_H */
2795 #   define getpagesize() 8192   /* punt totally */
2796 #  endif /* no HAVE_SYS_PARAM_H */
2797 # endif /* no _SC_PAGESIZE */
2798
2799 #endif /* no HAVE_GETPAGESIZE */
2800
2801 #ifdef __cplusplus
2802 extern "C" { void *malloc(unsigned); }
2803 #else
2804 char *malloc();
2805 #endif
2806
2807 int
2808 main()
2809 {
2810         char *data, *data2, *data3;
2811         int i, pagesize;
2812         int fd;
2813
2814         pagesize = getpagesize();
2815
2816         /*
2817          * First, make a file with some known garbage in it.
2818          */
2819         data = malloc(pagesize);
2820         if (!data)
2821                 exit(1);
2822         for (i = 0; i < pagesize; ++i)
2823                 *(data + i) = rand();
2824         umask(0);
2825         fd = creat("conftestmmap", 0600);
2826         if (fd < 0)
2827                 exit(1);
2828         if (write(fd, data, pagesize) != pagesize)
2829                 exit(1);
2830         close(fd);
2831
2832         /*
2833          * Next, try to mmap the file at a fixed address which
2834          * already has something else allocated at it.  If we can,
2835          * also make sure that we see the same garbage.
2836          */
2837         fd = open("conftestmmap", O_RDWR);
2838         if (fd < 0)
2839                 exit(1);
2840         data2 = malloc(2 * pagesize);
2841         if (!data2)
2842                 exit(1);
2843         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2844         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2845             MAP_PRIVATE | MAP_FIXED, fd, 0L))
2846                 exit(1);
2847         for (i = 0; i < pagesize; ++i)
2848                 if (*(data + i) != *(data2 + i))
2849                         exit(1);
2850
2851         /*
2852          * Finally, make sure that changes to the mapped area
2853          * do not percolate back to the file as seen by read().
2854          * (This is a bug on some variants of i386 svr4.0.)
2855          */
2856         for (i = 0; i < pagesize; ++i)
2857                 *(data2 + i) = *(data2 + i) + 1;
2858         data3 = malloc(pagesize);
2859         if (!data3)
2860                 exit(1);
2861         if (read(fd, data3, pagesize) != pagesize)
2862                 exit(1);
2863         for (i = 0; i < pagesize; ++i)
2864                 if (*(data + i) != *(data3 + i))
2865                         exit(1);
2866         close(fd);
2867         unlink("conftestmmap");
2868         exit(0);
2869 }
2870
2871 EOF
2872 if { (eval echo configure:2873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2873 then
2874   ac_cv_func_mmap_fixed_mapped=yes
2875 else
2876   echo "configure: failed program was:" >&5
2877   cat conftest.$ac_ext >&5
2878   rm -fr conftest*
2879   ac_cv_func_mmap_fixed_mapped=no
2880 fi
2881 rm -fr conftest*
2882 fi
2883
2884 fi
2885
2886 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2887 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2888   cat >> confdefs.h <<\EOF
2889 #define HAVE_MMAP 1
2890 EOF
2891
2892 fi
2893
2894                               
2895    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2896 unistd.h sys/param.h
2897 do
2898 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2899 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2900 echo "configure:2901: checking for $ac_hdr" >&5
2901 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2902   echo $ac_n "(cached) $ac_c" 1>&6
2903 else
2904   cat > conftest.$ac_ext <<EOF
2905 #line 2906 "configure"
2906 #include "confdefs.h"
2907 #include <$ac_hdr>
2908 EOF
2909 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2910 { (eval echo configure:2911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2911 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2912 if test -z "$ac_err"; then
2913   rm -rf conftest*
2914   eval "ac_cv_header_$ac_safe=yes"
2915 else
2916   echo "$ac_err" >&5
2917   echo "configure: failed program was:" >&5
2918   cat conftest.$ac_ext >&5
2919   rm -rf conftest*
2920   eval "ac_cv_header_$ac_safe=no"
2921 fi
2922 rm -f conftest*
2923 fi
2924 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2925   echo "$ac_t""yes" 1>&6
2926     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2927   cat >> confdefs.h <<EOF
2928 #define $ac_tr_hdr 1
2929 EOF
2930  
2931 else
2932   echo "$ac_t""no" 1>&6
2933 fi
2934 done
2935
2936    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2937 strdup __argz_count __argz_stringify __argz_next
2938 do
2939 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2940 echo "configure:2941: checking for $ac_func" >&5
2941 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2942   echo $ac_n "(cached) $ac_c" 1>&6
2943 else
2944   cat > conftest.$ac_ext <<EOF
2945 #line 2946 "configure"
2946 #include "confdefs.h"
2947 /* System header to define __stub macros and hopefully few prototypes,
2948     which can conflict with char $ac_func(); below.  */
2949 #include <assert.h>
2950 /* Override any gcc2 internal prototype to avoid an error.  */
2951 /* We use char because int might match the return type of a gcc2
2952     builtin and then its argument prototype would still apply.  */
2953 char $ac_func();
2954
2955 int main() {
2956
2957 /* The GNU C library defines this for functions which it implements
2958     to always fail with ENOSYS.  Some functions are actually named
2959     something starting with __ and the normal name is an alias.  */
2960 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2961 choke me
2962 #else
2963 $ac_func();
2964 #endif
2965
2966 ; return 0; }
2967 EOF
2968 if { (eval echo configure:2969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2969   rm -rf conftest*
2970   eval "ac_cv_func_$ac_func=yes"
2971 else
2972   echo "configure: failed program was:" >&5
2973   cat conftest.$ac_ext >&5
2974   rm -rf conftest*
2975   eval "ac_cv_func_$ac_func=no"
2976 fi
2977 rm -f conftest*
2978 fi
2979
2980 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2981   echo "$ac_t""yes" 1>&6
2982     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2983   cat >> confdefs.h <<EOF
2984 #define $ac_tr_func 1
2985 EOF
2986  
2987 else
2988   echo "$ac_t""no" 1>&6
2989 fi
2990 done
2991
2992
2993    if test "${ac_cv_func_stpcpy+set}" != "set"; then
2994      for ac_func in stpcpy
2995 do
2996 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2997 echo "configure:2998: checking for $ac_func" >&5
2998 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2999   echo $ac_n "(cached) $ac_c" 1>&6
3000 else
3001   cat > conftest.$ac_ext <<EOF
3002 #line 3003 "configure"
3003 #include "confdefs.h"
3004 /* System header to define __stub macros and hopefully few prototypes,
3005     which can conflict with char $ac_func(); below.  */
3006 #include <assert.h>
3007 /* Override any gcc2 internal prototype to avoid an error.  */
3008 /* We use char because int might match the return type of a gcc2
3009     builtin and then its argument prototype would still apply.  */
3010 char $ac_func();
3011
3012 int main() {
3013
3014 /* The GNU C library defines this for functions which it implements
3015     to always fail with ENOSYS.  Some functions are actually named
3016     something starting with __ and the normal name is an alias.  */
3017 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3018 choke me
3019 #else
3020 $ac_func();
3021 #endif
3022
3023 ; return 0; }
3024 EOF
3025 if { (eval echo configure:3026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3026   rm -rf conftest*
3027   eval "ac_cv_func_$ac_func=yes"
3028 else
3029   echo "configure: failed program was:" >&5
3030   cat conftest.$ac_ext >&5
3031   rm -rf conftest*
3032   eval "ac_cv_func_$ac_func=no"
3033 fi
3034 rm -f conftest*
3035 fi
3036
3037 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3038   echo "$ac_t""yes" 1>&6
3039     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3040   cat >> confdefs.h <<EOF
3041 #define $ac_tr_func 1
3042 EOF
3043  
3044 else
3045   echo "$ac_t""no" 1>&6
3046 fi
3047 done
3048
3049    fi
3050    if test "${ac_cv_func_stpcpy}" = "yes"; then
3051      cat >> confdefs.h <<\EOF
3052 #define HAVE_STPCPY 1
3053 EOF
3054
3055    fi
3056
3057    if test $ac_cv_header_locale_h = yes; then
3058     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3059 echo "configure:3060: checking for LC_MESSAGES" >&5
3060 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3061   echo $ac_n "(cached) $ac_c" 1>&6
3062 else
3063   cat > conftest.$ac_ext <<EOF
3064 #line 3065 "configure"
3065 #include "confdefs.h"
3066 #include <locale.h>
3067 int main() {
3068 return LC_MESSAGES
3069 ; return 0; }
3070 EOF
3071 if { (eval echo configure:3072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3072   rm -rf conftest*
3073   am_cv_val_LC_MESSAGES=yes
3074 else
3075   echo "configure: failed program was:" >&5
3076   cat conftest.$ac_ext >&5
3077   rm -rf conftest*
3078   am_cv_val_LC_MESSAGES=no
3079 fi
3080 rm -f conftest*
3081 fi
3082
3083 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3084     if test $am_cv_val_LC_MESSAGES = yes; then
3085       cat >> confdefs.h <<\EOF
3086 #define HAVE_LC_MESSAGES 1
3087 EOF
3088
3089     fi
3090   fi
3091    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3092 echo "configure:3093: checking whether NLS is requested" >&5
3093         # Check whether --enable-nls or --disable-nls was given.
3094 if test "${enable_nls+set}" = set; then
3095   enableval="$enable_nls"
3096   USE_NLS=$enableval
3097 else
3098   USE_NLS=yes
3099 fi
3100
3101     echo "$ac_t""$USE_NLS" 1>&6
3102     
3103
3104     USE_INCLUDED_LIBINTL=no
3105
3106         if test "$USE_NLS" = "yes"; then
3107       cat >> confdefs.h <<\EOF
3108 #define ENABLE_NLS 1
3109 EOF
3110
3111       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3112 echo "configure:3113: checking whether included gettext is requested" >&5
3113       # Check whether --with-included-gettext or --without-included-gettext was given.
3114 if test "${with_included_gettext+set}" = set; then
3115   withval="$with_included_gettext"
3116   nls_cv_force_use_gnu_gettext=$withval
3117 else
3118   nls_cv_force_use_gnu_gettext=no
3119 fi
3120
3121       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3122
3123       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3124       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3125                                         nls_cv_header_intl=
3126         nls_cv_header_libgt=
3127         CATOBJEXT=NONE
3128
3129         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3130 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3131 echo "configure:3132: checking for libintl.h" >&5
3132 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3133   echo $ac_n "(cached) $ac_c" 1>&6
3134 else
3135   cat > conftest.$ac_ext <<EOF
3136 #line 3137 "configure"
3137 #include "confdefs.h"
3138 #include <libintl.h>
3139 EOF
3140 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3141 { (eval echo configure:3142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3142 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3143 if test -z "$ac_err"; then
3144   rm -rf conftest*
3145   eval "ac_cv_header_$ac_safe=yes"
3146 else
3147   echo "$ac_err" >&5
3148   echo "configure: failed program was:" >&5
3149   cat conftest.$ac_ext >&5
3150   rm -rf conftest*
3151   eval "ac_cv_header_$ac_safe=no"
3152 fi
3153 rm -f conftest*
3154 fi
3155 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3156   echo "$ac_t""yes" 1>&6
3157   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
3158 echo "configure:3159: checking for gettext in libc" >&5
3159 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3160   echo $ac_n "(cached) $ac_c" 1>&6
3161 else
3162   cat > conftest.$ac_ext <<EOF
3163 #line 3164 "configure"
3164 #include "confdefs.h"
3165 #include <libintl.h>
3166 int main() {
3167 return (int) gettext ("")
3168 ; return 0; }
3169 EOF
3170 if { (eval echo configure:3171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3171   rm -rf conftest*
3172   gt_cv_func_gettext_libc=yes
3173 else
3174   echo "configure: failed program was:" >&5
3175   cat conftest.$ac_ext >&5
3176   rm -rf conftest*
3177   gt_cv_func_gettext_libc=no
3178 fi
3179 rm -f conftest*
3180 fi
3181
3182 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3183
3184            if test "$gt_cv_func_gettext_libc" != "yes"; then
3185              echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
3186 echo "configure:3187: checking for bindtextdomain in -lintl" >&5
3187 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3188 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3189   echo $ac_n "(cached) $ac_c" 1>&6
3190 else
3191   ac_save_LIBS="$LIBS"
3192 LIBS="-lintl  $LIBS"
3193 cat > conftest.$ac_ext <<EOF
3194 #line 3195 "configure"
3195 #include "confdefs.h"
3196 /* Override any gcc2 internal prototype to avoid an error.  */
3197 /* We use char because int might match the return type of a gcc2
3198     builtin and then its argument prototype would still apply.  */
3199 char bindtextdomain();
3200
3201 int main() {
3202 bindtextdomain()
3203 ; return 0; }
3204 EOF
3205 if { (eval echo configure:3206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3206   rm -rf conftest*
3207   eval "ac_cv_lib_$ac_lib_var=yes"
3208 else
3209   echo "configure: failed program was:" >&5
3210   cat conftest.$ac_ext >&5
3211   rm -rf conftest*
3212   eval "ac_cv_lib_$ac_lib_var=no"
3213 fi
3214 rm -f conftest*
3215 LIBS="$ac_save_LIBS"
3216
3217 fi
3218 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3219   echo "$ac_t""yes" 1>&6
3220   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
3221 echo "configure:3222: checking for gettext in libintl" >&5
3222 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
3223   echo $ac_n "(cached) $ac_c" 1>&6
3224 else
3225   echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
3226 echo "configure:3227: checking for gettext in -lintl" >&5
3227 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
3228 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3229   echo $ac_n "(cached) $ac_c" 1>&6
3230 else
3231   ac_save_LIBS="$LIBS"
3232 LIBS="-lintl  $LIBS"
3233 cat > conftest.$ac_ext <<EOF
3234 #line 3235 "configure"
3235 #include "confdefs.h"
3236 /* Override any gcc2 internal prototype to avoid an error.  */
3237 /* We use char because int might match the return type of a gcc2
3238     builtin and then its argument prototype would still apply.  */
3239 char gettext();
3240
3241 int main() {
3242 gettext()
3243 ; return 0; }
3244 EOF
3245 if { (eval echo configure:3246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3246   rm -rf conftest*
3247   eval "ac_cv_lib_$ac_lib_var=yes"
3248 else
3249   echo "configure: failed program was:" >&5
3250   cat conftest.$ac_ext >&5
3251   rm -rf conftest*
3252   eval "ac_cv_lib_$ac_lib_var=no"
3253 fi
3254 rm -f conftest*
3255 LIBS="$ac_save_LIBS"
3256
3257 fi
3258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3259   echo "$ac_t""yes" 1>&6
3260   gt_cv_func_gettext_libintl=yes
3261 else
3262   echo "$ac_t""no" 1>&6
3263 gt_cv_func_gettext_libintl=no
3264 fi
3265
3266 fi
3267
3268 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3269 else
3270   echo "$ac_t""no" 1>&6
3271 fi
3272
3273            fi
3274
3275            if test "$gt_cv_func_gettext_libc" = "yes" \
3276               || test "$gt_cv_func_gettext_libintl" = "yes"; then
3277               cat >> confdefs.h <<\EOF
3278 #define HAVE_GETTEXT 1
3279 EOF
3280
3281               # Extract the first word of "msgfmt", so it can be a program name with args.
3282 set dummy msgfmt; ac_word=$2
3283 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3284 echo "configure:3285: checking for $ac_word" >&5
3285 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3286   echo $ac_n "(cached) $ac_c" 1>&6
3287 else
3288   case "$MSGFMT" in
3289   /*)
3290   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3291   ;;
3292   *)
3293   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3294   for ac_dir in $PATH; do
3295     test -z "$ac_dir" && ac_dir=.
3296     if test -f $ac_dir/$ac_word; then
3297       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3298         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3299         break
3300       fi
3301     fi
3302   done
3303   IFS="$ac_save_ifs"
3304   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3305   ;;
3306 esac
3307 fi
3308 MSGFMT="$ac_cv_path_MSGFMT"
3309 if test -n "$MSGFMT"; then
3310   echo "$ac_t""$MSGFMT" 1>&6
3311 else
3312   echo "$ac_t""no" 1>&6
3313 fi
3314               if test "$MSGFMT" != "no"; then
3315                 for ac_func in dcgettext
3316 do
3317 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3318 echo "configure:3319: checking for $ac_func" >&5
3319 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3320   echo $ac_n "(cached) $ac_c" 1>&6
3321 else
3322   cat > conftest.$ac_ext <<EOF
3323 #line 3324 "configure"
3324 #include "confdefs.h"
3325 /* System header to define __stub macros and hopefully few prototypes,
3326     which can conflict with char $ac_func(); below.  */
3327 #include <assert.h>
3328 /* Override any gcc2 internal prototype to avoid an error.  */
3329 /* We use char because int might match the return type of a gcc2
3330     builtin and then its argument prototype would still apply.  */
3331 char $ac_func();
3332
3333 int main() {
3334
3335 /* The GNU C library defines this for functions which it implements
3336     to always fail with ENOSYS.  Some functions are actually named
3337     something starting with __ and the normal name is an alias.  */
3338 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3339 choke me
3340 #else
3341 $ac_func();
3342 #endif
3343
3344 ; return 0; }
3345 EOF
3346 if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3347   rm -rf conftest*
3348   eval "ac_cv_func_$ac_func=yes"
3349 else
3350   echo "configure: failed program was:" >&5
3351   cat conftest.$ac_ext >&5
3352   rm -rf conftest*
3353   eval "ac_cv_func_$ac_func=no"
3354 fi
3355 rm -f conftest*
3356 fi
3357
3358 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3359   echo "$ac_t""yes" 1>&6
3360     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3361   cat >> confdefs.h <<EOF
3362 #define $ac_tr_func 1
3363 EOF
3364  
3365 else
3366   echo "$ac_t""no" 1>&6
3367 fi
3368 done
3369
3370                 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3371 set dummy gmsgfmt; ac_word=$2
3372 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3373 echo "configure:3374: checking for $ac_word" >&5
3374 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3375   echo $ac_n "(cached) $ac_c" 1>&6
3376 else
3377   case "$GMSGFMT" in
3378   /*)
3379   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3380   ;;
3381   ?:/*)                  
3382   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3383   ;;
3384   *)
3385   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3386   ac_dummy="$PATH"
3387   for ac_dir in $ac_dummy; do 
3388     test -z "$ac_dir" && ac_dir=.
3389     if test -f $ac_dir/$ac_word; then
3390       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3391       break
3392     fi
3393   done
3394   IFS="$ac_save_ifs"
3395   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3396   ;;
3397 esac
3398 fi
3399 GMSGFMT="$ac_cv_path_GMSGFMT"
3400 if test -n "$GMSGFMT"; then
3401   echo "$ac_t""$GMSGFMT" 1>&6
3402 else
3403   echo "$ac_t""no" 1>&6
3404 fi
3405
3406                 # Extract the first word of "xgettext", so it can be a program name with args.
3407 set dummy xgettext; ac_word=$2
3408 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3409 echo "configure:3410: checking for $ac_word" >&5
3410 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3411   echo $ac_n "(cached) $ac_c" 1>&6
3412 else
3413   case "$XGETTEXT" in
3414   /*)
3415   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3416   ;;
3417   *)
3418   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3419   for ac_dir in $PATH; do
3420     test -z "$ac_dir" && ac_dir=.
3421     if test -f $ac_dir/$ac_word; then
3422       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3423         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3424         break
3425       fi
3426     fi
3427   done
3428   IFS="$ac_save_ifs"
3429   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3430   ;;
3431 esac
3432 fi
3433 XGETTEXT="$ac_cv_path_XGETTEXT"
3434 if test -n "$XGETTEXT"; then
3435   echo "$ac_t""$XGETTEXT" 1>&6
3436 else
3437   echo "$ac_t""no" 1>&6
3438 fi
3439
3440                 cat > conftest.$ac_ext <<EOF
3441 #line 3442 "configure"
3442 #include "confdefs.h"
3443
3444 int main() {
3445 extern int _nl_msg_cat_cntr;
3446                                return _nl_msg_cat_cntr
3447 ; return 0; }
3448 EOF
3449 if { (eval echo configure:3450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3450   rm -rf conftest*
3451   CATOBJEXT=.gmo
3452                    DATADIRNAME=share
3453 else
3454   echo "configure: failed program was:" >&5
3455   cat conftest.$ac_ext >&5
3456   rm -rf conftest*
3457   CATOBJEXT=.mo
3458                    DATADIRNAME=lib
3459 fi
3460 rm -f conftest*
3461                 INSTOBJEXT=.mo
3462               fi
3463             fi
3464         
3465 else
3466   echo "$ac_t""no" 1>&6
3467 fi
3468
3469
3470         if test "$CATOBJEXT" = "NONE"; then
3471           echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
3472 echo "configure:3473: checking whether catgets can be used" >&5
3473           # Check whether --with-catgets or --without-catgets was given.
3474 if test "${with_catgets+set}" = set; then
3475   withval="$with_catgets"
3476   nls_cv_use_catgets=$withval
3477 else
3478   nls_cv_use_catgets=no
3479 fi
3480
3481           echo "$ac_t""$nls_cv_use_catgets" 1>&6
3482
3483           if test "$nls_cv_use_catgets" = "yes"; then
3484                     echo $ac_n "checking for main in -li""... $ac_c" 1>&6
3485 echo "configure:3486: checking for main in -li" >&5
3486 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
3487 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3488   echo $ac_n "(cached) $ac_c" 1>&6
3489 else
3490   ac_save_LIBS="$LIBS"
3491 LIBS="-li  $LIBS"
3492 cat > conftest.$ac_ext <<EOF
3493 #line 3494 "configure"
3494 #include "confdefs.h"
3495
3496 int main() {
3497 main()
3498 ; return 0; }
3499 EOF
3500 if { (eval echo configure:3501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3501   rm -rf conftest*
3502   eval "ac_cv_lib_$ac_lib_var=yes"
3503 else
3504   echo "configure: failed program was:" >&5
3505   cat conftest.$ac_ext >&5
3506   rm -rf conftest*
3507   eval "ac_cv_lib_$ac_lib_var=no"
3508 fi
3509 rm -f conftest*
3510 LIBS="$ac_save_LIBS"
3511
3512 fi
3513 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3514   echo "$ac_t""yes" 1>&6
3515     ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3516     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3517   cat >> confdefs.h <<EOF
3518 #define $ac_tr_lib 1
3519 EOF
3520
3521   LIBS="-li $LIBS"
3522
3523 else
3524   echo "$ac_t""no" 1>&6
3525 fi
3526
3527             echo $ac_n "checking for catgets""... $ac_c" 1>&6
3528 echo "configure:3529: checking for catgets" >&5
3529 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
3530   echo $ac_n "(cached) $ac_c" 1>&6
3531 else
3532   cat > conftest.$ac_ext <<EOF
3533 #line 3534 "configure"
3534 #include "confdefs.h"
3535 /* System header to define __stub macros and hopefully few prototypes,
3536     which can conflict with char catgets(); below.  */
3537 #include <assert.h>
3538 /* Override any gcc2 internal prototype to avoid an error.  */
3539 /* We use char because int might match the return type of a gcc2
3540     builtin and then its argument prototype would still apply.  */
3541 char catgets();
3542
3543 int main() {
3544
3545 /* The GNU C library defines this for functions which it implements
3546     to always fail with ENOSYS.  Some functions are actually named
3547     something starting with __ and the normal name is an alias.  */
3548 #if defined (__stub_catgets) || defined (__stub___catgets)
3549 choke me
3550 #else
3551 catgets();
3552 #endif
3553
3554 ; return 0; }
3555 EOF
3556 if { (eval echo configure:3557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3557   rm -rf conftest*
3558   eval "ac_cv_func_catgets=yes"
3559 else
3560   echo "configure: failed program was:" >&5
3561   cat conftest.$ac_ext >&5
3562   rm -rf conftest*
3563   eval "ac_cv_func_catgets=no"
3564 fi
3565 rm -f conftest*
3566 fi
3567
3568 if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
3569   echo "$ac_t""yes" 1>&6
3570   cat >> confdefs.h <<\EOF
3571 #define HAVE_CATGETS 1
3572 EOF
3573
3574                INTLOBJS="\$(CATOBJS)"
3575                # Extract the first word of "gencat", so it can be a program name with args.
3576 set dummy gencat; ac_word=$2
3577 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3578 echo "configure:3579: checking for $ac_word" >&5
3579 if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
3580   echo $ac_n "(cached) $ac_c" 1>&6
3581 else
3582   case "$GENCAT" in
3583   /*)
3584   ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
3585   ;;
3586   ?:/*)                  
3587   ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
3588   ;;
3589   *)
3590   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3591   ac_dummy="$PATH"
3592   for ac_dir in $ac_dummy; do 
3593     test -z "$ac_dir" && ac_dir=.
3594     if test -f $ac_dir/$ac_word; then
3595       ac_cv_path_GENCAT="$ac_dir/$ac_word"
3596       break
3597     fi
3598   done
3599   IFS="$ac_save_ifs"
3600   test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
3601   ;;
3602 esac
3603 fi
3604 GENCAT="$ac_cv_path_GENCAT"
3605 if test -n "$GENCAT"; then
3606   echo "$ac_t""$GENCAT" 1>&6
3607 else
3608   echo "$ac_t""no" 1>&6
3609 fi
3610                if test "$GENCAT" != "no"; then
3611                  # Extract the first word of "gmsgfmt", so it can be a program name with args.
3612 set dummy gmsgfmt; ac_word=$2
3613 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3614 echo "configure:3615: checking for $ac_word" >&5
3615 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3616   echo $ac_n "(cached) $ac_c" 1>&6
3617 else
3618   case "$GMSGFMT" in
3619   /*)
3620   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3621   ;;
3622   ?:/*)                  
3623   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3624   ;;
3625   *)
3626   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3627   ac_dummy="$PATH"
3628   for ac_dir in $ac_dummy; do 
3629     test -z "$ac_dir" && ac_dir=.
3630     if test -f $ac_dir/$ac_word; then
3631       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3632       break
3633     fi
3634   done
3635   IFS="$ac_save_ifs"
3636   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
3637   ;;
3638 esac
3639 fi
3640 GMSGFMT="$ac_cv_path_GMSGFMT"
3641 if test -n "$GMSGFMT"; then
3642   echo "$ac_t""$GMSGFMT" 1>&6
3643 else
3644   echo "$ac_t""no" 1>&6
3645 fi
3646
3647                  if test "$GMSGFMT" = "no"; then
3648                    # Extract the first word of "msgfmt", so it can be a program name with args.
3649 set dummy msgfmt; ac_word=$2
3650 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3651 echo "configure:3652: checking for $ac_word" >&5
3652 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3653   echo $ac_n "(cached) $ac_c" 1>&6
3654 else
3655   case "$GMSGFMT" in
3656   /*)
3657   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3658   ;;
3659   *)
3660   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3661   for ac_dir in $PATH; do
3662     test -z "$ac_dir" && ac_dir=.
3663     if test -f $ac_dir/$ac_word; then
3664       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3665         ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3666         break
3667       fi
3668     fi
3669   done
3670   IFS="$ac_save_ifs"
3671   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
3672   ;;
3673 esac
3674 fi
3675 GMSGFMT="$ac_cv_path_GMSGFMT"
3676 if test -n "$GMSGFMT"; then
3677   echo "$ac_t""$GMSGFMT" 1>&6
3678 else
3679   echo "$ac_t""no" 1>&6
3680 fi
3681
3682                  fi
3683                  # Extract the first word of "xgettext", so it can be a program name with args.
3684 set dummy xgettext; ac_word=$2
3685 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3686 echo "configure:3687: checking for $ac_word" >&5
3687 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3688   echo $ac_n "(cached) $ac_c" 1>&6
3689 else
3690   case "$XGETTEXT" in
3691   /*)
3692   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3693   ;;
3694   *)
3695   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3696   for ac_dir in $PATH; do
3697     test -z "$ac_dir" && ac_dir=.
3698     if test -f $ac_dir/$ac_word; then
3699       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3700         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3701         break
3702       fi
3703     fi
3704   done
3705   IFS="$ac_save_ifs"
3706   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3707   ;;
3708 esac
3709 fi
3710 XGETTEXT="$ac_cv_path_XGETTEXT"
3711 if test -n "$XGETTEXT"; then
3712   echo "$ac_t""$XGETTEXT" 1>&6
3713 else
3714   echo "$ac_t""no" 1>&6
3715 fi
3716
3717                  USE_INCLUDED_LIBINTL=yes
3718                  CATOBJEXT=.cat
3719                  INSTOBJEXT=.cat
3720                  DATADIRNAME=lib
3721                  INTLDEPS='$(top_builddir)/intl/libintl.a'
3722                  INTLLIBS=$INTLDEPS
3723                  LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3724                  nls_cv_header_intl=intl/libintl.h
3725                  nls_cv_header_libgt=intl/libgettext.h
3726                fi
3727 else
3728   echo "$ac_t""no" 1>&6
3729 fi
3730
3731           fi
3732         fi
3733
3734         if test "$CATOBJEXT" = "NONE"; then
3735                           nls_cv_use_gnu_gettext=yes
3736         fi
3737       fi
3738
3739       if test "$nls_cv_use_gnu_gettext" = "yes"; then
3740                 INTLOBJS="\$(GETTOBJS)"
3741         # Extract the first word of "msgfmt", so it can be a program name with args.
3742 set dummy msgfmt; ac_word=$2
3743 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3744 echo "configure:3745: checking for $ac_word" >&5
3745 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3746   echo $ac_n "(cached) $ac_c" 1>&6
3747 else
3748   case "$MSGFMT" in
3749   /*)
3750   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3751   ;;
3752   *)
3753   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3754   for ac_dir in $PATH; do
3755     test -z "$ac_dir" && ac_dir=.
3756     if test -f $ac_dir/$ac_word; then
3757       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3758         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3759         break
3760       fi
3761     fi
3762   done
3763   IFS="$ac_save_ifs"
3764   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
3765   ;;
3766 esac
3767 fi
3768 MSGFMT="$ac_cv_path_MSGFMT"
3769 if test -n "$MSGFMT"; then
3770   echo "$ac_t""$MSGFMT" 1>&6
3771 else
3772   echo "$ac_t""no" 1>&6
3773 fi
3774
3775         # Extract the first word of "gmsgfmt", so it can be a program name with args.
3776 set dummy gmsgfmt; ac_word=$2
3777 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3778 echo "configure:3779: checking for $ac_word" >&5
3779 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3780   echo $ac_n "(cached) $ac_c" 1>&6
3781 else
3782   case "$GMSGFMT" in
3783   /*)
3784   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3785   ;;
3786   ?:/*)                  
3787   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3788   ;;
3789   *)
3790   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3791   ac_dummy="$PATH"
3792   for ac_dir in $ac_dummy; do 
3793     test -z "$ac_dir" && ac_dir=.
3794     if test -f $ac_dir/$ac_word; then
3795       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3796       break
3797     fi
3798   done
3799   IFS="$ac_save_ifs"
3800   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3801   ;;
3802 esac
3803 fi
3804 GMSGFMT="$ac_cv_path_GMSGFMT"
3805 if test -n "$GMSGFMT"; then
3806   echo "$ac_t""$GMSGFMT" 1>&6
3807 else
3808   echo "$ac_t""no" 1>&6
3809 fi
3810
3811         # Extract the first word of "xgettext", so it can be a program name with args.
3812 set dummy xgettext; ac_word=$2
3813 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3814 echo "configure:3815: checking for $ac_word" >&5
3815 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3816   echo $ac_n "(cached) $ac_c" 1>&6
3817 else
3818   case "$XGETTEXT" in
3819   /*)
3820   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3821   ;;
3822   *)
3823   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3824   for ac_dir in $PATH; do
3825     test -z "$ac_dir" && ac_dir=.
3826     if test -f $ac_dir/$ac_word; then
3827       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3828         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3829         break
3830       fi
3831     fi
3832   done
3833   IFS="$ac_save_ifs"
3834   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3835   ;;
3836 esac
3837 fi
3838 XGETTEXT="$ac_cv_path_XGETTEXT"
3839 if test -n "$XGETTEXT"; then
3840   echo "$ac_t""$XGETTEXT" 1>&6
3841 else
3842   echo "$ac_t""no" 1>&6
3843 fi
3844
3845         
3846         USE_INCLUDED_LIBINTL=yes
3847         CATOBJEXT=.gmo
3848         INSTOBJEXT=.mo
3849         DATADIRNAME=share
3850         INTLDEPS='$(top_builddir)/intl/libintl.a'
3851         INTLLIBS=$INTLDEPS
3852         LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3853         nls_cv_header_intl=intl/libintl.h
3854         nls_cv_header_libgt=intl/libgettext.h
3855       fi
3856
3857             if test "$XGETTEXT" != ":"; then
3858                         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3859           : ;
3860         else
3861           echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
3862           XGETTEXT=":"
3863         fi
3864       fi
3865
3866       # We need to process the po/ directory.
3867       POSUB=po
3868     else
3869       DATADIRNAME=share
3870       nls_cv_header_intl=intl/libintl.h
3871       nls_cv_header_libgt=intl/libgettext.h
3872     fi
3873     
3874     
3875
3876
3877     # If this is used in GNU gettext we have to set USE_NLS to `yes'
3878     # because some of the sources are only built for this goal.
3879     if test "$PACKAGE" = gettext; then
3880       USE_NLS=yes
3881       USE_INCLUDED_LIBINTL=yes
3882     fi
3883
3884                 for lang in $ALL_LINGUAS; do
3885       GMOFILES="$GMOFILES $lang.gmo"
3886       POFILES="$POFILES $lang.po"
3887     done
3888
3889         
3890     
3891     
3892     
3893     
3894     
3895     
3896     
3897     
3898     
3899     
3900   
3901
3902    if test "x$CATOBJEXT" != "x"; then
3903      if test "x$ALL_LINGUAS" = "x"; then
3904        LINGUAS=
3905      else
3906        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
3907 echo "configure:3908: checking for catalogs to be installed" >&5
3908        NEW_LINGUAS=
3909        for lang in ${LINGUAS=$ALL_LINGUAS}; do
3910          case "$ALL_LINGUAS" in
3911           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3912          esac
3913        done
3914        LINGUAS=$NEW_LINGUAS
3915        echo "$ac_t""$LINGUAS" 1>&6
3916      fi
3917
3918           if test -n "$LINGUAS"; then
3919        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3920      fi
3921    fi
3922
3923             if test $ac_cv_header_locale_h = yes; then
3924      INCLUDE_LOCALE_H="#include <locale.h>"
3925    else
3926      INCLUDE_LOCALE_H="\
3927 /* The system does not provide the header <locale.h>.  Take care yourself.  */"
3928    fi
3929    
3930
3931             test -d intl || mkdir intl
3932    if test "$CATOBJEXT" = ".cat"; then
3933      ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
3934 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
3935 echo "configure:3936: checking for linux/version.h" >&5
3936 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3937   echo $ac_n "(cached) $ac_c" 1>&6
3938 else
3939   cat > conftest.$ac_ext <<EOF
3940 #line 3941 "configure"
3941 #include "confdefs.h"
3942 #include <linux/version.h>
3943 EOF
3944 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3945 { (eval echo configure:3946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3946 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3947 if test -z "$ac_err"; then
3948   rm -rf conftest*
3949   eval "ac_cv_header_$ac_safe=yes"
3950 else
3951   echo "$ac_err" >&5
3952   echo "configure: failed program was:" >&5
3953   cat conftest.$ac_ext >&5
3954   rm -rf conftest*
3955   eval "ac_cv_header_$ac_safe=no"
3956 fi
3957 rm -f conftest*
3958 fi
3959 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3960   echo "$ac_t""yes" 1>&6
3961   msgformat=linux
3962 else
3963   echo "$ac_t""no" 1>&6
3964 msgformat=xopen
3965 fi
3966
3967
3968                sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
3969    fi
3970       sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
3971      $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
3972
3973             if test "$PACKAGE" = "gettext"; then
3974      GT_NO="#NO#"
3975      GT_YES=
3976    else
3977      GT_NO=
3978      GT_YES="#YES#"
3979    fi
3980    
3981    
3982
3983             MKINSTALLDIRS=
3984    if test -n "$ac_aux_dir"; then
3985      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
3986    fi
3987    if test -z "$MKINSTALLDIRS"; then
3988      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
3989    fi
3990    
3991
3992       l=
3993    
3994
3995          test -d po || mkdir po
3996    if test "x$srcdir" != "x."; then
3997      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
3998        posrcprefix="$srcdir/"
3999      else
4000        posrcprefix="../$srcdir/"
4001      fi
4002    else
4003      posrcprefix="../"
4004    fi
4005    rm -f po/POTFILES
4006    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4007         < $srcdir/po/POTFILES.in > po/POTFILES
4008   
4009 localedir='${prefix}/${DATADIRNAME}/locale'
4010
4011
4012 manualdir='${prefix}/${DATADIRNAME}/${PACKAGE}/manual'
4013
4014
4015 # Check whether --with-glib-prefix or --without-glib-prefix was given.
4016 if test "${with_glib_prefix+set}" = set; then
4017   withval="$with_glib_prefix"
4018   glib_config_prefix="$withval"
4019 else
4020   glib_config_prefix=""
4021 fi
4022
4023 # Check whether --with-glib-exec-prefix or --without-glib-exec-prefix was given.
4024 if test "${with_glib_exec_prefix+set}" = set; then
4025   withval="$with_glib_exec_prefix"
4026   glib_config_exec_prefix="$withval"
4027 else
4028   glib_config_exec_prefix=""
4029 fi
4030
4031 # Check whether --enable-glibtest or --disable-glibtest was given.
4032 if test "${enable_glibtest+set}" = set; then
4033   enableval="$enable_glibtest"
4034   :
4035 else
4036   enable_glibtest=yes
4037 fi
4038
4039
4040   if test x$glib_config_exec_prefix != x ; then
4041      glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
4042      if test x${GLIB_CONFIG+set} != xset ; then
4043         GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
4044      fi
4045   fi
4046   if test x$glib_config_prefix != x ; then
4047      glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
4048      if test x${GLIB_CONFIG+set} != xset ; then
4049         GLIB_CONFIG=$glib_config_prefix/bin/glib-config
4050      fi
4051   fi
4052
4053   for module in . gthread
4054   do
4055       case "$module" in
4056          gmodule) 
4057              glib_config_args="$glib_config_args gmodule"
4058          ;;
4059          gthread) 
4060              glib_config_args="$glib_config_args gthread"
4061          ;;
4062       esac
4063   done
4064
4065   # Extract the first word of "glib-config", so it can be a program name with args.
4066 set dummy glib-config; ac_word=$2
4067 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4068 echo "configure:4069: checking for $ac_word" >&5
4069 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then
4070   echo $ac_n "(cached) $ac_c" 1>&6
4071 else
4072   case "$GLIB_CONFIG" in
4073   /*)
4074   ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a path.
4075   ;;
4076   ?:/*)                  
4077   ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a dos path.
4078   ;;
4079   *)
4080   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4081   ac_dummy="$PATH"
4082   for ac_dir in $ac_dummy; do 
4083     test -z "$ac_dir" && ac_dir=.
4084     if test -f $ac_dir/$ac_word; then
4085       ac_cv_path_GLIB_CONFIG="$ac_dir/$ac_word"
4086       break
4087     fi
4088   done
4089   IFS="$ac_save_ifs"
4090   test -z "$ac_cv_path_GLIB_CONFIG" && ac_cv_path_GLIB_CONFIG="no"
4091   ;;
4092 esac
4093 fi
4094 GLIB_CONFIG="$ac_cv_path_GLIB_CONFIG"
4095 if test -n "$GLIB_CONFIG"; then
4096   echo "$ac_t""$GLIB_CONFIG" 1>&6
4097 else
4098   echo "$ac_t""no" 1>&6
4099 fi
4100
4101   min_glib_version=1.2.6
4102   echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6
4103 echo "configure:4104: checking for GLIB - version >= $min_glib_version" >&5
4104   no_glib=""
4105   if test "$GLIB_CONFIG" = "no" ; then
4106     no_glib=yes
4107   else
4108     GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
4109     GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
4110     glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
4111            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
4112     glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
4113            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
4114     glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
4115            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
4116     if test "x$enable_glibtest" = "xyes" ; then
4117       ac_save_CFLAGS="$CFLAGS"
4118       ac_save_LIBS="$LIBS"
4119       CFLAGS="$CFLAGS $GLIB_CFLAGS"
4120       LIBS="$GLIB_LIBS $LIBS"
4121       rm -f conf.glibtest
4122       if test "$cross_compiling" = yes; then
4123   echo $ac_n "cross compiling; assumed OK... $ac_c"
4124 else
4125   cat > conftest.$ac_ext <<EOF
4126 #line 4127 "configure"
4127 #include "confdefs.h"
4128
4129 #include <glib.h>
4130 #include <stdio.h>
4131 #include <stdlib.h>
4132
4133 int 
4134 main ()
4135 {
4136   int major, minor, micro;
4137   char *tmp_version;
4138
4139   system ("touch conf.glibtest");
4140
4141   /* HP/UX 9 (%@#!) writes to sscanf strings */
4142   tmp_version = g_strdup("$min_glib_version");
4143   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
4144      printf("%s, bad version string\n", "$min_glib_version");
4145      exit(1);
4146    }
4147
4148   if ((glib_major_version != $glib_config_major_version) ||
4149       (glib_minor_version != $glib_config_minor_version) ||
4150       (glib_micro_version != $glib_config_micro_version))
4151     {
4152       printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
4153              $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
4154              glib_major_version, glib_minor_version, glib_micro_version);
4155       printf ("*** was found! If glib-config was correct, then it is best\n");
4156       printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
4157       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
4158       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
4159       printf("*** required on your system.\n");
4160       printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
4161       printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
4162       printf("*** before re-running configure\n");
4163     } 
4164   else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
4165            (glib_minor_version != GLIB_MINOR_VERSION) ||
4166            (glib_micro_version != GLIB_MICRO_VERSION))
4167     {
4168       printf("*** GLIB header files (version %d.%d.%d) do not match\n",
4169              GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
4170       printf("*** library (version %d.%d.%d)\n",
4171              glib_major_version, glib_minor_version, glib_micro_version);
4172     }
4173   else
4174     {
4175       if ((glib_major_version > major) ||
4176         ((glib_major_version == major) && (glib_minor_version > minor)) ||
4177         ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
4178       {
4179         return 0;
4180        }
4181      else
4182       {
4183         printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
4184                glib_major_version, glib_minor_version, glib_micro_version);
4185         printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
4186                major, minor, micro);
4187         printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
4188         printf("***\n");
4189         printf("*** If you have already installed a sufficiently new version, this error\n");
4190         printf("*** probably means that the wrong copy of the glib-config shell script is\n");
4191         printf("*** being found. The easiest way to fix this is to remove the old version\n");
4192         printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
4193         printf("*** correct copy of glib-config. (In this case, you will have to\n");
4194         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
4195         printf("*** so that the correct libraries are found at run-time))\n");
4196       }
4197     }
4198   return 1;
4199 }
4200
4201 EOF
4202 if { (eval echo configure:4203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4203 then
4204   :
4205 else
4206   echo "configure: failed program was:" >&5
4207   cat conftest.$ac_ext >&5
4208   rm -fr conftest*
4209   no_glib=yes
4210 fi
4211 rm -fr conftest*
4212 fi
4213
4214        CFLAGS="$ac_save_CFLAGS"
4215        LIBS="$ac_save_LIBS"
4216      fi
4217   fi
4218   if test "x$no_glib" = x ; then
4219      echo "$ac_t""yes" 1>&6
4220      :     
4221   else
4222      echo "$ac_t""no" 1>&6
4223      if test "$GLIB_CONFIG" = "no" ; then
4224        echo "*** The glib-config script installed by GLIB could not be found"
4225        echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
4226        echo "*** your path, or set the GLIB_CONFIG environment variable to the"
4227        echo "*** full path to glib-config."
4228      else
4229        if test -f conf.glibtest ; then
4230         :
4231        else
4232           echo "*** Could not run GLIB test program, checking why..."
4233           CFLAGS="$CFLAGS $GLIB_CFLAGS"
4234           LIBS="$LIBS $GLIB_LIBS"
4235           cat > conftest.$ac_ext <<EOF
4236 #line 4237 "configure"
4237 #include "confdefs.h"
4238
4239 #include <glib.h>
4240 #include <stdio.h>
4241
4242 int main() {
4243  return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); 
4244 ; return 0; }
4245 EOF
4246 if { (eval echo configure:4247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4247   rm -rf conftest*
4248    echo "*** The test program compiled, but did not run. This usually means"
4249           echo "*** that the run-time linker is not finding GLIB or finding the wrong"
4250           echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
4251           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
4252           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
4253           echo "*** is required on your system"
4254           echo "***"
4255           echo "*** If you have an old version installed, it is best to remove it, although"
4256           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
4257           echo "***"
4258           echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
4259           echo "*** came with the system with the command"
4260           echo "***"
4261           echo "***    rpm --erase --nodeps gtk gtk-devel" 
4262 else
4263   echo "configure: failed program was:" >&5
4264   cat conftest.$ac_ext >&5
4265   rm -rf conftest*
4266    echo "*** The test program failed to compile or link. See the file config.log for the"
4267           echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
4268           echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
4269           echo "*** may want to edit the glib-config script: $GLIB_CONFIG" 
4270 fi
4271 rm -f conftest*
4272           CFLAGS="$ac_save_CFLAGS"
4273           LIBS="$ac_save_LIBS"
4274        fi
4275      fi
4276      GLIB_CFLAGS=""
4277      GLIB_LIBS=""
4278      { echo "configure: error: Test for GLIB failed. See the file 'INSTALL' for help." 1>&2; exit 1; }
4279   fi
4280   
4281   
4282   rm -f conf.glibtest
4283
4284 # Check whether --with-gtk-prefix or --without-gtk-prefix was given.
4285 if test "${with_gtk_prefix+set}" = set; then
4286   withval="$with_gtk_prefix"
4287   gtk_config_prefix="$withval"
4288 else
4289   gtk_config_prefix=""
4290 fi
4291
4292 # Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
4293 if test "${with_gtk_exec_prefix+set}" = set; then
4294   withval="$with_gtk_exec_prefix"
4295   gtk_config_exec_prefix="$withval"
4296 else
4297   gtk_config_exec_prefix=""
4298 fi
4299
4300 # Check whether --enable-gtktest or --disable-gtktest was given.
4301 if test "${enable_gtktest+set}" = set; then
4302   enableval="$enable_gtktest"
4303   :
4304 else
4305   enable_gtktest=yes
4306 fi
4307
4308
4309   for module in . 
4310   do
4311       case "$module" in
4312          gthread) 
4313              gtk_config_args="$gtk_config_args gthread"
4314          ;;
4315       esac
4316   done
4317
4318   if test x$gtk_config_exec_prefix != x ; then
4319      gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
4320      if test x${GTK_CONFIG+set} != xset ; then
4321         GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
4322      fi
4323   fi
4324   if test x$gtk_config_prefix != x ; then
4325      gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
4326      if test x${GTK_CONFIG+set} != xset ; then
4327         GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
4328      fi
4329   fi
4330
4331   # Extract the first word of "gtk-config", so it can be a program name with args.
4332 set dummy gtk-config; ac_word=$2
4333 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4334 echo "configure:4335: checking for $ac_word" >&5
4335 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
4336   echo $ac_n "(cached) $ac_c" 1>&6
4337 else
4338   case "$GTK_CONFIG" in
4339   /*)
4340   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
4341   ;;
4342   ?:/*)                  
4343   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
4344   ;;
4345   *)
4346   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4347   ac_dummy="$PATH"
4348   for ac_dir in $ac_dummy; do 
4349     test -z "$ac_dir" && ac_dir=.
4350     if test -f $ac_dir/$ac_word; then
4351       ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
4352       break
4353     fi
4354   done
4355   IFS="$ac_save_ifs"
4356   test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
4357   ;;
4358 esac
4359 fi
4360 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
4361 if test -n "$GTK_CONFIG"; then
4362   echo "$ac_t""$GTK_CONFIG" 1>&6
4363 else
4364   echo "$ac_t""no" 1>&6
4365 fi
4366
4367   min_gtk_version=1.2.6
4368   echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
4369 echo "configure:4370: checking for GTK - version >= $min_gtk_version" >&5
4370   no_gtk=""
4371   if test "$GTK_CONFIG" = "no" ; then
4372     no_gtk=yes
4373   else
4374     GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
4375     GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
4376     gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
4377            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
4378     gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
4379            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
4380     gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
4381            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
4382     if test "x$enable_gtktest" = "xyes" ; then
4383       ac_save_CFLAGS="$CFLAGS"
4384       ac_save_LIBS="$LIBS"
4385       CFLAGS="$CFLAGS $GTK_CFLAGS"
4386       LIBS="$GTK_LIBS $LIBS"
4387       rm -f conf.gtktest
4388       if test "$cross_compiling" = yes; then
4389   echo $ac_n "cross compiling; assumed OK... $ac_c"
4390 else
4391   cat > conftest.$ac_ext <<EOF
4392 #line 4393 "configure"
4393 #include "confdefs.h"
4394
4395 #include <gtk/gtk.h>
4396 #include <stdio.h>
4397 #include <stdlib.h>
4398
4399 int 
4400 main ()
4401 {
4402   int major, minor, micro;
4403   char *tmp_version;
4404
4405   system ("touch conf.gtktest");
4406
4407   /* HP/UX 9 (%@#!) writes to sscanf strings */
4408   tmp_version = g_strdup("$min_gtk_version");
4409   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
4410      printf("%s, bad version string\n", "$min_gtk_version");
4411      exit(1);
4412    }
4413
4414   if ((gtk_major_version != $gtk_config_major_version) ||
4415       (gtk_minor_version != $gtk_config_minor_version) ||
4416       (gtk_micro_version != $gtk_config_micro_version))
4417     {
4418       printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 
4419              $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
4420              gtk_major_version, gtk_minor_version, gtk_micro_version);
4421       printf ("*** was found! If gtk-config was correct, then it is best\n");
4422       printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
4423       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
4424       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
4425       printf("*** required on your system.\n");
4426       printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
4427       printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
4428       printf("*** before re-running configure\n");
4429     } 
4430 #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
4431   else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
4432            (gtk_minor_version != GTK_MINOR_VERSION) ||
4433            (gtk_micro_version != GTK_MICRO_VERSION))
4434     {
4435       printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
4436              GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
4437       printf("*** library (version %d.%d.%d)\n",
4438              gtk_major_version, gtk_minor_version, gtk_micro_version);
4439     }
4440 #endif /* defined (GTK_MAJOR_VERSION) ... */
4441   else
4442     {
4443       if ((gtk_major_version > major) ||
4444         ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
4445         ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
4446       {
4447         return 0;
4448        }
4449      else
4450       {
4451         printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
4452                gtk_major_version, gtk_minor_version, gtk_micro_version);
4453         printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
4454                major, minor, micro);
4455         printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
4456         printf("***\n");
4457         printf("*** If you have already installed a sufficiently new version, this error\n");
4458         printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
4459         printf("*** being found. The easiest way to fix this is to remove the old version\n");
4460         printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
4461         printf("*** correct copy of gtk-config. (In this case, you will have to\n");
4462         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
4463         printf("*** so that the correct libraries are found at run-time))\n");
4464       }
4465     }
4466   return 1;
4467 }
4468
4469 EOF
4470 if { (eval echo configure:4471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4471 then
4472   :
4473 else
4474   echo "configure: failed program was:" >&5
4475   cat conftest.$ac_ext >&5
4476   rm -fr conftest*
4477   no_gtk=yes
4478 fi
4479 rm -fr conftest*
4480 fi
4481
4482        CFLAGS="$ac_save_CFLAGS"
4483        LIBS="$ac_save_LIBS"
4484      fi
4485   fi
4486   if test "x$no_gtk" = x ; then
4487      echo "$ac_t""yes" 1>&6
4488      :     
4489   else
4490      echo "$ac_t""no" 1>&6
4491      if test "$GTK_CONFIG" = "no" ; then
4492        echo "*** The gtk-config script installed by GTK could not be found"
4493        echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
4494        echo "*** your path, or set the GTK_CONFIG environment variable to the"
4495        echo "*** full path to gtk-config."
4496      else
4497        if test -f conf.gtktest ; then
4498         :
4499        else
4500           echo "*** Could not run GTK test program, checking why..."
4501           CFLAGS="$CFLAGS $GTK_CFLAGS"
4502           LIBS="$LIBS $GTK_LIBS"
4503           cat > conftest.$ac_ext <<EOF
4504 #line 4505 "configure"
4505 #include "confdefs.h"
4506
4507 #include <gtk/gtk.h>
4508 #include <stdio.h>
4509
4510 int main() {
4511  return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); 
4512 ; return 0; }
4513 EOF
4514 if { (eval echo configure:4515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4515   rm -rf conftest*
4516    echo "*** The test program compiled, but did not run. This usually means"
4517           echo "*** that the run-time linker is not finding GTK or finding the wrong"
4518           echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
4519           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
4520           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
4521           echo "*** is required on your system"
4522           echo "***"
4523           echo "*** If you have an old version installed, it is best to remove it, although"
4524           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
4525           echo "***"
4526           echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
4527           echo "*** came with the system with the command"
4528           echo "***"
4529           echo "***    rpm --erase --nodeps gtk gtk-devel" 
4530 else
4531   echo "configure: failed program was:" >&5
4532   cat conftest.$ac_ext >&5
4533   rm -rf conftest*
4534    echo "*** The test program failed to compile or link. See the file config.log for the"
4535           echo "*** exact error that occured. This usually means GTK was incorrectly installed"
4536           echo "*** or that you have moved GTK since it was installed. In the latter case, you"
4537           echo "*** may want to edit the gtk-config script: $GTK_CONFIG" 
4538 fi
4539 rm -f conftest*
4540           CFLAGS="$ac_save_CFLAGS"
4541           LIBS="$ac_save_LIBS"
4542        fi
4543      fi
4544      GTK_CFLAGS=""
4545      GTK_LIBS=""
4546      { echo "configure: error: Test for GTK failed. See the file 'INSTALL' for help." 1>&2; exit 1; }
4547   fi
4548   
4549   
4550   rm -f conf.gtktest
4551
4552
4553 # Check whether --enable-gdk-pixbuf or --disable-gdk-pixbuf was given.
4554 if test "${enable_gdk_pixbuf+set}" = set; then
4555   enableval="$enable_gdk_pixbuf"
4556   ac_cv_disable_gdk_pixbuf=disable
4557 else
4558   ac_cv_disable_gdk_pixbuf=no
4559 fi
4560
4561 # Check whether --enable-imlib or --disable-imlib was given.
4562 if test "${enable_imlib+set}" = set; then
4563   enableval="$enable_imlib"
4564   ac_cv_disable_imlib=disable
4565 else
4566   ac_cv_disable_imlib=no
4567 fi
4568
4569
4570 if test "$ac_cv_disable_gdk_pixbuf" = no; then
4571         # Check whether --with-gdk-pixbuf-prefix or --without-gdk-pixbuf-prefix was given.
4572 if test "${with_gdk_pixbuf_prefix+set}" = set; then
4573   withval="$with_gdk_pixbuf_prefix"
4574   gdk_pixbuf_prefix="$withval"
4575 else
4576   gdk_pixbuf_prefix=""
4577 fi
4578
4579 # Check whether --with-gdk-pixbuf-exec-prefix or --without-gdk-pixbuf-exec-prefix was given.
4580 if test "${with_gdk_pixbuf_exec_prefix+set}" = set; then
4581   withval="$with_gdk_pixbuf_exec_prefix"
4582   gdk_pixbuf_exec_prefix="$withval"
4583 else
4584   gdk_pixbuf_exec_prefix=""
4585 fi
4586
4587 # Check whether --enable-gdk_pixbuftest or --disable-gdk_pixbuftest was given.
4588 if test "${enable_gdk_pixbuftest+set}" = set; then
4589   enableval="$enable_gdk_pixbuftest"
4590   :
4591 else
4592   enable_gdk_pixbuftest=yes
4593 fi
4594
4595
4596   if test x$gdk_pixbuf_exec_prefix != x ; then
4597      gdk_pixbuf_args="$gdk_pixbuf_args --exec-prefix=$gdk_pixbuf_exec_prefix"
4598      if test x${GDK_PIXBUF_CONFIG+set} = xset ; then
4599         GDK_PIXBUF_CONFIG=$gdk_pixbuf_exec_prefix/gdk-pixbuf-config
4600      fi
4601   fi
4602   if test x$gdk_pixbuf_prefix != x ; then
4603      gdk_pixbuf_args="$gdk_pixbuf_args --prefix=$gdk_pixbuf_prefix"
4604      if test x${GDK_PIXBUF_CONFIG+set} = xset ; then
4605         GDK_PIXBUF_CONFIG=$gdk_pixbuf_prefix/bin/gdk-pixbuf-config
4606      fi
4607   fi
4608
4609   # Extract the first word of "gdk-pixbuf-config", so it can be a program name with args.
4610 set dummy gdk-pixbuf-config; ac_word=$2
4611 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4612 echo "configure:4613: checking for $ac_word" >&5
4613 if eval "test \"`echo '$''{'ac_cv_path_GDK_PIXBUF_CONFIG'+set}'`\" = set"; then
4614   echo $ac_n "(cached) $ac_c" 1>&6
4615 else
4616   case "$GDK_PIXBUF_CONFIG" in
4617   /*)
4618   ac_cv_path_GDK_PIXBUF_CONFIG="$GDK_PIXBUF_CONFIG" # Let the user override the test with a path.
4619   ;;
4620   ?:/*)                  
4621   ac_cv_path_GDK_PIXBUF_CONFIG="$GDK_PIXBUF_CONFIG" # Let the user override the test with a dos path.
4622   ;;
4623   *)
4624   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4625   ac_dummy="$PATH"
4626   for ac_dir in $ac_dummy; do 
4627     test -z "$ac_dir" && ac_dir=.
4628     if test -f $ac_dir/$ac_word; then
4629       ac_cv_path_GDK_PIXBUF_CONFIG="$ac_dir/$ac_word"
4630       break
4631     fi
4632   done
4633   IFS="$ac_save_ifs"
4634   test -z "$ac_cv_path_GDK_PIXBUF_CONFIG" && ac_cv_path_GDK_PIXBUF_CONFIG="no"
4635   ;;
4636 esac
4637 fi
4638 GDK_PIXBUF_CONFIG="$ac_cv_path_GDK_PIXBUF_CONFIG"
4639 if test -n "$GDK_PIXBUF_CONFIG"; then
4640   echo "$ac_t""$GDK_PIXBUF_CONFIG" 1>&6
4641 else
4642   echo "$ac_t""no" 1>&6
4643 fi
4644
4645   min_gdk_pixbuf_version=0.8.0
4646   echo $ac_n "checking for GDK_PIXBUF - version >= $min_gdk_pixbuf_version""... $ac_c" 1>&6
4647 echo "configure:4648: checking for GDK_PIXBUF - version >= $min_gdk_pixbuf_version" >&5
4648   no_gdk_pixbuf=""
4649   if test "$GDK_PIXBUF_CONFIG" = "no" ; then
4650     no_gdk_pixbuf=yes
4651   else
4652     GDK_PIXBUF_CFLAGS=`$GDK_PIXBUF_CONFIG $gdk_pixbufconf_args --cflags`
4653     GDK_PIXBUF_LIBS=`$GDK_PIXBUF_CONFIG $gdk_pixbufconf_args --libs`
4654
4655     gdk_pixbuf_major_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_args --version | \
4656            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
4657     gdk_pixbuf_minor_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_args --version | \
4658            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
4659     gdk_pixbuf_micro_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_config_args --version | \
4660            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
4661     if test "x$enable_gdk_pixbuftest" = "xyes" ; then
4662       ac_save_CFLAGS="$CFLAGS"
4663       ac_save_LIBS="$LIBS"
4664       CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS"
4665       LIBS="$LIBS $GDK_PIXBUF_LIBS"
4666       rm -f conf.gdk_pixbuftest
4667       if test "$cross_compiling" = yes; then
4668   echo $ac_n "cross compiling; assumed OK... $ac_c"
4669 else
4670   cat > conftest.$ac_ext <<EOF
4671 #line 4672 "configure"
4672 #include "confdefs.h"
4673
4674 #include <stdio.h>
4675 #include <stdlib.h>
4676 #include <string.h>
4677 #include <gdk-pixbuf/gdk-pixbuf.h>
4678
4679 char*
4680 my_strdup (char *str)
4681 {
4682   char *new_str;
4683   
4684   if (str)
4685     {
4686       new_str = malloc ((strlen (str) + 1) * sizeof(char));
4687       strcpy (new_str, str);
4688     }
4689   else
4690     new_str = NULL;
4691   
4692   return new_str;
4693 }
4694
4695 int main ()
4696 {
4697   int major, minor, micro;
4698   char *tmp_version;
4699
4700   system ("touch conf.gdk_pixbuftest");
4701
4702   /* HP/UX 9 (%@#!) writes to sscanf strings */
4703   tmp_version = my_strdup("$min_gdk_pixbuf_version");
4704   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
4705      printf("%s, bad version string\n", "$min_gdk_pixbuf_version");
4706      exit(1);
4707    }
4708
4709    if (($gdk_pixbuf_major_version > major) ||
4710       (($gdk_pixbuf_major_version == major) && ($gdk_pixbuf_minor_version > minor)) ||
4711       (($gdk_pixbuf_major_version == major) && ($gdk_pixbuf_minor_version == minor) && ($gdk_pixbuf_micro_version >= micro)))
4712     {
4713       return 0;
4714     }
4715   else
4716     {
4717       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);
4718       printf("*** of GDK_PIXBUF required is %d.%d.%d. If gdk-pixbuf-config is correct, then it is\n", major, minor, micro);
4719       printf("*** best to upgrade to the required version.\n");
4720       printf("*** If gdk-pixbuf-config was wrong, set the environment variable GDK_PIXBUF_CONFIG\n");
4721       printf("*** to point to the correct copy of gdk-pixbuf-config, and remove the file\n");
4722       printf("*** config.cache before re-running configure\n");
4723       return 1;
4724     }
4725 }
4726
4727
4728 EOF
4729 if { (eval echo configure:4730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4730 then
4731   :
4732 else
4733   echo "configure: failed program was:" >&5
4734   cat conftest.$ac_ext >&5
4735   rm -fr conftest*
4736   no_gdk_pixbuf=yes
4737 fi
4738 rm -fr conftest*
4739 fi
4740
4741        CFLAGS="$ac_save_CFLAGS"
4742        LIBS="$ac_save_LIBS"
4743      fi
4744   fi
4745   if test "x$no_gdk_pixbuf" = x ; then
4746      echo "$ac_t""yes" 1>&6
4747      cat >> confdefs.h <<\EOF
4748 #define HAVE_GDK_PIXBUF 1
4749 EOF
4750      
4751   else
4752      echo "$ac_t""no" 1>&6
4753      if test "$GDK_PIXBUF_CONFIG" = "no" ; then
4754        echo "*** The gdk-pixbuf-config script installed by GDK_PIXBUF could not be found"
4755        echo "*** If GDK_PIXBUF was installed in PREFIX, make sure PREFIX/bin is in"
4756        echo "*** your path, or set the GDK_PIXBUF_CONFIG environment variable to the"
4757        echo "*** full path to gdk-pixbuf-config."
4758      else
4759        if test -f conf.gdk_pixbuftest ; then
4760         :
4761        else
4762           echo "*** Could not run GDK_PIXBUF test program, checking why..."
4763           CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS"
4764           LIBS="$LIBS $GDK_PIXBUF_LIBS"
4765           cat > conftest.$ac_ext <<EOF
4766 #line 4767 "configure"
4767 #include "confdefs.h"
4768
4769 #include <stdio.h>
4770 #include <gdk-pixbuf/gdk-pixbuf.h>
4771
4772 int main() {
4773  return 0; 
4774 ; return 0; }
4775 EOF
4776 if { (eval echo configure:4777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4777   rm -rf conftest*
4778    echo "*** The test program compiled, but did not run. This usually means"
4779           echo "*** that the run-time linker is not finding GDK_PIXBUF or finding the wrong"
4780           echo "*** version of GDK_PIXBUF. If it is not finding GDK_PIXBUF, you'll need to set your"
4781           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
4782           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
4783           echo "*** is required on your system"
4784           echo "***"
4785           echo "*** If you have an old version installed, it is best to remove it, although"
4786           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
4787 else
4788   echo "configure: failed program was:" >&5
4789   cat conftest.$ac_ext >&5
4790   rm -rf conftest*
4791    echo "*** The test program failed to compile or link. See the file config.log for the"
4792           echo "*** exact error that occured. This usually means GDK_PIXBUF was incorrectly installed"
4793           echo "*** or that you have moved GDK_PIXBUF since it was installed. In the latter case, you"
4794           echo "*** may want to edit the gdk-pixbuf-config script: $GDK_PIXBUF_CONFIG" 
4795 fi
4796 rm -f conftest*
4797           CFLAGS="$ac_save_CFLAGS"
4798           LIBS="$ac_save_LIBS"
4799        fi
4800      fi
4801      GDK_PIXBUF_CFLAGS=""
4802      GDK_PIXBUF_LIBS=""
4803      ac_cv_disable_gdk_pixbuf=disable
4804   fi
4805   
4806   
4807   rm -f conf.gdk_pixbuftest
4808
4809 fi
4810 if test "$ac_cv_disable_gdk_pixbuf" = disable -a "$ac_cv_disable_imlib" = no; then
4811         # Check whether --with-imlib-prefix or --without-imlib-prefix was given.
4812 if test "${with_imlib_prefix+set}" = set; then
4813   withval="$with_imlib_prefix"
4814   imlib_prefix="$withval"
4815 else
4816   imlib_prefix=""
4817 fi
4818
4819 # Check whether --with-imlib-exec-prefix or --without-imlib-exec-prefix was given.
4820 if test "${with_imlib_exec_prefix+set}" = set; then
4821   withval="$with_imlib_exec_prefix"
4822   imlib_exec_prefix="$withval"
4823 else
4824   imlib_exec_prefix=""
4825 fi
4826
4827 # Check whether --enable-imlibtest or --disable-imlibtest was given.
4828 if test "${enable_imlibtest+set}" = set; then
4829   enableval="$enable_imlibtest"
4830   :
4831 else
4832   enable_imlibtest=yes
4833 fi
4834
4835
4836   if test x$imlib_exec_prefix != x ; then
4837      imlib_args="$imlib_args --exec-prefix=$imlib_exec_prefix"
4838      if test x${IMLIB_CONFIG+set} != xset ; then
4839         IMLIB_CONFIG=$imlib_exec_prefix/bin/imlib-config
4840      fi
4841   fi
4842   if test x$imlib_prefix != x ; then
4843      imlib_args="$imlib_args --prefix=$imlib_prefix"
4844      if test x${IMLIB_CONFIG+set} != xset ; then
4845         IMLIB_CONFIG=$imlib_prefix/bin/imlib-config
4846      fi
4847   fi
4848
4849   # Extract the first word of "imlib-config", so it can be a program name with args.
4850 set dummy imlib-config; ac_word=$2
4851 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4852 echo "configure:4853: checking for $ac_word" >&5
4853 if eval "test \"`echo '$''{'ac_cv_path_IMLIB_CONFIG'+set}'`\" = set"; then
4854   echo $ac_n "(cached) $ac_c" 1>&6
4855 else
4856   case "$IMLIB_CONFIG" in
4857   /*)
4858   ac_cv_path_IMLIB_CONFIG="$IMLIB_CONFIG" # Let the user override the test with a path.
4859   ;;
4860   ?:/*)                  
4861   ac_cv_path_IMLIB_CONFIG="$IMLIB_CONFIG" # Let the user override the test with a dos path.
4862   ;;
4863   *)
4864   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4865   ac_dummy="$PATH"
4866   for ac_dir in $ac_dummy; do 
4867     test -z "$ac_dir" && ac_dir=.
4868     if test -f $ac_dir/$ac_word; then
4869       ac_cv_path_IMLIB_CONFIG="$ac_dir/$ac_word"
4870       break
4871     fi
4872   done
4873   IFS="$ac_save_ifs"
4874   test -z "$ac_cv_path_IMLIB_CONFIG" && ac_cv_path_IMLIB_CONFIG="no"
4875   ;;
4876 esac
4877 fi
4878 IMLIB_CONFIG="$ac_cv_path_IMLIB_CONFIG"
4879 if test -n "$IMLIB_CONFIG"; then
4880   echo "$ac_t""$IMLIB_CONFIG" 1>&6
4881 else
4882   echo "$ac_t""no" 1>&6
4883 fi
4884
4885   min_imlib_version=1.9
4886   echo $ac_n "checking for IMLIB - version >= $min_imlib_version""... $ac_c" 1>&6
4887 echo "configure:4888: checking for IMLIB - version >= $min_imlib_version" >&5
4888   no_imlib=""
4889   if test "$IMLIB_CONFIG" = "no" ; then
4890     no_imlib=yes
4891   else
4892     GDK_IMLIB_CFLAGS=`$IMLIB_CONFIG $imlibconf_args --cflags-gdk`
4893     GDK_IMLIB_LIBS=`$IMLIB_CONFIG $imlibconf_args --libs-gdk`
4894
4895     imlib_major_version=`$IMLIB_CONFIG $imlib_args --version | \
4896            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
4897     imlib_minor_version=`$IMLIB_CONFIG $imlib_args --version | \
4898            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
4899     if test "x$enable_imlibtest" = "xyes" ; then
4900       ac_save_CFLAGS="$CFLAGS"
4901       ac_save_LIBS="$LIBS"
4902       CFLAGS="$CFLAGS $GDK_IMLIB_CFLAGS"
4903       LIBS="$LIBS $GDK_IMLIB_LIBS"
4904       rm -f conf.imlibtest
4905       if test "$cross_compiling" = yes; then
4906   echo $ac_n "cross compiling; assumed OK... $ac_c"
4907 else
4908   cat > conftest.$ac_ext <<EOF
4909 #line 4910 "configure"
4910 #include "confdefs.h"
4911
4912 #include <stdio.h>
4913 #include <stdlib.h>
4914 #include <gdk_imlib.h>
4915
4916 int main ()
4917 {
4918   int major, minor;
4919   char *tmp_version;
4920
4921   system ("touch conf.gdkimlibtest");
4922
4923   /* HP/UX 9 (%@#!) writes to sscanf strings */
4924   tmp_version = g_strdup("$min_imlib_version");
4925   if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2) {
4926      printf("%s, bad version string\n", "$min_imlib_version");
4927      exit(1);
4928    }
4929
4930     if (($imlib_major_version > major) ||
4931         (($imlib_major_version == major) && ($imlib_minor_version >= minor)))
4932     {
4933       return 0;
4934     }
4935   else
4936     {
4937       printf("\n*** 'imlib-config --version' returned %d.%d, but the minimum version\n", $imlib_major_version, $imlib_minor_version);
4938       printf("*** of IMLIB required is %d.%d. If imlib-config is correct, then it is\n", major, minor);
4939       printf("*** best to upgrade to the required version.\n");
4940       printf("*** If imlib-config was wrong, set the environment variable IMLIB_CONFIG\n");
4941       printf("*** to point to the correct copy of imlib-config, and remove the file\n");
4942       printf("*** config.cache before re-running configure\n");
4943       return 1;
4944     }
4945 }
4946
4947
4948 EOF
4949 if { (eval echo configure:4950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4950 then
4951   :
4952 else
4953   echo "configure: failed program was:" >&5
4954   cat conftest.$ac_ext >&5
4955   rm -fr conftest*
4956   no_imlib=yes
4957 fi
4958 rm -fr conftest*
4959 fi
4960
4961        CFLAGS="$ac_save_CFLAGS"
4962        LIBS="$ac_save_LIBS"
4963      fi
4964   fi
4965   if test "x$no_imlib" = x ; then
4966      echo "$ac_t""yes" 1>&6
4967      cat >> confdefs.h <<\EOF
4968 #define HAVE_GDK_IMLIB 1
4969 EOF
4970      
4971   else
4972      echo "$ac_t""no" 1>&6
4973      if test "$IMLIB_CONFIG" = "no" ; then
4974        echo "*** The imlib-config script installed by IMLIB could not be found"
4975        echo "*** If IMLIB was installed in PREFIX, make sure PREFIX/bin is in"
4976        echo "*** your path, or set the IMLIB_CONFIG environment variable to the"
4977        echo "*** full path to imlib-config."
4978      else
4979        if test -f conf.gdkimlibtest ; then
4980         :
4981        else
4982           echo "*** Could not run IMLIB test program, checking why..."
4983           CFLAGS="$CFLAGS $GDK_IMLIB_CFLAGS"
4984           LIBS="$LIBS $GDK_IMLIB_LIBS"
4985           cat > conftest.$ac_ext <<EOF
4986 #line 4987 "configure"
4987 #include "confdefs.h"
4988
4989 #include <stdio.h>
4990 #include <gdk_imlib.h>
4991
4992 int main() {
4993  return 0; 
4994 ; return 0; }
4995 EOF
4996 if { (eval echo configure:4997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4997   rm -rf conftest*
4998    echo "*** The test program compiled, but did not run. This usually means"
4999           echo "*** that the run-time linker is not finding IMLIB or finding the wrong"
5000           echo "*** version of IMLIB. If it is not finding IMLIB, you'll need to set your"
5001           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
5002           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
5003           echo "*** is required on your system"
5004           echo "***"
5005           echo "*** If you have an old version installed, it is best to remove it, although"
5006           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
5007 else
5008   echo "configure: failed program was:" >&5
5009   cat conftest.$ac_ext >&5
5010   rm -rf conftest*
5011    echo "*** The test program failed to compile or link. See the file config.log for the"
5012           echo "*** exact error that occured. This usually means IMLIB was incorrectly installed"
5013           echo "*** or that you have moved IMLIB since it was installed. In the latter case, you"
5014           echo "*** may want to edit the imlib-config script: $IMLIB_CONFIG" 
5015 fi
5016 rm -f conftest*
5017           CFLAGS="$ac_save_CFLAGS"
5018           LIBS="$ac_save_LIBS"
5019        fi
5020      fi
5021      IMLIB_CFLAGS=""
5022      IMLIB_LIBS=""
5023      ac_cv_disable_imlib=disable
5024   fi
5025   
5026   
5027   rm -f conf.gdkimlibtest
5028
5029 fi
5030 if test "$ac_cv_disable_gdk_pixbuf" = disable -a "$ac_cv_disable_imlib" = disable; then
5031         echo "configure: warning: *** Built-in image view will not be supported ***" 1>&2
5032 fi
5033
5034 # Check whether --enable-gpgme or --disable-gpgme was given.
5035 if test "${enable_gpgme+set}" = set; then
5036   enableval="$enable_gpgme"
5037   ac_cv_enable_gpgme=$enableval
5038 else
5039   ac_cv_enable_gpgme=no
5040 fi
5041
5042 if test $ac_cv_enable_gpgme = yes; then
5043           # Check whether --with-gpgme-prefix or --without-gpgme-prefix was given.
5044 if test "${with_gpgme_prefix+set}" = set; then
5045   withval="$with_gpgme_prefix"
5046   gpgme_config_prefix="$withval"
5047 else
5048   gpgme_config_prefix=""
5049 fi
5050
5051   # Check whether --enable-gpgmetest or --disable-gpgmetest was given.
5052 if test "${enable_gpgmetest+set}" = set; then
5053   enableval="$enable_gpgmetest"
5054   :
5055 else
5056   enable_gpgmetest=yes
5057 fi
5058
5059
5060   if test x$gpgme_config_prefix != x ; then
5061      gpgme_config_args="$gpgme_config_args --prefix=$gpgme_config_prefix"
5062      if test x${GPGME_CONFIG+set} != xset ; then
5063         GPGME_CONFIG=$gpgme_config_prefix/bin/gpgme-config
5064      fi
5065   fi
5066
5067   # Extract the first word of "gpgme-config", so it can be a program name with args.
5068 set dummy gpgme-config; ac_word=$2
5069 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5070 echo "configure:5071: checking for $ac_word" >&5
5071 if eval "test \"`echo '$''{'ac_cv_path_GPGME_CONFIG'+set}'`\" = set"; then
5072   echo $ac_n "(cached) $ac_c" 1>&6
5073 else
5074   case "$GPGME_CONFIG" in
5075   /*)
5076   ac_cv_path_GPGME_CONFIG="$GPGME_CONFIG" # Let the user override the test with a path.
5077   ;;
5078   ?:/*)                  
5079   ac_cv_path_GPGME_CONFIG="$GPGME_CONFIG" # Let the user override the test with a dos path.
5080   ;;
5081   *)
5082   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5083   ac_dummy="$PATH"
5084   for ac_dir in $ac_dummy; do 
5085     test -z "$ac_dir" && ac_dir=.
5086     if test -f $ac_dir/$ac_word; then
5087       ac_cv_path_GPGME_CONFIG="$ac_dir/$ac_word"
5088       break
5089     fi
5090   done
5091   IFS="$ac_save_ifs"
5092   test -z "$ac_cv_path_GPGME_CONFIG" && ac_cv_path_GPGME_CONFIG="no"
5093   ;;
5094 esac
5095 fi
5096 GPGME_CONFIG="$ac_cv_path_GPGME_CONFIG"
5097 if test -n "$GPGME_CONFIG"; then
5098   echo "$ac_t""$GPGME_CONFIG" 1>&6
5099 else
5100   echo "$ac_t""no" 1>&6
5101 fi
5102
5103   min_gpgme_version=0.1.4
5104   echo $ac_n "checking for GPGME - version >= $min_gpgme_version""... $ac_c" 1>&6
5105 echo "configure:5106: checking for GPGME - version >= $min_gpgme_version" >&5
5106   no_gpgme=""
5107   if test "$GPGME_CONFIG" = "no" ; then
5108     no_gpgme=yes
5109   else
5110     GPGME_CFLAGS=`$GPGME_CONFIG $gpgme_config_args --cflags`
5111     GPGME_LIBS=`$GPGME_CONFIG $gpgme_config_args --libs`
5112     gpgme_config_version=`$GPGME_CONFIG $gpgme_config_args --version`
5113     if test "x$enable_gpgmetest" = "xyes" ; then
5114       ac_save_CFLAGS="$CFLAGS"
5115       ac_save_LIBS="$LIBS"
5116       CFLAGS="$CFLAGS $GPGME_CFLAGS"
5117       LIBS="$LIBS $GPGME_LIBS"
5118       rm -f conf.gpgmetest
5119       if test "$cross_compiling" = yes; then
5120   echo $ac_n "cross compiling; assumed OK... $ac_c"
5121 else
5122   cat > conftest.$ac_ext <<EOF
5123 #line 5124 "configure"
5124 #include "confdefs.h"
5125
5126 #include <stdio.h>
5127 #include <stdlib.h>
5128 #include <string.h>
5129 #include <gpgme.h>
5130
5131 int
5132 main ()
5133 {
5134  system ("touch conf.gpgmetest");
5135
5136  if( strcmp( gpgme_check_version(NULL), "$gpgme_config_version" ) )
5137  {
5138    printf("\n"
5139 "*** 'gpgme-config --version' returned %s, but GPGME (%s) was found!\n",
5140               "$gpgme_config_version", gpgme_check_version(NULL) );
5141    printf(
5142 "*** If gpgme-config was correct, then it is best to remove the old\n"
5143 "*** version of GPGME.  You may also be able to fix the error\n"
5144 "*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"
5145 "*** /etc/ld.so.conf.  Make sure you have run ldconfig if that is\n"
5146 "*** required on your system.\n"
5147 "*** If gpgme-config was wrong, set the environment variable GPGME_CONFIG\n"
5148 "*** to point to the correct copy of gpgme-config, \n"
5149 "*** and remove the file config.cache before re-running configure\n"
5150         );
5151  }
5152  else if ( strcmp(gpgme_check_version(NULL), GPGME_VERSION ) )
5153  {
5154    printf("\n*** GPGME header file (version %s) does not match\n",
5155             GPGME_VERSION);
5156    printf("*** library (version %s)\n", gpgme_check_version(NULL) );
5157  }
5158  else
5159  {
5160         if ( gpgme_check_version( "$min_gpgme_version" ) )
5161              return 0;
5162   printf("no\n"
5163 "*** An old version of GPGME (%s) was found.\n", gpgme_check_version(NULL) );
5164   printf(
5165 "*** You need a version of GPGME newer than %s.\n", "$min_gpgme_version" );
5166   printf(
5167 "*** The latest version of GPGME is always available at\n"
5168 "***      ftp://ftp.gnupg.org/pub/gcrypt/alpha/gpgme/\n"
5169 "*** \n"
5170 "*** If you have already installed a sufficiently new version, this error\n"
5171 "*** probably means that the wrong copy of the gpgme-config shell script is\n"
5172 "*** being found. The easiest way to fix this is to remove the old version\n"
5173 "*** of GPGME, but you can also set the GPGME_CONFIG environment to point to\n"
5174 "*** the correct copy of gpgme-config. (In this case, you will have to\n"
5175 "*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"
5176 "*** so that the correct libraries are found at run-time).\n"
5177       );
5178     }
5179   return 1;
5180 }
5181
5182 EOF
5183 if { (eval echo configure:5184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5184 then
5185   :
5186 else
5187   echo "configure: failed program was:" >&5
5188   cat conftest.$ac_ext >&5
5189   rm -fr conftest*
5190   no_gpgme=yes
5191 fi
5192 rm -fr conftest*
5193 fi
5194
5195        CFLAGS="$ac_save_CFLAGS"
5196        LIBS="$ac_save_LIBS"
5197      fi
5198   fi
5199   if test "x$no_gpgme" = x ; then
5200      echo "$ac_t""yes" 1>&6
5201      cat >> confdefs.h <<\EOF
5202 #define USE_GPGME 1
5203 EOF
5204
5205   else
5206      if test -f conf.gpgmetest ; then
5207         :
5208      else
5209         echo "$ac_t""no" 1>&6
5210      fi
5211      if test "$GPGME_CONFIG" = "no" ; then
5212        echo "*** The gpgme-config script installed by GPGME could not be found"
5213        echo "*** If GPGME was installed in PREFIX, make sure PREFIX/bin is in"
5214        echo "*** your path, or set the GPGME_CONFIG environment variable to the"
5215        echo "*** full path to gpgme-config."
5216      else
5217        if test -f conf.gpgmetest ; then
5218         :
5219        else
5220           echo "*** Could not run gpgme test program, checking why..."
5221           CFLAGS="$CFLAGS $GPGME_CFLAGS"
5222           LIBS="$LIBS $GPGME_LIBS"
5223           cat > conftest.$ac_ext <<EOF
5224 #line 5225 "configure"
5225 #include "confdefs.h"
5226
5227 #include <stdio.h>
5228 #include <stdlib.h>
5229 #include <string.h>
5230 #include <gpgme.h>
5231
5232 int main() {
5233  gpgme_check_version(NULL); return 0 
5234 ; return 0; }
5235 EOF
5236 if { (eval echo configure:5237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5237   rm -rf conftest*
5238    
5239 echo "*** The test program compiled, but did not run. This usually means"
5240 echo "*** that the run-time linker is not finding GPGME or finding the wrong"
5241 echo "*** version of GPGME. If it is not finding GPGME, you'll need to set your"
5242 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
5243 echo "*** to the installed location  Also, make sure you have run ldconfig if"
5244 echo "*** that is required on your system"
5245 echo "***"
5246 echo "*** If you have an old version installed, it is best to remove it,"
5247 echo "*** although you may also be able to get things to work by"
5248 echo "*** modifying LD_LIBRARY_PATH"
5249 echo "***"
5250         
5251 else
5252   echo "configure: failed program was:" >&5
5253   cat conftest.$ac_ext >&5
5254   rm -rf conftest*
5255   
5256 echo "*** The test program failed to compile or link. See the file config.log"
5257 echo "*** for the exact error that occured. This usually means GPGME was"
5258 echo "*** incorrectly installed or that you have moved GPGME since it was"
5259 echo "*** installed. In the latter case, you may want to edit the"
5260 echo "*** gpgme-config script: $GPGME_CONFIG" 
5261         
5262 fi
5263 rm -f conftest*
5264           CFLAGS="$ac_save_CFLAGS"
5265           LIBS="$ac_save_LIBS"
5266        fi
5267      fi
5268      GPGME_CFLAGS=""
5269      GPGME_LIBS=""
5270      use_gpgme=no
5271   fi
5272   
5273   
5274   rm -f conf.gpgmetest
5275
5276 fi
5277
5278 # Check whether --enable-compface or --disable-compface was given.
5279 if test "${enable_compface+set}" = set; then
5280   enableval="$enable_compface"
5281   ac_cv_disable_compface=disable
5282 else
5283   ac_cv_disable_compface=no
5284 fi
5285
5286 if test "$ac_cv_disable_compface" = no; then
5287         echo $ac_n "checking for uncompface in -lcompface""... $ac_c" 1>&6
5288 echo "configure:5289: checking for uncompface in -lcompface" >&5
5289 ac_lib_var=`echo compface'_'uncompface | sed 'y%./+-%__p_%'`
5290 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5291   echo $ac_n "(cached) $ac_c" 1>&6
5292 else
5293   ac_save_LIBS="$LIBS"
5294 LIBS="-lcompface  $LIBS"
5295 cat > conftest.$ac_ext <<EOF
5296 #line 5297 "configure"
5297 #include "confdefs.h"
5298 /* Override any gcc2 internal prototype to avoid an error.  */
5299 /* We use char because int might match the return type of a gcc2
5300     builtin and then its argument prototype would still apply.  */
5301 char uncompface();
5302
5303 int main() {
5304 uncompface()
5305 ; return 0; }
5306 EOF
5307 if { (eval echo configure:5308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5308   rm -rf conftest*
5309   eval "ac_cv_lib_$ac_lib_var=yes"
5310 else
5311   echo "configure: failed program was:" >&5
5312   cat conftest.$ac_ext >&5
5313   rm -rf conftest*
5314   eval "ac_cv_lib_$ac_lib_var=no"
5315 fi
5316 rm -f conftest*
5317 LIBS="$ac_save_LIBS"
5318
5319 fi
5320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5321   echo "$ac_t""yes" 1>&6
5322     ac_tr_lib=HAVE_LIB`echo compface | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5323     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5324   cat >> confdefs.h <<EOF
5325 #define $ac_tr_lib 1
5326 EOF
5327
5328   LIBS="-lcompface $LIBS"
5329
5330 else
5331   echo "$ac_t""no" 1>&6
5332 fi
5333
5334 fi
5335
5336 # Check whether --enable-jconv or --disable-jconv was given.
5337 if test "${enable_jconv+set}" = set; then
5338   enableval="$enable_jconv"
5339   ac_cv_disable_jconv=disable
5340 else
5341   ac_cv_disable_jconv=no
5342 fi
5343
5344 if test "$ac_cv_disable_jconv" = no; then
5345         echo $ac_n "checking for jconv_alloc_conv in -ljconv""... $ac_c" 1>&6
5346 echo "configure:5347: checking for jconv_alloc_conv in -ljconv" >&5
5347 ac_lib_var=`echo jconv'_'jconv_alloc_conv | sed 'y%./+-%__p_%'`
5348 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5349   echo $ac_n "(cached) $ac_c" 1>&6
5350 else
5351   ac_save_LIBS="$LIBS"
5352 LIBS="-ljconv  $LIBS"
5353 cat > conftest.$ac_ext <<EOF
5354 #line 5355 "configure"
5355 #include "confdefs.h"
5356 /* Override any gcc2 internal prototype to avoid an error.  */
5357 /* We use char because int might match the return type of a gcc2
5358     builtin and then its argument prototype would still apply.  */
5359 char jconv_alloc_conv();
5360
5361 int main() {
5362 jconv_alloc_conv()
5363 ; return 0; }
5364 EOF
5365 if { (eval echo configure:5366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5366   rm -rf conftest*
5367   eval "ac_cv_lib_$ac_lib_var=yes"
5368 else
5369   echo "configure: failed program was:" >&5
5370   cat conftest.$ac_ext >&5
5371   rm -rf conftest*
5372   eval "ac_cv_lib_$ac_lib_var=no"
5373 fi
5374 rm -f conftest*
5375 LIBS="$ac_save_LIBS"
5376
5377 fi
5378 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5379   echo "$ac_t""yes" 1>&6
5380     ac_tr_lib=HAVE_LIB`echo jconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5381     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5382   cat >> confdefs.h <<EOF
5383 #define $ac_tr_lib 1
5384 EOF
5385
5386   LIBS="-ljconv $LIBS"
5387
5388 else
5389   echo "$ac_t""no" 1>&6
5390 fi
5391
5392 fi
5393
5394 echo $ac_n "checking for setlocale in -lxpg4""... $ac_c" 1>&6
5395 echo "configure:5396: checking for setlocale in -lxpg4" >&5
5396 ac_lib_var=`echo xpg4'_'setlocale | sed 'y%./+-%__p_%'`
5397 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5398   echo $ac_n "(cached) $ac_c" 1>&6
5399 else
5400   ac_save_LIBS="$LIBS"
5401 LIBS="-lxpg4  $LIBS"
5402 cat > conftest.$ac_ext <<EOF
5403 #line 5404 "configure"
5404 #include "confdefs.h"
5405 /* Override any gcc2 internal prototype to avoid an error.  */
5406 /* We use char because int might match the return type of a gcc2
5407     builtin and then its argument prototype would still apply.  */
5408 char setlocale();
5409
5410 int main() {
5411 setlocale()
5412 ; return 0; }
5413 EOF
5414 if { (eval echo configure:5415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5415   rm -rf conftest*
5416   eval "ac_cv_lib_$ac_lib_var=yes"
5417 else
5418   echo "configure: failed program was:" >&5
5419   cat conftest.$ac_ext >&5
5420   rm -rf conftest*
5421   eval "ac_cv_lib_$ac_lib_var=no"
5422 fi
5423 rm -f conftest*
5424 LIBS="$ac_save_LIBS"
5425
5426 fi
5427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5428   echo "$ac_t""yes" 1>&6
5429     ac_tr_lib=HAVE_LIB`echo xpg4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5430     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5431   cat >> confdefs.h <<EOF
5432 #define $ac_tr_lib 1
5433 EOF
5434
5435   LIBS="-lxpg4 $LIBS"
5436
5437 else
5438   echo "$ac_t""no" 1>&6
5439 fi
5440
5441
5442 # Check whether --enable-threads or --disable-threads was given.
5443 if test "${enable_threads+set}" = set; then
5444   enableval="$enable_threads"
5445   use_threads=$enableval
5446 else
5447   use_threads=no
5448 fi
5449
5450
5451 echo $ac_n "checking whether to use threads""... $ac_c" 1>&6
5452 echo "configure:5453: checking whether to use threads" >&5
5453 if test x"$use_threads" = xyes ; then
5454         echo "$ac_t""yes" 1>&6
5455         if test ! -z `$GLIB_CONFIG --help 2>&1 |grep 'gthread'` ; then
5456                 CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
5457                 LIBS="$LIBS `$GLIB_CONFIG --libs gthread`"
5458                 cat >> confdefs.h <<\EOF
5459 #define USE_THREADS 1
5460 EOF
5461
5462         else
5463                 { echo "configure: error: Sylpheed requires GThread from GLib to use threading." 1>&2; exit 1; }
5464         fi
5465 else
5466         echo "$ac_t""no" 1>&6
5467 fi
5468
5469 # Check whether --enable-ipv6 or --disable-ipv6 was given.
5470 if test "${enable_ipv6+set}" = set; then
5471   enableval="$enable_ipv6"
5472   ac_cv_enableipv6=$enableval
5473 else
5474   ac_cv_enableipv6=no
5475 fi
5476
5477
5478 if test x"$ac_cv_enableipv6" = xyes; then
5479         echo $ac_n "checking for IPv6 support""... $ac_c" 1>&6
5480 echo "configure:5481: checking for IPv6 support" >&5
5481         if eval "test \"`echo '$''{'ac_cv_ipv6'+set}'`\" = set"; then
5482   echo $ac_n "(cached) $ac_c" 1>&6
5483 else
5484   
5485                 cat > conftest.$ac_ext <<EOF
5486 #line 5487 "configure"
5487 #include "confdefs.h"
5488 #define INET6
5489                                 #include <sys/types.h>
5490                                 #include <netinet/in.h>
5491 int main() {
5492 int x = IPPROTO_IPV6; struct in6_addr a;
5493 ; return 0; }
5494 EOF
5495 if { (eval echo configure:5496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5496   rm -rf conftest*
5497   ac_cv_ipv6=yes
5498 else
5499   echo "configure: failed program was:" >&5
5500   cat conftest.$ac_ext >&5
5501   rm -rf conftest*
5502   ac_cv_ipv6=no
5503 fi
5504 rm -f conftest*
5505         
5506 fi
5507
5508         echo "$ac_t""$ac_cv_ipv6" 1>&6
5509         if test $ac_cv_ipv6 = yes; then
5510                 cat >> confdefs.h <<\EOF
5511 #define INET6 1
5512 EOF
5513
5514         fi
5515 fi
5516
5517 ac_header_dirent=no
5518 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
5519 do
5520 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5521 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
5522 echo "configure:5523: checking for $ac_hdr that defines DIR" >&5
5523 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
5524   echo $ac_n "(cached) $ac_c" 1>&6
5525 else
5526   cat > conftest.$ac_ext <<EOF
5527 #line 5528 "configure"
5528 #include "confdefs.h"
5529 #include <sys/types.h>
5530 #include <$ac_hdr>
5531 int main() {
5532 DIR *dirp = 0;
5533 ; return 0; }
5534 EOF
5535 if { (eval echo configure:5536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5536   rm -rf conftest*
5537   eval "ac_cv_header_dirent_$ac_safe=yes"
5538 else
5539   echo "configure: failed program was:" >&5
5540   cat conftest.$ac_ext >&5
5541   rm -rf conftest*
5542   eval "ac_cv_header_dirent_$ac_safe=no"
5543 fi
5544 rm -f conftest*
5545 fi
5546 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
5547   echo "$ac_t""yes" 1>&6
5548     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5549   cat >> confdefs.h <<EOF
5550 #define $ac_tr_hdr 1
5551 EOF
5552  ac_header_dirent=$ac_hdr; break
5553 else
5554   echo "$ac_t""no" 1>&6
5555 fi
5556 done
5557 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5558 if test $ac_header_dirent = dirent.h; then
5559 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
5560 echo "configure:5561: checking for opendir in -ldir" >&5
5561 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
5562 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5563   echo $ac_n "(cached) $ac_c" 1>&6
5564 else
5565   ac_save_LIBS="$LIBS"
5566 LIBS="-ldir  $LIBS"
5567 cat > conftest.$ac_ext <<EOF
5568 #line 5569 "configure"
5569 #include "confdefs.h"
5570 /* Override any gcc2 internal prototype to avoid an error.  */
5571 /* We use char because int might match the return type of a gcc2
5572     builtin and then its argument prototype would still apply.  */
5573 char opendir();
5574
5575 int main() {
5576 opendir()
5577 ; return 0; }
5578 EOF
5579 if { (eval echo configure:5580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5580   rm -rf conftest*
5581   eval "ac_cv_lib_$ac_lib_var=yes"
5582 else
5583   echo "configure: failed program was:" >&5
5584   cat conftest.$ac_ext >&5
5585   rm -rf conftest*
5586   eval "ac_cv_lib_$ac_lib_var=no"
5587 fi
5588 rm -f conftest*
5589 LIBS="$ac_save_LIBS"
5590
5591 fi
5592 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5593   echo "$ac_t""yes" 1>&6
5594   LIBS="$LIBS -ldir"
5595 else
5596   echo "$ac_t""no" 1>&6
5597 fi
5598
5599 else
5600 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
5601 echo "configure:5602: checking for opendir in -lx" >&5
5602 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
5603 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5604   echo $ac_n "(cached) $ac_c" 1>&6
5605 else
5606   ac_save_LIBS="$LIBS"
5607 LIBS="-lx  $LIBS"
5608 cat > conftest.$ac_ext <<EOF
5609 #line 5610 "configure"
5610 #include "confdefs.h"
5611 /* Override any gcc2 internal prototype to avoid an error.  */
5612 /* We use char because int might match the return type of a gcc2
5613     builtin and then its argument prototype would still apply.  */
5614 char opendir();
5615
5616 int main() {
5617 opendir()
5618 ; return 0; }
5619 EOF
5620 if { (eval echo configure:5621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5621   rm -rf conftest*
5622   eval "ac_cv_lib_$ac_lib_var=yes"
5623 else
5624   echo "configure: failed program was:" >&5
5625   cat conftest.$ac_ext >&5
5626   rm -rf conftest*
5627   eval "ac_cv_lib_$ac_lib_var=no"
5628 fi
5629 rm -f conftest*
5630 LIBS="$ac_save_LIBS"
5631
5632 fi
5633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5634   echo "$ac_t""yes" 1>&6
5635   LIBS="$LIBS -lx"
5636 else
5637   echo "$ac_t""no" 1>&6
5638 fi
5639
5640 fi
5641
5642 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5643 echo "configure:5644: checking for ANSI C header files" >&5
5644 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5645   echo $ac_n "(cached) $ac_c" 1>&6
5646 else
5647   cat > conftest.$ac_ext <<EOF
5648 #line 5649 "configure"
5649 #include "confdefs.h"
5650 #include <stdlib.h>
5651 #include <stdarg.h>
5652 #include <string.h>
5653 #include <float.h>
5654 EOF
5655 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5656 { (eval echo configure:5657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5657 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5658 if test -z "$ac_err"; then
5659   rm -rf conftest*
5660   ac_cv_header_stdc=yes
5661 else
5662   echo "$ac_err" >&5
5663   echo "configure: failed program was:" >&5
5664   cat conftest.$ac_ext >&5
5665   rm -rf conftest*
5666   ac_cv_header_stdc=no
5667 fi
5668 rm -f conftest*
5669
5670 if test $ac_cv_header_stdc = yes; then
5671   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5672 cat > conftest.$ac_ext <<EOF
5673 #line 5674 "configure"
5674 #include "confdefs.h"
5675 #include <string.h>
5676 EOF
5677 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5678   egrep "memchr" >/dev/null 2>&1; then
5679   :
5680 else
5681   rm -rf conftest*
5682   ac_cv_header_stdc=no
5683 fi
5684 rm -f conftest*
5685
5686 fi
5687
5688 if test $ac_cv_header_stdc = yes; then
5689   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5690 cat > conftest.$ac_ext <<EOF
5691 #line 5692 "configure"
5692 #include "confdefs.h"
5693 #include <stdlib.h>
5694 EOF
5695 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5696   egrep "free" >/dev/null 2>&1; then
5697   :
5698 else
5699   rm -rf conftest*
5700   ac_cv_header_stdc=no
5701 fi
5702 rm -f conftest*
5703
5704 fi
5705
5706 if test $ac_cv_header_stdc = yes; then
5707   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5708 if test "$cross_compiling" = yes; then
5709   :
5710 else
5711   cat > conftest.$ac_ext <<EOF
5712 #line 5713 "configure"
5713 #include "confdefs.h"
5714 #include <ctype.h>
5715 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5716 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5717 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5718 int main () { int i; for (i = 0; i < 256; i++)
5719 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5720 exit (0); }
5721
5722 EOF
5723 if { (eval echo configure:5724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5724 then
5725   :
5726 else
5727   echo "configure: failed program was:" >&5
5728   cat conftest.$ac_ext >&5
5729   rm -fr conftest*
5730   ac_cv_header_stdc=no
5731 fi
5732 rm -fr conftest*
5733 fi
5734
5735 fi
5736 fi
5737
5738 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5739 if test $ac_cv_header_stdc = yes; then
5740   cat >> confdefs.h <<\EOF
5741 #define STDC_HEADERS 1
5742 EOF
5743
5744 fi
5745
5746 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
5747 echo "configure:5748: checking for sys/wait.h that is POSIX.1 compatible" >&5
5748 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
5749   echo $ac_n "(cached) $ac_c" 1>&6
5750 else
5751   cat > conftest.$ac_ext <<EOF
5752 #line 5753 "configure"
5753 #include "confdefs.h"
5754 #include <sys/types.h>
5755 #include <sys/wait.h>
5756 #ifndef WEXITSTATUS
5757 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5758 #endif
5759 #ifndef WIFEXITED
5760 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5761 #endif
5762 int main() {
5763 int s;
5764 wait (&s);
5765 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5766 ; return 0; }
5767 EOF
5768 if { (eval echo configure:5769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5769   rm -rf conftest*
5770   ac_cv_header_sys_wait_h=yes
5771 else
5772   echo "configure: failed program was:" >&5
5773   cat conftest.$ac_ext >&5
5774   rm -rf conftest*
5775   ac_cv_header_sys_wait_h=no
5776 fi
5777 rm -f conftest*
5778 fi
5779
5780 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
5781 if test $ac_cv_header_sys_wait_h = yes; then
5782   cat >> confdefs.h <<\EOF
5783 #define HAVE_SYS_WAIT_H 1
5784 EOF
5785
5786 fi
5787
5788 for ac_hdr in fcntl.h sys/file.h unistd.h paths.h sys/param.h
5789 do
5790 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5791 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5792 echo "configure:5793: checking for $ac_hdr" >&5
5793 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5794   echo $ac_n "(cached) $ac_c" 1>&6
5795 else
5796   cat > conftest.$ac_ext <<EOF
5797 #line 5798 "configure"
5798 #include "confdefs.h"
5799 #include <$ac_hdr>
5800 EOF
5801 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5802 { (eval echo configure:5803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5803 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5804 if test -z "$ac_err"; then
5805   rm -rf conftest*
5806   eval "ac_cv_header_$ac_safe=yes"
5807 else
5808   echo "$ac_err" >&5
5809   echo "configure: failed program was:" >&5
5810   cat conftest.$ac_ext >&5
5811   rm -rf conftest*
5812   eval "ac_cv_header_$ac_safe=no"
5813 fi
5814 rm -f conftest*
5815 fi
5816 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5817   echo "$ac_t""yes" 1>&6
5818     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5819   cat >> confdefs.h <<EOF
5820 #define $ac_tr_hdr 1
5821 EOF
5822  
5823 else
5824   echo "$ac_t""no" 1>&6
5825 fi
5826 done
5827
5828
5829 echo $ac_n "checking for working const""... $ac_c" 1>&6
5830 echo "configure:5831: checking for working const" >&5
5831 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5832   echo $ac_n "(cached) $ac_c" 1>&6
5833 else
5834   cat > conftest.$ac_ext <<EOF
5835 #line 5836 "configure"
5836 #include "confdefs.h"
5837
5838 int main() {
5839
5840 /* Ultrix mips cc rejects this.  */
5841 typedef int charset[2]; const charset x;
5842 /* SunOS 4.1.1 cc rejects this.  */
5843 char const *const *ccp;
5844 char **p;
5845 /* NEC SVR4.0.2 mips cc rejects this.  */
5846 struct point {int x, y;};
5847 static struct point const zero = {0,0};
5848 /* AIX XL C 1.02.0.0 rejects this.
5849    It does not let you subtract one const X* pointer from another in an arm
5850    of an if-expression whose if-part is not a constant expression */
5851 const char *g = "string";
5852 ccp = &g + (g ? g-g : 0);
5853 /* HPUX 7.0 cc rejects these. */
5854 ++ccp;
5855 p = (char**) ccp;
5856 ccp = (char const *const *) p;
5857 { /* SCO 3.2v4 cc rejects this.  */
5858   char *t;
5859   char const *s = 0 ? (char *) 0 : (char const *) 0;
5860
5861   *t++ = 0;
5862 }
5863 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5864   int x[] = {25, 17};
5865   const int *foo = &x[0];
5866   ++foo;
5867 }
5868 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5869   typedef const int *iptr;
5870   iptr p = 0;
5871   ++p;
5872 }
5873 { /* AIX XL C 1.02.0.0 rejects this saying
5874      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5875   struct s { int j; const int *ap[3]; };
5876   struct s *b; b->j = 5;
5877 }
5878 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5879   const int foo = 10;
5880 }
5881
5882 ; return 0; }
5883 EOF
5884 if { (eval echo configure:5885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5885   rm -rf conftest*
5886   ac_cv_c_const=yes
5887 else
5888   echo "configure: failed program was:" >&5
5889   cat conftest.$ac_ext >&5
5890   rm -rf conftest*
5891   ac_cv_c_const=no
5892 fi
5893 rm -f conftest*
5894 fi
5895
5896 echo "$ac_t""$ac_cv_c_const" 1>&6
5897 if test $ac_cv_c_const = no; then
5898   cat >> confdefs.h <<\EOF
5899 #define const 
5900 EOF
5901
5902 fi
5903
5904 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5905 echo "configure:5906: checking for off_t" >&5
5906 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5907   echo $ac_n "(cached) $ac_c" 1>&6
5908 else
5909   cat > conftest.$ac_ext <<EOF
5910 #line 5911 "configure"
5911 #include "confdefs.h"
5912 #include <sys/types.h>
5913 #if STDC_HEADERS
5914 #include <stdlib.h>
5915 #include <stddef.h>
5916 #endif
5917 EOF
5918 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5919   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5920   rm -rf conftest*
5921   ac_cv_type_off_t=yes
5922 else
5923   rm -rf conftest*
5924   ac_cv_type_off_t=no
5925 fi
5926 rm -f conftest*
5927
5928 fi
5929 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5930 if test $ac_cv_type_off_t = no; then
5931   cat >> confdefs.h <<\EOF
5932 #define off_t long
5933 EOF
5934
5935 fi
5936
5937 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
5938 echo "configure:5939: checking for pid_t" >&5
5939 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
5940   echo $ac_n "(cached) $ac_c" 1>&6
5941 else
5942   cat > conftest.$ac_ext <<EOF
5943 #line 5944 "configure"
5944 #include "confdefs.h"
5945 #include <sys/types.h>
5946 #if STDC_HEADERS
5947 #include <stdlib.h>
5948 #include <stddef.h>
5949 #endif
5950 EOF
5951 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5952   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5953   rm -rf conftest*
5954   ac_cv_type_pid_t=yes
5955 else
5956   rm -rf conftest*
5957   ac_cv_type_pid_t=no
5958 fi
5959 rm -f conftest*
5960
5961 fi
5962 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
5963 if test $ac_cv_type_pid_t = no; then
5964   cat >> confdefs.h <<\EOF
5965 #define pid_t int
5966 EOF
5967
5968 fi
5969
5970 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5971 echo "configure:5972: checking for size_t" >&5
5972 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5973   echo $ac_n "(cached) $ac_c" 1>&6
5974 else
5975   cat > conftest.$ac_ext <<EOF
5976 #line 5977 "configure"
5977 #include "confdefs.h"
5978 #include <sys/types.h>
5979 #if STDC_HEADERS
5980 #include <stdlib.h>
5981 #include <stddef.h>
5982 #endif
5983 EOF
5984 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5985   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5986   rm -rf conftest*
5987   ac_cv_type_size_t=yes
5988 else
5989   rm -rf conftest*
5990   ac_cv_type_size_t=no
5991 fi
5992 rm -f conftest*
5993
5994 fi
5995 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5996 if test $ac_cv_type_size_t = no; then
5997   cat >> confdefs.h <<\EOF
5998 #define size_t unsigned
5999 EOF
6000
6001 fi
6002
6003 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
6004 echo "configure:6005: checking whether struct tm is in sys/time.h or time.h" >&5
6005 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
6006   echo $ac_n "(cached) $ac_c" 1>&6
6007 else
6008   cat > conftest.$ac_ext <<EOF
6009 #line 6010 "configure"
6010 #include "confdefs.h"
6011 #include <sys/types.h>
6012 #include <time.h>
6013 int main() {
6014 struct tm *tp; tp->tm_sec;
6015 ; return 0; }
6016 EOF
6017 if { (eval echo configure:6018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6018   rm -rf conftest*
6019   ac_cv_struct_tm=time.h
6020 else
6021   echo "configure: failed program was:" >&5
6022   cat conftest.$ac_ext >&5
6023   rm -rf conftest*
6024   ac_cv_struct_tm=sys/time.h
6025 fi
6026 rm -f conftest*
6027 fi
6028
6029 echo "$ac_t""$ac_cv_struct_tm" 1>&6
6030 if test $ac_cv_struct_tm = sys/time.h; then
6031   cat >> confdefs.h <<\EOF
6032 #define TM_IN_SYS_TIME 1
6033 EOF
6034
6035 fi
6036
6037 echo $ac_n "checking for wint_t""... $ac_c" 1>&6
6038 echo "configure:6039: checking for wint_t" >&5
6039 if eval "test \"`echo '$''{'ac_cv_type_wint_t'+set}'`\" = set"; then
6040   echo $ac_n "(cached) $ac_c" 1>&6
6041 else
6042   cat > conftest.$ac_ext <<EOF
6043 #line 6044 "configure"
6044 #include "confdefs.h"
6045 #include <sys/types.h>
6046 #if STDC_HEADERS
6047 #include <stdlib.h>
6048 #include <stddef.h>
6049 #endif
6050 EOF
6051 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6052   egrep "(^|[^a-zA-Z_0-9])wint_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6053   rm -rf conftest*
6054   ac_cv_type_wint_t=yes
6055 else
6056   rm -rf conftest*
6057   ac_cv_type_wint_t=no
6058 fi
6059 rm -f conftest*
6060
6061 fi
6062 echo "$ac_t""$ac_cv_type_wint_t" 1>&6
6063 if test $ac_cv_type_wint_t = no; then
6064   cat >> confdefs.h <<\EOF
6065 #define wint_t unsigned int
6066 EOF
6067
6068 fi
6069
6070
6071 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6072 # for constant arguments.  Useless!
6073 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
6074 echo "configure:6075: checking for working alloca.h" >&5
6075 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
6076   echo $ac_n "(cached) $ac_c" 1>&6
6077 else
6078   cat > conftest.$ac_ext <<EOF
6079 #line 6080 "configure"
6080 #include "confdefs.h"
6081 #include <alloca.h>
6082 int main() {
6083 char *p = alloca(2 * sizeof(int));
6084 ; return 0; }
6085 EOF
6086 if { (eval echo configure:6087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6087   rm -rf conftest*
6088   ac_cv_header_alloca_h=yes
6089 else
6090   echo "configure: failed program was:" >&5
6091   cat conftest.$ac_ext >&5
6092   rm -rf conftest*
6093   ac_cv_header_alloca_h=no
6094 fi
6095 rm -f conftest*
6096 fi
6097
6098 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
6099 if test $ac_cv_header_alloca_h = yes; then
6100   cat >> confdefs.h <<\EOF
6101 #define HAVE_ALLOCA_H 1
6102 EOF
6103
6104 fi
6105
6106 echo $ac_n "checking for alloca""... $ac_c" 1>&6
6107 echo "configure:6108: checking for alloca" >&5
6108 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6109   echo $ac_n "(cached) $ac_c" 1>&6
6110 else
6111   cat > conftest.$ac_ext <<EOF
6112 #line 6113 "configure"
6113 #include "confdefs.h"
6114
6115 #ifdef __GNUC__
6116 # define alloca __builtin_alloca
6117 #else
6118 # ifdef _MSC_VER
6119 #  include <malloc.h>
6120 #  define alloca _alloca
6121 # else
6122 #  if HAVE_ALLOCA_H
6123 #   include <alloca.h>
6124 #  else
6125 #   ifdef _AIX
6126  #pragma alloca
6127 #   else
6128 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6129 char *alloca ();
6130 #    endif
6131 #   endif
6132 #  endif
6133 # endif
6134 #endif
6135
6136 int main() {
6137 char *p = (char *) alloca(1);
6138 ; return 0; }
6139 EOF
6140 if { (eval echo configure:6141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6141   rm -rf conftest*
6142   ac_cv_func_alloca_works=yes
6143 else
6144   echo "configure: failed program was:" >&5
6145   cat conftest.$ac_ext >&5
6146   rm -rf conftest*
6147   ac_cv_func_alloca_works=no
6148 fi
6149 rm -f conftest*
6150 fi
6151
6152 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6153 if test $ac_cv_func_alloca_works = yes; then
6154   cat >> confdefs.h <<\EOF
6155 #define HAVE_ALLOCA 1
6156 EOF
6157
6158 fi
6159
6160 if test $ac_cv_func_alloca_works = no; then
6161   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6162   # that cause trouble.  Some versions do not even contain alloca or
6163   # contain a buggy version.  If you still want to use their alloca,
6164   # use ar to extract alloca.o from them instead of compiling alloca.c.
6165   ALLOCA=alloca.${ac_objext}
6166   cat >> confdefs.h <<\EOF
6167 #define C_ALLOCA 1
6168 EOF
6169
6170
6171 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
6172 echo "configure:6173: checking whether alloca needs Cray hooks" >&5
6173 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6174   echo $ac_n "(cached) $ac_c" 1>&6
6175 else
6176   cat > conftest.$ac_ext <<EOF
6177 #line 6178 "configure"
6178 #include "confdefs.h"
6179 #if defined(CRAY) && ! defined(CRAY2)
6180 webecray
6181 #else
6182 wenotbecray
6183 #endif
6184
6185 EOF
6186 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6187   egrep "webecray" >/dev/null 2>&1; then
6188   rm -rf conftest*
6189   ac_cv_os_cray=yes
6190 else
6191   rm -rf conftest*
6192   ac_cv_os_cray=no
6193 fi
6194 rm -f conftest*
6195
6196 fi
6197
6198 echo "$ac_t""$ac_cv_os_cray" 1>&6
6199 if test $ac_cv_os_cray = yes; then
6200 for ac_func in _getb67 GETB67 getb67; do
6201   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6202 echo "configure:6203: checking for $ac_func" >&5
6203 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6204   echo $ac_n "(cached) $ac_c" 1>&6
6205 else
6206   cat > conftest.$ac_ext <<EOF
6207 #line 6208 "configure"
6208 #include "confdefs.h"
6209 /* System header to define __stub macros and hopefully few prototypes,
6210     which can conflict with char $ac_func(); below.  */
6211 #include <assert.h>
6212 /* Override any gcc2 internal prototype to avoid an error.  */
6213 /* We use char because int might match the return type of a gcc2
6214     builtin and then its argument prototype would still apply.  */
6215 char $ac_func();
6216
6217 int main() {
6218
6219 /* The GNU C library defines this for functions which it implements
6220     to always fail with ENOSYS.  Some functions are actually named
6221     something starting with __ and the normal name is an alias.  */
6222 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6223 choke me
6224 #else
6225 $ac_func();
6226 #endif
6227
6228 ; return 0; }
6229 EOF
6230 if { (eval echo configure:6231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6231   rm -rf conftest*
6232   eval "ac_cv_func_$ac_func=yes"
6233 else
6234   echo "configure: failed program was:" >&5
6235   cat conftest.$ac_ext >&5
6236   rm -rf conftest*
6237   eval "ac_cv_func_$ac_func=no"
6238 fi
6239 rm -f conftest*
6240 fi
6241
6242 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6243   echo "$ac_t""yes" 1>&6
6244   cat >> confdefs.h <<EOF
6245 #define CRAY_STACKSEG_END $ac_func
6246 EOF
6247
6248   break
6249 else
6250   echo "$ac_t""no" 1>&6
6251 fi
6252
6253 done
6254 fi
6255
6256 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6257 echo "configure:6258: checking stack direction for C alloca" >&5
6258 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6259   echo $ac_n "(cached) $ac_c" 1>&6
6260 else
6261   if test "$cross_compiling" = yes; then
6262   ac_cv_c_stack_direction=0
6263 else
6264   cat > conftest.$ac_ext <<EOF
6265 #line 6266 "configure"
6266 #include "confdefs.h"
6267 find_stack_direction ()
6268 {
6269   static char *addr = 0;
6270   auto char dummy;
6271   if (addr == 0)
6272     {
6273       addr = &dummy;
6274       return find_stack_direction ();
6275     }
6276   else
6277     return (&dummy > addr) ? 1 : -1;
6278 }
6279 main ()
6280 {
6281   exit (find_stack_direction() < 0);
6282 }
6283 EOF
6284 if { (eval echo configure:6285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6285 then
6286   ac_cv_c_stack_direction=1
6287 else
6288   echo "configure: failed program was:" >&5
6289   cat conftest.$ac_ext >&5
6290   rm -fr conftest*
6291   ac_cv_c_stack_direction=-1
6292 fi
6293 rm -fr conftest*
6294 fi
6295
6296 fi
6297
6298 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6299 cat >> confdefs.h <<EOF
6300 #define STACK_DIRECTION $ac_cv_c_stack_direction
6301 EOF
6302
6303 fi
6304
6305 for ac_hdr in wchar.h wctype.h
6306 do
6307 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6308 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6309 echo "configure:6310: checking for $ac_hdr" >&5
6310 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6311   echo $ac_n "(cached) $ac_c" 1>&6
6312 else
6313   cat > conftest.$ac_ext <<EOF
6314 #line 6315 "configure"
6315 #include "confdefs.h"
6316 #include <$ac_hdr>
6317 EOF
6318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6319 { (eval echo configure:6320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6321 if test -z "$ac_err"; then
6322   rm -rf conftest*
6323   eval "ac_cv_header_$ac_safe=yes"
6324 else
6325   echo "$ac_err" >&5
6326   echo "configure: failed program was:" >&5
6327   cat conftest.$ac_ext >&5
6328   rm -rf conftest*
6329   eval "ac_cv_header_$ac_safe=no"
6330 fi
6331 rm -f conftest*
6332 fi
6333 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6334   echo "$ac_t""yes" 1>&6
6335     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6336   cat >> confdefs.h <<EOF
6337 #define $ac_tr_hdr 1
6338 EOF
6339  
6340 else
6341   echo "$ac_t""no" 1>&6
6342 fi
6343 done
6344
6345 for ac_func in gethostname mkdir mktime socket strstr \
6346                wcsstr wcswcs iswalnum iswspace towlower \
6347                wcslen wcscpy wcsncpy \
6348                uname flock lockf inet_aton inet_addr \
6349                fchmod mkstemp
6350 do
6351 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6352 echo "configure:6353: checking for $ac_func" >&5
6353 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6354   echo $ac_n "(cached) $ac_c" 1>&6
6355 else
6356   cat > conftest.$ac_ext <<EOF
6357 #line 6358 "configure"
6358 #include "confdefs.h"
6359 /* System header to define __stub macros and hopefully few prototypes,
6360     which can conflict with char $ac_func(); below.  */
6361 #include <assert.h>
6362 /* Override any gcc2 internal prototype to avoid an error.  */
6363 /* We use char because int might match the return type of a gcc2
6364     builtin and then its argument prototype would still apply.  */
6365 char $ac_func();
6366
6367 int main() {
6368
6369 /* The GNU C library defines this for functions which it implements
6370     to always fail with ENOSYS.  Some functions are actually named
6371     something starting with __ and the normal name is an alias.  */
6372 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6373 choke me
6374 #else
6375 $ac_func();
6376 #endif
6377
6378 ; return 0; }
6379 EOF
6380 if { (eval echo configure:6381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6381   rm -rf conftest*
6382   eval "ac_cv_func_$ac_func=yes"
6383 else
6384   echo "configure: failed program was:" >&5
6385   cat conftest.$ac_ext >&5
6386   rm -rf conftest*
6387   eval "ac_cv_func_$ac_func=no"
6388 fi
6389 rm -f conftest*
6390 fi
6391
6392 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6393   echo "$ac_t""yes" 1>&6
6394     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6395   cat >> confdefs.h <<EOF
6396 #define $ac_tr_func 1
6397 EOF
6398  
6399 else
6400   echo "$ac_t""no" 1>&6
6401 fi
6402 done
6403
6404
6405 trap '' 1 2 15
6406 cat > confcache <<\EOF
6407 # This file is a shell script that caches the results of configure
6408 # tests run on this system so they can be shared between configure
6409 # scripts and configure runs.  It is not useful on other systems.
6410 # If it contains results you don't want to keep, you may remove or edit it.
6411 #
6412 # By default, configure uses ./config.cache as the cache file,
6413 # creating it if it does not exist already.  You can give configure
6414 # the --cache-file=FILE option to use a different cache file; that is
6415 # what configure does when it calls configure scripts in
6416 # subdirectories, so they share the cache.
6417 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6418 # config.status only pays attention to the cache file if you give it the
6419 # --recheck option to rerun configure.
6420 #
6421 EOF
6422 # The following way of writing the cache mishandles newlines in values,
6423 # but we know of no workaround that is simple, portable, and efficient.
6424 # So, don't put newlines in cache variables' values.
6425 # Ultrix sh set writes to stderr and can't be redirected directly,
6426 # and sets the high bit in the cache file unless we assign to the vars.
6427 (set) 2>&1 |
6428   case `(ac_space=' '; set | grep ac_space) 2>&1` in
6429   *ac_space=\ *)
6430     # `set' does not quote correctly, so add quotes (double-quote substitution
6431     # turns \\\\ into \\, and sed turns \\ into \).
6432     sed -n \
6433       -e "s/'/'\\\\''/g" \
6434       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6435     ;;
6436   *)
6437     # `set' quotes correctly as required by POSIX, so do not add quotes.
6438     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6439     ;;
6440   esac >> confcache
6441 if cmp -s $cache_file confcache; then
6442   :
6443 else
6444   if test -w $cache_file; then
6445     echo "updating cache $cache_file"
6446     cat confcache > $cache_file
6447   else
6448     echo "not updating unwritable cache $cache_file"
6449   fi
6450 fi
6451 rm -f confcache
6452
6453 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6454
6455 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6456 # Let make expand exec_prefix.
6457 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6458
6459 # Any assignment to VPATH causes Sun make to only execute
6460 # the first set of double-colon rules, so remove it if not needed.
6461 # If there is a colon in the path, we need to keep it.
6462 if test "x$srcdir" = x.; then
6463   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
6464 fi
6465
6466 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6467
6468 DEFS=-DHAVE_CONFIG_H
6469
6470 # Without the "./", some shells look in PATH for config.status.
6471 : ${CONFIG_STATUS=./config.status}
6472
6473 echo creating $CONFIG_STATUS
6474 rm -f $CONFIG_STATUS
6475 cat > $CONFIG_STATUS <<EOF
6476 #! /bin/sh
6477 # Generated automatically by configure.
6478 # Run this file to recreate the current configuration.
6479 # This directory was configured as follows,
6480 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6481 #
6482 # $0 $ac_configure_args
6483 #
6484 # Compiler output produced by configure, useful for debugging
6485 # configure, is in ./config.log if it exists.
6486
6487 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6488 for ac_option
6489 do
6490   case "\$ac_option" in
6491   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6492     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6493     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6494   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6495     echo "$CONFIG_STATUS generated by autoconf version 2.13"
6496     exit 0 ;;
6497   -help | --help | --hel | --he | --h)
6498     echo "\$ac_cs_usage"; exit 0 ;;
6499   *) echo "\$ac_cs_usage"; exit 1 ;;
6500   esac
6501 done
6502
6503 ac_given_srcdir=$srcdir
6504 ac_given_INSTALL="$INSTALL"
6505
6506 trap 'rm -fr `echo "
6507 Makefile
6508 sylpheed.spec
6509 intl/Makefile
6510 ac/Makefile
6511 po/Makefile.in
6512 libkcc/Makefile
6513 src/Makefile
6514 manual/Makefile
6515 manual/ja/Makefile
6516  config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6517 EOF
6518 cat >> $CONFIG_STATUS <<EOF
6519
6520 # Protect against being on the right side of a sed subst in config.status.
6521 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6522  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6523 $ac_vpsub
6524 $extrasub
6525 s%@SHELL@%$SHELL%g
6526 s%@CFLAGS@%$CFLAGS%g
6527 s%@CPPFLAGS@%$CPPFLAGS%g
6528 s%@CXXFLAGS@%$CXXFLAGS%g
6529 s%@FFLAGS@%$FFLAGS%g
6530 s%@DEFS@%$DEFS%g
6531 s%@LDFLAGS@%$LDFLAGS%g
6532 s%@LIBS@%$LIBS%g
6533 s%@exec_prefix@%$exec_prefix%g
6534 s%@prefix@%$prefix%g
6535 s%@program_transform_name@%$program_transform_name%g
6536 s%@bindir@%$bindir%g
6537 s%@sbindir@%$sbindir%g
6538 s%@libexecdir@%$libexecdir%g
6539 s%@datadir@%$datadir%g
6540 s%@sysconfdir@%$sysconfdir%g
6541 s%@sharedstatedir@%$sharedstatedir%g
6542 s%@localstatedir@%$localstatedir%g
6543 s%@libdir@%$libdir%g
6544 s%@includedir@%$includedir%g
6545 s%@oldincludedir@%$oldincludedir%g
6546 s%@infodir@%$infodir%g
6547 s%@mandir@%$mandir%g
6548 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6549 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6550 s%@INSTALL_DATA@%$INSTALL_DATA%g
6551 s%@PACKAGE@%$PACKAGE%g
6552 s%@VERSION@%$VERSION%g
6553 s%@ACLOCAL@%$ACLOCAL%g
6554 s%@AUTOCONF@%$AUTOCONF%g
6555 s%@AUTOMAKE@%$AUTOMAKE%g
6556 s%@AUTOHEADER@%$AUTOHEADER%g
6557 s%@MAKEINFO@%$MAKEINFO%g
6558 s%@SET_MAKE@%$SET_MAKE%g
6559 s%@LT_RELEASE@%$LT_RELEASE%g
6560 s%@LT_CURRENT@%$LT_CURRENT%g
6561 s%@LT_REVISION@%$LT_REVISION%g
6562 s%@LT_AGE@%$LT_AGE%g
6563 s%@host@%$host%g
6564 s%@host_alias@%$host_alias%g
6565 s%@host_cpu@%$host_cpu%g
6566 s%@host_vendor@%$host_vendor%g
6567 s%@host_os@%$host_os%g
6568 s%@build@%$build%g
6569 s%@build_alias@%$build_alias%g
6570 s%@build_cpu@%$build_cpu%g
6571 s%@build_vendor@%$build_vendor%g
6572 s%@build_os@%$build_os%g
6573 s%@RANLIB@%$RANLIB%g
6574 s%@CC@%$CC%g
6575 s%@LN_S@%$LN_S%g
6576 s%@LIBTOOL@%$LIBTOOL%g
6577 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
6578 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
6579 s%@MAINT@%$MAINT%g
6580 s%@CPP@%$CPP%g
6581 s%@ALLOCA@%$ALLOCA%g
6582 s%@USE_NLS@%$USE_NLS%g
6583 s%@MSGFMT@%$MSGFMT%g
6584 s%@GMSGFMT@%$GMSGFMT%g
6585 s%@XGETTEXT@%$XGETTEXT%g
6586 s%@GENCAT@%$GENCAT%g
6587 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
6588 s%@CATALOGS@%$CATALOGS%g
6589 s%@CATOBJEXT@%$CATOBJEXT%g
6590 s%@DATADIRNAME@%$DATADIRNAME%g
6591 s%@GMOFILES@%$GMOFILES%g
6592 s%@INSTOBJEXT@%$INSTOBJEXT%g
6593 s%@INTLDEPS@%$INTLDEPS%g
6594 s%@INTLLIBS@%$INTLLIBS%g
6595 s%@INTLOBJS@%$INTLOBJS%g
6596 s%@POFILES@%$POFILES%g
6597 s%@POSUB@%$POSUB%g
6598 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
6599 s%@GT_NO@%$GT_NO%g
6600 s%@GT_YES@%$GT_YES%g
6601 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
6602 s%@l@%$l%g
6603 s%@localedir@%$localedir%g
6604 s%@manualdir@%$manualdir%g
6605 s%@GLIB_CONFIG@%$GLIB_CONFIG%g
6606 s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g
6607 s%@GLIB_LIBS@%$GLIB_LIBS%g
6608 s%@GTK_CONFIG@%$GTK_CONFIG%g
6609 s%@GTK_CFLAGS@%$GTK_CFLAGS%g
6610 s%@GTK_LIBS@%$GTK_LIBS%g
6611 s%@GDK_PIXBUF_CONFIG@%$GDK_PIXBUF_CONFIG%g
6612 s%@GDK_PIXBUF_CFLAGS@%$GDK_PIXBUF_CFLAGS%g
6613 s%@GDK_PIXBUF_LIBS@%$GDK_PIXBUF_LIBS%g
6614 s%@IMLIB_CONFIG@%$IMLIB_CONFIG%g
6615 s%@GDK_IMLIB_CFLAGS@%$GDK_IMLIB_CFLAGS%g
6616 s%@GDK_IMLIB_LIBS@%$GDK_IMLIB_LIBS%g
6617 s%@GPGME_CONFIG@%$GPGME_CONFIG%g
6618 s%@GPGME_CFLAGS@%$GPGME_CFLAGS%g
6619 s%@GPGME_LIBS@%$GPGME_LIBS%g
6620
6621 CEOF
6622 EOF
6623
6624 cat >> $CONFIG_STATUS <<\EOF
6625
6626 # Split the substitutions into bite-sized pieces for seds with
6627 # small command number limits, like on Digital OSF/1 and HP-UX.
6628 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6629 ac_file=1 # Number of current file.
6630 ac_beg=1 # First line for current file.
6631 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6632 ac_more_lines=:
6633 ac_sed_cmds=""
6634 while $ac_more_lines; do
6635   if test $ac_beg -gt 1; then
6636     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6637   else
6638     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6639   fi
6640   if test ! -s conftest.s$ac_file; then
6641     ac_more_lines=false
6642     rm -f conftest.s$ac_file
6643   else
6644     if test -z "$ac_sed_cmds"; then
6645       ac_sed_cmds="sed -f conftest.s$ac_file"
6646     else
6647       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6648     fi
6649     ac_file=`expr $ac_file + 1`
6650     ac_beg=$ac_end
6651     ac_end=`expr $ac_end + $ac_max_sed_cmds`
6652   fi
6653 done
6654 if test -z "$ac_sed_cmds"; then
6655   ac_sed_cmds=cat
6656 fi
6657 EOF
6658
6659 cat >> $CONFIG_STATUS <<EOF
6660
6661 CONFIG_FILES=\${CONFIG_FILES-"Makefile
6662 sylpheed.spec
6663 intl/Makefile
6664 ac/Makefile
6665 po/Makefile.in
6666 libkcc/Makefile
6667 src/Makefile
6668 manual/Makefile
6669 manual/ja/Makefile
6670 "}
6671 EOF
6672 cat >> $CONFIG_STATUS <<\EOF
6673 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6674   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6675   case "$ac_file" in
6676   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6677        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6678   *) ac_file_in="${ac_file}.in" ;;
6679   esac
6680
6681   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6682
6683   # Remove last slash and all that follows it.  Not all systems have dirname.
6684   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6685   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6686     # The file is in a subdirectory.
6687     test ! -d "$ac_dir" && mkdir "$ac_dir"
6688     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6689     # A "../" for each directory in $ac_dir_suffix.
6690     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6691   else
6692     ac_dir_suffix= ac_dots=
6693   fi
6694
6695   case "$ac_given_srcdir" in
6696   .)  srcdir=.
6697       if test -z "$ac_dots"; then top_srcdir=.
6698       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6699   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6700   *) # Relative path.
6701     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6702     top_srcdir="$ac_dots$ac_given_srcdir" ;;
6703   esac
6704
6705   case "$ac_given_INSTALL" in
6706   [/$]*) INSTALL="$ac_given_INSTALL" ;;
6707   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6708   esac
6709
6710   echo creating "$ac_file"
6711   rm -f "$ac_file"
6712   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6713   case "$ac_file" in
6714   *Makefile*) ac_comsub="1i\\
6715 # $configure_input" ;;
6716   *) ac_comsub= ;;
6717   esac
6718
6719   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6720   sed -e "$ac_comsub
6721 s%@configure_input@%$configure_input%g
6722 s%@srcdir@%$srcdir%g
6723 s%@top_srcdir@%$top_srcdir%g
6724 s%@INSTALL@%$INSTALL%g
6725 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6726 fi; done
6727 rm -f conftest.s*
6728
6729 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6730 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6731 #
6732 # ac_d sets the value in "#define NAME VALUE" lines.
6733 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
6734 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
6735 ac_dC='\3'
6736 ac_dD='%g'
6737 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6738 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6739 ac_uB='\([      ]\)%\1#\2define\3'
6740 ac_uC=' '
6741 ac_uD='\4%g'
6742 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6743 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6744 ac_eB='$%\1#\2define\3'
6745 ac_eC=' '
6746 ac_eD='%g'
6747
6748 if test "${CONFIG_HEADERS+set}" != set; then
6749 EOF
6750 cat >> $CONFIG_STATUS <<EOF
6751   CONFIG_HEADERS="config.h"
6752 EOF
6753 cat >> $CONFIG_STATUS <<\EOF
6754 fi
6755 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6756   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6757   case "$ac_file" in
6758   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6759        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6760   *) ac_file_in="${ac_file}.in" ;;
6761   esac
6762
6763   echo creating $ac_file
6764
6765   rm -f conftest.frag conftest.in conftest.out
6766   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6767   cat $ac_file_inputs > conftest.in
6768
6769 EOF
6770
6771 # Transform confdefs.h into a sed script conftest.vals that substitutes
6772 # the proper values into config.h.in to produce config.h.  And first:
6773 # Protect against being on the right side of a sed subst in config.status.
6774 # Protect against being in an unquoted here document in config.status.
6775 rm -f conftest.vals
6776 cat > conftest.hdr <<\EOF
6777 s/[\\&%]/\\&/g
6778 s%[\\$`]%\\&%g
6779 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6780 s%ac_d%ac_u%gp
6781 s%ac_u%ac_e%gp
6782 EOF
6783 sed -n -f conftest.hdr confdefs.h > conftest.vals
6784 rm -f conftest.hdr
6785
6786 # This sed command replaces #undef with comments.  This is necessary, for
6787 # example, in the case of _POSIX_SOURCE, which is predefined and required
6788 # on some systems where configure will not decide to define it.
6789 cat >> conftest.vals <<\EOF
6790 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6791 EOF
6792
6793 # Break up conftest.vals because some shells have a limit on
6794 # the size of here documents, and old seds have small limits too.
6795
6796 rm -f conftest.tail
6797 while :
6798 do
6799   ac_lines=`grep -c . conftest.vals`
6800   # grep -c gives empty output for an empty file on some AIX systems.
6801   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6802   # Write a limited-size here document to conftest.frag.
6803   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6804   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6805   echo 'CEOF
6806   sed -f conftest.frag conftest.in > conftest.out
6807   rm -f conftest.in
6808   mv conftest.out conftest.in
6809 ' >> $CONFIG_STATUS
6810   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6811   rm -f conftest.vals
6812   mv conftest.tail conftest.vals
6813 done
6814 rm -f conftest.vals
6815
6816 cat >> $CONFIG_STATUS <<\EOF
6817   rm -f conftest.frag conftest.h
6818   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
6819   cat conftest.in >> conftest.h
6820   rm -f conftest.in
6821   if cmp -s $ac_file conftest.h 2>/dev/null; then
6822     echo "$ac_file is unchanged"
6823     rm -f conftest.h
6824   else
6825     # Remove last slash and all that follows it.  Not all systems have dirname.
6826       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6827       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6828       # The file is in a subdirectory.
6829       test ! -d "$ac_dir" && mkdir "$ac_dir"
6830     fi
6831     rm -f $ac_file
6832     mv conftest.h $ac_file
6833   fi
6834 fi; done
6835
6836 EOF
6837
6838 cat >> $CONFIG_STATUS <<EOF
6839 ac_sources="$nls_cv_header_libgt"
6840 ac_dests="$nls_cv_header_intl"
6841 EOF
6842
6843 cat >> $CONFIG_STATUS <<\EOF
6844 srcdir=$ac_given_srcdir
6845 while test -n "$ac_sources"; do
6846   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
6847   set $ac_sources; ac_source=$1; shift; ac_sources=$*
6848
6849   echo "linking $srcdir/$ac_source to $ac_dest"
6850
6851   if test ! -r $srcdir/$ac_source; then
6852     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
6853   fi
6854   rm -f $ac_dest
6855
6856   # Make relative symlinks.
6857   # Remove last slash and all that follows it.  Not all systems have dirname.
6858   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
6859   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
6860     # The dest file is in a subdirectory.
6861     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
6862     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
6863     # A "../" for each directory in $ac_dest_dir_suffix.
6864     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
6865   else
6866     ac_dest_dir_suffix= ac_dots=
6867   fi
6868
6869   case "$srcdir" in
6870   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
6871   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
6872   esac
6873
6874   # Make a symlink if possible; otherwise try a hard link.
6875   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
6876     ln $srcdir/$ac_source $ac_dest; then :
6877   else
6878     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
6879   fi
6880 done
6881 EOF
6882 cat >> $CONFIG_STATUS <<EOF
6883
6884
6885
6886 EOF
6887 cat >> $CONFIG_STATUS <<\EOF
6888 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
6889 case "$CONFIG_FILES" in *po/Makefile.in*)
6890         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
6891       esac
6892
6893 exit 0
6894 EOF
6895 chmod +x $CONFIG_STATUS
6896 rm -fr confdefs* $ac_clean_files
6897 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6898