Andreas Krennmair:
[apps/madmutt.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   --disable-pgp              Disable PGP support"
16 ac_help="$ac_help
17   --disable-smime            Disable SMIME support"
18 ac_help="$ac_help
19   --with-mixmaster[=PATH]    Include Mixmaster support"
20 ac_help="$ac_help
21   --with-slang[=DIR]         Use S-Lang instead of ncurses"
22 ac_help="$ac_help
23   --with-curses=DIR          Where ncurses is installed "
24 ac_help="$ac_help
25   --with-regex               Use the GNU regex library "
26 ac_help="$ac_help
27   --with-homespool[=FILE]    File in user's directory where new mail is spooled"
28 ac_help="$ac_help
29   --with-mailpath=DIR        Directory where spool mailboxes are located"
30 ac_help="$ac_help
31   --enable-external-dotlock  Force use of an external dotlock program"
32 ac_help="$ac_help
33   --with-docdir=PATH         Specify where to put the documentation"
34 ac_help="$ac_help
35   --with-domain=DOMAIN       Specify your DNS domain name"
36 ac_help="$ac_help
37   --enable-pop               Enable POP3 support"
38 ac_help="$ac_help
39   --enable-imap              Enable IMAP support"
40 ac_help="$ac_help
41   --enable-nntp              Enable NNTP support"
42 ac_help="$ac_help
43   --with-gss[=PFX]           Compile in GSSAPI authentication for IMAP"
44 ac_help="$ac_help
45   --with-ssl[=PFX]           Compile in SSL support for POP/IMAP"
46 ac_help="$ac_help
47   --with-gnutls[=PFX]        Compile in GNU TLS support for POP/IMAP"
48 ac_help="$ac_help
49   --with-nss[=PFX]           Compile in SSL support for POP/IMAP via NSS"
50 ac_help="$ac_help
51   --with-sasl[=PFX]          Use Cyrus SASL library for POP/IMAP authentication"
52 ac_help="$ac_help
53   --with-sasl2[=PFX]         Use Cyrus SASL library version 2 for POP/IMAP authentication"
54 ac_help="$ac_help
55   --with-idn=[PFX]           Use GNU libidn for domain names"
56 ac_help="$ac_help
57   --enable-debug             Enable debugging support"
58 ac_help="$ac_help
59   --enable-flock             Use flock() to lock files"
60 ac_help="$ac_help
61   --disable-fcntl            Do NOT use fcntl() to lock files "
62 ac_help="$ac_help
63   --disable-inodesort        Do NOT read files in maildir folders sorted by inode. "
64 ac_help="$ac_help
65   --disable-warnings         Turn off compiler warnings (not recommended)"
66 ac_help="$ac_help
67   --enable-nfs-fix           Work around an NFS with broken attributes caching "
68 ac_help="$ac_help
69   --enable-buffy-size        Use file size attribute instead of access time "
70 ac_help="$ac_help
71   --enable-mailtool          Enable Sun mailtool attachments support "
72 ac_help="$ac_help
73   --enable-compressed        Enable compressed folders support "
74 ac_help="$ac_help
75   --enable-locales-fix       The result of isprint() is unreliable "
76 ac_help="$ac_help
77   --with-exec-shell=SHELL    Specify alternate shell (ONLY if /bin/sh is broken)"
78 ac_help="$ac_help
79   --enable-exact-address     Enable regeneration of email addresses"
80 ac_help="$ac_help
81   --enable-hcache            Enable header caching"
82 ac_help="$ac_help
83   --without-gdbm             Get rid of gdbm even if it is available "
84 ac_help="$ac_help
85   --with-bdb[=DIR]           Use BerkeleyDB4 if gdbm is not available "
86 ac_help="$ac_help
87   --disable-iconv            Disable iconv support"
88 ac_help="$ac_help
89   --with-libiconv-prefix=DIR Search for libiconv in DIR/include and DIR/lib"
90 ac_help="$ac_help
91   --disable-nls              Do not use Native Language Support"
92 ac_help="$ac_help
93   --with-included-gettext    Use the GNU gettext library included here"
94 ac_help="$ac_help
95   --without-wc-funcs         Do not use the system's wchar_t functions"
96 ac_help="$ac_help
97   --with-libesmtp=DIR      Compile in support for libesmtp for the MTA"
98
99 # Initialize some variables set by options.
100 # The variables have the same names as the options, with
101 # dashes changed to underlines.
102 build=NONE
103 cache_file=./config.cache
104 exec_prefix=NONE
105 host=NONE
106 no_create=
107 nonopt=NONE
108 no_recursion=
109 prefix=NONE
110 program_prefix=NONE
111 program_suffix=NONE
112 program_transform_name=s,x,x,
113 silent=
114 site=
115 srcdir=
116 target=NONE
117 verbose=
118 x_includes=NONE
119 x_libraries=NONE
120 bindir='${exec_prefix}/bin'
121 sbindir='${exec_prefix}/sbin'
122 libexecdir='${exec_prefix}/libexec'
123 datadir='${prefix}/share'
124 sysconfdir='${prefix}/etc'
125 sharedstatedir='${prefix}/com'
126 localstatedir='${prefix}/var'
127 libdir='${exec_prefix}/lib'
128 includedir='${prefix}/include'
129 oldincludedir='/usr/include'
130 infodir='${prefix}/info'
131 mandir='${prefix}/man'
132
133 # Initialize some other variables.
134 subdirs=
135 MFLAGS= MAKEFLAGS=
136 SHELL=${CONFIG_SHELL-/bin/sh}
137 # Maximum number of lines to put in a shell here document.
138 ac_max_here_lines=12
139
140 ac_prev=
141 for ac_option
142 do
143
144   # If the previous option needs an argument, assign it.
145   if test -n "$ac_prev"; then
146     eval "$ac_prev=\$ac_option"
147     ac_prev=
148     continue
149   fi
150
151   case "$ac_option" in
152   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
153   *) ac_optarg= ;;
154   esac
155
156   # Accept the important Cygnus configure options, so we can diagnose typos.
157
158   case "$ac_option" in
159
160   -bindir | --bindir | --bindi | --bind | --bin | --bi)
161     ac_prev=bindir ;;
162   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
163     bindir="$ac_optarg" ;;
164
165   -build | --build | --buil | --bui | --bu)
166     ac_prev=build ;;
167   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
168     build="$ac_optarg" ;;
169
170   -cache-file | --cache-file | --cache-fil | --cache-fi \
171   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
172     ac_prev=cache_file ;;
173   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
174   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
175     cache_file="$ac_optarg" ;;
176
177   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
178     ac_prev=datadir ;;
179   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
180   | --da=*)
181     datadir="$ac_optarg" ;;
182
183   -disable-* | --disable-*)
184     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
185     # Reject names that are not valid shell variable names.
186     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
187       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
188     fi
189     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
190     eval "enable_${ac_feature}=no" ;;
191
192   -enable-* | --enable-*)
193     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
194     # Reject names that are not valid shell variable names.
195     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
196       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
197     fi
198     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
199     case "$ac_option" in
200       *=*) ;;
201       *) ac_optarg=yes ;;
202     esac
203     eval "enable_${ac_feature}='$ac_optarg'" ;;
204
205   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
206   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
207   | --exec | --exe | --ex)
208     ac_prev=exec_prefix ;;
209   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
210   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
211   | --exec=* | --exe=* | --ex=*)
212     exec_prefix="$ac_optarg" ;;
213
214   -gas | --gas | --ga | --g)
215     # Obsolete; use --with-gas.
216     with_gas=yes ;;
217
218   -help | --help | --hel | --he)
219     # Omit some internal or obsolete options to make the list less imposing.
220     # This message is too long to be a string in the A/UX 3.1 sh.
221     cat << EOF
222 Usage: configure [options] [host]
223 Options: [defaults in brackets after descriptions]
224 Configuration:
225   --cache-file=FILE       cache test results in FILE
226   --help                  print this message
227   --no-create             do not create output files
228   --quiet, --silent       do not print \`checking...' messages
229   --version               print the version of autoconf that created configure
230 Directory and file names:
231   --prefix=PREFIX         install architecture-independent files in PREFIX
232                           [$ac_default_prefix]
233   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
234                           [same as prefix]
235   --bindir=DIR            user executables in DIR [EPREFIX/bin]
236   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
237   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
238   --datadir=DIR           read-only architecture-independent data in DIR
239                           [PREFIX/share]
240   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
241   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
242                           [PREFIX/com]
243   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
244   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
245   --includedir=DIR        C header files in DIR [PREFIX/include]
246   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
247   --infodir=DIR           info documentation in DIR [PREFIX/info]
248   --mandir=DIR            man documentation in DIR [PREFIX/man]
249   --srcdir=DIR            find the sources in DIR [configure dir or ..]
250   --program-prefix=PREFIX prepend PREFIX to installed program names
251   --program-suffix=SUFFIX append SUFFIX to installed program names
252   --program-transform-name=PROGRAM
253                           run sed PROGRAM on installed program names
254 EOF
255     cat << EOF
256 Host type:
257   --build=BUILD           configure for building on BUILD [BUILD=HOST]
258   --host=HOST             configure for HOST [guessed]
259   --target=TARGET         configure for TARGET [TARGET=HOST]
260 Features and packages:
261   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
262   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
263   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
264   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
265   --x-includes=DIR        X include files are in DIR
266   --x-libraries=DIR       X library files are in DIR
267 EOF
268     if test -n "$ac_help"; then
269       echo "--enable and --with options recognized:$ac_help"
270     fi
271     exit 0 ;;
272
273   -host | --host | --hos | --ho)
274     ac_prev=host ;;
275   -host=* | --host=* | --hos=* | --ho=*)
276     host="$ac_optarg" ;;
277
278   -includedir | --includedir | --includedi | --included | --include \
279   | --includ | --inclu | --incl | --inc)
280     ac_prev=includedir ;;
281   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
282   | --includ=* | --inclu=* | --incl=* | --inc=*)
283     includedir="$ac_optarg" ;;
284
285   -infodir | --infodir | --infodi | --infod | --info | --inf)
286     ac_prev=infodir ;;
287   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
288     infodir="$ac_optarg" ;;
289
290   -libdir | --libdir | --libdi | --libd)
291     ac_prev=libdir ;;
292   -libdir=* | --libdir=* | --libdi=* | --libd=*)
293     libdir="$ac_optarg" ;;
294
295   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
296   | --libexe | --libex | --libe)
297     ac_prev=libexecdir ;;
298   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
299   | --libexe=* | --libex=* | --libe=*)
300     libexecdir="$ac_optarg" ;;
301
302   -localstatedir | --localstatedir | --localstatedi | --localstated \
303   | --localstate | --localstat | --localsta | --localst \
304   | --locals | --local | --loca | --loc | --lo)
305     ac_prev=localstatedir ;;
306   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
307   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
308   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
309     localstatedir="$ac_optarg" ;;
310
311   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
312     ac_prev=mandir ;;
313   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
314     mandir="$ac_optarg" ;;
315
316   -nfp | --nfp | --nf)
317     # Obsolete; use --without-fp.
318     with_fp=no ;;
319
320   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
321   | --no-cr | --no-c)
322     no_create=yes ;;
323
324   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
325   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
326     no_recursion=yes ;;
327
328   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
329   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
330   | --oldin | --oldi | --old | --ol | --o)
331     ac_prev=oldincludedir ;;
332   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
333   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
334   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
335     oldincludedir="$ac_optarg" ;;
336
337   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
338     ac_prev=prefix ;;
339   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
340     prefix="$ac_optarg" ;;
341
342   -program-prefix | --program-prefix | --program-prefi | --program-pref \
343   | --program-pre | --program-pr | --program-p)
344     ac_prev=program_prefix ;;
345   -program-prefix=* | --program-prefix=* | --program-prefi=* \
346   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
347     program_prefix="$ac_optarg" ;;
348
349   -program-suffix | --program-suffix | --program-suffi | --program-suff \
350   | --program-suf | --program-su | --program-s)
351     ac_prev=program_suffix ;;
352   -program-suffix=* | --program-suffix=* | --program-suffi=* \
353   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
354     program_suffix="$ac_optarg" ;;
355
356   -program-transform-name | --program-transform-name \
357   | --program-transform-nam | --program-transform-na \
358   | --program-transform-n | --program-transform- \
359   | --program-transform | --program-transfor \
360   | --program-transfo | --program-transf \
361   | --program-trans | --program-tran \
362   | --progr-tra | --program-tr | --program-t)
363     ac_prev=program_transform_name ;;
364   -program-transform-name=* | --program-transform-name=* \
365   | --program-transform-nam=* | --program-transform-na=* \
366   | --program-transform-n=* | --program-transform-=* \
367   | --program-transform=* | --program-transfor=* \
368   | --program-transfo=* | --program-transf=* \
369   | --program-trans=* | --program-tran=* \
370   | --progr-tra=* | --program-tr=* | --program-t=*)
371     program_transform_name="$ac_optarg" ;;
372
373   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
374   | -silent | --silent | --silen | --sile | --sil)
375     silent=yes ;;
376
377   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
378     ac_prev=sbindir ;;
379   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
380   | --sbi=* | --sb=*)
381     sbindir="$ac_optarg" ;;
382
383   -sharedstatedir | --sharedstatedir | --sharedstatedi \
384   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
385   | --sharedst | --shareds | --shared | --share | --shar \
386   | --sha | --sh)
387     ac_prev=sharedstatedir ;;
388   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
389   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
390   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
391   | --sha=* | --sh=*)
392     sharedstatedir="$ac_optarg" ;;
393
394   -site | --site | --sit)
395     ac_prev=site ;;
396   -site=* | --site=* | --sit=*)
397     site="$ac_optarg" ;;
398
399   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
400     ac_prev=srcdir ;;
401   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
402     srcdir="$ac_optarg" ;;
403
404   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
405   | --syscon | --sysco | --sysc | --sys | --sy)
406     ac_prev=sysconfdir ;;
407   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
408   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
409     sysconfdir="$ac_optarg" ;;
410
411   -target | --target | --targe | --targ | --tar | --ta | --t)
412     ac_prev=target ;;
413   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
414     target="$ac_optarg" ;;
415
416   -v | -verbose | --verbose | --verbos | --verbo | --verb)
417     verbose=yes ;;
418
419   -version | --version | --versio | --versi | --vers)
420     echo "configure generated by autoconf version 2.13"
421     exit 0 ;;
422
423   -with-* | --with-*)
424     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
425     # Reject names that are not valid shell variable names.
426     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
427       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
428     fi
429     ac_package=`echo $ac_package| sed 's/-/_/g'`
430     case "$ac_option" in
431       *=*) ;;
432       *) ac_optarg=yes ;;
433     esac
434     eval "with_${ac_package}='$ac_optarg'" ;;
435
436   -without-* | --without-*)
437     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
438     # Reject names that are not valid shell variable names.
439     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
440       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
441     fi
442     ac_package=`echo $ac_package| sed 's/-/_/g'`
443     eval "with_${ac_package}=no" ;;
444
445   --x)
446     # Obsolete; use --with-x.
447     with_x=yes ;;
448
449   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
450   | --x-incl | --x-inc | --x-in | --x-i)
451     ac_prev=x_includes ;;
452   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
453   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
454     x_includes="$ac_optarg" ;;
455
456   -x-libraries | --x-libraries | --x-librarie | --x-librari \
457   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
458     ac_prev=x_libraries ;;
459   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
460   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
461     x_libraries="$ac_optarg" ;;
462
463   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
464     ;;
465
466   *)
467     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
468       echo "configure: warning: $ac_option: invalid host type" 1>&2
469     fi
470     if test "x$nonopt" != xNONE; then
471       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
472     fi
473     nonopt="$ac_option"
474     ;;
475
476   esac
477 done
478
479 if test -n "$ac_prev"; then
480   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
481 fi
482
483 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
484
485 # File descriptor usage:
486 # 0 standard input
487 # 1 file creation
488 # 2 errors and warnings
489 # 3 some systems may open it to /dev/tty
490 # 4 used on the Kubota Titan
491 # 6 checking for... messages and results
492 # 5 compiler messages saved in config.log
493 if test "$silent" = yes; then
494   exec 6>/dev/null
495 else
496   exec 6>&1
497 fi
498 exec 5>./config.log
499
500 echo "\
501 This file contains any messages produced by compilers while
502 running configure, to aid debugging if configure makes a mistake.
503 " 1>&5
504
505 # Strip out --no-create and --no-recursion so they do not pile up.
506 # Also quote any args containing shell metacharacters.
507 ac_configure_args=
508 for ac_arg
509 do
510   case "$ac_arg" in
511   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
512   | --no-cr | --no-c) ;;
513   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
514   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
515   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
516   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
517   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
518   esac
519 done
520
521 # NLS nuisances.
522 # Only set these to C if already set.  These must not be set unconditionally
523 # because not all systems understand e.g. LANG=C (notably SCO).
524 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
525 # Non-C LC_CTYPE values break the ctype check.
526 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
527 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
528 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
529 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
530
531 # confdefs.h avoids OS command line length limits that DEFS can exceed.
532 rm -rf conftest* confdefs.h
533 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
534 echo > confdefs.h
535
536 # A filename unique to this package, relative to the directory that
537 # configure is in, which we can look for to find out if srcdir is correct.
538 ac_unique_file=mutt.h
539
540 # Find the source files, if location was not specified.
541 if test -z "$srcdir"; then
542   ac_srcdir_defaulted=yes
543   # Try the directory containing this script, then its parent.
544   ac_prog=$0
545   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
546   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
547   srcdir=$ac_confdir
548   if test ! -r $srcdir/$ac_unique_file; then
549     srcdir=..
550   fi
551 else
552   ac_srcdir_defaulted=no
553 fi
554 if test ! -r $srcdir/$ac_unique_file; then
555   if test "$ac_srcdir_defaulted" = yes; then
556     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
557   else
558     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
559   fi
560 fi
561 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
562
563 # Prefer explicitly selected file to automatically selected ones.
564 if test -z "$CONFIG_SITE"; then
565   if test "x$prefix" != xNONE; then
566     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
567   else
568     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
569   fi
570 fi
571 for ac_site_file in $CONFIG_SITE; do
572   if test -r "$ac_site_file"; then
573     echo "loading site script $ac_site_file"
574     . "$ac_site_file"
575   fi
576 done
577
578 if test -r "$cache_file"; then
579   echo "loading cache $cache_file"
580   . $cache_file
581 else
582   echo "creating cache $cache_file"
583   > $cache_file
584 fi
585
586 ac_ext=c
587 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
588 ac_cpp='$CPP $CPPFLAGS'
589 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
590 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
591 cross_compiling=$ac_cv_prog_cc_cross
592
593 ac_exeext=
594 ac_objext=o
595 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
596   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
597   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
598     ac_n= ac_c='
599 ' ac_t='        '
600   else
601     ac_n=-n ac_c= ac_t=
602   fi
603 else
604   ac_n= ac_c='\c' ac_t=
605 fi
606
607
608
609
610
611
612 mutt_cv_version=`cat $srcdir/VERSION`
613
614
615 ac_aux_dir=
616 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
617   if test -f $ac_dir/install-sh; then
618     ac_aux_dir=$ac_dir
619     ac_install_sh="$ac_aux_dir/install-sh -c"
620     break
621   elif test -f $ac_dir/install.sh; then
622     ac_aux_dir=$ac_dir
623     ac_install_sh="$ac_aux_dir/install.sh -c"
624     break
625   fi
626 done
627 if test -z "$ac_aux_dir"; then
628   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
629 fi
630 ac_config_guess=$ac_aux_dir/config.guess
631 ac_config_sub=$ac_aux_dir/config.sub
632 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
633
634 # Find a good install program.  We prefer a C program (faster),
635 # so one script is as good as another.  But avoid the broken or
636 # incompatible versions:
637 # SysV /etc/install, /usr/sbin/install
638 # SunOS /usr/etc/install
639 # IRIX /sbin/install
640 # AIX /bin/install
641 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
642 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
643 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
644 # ./install, which can be erroneously created by make from ./install.sh.
645 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
646 echo "configure:647: checking for a BSD compatible install" >&5
647 if test -z "$INSTALL"; then
648 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
649   echo $ac_n "(cached) $ac_c" 1>&6
650 else
651     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
652   for ac_dir in $PATH; do
653     # Account for people who put trailing slashes in PATH elements.
654     case "$ac_dir/" in
655     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
656     *)
657       # OSF1 and SCO ODT 3.0 have their own names for install.
658       # Don't use installbsd from OSF since it installs stuff as root
659       # by default.
660       for ac_prog in ginstall scoinst install; do
661         if test -f $ac_dir/$ac_prog; then
662           if test $ac_prog = install &&
663             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
664             # AIX install.  It has an incompatible calling convention.
665             :
666           else
667             ac_cv_path_install="$ac_dir/$ac_prog -c"
668             break 2
669           fi
670         fi
671       done
672       ;;
673     esac
674   done
675   IFS="$ac_save_IFS"
676
677 fi
678   if test "${ac_cv_path_install+set}" = set; then
679     INSTALL="$ac_cv_path_install"
680   else
681     # As a last resort, use the slow shell script.  We don't cache a
682     # path for INSTALL within a source directory, because that will
683     # break other packages using the cache if that directory is
684     # removed, or if the path is relative.
685     INSTALL="$ac_install_sh"
686   fi
687 fi
688 echo "$ac_t""$INSTALL" 1>&6
689
690 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
691 # It thinks the first close brace ends the variable substitution.
692 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
693
694 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
695
696 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
697
698 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
699 echo "configure:700: checking whether build environment is sane" >&5
700 # Just in case
701 sleep 1
702 echo timestamp > conftestfile
703 # Do `set' in a subshell so we don't clobber the current shell's
704 # arguments.  Must try -L first in case configure is actually a
705 # symlink; some systems play weird games with the mod time of symlinks
706 # (eg FreeBSD returns the mod time of the symlink's containing
707 # directory).
708 if (
709    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
710    if test "$*" = "X"; then
711       # -L didn't work.
712       set X `ls -t $srcdir/configure conftestfile`
713    fi
714    if test "$*" != "X $srcdir/configure conftestfile" \
715       && test "$*" != "X conftestfile $srcdir/configure"; then
716
717       # If neither matched, then we have a broken ls.  This can happen
718       # if, for instance, CONFIG_SHELL is bash and it inherits a
719       # broken ls alias from the environment.  This has actually
720       # happened.  Such a system could not be considered "sane".
721       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
722 alias in your environment" 1>&2; exit 1; }
723    fi
724
725    test "$2" = conftestfile
726    )
727 then
728    # Ok.
729    :
730 else
731    { echo "configure: error: newly created file is older than distributed files!
732 Check your system clock" 1>&2; exit 1; }
733 fi
734 rm -f conftest*
735 echo "$ac_t""yes" 1>&6
736 if test "$program_transform_name" = s,x,x,; then
737   program_transform_name=
738 else
739   # Double any \ or $.  echo might interpret backslashes.
740   cat <<\EOF_SED > conftestsed
741 s,\\,\\\\,g; s,\$,$$,g
742 EOF_SED
743   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
744   rm -f conftestsed
745 fi
746 test "$program_prefix" != NONE &&
747   program_transform_name="s,^,${program_prefix},; $program_transform_name"
748 # Use a double $ so make ignores it.
749 test "$program_suffix" != NONE &&
750   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
751
752 # sed with no file args requires a program.
753 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
754
755 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
756 echo "configure:757: checking whether ${MAKE-make} sets \${MAKE}" >&5
757 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
758 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
759   echo $ac_n "(cached) $ac_c" 1>&6
760 else
761   cat > conftestmake <<\EOF
762 all:
763         @echo 'ac_maketemp="${MAKE}"'
764 EOF
765 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
766 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
767 if test -n "$ac_maketemp"; then
768   eval ac_cv_prog_make_${ac_make}_set=yes
769 else
770   eval ac_cv_prog_make_${ac_make}_set=no
771 fi
772 rm -f conftestmake
773 fi
774 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
775   echo "$ac_t""yes" 1>&6
776   SET_MAKE=
777 else
778   echo "$ac_t""no" 1>&6
779   SET_MAKE="MAKE=${MAKE-make}"
780 fi
781
782
783 PACKAGE=muttng
784
785 VERSION=$mutt_cv_version
786
787 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
788   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
789 fi
790 cat >> confdefs.h <<EOF
791 #define PACKAGE "$PACKAGE"
792 EOF
793
794 cat >> confdefs.h <<EOF
795 #define VERSION "$VERSION"
796 EOF
797
798
799
800 missing_dir=`cd $ac_aux_dir && pwd`
801 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
802 echo "configure:803: checking for working aclocal" >&5
803 # Run test in a subshell; some versions of sh will print an error if
804 # an executable is not found, even if stderr is redirected.
805 # Redirect stdin to placate older versions of autoconf.  Sigh.
806 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
807    ACLOCAL=aclocal
808    echo "$ac_t""found" 1>&6
809 else
810    ACLOCAL="$missing_dir/missing aclocal"
811    echo "$ac_t""missing" 1>&6
812 fi
813
814 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
815 echo "configure:816: checking for working autoconf" >&5
816 # Run test in a subshell; some versions of sh will print an error if
817 # an executable is not found, even if stderr is redirected.
818 # Redirect stdin to placate older versions of autoconf.  Sigh.
819 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
820    AUTOCONF=autoconf
821    echo "$ac_t""found" 1>&6
822 else
823    AUTOCONF="$missing_dir/missing autoconf"
824    echo "$ac_t""missing" 1>&6
825 fi
826
827 echo $ac_n "checking for working automake""... $ac_c" 1>&6
828 echo "configure:829: checking for working automake" >&5
829 # Run test in a subshell; some versions of sh will print an error if
830 # an executable is not found, even if stderr is redirected.
831 # Redirect stdin to placate older versions of autoconf.  Sigh.
832 if (automake --version) < /dev/null > /dev/null 2>&1; then
833    AUTOMAKE=automake
834    echo "$ac_t""found" 1>&6
835 else
836    AUTOMAKE="$missing_dir/missing automake"
837    echo "$ac_t""missing" 1>&6
838 fi
839
840 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
841 echo "configure:842: checking for working autoheader" >&5
842 # Run test in a subshell; some versions of sh will print an error if
843 # an executable is not found, even if stderr is redirected.
844 # Redirect stdin to placate older versions of autoconf.  Sigh.
845 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
846    AUTOHEADER=autoheader
847    echo "$ac_t""found" 1>&6
848 else
849    AUTOHEADER="$missing_dir/missing autoheader"
850    echo "$ac_t""missing" 1>&6
851 fi
852
853 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
854 echo "configure:855: checking for working makeinfo" >&5
855 # Run test in a subshell; some versions of sh will print an error if
856 # an executable is not found, even if stderr is redirected.
857 # Redirect stdin to placate older versions of autoconf.  Sigh.
858 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
859    MAKEINFO=makeinfo
860    echo "$ac_t""found" 1>&6
861 else
862    MAKEINFO="$missing_dir/missing makeinfo"
863    echo "$ac_t""missing" 1>&6
864 fi
865
866
867
868
869
870 ALL_LINGUAS="de ru it es uk fr pl nl cs id sk ko el zh_TW zh_CN pt_BR eo gl sv da lt tr ja hu et ca bg"
871
872
873 # Make sure we can run config.sub.
874 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
875 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
876 fi
877
878 echo $ac_n "checking host system type""... $ac_c" 1>&6
879 echo "configure:880: checking host system type" >&5
880
881 host_alias=$host
882 case "$host_alias" in
883 NONE)
884   case $nonopt in
885   NONE)
886     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
887     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
888     fi ;;
889   *) host_alias=$nonopt ;;
890   esac ;;
891 esac
892
893 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
894 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
895 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
896 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
897 echo "$ac_t""$host" 1>&6
898
899
900 echo $ac_n "checking for prefix""... $ac_c" 1>&6
901 echo "configure:902: checking for prefix" >&5
902 if test x$prefix = xNONE; then
903         mutt_cv_prefix=$ac_default_prefix
904 else
905         mutt_cv_prefix=$prefix
906 fi
907 echo "$ac_t""$mutt_cv_prefix" 1>&6
908
909 # Extract the first word of "gcc", so it can be a program name with args.
910 set dummy gcc; ac_word=$2
911 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
912 echo "configure:913: checking for $ac_word" >&5
913 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
914   echo $ac_n "(cached) $ac_c" 1>&6
915 else
916   if test -n "$CC"; then
917   ac_cv_prog_CC="$CC" # Let the user override the test.
918 else
919   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
920   ac_dummy="$PATH"
921   for ac_dir in $ac_dummy; do
922     test -z "$ac_dir" && ac_dir=.
923     if test -f $ac_dir/$ac_word; then
924       ac_cv_prog_CC="gcc"
925       break
926     fi
927   done
928   IFS="$ac_save_ifs"
929 fi
930 fi
931 CC="$ac_cv_prog_CC"
932 if test -n "$CC"; then
933   echo "$ac_t""$CC" 1>&6
934 else
935   echo "$ac_t""no" 1>&6
936 fi
937
938 if test -z "$CC"; then
939   # Extract the first word of "cc", so it can be a program name with args.
940 set dummy cc; ac_word=$2
941 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
942 echo "configure:943: checking for $ac_word" >&5
943 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
944   echo $ac_n "(cached) $ac_c" 1>&6
945 else
946   if test -n "$CC"; then
947   ac_cv_prog_CC="$CC" # Let the user override the test.
948 else
949   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
950   ac_prog_rejected=no
951   ac_dummy="$PATH"
952   for ac_dir in $ac_dummy; do
953     test -z "$ac_dir" && ac_dir=.
954     if test -f $ac_dir/$ac_word; then
955       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
956         ac_prog_rejected=yes
957         continue
958       fi
959       ac_cv_prog_CC="cc"
960       break
961     fi
962   done
963   IFS="$ac_save_ifs"
964 if test $ac_prog_rejected = yes; then
965   # We found a bogon in the path, so make sure we never use it.
966   set dummy $ac_cv_prog_CC
967   shift
968   if test $# -gt 0; then
969     # We chose a different compiler from the bogus one.
970     # However, it has the same basename, so the bogon will be chosen
971     # first if we set CC to just the basename; use the full file name.
972     shift
973     set dummy "$ac_dir/$ac_word" "$@"
974     shift
975     ac_cv_prog_CC="$@"
976   fi
977 fi
978 fi
979 fi
980 CC="$ac_cv_prog_CC"
981 if test -n "$CC"; then
982   echo "$ac_t""$CC" 1>&6
983 else
984   echo "$ac_t""no" 1>&6
985 fi
986
987   if test -z "$CC"; then
988     case "`uname -s`" in
989     *win32* | *WIN32*)
990       # Extract the first word of "cl", so it can be a program name with args.
991 set dummy cl; ac_word=$2
992 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
993 echo "configure:994: checking for $ac_word" >&5
994 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
995   echo $ac_n "(cached) $ac_c" 1>&6
996 else
997   if test -n "$CC"; then
998   ac_cv_prog_CC="$CC" # Let the user override the test.
999 else
1000   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1001   ac_dummy="$PATH"
1002   for ac_dir in $ac_dummy; do
1003     test -z "$ac_dir" && ac_dir=.
1004     if test -f $ac_dir/$ac_word; then
1005       ac_cv_prog_CC="cl"
1006       break
1007     fi
1008   done
1009   IFS="$ac_save_ifs"
1010 fi
1011 fi
1012 CC="$ac_cv_prog_CC"
1013 if test -n "$CC"; then
1014   echo "$ac_t""$CC" 1>&6
1015 else
1016   echo "$ac_t""no" 1>&6
1017 fi
1018  ;;
1019     esac
1020   fi
1021   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1022 fi
1023
1024 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1025 echo "configure:1026: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1026
1027 ac_ext=c
1028 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1029 ac_cpp='$CPP $CPPFLAGS'
1030 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1031 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1032 cross_compiling=$ac_cv_prog_cc_cross
1033
1034 cat > conftest.$ac_ext << EOF
1035
1036 #line 1037 "configure"
1037 #include "confdefs.h"
1038
1039 main(){return(0);}
1040 EOF
1041 if { (eval echo configure:1042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1042   ac_cv_prog_cc_works=yes
1043   # If we can't run a trivial program, we are probably using a cross compiler.
1044   if (./conftest; exit) 2>/dev/null; then
1045     ac_cv_prog_cc_cross=no
1046   else
1047     ac_cv_prog_cc_cross=yes
1048   fi
1049 else
1050   echo "configure: failed program was:" >&5
1051   cat conftest.$ac_ext >&5
1052   ac_cv_prog_cc_works=no
1053 fi
1054 rm -fr conftest*
1055 ac_ext=c
1056 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1057 ac_cpp='$CPP $CPPFLAGS'
1058 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1059 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1060 cross_compiling=$ac_cv_prog_cc_cross
1061
1062 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1063 if test $ac_cv_prog_cc_works = no; then
1064   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1065 fi
1066 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1067 echo "configure:1068: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1068 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1069 cross_compiling=$ac_cv_prog_cc_cross
1070
1071 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1072 echo "configure:1073: checking whether we are using GNU C" >&5
1073 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1074   echo $ac_n "(cached) $ac_c" 1>&6
1075 else
1076   cat > conftest.c <<EOF
1077 #ifdef __GNUC__
1078   yes;
1079 #endif
1080 EOF
1081 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1082   ac_cv_prog_gcc=yes
1083 else
1084   ac_cv_prog_gcc=no
1085 fi
1086 fi
1087
1088 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1089
1090 if test $ac_cv_prog_gcc = yes; then
1091   GCC=yes
1092 else
1093   GCC=
1094 fi
1095
1096 ac_test_CFLAGS="${CFLAGS+set}"
1097 ac_save_CFLAGS="$CFLAGS"
1098 CFLAGS=
1099 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1100 echo "configure:1101: checking whether ${CC-cc} accepts -g" >&5
1101 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1102   echo $ac_n "(cached) $ac_c" 1>&6
1103 else
1104   echo 'void f(){}' > conftest.c
1105 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1106   ac_cv_prog_cc_g=yes
1107 else
1108   ac_cv_prog_cc_g=no
1109 fi
1110 rm -f conftest*
1111
1112 fi
1113
1114 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1115 if test "$ac_test_CFLAGS" = set; then
1116   CFLAGS="$ac_save_CFLAGS"
1117 elif test $ac_cv_prog_cc_g = yes; then
1118   if test "$GCC" = yes; then
1119     CFLAGS="-g -O2"
1120   else
1121     CFLAGS="-g"
1122   fi
1123 else
1124   if test "$GCC" = yes; then
1125     CFLAGS="-O2"
1126   else
1127     CFLAGS=
1128   fi
1129 fi
1130
1131
1132         echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
1133 echo "configure:1134: checking for strerror in -lcposix" >&5
1134 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
1135 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1136   echo $ac_n "(cached) $ac_c" 1>&6
1137 else
1138   ac_save_LIBS="$LIBS"
1139 LIBS="-lcposix  $LIBS"
1140 cat > conftest.$ac_ext <<EOF
1141 #line 1142 "configure"
1142 #include "confdefs.h"
1143 /* Override any gcc2 internal prototype to avoid an error.  */
1144 /* We use char because int might match the return type of a gcc2
1145     builtin and then its argument prototype would still apply.  */
1146 char strerror();
1147
1148 int main() {
1149 strerror()
1150 ; return 0; }
1151 EOF
1152 if { (eval echo configure:1153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1153   rm -rf conftest*
1154   eval "ac_cv_lib_$ac_lib_var=yes"
1155 else
1156   echo "configure: failed program was:" >&5
1157   cat conftest.$ac_ext >&5
1158   rm -rf conftest*
1159   eval "ac_cv_lib_$ac_lib_var=no"
1160 fi
1161 rm -f conftest*
1162 LIBS="$ac_save_LIBS"
1163
1164 fi
1165 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1166   echo "$ac_t""yes" 1>&6
1167   LIBS="$LIBS -lcposix"
1168 else
1169   echo "$ac_t""no" 1>&6
1170 fi
1171
1172   
1173
1174
1175
1176
1177 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1178 echo "configure:1179: checking for ${CC-cc} option to accept ANSI C" >&5
1179 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
1180   echo $ac_n "(cached) $ac_c" 1>&6
1181 else
1182   am_cv_prog_cc_stdc=no
1183 ac_save_CC="$CC"
1184 # Don't try gcc -ansi; that turns off useful extensions and
1185 # breaks some systems' header files.
1186 # AIX                   -qlanglvl=ansi
1187 # Ultrix and OSF/1      -std1
1188 # HP-UX                 -Aa -D_HPUX_SOURCE
1189 # SVR4                  -Xc -D__EXTENSIONS__
1190 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1191 do
1192   CC="$ac_save_CC $ac_arg"
1193   cat > conftest.$ac_ext <<EOF
1194 #line 1195 "configure"
1195 #include "confdefs.h"
1196 #include <stdarg.h>
1197 #include <stdio.h>
1198 #include <sys/types.h>
1199 #include <sys/stat.h>
1200 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1201 struct buf { int x; };
1202 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1203 static char *e (p, i)
1204      char **p;
1205      int i;
1206 {
1207   return p[i];
1208 }
1209 static char *f (char * (*g) (char **, int), char **p, ...)
1210 {
1211   char *s;
1212   va_list v;
1213   va_start (v,p);
1214   s = g (p, va_arg (v,int));
1215   va_end (v);
1216   return s;
1217 }
1218 int test (int i, double x);
1219 struct s1 {int (*f) (int a);};
1220 struct s2 {int (*f) (double a);};
1221 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1222 int argc;
1223 char **argv;
1224
1225 int main() {
1226
1227 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1228
1229 ; return 0; }
1230 EOF
1231 if { (eval echo configure:1232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1232   rm -rf conftest*
1233   am_cv_prog_cc_stdc="$ac_arg"; break
1234 else
1235   echo "configure: failed program was:" >&5
1236   cat conftest.$ac_ext >&5
1237 fi
1238 rm -f conftest*
1239 done
1240 CC="$ac_save_CC"
1241
1242 fi
1243
1244 if test -z "$am_cv_prog_cc_stdc"; then
1245   echo "$ac_t""none needed" 1>&6
1246 else
1247   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1248 fi
1249 case "x$am_cv_prog_cc_stdc" in
1250   x|xno) ;;
1251   *) CC="$CC $am_cv_prog_cc_stdc" ;;
1252 esac
1253
1254 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1255 echo "configure:1256: checking how to run the C preprocessor" >&5
1256 # On Suns, sometimes $CPP names a directory.
1257 if test -n "$CPP" && test -d "$CPP"; then
1258   CPP=
1259 fi
1260 if test -z "$CPP"; then
1261 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1262   echo $ac_n "(cached) $ac_c" 1>&6
1263 else
1264     # This must be in double quotes, not single quotes, because CPP may get
1265   # substituted into the Makefile and "${CC-cc}" will confuse make.
1266   CPP="${CC-cc} -E"
1267   # On the NeXT, cc -E runs the code through the compiler's parser,
1268   # not just through cpp.
1269   cat > conftest.$ac_ext <<EOF
1270 #line 1271 "configure"
1271 #include "confdefs.h"
1272 #include <assert.h>
1273 Syntax Error
1274 EOF
1275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1276 { (eval echo configure:1277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1277 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1278 if test -z "$ac_err"; then
1279   :
1280 else
1281   echo "$ac_err" >&5
1282   echo "configure: failed program was:" >&5
1283   cat conftest.$ac_ext >&5
1284   rm -rf conftest*
1285   CPP="${CC-cc} -E -traditional-cpp"
1286   cat > conftest.$ac_ext <<EOF
1287 #line 1288 "configure"
1288 #include "confdefs.h"
1289 #include <assert.h>
1290 Syntax Error
1291 EOF
1292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1293 { (eval echo configure:1294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1295 if test -z "$ac_err"; then
1296   :
1297 else
1298   echo "$ac_err" >&5
1299   echo "configure: failed program was:" >&5
1300   cat conftest.$ac_ext >&5
1301   rm -rf conftest*
1302   CPP="${CC-cc} -nologo -E"
1303   cat > conftest.$ac_ext <<EOF
1304 #line 1305 "configure"
1305 #include "confdefs.h"
1306 #include <assert.h>
1307 Syntax Error
1308 EOF
1309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1310 { (eval echo configure:1311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1312 if test -z "$ac_err"; then
1313   :
1314 else
1315   echo "$ac_err" >&5
1316   echo "configure: failed program was:" >&5
1317   cat conftest.$ac_ext >&5
1318   rm -rf conftest*
1319   CPP=/lib/cpp
1320 fi
1321 rm -f conftest*
1322 fi
1323 rm -f conftest*
1324 fi
1325 rm -f conftest*
1326   ac_cv_prog_CPP="$CPP"
1327 fi
1328   CPP="$ac_cv_prog_CPP"
1329 else
1330   ac_cv_prog_CPP="$CPP"
1331 fi
1332 echo "$ac_t""$CPP" 1>&6
1333
1334
1335
1336 echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
1337 echo "configure:1338: checking for function prototypes" >&5
1338 if test "$am_cv_prog_cc_stdc" != no; then
1339   echo "$ac_t""yes" 1>&6
1340   cat >> confdefs.h <<\EOF
1341 #define PROTOTYPES 1
1342 EOF
1343
1344   U= ANSI2KNR=
1345 else
1346   echo "$ac_t""no" 1>&6
1347   U=_ ANSI2KNR=./ansi2knr
1348   # Ensure some checks needed by ansi2knr itself.
1349   echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1350 echo "configure:1351: checking for ANSI C header files" >&5
1351 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1352   echo $ac_n "(cached) $ac_c" 1>&6
1353 else
1354   cat > conftest.$ac_ext <<EOF
1355 #line 1356 "configure"
1356 #include "confdefs.h"
1357 #include <stdlib.h>
1358 #include <stdarg.h>
1359 #include <string.h>
1360 #include <float.h>
1361 EOF
1362 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1363 { (eval echo configure:1364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1364 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1365 if test -z "$ac_err"; then
1366   rm -rf conftest*
1367   ac_cv_header_stdc=yes
1368 else
1369   echo "$ac_err" >&5
1370   echo "configure: failed program was:" >&5
1371   cat conftest.$ac_ext >&5
1372   rm -rf conftest*
1373   ac_cv_header_stdc=no
1374 fi
1375 rm -f conftest*
1376
1377 if test $ac_cv_header_stdc = yes; then
1378   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1379 cat > conftest.$ac_ext <<EOF
1380 #line 1381 "configure"
1381 #include "confdefs.h"
1382 #include <string.h>
1383 EOF
1384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1385   egrep "memchr" >/dev/null 2>&1; then
1386   :
1387 else
1388   rm -rf conftest*
1389   ac_cv_header_stdc=no
1390 fi
1391 rm -f conftest*
1392
1393 fi
1394
1395 if test $ac_cv_header_stdc = yes; then
1396   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1397 cat > conftest.$ac_ext <<EOF
1398 #line 1399 "configure"
1399 #include "confdefs.h"
1400 #include <stdlib.h>
1401 EOF
1402 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1403   egrep "free" >/dev/null 2>&1; then
1404   :
1405 else
1406   rm -rf conftest*
1407   ac_cv_header_stdc=no
1408 fi
1409 rm -f conftest*
1410
1411 fi
1412
1413 if test $ac_cv_header_stdc = yes; then
1414   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1415 if test "$cross_compiling" = yes; then
1416   :
1417 else
1418   cat > conftest.$ac_ext <<EOF
1419 #line 1420 "configure"
1420 #include "confdefs.h"
1421 #include <ctype.h>
1422 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1423 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1424 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1425 int main () { int i; for (i = 0; i < 256; i++)
1426 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1427 exit (0); }
1428
1429 EOF
1430 if { (eval echo configure:1431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1431 then
1432   :
1433 else
1434   echo "configure: failed program was:" >&5
1435   cat conftest.$ac_ext >&5
1436   rm -fr conftest*
1437   ac_cv_header_stdc=no
1438 fi
1439 rm -fr conftest*
1440 fi
1441
1442 fi
1443 fi
1444
1445 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1446 if test $ac_cv_header_stdc = yes; then
1447   cat >> confdefs.h <<\EOF
1448 #define STDC_HEADERS 1
1449 EOF
1450
1451 fi
1452
1453   for ac_hdr in string.h
1454 do
1455 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1456 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1457 echo "configure:1458: checking for $ac_hdr" >&5
1458 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1459   echo $ac_n "(cached) $ac_c" 1>&6
1460 else
1461   cat > conftest.$ac_ext <<EOF
1462 #line 1463 "configure"
1463 #include "confdefs.h"
1464 #include <$ac_hdr>
1465 EOF
1466 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1467 { (eval echo configure:1468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1468 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1469 if test -z "$ac_err"; then
1470   rm -rf conftest*
1471   eval "ac_cv_header_$ac_safe=yes"
1472 else
1473   echo "$ac_err" >&5
1474   echo "configure: failed program was:" >&5
1475   cat conftest.$ac_ext >&5
1476   rm -rf conftest*
1477   eval "ac_cv_header_$ac_safe=no"
1478 fi
1479 rm -f conftest*
1480 fi
1481 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1482   echo "$ac_t""yes" 1>&6
1483     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1484   cat >> confdefs.h <<EOF
1485 #define $ac_tr_hdr 1
1486 EOF
1487  
1488 else
1489   echo "$ac_t""no" 1>&6
1490 fi
1491 done
1492
1493 fi
1494
1495 if test "x$U" != "x"; then
1496   { echo "configure: error: Compiler not ANSI compliant" 1>&2; exit 1; }
1497 fi
1498 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1499 echo "configure:1500: checking how to run the C preprocessor" >&5
1500 # On Suns, sometimes $CPP names a directory.
1501 if test -n "$CPP" && test -d "$CPP"; then
1502   CPP=
1503 fi
1504 if test -z "$CPP"; then
1505 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1506   echo $ac_n "(cached) $ac_c" 1>&6
1507 else
1508     # This must be in double quotes, not single quotes, because CPP may get
1509   # substituted into the Makefile and "${CC-cc}" will confuse make.
1510   CPP="${CC-cc} -E"
1511   # On the NeXT, cc -E runs the code through the compiler's parser,
1512   # not just through cpp.
1513   cat > conftest.$ac_ext <<EOF
1514 #line 1515 "configure"
1515 #include "confdefs.h"
1516 #include <assert.h>
1517 Syntax Error
1518 EOF
1519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1520 { (eval echo configure:1521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1522 if test -z "$ac_err"; then
1523   :
1524 else
1525   echo "$ac_err" >&5
1526   echo "configure: failed program was:" >&5
1527   cat conftest.$ac_ext >&5
1528   rm -rf conftest*
1529   CPP="${CC-cc} -E -traditional-cpp"
1530   cat > conftest.$ac_ext <<EOF
1531 #line 1532 "configure"
1532 #include "confdefs.h"
1533 #include <assert.h>
1534 Syntax Error
1535 EOF
1536 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1537 { (eval echo configure:1538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1538 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1539 if test -z "$ac_err"; then
1540   :
1541 else
1542   echo "$ac_err" >&5
1543   echo "configure: failed program was:" >&5
1544   cat conftest.$ac_ext >&5
1545   rm -rf conftest*
1546   CPP="${CC-cc} -nologo -E"
1547   cat > conftest.$ac_ext <<EOF
1548 #line 1549 "configure"
1549 #include "confdefs.h"
1550 #include <assert.h>
1551 Syntax Error
1552 EOF
1553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1554 { (eval echo configure:1555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1556 if test -z "$ac_err"; then
1557   :
1558 else
1559   echo "$ac_err" >&5
1560   echo "configure: failed program was:" >&5
1561   cat conftest.$ac_ext >&5
1562   rm -rf conftest*
1563   CPP=/lib/cpp
1564 fi
1565 rm -f conftest*
1566 fi
1567 rm -f conftest*
1568 fi
1569 rm -f conftest*
1570   ac_cv_prog_CPP="$CPP"
1571 fi
1572   CPP="$ac_cv_prog_CPP"
1573 else
1574   ac_cv_prog_CPP="$CPP"
1575 fi
1576 echo "$ac_t""$CPP" 1>&6
1577
1578 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1579 echo "configure:1580: checking whether ${MAKE-make} sets \${MAKE}" >&5
1580 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1581 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1582   echo $ac_n "(cached) $ac_c" 1>&6
1583 else
1584   cat > conftestmake <<\EOF
1585 all:
1586         @echo 'ac_maketemp="${MAKE}"'
1587 EOF
1588 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1589 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1590 if test -n "$ac_maketemp"; then
1591   eval ac_cv_prog_make_${ac_make}_set=yes
1592 else
1593   eval ac_cv_prog_make_${ac_make}_set=no
1594 fi
1595 rm -f conftestmake
1596 fi
1597 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1598   echo "$ac_t""yes" 1>&6
1599   SET_MAKE=
1600 else
1601   echo "$ac_t""no" 1>&6
1602   SET_MAKE="MAKE=${MAKE-make}"
1603 fi
1604
1605 # Find a good install program.  We prefer a C program (faster),
1606 # so one script is as good as another.  But avoid the broken or
1607 # incompatible versions:
1608 # SysV /etc/install, /usr/sbin/install
1609 # SunOS /usr/etc/install
1610 # IRIX /sbin/install
1611 # AIX /bin/install
1612 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1613 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1614 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1615 # ./install, which can be erroneously created by make from ./install.sh.
1616 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1617 echo "configure:1618: checking for a BSD compatible install" >&5
1618 if test -z "$INSTALL"; then
1619 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1620   echo $ac_n "(cached) $ac_c" 1>&6
1621 else
1622     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1623   for ac_dir in $PATH; do
1624     # Account for people who put trailing slashes in PATH elements.
1625     case "$ac_dir/" in
1626     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1627     *)
1628       # OSF1 and SCO ODT 3.0 have their own names for install.
1629       # Don't use installbsd from OSF since it installs stuff as root
1630       # by default.
1631       for ac_prog in ginstall scoinst install; do
1632         if test -f $ac_dir/$ac_prog; then
1633           if test $ac_prog = install &&
1634             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1635             # AIX install.  It has an incompatible calling convention.
1636             :
1637           else
1638             ac_cv_path_install="$ac_dir/$ac_prog -c"
1639             break 2
1640           fi
1641         fi
1642       done
1643       ;;
1644     esac
1645   done
1646   IFS="$ac_save_IFS"
1647
1648 fi
1649   if test "${ac_cv_path_install+set}" = set; then
1650     INSTALL="$ac_cv_path_install"
1651   else
1652     # As a last resort, use the slow shell script.  We don't cache a
1653     # path for INSTALL within a source directory, because that will
1654     # break other packages using the cache if that directory is
1655     # removed, or if the path is relative.
1656     INSTALL="$ac_install_sh"
1657   fi
1658 fi
1659 echo "$ac_t""$INSTALL" 1>&6
1660
1661 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1662 # It thinks the first close brace ends the variable substitution.
1663 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1664
1665 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1666
1667 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1668
1669 # Extract the first word of "ranlib", so it can be a program name with args.
1670 set dummy ranlib; ac_word=$2
1671 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1672 echo "configure:1673: checking for $ac_word" >&5
1673 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1674   echo $ac_n "(cached) $ac_c" 1>&6
1675 else
1676   if test -n "$RANLIB"; then
1677   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1678 else
1679   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1680   ac_dummy="$PATH"
1681   for ac_dir in $ac_dummy; do
1682     test -z "$ac_dir" && ac_dir=.
1683     if test -f $ac_dir/$ac_word; then
1684       ac_cv_prog_RANLIB="ranlib"
1685       break
1686     fi
1687   done
1688   IFS="$ac_save_ifs"
1689   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1690 fi
1691 fi
1692 RANLIB="$ac_cv_prog_RANLIB"
1693 if test -n "$RANLIB"; then
1694   echo "$ac_t""$RANLIB" 1>&6
1695 else
1696   echo "$ac_t""no" 1>&6
1697 fi
1698
1699 echo $ac_n "checking build system type""... $ac_c" 1>&6
1700 echo "configure:1701: checking build system type" >&5
1701
1702 build_alias=$build
1703 case "$build_alias" in
1704 NONE)
1705   case $nonopt in
1706   NONE) build_alias=$host_alias ;;
1707   *) build_alias=$nonopt ;;
1708   esac ;;
1709 esac
1710
1711 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1712 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1713 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1714 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1715 echo "$ac_t""$build" 1>&6
1716
1717 if test $host != $build; then
1718   ac_tool_prefix=${host_alias}-
1719 else
1720   ac_tool_prefix=
1721 fi
1722
1723 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1724 set dummy ${ac_tool_prefix}ar; ac_word=$2
1725 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1726 echo "configure:1727: checking for $ac_word" >&5
1727 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1728   echo $ac_n "(cached) $ac_c" 1>&6
1729 else
1730   if test -n "$AR"; then
1731   ac_cv_prog_AR="$AR" # Let the user override the test.
1732 else
1733   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1734   ac_dummy="$PATH"
1735   for ac_dir in $ac_dummy; do
1736     test -z "$ac_dir" && ac_dir=.
1737     if test -f $ac_dir/$ac_word; then
1738       ac_cv_prog_AR="${ac_tool_prefix}ar"
1739       break
1740     fi
1741   done
1742   IFS="$ac_save_ifs"
1743 fi
1744 fi
1745 AR="$ac_cv_prog_AR"
1746 if test -n "$AR"; then
1747   echo "$ac_t""$AR" 1>&6
1748 else
1749   echo "$ac_t""no" 1>&6
1750 fi
1751
1752
1753 if test -z "$ac_cv_prog_AR"; then
1754 if test -n "$ac_tool_prefix"; then
1755   # Extract the first word of "ar", so it can be a program name with args.
1756 set dummy ar; ac_word=$2
1757 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1758 echo "configure:1759: checking for $ac_word" >&5
1759 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1760   echo $ac_n "(cached) $ac_c" 1>&6
1761 else
1762   if test -n "$AR"; then
1763   ac_cv_prog_AR="$AR" # Let the user override the test.
1764 else
1765   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1766   ac_dummy="$PATH"
1767   for ac_dir in $ac_dummy; do
1768     test -z "$ac_dir" && ac_dir=.
1769     if test -f $ac_dir/$ac_word; then
1770       ac_cv_prog_AR="ar"
1771       break
1772     fi
1773   done
1774   IFS="$ac_save_ifs"
1775   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1776 fi
1777 fi
1778 AR="$ac_cv_prog_AR"
1779 if test -n "$AR"; then
1780   echo "$ac_t""$AR" 1>&6
1781 else
1782   echo "$ac_t""no" 1>&6
1783 fi
1784
1785 else
1786   AR="ar"
1787 fi
1788 fi
1789
1790
1791 echo $ac_n "checking for inline""... $ac_c" 1>&6
1792 echo "configure:1793: checking for inline" >&5
1793 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1794   echo $ac_n "(cached) $ac_c" 1>&6
1795 else
1796   ac_cv_c_inline=no
1797 for ac_kw in inline __inline__ __inline; do
1798   cat > conftest.$ac_ext <<EOF
1799 #line 1800 "configure"
1800 #include "confdefs.h"
1801
1802 int main() {
1803 } $ac_kw foo() {
1804 ; return 0; }
1805 EOF
1806 if { (eval echo configure:1807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1807   rm -rf conftest*
1808   ac_cv_c_inline=$ac_kw; break
1809 else
1810   echo "configure: failed program was:" >&5
1811   cat conftest.$ac_ext >&5
1812 fi
1813 rm -f conftest*
1814 done
1815
1816 fi
1817
1818 echo "$ac_t""$ac_cv_c_inline" 1>&6
1819 case "$ac_cv_c_inline" in
1820   inline | yes) ;;
1821   no) cat >> confdefs.h <<\EOF
1822 #define inline 
1823 EOF
1824  ;;
1825   *)  cat >> confdefs.h <<EOF
1826 #define inline $ac_cv_c_inline
1827 EOF
1828  ;;
1829 esac
1830
1831 echo $ac_n "checking for working const""... $ac_c" 1>&6
1832 echo "configure:1833: checking for working const" >&5
1833 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1834   echo $ac_n "(cached) $ac_c" 1>&6
1835 else
1836   cat > conftest.$ac_ext <<EOF
1837 #line 1838 "configure"
1838 #include "confdefs.h"
1839
1840 int main() {
1841
1842 /* Ultrix mips cc rejects this.  */
1843 typedef int charset[2]; const charset x;
1844 /* SunOS 4.1.1 cc rejects this.  */
1845 char const *const *ccp;
1846 char **p;
1847 /* NEC SVR4.0.2 mips cc rejects this.  */
1848 struct point {int x, y;};
1849 static struct point const zero = {0,0};
1850 /* AIX XL C 1.02.0.0 rejects this.
1851    It does not let you subtract one const X* pointer from another in an arm
1852    of an if-expression whose if-part is not a constant expression */
1853 const char *g = "string";
1854 ccp = &g + (g ? g-g : 0);
1855 /* HPUX 7.0 cc rejects these. */
1856 ++ccp;
1857 p = (char**) ccp;
1858 ccp = (char const *const *) p;
1859 { /* SCO 3.2v4 cc rejects this.  */
1860   char *t;
1861   char const *s = 0 ? (char *) 0 : (char const *) 0;
1862
1863   *t++ = 0;
1864 }
1865 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1866   int x[] = {25, 17};
1867   const int *foo = &x[0];
1868   ++foo;
1869 }
1870 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1871   typedef const int *iptr;
1872   iptr p = 0;
1873   ++p;
1874 }
1875 { /* AIX XL C 1.02.0.0 rejects this saying
1876      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1877   struct s { int j; const int *ap[3]; };
1878   struct s *b; b->j = 5;
1879 }
1880 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1881   const int foo = 10;
1882 }
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   ac_cv_c_const=yes
1889 else
1890   echo "configure: failed program was:" >&5
1891   cat conftest.$ac_ext >&5
1892   rm -rf conftest*
1893   ac_cv_c_const=no
1894 fi
1895 rm -f conftest*
1896 fi
1897
1898 echo "$ac_t""$ac_cv_c_const" 1>&6
1899 if test $ac_cv_c_const = no; then
1900   cat >> confdefs.h <<\EOF
1901 #define const 
1902 EOF
1903
1904 fi
1905
1906
1907 # Extract the first word of "dbx", so it can be a program name with args.
1908 set dummy dbx; ac_word=$2
1909 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1910 echo "configure:1911: checking for $ac_word" >&5
1911 if eval "test \"`echo '$''{'ac_cv_path_DBX'+set}'`\" = set"; then
1912   echo $ac_n "(cached) $ac_c" 1>&6
1913 else
1914   case "$DBX" in
1915   /*)
1916   ac_cv_path_DBX="$DBX" # Let the user override the test with a path.
1917   ;;
1918   ?:/*)                  
1919   ac_cv_path_DBX="$DBX" # Let the user override the test with a dos path.
1920   ;;
1921   *)
1922   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1923   ac_dummy="$PATH"
1924   for ac_dir in $ac_dummy; do 
1925     test -z "$ac_dir" && ac_dir=.
1926     if test -f $ac_dir/$ac_word; then
1927       ac_cv_path_DBX="$ac_dir/$ac_word"
1928       break
1929     fi
1930   done
1931   IFS="$ac_save_ifs"
1932   test -z "$ac_cv_path_DBX" && ac_cv_path_DBX="no"
1933   ;;
1934 esac
1935 fi
1936 DBX="$ac_cv_path_DBX"
1937 if test -n "$DBX"; then
1938   echo "$ac_t""$DBX" 1>&6
1939 else
1940   echo "$ac_t""no" 1>&6
1941 fi
1942
1943 # Extract the first word of "gdb", so it can be a program name with args.
1944 set dummy gdb; ac_word=$2
1945 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1946 echo "configure:1947: checking for $ac_word" >&5
1947 if eval "test \"`echo '$''{'ac_cv_path_GDB'+set}'`\" = set"; then
1948   echo $ac_n "(cached) $ac_c" 1>&6
1949 else
1950   case "$GDB" in
1951   /*)
1952   ac_cv_path_GDB="$GDB" # Let the user override the test with a path.
1953   ;;
1954   ?:/*)                  
1955   ac_cv_path_GDB="$GDB" # Let the user override the test with a dos path.
1956   ;;
1957   *)
1958   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1959   ac_dummy="$PATH"
1960   for ac_dir in $ac_dummy; do 
1961     test -z "$ac_dir" && ac_dir=.
1962     if test -f $ac_dir/$ac_word; then
1963       ac_cv_path_GDB="$ac_dir/$ac_word"
1964       break
1965     fi
1966   done
1967   IFS="$ac_save_ifs"
1968   test -z "$ac_cv_path_GDB" && ac_cv_path_GDB="no"
1969   ;;
1970 esac
1971 fi
1972 GDB="$ac_cv_path_GDB"
1973 if test -n "$GDB"; then
1974   echo "$ac_t""$GDB" 1>&6
1975 else
1976   echo "$ac_t""no" 1>&6
1977 fi
1978
1979 # Extract the first word of "sdb", so it can be a program name with args.
1980 set dummy sdb; ac_word=$2
1981 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1982 echo "configure:1983: checking for $ac_word" >&5
1983 if eval "test \"`echo '$''{'ac_cv_path_SDB'+set}'`\" = set"; then
1984   echo $ac_n "(cached) $ac_c" 1>&6
1985 else
1986   case "$SDB" in
1987   /*)
1988   ac_cv_path_SDB="$SDB" # Let the user override the test with a path.
1989   ;;
1990   ?:/*)                  
1991   ac_cv_path_SDB="$SDB" # Let the user override the test with a dos path.
1992   ;;
1993   *)
1994   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1995   ac_dummy="$PATH"
1996   for ac_dir in $ac_dummy; do 
1997     test -z "$ac_dir" && ac_dir=.
1998     if test -f $ac_dir/$ac_word; then
1999       ac_cv_path_SDB="$ac_dir/$ac_word"
2000       break
2001     fi
2002   done
2003   IFS="$ac_save_ifs"
2004   test -z "$ac_cv_path_SDB" && ac_cv_path_SDB="no"
2005   ;;
2006 esac
2007 fi
2008 SDB="$ac_cv_path_SDB"
2009 if test -n "$SDB"; then
2010   echo "$ac_t""$SDB" 1>&6
2011 else
2012   echo "$ac_t""no" 1>&6
2013 fi
2014
2015
2016 if test $GDB != no ; then
2017         DEBUGGER=$GDB
2018 elif test $DBX != no ; then
2019         DEBUGGER=$DBX
2020 elif test $SDB != no ; then
2021         DEBUGGER=$SDB
2022 else
2023         DEBUGGER=no
2024 fi
2025
2026
2027
2028 # The following templates should be used with newer automakes
2029 # instead of acconfig.h
2030 #
2031 #AH_TEMPLATE([sig_atomic_t],
2032 #            [/* Define to `int' if <signal.h> doesn't define.])
2033 #AH_TEMPLATE([HAVE_START_COLOR],
2034 #            [Define if you have start_color, as a function or macro.])
2035 #AH_TEMPLATE([HAVE_TYPEAHEAD],
2036 #            [Define if you have typeahead, as a function or macro.])
2037 #AH_TEMPLATE([HAVE_BKGDSET],
2038 #            [Define if you have bkgdset, as a function or macro.])
2039 #AH_TEMPLATE([HAVE_CURS_SET],
2040 #            [Define if you have curs_set, as a function or macro.])
2041 #AH_TEMPLATE([HAVE_META],
2042 #            [Define if you have meta, as a function or macro.])
2043 #AH_TEMPLATE([HAVE_USE_DEFAULT_COLORS],
2044 #            [Define if you have use_default_colors, as a function or macro.])
2045 #AH_TEMPLATE([HAVE_RESIZETERM],
2046 #            [Define if you have resizeterm, as a function or macro.])
2047 #AH_TEMPLATE([SIG_ATOMIC_VOLATILE_T],
2048 #            [Some systems declare sig_atomic_t as volatile, some others -- no.
2049 #             This define will have value `sig_atomic_t' or
2050 #             `volatile sig_atomic_t' accordingly.])
2051 #AH_TEMPLATE([ICONV_NONTRANS],
2052 #            [Define as 1 if iconv() only converts exactly and we should treat
2053 #             all return values other than (size_t)(-1) as equivalent.])
2054
2055
2056 ac_aux_path_sendmail=/usr/sbin:/usr/lib
2057 # Extract the first word of "sendmail", so it can be a program name with args.
2058 set dummy sendmail; ac_word=$2
2059 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2060 echo "configure:2061: checking for $ac_word" >&5
2061 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2062   echo $ac_n "(cached) $ac_c" 1>&6
2063 else
2064   case "$SENDMAIL" in
2065   /*)
2066   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2067   ;;
2068   ?:/*)                  
2069   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2070   ;;
2071   *)
2072   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2073   ac_dummy="$PATH:$ac_aux_path_sendmail"
2074   for ac_dir in $ac_dummy; do 
2075     test -z "$ac_dir" && ac_dir=.
2076     if test -f $ac_dir/$ac_word; then
2077       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2078       break
2079     fi
2080   done
2081   IFS="$ac_save_ifs"
2082   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/sbin/sendmail"
2083   ;;
2084 esac
2085 fi
2086 SENDMAIL="$ac_cv_path_SENDMAIL"
2087 if test -n "$SENDMAIL"; then
2088   echo "$ac_t""$SENDMAIL" 1>&6
2089 else
2090   echo "$ac_t""no" 1>&6
2091 fi
2092
2093 cat >> confdefs.h <<EOF
2094 #define SENDMAIL "$ac_cv_path_SENDMAIL"
2095 EOF
2096
2097
2098 OPS='$(srcdir)/OPS'
2099 if test -f $srcdir/EXPORTABLE ; then
2100         SUBVERSION="us"
2101 else
2102         SUBVERSION="i"
2103
2104         # Check whether --enable-pgp or --disable-pgp was given.
2105 if test "${enable_pgp+set}" = set; then
2106   enableval="$enable_pgp"
2107          if test x$enableval = xno ; then
2108                         have_pgp=no
2109                 fi
2110         
2111 fi
2112
2113
2114         if test x$have_pgp != xno ; then
2115                 cat >> confdefs.h <<\EOF
2116 #define CRYPT_BACKEND_CLASSIC_PGP 1
2117 EOF
2118
2119                 PGPAUX_TARGET="pgpring pgpewrap"
2120                 MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pgp.o pgpinvoke.o pgpkey.o pgplib.o gnupgparse.o pgpmicalg.o pgppacket.o crypt-mod-pgp-classic.o"
2121         fi
2122
2123         # Check whether --enable-smime or --disable-smime was given.
2124 if test "${enable_smime+set}" = set; then
2125   enableval="$enable_smime"
2126         if test x$enableval = xno ; then
2127                         have_smime=no
2128                 fi
2129         
2130 fi
2131
2132  
2133         if test x$have_smime != xno ; then
2134                 cat >> confdefs.h <<\EOF
2135 #define CRYPT_BACKEND_CLASSIC_SMIME 1
2136 EOF
2137
2138                 MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS smime.o crypt-mod-smime-classic.o"
2139                 SMIMEAUX_TARGET="smime_keys"
2140         fi
2141   
2142         # Check whether --with-mixmaster or --without-mixmaster was given.
2143 if test "${with_mixmaster+set}" = set; then
2144   withval="$with_mixmaster"
2145   if test -x "$withval" ; then
2146                         MIXMASTER="$withval"
2147                  else
2148                         MIXMASTER="mixmaster"
2149                  fi
2150                  OPS="$OPS \$(srcdir)/OPS.MIX"
2151                  MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS remailer.o"
2152                  cat >> confdefs.h <<EOF
2153 #define MIXMASTER "$MIXMASTER"
2154 EOF
2155
2156                 
2157 fi
2158
2159
2160 fi
2161 # We now require all OPS
2162 OPS="$OPS \$(srcdir)/OPS.PGP \$(srcdir)/OPS.SMIME \$(srcdir)/OPS.CRYPT "
2163
2164
2165
2166
2167
2168
2169 cat >> confdefs.h <<EOF
2170 #define SUBVERSION "$SUBVERSION"
2171 EOF
2172
2173
2174
2175 # Extract the first word of "ispell", so it can be a program name with args.
2176 set dummy ispell; ac_word=$2
2177 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2178 echo "configure:2179: checking for $ac_word" >&5
2179 if eval "test \"`echo '$''{'ac_cv_path_ISPELL'+set}'`\" = set"; then
2180   echo $ac_n "(cached) $ac_c" 1>&6
2181 else
2182   case "$ISPELL" in
2183   /*)
2184   ac_cv_path_ISPELL="$ISPELL" # Let the user override the test with a path.
2185   ;;
2186   ?:/*)                  
2187   ac_cv_path_ISPELL="$ISPELL" # Let the user override the test with a dos path.
2188   ;;
2189   *)
2190   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2191   ac_dummy="$PATH"
2192   for ac_dir in $ac_dummy; do 
2193     test -z "$ac_dir" && ac_dir=.
2194     if test -f $ac_dir/$ac_word; then
2195       ac_cv_path_ISPELL="$ac_dir/$ac_word"
2196       break
2197     fi
2198   done
2199   IFS="$ac_save_ifs"
2200   test -z "$ac_cv_path_ISPELL" && ac_cv_path_ISPELL="no"
2201   ;;
2202 esac
2203 fi
2204 ISPELL="$ac_cv_path_ISPELL"
2205 if test -n "$ISPELL"; then
2206   echo "$ac_t""$ISPELL" 1>&6
2207 else
2208   echo "$ac_t""no" 1>&6
2209 fi
2210
2211 if test $ISPELL != no; then
2212         cat >> confdefs.h <<EOF
2213 #define ISPELL "$ISPELL"
2214 EOF
2215
2216 fi
2217
2218 # Check whether --with-slang or --without-slang was given.
2219 if test "${with_slang+set}" = set; then
2220   withval="$with_slang"
2221   echo $ac_n "checking if this is a BSD system""... $ac_c" 1>&6
2222 echo "configure:2223: checking if this is a BSD system" >&5
2223 if eval "test \"`echo '$''{'mutt_cv_bsdish'+set}'`\" = set"; then
2224   echo $ac_n "(cached) $ac_c" 1>&6
2225 else
2226   if test "$cross_compiling" = yes; then
2227   mutt_cv_bsdish=no
2228 else
2229   cat > conftest.$ac_ext <<EOF
2230 #line 2231 "configure"
2231 #include "confdefs.h"
2232 #include <sys/param.h>
2233
2234 main ()
2235 {
2236 #ifdef BSD
2237         exit (0);
2238 #else
2239         exit (1);
2240 #endif
2241 }
2242 EOF
2243 if { (eval echo configure:2244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2244 then
2245   mutt_cv_bsdish=yes
2246 else
2247   echo "configure: failed program was:" >&5
2248   cat conftest.$ac_ext >&5
2249   rm -fr conftest*
2250   mutt_cv_bsdish=no
2251 fi
2252 rm -fr conftest*
2253 fi
2254
2255 fi
2256
2257 echo "$ac_t""$mutt_cv_bsdish" 1>&6
2258
2259         echo $ac_n "checking for S-Lang""... $ac_c" 1>&6
2260 echo "configure:2261: checking for S-Lang" >&5
2261         if test $withval = yes; then
2262                 if test -d $srcdir/../slang; then
2263                         mutt_cv_slang=$srcdir/../slang/src
2264                         CPPFLAGS="$CPPFLAGS -I${mutt_cv_slang}"
2265                         LDFLAGS="$LDFLAGS -L${mutt_cv_slang}/objs"
2266                 else
2267                         if test -d $mutt_cv_prefix/include/slang; then
2268                                 CPPFLAGS="$CPPFLAGS -I$mutt_cv_prefix/include/slang"
2269                         elif test -d /usr/include/slang; then
2270                                 CPPFLAGS="$CPPFLAGS -I/usr/include/slang"
2271                         fi
2272                         mutt_cv_slang=yes
2273                 fi
2274         else
2275                                 if test -f $withval/src/slang.h; then
2276                         mutt_cv_slang=$withval/src
2277                         CPPFLAGS="$CPPFLAGS -I${mutt_cv_slang}"
2278                         LDFLAGS="$LDFLAGS -L${mutt_cv_slang}/objs"
2279                 else
2280                                                 mutt_cv_slang=$withval
2281                         if test -d $withval/include/slang; then
2282                                 CPPFLAGS="$CPPFLAGS -I${withval}/include/slang"
2283                         elif test -d $withval/include; then
2284                                 CPPFLAGS="$CPPFLAGS -I${withval}/include"
2285                         fi
2286                         LDFLAGS="$LDFLAGS -L${withval}/lib"
2287                 fi
2288         fi
2289         echo "$ac_t""$mutt_cv_slang" 1>&6
2290         if test $mutt_cv_bsdish = yes; then
2291                 echo $ac_n "checking for main in -ltermlib""... $ac_c" 1>&6
2292 echo "configure:2293: checking for main in -ltermlib" >&5
2293 ac_lib_var=`echo termlib'_'main | sed 'y%./+-%__p_%'`
2294 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2295   echo $ac_n "(cached) $ac_c" 1>&6
2296 else
2297   ac_save_LIBS="$LIBS"
2298 LIBS="-ltermlib  $LIBS"
2299 cat > conftest.$ac_ext <<EOF
2300 #line 2301 "configure"
2301 #include "confdefs.h"
2302
2303 int main() {
2304 main()
2305 ; return 0; }
2306 EOF
2307 if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2308   rm -rf conftest*
2309   eval "ac_cv_lib_$ac_lib_var=yes"
2310 else
2311   echo "configure: failed program was:" >&5
2312   cat conftest.$ac_ext >&5
2313   rm -rf conftest*
2314   eval "ac_cv_lib_$ac_lib_var=no"
2315 fi
2316 rm -f conftest*
2317 LIBS="$ac_save_LIBS"
2318
2319 fi
2320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2321   echo "$ac_t""yes" 1>&6
2322     ac_tr_lib=HAVE_LIB`echo termlib | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2323     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2324   cat >> confdefs.h <<EOF
2325 #define $ac_tr_lib 1
2326 EOF
2327
2328   LIBS="-ltermlib $LIBS"
2329
2330 else
2331   echo "$ac_t""no" 1>&6
2332 fi
2333
2334         fi
2335         cat >> confdefs.h <<\EOF
2336 #define USE_SLANG_CURSES 1
2337 EOF
2338
2339         cat >> confdefs.h <<\EOF
2340 #define HAVE_COLOR 1
2341 EOF
2342
2343         MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS resize.o"
2344
2345         
2346         echo $ac_n "checking for SLtt_get_terminfo in -lslang""... $ac_c" 1>&6
2347 echo "configure:2348: checking for SLtt_get_terminfo in -lslang" >&5
2348 ac_lib_var=`echo slang'_'SLtt_get_terminfo | sed 'y%./+-%__p_%'`
2349 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2350   echo $ac_n "(cached) $ac_c" 1>&6
2351 else
2352   ac_save_LIBS="$LIBS"
2353 LIBS="-lslang -lm $LIBS"
2354 cat > conftest.$ac_ext <<EOF
2355 #line 2356 "configure"
2356 #include "confdefs.h"
2357 /* Override any gcc2 internal prototype to avoid an error.  */
2358 /* We use char because int might match the return type of a gcc2
2359     builtin and then its argument prototype would still apply.  */
2360 char SLtt_get_terminfo();
2361
2362 int main() {
2363 SLtt_get_terminfo()
2364 ; return 0; }
2365 EOF
2366 if { (eval echo configure:2367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2367   rm -rf conftest*
2368   eval "ac_cv_lib_$ac_lib_var=yes"
2369 else
2370   echo "configure: failed program was:" >&5
2371   cat conftest.$ac_ext >&5
2372   rm -rf conftest*
2373   eval "ac_cv_lib_$ac_lib_var=no"
2374 fi
2375 rm -f conftest*
2376 LIBS="$ac_save_LIBS"
2377
2378 fi
2379 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2380   echo "$ac_t""yes" 1>&6
2381   MUTTLIBS="$MUTTLIBS -lslang -lm"
2382 else
2383   echo "$ac_t""no" 1>&6
2384 { echo "configure: error: unable to compile.  check config.log" 1>&2; exit 1; }
2385 fi
2386
2387
2388         
2389 else
2390   mutt_cv_curses=/usr
2391         # Check whether --with-curses or --without-curses was given.
2392 if test "${with_curses+set}" = set; then
2393   withval="$with_curses"
2394   if test $withval != yes; then
2395                         mutt_cv_curses=$withval
2396                 fi
2397                 if test x$mutt_cv_curses != x/usr; then
2398                         LDFLAGS="-L${mutt_cv_curses}/lib $LDFLAGS"
2399                         CPPFLAGS="$CPPFLAGS -I${mutt_cv_curses}/include"
2400                 fi
2401 fi
2402
2403
2404         echo $ac_n "checking for initscr""... $ac_c" 1>&6
2405 echo "configure:2406: checking for initscr" >&5
2406 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
2407   echo $ac_n "(cached) $ac_c" 1>&6
2408 else
2409   cat > conftest.$ac_ext <<EOF
2410 #line 2411 "configure"
2411 #include "confdefs.h"
2412 /* System header to define __stub macros and hopefully few prototypes,
2413     which can conflict with char initscr(); below.  */
2414 #include <assert.h>
2415 /* Override any gcc2 internal prototype to avoid an error.  */
2416 /* We use char because int might match the return type of a gcc2
2417     builtin and then its argument prototype would still apply.  */
2418 char initscr();
2419
2420 int main() {
2421
2422 /* The GNU C library defines this for functions which it implements
2423     to always fail with ENOSYS.  Some functions are actually named
2424     something starting with __ and the normal name is an alias.  */
2425 #if defined (__stub_initscr) || defined (__stub___initscr)
2426 choke me
2427 #else
2428 initscr();
2429 #endif
2430
2431 ; return 0; }
2432 EOF
2433 if { (eval echo configure:2434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2434   rm -rf conftest*
2435   eval "ac_cv_func_initscr=yes"
2436 else
2437   echo "configure: failed program was:" >&5
2438   cat conftest.$ac_ext >&5
2439   rm -rf conftest*
2440   eval "ac_cv_func_initscr=no"
2441 fi
2442 rm -f conftest*
2443 fi
2444
2445 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
2446   echo "$ac_t""yes" 1>&6
2447   :
2448 else
2449   echo "$ac_t""no" 1>&6
2450
2451         cf_ncurses="ncurses"
2452         for lib in ncurses ncursesw
2453         do
2454                 echo $ac_n "checking for waddnwstr in -l$lib""... $ac_c" 1>&6
2455 echo "configure:2456: checking for waddnwstr in -l$lib" >&5
2456 ac_lib_var=`echo $lib'_'waddnwstr | sed 'y%./+-%__p_%'`
2457 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2458   echo $ac_n "(cached) $ac_c" 1>&6
2459 else
2460   ac_save_LIBS="$LIBS"
2461 LIBS="-l$lib  $LIBS"
2462 cat > conftest.$ac_ext <<EOF
2463 #line 2464 "configure"
2464 #include "confdefs.h"
2465 /* Override any gcc2 internal prototype to avoid an error.  */
2466 /* We use char because int might match the return type of a gcc2
2467     builtin and then its argument prototype would still apply.  */
2468 char waddnwstr();
2469
2470 int main() {
2471 waddnwstr()
2472 ; return 0; }
2473 EOF
2474 if { (eval echo configure:2475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2475   rm -rf conftest*
2476   eval "ac_cv_lib_$ac_lib_var=yes"
2477 else
2478   echo "configure: failed program was:" >&5
2479   cat conftest.$ac_ext >&5
2480   rm -rf conftest*
2481   eval "ac_cv_lib_$ac_lib_var=no"
2482 fi
2483 rm -f conftest*
2484 LIBS="$ac_save_LIBS"
2485
2486 fi
2487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2488   echo "$ac_t""yes" 1>&6
2489   cf_ncurses="$lib"; break
2490 else
2491   echo "$ac_t""no" 1>&6
2492 fi
2493
2494         done
2495         echo $ac_n "checking for initscr in -l$cf_ncurses""... $ac_c" 1>&6
2496 echo "configure:2497: checking for initscr in -l$cf_ncurses" >&5
2497 ac_lib_var=`echo $cf_ncurses'_'initscr | sed 'y%./+-%__p_%'`
2498 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2499   echo $ac_n "(cached) $ac_c" 1>&6
2500 else
2501   ac_save_LIBS="$LIBS"
2502 LIBS="-l$cf_ncurses  $LIBS"
2503 cat > conftest.$ac_ext <<EOF
2504 #line 2505 "configure"
2505 #include "confdefs.h"
2506 /* Override any gcc2 internal prototype to avoid an error.  */
2507 /* We use char because int might match the return type of a gcc2
2508     builtin and then its argument prototype would still apply.  */
2509 char initscr();
2510
2511 int main() {
2512 initscr()
2513 ; return 0; }
2514 EOF
2515 if { (eval echo configure:2516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2516   rm -rf conftest*
2517   eval "ac_cv_lib_$ac_lib_var=yes"
2518 else
2519   echo "configure: failed program was:" >&5
2520   cat conftest.$ac_ext >&5
2521   rm -rf conftest*
2522   eval "ac_cv_lib_$ac_lib_var=no"
2523 fi
2524 rm -f conftest*
2525 LIBS="$ac_save_LIBS"
2526
2527 fi
2528 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2529   echo "$ac_t""yes" 1>&6
2530   MUTTLIBS="$MUTTLIBS -l$cf_ncurses"
2531                 if test x$mutt_cv_curses = x/usr -a -d /usr/include/ncurses; then
2532                         CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses"
2533                 fi
2534                 
2535                 if test "$cf_ncurses" = ncursesw; then
2536                         for ac_hdr in ncursesw/ncurses.h
2537 do
2538 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2539 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2540 echo "configure:2541: checking for $ac_hdr" >&5
2541 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2542   echo $ac_n "(cached) $ac_c" 1>&6
2543 else
2544   cat > conftest.$ac_ext <<EOF
2545 #line 2546 "configure"
2546 #include "confdefs.h"
2547 #include <$ac_hdr>
2548 EOF
2549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2550 { (eval echo configure:2551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2552 if test -z "$ac_err"; then
2553   rm -rf conftest*
2554   eval "ac_cv_header_$ac_safe=yes"
2555 else
2556   echo "$ac_err" >&5
2557   echo "configure: failed program was:" >&5
2558   cat conftest.$ac_ext >&5
2559   rm -rf conftest*
2560   eval "ac_cv_header_$ac_safe=no"
2561 fi
2562 rm -f conftest*
2563 fi
2564 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2565   echo "$ac_t""yes" 1>&6
2566     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2567   cat >> confdefs.h <<EOF
2568 #define $ac_tr_hdr 1
2569 EOF
2570  cf_cv_ncurses_header="ncursesw/ncurses.h"
2571 else
2572   echo "$ac_t""no" 1>&6
2573 fi
2574 done
2575
2576                 else
2577                         for ac_hdr in ncurses.h
2578 do
2579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2581 echo "configure:2582: checking for $ac_hdr" >&5
2582 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2583   echo $ac_n "(cached) $ac_c" 1>&6
2584 else
2585   cat > conftest.$ac_ext <<EOF
2586 #line 2587 "configure"
2587 #include "confdefs.h"
2588 #include <$ac_hdr>
2589 EOF
2590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2591 { (eval echo configure:2592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2593 if test -z "$ac_err"; then
2594   rm -rf conftest*
2595   eval "ac_cv_header_$ac_safe=yes"
2596 else
2597   echo "$ac_err" >&5
2598   echo "configure: failed program was:" >&5
2599   cat conftest.$ac_ext >&5
2600   rm -rf conftest*
2601   eval "ac_cv_header_$ac_safe=no"
2602 fi
2603 rm -f conftest*
2604 fi
2605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2606   echo "$ac_t""yes" 1>&6
2607     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2608   cat >> confdefs.h <<EOF
2609 #define $ac_tr_hdr 1
2610 EOF
2611  cf_cv_ncurses_header="ncurses.h"
2612 else
2613   echo "$ac_t""no" 1>&6
2614 fi
2615 done
2616
2617                 fi
2618 else
2619   echo "$ac_t""no" 1>&6
2620
2621 echo $ac_n "checking for initscr""... $ac_c" 1>&6
2622 echo "configure:2623: checking for initscr" >&5
2623 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
2624   echo $ac_n "(cached) $ac_c" 1>&6
2625 else
2626   cat > conftest.$ac_ext <<EOF
2627 #line 2628 "configure"
2628 #include "confdefs.h"
2629 /* System header to define __stub macros and hopefully few prototypes,
2630     which can conflict with char initscr(); below.  */
2631 #include <assert.h>
2632 /* Override any gcc2 internal prototype to avoid an error.  */
2633 /* We use char because int might match the return type of a gcc2
2634     builtin and then its argument prototype would still apply.  */
2635 char initscr();
2636
2637 int main() {
2638
2639 /* The GNU C library defines this for functions which it implements
2640     to always fail with ENOSYS.  Some functions are actually named
2641     something starting with __ and the normal name is an alias.  */
2642 #if defined (__stub_initscr) || defined (__stub___initscr)
2643 choke me
2644 #else
2645 initscr();
2646 #endif
2647
2648 ; return 0; }
2649 EOF
2650 if { (eval echo configure:2651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2651   rm -rf conftest*
2652   eval "ac_cv_func_initscr=yes"
2653 else
2654   echo "configure: failed program was:" >&5
2655   cat conftest.$ac_ext >&5
2656   rm -rf conftest*
2657   eval "ac_cv_func_initscr=no"
2658 fi
2659 rm -f conftest*
2660 fi
2661
2662 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
2663   echo "$ac_t""yes" 1>&6
2664   :
2665 else
2666   echo "$ac_t""no" 1>&6
2667
2668 case $host_os in #(vi
2669 freebsd*) #(vi
2670         echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
2671 echo "configure:2672: checking for tgoto in -lmytinfo" >&5
2672 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
2673 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2674   echo $ac_n "(cached) $ac_c" 1>&6
2675 else
2676   ac_save_LIBS="$LIBS"
2677 LIBS="-lmytinfo  $LIBS"
2678 cat > conftest.$ac_ext <<EOF
2679 #line 2680 "configure"
2680 #include "confdefs.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 tgoto();
2685
2686 int main() {
2687 tgoto()
2688 ; return 0; }
2689 EOF
2690 if { (eval echo configure:2691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2691   rm -rf conftest*
2692   eval "ac_cv_lib_$ac_lib_var=yes"
2693 else
2694   echo "configure: failed program was:" >&5
2695   cat conftest.$ac_ext >&5
2696   rm -rf conftest*
2697   eval "ac_cv_lib_$ac_lib_var=no"
2698 fi
2699 rm -f conftest*
2700 LIBS="$ac_save_LIBS"
2701
2702 fi
2703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2704   echo "$ac_t""yes" 1>&6
2705   LIBS="-lmytinfo $LIBS"
2706 else
2707   echo "$ac_t""no" 1>&6
2708 fi
2709
2710         ;;
2711 hpux10.*|hpux11.*)
2712         echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
2713 echo "configure:2714: checking for initscr in -lcur_colr" >&5
2714 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
2715 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2716   echo $ac_n "(cached) $ac_c" 1>&6
2717 else
2718   ac_save_LIBS="$LIBS"
2719 LIBS="-lcur_colr  $LIBS"
2720 cat > conftest.$ac_ext <<EOF
2721 #line 2722 "configure"
2722 #include "confdefs.h"
2723 /* Override any gcc2 internal prototype to avoid an error.  */
2724 /* We use char because int might match the return type of a gcc2
2725     builtin and then its argument prototype would still apply.  */
2726 char initscr();
2727
2728 int main() {
2729 initscr()
2730 ; return 0; }
2731 EOF
2732 if { (eval echo configure:2733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2733   rm -rf conftest*
2734   eval "ac_cv_lib_$ac_lib_var=yes"
2735 else
2736   echo "configure: failed program was:" >&5
2737   cat conftest.$ac_ext >&5
2738   rm -rf conftest*
2739   eval "ac_cv_lib_$ac_lib_var=no"
2740 fi
2741 rm -f conftest*
2742 LIBS="$ac_save_LIBS"
2743
2744 fi
2745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2746   echo "$ac_t""yes" 1>&6
2747   
2748                 LIBS="-lcur_colr $LIBS"
2749                 CFLAGS="-I/usr/include/curses_colr $CFLAGS"
2750                 ac_cv_func_initscr=yes
2751                 
2752 else
2753   echo "$ac_t""no" 1>&6
2754
2755         echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
2756 echo "configure:2757: checking for initscr in -lHcurses" >&5
2757 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
2758 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2759   echo $ac_n "(cached) $ac_c" 1>&6
2760 else
2761   ac_save_LIBS="$LIBS"
2762 LIBS="-lHcurses  $LIBS"
2763 cat > conftest.$ac_ext <<EOF
2764 #line 2765 "configure"
2765 #include "confdefs.h"
2766 /* Override any gcc2 internal prototype to avoid an error.  */
2767 /* We use char because int might match the return type of a gcc2
2768     builtin and then its argument prototype would still apply.  */
2769 char initscr();
2770
2771 int main() {
2772 initscr()
2773 ; return 0; }
2774 EOF
2775 if { (eval echo configure:2776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2776   rm -rf conftest*
2777   eval "ac_cv_lib_$ac_lib_var=yes"
2778 else
2779   echo "configure: failed program was:" >&5
2780   cat conftest.$ac_ext >&5
2781   rm -rf conftest*
2782   eval "ac_cv_lib_$ac_lib_var=no"
2783 fi
2784 rm -f conftest*
2785 LIBS="$ac_save_LIBS"
2786
2787 fi
2788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2789   echo "$ac_t""yes" 1>&6
2790   
2791                 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
2792                 LIBS="-lHcurses $LIBS"
2793                 CFLAGS="-D__HP_CURSES -D_HP_CURSES $CFLAGS"
2794                 ac_cv_func_initscr=yes
2795                 
2796 else
2797   echo "$ac_t""no" 1>&6
2798 fi
2799
2800 fi
2801
2802         ;;
2803 linux*) # Suse Linux does not follow /usr/lib convention
2804         LIBS="$LIBS -L/lib"
2805         ;;
2806 esac
2807
2808 if test ".$With5lib" != ".no" ; then
2809 if test -d /usr/5lib ; then
2810         # SunOS 3.x or 4.x
2811         CPPFLAGS="$CPPFLAGS -I/usr/5include"
2812         LIBS="$LIBS -L/usr/5lib"
2813 fi
2814 fi
2815
2816 if test ".$ac_cv_func_initscr" != .yes ; then
2817         cf_save_LIBS="$LIBS"
2818         cf_term_lib=""
2819         cf_curs_lib=""
2820
2821         # Check for library containing tgoto.  Do this before curses library
2822         # because it may be needed to link the test-case for initscr.
2823         echo $ac_n "checking for tgoto""... $ac_c" 1>&6
2824 echo "configure:2825: checking for tgoto" >&5
2825 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
2826   echo $ac_n "(cached) $ac_c" 1>&6
2827 else
2828   cat > conftest.$ac_ext <<EOF
2829 #line 2830 "configure"
2830 #include "confdefs.h"
2831 /* System header to define __stub macros and hopefully few prototypes,
2832     which can conflict with char tgoto(); below.  */
2833 #include <assert.h>
2834 /* Override any gcc2 internal prototype to avoid an error.  */
2835 /* We use char because int might match the return type of a gcc2
2836     builtin and then its argument prototype would still apply.  */
2837 char tgoto();
2838
2839 int main() {
2840
2841 /* The GNU C library defines this for functions which it implements
2842     to always fail with ENOSYS.  Some functions are actually named
2843     something starting with __ and the normal name is an alias.  */
2844 #if defined (__stub_tgoto) || defined (__stub___tgoto)
2845 choke me
2846 #else
2847 tgoto();
2848 #endif
2849
2850 ; return 0; }
2851 EOF
2852 if { (eval echo configure:2853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2853   rm -rf conftest*
2854   eval "ac_cv_func_tgoto=yes"
2855 else
2856   echo "configure: failed program was:" >&5
2857   cat conftest.$ac_ext >&5
2858   rm -rf conftest*
2859   eval "ac_cv_func_tgoto=no"
2860 fi
2861 rm -f conftest*
2862 fi
2863
2864 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
2865   echo "$ac_t""yes" 1>&6
2866   cf_term_lib=predefined
2867 else
2868   echo "$ac_t""no" 1>&6
2869
2870                 for cf_term_lib in termcap termlib unknown
2871                 do
2872                         echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
2873 echo "configure:2874: checking for tgoto in -l$cf_term_lib" >&5
2874 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
2875 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2876   echo $ac_n "(cached) $ac_c" 1>&6
2877 else
2878   ac_save_LIBS="$LIBS"
2879 LIBS="-l$cf_term_lib  $LIBS"
2880 cat > conftest.$ac_ext <<EOF
2881 #line 2882 "configure"
2882 #include "confdefs.h"
2883 /* Override any gcc2 internal prototype to avoid an error.  */
2884 /* We use char because int might match the return type of a gcc2
2885     builtin and then its argument prototype would still apply.  */
2886 char tgoto();
2887
2888 int main() {
2889 tgoto()
2890 ; return 0; }
2891 EOF
2892 if { (eval echo configure:2893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2893   rm -rf conftest*
2894   eval "ac_cv_lib_$ac_lib_var=yes"
2895 else
2896   echo "configure: failed program was:" >&5
2897   cat conftest.$ac_ext >&5
2898   rm -rf conftest*
2899   eval "ac_cv_lib_$ac_lib_var=no"
2900 fi
2901 rm -f conftest*
2902 LIBS="$ac_save_LIBS"
2903
2904 fi
2905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2906   echo "$ac_t""yes" 1>&6
2907   break
2908 else
2909   echo "$ac_t""no" 1>&6
2910 fi
2911
2912                 done
2913         
2914 fi
2915
2916
2917         # Check for library containing initscr
2918         test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
2919         for cf_curs_lib in cursesX curses ncurses xcurses jcurses unknown
2920         do
2921                 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
2922 echo "configure:2923: checking for initscr in -l$cf_curs_lib" >&5
2923 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
2924 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2925   echo $ac_n "(cached) $ac_c" 1>&6
2926 else
2927   ac_save_LIBS="$LIBS"
2928 LIBS="-l$cf_curs_lib  $LIBS"
2929 cat > conftest.$ac_ext <<EOF
2930 #line 2931 "configure"
2931 #include "confdefs.h"
2932 /* Override any gcc2 internal prototype to avoid an error.  */
2933 /* We use char because int might match the return type of a gcc2
2934     builtin and then its argument prototype would still apply.  */
2935 char initscr();
2936
2937 int main() {
2938 initscr()
2939 ; return 0; }
2940 EOF
2941 if { (eval echo configure:2942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2942   rm -rf conftest*
2943   eval "ac_cv_lib_$ac_lib_var=yes"
2944 else
2945   echo "configure: failed program was:" >&5
2946   cat conftest.$ac_ext >&5
2947   rm -rf conftest*
2948   eval "ac_cv_lib_$ac_lib_var=no"
2949 fi
2950 rm -f conftest*
2951 LIBS="$ac_save_LIBS"
2952
2953 fi
2954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2955   echo "$ac_t""yes" 1>&6
2956   break
2957 else
2958   echo "$ac_t""no" 1>&6
2959 fi
2960
2961         done
2962         test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
2963
2964         LIBS="-l$cf_curs_lib $cf_save_LIBS"
2965         if test "$cf_term_lib" = unknown ; then
2966                 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
2967 echo "configure:2968: checking if we can link with $cf_curs_lib library" >&5
2968                 cat > conftest.$ac_ext <<EOF
2969 #line 2970 "configure"
2970 #include "confdefs.h"
2971 #include <${cf_cv_ncurses_header-curses.h}>
2972 int main() {
2973 initscr()
2974 ; return 0; }
2975 EOF
2976 if { (eval echo configure:2977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2977   rm -rf conftest*
2978   cf_result=yes
2979 else
2980   echo "configure: failed program was:" >&5
2981   cat conftest.$ac_ext >&5
2982   rm -rf conftest*
2983   cf_result=no
2984 fi
2985 rm -f conftest*
2986                 echo "$ac_t""$cf_result" 1>&6
2987                 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
2988         elif test "$cf_term_lib" != predefined ; then
2989                 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
2990 echo "configure:2991: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
2991                 cat > conftest.$ac_ext <<EOF
2992 #line 2993 "configure"
2993 #include "confdefs.h"
2994 #include <${cf_cv_ncurses_header-curses.h}>
2995 int main() {
2996 initscr(); tgoto((char *)0, 0, 0);
2997 ; return 0; }
2998 EOF
2999 if { (eval echo configure:3000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3000   rm -rf conftest*
3001   cf_result=no
3002 else
3003   echo "configure: failed program was:" >&5
3004   cat conftest.$ac_ext >&5
3005   rm -rf conftest*
3006   
3007                         LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
3008                         cat > conftest.$ac_ext <<EOF
3009 #line 3010 "configure"
3010 #include "confdefs.h"
3011 #include <${cf_cv_ncurses_header-curses.h}>
3012 int main() {
3013 initscr()
3014 ; return 0; }
3015 EOF
3016 if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3017   rm -rf conftest*
3018   cf_result=yes
3019 else
3020   echo "configure: failed program was:" >&5
3021   cat conftest.$ac_ext >&5
3022   rm -rf conftest*
3023   cf_result=error
3024 fi
3025 rm -f conftest*
3026                         
3027 fi
3028 rm -f conftest*
3029                 echo "$ac_t""$cf_result" 1>&6
3030         fi
3031 fi
3032
3033
3034 fi
3035
3036 fi
3037
3038                 
3039 fi
3040
3041
3042         old_LIBS="$LIBS"
3043         LIBS="$LIBS $MUTTLIBS"
3044         for ac_func in start_color typeahead bkgdset curs_set meta use_default_colors resizeterm
3045 do
3046
3047 echo $ac_n "checking for $ac_func declaration""... $ac_c" 1>&6
3048 echo "configure:3049: checking for $ac_func declaration" >&5
3049 if eval "test \"`echo '$''{'ac_cv_func_decl_$ac_func'+set}'`\" = set"; then
3050   echo $ac_n "(cached) $ac_c" 1>&6
3051 else
3052   cat > conftest.$ac_ext <<EOF
3053 #line 3054 "configure"
3054 #include "confdefs.h"
3055 #include <${cf_cv_ncurses_header-curses.h}>
3056 int main() {
3057 #ifndef ${ac_func}
3058 extern  int     ${ac_func}();
3059 #endif
3060 ; return 0; }
3061 EOF
3062 if { (eval echo configure:3063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3063   rm -rf conftest*
3064   
3065 cat > conftest.$ac_ext <<EOF
3066 #line 3067 "configure"
3067 #include "confdefs.h"
3068 #include <${cf_cv_ncurses_header-curses.h}>
3069 int main() {
3070 #ifndef ${ac_func}
3071 int     (*p)() = ${ac_func};
3072 #endif
3073 ; return 0; }
3074 EOF
3075 if { (eval echo configure:3076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3076   rm -rf conftest*
3077   
3078 eval "ac_cv_func_decl_$ac_func=yes"
3079 else
3080   echo "configure: failed program was:" >&5
3081   cat conftest.$ac_ext >&5
3082   rm -rf conftest*
3083   
3084 eval "ac_cv_func_decl_$ac_func=no"
3085 fi
3086 rm -f conftest*
3087 else
3088   echo "configure: failed program was:" >&5
3089   cat conftest.$ac_ext >&5
3090   rm -rf conftest*
3091   
3092 eval "ac_cv_func_decl_$ac_func=yes"
3093 fi
3094 rm -f conftest*
3095 fi
3096
3097 if eval "test \"`echo '$ac_cv_func_'decl_$ac_func`\" = yes"; then
3098   echo "$ac_t""yes" 1>&6
3099   
3100   
3101 ac_tr_func=`echo HAVE_$ac_func | tr '[a-z]' '[A-Z]'`
3102
3103   cat >> confdefs.h <<EOF
3104 #define $ac_tr_func 1
3105 EOF
3106  
3107 else
3108   echo "$ac_t""no" 1>&6
3109 fi
3110 done
3111
3112         if test "$ac_cv_func_decl_start_color" = yes; then
3113                 cat >> confdefs.h <<\EOF
3114 #define HAVE_COLOR 1
3115 EOF
3116
3117         fi
3118         if test "$ac_cv_func_decl_resizeterm" = yes; then
3119                 MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS resize.o"
3120         fi
3121         LIBS="$old_LIBS"
3122         
3123 fi
3124
3125
3126 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3127 echo "configure:3128: checking for ANSI C header files" >&5
3128 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3129   echo $ac_n "(cached) $ac_c" 1>&6
3130 else
3131   cat > conftest.$ac_ext <<EOF
3132 #line 3133 "configure"
3133 #include "confdefs.h"
3134 #include <stdlib.h>
3135 #include <stdarg.h>
3136 #include <string.h>
3137 #include <float.h>
3138 EOF
3139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3140 { (eval echo configure:3141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3142 if test -z "$ac_err"; then
3143   rm -rf conftest*
3144   ac_cv_header_stdc=yes
3145 else
3146   echo "$ac_err" >&5
3147   echo "configure: failed program was:" >&5
3148   cat conftest.$ac_ext >&5
3149   rm -rf conftest*
3150   ac_cv_header_stdc=no
3151 fi
3152 rm -f conftest*
3153
3154 if test $ac_cv_header_stdc = yes; then
3155   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3156 cat > conftest.$ac_ext <<EOF
3157 #line 3158 "configure"
3158 #include "confdefs.h"
3159 #include <string.h>
3160 EOF
3161 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3162   egrep "memchr" >/dev/null 2>&1; then
3163   :
3164 else
3165   rm -rf conftest*
3166   ac_cv_header_stdc=no
3167 fi
3168 rm -f conftest*
3169
3170 fi
3171
3172 if test $ac_cv_header_stdc = yes; then
3173   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3174 cat > conftest.$ac_ext <<EOF
3175 #line 3176 "configure"
3176 #include "confdefs.h"
3177 #include <stdlib.h>
3178 EOF
3179 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3180   egrep "free" >/dev/null 2>&1; then
3181   :
3182 else
3183   rm -rf conftest*
3184   ac_cv_header_stdc=no
3185 fi
3186 rm -f conftest*
3187
3188 fi
3189
3190 if test $ac_cv_header_stdc = yes; then
3191   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3192 if test "$cross_compiling" = yes; then
3193   :
3194 else
3195   cat > conftest.$ac_ext <<EOF
3196 #line 3197 "configure"
3197 #include "confdefs.h"
3198 #include <ctype.h>
3199 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3200 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3201 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3202 int main () { int i; for (i = 0; i < 256; i++)
3203 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3204 exit (0); }
3205
3206 EOF
3207 if { (eval echo configure:3208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3208 then
3209   :
3210 else
3211   echo "configure: failed program was:" >&5
3212   cat conftest.$ac_ext >&5
3213   rm -fr conftest*
3214   ac_cv_header_stdc=no
3215 fi
3216 rm -fr conftest*
3217 fi
3218
3219 fi
3220 fi
3221
3222 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3223 if test $ac_cv_header_stdc = yes; then
3224   cat >> confdefs.h <<\EOF
3225 #define STDC_HEADERS 1
3226 EOF
3227
3228 fi
3229
3230
3231 for ac_hdr in stdarg.h sys/ioctl.h ioctl.h sysexits.h
3232 do
3233 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3234 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3235 echo "configure:3236: checking for $ac_hdr" >&5
3236 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3237   echo $ac_n "(cached) $ac_c" 1>&6
3238 else
3239   cat > conftest.$ac_ext <<EOF
3240 #line 3241 "configure"
3241 #include "confdefs.h"
3242 #include <$ac_hdr>
3243 EOF
3244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3245 { (eval echo configure:3246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3247 if test -z "$ac_err"; then
3248   rm -rf conftest*
3249   eval "ac_cv_header_$ac_safe=yes"
3250 else
3251   echo "$ac_err" >&5
3252   echo "configure: failed program was:" >&5
3253   cat conftest.$ac_ext >&5
3254   rm -rf conftest*
3255   eval "ac_cv_header_$ac_safe=no"
3256 fi
3257 rm -f conftest*
3258 fi
3259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3260   echo "$ac_t""yes" 1>&6
3261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3262   cat >> confdefs.h <<EOF
3263 #define $ac_tr_hdr 1
3264 EOF
3265  
3266 else
3267   echo "$ac_t""no" 1>&6
3268 fi
3269 done
3270
3271 for ac_hdr in sys/time.h sys/resource.h
3272 do
3273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3275 echo "configure:3276: checking for $ac_hdr" >&5
3276 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3277   echo $ac_n "(cached) $ac_c" 1>&6
3278 else
3279   cat > conftest.$ac_ext <<EOF
3280 #line 3281 "configure"
3281 #include "confdefs.h"
3282 #include <$ac_hdr>
3283 EOF
3284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3285 { (eval echo configure:3286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3287 if test -z "$ac_err"; then
3288   rm -rf conftest*
3289   eval "ac_cv_header_$ac_safe=yes"
3290 else
3291   echo "$ac_err" >&5
3292   echo "configure: failed program was:" >&5
3293   cat conftest.$ac_ext >&5
3294   rm -rf conftest*
3295   eval "ac_cv_header_$ac_safe=no"
3296 fi
3297 rm -f conftest*
3298 fi
3299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3300   echo "$ac_t""yes" 1>&6
3301     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3302   cat >> confdefs.h <<EOF
3303 #define $ac_tr_hdr 1
3304 EOF
3305  
3306 else
3307   echo "$ac_t""no" 1>&6
3308 fi
3309 done
3310
3311 for ac_hdr in unix.h
3312 do
3313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3315 echo "configure:3316: checking for $ac_hdr" >&5
3316 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3317   echo $ac_n "(cached) $ac_c" 1>&6
3318 else
3319   cat > conftest.$ac_ext <<EOF
3320 #line 3321 "configure"
3321 #include "confdefs.h"
3322 #include <$ac_hdr>
3323 EOF
3324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3325 { (eval echo configure:3326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3327 if test -z "$ac_err"; then
3328   rm -rf conftest*
3329   eval "ac_cv_header_$ac_safe=yes"
3330 else
3331   echo "$ac_err" >&5
3332   echo "configure: failed program was:" >&5
3333   cat conftest.$ac_ext >&5
3334   rm -rf conftest*
3335   eval "ac_cv_header_$ac_safe=no"
3336 fi
3337 rm -f conftest*
3338 fi
3339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3340   echo "$ac_t""yes" 1>&6
3341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3342   cat >> confdefs.h <<EOF
3343 #define $ac_tr_hdr 1
3344 EOF
3345  
3346 else
3347   echo "$ac_t""no" 1>&6
3348 fi
3349 done
3350
3351
3352 for ac_func in setrlimit getsid isctype
3353 do
3354 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3355 echo "configure:3356: checking for $ac_func" >&5
3356 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3357   echo $ac_n "(cached) $ac_c" 1>&6
3358 else
3359   cat > conftest.$ac_ext <<EOF
3360 #line 3361 "configure"
3361 #include "confdefs.h"
3362 /* System header to define __stub macros and hopefully few prototypes,
3363     which can conflict with char $ac_func(); below.  */
3364 #include <assert.h>
3365 /* Override any gcc2 internal prototype to avoid an error.  */
3366 /* We use char because int might match the return type of a gcc2
3367     builtin and then its argument prototype would still apply.  */
3368 char $ac_func();
3369
3370 int main() {
3371
3372 /* The GNU C library defines this for functions which it implements
3373     to always fail with ENOSYS.  Some functions are actually named
3374     something starting with __ and the normal name is an alias.  */
3375 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3376 choke me
3377 #else
3378 $ac_func();
3379 #endif
3380
3381 ; return 0; }
3382 EOF
3383 if { (eval echo configure:3384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3384   rm -rf conftest*
3385   eval "ac_cv_func_$ac_func=yes"
3386 else
3387   echo "configure: failed program was:" >&5
3388   cat conftest.$ac_ext >&5
3389   rm -rf conftest*
3390   eval "ac_cv_func_$ac_func=no"
3391 fi
3392 rm -f conftest*
3393 fi
3394
3395 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3396   echo "$ac_t""yes" 1>&6
3397     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3398   cat >> confdefs.h <<EOF
3399 #define $ac_tr_func 1
3400 EOF
3401  
3402 else
3403   echo "$ac_t""no" 1>&6
3404 fi
3405 done
3406
3407
3408 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3409 echo "configure:3410: checking return type of signal handlers" >&5
3410 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3411   echo $ac_n "(cached) $ac_c" 1>&6
3412 else
3413   cat > conftest.$ac_ext <<EOF
3414 #line 3415 "configure"
3415 #include "confdefs.h"
3416 #include <sys/types.h>
3417 #include <signal.h>
3418 #ifdef signal
3419 #undef signal
3420 #endif
3421 #ifdef __cplusplus
3422 extern "C" void (*signal (int, void (*)(int)))(int);
3423 #else
3424 void (*signal ()) ();
3425 #endif
3426
3427 int main() {
3428 int i;
3429 ; return 0; }
3430 EOF
3431 if { (eval echo configure:3432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3432   rm -rf conftest*
3433   ac_cv_type_signal=void
3434 else
3435   echo "configure: failed program was:" >&5
3436   cat conftest.$ac_ext >&5
3437   rm -rf conftest*
3438   ac_cv_type_signal=int
3439 fi
3440 rm -f conftest*
3441 fi
3442
3443 echo "$ac_t""$ac_cv_type_signal" 1>&6
3444 cat >> confdefs.h <<EOF
3445 #define RETSIGTYPE $ac_cv_type_signal
3446 EOF
3447
3448
3449
3450 echo $ac_n "checking for sig_atomic_t in signal.h""... $ac_c" 1>&6
3451 echo "configure:3452: checking for sig_atomic_t in signal.h" >&5
3452 cat > conftest.$ac_ext <<EOF
3453 #line 3454 "configure"
3454 #include "confdefs.h"
3455 #include <signal.h>
3456 EOF
3457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3458   egrep "sig_atomic_t" >/dev/null 2>&1; then
3459   rm -rf conftest*
3460   
3461     ac_cv_type_sig_atomic_t=yes;
3462     cat > conftest.$ac_ext <<EOF
3463 #line 3464 "configure"
3464 #include "confdefs.h"
3465 #include <signal.h>
3466 EOF
3467 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3468   egrep "volatile.*sig_atomic_t" >/dev/null 2>&1; then
3469   rm -rf conftest*
3470   
3471                         is_sig_atomic_t_volatile=yes;
3472                         echo "$ac_t""yes, volatile" 1>&6
3473                     
3474 else
3475   rm -rf conftest*
3476   
3477                         is_sig_atomic_t_volatile=no;
3478                         echo "$ac_t""yes, non volatile" 1>&6
3479                     
3480 fi
3481 rm -f conftest*
3482
3483   
3484 else
3485   rm -rf conftest*
3486   
3487     echo "$ac_t""no" 1>&6
3488     echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
3489 echo "configure:3490: checking for sig_atomic_t" >&5
3490 if eval "test \"`echo '$''{'ac_cv_type_sig_atomic_t'+set}'`\" = set"; then
3491   echo $ac_n "(cached) $ac_c" 1>&6
3492 else
3493   cat > conftest.$ac_ext <<EOF
3494 #line 3495 "configure"
3495 #include "confdefs.h"
3496 #include <sys/types.h>
3497 #if STDC_HEADERS
3498 #include <stdlib.h>
3499 #include <stddef.h>
3500 #endif
3501 EOF
3502 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3503   egrep "(^|[^a-zA-Z_0-9])sig_atomic_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3504   rm -rf conftest*
3505   ac_cv_type_sig_atomic_t=yes
3506 else
3507   rm -rf conftest*
3508   ac_cv_type_sig_atomic_t=no
3509 fi
3510 rm -f conftest*
3511
3512 fi
3513 echo "$ac_t""$ac_cv_type_sig_atomic_t" 1>&6
3514 if test $ac_cv_type_sig_atomic_t = no; then
3515   cat >> confdefs.h <<\EOF
3516 #define sig_atomic_t int
3517 EOF
3518
3519 fi
3520
3521     is_sig_atomic_t_volatile=no
3522   
3523 fi
3524 rm -f conftest*
3525
3526 if test $is_sig_atomic_t_volatile = 'yes'
3527 then
3528     cat >> confdefs.h <<\EOF
3529 #define SIG_ATOMIC_VOLATILE_T sig_atomic_t
3530 EOF
3531
3532 else
3533     cat >> confdefs.h <<\EOF
3534 #define SIG_ATOMIC_VOLATILE_T volatile sig_atomic_t
3535 EOF
3536
3537 fi
3538
3539 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3540 echo "configure:3541: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3541 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
3542   echo $ac_n "(cached) $ac_c" 1>&6
3543 else
3544   cat > conftest.$ac_ext <<EOF
3545 #line 3546 "configure"
3546 #include "confdefs.h"
3547 #include <sys/types.h>
3548 #include <signal.h>
3549 /* NetBSD declares sys_siglist in unistd.h.  */
3550 #ifdef HAVE_UNISTD_H
3551 #include <unistd.h>
3552 #endif
3553 int main() {
3554 char *msg = *(sys_siglist + 1);
3555 ; return 0; }
3556 EOF
3557 if { (eval echo configure:3558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3558   rm -rf conftest*
3559   ac_cv_decl_sys_siglist=yes
3560 else
3561   echo "configure: failed program was:" >&5
3562   cat conftest.$ac_ext >&5
3563   rm -rf conftest*
3564   ac_cv_decl_sys_siglist=no
3565 fi
3566 rm -f conftest*
3567 fi
3568
3569 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3570 if test $ac_cv_decl_sys_siglist = yes; then
3571   cat >> confdefs.h <<\EOF
3572 #define SYS_SIGLIST_DECLARED 1
3573 EOF
3574
3575 fi
3576
3577
3578 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3579 echo "configure:3580: checking whether byte ordering is bigendian" >&5
3580 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3581   echo $ac_n "(cached) $ac_c" 1>&6
3582 else
3583   ac_cv_c_bigendian=unknown
3584 # See if sys/param.h defines the BYTE_ORDER macro.
3585 cat > conftest.$ac_ext <<EOF
3586 #line 3587 "configure"
3587 #include "confdefs.h"
3588 #include <sys/types.h>
3589 #include <sys/param.h>
3590 int main() {
3591
3592 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3593  bogus endian macros
3594 #endif
3595 ; return 0; }
3596 EOF
3597 if { (eval echo configure:3598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3598   rm -rf conftest*
3599   # It does; now see whether it defined to BIG_ENDIAN or not.
3600 cat > conftest.$ac_ext <<EOF
3601 #line 3602 "configure"
3602 #include "confdefs.h"
3603 #include <sys/types.h>
3604 #include <sys/param.h>
3605 int main() {
3606
3607 #if BYTE_ORDER != BIG_ENDIAN
3608  not big endian
3609 #endif
3610 ; return 0; }
3611 EOF
3612 if { (eval echo configure:3613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3613   rm -rf conftest*
3614   ac_cv_c_bigendian=yes
3615 else
3616   echo "configure: failed program was:" >&5
3617   cat conftest.$ac_ext >&5
3618   rm -rf conftest*
3619   ac_cv_c_bigendian=no
3620 fi
3621 rm -f conftest*
3622 else
3623   echo "configure: failed program was:" >&5
3624   cat conftest.$ac_ext >&5
3625 fi
3626 rm -f conftest*
3627 if test $ac_cv_c_bigendian = unknown; then
3628 if test "$cross_compiling" = yes; then
3629     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3630 else
3631   cat > conftest.$ac_ext <<EOF
3632 #line 3633 "configure"
3633 #include "confdefs.h"
3634 main () {
3635   /* Are we little or big endian?  From Harbison&Steele.  */
3636   union
3637   {
3638     long l;
3639     char c[sizeof (long)];
3640   } u;
3641   u.l = 1;
3642   exit (u.c[sizeof (long) - 1] == 1);
3643 }
3644 EOF
3645 if { (eval echo configure:3646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3646 then
3647   ac_cv_c_bigendian=no
3648 else
3649   echo "configure: failed program was:" >&5
3650   cat conftest.$ac_ext >&5
3651   rm -fr conftest*
3652   ac_cv_c_bigendian=yes
3653 fi
3654 rm -fr conftest*
3655 fi
3656
3657 fi
3658 fi
3659
3660 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3661 if test $ac_cv_c_bigendian = yes; then
3662   cat >> confdefs.h <<\EOF
3663 #define WORDS_BIGENDIAN 1
3664 EOF
3665
3666 fi
3667
3668 for ac_hdr in inttypes.h stdint.h
3669 do
3670 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3671 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3672 echo "configure:3673: checking for $ac_hdr" >&5
3673 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3674   echo $ac_n "(cached) $ac_c" 1>&6
3675 else
3676   cat > conftest.$ac_ext <<EOF
3677 #line 3678 "configure"
3678 #include "confdefs.h"
3679 #include <$ac_hdr>
3680 EOF
3681 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3682 { (eval echo configure:3683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3683 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3684 if test -z "$ac_err"; then
3685   rm -rf conftest*
3686   eval "ac_cv_header_$ac_safe=yes"
3687 else
3688   echo "$ac_err" >&5
3689   echo "configure: failed program was:" >&5
3690   cat conftest.$ac_ext >&5
3691   rm -rf conftest*
3692   eval "ac_cv_header_$ac_safe=no"
3693 fi
3694 rm -f conftest*
3695 fi
3696 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3697   echo "$ac_t""yes" 1>&6
3698     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3699   cat >> confdefs.h <<EOF
3700 #define $ac_tr_hdr 1
3701 EOF
3702  
3703 else
3704   echo "$ac_t""no" 1>&6
3705 fi
3706 done
3707
3708 echo $ac_n "checking for uint32_t""... $ac_c" 1>&6
3709 echo "configure:3710: checking for uint32_t" >&5
3710 cat > conftest.$ac_ext <<EOF
3711 #line 3712 "configure"
3712 #include "confdefs.h"
3713
3714 #include <sys/types.h>
3715 #if HAVE_INTTYPES_H
3716 #include <inttypes.h>
3717 #else
3718 #if HAVE_STDINT_H
3719 #include <stdint.h>
3720 #endif
3721 #endif
3722 int main() {
3723 if ((uint32_t *) 0)
3724   return 0;
3725 if (sizeof (uint32_t))
3726   return 0;
3727
3728 ; return 0; }
3729 EOF
3730 if { (eval echo configure:3731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3731   rm -rf conftest*
3732   
3733     cat >> confdefs.h <<\EOF
3734 #define HAVE_UINT32_T 1
3735 EOF
3736
3737     echo "$ac_t""yes" 1>&6
3738   
3739 else
3740   echo "configure: failed program was:" >&5
3741   cat conftest.$ac_ext >&5
3742   rm -rf conftest*
3743   echo "$ac_t""no" 1>&6
3744
3745 fi
3746 rm -f conftest*
3747 echo $ac_n "checking size of int""... $ac_c" 1>&6
3748 echo "configure:3749: checking size of int" >&5
3749 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
3750   echo $ac_n "(cached) $ac_c" 1>&6
3751 else
3752   if test "$cross_compiling" = yes; then
3753     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3754 else
3755   cat > conftest.$ac_ext <<EOF
3756 #line 3757 "configure"
3757 #include "confdefs.h"
3758 #include <stdio.h>
3759 #include <sys/types.h>
3760 main()
3761 {
3762   FILE *f=fopen("conftestval", "w");
3763   if (!f) exit(1);
3764   fprintf(f, "%d\n", sizeof(int));
3765   exit(0);
3766 }
3767 EOF
3768 if { (eval echo configure:3769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3769 then
3770   ac_cv_sizeof_int=`cat conftestval`
3771 else
3772   echo "configure: failed program was:" >&5
3773   cat conftest.$ac_ext >&5
3774   rm -fr conftest*
3775   ac_cv_sizeof_int=0
3776 fi
3777 rm -fr conftest*
3778 fi
3779
3780 fi
3781 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3782 cat >> confdefs.h <<EOF
3783 #define SIZEOF_INT $ac_cv_sizeof_int
3784 EOF
3785
3786
3787 echo $ac_n "checking size of long""... $ac_c" 1>&6
3788 echo "configure:3789: checking size of long" >&5
3789 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3790   echo $ac_n "(cached) $ac_c" 1>&6
3791 else
3792   if test "$cross_compiling" = yes; then
3793     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3794 else
3795   cat > conftest.$ac_ext <<EOF
3796 #line 3797 "configure"
3797 #include "confdefs.h"
3798 #include <stdio.h>
3799 #include <sys/types.h>
3800 main()
3801 {
3802   FILE *f=fopen("conftestval", "w");
3803   if (!f) exit(1);
3804   fprintf(f, "%d\n", sizeof(long));
3805   exit(0);
3806 }
3807 EOF
3808 if { (eval echo configure:3809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3809 then
3810   ac_cv_sizeof_long=`cat conftestval`
3811 else
3812   echo "configure: failed program was:" >&5
3813   cat conftest.$ac_ext >&5
3814   rm -fr conftest*
3815   ac_cv_sizeof_long=0
3816 fi
3817 rm -fr conftest*
3818 fi
3819
3820 fi
3821 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3822 cat >> confdefs.h <<EOF
3823 #define SIZEOF_LONG $ac_cv_sizeof_long
3824 EOF
3825
3826
3827
3828 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3829 echo "configure:3830: checking for pid_t" >&5
3830 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3831   echo $ac_n "(cached) $ac_c" 1>&6
3832 else
3833   cat > conftest.$ac_ext <<EOF
3834 #line 3835 "configure"
3835 #include "confdefs.h"
3836 #include <sys/types.h>
3837 #if STDC_HEADERS
3838 #include <stdlib.h>
3839 #include <stddef.h>
3840 #endif
3841 EOF
3842 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3843   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3844   rm -rf conftest*
3845   ac_cv_type_pid_t=yes
3846 else
3847   rm -rf conftest*
3848   ac_cv_type_pid_t=no
3849 fi
3850 rm -f conftest*
3851
3852 fi
3853 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3854 if test $ac_cv_type_pid_t = no; then
3855   cat >> confdefs.h <<\EOF
3856 #define pid_t int
3857 EOF
3858
3859 fi
3860
3861
3862 for ac_func in fgetpos memmove setegid srand48 strerror
3863 do
3864 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3865 echo "configure:3866: checking for $ac_func" >&5
3866 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3867   echo $ac_n "(cached) $ac_c" 1>&6
3868 else
3869   cat > conftest.$ac_ext <<EOF
3870 #line 3871 "configure"
3871 #include "confdefs.h"
3872 /* System header to define __stub macros and hopefully few prototypes,
3873     which can conflict with char $ac_func(); below.  */
3874 #include <assert.h>
3875 /* Override any gcc2 internal prototype to avoid an error.  */
3876 /* We use char because int might match the return type of a gcc2
3877     builtin and then its argument prototype would still apply.  */
3878 char $ac_func();
3879
3880 int main() {
3881
3882 /* The GNU C library defines this for functions which it implements
3883     to always fail with ENOSYS.  Some functions are actually named
3884     something starting with __ and the normal name is an alias.  */
3885 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3886 choke me
3887 #else
3888 $ac_func();
3889 #endif
3890
3891 ; return 0; }
3892 EOF
3893 if { (eval echo configure:3894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3894   rm -rf conftest*
3895   eval "ac_cv_func_$ac_func=yes"
3896 else
3897   echo "configure: failed program was:" >&5
3898   cat conftest.$ac_ext >&5
3899   rm -rf conftest*
3900   eval "ac_cv_func_$ac_func=no"
3901 fi
3902 rm -f conftest*
3903 fi
3904
3905 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3906   echo "$ac_t""yes" 1>&6
3907     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3908   cat >> confdefs.h <<EOF
3909 #define $ac_tr_func 1
3910 EOF
3911  
3912 else
3913   echo "$ac_t""no" 1>&6
3914 fi
3915 done
3916
3917
3918 for ac_func in strcasecmp strdup
3919 do
3920 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3921 echo "configure:3922: checking for $ac_func" >&5
3922 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3923   echo $ac_n "(cached) $ac_c" 1>&6
3924 else
3925   cat > conftest.$ac_ext <<EOF
3926 #line 3927 "configure"
3927 #include "confdefs.h"
3928 /* System header to define __stub macros and hopefully few prototypes,
3929     which can conflict with char $ac_func(); below.  */
3930 #include <assert.h>
3931 /* Override any gcc2 internal prototype to avoid an error.  */
3932 /* We use char because int might match the return type of a gcc2
3933     builtin and then its argument prototype would still apply.  */
3934 char $ac_func();
3935
3936 int main() {
3937
3938 /* The GNU C library defines this for functions which it implements
3939     to always fail with ENOSYS.  Some functions are actually named
3940     something starting with __ and the normal name is an alias.  */
3941 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3942 choke me
3943 #else
3944 $ac_func();
3945 #endif
3946
3947 ; return 0; }
3948 EOF
3949 if { (eval echo configure:3950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3950   rm -rf conftest*
3951   eval "ac_cv_func_$ac_func=yes"
3952 else
3953   echo "configure: failed program was:" >&5
3954   cat conftest.$ac_ext >&5
3955   rm -rf conftest*
3956   eval "ac_cv_func_$ac_func=no"
3957 fi
3958 rm -f conftest*
3959 fi
3960
3961 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3962   echo "$ac_t""yes" 1>&6
3963     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3964   cat >> confdefs.h <<EOF
3965 #define $ac_tr_func 1
3966 EOF
3967  
3968 else
3969   echo "$ac_t""no" 1>&6
3970 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
3971 fi
3972 done
3973
3974
3975
3976 echo $ac_n "checking for getopt""... $ac_c" 1>&6
3977 echo "configure:3978: checking for getopt" >&5
3978 if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
3979   echo $ac_n "(cached) $ac_c" 1>&6
3980 else
3981   cat > conftest.$ac_ext <<EOF
3982 #line 3983 "configure"
3983 #include "confdefs.h"
3984 /* System header to define __stub macros and hopefully few prototypes,
3985     which can conflict with char getopt(); below.  */
3986 #include <assert.h>
3987 /* Override any gcc2 internal prototype to avoid an error.  */
3988 /* We use char because int might match the return type of a gcc2
3989     builtin and then its argument prototype would still apply.  */
3990 char getopt();
3991
3992 int main() {
3993
3994 /* The GNU C library defines this for functions which it implements
3995     to always fail with ENOSYS.  Some functions are actually named
3996     something starting with __ and the normal name is an alias.  */
3997 #if defined (__stub_getopt) || defined (__stub___getopt)
3998 choke me
3999 #else
4000 getopt();
4001 #endif
4002
4003 ; return 0; }
4004 EOF
4005 if { (eval echo configure:4006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4006   rm -rf conftest*
4007   eval "ac_cv_func_getopt=yes"
4008 else
4009   echo "configure: failed program was:" >&5
4010   cat conftest.$ac_ext >&5
4011   rm -rf conftest*
4012   eval "ac_cv_func_getopt=no"
4013 fi
4014 rm -f conftest*
4015 fi
4016
4017 if eval "test \"`echo '$ac_cv_func_'getopt`\" = yes"; then
4018   echo "$ac_t""yes" 1>&6
4019   :
4020 else
4021   echo "$ac_t""no" 1>&6
4022 fi
4023
4024 if test $ac_cv_func_getopt = yes; then
4025         for ac_hdr in getopt.h
4026 do
4027 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4028 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4029 echo "configure:4030: checking for $ac_hdr" >&5
4030 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4031   echo $ac_n "(cached) $ac_c" 1>&6
4032 else
4033   cat > conftest.$ac_ext <<EOF
4034 #line 4035 "configure"
4035 #include "confdefs.h"
4036 #include <$ac_hdr>
4037 EOF
4038 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4039 { (eval echo configure:4040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4040 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4041 if test -z "$ac_err"; then
4042   rm -rf conftest*
4043   eval "ac_cv_header_$ac_safe=yes"
4044 else
4045   echo "$ac_err" >&5
4046   echo "configure: failed program was:" >&5
4047   cat conftest.$ac_ext >&5
4048   rm -rf conftest*
4049   eval "ac_cv_header_$ac_safe=no"
4050 fi
4051 rm -f conftest*
4052 fi
4053 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4054   echo "$ac_t""yes" 1>&6
4055     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4056   cat >> confdefs.h <<EOF
4057 #define $ac_tr_hdr 1
4058 EOF
4059  
4060 else
4061   echo "$ac_t""no" 1>&6
4062 fi
4063 done
4064
4065 fi
4066
4067 mutt_cv_snprintf=no
4068 SNPRINTFOBJS=""
4069 for ac_func in snprintf
4070 do
4071 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4072 echo "configure:4073: checking for $ac_func" >&5
4073 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4074   echo $ac_n "(cached) $ac_c" 1>&6
4075 else
4076   cat > conftest.$ac_ext <<EOF
4077 #line 4078 "configure"
4078 #include "confdefs.h"
4079 /* System header to define __stub macros and hopefully few prototypes,
4080     which can conflict with char $ac_func(); below.  */
4081 #include <assert.h>
4082 /* Override any gcc2 internal prototype to avoid an error.  */
4083 /* We use char because int might match the return type of a gcc2
4084     builtin and then its argument prototype would still apply.  */
4085 char $ac_func();
4086
4087 int main() {
4088
4089 /* The GNU C library defines this for functions which it implements
4090     to always fail with ENOSYS.  Some functions are actually named
4091     something starting with __ and the normal name is an alias.  */
4092 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4093 choke me
4094 #else
4095 $ac_func();
4096 #endif
4097
4098 ; return 0; }
4099 EOF
4100 if { (eval echo configure:4101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4101   rm -rf conftest*
4102   eval "ac_cv_func_$ac_func=yes"
4103 else
4104   echo "configure: failed program was:" >&5
4105   cat conftest.$ac_ext >&5
4106   rm -rf conftest*
4107   eval "ac_cv_func_$ac_func=no"
4108 fi
4109 rm -f conftest*
4110 fi
4111
4112 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4113   echo "$ac_t""yes" 1>&6
4114     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4115   cat >> confdefs.h <<EOF
4116 #define $ac_tr_func 1
4117 EOF
4118  
4119 else
4120   echo "$ac_t""no" 1>&6
4121 mutt_cv_snprintf=yes
4122 fi
4123 done
4124
4125 for ac_func in vsnprintf
4126 do
4127 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4128 echo "configure:4129: checking for $ac_func" >&5
4129 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4130   echo $ac_n "(cached) $ac_c" 1>&6
4131 else
4132   cat > conftest.$ac_ext <<EOF
4133 #line 4134 "configure"
4134 #include "confdefs.h"
4135 /* System header to define __stub macros and hopefully few prototypes,
4136     which can conflict with char $ac_func(); below.  */
4137 #include <assert.h>
4138 /* Override any gcc2 internal prototype to avoid an error.  */
4139 /* We use char because int might match the return type of a gcc2
4140     builtin and then its argument prototype would still apply.  */
4141 char $ac_func();
4142
4143 int main() {
4144
4145 /* The GNU C library defines this for functions which it implements
4146     to always fail with ENOSYS.  Some functions are actually named
4147     something starting with __ and the normal name is an alias.  */
4148 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4149 choke me
4150 #else
4151 $ac_func();
4152 #endif
4153
4154 ; return 0; }
4155 EOF
4156 if { (eval echo configure:4157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4157   rm -rf conftest*
4158   eval "ac_cv_func_$ac_func=yes"
4159 else
4160   echo "configure: failed program was:" >&5
4161   cat conftest.$ac_ext >&5
4162   rm -rf conftest*
4163   eval "ac_cv_func_$ac_func=no"
4164 fi
4165 rm -f conftest*
4166 fi
4167
4168 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4169   echo "$ac_t""yes" 1>&6
4170     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4171   cat >> confdefs.h <<EOF
4172 #define $ac_tr_func 1
4173 EOF
4174  
4175 else
4176   echo "$ac_t""no" 1>&6
4177 mutt_cv_snprintf=yes
4178 fi
4179 done
4180
4181 if test $mutt_cv_snprintf = yes; then
4182         LIBOBJS="$LIBOBJS snprintf.o"
4183 fi
4184
4185 for ac_func in ftruncate
4186 do
4187 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4188 echo "configure:4189: checking for $ac_func" >&5
4189 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4190   echo $ac_n "(cached) $ac_c" 1>&6
4191 else
4192   cat > conftest.$ac_ext <<EOF
4193 #line 4194 "configure"
4194 #include "confdefs.h"
4195 /* System header to define __stub macros and hopefully few prototypes,
4196     which can conflict with char $ac_func(); below.  */
4197 #include <assert.h>
4198 /* Override any gcc2 internal prototype to avoid an error.  */
4199 /* We use char because int might match the return type of a gcc2
4200     builtin and then its argument prototype would still apply.  */
4201 char $ac_func();
4202
4203 int main() {
4204
4205 /* The GNU C library defines this for functions which it implements
4206     to always fail with ENOSYS.  Some functions are actually named
4207     something starting with __ and the normal name is an alias.  */
4208 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4209 choke me
4210 #else
4211 $ac_func();
4212 #endif
4213
4214 ; return 0; }
4215 EOF
4216 if { (eval echo configure:4217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4217   rm -rf conftest*
4218   eval "ac_cv_func_$ac_func=yes"
4219 else
4220   echo "configure: failed program was:" >&5
4221   cat conftest.$ac_ext >&5
4222   rm -rf conftest*
4223   eval "ac_cv_func_$ac_func=no"
4224 fi
4225 rm -f conftest*
4226 fi
4227
4228 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4229   echo "$ac_t""yes" 1>&6
4230     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4231   cat >> confdefs.h <<EOF
4232 #define $ac_tr_func 1
4233 EOF
4234  
4235 else
4236   echo "$ac_t""no" 1>&6
4237 echo $ac_n "checking for chsize in -lx""... $ac_c" 1>&6
4238 echo "configure:4239: checking for chsize in -lx" >&5
4239 ac_lib_var=`echo x'_'chsize | sed 'y%./+-%__p_%'`
4240 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4241   echo $ac_n "(cached) $ac_c" 1>&6
4242 else
4243   ac_save_LIBS="$LIBS"
4244 LIBS="-lx  $LIBS"
4245 cat > conftest.$ac_ext <<EOF
4246 #line 4247 "configure"
4247 #include "confdefs.h"
4248 /* Override any gcc2 internal prototype to avoid an error.  */
4249 /* We use char because int might match the return type of a gcc2
4250     builtin and then its argument prototype would still apply.  */
4251 char chsize();
4252
4253 int main() {
4254 chsize()
4255 ; return 0; }
4256 EOF
4257 if { (eval echo configure:4258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4258   rm -rf conftest*
4259   eval "ac_cv_lib_$ac_lib_var=yes"
4260 else
4261   echo "configure: failed program was:" >&5
4262   cat conftest.$ac_ext >&5
4263   rm -rf conftest*
4264   eval "ac_cv_lib_$ac_lib_var=no"
4265 fi
4266 rm -f conftest*
4267 LIBS="$ac_save_LIBS"
4268
4269 fi
4270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4271   echo "$ac_t""yes" 1>&6
4272     ac_tr_lib=HAVE_LIB`echo x | sed -e 's/^a-zA-Z0-9_/_/g' \
4273     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4274   cat >> confdefs.h <<EOF
4275 #define $ac_tr_lib 1
4276 EOF
4277
4278   LIBS="-lx $LIBS"
4279
4280 else
4281   echo "$ac_t""no" 1>&6
4282 fi
4283
4284 fi
4285 done
4286
4287
4288 for ac_func in strftime
4289 do
4290 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4291 echo "configure:4292: checking for $ac_func" >&5
4292 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4293   echo $ac_n "(cached) $ac_c" 1>&6
4294 else
4295   cat > conftest.$ac_ext <<EOF
4296 #line 4297 "configure"
4297 #include "confdefs.h"
4298 /* System header to define __stub macros and hopefully few prototypes,
4299     which can conflict with char $ac_func(); below.  */
4300 #include <assert.h>
4301 /* Override any gcc2 internal prototype to avoid an error.  */
4302 /* We use char because int might match the return type of a gcc2
4303     builtin and then its argument prototype would still apply.  */
4304 char $ac_func();
4305
4306 int main() {
4307
4308 /* The GNU C library defines this for functions which it implements
4309     to always fail with ENOSYS.  Some functions are actually named
4310     something starting with __ and the normal name is an alias.  */
4311 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4312 choke me
4313 #else
4314 $ac_func();
4315 #endif
4316
4317 ; return 0; }
4318 EOF
4319 if { (eval echo configure:4320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4320   rm -rf conftest*
4321   eval "ac_cv_func_$ac_func=yes"
4322 else
4323   echo "configure: failed program was:" >&5
4324   cat conftest.$ac_ext >&5
4325   rm -rf conftest*
4326   eval "ac_cv_func_$ac_func=no"
4327 fi
4328 rm -f conftest*
4329 fi
4330
4331 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4332   echo "$ac_t""yes" 1>&6
4333     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4334   cat >> confdefs.h <<EOF
4335 #define $ac_tr_func 1
4336 EOF
4337  
4338 else
4339   echo "$ac_t""no" 1>&6
4340 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
4341 echo "configure:4342: checking for strftime in -lintl" >&5
4342 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
4343 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4344   echo $ac_n "(cached) $ac_c" 1>&6
4345 else
4346   ac_save_LIBS="$LIBS"
4347 LIBS="-lintl  $LIBS"
4348 cat > conftest.$ac_ext <<EOF
4349 #line 4350 "configure"
4350 #include "confdefs.h"
4351 /* Override any gcc2 internal prototype to avoid an error.  */
4352 /* We use char because int might match the return type of a gcc2
4353     builtin and then its argument prototype would still apply.  */
4354 char strftime();
4355
4356 int main() {
4357 strftime()
4358 ; return 0; }
4359 EOF
4360 if { (eval echo configure:4361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4361   rm -rf conftest*
4362   eval "ac_cv_lib_$ac_lib_var=yes"
4363 else
4364   echo "configure: failed program was:" >&5
4365   cat conftest.$ac_ext >&5
4366   rm -rf conftest*
4367   eval "ac_cv_lib_$ac_lib_var=no"
4368 fi
4369 rm -f conftest*
4370 LIBS="$ac_save_LIBS"
4371
4372 fi
4373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4374   echo "$ac_t""yes" 1>&6
4375     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/^a-zA-Z0-9_/_/g' \
4376     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4377   cat >> confdefs.h <<EOF
4378 #define $ac_tr_lib 1
4379 EOF
4380
4381   LIBS="-lintl $LIBS"
4382
4383 else
4384   echo "$ac_t""no" 1>&6
4385 fi
4386
4387 fi
4388 done
4389
4390
4391 for ac_func in fchdir
4392 do
4393 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4394 echo "configure:4395: checking for $ac_func" >&5
4395 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4396   echo $ac_n "(cached) $ac_c" 1>&6
4397 else
4398   cat > conftest.$ac_ext <<EOF
4399 #line 4400 "configure"
4400 #include "confdefs.h"
4401 /* System header to define __stub macros and hopefully few prototypes,
4402     which can conflict with char $ac_func(); below.  */
4403 #include <assert.h>
4404 /* Override any gcc2 internal prototype to avoid an error.  */
4405 /* We use char because int might match the return type of a gcc2
4406     builtin and then its argument prototype would still apply.  */
4407 char $ac_func();
4408
4409 int main() {
4410
4411 /* The GNU C library defines this for functions which it implements
4412     to always fail with ENOSYS.  Some functions are actually named
4413     something starting with __ and the normal name is an alias.  */
4414 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4415 choke me
4416 #else
4417 $ac_func();
4418 #endif
4419
4420 ; return 0; }
4421 EOF
4422 if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4423   rm -rf conftest*
4424   eval "ac_cv_func_$ac_func=yes"
4425 else
4426   echo "configure: failed program was:" >&5
4427   cat conftest.$ac_ext >&5
4428   rm -rf conftest*
4429   eval "ac_cv_func_$ac_func=no"
4430 fi
4431 rm -f conftest*
4432 fi
4433
4434 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4435   echo "$ac_t""yes" 1>&6
4436     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4437   cat >> confdefs.h <<EOF
4438 #define $ac_tr_func 1
4439 EOF
4440  
4441 else
4442   echo "$ac_t""no" 1>&6
4443 mutt_cv_fchdir=no
4444 fi
4445 done
4446
4447
4448 # Check whether --with-regex or --without-regex was given.
4449 if test "${with_regex+set}" = set; then
4450   withval="$with_regex"
4451   mutt_cv_regex=yes
4452 else
4453   for ac_func in regcomp
4454 do
4455 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4456 echo "configure:4457: checking for $ac_func" >&5
4457 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4458   echo $ac_n "(cached) $ac_c" 1>&6
4459 else
4460   cat > conftest.$ac_ext <<EOF
4461 #line 4462 "configure"
4462 #include "confdefs.h"
4463 /* System header to define __stub macros and hopefully few prototypes,
4464     which can conflict with char $ac_func(); below.  */
4465 #include <assert.h>
4466 /* Override any gcc2 internal prototype to avoid an error.  */
4467 /* We use char because int might match the return type of a gcc2
4468     builtin and then its argument prototype would still apply.  */
4469 char $ac_func();
4470
4471 int main() {
4472
4473 /* The GNU C library defines this for functions which it implements
4474     to always fail with ENOSYS.  Some functions are actually named
4475     something starting with __ and the normal name is an alias.  */
4476 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4477 choke me
4478 #else
4479 $ac_func();
4480 #endif
4481
4482 ; return 0; }
4483 EOF
4484 if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4485   rm -rf conftest*
4486   eval "ac_cv_func_$ac_func=yes"
4487 else
4488   echo "configure: failed program was:" >&5
4489   cat conftest.$ac_ext >&5
4490   rm -rf conftest*
4491   eval "ac_cv_func_$ac_func=no"
4492 fi
4493 rm -f conftest*
4494 fi
4495
4496 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4497   echo "$ac_t""yes" 1>&6
4498     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4499   cat >> confdefs.h <<EOF
4500 #define $ac_tr_func 1
4501 EOF
4502  mutt_cv_regex=no
4503 else
4504   echo "$ac_t""no" 1>&6
4505 mutt_cv_regex=yes
4506 fi
4507 done
4508
4509 fi
4510
4511
4512 if test $mutt_cv_regex = no ; then
4513 echo $ac_n "checking whether your system's regexp library is completely broken""... $ac_c" 1>&6
4514 echo "configure:4515: checking whether your system's regexp library is completely broken" >&5
4515 if eval "test \"`echo '$''{'mutt_cv_regex_broken'+set}'`\" = set"; then
4516   echo $ac_n "(cached) $ac_c" 1>&6
4517 else
4518   if test "$cross_compiling" = yes; then
4519   mutt_cv_regex_broken=yes
4520 else
4521   cat > conftest.$ac_ext <<EOF
4522 #line 4523 "configure"
4523 #include "confdefs.h"
4524
4525 #include <unistd.h>
4526 #include <regex.h>
4527 main() { regex_t blah ; regmatch_t p; p.rm_eo = p.rm_eo; return regcomp(&blah, "foo.*bar", REG_NOSUB) || regexec (&blah, "foobar", 0, NULL, 0); }
4528 EOF
4529 if { (eval echo configure:4530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4530 then
4531   mutt_cv_regex_broken=no
4532 else
4533   echo "configure: failed program was:" >&5
4534   cat conftest.$ac_ext >&5
4535   rm -fr conftest*
4536   mutt_cv_regex_broken=yes
4537 fi
4538 rm -fr conftest*
4539 fi
4540
4541 fi
4542
4543 echo "$ac_t""$mutt_cv_regex_broken" 1>&6
4544         if test $mutt_cv_regex_broken = yes ; then
4545                 echo "Using the included GNU regex instead." >&6
4546                 mutt_cv_regex=yes
4547         fi
4548 fi
4549
4550 if test $mutt_cv_regex = yes; then
4551         cat >> confdefs.h <<\EOF
4552 #define USE_GNU_REGEX 1
4553 EOF
4554
4555         LIBOBJS="$LIBOBJS regex.o"
4556 fi
4557
4558
4559 # Check whether --with-homespool or --without-homespool was given.
4560 if test "${with_homespool+set}" = set; then
4561   withval="$with_homespool"
4562   with_homespool=${withval}
4563 fi
4564
4565 if test x$with_homespool != x; then
4566         if test $with_homespool = yes; then
4567                 with_homespool=mailbox
4568         fi
4569         cat >> confdefs.h <<EOF
4570 #define MAILPATH "$with_homespool"
4571 EOF
4572
4573         cat >> confdefs.h <<\EOF
4574 #define HOMESPOOL 1
4575 EOF
4576
4577         cat >> confdefs.h <<\EOF
4578 #define USE_DOTLOCK 1
4579 EOF
4580
4581         mutt_cv_setgid=no
4582 else
4583         # Check whether --with-mailpath or --without-mailpath was given.
4584 if test "${with_mailpath+set}" = set; then
4585   withval="$with_mailpath"
4586   mutt_cv_mailpath=$withval
4587 else
4588    echo $ac_n "checking where new mail is stored""... $ac_c" 1>&6
4589 echo "configure:4590: checking where new mail is stored" >&5
4590 if eval "test \"`echo '$''{'mutt_cv_mailpath'+set}'`\" = set"; then
4591   echo $ac_n "(cached) $ac_c" 1>&6
4592 else
4593   mutt_cv_mailpath=no
4594                         if test -d /var/mail; then
4595                                 mutt_cv_mailpath=/var/mail
4596                         elif test -d /var/spool/mail; then
4597                                 mutt_cv_mailpath=/var/spool/mail
4598                         elif test -d /usr/spool/mail; then
4599                                 mutt_cv_mailpath=/usr/spool/mail
4600                         elif test -d /usr/mail; then
4601                                 mutt_cv_mailpath=/usr/mail
4602                         fi
4603 fi
4604
4605 echo "$ac_t""$mutt_cv_mailpath" 1>&6
4606                 
4607 fi
4608
4609         if test "$mutt_cv_mailpath" = no; then
4610                 { echo "configure: error: "Could not determine where new mail is stored."" 1>&2; exit 1; }
4611         fi
4612         cat >> confdefs.h <<EOF
4613 #define MAILPATH "$mutt_cv_mailpath"
4614 EOF
4615
4616
4617         echo $ac_n "checking if $mutt_cv_mailpath is world writable""... $ac_c" 1>&6
4618 echo "configure:4619: checking if $mutt_cv_mailpath is world writable" >&5
4619 if eval "test \"`echo '$''{'mutt_cv_worldwrite'+set}'`\" = set"; then
4620   echo $ac_n "(cached) $ac_c" 1>&6
4621 else
4622   if test "$cross_compiling" = yes; then
4623   mutt_cv_worldwrite=no
4624 else
4625   cat > conftest.$ac_ext <<EOF
4626 #line 4627 "configure"
4627 #include "confdefs.h"
4628 #include <sys/types.h>
4629 #include <sys/stat.h>
4630
4631 int main (int argc, char **argv)
4632 {
4633         struct stat s;
4634
4635         stat ("$mutt_cv_mailpath", &s);
4636         if (s.st_mode & S_IWOTH) exit (0);
4637         exit (1);
4638 }
4639 EOF
4640 if { (eval echo configure:4641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4641 then
4642   mutt_cv_worldwrite=yes
4643 else
4644   echo "configure: failed program was:" >&5
4645   cat conftest.$ac_ext >&5
4646   rm -fr conftest*
4647   mutt_cv_worldwrite=no
4648 fi
4649 rm -fr conftest*
4650 fi
4651
4652 fi
4653
4654 echo "$ac_t""$mutt_cv_worldwrite" 1>&6
4655
4656         mutt_cv_setgid=no
4657         if test $mutt_cv_worldwrite = yes; then
4658                 cat >> confdefs.h <<\EOF
4659 #define USE_DOTLOCK 1
4660 EOF
4661
4662         else
4663
4664                 echo $ac_n "checking if $mutt_cv_mailpath is group writable""... $ac_c" 1>&6
4665 echo "configure:4666: checking if $mutt_cv_mailpath is group writable" >&5
4666 if eval "test \"`echo '$''{'mutt_cv_groupwrite'+set}'`\" = set"; then
4667   echo $ac_n "(cached) $ac_c" 1>&6
4668 else
4669   if test "$cross_compiling" = yes; then
4670   mutt_cv_groupwrite=no
4671 else
4672   cat > conftest.$ac_ext <<EOF
4673 #line 4674 "configure"
4674 #include "confdefs.h"
4675 #include <sys/types.h>
4676 #include <sys/stat.h>
4677
4678 int main (int argc, char **argv)
4679 {
4680         struct stat s;
4681
4682         stat ("$mutt_cv_mailpath", &s);
4683         if (s.st_mode & S_IWGRP) exit (0);
4684         exit (1);
4685 }
4686 EOF
4687 if { (eval echo configure:4688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4688 then
4689   mutt_cv_groupwrite=yes
4690 else
4691   echo "configure: failed program was:" >&5
4692   cat conftest.$ac_ext >&5
4693   rm -fr conftest*
4694   mutt_cv_groupwrite=no
4695 fi
4696 rm -fr conftest*
4697 fi
4698
4699 fi
4700
4701 echo "$ac_t""$mutt_cv_groupwrite" 1>&6
4702
4703                 if test $mutt_cv_groupwrite = yes; then
4704                         cat >> confdefs.h <<\EOF
4705 #define USE_DOTLOCK 1
4706 EOF
4707
4708                         cat >> confdefs.h <<\EOF
4709 #define USE_SETGID 1
4710 EOF
4711
4712                         mutt_cv_setgid=yes
4713                 fi
4714         fi
4715 fi
4716
4717 # Check whether --enable-external_dotlock or --disable-external_dotlock was given.
4718 if test "${enable_external_dotlock+set}" = set; then
4719   enableval="$enable_external_dotlock"
4720   mutt_cv_external_dotlock="$enableval"
4721 fi
4722
4723
4724 if test "x$mutt_cv_setgid" = "xyes" || test "x$mutt_cv_fchdir" = "xno" \
4725         || test "x$mutt_cv_external_dotlock" = "xyes"
4726 then
4727         cat >> confdefs.h <<\EOF
4728 #define DL_STANDALONE 1
4729 EOF
4730
4731         DOTLOCK_TARGET="muttng_dotlock"
4732 else
4733         MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS dotlock.o"
4734 fi
4735
4736
4737
4738
4739 echo $ac_n "checking where to put the documentation""... $ac_c" 1>&6
4740 echo "configure:4741: checking where to put the documentation" >&5
4741 # Check whether --with-docdir or --without-docdir was given.
4742 if test "${with_docdir+set}" = set; then
4743   withval="$with_docdir"
4744   mutt_cv_docdir=$withval
4745 else
4746   mutt_cv_docdir="$mutt_cv_prefix/doc/muttng"
4747 fi
4748
4749 echo "$ac_t""$mutt_cv_docdir" 1>&6
4750
4751 docdir=$mutt_cv_docdir
4752
4753
4754 if test x$mutt_cv_setgid = xyes; then
4755         DOTLOCK_GROUP='mail'
4756         DOTLOCK_PERMISSION=2755
4757 else
4758         DOTLOCK_GROUP=''
4759         DOTLOCK_PERMISSION=755
4760 fi
4761
4762
4763
4764 # Check whether --with-domain or --without-domain was given.
4765 if test "${with_domain+set}" = set; then
4766   withval="$with_domain"
4767   if test $withval != yes; then
4768                 cat >> confdefs.h <<EOF
4769 #define DOMAIN "$withval"
4770 EOF
4771
4772         fi
4773 fi
4774
4775
4776 need_socket="no"
4777
4778
4779 # Check whether --enable-pop or --disable-pop was given.
4780 if test "${enable_pop+set}" = set; then
4781   enableval="$enable_pop"
4782          if test x$enableval = xyes ; then
4783                 cat >> confdefs.h <<\EOF
4784 #define USE_POP 1
4785 EOF
4786
4787                 MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pop.o pop_lib.o pop_auth.o"
4788                 need_socket="yes"
4789                 need_pop="yes"
4790                 need_md5="yes"
4791         fi
4792
4793 fi
4794
4795
4796 # Check whether --enable-imap or --disable-imap was given.
4797 if test "${enable_imap+set}" = set; then
4798   enableval="$enable_imap"
4799          if test x$enableval = xyes ; then
4800                 cat >> confdefs.h <<\EOF
4801 #define USE_IMAP 1
4802 EOF
4803
4804                 LIBIMAP="-Limap -limap"
4805                 LIBIMAPDEPS="\$(top_srcdir)/imap/imap.h imap/libimap.a"
4806                 need_imap="yes"
4807                 need_socket="yes"
4808                 need_md5="yes"
4809         fi
4810
4811 fi
4812
4813
4814
4815 if test x$need_imap = xyes; then
4816   BUILD_IMAP_TRUE=
4817   BUILD_IMAP_FALSE='#'
4818 else
4819   BUILD_IMAP_TRUE='#'
4820   BUILD_IMAP_FALSE=
4821 fi
4822
4823 # Check whether --enable-nntp or --disable-nntp was given.
4824 if test "${enable_nntp+set}" = set; then
4825   enableval="$enable_nntp"
4826         if test x$enableval = xyes ; then
4827                 cat >> confdefs.h <<\EOF
4828 #define USE_NNTP 1
4829 EOF
4830
4831                 MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS nntp.o newsrc.o"
4832                 need_socket="yes"
4833         fi
4834
4835 fi
4836
4837
4838
4839 if test "$need_socket" = "yes"
4840 then
4841         echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4842 echo "configure:4843: checking for socklen_t" >&5
4843         cat > conftest.$ac_ext <<EOF
4844 #line 4845 "configure"
4845 #include "confdefs.h"
4846 #include <sys/socket.h>
4847 EOF
4848 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4849   egrep "socklen_t" >/dev/null 2>&1; then
4850   rm -rf conftest*
4851   echo "$ac_t""yes" 1>&6
4852 else
4853   rm -rf conftest*
4854   echo "$ac_t""no" 1>&6
4855                 cat >> confdefs.h <<\EOF
4856 #define socklen_t int
4857 EOF
4858
4859 fi
4860 rm -f conftest*
4861
4862         echo $ac_n "checking for gethostent""... $ac_c" 1>&6
4863 echo "configure:4864: checking for gethostent" >&5
4864 if eval "test \"`echo '$''{'ac_cv_func_gethostent'+set}'`\" = set"; then
4865   echo $ac_n "(cached) $ac_c" 1>&6
4866 else
4867   cat > conftest.$ac_ext <<EOF
4868 #line 4869 "configure"
4869 #include "confdefs.h"
4870 /* System header to define __stub macros and hopefully few prototypes,
4871     which can conflict with char gethostent(); below.  */
4872 #include <assert.h>
4873 /* Override any gcc2 internal prototype to avoid an error.  */
4874 /* We use char because int might match the return type of a gcc2
4875     builtin and then its argument prototype would still apply.  */
4876 char gethostent();
4877
4878 int main() {
4879
4880 /* The GNU C library defines this for functions which it implements
4881     to always fail with ENOSYS.  Some functions are actually named
4882     something starting with __ and the normal name is an alias.  */
4883 #if defined (__stub_gethostent) || defined (__stub___gethostent)
4884 choke me
4885 #else
4886 gethostent();
4887 #endif
4888
4889 ; return 0; }
4890 EOF
4891 if { (eval echo configure:4892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4892   rm -rf conftest*
4893   eval "ac_cv_func_gethostent=yes"
4894 else
4895   echo "configure: failed program was:" >&5
4896   cat conftest.$ac_ext >&5
4897   rm -rf conftest*
4898   eval "ac_cv_func_gethostent=no"
4899 fi
4900 rm -f conftest*
4901 fi
4902
4903 if eval "test \"`echo '$ac_cv_func_'gethostent`\" = yes"; then
4904   echo "$ac_t""yes" 1>&6
4905   :
4906 else
4907   echo "$ac_t""no" 1>&6
4908 echo $ac_n "checking for gethostent in -lnsl""... $ac_c" 1>&6
4909 echo "configure:4910: checking for gethostent in -lnsl" >&5
4910 ac_lib_var=`echo nsl'_'gethostent | sed 'y%./+-%__p_%'`
4911 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4912   echo $ac_n "(cached) $ac_c" 1>&6
4913 else
4914   ac_save_LIBS="$LIBS"
4915 LIBS="-lnsl  $LIBS"
4916 cat > conftest.$ac_ext <<EOF
4917 #line 4918 "configure"
4918 #include "confdefs.h"
4919 /* Override any gcc2 internal prototype to avoid an error.  */
4920 /* We use char because int might match the return type of a gcc2
4921     builtin and then its argument prototype would still apply.  */
4922 char gethostent();
4923
4924 int main() {
4925 gethostent()
4926 ; return 0; }
4927 EOF
4928 if { (eval echo configure:4929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4929   rm -rf conftest*
4930   eval "ac_cv_lib_$ac_lib_var=yes"
4931 else
4932   echo "configure: failed program was:" >&5
4933   cat conftest.$ac_ext >&5
4934   rm -rf conftest*
4935   eval "ac_cv_lib_$ac_lib_var=no"
4936 fi
4937 rm -f conftest*
4938 LIBS="$ac_save_LIBS"
4939
4940 fi
4941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4942   echo "$ac_t""yes" 1>&6
4943     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
4944     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4945   cat >> confdefs.h <<EOF
4946 #define $ac_tr_lib 1
4947 EOF
4948
4949   LIBS="-lnsl $LIBS"
4950
4951 else
4952   echo "$ac_t""no" 1>&6
4953 fi
4954
4955 fi
4956
4957         echo $ac_n "checking for setsockopt""... $ac_c" 1>&6
4958 echo "configure:4959: checking for setsockopt" >&5
4959 if eval "test \"`echo '$''{'ac_cv_func_setsockopt'+set}'`\" = set"; then
4960   echo $ac_n "(cached) $ac_c" 1>&6
4961 else
4962   cat > conftest.$ac_ext <<EOF
4963 #line 4964 "configure"
4964 #include "confdefs.h"
4965 /* System header to define __stub macros and hopefully few prototypes,
4966     which can conflict with char setsockopt(); below.  */
4967 #include <assert.h>
4968 /* Override any gcc2 internal prototype to avoid an error.  */
4969 /* We use char because int might match the return type of a gcc2
4970     builtin and then its argument prototype would still apply.  */
4971 char setsockopt();
4972
4973 int main() {
4974
4975 /* The GNU C library defines this for functions which it implements
4976     to always fail with ENOSYS.  Some functions are actually named
4977     something starting with __ and the normal name is an alias.  */
4978 #if defined (__stub_setsockopt) || defined (__stub___setsockopt)
4979 choke me
4980 #else
4981 setsockopt();
4982 #endif
4983
4984 ; return 0; }
4985 EOF
4986 if { (eval echo configure:4987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4987   rm -rf conftest*
4988   eval "ac_cv_func_setsockopt=yes"
4989 else
4990   echo "configure: failed program was:" >&5
4991   cat conftest.$ac_ext >&5
4992   rm -rf conftest*
4993   eval "ac_cv_func_setsockopt=no"
4994 fi
4995 rm -f conftest*
4996 fi
4997
4998 if eval "test \"`echo '$ac_cv_func_'setsockopt`\" = yes"; then
4999   echo "$ac_t""yes" 1>&6
5000   :
5001 else
5002   echo "$ac_t""no" 1>&6
5003 echo $ac_n "checking for setsockopt in -lsocket""... $ac_c" 1>&6
5004 echo "configure:5005: checking for setsockopt in -lsocket" >&5
5005 ac_lib_var=`echo socket'_'setsockopt | sed 'y%./+-%__p_%'`
5006 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5007   echo $ac_n "(cached) $ac_c" 1>&6
5008 else
5009   ac_save_LIBS="$LIBS"
5010 LIBS="-lsocket  $LIBS"
5011 cat > conftest.$ac_ext <<EOF
5012 #line 5013 "configure"
5013 #include "confdefs.h"
5014 /* Override any gcc2 internal prototype to avoid an error.  */
5015 /* We use char because int might match the return type of a gcc2
5016     builtin and then its argument prototype would still apply.  */
5017 char setsockopt();
5018
5019 int main() {
5020 setsockopt()
5021 ; return 0; }
5022 EOF
5023 if { (eval echo configure:5024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5024   rm -rf conftest*
5025   eval "ac_cv_lib_$ac_lib_var=yes"
5026 else
5027   echo "configure: failed program was:" >&5
5028   cat conftest.$ac_ext >&5
5029   rm -rf conftest*
5030   eval "ac_cv_lib_$ac_lib_var=no"
5031 fi
5032 rm -f conftest*
5033 LIBS="$ac_save_LIBS"
5034
5035 fi
5036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5037   echo "$ac_t""yes" 1>&6
5038     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
5039     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5040   cat >> confdefs.h <<EOF
5041 #define $ac_tr_lib 1
5042 EOF
5043
5044   LIBS="-lsocket $LIBS"
5045
5046 else
5047   echo "$ac_t""no" 1>&6
5048 fi
5049
5050 fi
5051
5052         for ac_func in getaddrinfo
5053 do
5054 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5055 echo "configure:5056: checking for $ac_func" >&5
5056 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5057   echo $ac_n "(cached) $ac_c" 1>&6
5058 else
5059   cat > conftest.$ac_ext <<EOF
5060 #line 5061 "configure"
5061 #include "confdefs.h"
5062 /* System header to define __stub macros and hopefully few prototypes,
5063     which can conflict with char $ac_func(); below.  */
5064 #include <assert.h>
5065 /* Override any gcc2 internal prototype to avoid an error.  */
5066 /* We use char because int might match the return type of a gcc2
5067     builtin and then its argument prototype would still apply.  */
5068 char $ac_func();
5069
5070 int main() {
5071
5072 /* The GNU C library defines this for functions which it implements
5073     to always fail with ENOSYS.  Some functions are actually named
5074     something starting with __ and the normal name is an alias.  */
5075 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5076 choke me
5077 #else
5078 $ac_func();
5079 #endif
5080
5081 ; return 0; }
5082 EOF
5083 if { (eval echo configure:5084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5084   rm -rf conftest*
5085   eval "ac_cv_func_$ac_func=yes"
5086 else
5087   echo "configure: failed program was:" >&5
5088   cat conftest.$ac_ext >&5
5089   rm -rf conftest*
5090   eval "ac_cv_func_$ac_func=no"
5091 fi
5092 rm -f conftest*
5093 fi
5094
5095 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5096   echo "$ac_t""yes" 1>&6
5097     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5098   cat >> confdefs.h <<EOF
5099 #define $ac_tr_func 1
5100 EOF
5101  
5102 else
5103   echo "$ac_t""no" 1>&6
5104 fi
5105 done
5106
5107         cat >> confdefs.h <<\EOF
5108 #define USE_SOCKET 1
5109 EOF
5110
5111         MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS account.o mutt_socket.o mutt_tunnel.o"
5112 fi
5113
5114
5115 # Check whether --with-gss or --without-gss was given.
5116 if test "${with_gss+set}" = set; then
5117   withval="$with_gss"
5118   gss_prefix="$withval"
5119 else
5120   gss_prefix="no"
5121 fi
5122
5123 if test "$gss_prefix" != "no"
5124 then
5125   if test "$need_imap" = "yes"
5126   then
5127     
5128   GSSAPI_PREFIX=$gss_prefix
5129   GSSAPI_IMPL="none"
5130   saved_CPPFLAGS="$CPPFLAGS"
5131   saved_LDFLAGS="$LDFLAGS"
5132   saved_LIBS="$LIBS"
5133     if test "$GSSAPI_PREFIX" != "yes"
5134   then
5135     krb5_path="$GSSAPI_PREFIX/bin"
5136   else
5137     krb5_path="$PATH"
5138   fi
5139   # Extract the first word of "krb5-config", so it can be a program name with args.
5140 set dummy krb5-config; ac_word=$2
5141 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5142 echo "configure:5143: checking for $ac_word" >&5
5143 if eval "test \"`echo '$''{'ac_cv_path_KRB5CFGPATH'+set}'`\" = set"; then
5144   echo $ac_n "(cached) $ac_c" 1>&6
5145 else
5146   case "$KRB5CFGPATH" in
5147   /*)
5148   ac_cv_path_KRB5CFGPATH="$KRB5CFGPATH" # Let the user override the test with a path.
5149   ;;
5150   ?:/*)                  
5151   ac_cv_path_KRB5CFGPATH="$KRB5CFGPATH" # Let the user override the test with a dos path.
5152   ;;
5153   *)
5154   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5155   ac_dummy="$krb5_path"
5156   for ac_dir in $ac_dummy; do 
5157     test -z "$ac_dir" && ac_dir=.
5158     if test -f $ac_dir/$ac_word; then
5159       ac_cv_path_KRB5CFGPATH="$ac_dir/$ac_word"
5160       break
5161     fi
5162   done
5163   IFS="$ac_save_ifs"
5164   test -z "$ac_cv_path_KRB5CFGPATH" && ac_cv_path_KRB5CFGPATH="none"
5165   ;;
5166 esac
5167 fi
5168 KRB5CFGPATH="$ac_cv_path_KRB5CFGPATH"
5169 if test -n "$KRB5CFGPATH"; then
5170   echo "$ac_t""$KRB5CFGPATH" 1>&6
5171 else
5172   echo "$ac_t""no" 1>&6
5173 fi
5174
5175   if test "$KRB5CFGPATH" != "none"
5176   then
5177     GSSAPI_CFLAGS="$CPPFLAGS `$KRB5CFGPATH --cflags gssapi`"
5178     GSSAPI_LIBS="$MUTTLIBS `$KRB5CFGPATH --libs gssapi`"
5179     case "`$KRB5CFGPATH --version`" in
5180       "Kerberos 5 "*)   GSSAPI_IMPL="MIT";;
5181       ?eimdal*)         GSSAPI_IMPL="Heimdal";;
5182       *)                GSSAPI_IMPL="Unknown";;
5183    esac
5184   else
5185         if test "$GSSAPI_PREFIX" != "yes"
5186     then
5187       GSSAPI_CFLAGS="-I$GSSAPI_PREFIX/include"
5188       GSSAPI_LDFLAGS="-L$GSSAPI_PREFIX/lib"
5189       CPPFLAGS="$CPPFLAGS $GSSAPI_CFLAGS"
5190       LDFLAGS="$LDFLAGS $GSSAPI_LDFLAGS"
5191     fi
5192
5193         echo $ac_n "checking for gss_init_sec_context in -lgssapi_krb5""... $ac_c" 1>&6
5194 echo "configure:5195: checking for gss_init_sec_context in -lgssapi_krb5" >&5
5195 ac_lib_var=`echo gssapi_krb5'_'gss_init_sec_context | sed 'y%./+-%__p_%'`
5196 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5197   echo $ac_n "(cached) $ac_c" 1>&6
5198 else
5199   ac_save_LIBS="$LIBS"
5200 LIBS="-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err $LIBS"
5201 cat > conftest.$ac_ext <<EOF
5202 #line 5203 "configure"
5203 #include "confdefs.h"
5204 /* Override any gcc2 internal prototype to avoid an error.  */
5205 /* We use char because int might match the return type of a gcc2
5206     builtin and then its argument prototype would still apply.  */
5207 char gss_init_sec_context();
5208
5209 int main() {
5210 gss_init_sec_context()
5211 ; return 0; }
5212 EOF
5213 if { (eval echo configure:5214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5214   rm -rf conftest*
5215   eval "ac_cv_lib_$ac_lib_var=yes"
5216 else
5217   echo "configure: failed program was:" >&5
5218   cat conftest.$ac_ext >&5
5219   rm -rf conftest*
5220   eval "ac_cv_lib_$ac_lib_var=no"
5221 fi
5222 rm -f conftest*
5223 LIBS="$ac_save_LIBS"
5224
5225 fi
5226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5227   echo "$ac_t""yes" 1>&6
5228   
5229       GSSAPI_IMPL="MIT",
5230       GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err"
5231       
5232 else
5233   echo "$ac_t""no" 1>&6
5234 fi
5235
5236
5237         if test "$GSSAPI_IMPL" = "none"
5238     then
5239       echo $ac_n "checking for gss_init_sec_context in -lgssapi""... $ac_c" 1>&6
5240 echo "configure:5241: checking for gss_init_sec_context in -lgssapi" >&5
5241 ac_lib_var=`echo gssapi'_'gss_init_sec_context | sed 'y%./+-%__p_%'`
5242 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5243   echo $ac_n "(cached) $ac_c" 1>&6
5244 else
5245   ac_save_LIBS="$LIBS"
5246 LIBS="-lgssapi -lkrb5 -ldes -lasn1 -lroken -lcrypt -lcom_err $LIBS"
5247 cat > conftest.$ac_ext <<EOF
5248 #line 5249 "configure"
5249 #include "confdefs.h"
5250 /* Override any gcc2 internal prototype to avoid an error.  */
5251 /* We use char because int might match the return type of a gcc2
5252     builtin and then its argument prototype would still apply.  */
5253 char gss_init_sec_context();
5254
5255 int main() {
5256 gss_init_sec_context()
5257 ; return 0; }
5258 EOF
5259 if { (eval echo configure:5260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5260   rm -rf conftest*
5261   eval "ac_cv_lib_$ac_lib_var=yes"
5262 else
5263   echo "configure: failed program was:" >&5
5264   cat conftest.$ac_ext >&5
5265   rm -rf conftest*
5266   eval "ac_cv_lib_$ac_lib_var=no"
5267 fi
5268 rm -f conftest*
5269 LIBS="$ac_save_LIBS"
5270
5271 fi
5272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5273   echo "$ac_t""yes" 1>&6
5274   
5275           GSSAPI_IMPL="Heimdal"
5276           GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssapi -lkrb5 -ldes -lasn1 -lroken"
5277           GSSAPI_LIBS="$GSSAPI_LIBS -lcrypt -lcom_err"
5278           
5279 else
5280   echo "$ac_t""no" 1>&6
5281 fi
5282
5283     fi
5284
5285                             if test "$GSSAPI_IMPL" = "none"
5286     then
5287       echo $ac_n "checking for g_order_init in -lgssapi_krb5""... $ac_c" 1>&6
5288 echo "configure:5289: checking for g_order_init in -lgssapi_krb5" >&5
5289 ac_lib_var=`echo gssapi_krb5'_'g_order_init | 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="-lgssapi_krb5 -lkrb5 -lcrypto -lcom_err $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 g_order_init();
5302
5303 int main() {
5304 g_order_init()
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   
5323         GSSAPI_IMPL="OldMIT",
5324         GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err"
5325         
5326 else
5327   echo "$ac_t""no" 1>&6
5328 fi
5329
5330     fi
5331   fi
5332
5333   CPPFLAGS="$saved_CPPFLAGS"
5334   LDFLAGS="$saved_LDFLAGS"
5335   LIBS="$saved_LIBS"
5336
5337     echo $ac_n "checking GSSAPI implementation""... $ac_c" 1>&6
5338 echo "configure:5339: checking GSSAPI implementation" >&5
5339     echo "$ac_t""$GSSAPI_IMPL" 1>&6
5340     if test "$GSSAPI_IMPL" = "none"
5341     then
5342       cat > confcache <<\EOF
5343 # This file is a shell script that caches the results of configure
5344 # tests run on this system so they can be shared between configure
5345 # scripts and configure runs.  It is not useful on other systems.
5346 # If it contains results you don't want to keep, you may remove or edit it.
5347 #
5348 # By default, configure uses ./config.cache as the cache file,
5349 # creating it if it does not exist already.  You can give configure
5350 # the --cache-file=FILE option to use a different cache file; that is
5351 # what configure does when it calls configure scripts in
5352 # subdirectories, so they share the cache.
5353 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5354 # config.status only pays attention to the cache file if you give it the
5355 # --recheck option to rerun configure.
5356 #
5357 EOF
5358 # The following way of writing the cache mishandles newlines in values,
5359 # but we know of no workaround that is simple, portable, and efficient.
5360 # So, don't put newlines in cache variables' values.
5361 # Ultrix sh set writes to stderr and can't be redirected directly,
5362 # and sets the high bit in the cache file unless we assign to the vars.
5363 (set) 2>&1 |
5364   case `(ac_space=' '; set | grep ac_space) 2>&1` in
5365   *ac_space=\ *)
5366     # `set' does not quote correctly, so add quotes (double-quote substitution
5367     # turns \\\\ into \\, and sed turns \\ into \).
5368     sed -n \
5369       -e "s/'/'\\\\''/g" \
5370       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5371     ;;
5372   *)
5373     # `set' quotes correctly as required by POSIX, so do not add quotes.
5374     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5375     ;;
5376   esac >> confcache
5377 if cmp -s $cache_file confcache; then
5378   :
5379 else
5380   if test -w $cache_file; then
5381     echo "updating cache $cache_file"
5382     cat confcache > $cache_file
5383   else
5384     echo "not updating unwritable cache $cache_file"
5385   fi
5386 fi
5387 rm -f confcache
5388
5389       echo "$ac_t""GSSAPI libraries not found" 1>&6
5390     fi
5391     if test "$GSSAPI_IMPL" = "Heimdal"
5392     then
5393       cat >> confdefs.h <<\EOF
5394 #define HAVE_HEIMDAL 1
5395 EOF
5396
5397     fi
5398     CPPFLAGS="$CPPFLAGS $GSSAPI_CFLAGS"
5399     MUTTLIBS="$MUTTLIBS $GSSAPI_LIBS"
5400     cat >> confdefs.h <<\EOF
5401 #define USE_GSS 1
5402 EOF
5403
5404     need_gss="yes"
5405   else
5406     echo "configure: warning: GSS was requested but IMAP is not enabled" 1>&2
5407   fi
5408 fi
5409
5410
5411 if test x$need_gss = xyes; then
5412   USE_GSS_TRUE=
5413   USE_GSS_FALSE='#'
5414 else
5415   USE_GSS_TRUE='#'
5416   USE_GSS_FALSE=
5417 fi
5418
5419
5420 # Check whether --with-ssl or --without-ssl was given.
5421 if test "${with_ssl+set}" = set; then
5422   withval="$with_ssl"
5423          if test "$with_ssl" != "no"
5424         then
5425           if test "$need_socket" != "yes"; then
5426            { echo "configure: error: SSL support is only useful with POP or IMAP support" 1>&2; exit 1; }
5427           fi
5428
5429           if test "$with_ssl" != "yes"
5430           then
5431            LDFLAGS="$LDFLAGS -L$withval/lib"
5432            CPPFLAGS="$CPPFLAGS -I$withval/include"
5433           fi
5434           saved_LIBS="$LIBS"
5435
5436           echo $ac_n "checking for X509_new in -lcrypto""... $ac_c" 1>&6
5437 echo "configure:5438: checking for X509_new in -lcrypto" >&5
5438 ac_lib_var=`echo crypto'_'X509_new | sed 'y%./+-%__p_%'`
5439 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5440   echo $ac_n "(cached) $ac_c" 1>&6
5441 else
5442   ac_save_LIBS="$LIBS"
5443 LIBS="-lcrypto  $LIBS"
5444 cat > conftest.$ac_ext <<EOF
5445 #line 5446 "configure"
5446 #include "confdefs.h"
5447 /* Override any gcc2 internal prototype to avoid an error.  */
5448 /* We use char because int might match the return type of a gcc2
5449     builtin and then its argument prototype would still apply.  */
5450 char X509_new();
5451
5452 int main() {
5453 X509_new()
5454 ; return 0; }
5455 EOF
5456 if { (eval echo configure:5457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5457   rm -rf conftest*
5458   eval "ac_cv_lib_$ac_lib_var=yes"
5459 else
5460   echo "configure: failed program was:" >&5
5461   cat conftest.$ac_ext >&5
5462   rm -rf conftest*
5463   eval "ac_cv_lib_$ac_lib_var=no"
5464 fi
5465 rm -f conftest*
5466 LIBS="$ac_save_LIBS"
5467
5468 fi
5469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5470   echo "$ac_t""yes" 1>&6
5471     ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5472     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5473   cat >> confdefs.h <<EOF
5474 #define $ac_tr_lib 1
5475 EOF
5476
5477   LIBS="-lcrypto $LIBS"
5478
5479 else
5480   echo "$ac_t""no" 1>&6
5481 { echo "configure: error: Unable to find SSL library" 1>&2; exit 1; }
5482 fi
5483
5484           echo $ac_n "checking for SSL_new in -lssl""... $ac_c" 1>&6
5485 echo "configure:5486: checking for SSL_new in -lssl" >&5
5486 ac_lib_var=`echo ssl'_'SSL_new | sed 'y%./+-%__p_%'`
5487 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5488   echo $ac_n "(cached) $ac_c" 1>&6
5489 else
5490   ac_save_LIBS="$LIBS"
5491 LIBS="-lssl -lcrypto $LIBS"
5492 cat > conftest.$ac_ext <<EOF
5493 #line 5494 "configure"
5494 #include "confdefs.h"
5495 /* Override any gcc2 internal prototype to avoid an error.  */
5496 /* We use char because int might match the return type of a gcc2
5497     builtin and then its argument prototype would still apply.  */
5498 char SSL_new();
5499
5500 int main() {
5501 SSL_new()
5502 ; return 0; }
5503 EOF
5504 if { (eval echo configure:5505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5505   rm -rf conftest*
5506   eval "ac_cv_lib_$ac_lib_var=yes"
5507 else
5508   echo "configure: failed program was:" >&5
5509   cat conftest.$ac_ext >&5
5510   rm -rf conftest*
5511   eval "ac_cv_lib_$ac_lib_var=no"
5512 fi
5513 rm -f conftest*
5514 LIBS="$ac_save_LIBS"
5515
5516 fi
5517 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5518   echo "$ac_t""yes" 1>&6
5519     ac_tr_lib=HAVE_LIB`echo ssl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5520     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5521   cat >> confdefs.h <<EOF
5522 #define $ac_tr_lib 1
5523 EOF
5524
5525   LIBS="-lssl $LIBS"
5526
5527 else
5528   echo "$ac_t""no" 1>&6
5529 { echo "configure: error: Unable to find SSL library" 1>&2; exit 1; }
5530 fi
5531
5532
5533           for ac_func in RAND_status RAND_egd
5534 do
5535 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5536 echo "configure:5537: checking for $ac_func" >&5
5537 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5538   echo $ac_n "(cached) $ac_c" 1>&6
5539 else
5540   cat > conftest.$ac_ext <<EOF
5541 #line 5542 "configure"
5542 #include "confdefs.h"
5543 /* System header to define __stub macros and hopefully few prototypes,
5544     which can conflict with char $ac_func(); below.  */
5545 #include <assert.h>
5546 /* Override any gcc2 internal prototype to avoid an error.  */
5547 /* We use char because int might match the return type of a gcc2
5548     builtin and then its argument prototype would still apply.  */
5549 char $ac_func();
5550
5551 int main() {
5552
5553 /* The GNU C library defines this for functions which it implements
5554     to always fail with ENOSYS.  Some functions are actually named
5555     something starting with __ and the normal name is an alias.  */
5556 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5557 choke me
5558 #else
5559 $ac_func();
5560 #endif
5561
5562 ; return 0; }
5563 EOF
5564 if { (eval echo configure:5565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5565   rm -rf conftest*
5566   eval "ac_cv_func_$ac_func=yes"
5567 else
5568   echo "configure: failed program was:" >&5
5569   cat conftest.$ac_ext >&5
5570   rm -rf conftest*
5571   eval "ac_cv_func_$ac_func=no"
5572 fi
5573 rm -f conftest*
5574 fi
5575
5576 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5577   echo "$ac_t""yes" 1>&6
5578     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5579   cat >> confdefs.h <<EOF
5580 #define $ac_tr_func 1
5581 EOF
5582  
5583 else
5584   echo "$ac_t""no" 1>&6
5585 fi
5586 done
5587
5588
5589           cat >> confdefs.h <<\EOF
5590 #define USE_SSL 1
5591 EOF
5592
5593           LIBS="$saved_LIBS"
5594           MUTTLIBS="$MUTTLIBS -lssl -lcrypto"
5595           MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl.o"
5596           need_ssl=yes
5597
5598         fi
5599
5600 fi
5601
5602
5603
5604 if test x$need_ssl = xyes; then
5605   USE_SSL_TRUE=
5606   USE_SSL_FALSE='#'
5607 else
5608   USE_SSL_TRUE='#'
5609   USE_SSL_FALSE=
5610 fi
5611
5612 # Check whether --with-gnutls or --without-gnutls was given.
5613 if test "${with_gnutls+set}" = set; then
5614   withval="$with_gnutls"
5615      if test "$need_ssl" = "yes"
5616     then
5617       { echo "configure: error: In order to compile in GNU TLS support, you must first disable SSL support" 1>&2; exit 1; }
5618     fi
5619     if test "$with_gnutls" != "no"
5620     then
5621       if test "$need_socket" != "yes"; then
5622         { echo "configure: error: GNU TLS support is only useful with POP or IMAP support" 1>&2; exit 1; }
5623       fi
5624       if test "$with_gnutls" != "yes"
5625       then
5626         LDFLAGS="$LDFLAGS -L$withval/lib"
5627         CPPFLAGS="$CPPFLAGS -I$withval/include"
5628       fi
5629 #saved_LIBS="$LIBS"
5630
5631       echo $ac_n "checking for gnutls_init in -lgnutls""... $ac_c" 1>&6
5632 echo "configure:5633: checking for gnutls_init in -lgnutls" >&5
5633 ac_lib_var=`echo gnutls'_'gnutls_init | sed 'y%./+-%__p_%'`
5634 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5635   echo $ac_n "(cached) $ac_c" 1>&6
5636 else
5637   ac_save_LIBS="$LIBS"
5638 LIBS="-lgnutls  $LIBS"
5639 cat > conftest.$ac_ext <<EOF
5640 #line 5641 "configure"
5641 #include "confdefs.h"
5642 /* Override any gcc2 internal prototype to avoid an error.  */
5643 /* We use char because int might match the return type of a gcc2
5644     builtin and then its argument prototype would still apply.  */
5645 char gnutls_init();
5646
5647 int main() {
5648 gnutls_init()
5649 ; return 0; }
5650 EOF
5651 if { (eval echo configure:5652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5652   rm -rf conftest*
5653   eval "ac_cv_lib_$ac_lib_var=yes"
5654 else
5655   echo "configure: failed program was:" >&5
5656   cat conftest.$ac_ext >&5
5657   rm -rf conftest*
5658   eval "ac_cv_lib_$ac_lib_var=no"
5659 fi
5660 rm -f conftest*
5661 LIBS="$ac_save_LIBS"
5662
5663 fi
5664 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5665   echo "$ac_t""yes" 1>&6
5666     ac_tr_lib=HAVE_LIB`echo gnutls | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5667     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5668   cat >> confdefs.h <<EOF
5669 #define $ac_tr_lib 1
5670 EOF
5671
5672   LIBS="-lgnutls $LIBS"
5673
5674 else
5675   echo "$ac_t""no" 1>&6
5676 { echo "configure: error: Unable to find GNU TLS library" 1>&2; exit 1; }
5677 fi
5678
5679
5680       cat >> confdefs.h <<\EOF
5681 #define USE_GNUTLS 1
5682 EOF
5683
5684 #LIBS="$saved_LIBS"
5685 #MUTTLIBS="$MUTTLIBS -lgnutls"
5686       MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl_gnutls.o"
5687       need_gnutls=yes
5688     fi
5689
5690 fi
5691
5692
5693
5694 if test x$need_gnutls = xyes; then
5695   USE_GNUTLS_TRUE=
5696   USE_GNUTLS_FALSE='#'
5697 else
5698   USE_GNUTLS_TRUE='#'
5699   USE_GNUTLS_FALSE=
5700 fi
5701
5702 # Check whether --with-nss or --without-nss was given.
5703 if test "${with_nss+set}" = set; then
5704   withval="$with_nss"
5705          if test "$with_nss" != no
5706         then
5707           if test "$need_socket" != "yes"; then
5708            { echo "configure: error: SSL support is only useful with POP or IMAP support" 1>&2; exit 1; }
5709           fi
5710
5711           if test "$with_nss" != "yes"
5712           then
5713            LDFLAGS="$LDFLAGS -L$withval/lib"
5714            CPPFLAGS="$CPPFLAGS -I$withval/include -I$withval/public/security"
5715           fi
5716
5717           cat >> confdefs.h <<\EOF
5718 #define USE_NSS 1
5719 EOF
5720
5721           MUTTLIBS="$MUTTLIBS -lssl -lnss -lcertdb -lcerthi -lcryptohi"
5722           MUTTLIBS="$MUTTLIBS -lpk11wrap -lsoftoken -lsecutil -ldbm -lplds4 -lplc4 -lfreebl"
5723           MUTTLIBS="$MUTTLIBS -lnspr4"
5724
5725           MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl_nss.o"
5726           need_ssl=yes
5727         fi
5728
5729 fi
5730
5731
5732 # Check whether --with-sasl or --without-sasl was given.
5733 if test "${with_sasl+set}" = set; then
5734   withval="$with_sasl"
5735   
5736         if test "$with_sasl" != "no" -a "$need_imap" != "yes" -a "$need_pop" != "yes"
5737         then
5738           { echo "configure: error: SASL support is only useful with POP or IMAP support" 1>&2; exit 1; }
5739         fi
5740
5741         if test "$with_sasl" != "no"
5742         then
5743           if test "$with_sasl" != "yes"
5744           then
5745             CPPFLAGS="$CPPFLAGS -I$with_sasl/include"
5746             LDFLAGS="$LDFLAGS -L$with_sasl/lib"
5747           fi
5748
5749           saved_LIBS="$LIBS"
5750
5751           echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
5752 echo "configure:5753: checking for sasl_client_init in -lsasl" >&5
5753 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-%__p_%'`
5754 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5755   echo $ac_n "(cached) $ac_c" 1>&6
5756 else
5757   ac_save_LIBS="$LIBS"
5758 LIBS="-lsasl  $LIBS"
5759 cat > conftest.$ac_ext <<EOF
5760 #line 5761 "configure"
5761 #include "confdefs.h"
5762 /* Override any gcc2 internal prototype to avoid an error.  */
5763 /* We use char because int might match the return type of a gcc2
5764     builtin and then its argument prototype would still apply.  */
5765 char sasl_client_init();
5766
5767 int main() {
5768 sasl_client_init()
5769 ; return 0; }
5770 EOF
5771 if { (eval echo configure:5772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5772   rm -rf conftest*
5773   eval "ac_cv_lib_$ac_lib_var=yes"
5774 else
5775   echo "configure: failed program was:" >&5
5776   cat conftest.$ac_ext >&5
5777   rm -rf conftest*
5778   eval "ac_cv_lib_$ac_lib_var=no"
5779 fi
5780 rm -f conftest*
5781 LIBS="$ac_save_LIBS"
5782
5783 fi
5784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5785   echo "$ac_t""yes" 1>&6
5786     ac_tr_lib=HAVE_LIB`echo sasl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5787     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5788   cat >> confdefs.h <<EOF
5789 #define $ac_tr_lib 1
5790 EOF
5791
5792   LIBS="-lsasl $LIBS"
5793
5794 else
5795   echo "$ac_t""no" 1>&6
5796 { echo "configure: error: could not find libsasl" 1>&2; exit 1; }
5797 fi
5798
5799
5800           MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_sasl.o"
5801           MUTTLIBS="$MUTTLIBS -lsasl"
5802           LIBS="$saved_LIBS"
5803           cat >> confdefs.h <<\EOF
5804 #define USE_SASL 1
5805 EOF
5806
5807           need_sasl=yes
5808         fi
5809         
5810 fi
5811
5812
5813
5814 if test x$need_sasl = xyes; then
5815   USE_SASL_TRUE=
5816   USE_SASL_FALSE='#'
5817 else
5818   USE_SASL_TRUE='#'
5819   USE_SASL_FALSE=
5820 fi
5821
5822 # Check whether --with-sasl2 or --without-sasl2 was given.
5823 if test "${with_sasl2+set}" = set; then
5824   withval="$with_sasl2"
5825   
5826         if test "$with_sasl2" != "no" -a "$need_imap" != "yes" -a "$need_pop" != "yes"
5827         then
5828           { echo "configure: error: SASL2 support is only useful with POP or IMAP support" 1>&2; exit 1; }
5829         fi
5830
5831         if test "$with_sasl2" != "no"
5832         then
5833           if test "$with_sasl2" != "yes"
5834           then
5835             CPPFLAGS="$CPPFLAGS -I$with_sasl2/include"
5836             LDFLAGS="$LDFLAGS -L$with_sasl2/lib"
5837           fi
5838
5839           saved_LIBS="$LIBS"
5840
5841           echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
5842 echo "configure:5843: checking for sasl_client_init in -lsasl2" >&5
5843 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-%__p_%'`
5844 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5845   echo $ac_n "(cached) $ac_c" 1>&6
5846 else
5847   ac_save_LIBS="$LIBS"
5848 LIBS="-lsasl2  $LIBS"
5849 cat > conftest.$ac_ext <<EOF
5850 #line 5851 "configure"
5851 #include "confdefs.h"
5852 /* Override any gcc2 internal prototype to avoid an error.  */
5853 /* We use char because int might match the return type of a gcc2
5854     builtin and then its argument prototype would still apply.  */
5855 char sasl_client_init();
5856
5857 int main() {
5858 sasl_client_init()
5859 ; return 0; }
5860 EOF
5861 if { (eval echo configure:5862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5862   rm -rf conftest*
5863   eval "ac_cv_lib_$ac_lib_var=yes"
5864 else
5865   echo "configure: failed program was:" >&5
5866   cat conftest.$ac_ext >&5
5867   rm -rf conftest*
5868   eval "ac_cv_lib_$ac_lib_var=no"
5869 fi
5870 rm -f conftest*
5871 LIBS="$ac_save_LIBS"
5872
5873 fi
5874 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5875   echo "$ac_t""yes" 1>&6
5876     ac_tr_lib=HAVE_LIB`echo sasl2 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5877     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5878   cat >> confdefs.h <<EOF
5879 #define $ac_tr_lib 1
5880 EOF
5881
5882   LIBS="-lsasl2 $LIBS"
5883
5884 else
5885   echo "$ac_t""no" 1>&6
5886 { echo "configure: error: could not find libsasl2" 1>&2; exit 1; }
5887 fi
5888
5889
5890           MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_sasl.o"
5891           MUTTLIBS="$MUTTLIBS -lsasl2"
5892           LIBS="$saved_LIBS"
5893           cat >> confdefs.h <<\EOF
5894 #define USE_SASL 1
5895 EOF
5896
5897           cat >> confdefs.h <<\EOF
5898 #define USE_SASL2 1
5899 EOF
5900
5901           need_sasl=yes
5902         fi
5903         
5904 fi
5905
5906
5907
5908 if test x$need_sasl = xyes; then
5909   USE_SASL_TRUE=
5910   USE_SASL_FALSE='#'
5911 else
5912   USE_SASL_TRUE='#'
5913   USE_SASL_FALSE=
5914 fi
5915
5916 # Check whether --with-idn or --without-idn was given.
5917 if test "${with_idn+set}" = set; then
5918   withval="$with_idn"
5919   
5920                   if test "$with_idn" != "no" ; then
5921                         if test "$with_idn" != "yes" ; then
5922                            CPPFLAGS="$CPPFLAGS -I$with_idn/include"
5923                            LDFLAGS="$LDFLAGS -L$with_idn/lib"
5924                         fi
5925                   fi
5926                  
5927
5928 fi
5929
5930
5931 if test "x$with_idn" != "xno"; then
5932    echo $ac_n "checking for stringprep_check_version in -lidn""... $ac_c" 1>&6
5933 echo "configure:5934: checking for stringprep_check_version in -lidn" >&5
5934 ac_lib_var=`echo idn'_'stringprep_check_version | sed 'y%./+-%__p_%'`
5935 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5936   echo $ac_n "(cached) $ac_c" 1>&6
5937 else
5938   ac_save_LIBS="$LIBS"
5939 LIBS="-lidn  $LIBS"
5940 cat > conftest.$ac_ext <<EOF
5941 #line 5942 "configure"
5942 #include "confdefs.h"
5943 /* Override any gcc2 internal prototype to avoid an error.  */
5944 /* We use char because int might match the return type of a gcc2
5945     builtin and then its argument prototype would still apply.  */
5946 char stringprep_check_version();
5947
5948 int main() {
5949 stringprep_check_version()
5950 ; return 0; }
5951 EOF
5952 if { (eval echo configure:5953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5953   rm -rf conftest*
5954   eval "ac_cv_lib_$ac_lib_var=yes"
5955 else
5956   echo "configure: failed program was:" >&5
5957   cat conftest.$ac_ext >&5
5958   rm -rf conftest*
5959   eval "ac_cv_lib_$ac_lib_var=no"
5960 fi
5961 rm -f conftest*
5962 LIBS="$ac_save_LIBS"
5963
5964 fi
5965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5966   echo "$ac_t""yes" 1>&6
5967     ac_tr_lib=HAVE_LIB`echo idn | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5968     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5969   cat >> confdefs.h <<EOF
5970 #define $ac_tr_lib 1
5971 EOF
5972
5973   LIBS="-lidn $LIBS"
5974
5975 else
5976   echo "$ac_t""no" 1>&6
5977 fi
5978
5979    for ac_func in idna_to_unicode_utf8_from_utf8 idna_to_unicode_8z8z
5980 do
5981 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5982 echo "configure:5983: checking for $ac_func" >&5
5983 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5984   echo $ac_n "(cached) $ac_c" 1>&6
5985 else
5986   cat > conftest.$ac_ext <<EOF
5987 #line 5988 "configure"
5988 #include "confdefs.h"
5989 /* System header to define __stub macros and hopefully few prototypes,
5990     which can conflict with char $ac_func(); below.  */
5991 #include <assert.h>
5992 /* Override any gcc2 internal prototype to avoid an error.  */
5993 /* We use char because int might match the return type of a gcc2
5994     builtin and then its argument prototype would still apply.  */
5995 char $ac_func();
5996
5997 int main() {
5998
5999 /* The GNU C library defines this for functions which it implements
6000     to always fail with ENOSYS.  Some functions are actually named
6001     something starting with __ and the normal name is an alias.  */
6002 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6003 choke me
6004 #else
6005 $ac_func();
6006 #endif
6007
6008 ; return 0; }
6009 EOF
6010 if { (eval echo configure:6011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6011   rm -rf conftest*
6012   eval "ac_cv_func_$ac_func=yes"
6013 else
6014   echo "configure: failed program was:" >&5
6015   cat conftest.$ac_ext >&5
6016   rm -rf conftest*
6017   eval "ac_cv_func_$ac_func=no"
6018 fi
6019 rm -f conftest*
6020 fi
6021
6022 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6023   echo "$ac_t""yes" 1>&6
6024     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6025   cat >> confdefs.h <<EOF
6026 #define $ac_tr_func 1
6027 EOF
6028  
6029 else
6030   echo "$ac_t""no" 1>&6
6031 fi
6032 done
6033
6034    for ac_func in idna_to_ascii_from_utf8 idna_to_ascii_8z
6035 do
6036 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6037 echo "configure:6038: checking for $ac_func" >&5
6038 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6039   echo $ac_n "(cached) $ac_c" 1>&6
6040 else
6041   cat > conftest.$ac_ext <<EOF
6042 #line 6043 "configure"
6043 #include "confdefs.h"
6044 /* System header to define __stub macros and hopefully few prototypes,
6045     which can conflict with char $ac_func(); below.  */
6046 #include <assert.h>
6047 /* Override any gcc2 internal prototype to avoid an error.  */
6048 /* We use char because int might match the return type of a gcc2
6049     builtin and then its argument prototype would still apply.  */
6050 char $ac_func();
6051
6052 int main() {
6053
6054 /* The GNU C library defines this for functions which it implements
6055     to always fail with ENOSYS.  Some functions are actually named
6056     something starting with __ and the normal name is an alias.  */
6057 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6058 choke me
6059 #else
6060 $ac_func();
6061 #endif
6062
6063 ; return 0; }
6064 EOF
6065 if { (eval echo configure:6066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6066   rm -rf conftest*
6067   eval "ac_cv_func_$ac_func=yes"
6068 else
6069   echo "configure: failed program was:" >&5
6070   cat conftest.$ac_ext >&5
6071   rm -rf conftest*
6072   eval "ac_cv_func_$ac_func=no"
6073 fi
6074 rm -f conftest*
6075 fi
6076
6077 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6078   echo "$ac_t""yes" 1>&6
6079     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6080   cat >> confdefs.h <<EOF
6081 #define $ac_tr_func 1
6082 EOF
6083  
6084 else
6085   echo "$ac_t""no" 1>&6
6086 fi
6087 done
6088
6089    for ac_func in idna_to_ascii_lz idna_to_ascii_from_locale
6090 do
6091 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6092 echo "configure:6093: checking for $ac_func" >&5
6093 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6094   echo $ac_n "(cached) $ac_c" 1>&6
6095 else
6096   cat > conftest.$ac_ext <<EOF
6097 #line 6098 "configure"
6098 #include "confdefs.h"
6099 /* System header to define __stub macros and hopefully few prototypes,
6100     which can conflict with char $ac_func(); below.  */
6101 #include <assert.h>
6102 /* Override any gcc2 internal prototype to avoid an error.  */
6103 /* We use char because int might match the return type of a gcc2
6104     builtin and then its argument prototype would still apply.  */
6105 char $ac_func();
6106
6107 int main() {
6108
6109 /* The GNU C library defines this for functions which it implements
6110     to always fail with ENOSYS.  Some functions are actually named
6111     something starting with __ and the normal name is an alias.  */
6112 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6113 choke me
6114 #else
6115 $ac_func();
6116 #endif
6117
6118 ; return 0; }
6119 EOF
6120 if { (eval echo configure:6121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6121   rm -rf conftest*
6122   eval "ac_cv_func_$ac_func=yes"
6123 else
6124   echo "configure: failed program was:" >&5
6125   cat conftest.$ac_ext >&5
6126   rm -rf conftest*
6127   eval "ac_cv_func_$ac_func=no"
6128 fi
6129 rm -f conftest*
6130 fi
6131
6132 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6133   echo "$ac_t""yes" 1>&6
6134     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6135   cat >> confdefs.h <<EOF
6136 #define $ac_tr_func 1
6137 EOF
6138  
6139 else
6140   echo "$ac_t""no" 1>&6
6141 fi
6142 done
6143
6144 fi
6145
6146
6147 # Check whether --enable-debug or --disable-debug was given.
6148 if test "${enable_debug+set}" = set; then
6149   enableval="$enable_debug"
6150    if test x$enableval = xyes ; then
6151                 cat >> confdefs.h <<\EOF
6152 #define DEBUG 1
6153 EOF
6154
6155           fi
6156          
6157 fi
6158
6159
6160 # Check whether --enable-flock or --disable-flock was given.
6161 if test "${enable_flock+set}" = set; then
6162   enableval="$enable_flock"
6163   if test $enableval = yes; then
6164                 cat >> confdefs.h <<\EOF
6165 #define USE_FLOCK 1
6166 EOF
6167
6168         fi
6169 fi
6170
6171
6172 mutt_cv_fcntl=yes
6173 # Check whether --enable-fcntl or --disable-fcntl was given.
6174 if test "${enable_fcntl+set}" = set; then
6175   enableval="$enable_fcntl"
6176   if test $enableval = no; then mutt_cv_fcntl=no; fi
6177 fi
6178
6179
6180 if test $mutt_cv_fcntl = yes; then
6181         cat >> confdefs.h <<\EOF
6182 #define USE_FCNTL 1
6183 EOF
6184
6185 fi
6186
6187 mutt_cv_inodesort=yes
6188 # Check whether --enable-inodesort or --disable-inodesort was given.
6189 if test "${enable_inodesort+set}" = set; then
6190   enableval="$enable_inodesort"
6191   if test $enableval = no ; then mutt_cv_inodesort=no; fi
6192 fi
6193
6194
6195 if test $mutt_cv_inodesort = yes; then
6196         cat >> confdefs.h <<\EOF
6197 #define USE_INODESORT 1
6198 EOF
6199
6200 fi
6201
6202 mutt_cv_warnings=yes
6203 # Check whether --enable-warnings or --disable-warnings was given.
6204 if test "${enable_warnings+set}" = set; then
6205   enableval="$enable_warnings"
6206   if test $enableval = no; then
6207         mutt_cv_warnings=no
6208 fi
6209 fi
6210
6211
6212 if test x$GCC = xyes -a $mutt_cv_warnings = yes; then
6213         CFLAGS="-Wall -pedantic $CFLAGS"
6214 fi
6215
6216 # Check whether --enable-nfs-fix or --disable-nfs-fix was given.
6217 if test "${enable_nfs_fix+set}" = set; then
6218   enableval="$enable_nfs_fix"
6219   if test x$enableval = xyes; then
6220                 cat >> confdefs.h <<\EOF
6221 #define NFS_ATTRIBUTE_HACK 1
6222 EOF
6223
6224         fi
6225 fi
6226
6227
6228 # Check whether --enable-buffy-size or --disable-buffy-size was given.
6229 if test "${enable_buffy_size+set}" = set; then
6230   enableval="$enable_buffy_size"
6231   if test x$enableval = xyes; then
6232                 cat >> confdefs.h <<\EOF
6233 #define BUFFY_SIZE 1
6234 EOF
6235
6236         fi
6237 fi
6238
6239
6240 # Check whether --enable-mailtool or --disable-mailtool was given.
6241 if test "${enable_mailtool+set}" = set; then
6242   enableval="$enable_mailtool"
6243   if test x$enableval = xyes; then
6244                 cat >> confdefs.h <<\EOF
6245 #define SUN_ATTACHMENT 1
6246 EOF
6247
6248         fi
6249 fi
6250
6251
6252 # Check whether --enable-compressed or --disable-compressed was given.
6253 if test "${enable_compressed+set}" = set; then
6254   enableval="$enable_compressed"
6255   if test x$enableval = xyes; then
6256                 cat >> confdefs.h <<\EOF
6257 #define USE_COMPRESSED 1
6258 EOF
6259
6260         fi
6261 fi
6262
6263
6264 # Check whether --enable-locales-fix or --disable-locales-fix was given.
6265 if test "${enable_locales_fix+set}" = set; then
6266   enableval="$enable_locales_fix"
6267   if test x$enableval = xyes; then
6268                 cat >> confdefs.h <<\EOF
6269 #define LOCALES_HACK 1
6270 EOF
6271
6272         fi
6273 fi
6274
6275
6276 # Check whether --with-exec-shell or --without-exec-shell was given.
6277 if test "${with_exec_shell+set}" = set; then
6278   withval="$with_exec_shell"
6279   if test $withval != yes; then
6280                 cat >> confdefs.h <<EOF
6281 #define EXECSHELL "$withval"
6282 EOF
6283
6284          else
6285                 cat >> confdefs.h <<EOF
6286 #define EXECSHELL "/bin/sh"
6287 EOF
6288
6289         fi
6290 else
6291   cat >> confdefs.h <<EOF
6292 #define EXECSHELL "/bin/sh"
6293 EOF
6294
6295 fi
6296
6297
6298 # Check whether --enable-exact-address or --disable-exact-address was given.
6299 if test "${enable_exact_address+set}" = set; then
6300   enableval="$enable_exact_address"
6301   if test $enableval = yes; then
6302                 cat >> confdefs.h <<\EOF
6303 #define EXACT_ADDRESS 1
6304 EOF
6305
6306
6307         fi
6308 fi
6309
6310
6311 # Check whether --enable-hcache or --disable-hcache was given.
6312 if test "${enable_hcache+set}" = set; then
6313   enableval="$enable_hcache"
6314   if test x$enableval = xyes; then
6315     cat >> confdefs.h <<\EOF
6316 #define USE_HCACHE 1
6317 EOF
6318
6319
6320     OLDCPPFLAGS="$CPPFLAGS"
6321     OLDLIBS="$LIBS"
6322
6323     need_md5="yes"
6324     ac_prefer_gdbm=yes
6325     # Check whether --with-gdbm or --without-gdbm was given.
6326 if test "${with_gdbm+set}" = set; then
6327   withval="$with_gdbm"
6328   ac_prefer_gdbm=$withval
6329 fi
6330
6331     if test x$ac_prefer_gdbm != xno; then
6332         CPPFLAGS="$OLDCPPFLAGS"
6333         LIBS="$OLDLIBS -lgdbm";
6334         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
6335 echo "configure:6336: checking for gdbm_open" >&5
6336 if eval "test \"`echo '$''{'ac_cv_gdbmopen'+set}'`\" = set"; then
6337   echo $ac_n "(cached) $ac_c" 1>&6
6338 else
6339   
6340             ac_cv_gdbmopen=no
6341             cat > conftest.$ac_ext <<EOF
6342 #line 6343 "configure"
6343 #include "confdefs.h"
6344 #include <gdbm.h>
6345 int main() {
6346 gdbm_open(0,0,0,0,0);
6347 ; return 0; }
6348 EOF
6349 if { (eval echo configure:6350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6350   rm -rf conftest*
6351   ac_cv_gdbmopen=yes
6352 else
6353   echo "configure: failed program was:" >&5
6354   cat conftest.$ac_ext >&5
6355 fi
6356 rm -f conftest*
6357         
6358 fi
6359
6360 echo "$ac_t""$ac_cv_gdbmopen" 1>&6
6361     fi
6362
6363     ac_bdb_prefix=yes
6364     # Check whether --with-bdb or --without-bdb was given.
6365 if test "${with_bdb+set}" = set; then
6366   withval="$with_bdb"
6367   ac_bdb_prefix=$withval
6368 fi
6369
6370     if test x$ac_bdb_prefix != xno -a x$ac_cv_gdbmopen != xyes; then
6371         test x$ac_bdb_prefix = xyes && ac_bdb_prefix="$mutt_cv_prefix /opt/csw/bdb4 /opt /usr/local /usr"
6372         for d in $ac_bdb_prefix; do
6373             bdbpfx="$bdbpfx $d"
6374             for v in BerkeleyDB.4.3 BerkeleyDB.4.2 BerkeleyDB.4.1; do
6375                 bdbpfx="$bdbpfx $d/$v"
6376             done
6377         done
6378         BDB_VERSIONS="db-4 db4 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db ''"
6379         echo $ac_n "checking for BerkeleyDB > 4.0""... $ac_c" 1>&6
6380 echo "configure:6381: checking for BerkeleyDB > 4.0" >&5
6381         for d in $bdbpfx; do
6382             BDB_INCLUDE_DIR=""
6383             BDB_LIB_DIR=""
6384             for v in / $BDB_VERSIONS; do
6385                 if test -r "$d/include/$v/db.h"; then
6386                     BDB_INCLUDE_DIR="$d/include/$v"
6387                     if test -d "$d/lib/$v"; then
6388                         BDB_LIB_DIR="$d/lib/$v"
6389                         for l in `echo $BDB_VERSIONS`; do
6390                             CPPFLAGS="-I$BDB_INCLUDE_DIR $OLDCPPFLAGS"
6391                             LIBS="$OLDLIBS -L$BDB_LIB_DIR -l$l"
6392                             cat > conftest.$ac_ext <<EOF
6393 #line 6394 "configure"
6394 #include "confdefs.h"
6395
6396                                 #include <stdlib.h>
6397                                 #include <db.h>
6398                             
6399 int main() {
6400
6401                                 DB *db = NULL;
6402                                 db->open(db,NULL,NULL,NULL,0,0,0);
6403                             
6404 ; return 0; }
6405 EOF
6406 if { (eval echo configure:6407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6407   rm -rf conftest*
6408   
6409                                 ac_cv_dbcreate=yes
6410                                 BDB_LIB="$l"
6411                                 break
6412                             
6413 else
6414   echo "configure: failed program was:" >&5
6415   cat conftest.$ac_ext >&5
6416 fi
6417 rm -f conftest*
6418                         done
6419                         test x$ac_dbcreate = xyes && break
6420                     fi
6421                 fi
6422             done
6423             test x$BDB_LIB != x && break
6424         done
6425         if test x$ac_cv_dbcreate = xyes; then
6426             echo "$ac_t""yes" 1>&6
6427         else
6428             echo "$ac_t""no" 1>&6
6429         fi
6430     fi
6431
6432     if test x$ac_cv_gdbmopen = xyes; then
6433         CPPFLAGS="$OLDCPPFLAGS"
6434         LIBS="$OLDLIBS -lgdbm";
6435         cat >> confdefs.h <<\EOF
6436 #define HAVE_GDBM 1
6437 EOF
6438
6439     elif test x$ac_cv_dbcreate = xyes; then
6440         CPPFLAGS="-I$BDB_INCLUDE_DIR $OLDCPPFLAGS"
6441         LIBS="$OLDLIBS -L$BDB_LIB_DIR -l$BDB_LIB"
6442         cat >> confdefs.h <<\EOF
6443 #define HAVE_DB4 1
6444 EOF
6445
6446     else
6447         { echo "configure: error: You need Sleepycat DB4 or GDBM for --enable-hcache" 1>&2; exit 1; }
6448     fi
6449 fi
6450 fi
6451
6452
6453
6454
6455
6456
6457
6458
6459 # Check whether --enable-iconv or --disable-iconv was given.
6460 if test "${enable_iconv+set}" = set; then
6461   enableval="$enable_iconv"
6462   if test x$enableval = xno ; then
6463                 am_cv_func_iconv=no
6464         fi
6465
6466 fi
6467
6468
6469 echo $ac_n "checking for off_t""... $ac_c" 1>&6
6470 echo "configure:6471: checking for off_t" >&5
6471 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
6472   echo $ac_n "(cached) $ac_c" 1>&6
6473 else
6474   cat > conftest.$ac_ext <<EOF
6475 #line 6476 "configure"
6476 #include "confdefs.h"
6477 #include <sys/types.h>
6478 #if STDC_HEADERS
6479 #include <stdlib.h>
6480 #include <stddef.h>
6481 #endif
6482 EOF
6483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6484   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6485   rm -rf conftest*
6486   ac_cv_type_off_t=yes
6487 else
6488   rm -rf conftest*
6489   ac_cv_type_off_t=no
6490 fi
6491 rm -f conftest*
6492
6493 fi
6494 echo "$ac_t""$ac_cv_type_off_t" 1>&6
6495 if test $ac_cv_type_off_t = no; then
6496   cat >> confdefs.h <<\EOF
6497 #define off_t long
6498 EOF
6499
6500 fi
6501
6502 echo $ac_n "checking for size_t""... $ac_c" 1>&6
6503 echo "configure:6504: checking for size_t" >&5
6504 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
6505   echo $ac_n "(cached) $ac_c" 1>&6
6506 else
6507   cat > conftest.$ac_ext <<EOF
6508 #line 6509 "configure"
6509 #include "confdefs.h"
6510 #include <sys/types.h>
6511 #if STDC_HEADERS
6512 #include <stdlib.h>
6513 #include <stddef.h>
6514 #endif
6515 EOF
6516 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6517   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6518   rm -rf conftest*
6519   ac_cv_type_size_t=yes
6520 else
6521   rm -rf conftest*
6522   ac_cv_type_size_t=no
6523 fi
6524 rm -f conftest*
6525
6526 fi
6527 echo "$ac_t""$ac_cv_type_size_t" 1>&6
6528 if test $ac_cv_type_size_t = no; then
6529   cat >> confdefs.h <<\EOF
6530 #define size_t unsigned
6531 EOF
6532
6533 fi
6534
6535 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6536 # for constant arguments.  Useless!
6537 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
6538 echo "configure:6539: checking for working alloca.h" >&5
6539 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
6540   echo $ac_n "(cached) $ac_c" 1>&6
6541 else
6542   cat > conftest.$ac_ext <<EOF
6543 #line 6544 "configure"
6544 #include "confdefs.h"
6545 #include <alloca.h>
6546 int main() {
6547 char *p = alloca(2 * sizeof(int));
6548 ; return 0; }
6549 EOF
6550 if { (eval echo configure:6551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6551   rm -rf conftest*
6552   ac_cv_header_alloca_h=yes
6553 else
6554   echo "configure: failed program was:" >&5
6555   cat conftest.$ac_ext >&5
6556   rm -rf conftest*
6557   ac_cv_header_alloca_h=no
6558 fi
6559 rm -f conftest*
6560 fi
6561
6562 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
6563 if test $ac_cv_header_alloca_h = yes; then
6564   cat >> confdefs.h <<\EOF
6565 #define HAVE_ALLOCA_H 1
6566 EOF
6567
6568 fi
6569
6570 echo $ac_n "checking for alloca""... $ac_c" 1>&6
6571 echo "configure:6572: checking for alloca" >&5
6572 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6573   echo $ac_n "(cached) $ac_c" 1>&6
6574 else
6575   cat > conftest.$ac_ext <<EOF
6576 #line 6577 "configure"
6577 #include "confdefs.h"
6578
6579 #ifdef __GNUC__
6580 # define alloca __builtin_alloca
6581 #else
6582 # ifdef _MSC_VER
6583 #  include <malloc.h>
6584 #  define alloca _alloca
6585 # else
6586 #  if HAVE_ALLOCA_H
6587 #   include <alloca.h>
6588 #  else
6589 #   ifdef _AIX
6590  #pragma alloca
6591 #   else
6592 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6593 char *alloca ();
6594 #    endif
6595 #   endif
6596 #  endif
6597 # endif
6598 #endif
6599
6600 int main() {
6601 char *p = (char *) alloca(1);
6602 ; return 0; }
6603 EOF
6604 if { (eval echo configure:6605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6605   rm -rf conftest*
6606   ac_cv_func_alloca_works=yes
6607 else
6608   echo "configure: failed program was:" >&5
6609   cat conftest.$ac_ext >&5
6610   rm -rf conftest*
6611   ac_cv_func_alloca_works=no
6612 fi
6613 rm -f conftest*
6614 fi
6615
6616 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6617 if test $ac_cv_func_alloca_works = yes; then
6618   cat >> confdefs.h <<\EOF
6619 #define HAVE_ALLOCA 1
6620 EOF
6621
6622 fi
6623
6624 if test $ac_cv_func_alloca_works = no; then
6625   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6626   # that cause trouble.  Some versions do not even contain alloca or
6627   # contain a buggy version.  If you still want to use their alloca,
6628   # use ar to extract alloca.o from them instead of compiling alloca.c.
6629   ALLOCA=alloca.${ac_objext}
6630   cat >> confdefs.h <<\EOF
6631 #define C_ALLOCA 1
6632 EOF
6633
6634
6635 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
6636 echo "configure:6637: checking whether alloca needs Cray hooks" >&5
6637 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6638   echo $ac_n "(cached) $ac_c" 1>&6
6639 else
6640   cat > conftest.$ac_ext <<EOF
6641 #line 6642 "configure"
6642 #include "confdefs.h"
6643 #if defined(CRAY) && ! defined(CRAY2)
6644 webecray
6645 #else
6646 wenotbecray
6647 #endif
6648
6649 EOF
6650 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6651   egrep "webecray" >/dev/null 2>&1; then
6652   rm -rf conftest*
6653   ac_cv_os_cray=yes
6654 else
6655   rm -rf conftest*
6656   ac_cv_os_cray=no
6657 fi
6658 rm -f conftest*
6659
6660 fi
6661
6662 echo "$ac_t""$ac_cv_os_cray" 1>&6
6663 if test $ac_cv_os_cray = yes; then
6664 for ac_func in _getb67 GETB67 getb67; do
6665   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6666 echo "configure:6667: checking for $ac_func" >&5
6667 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6668   echo $ac_n "(cached) $ac_c" 1>&6
6669 else
6670   cat > conftest.$ac_ext <<EOF
6671 #line 6672 "configure"
6672 #include "confdefs.h"
6673 /* System header to define __stub macros and hopefully few prototypes,
6674     which can conflict with char $ac_func(); below.  */
6675 #include <assert.h>
6676 /* Override any gcc2 internal prototype to avoid an error.  */
6677 /* We use char because int might match the return type of a gcc2
6678     builtin and then its argument prototype would still apply.  */
6679 char $ac_func();
6680
6681 int main() {
6682
6683 /* The GNU C library defines this for functions which it implements
6684     to always fail with ENOSYS.  Some functions are actually named
6685     something starting with __ and the normal name is an alias.  */
6686 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6687 choke me
6688 #else
6689 $ac_func();
6690 #endif
6691
6692 ; return 0; }
6693 EOF
6694 if { (eval echo configure:6695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6695   rm -rf conftest*
6696   eval "ac_cv_func_$ac_func=yes"
6697 else
6698   echo "configure: failed program was:" >&5
6699   cat conftest.$ac_ext >&5
6700   rm -rf conftest*
6701   eval "ac_cv_func_$ac_func=no"
6702 fi
6703 rm -f conftest*
6704 fi
6705
6706 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6707   echo "$ac_t""yes" 1>&6
6708   cat >> confdefs.h <<EOF
6709 #define CRAY_STACKSEG_END $ac_func
6710 EOF
6711
6712   break
6713 else
6714   echo "$ac_t""no" 1>&6
6715 fi
6716
6717 done
6718 fi
6719
6720 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6721 echo "configure:6722: checking stack direction for C alloca" >&5
6722 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6723   echo $ac_n "(cached) $ac_c" 1>&6
6724 else
6725   if test "$cross_compiling" = yes; then
6726   ac_cv_c_stack_direction=0
6727 else
6728   cat > conftest.$ac_ext <<EOF
6729 #line 6730 "configure"
6730 #include "confdefs.h"
6731 find_stack_direction ()
6732 {
6733   static char *addr = 0;
6734   auto char dummy;
6735   if (addr == 0)
6736     {
6737       addr = &dummy;
6738       return find_stack_direction ();
6739     }
6740   else
6741     return (&dummy > addr) ? 1 : -1;
6742 }
6743 main ()
6744 {
6745   exit (find_stack_direction() < 0);
6746 }
6747 EOF
6748 if { (eval echo configure:6749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6749 then
6750   ac_cv_c_stack_direction=1
6751 else
6752   echo "configure: failed program was:" >&5
6753   cat conftest.$ac_ext >&5
6754   rm -fr conftest*
6755   ac_cv_c_stack_direction=-1
6756 fi
6757 rm -fr conftest*
6758 fi
6759
6760 fi
6761
6762 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6763 cat >> confdefs.h <<EOF
6764 #define STACK_DIRECTION $ac_cv_c_stack_direction
6765 EOF
6766
6767 fi
6768
6769 for ac_hdr in unistd.h
6770 do
6771 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6772 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6773 echo "configure:6774: checking for $ac_hdr" >&5
6774 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6775   echo $ac_n "(cached) $ac_c" 1>&6
6776 else
6777   cat > conftest.$ac_ext <<EOF
6778 #line 6779 "configure"
6779 #include "confdefs.h"
6780 #include <$ac_hdr>
6781 EOF
6782 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6783 { (eval echo configure:6784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6784 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6785 if test -z "$ac_err"; then
6786   rm -rf conftest*
6787   eval "ac_cv_header_$ac_safe=yes"
6788 else
6789   echo "$ac_err" >&5
6790   echo "configure: failed program was:" >&5
6791   cat conftest.$ac_ext >&5
6792   rm -rf conftest*
6793   eval "ac_cv_header_$ac_safe=no"
6794 fi
6795 rm -f conftest*
6796 fi
6797 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6798   echo "$ac_t""yes" 1>&6
6799     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6800   cat >> confdefs.h <<EOF
6801 #define $ac_tr_hdr 1
6802 EOF
6803  
6804 else
6805   echo "$ac_t""no" 1>&6
6806 fi
6807 done
6808
6809 for ac_func in getpagesize
6810 do
6811 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6812 echo "configure:6813: checking for $ac_func" >&5
6813 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6814   echo $ac_n "(cached) $ac_c" 1>&6
6815 else
6816   cat > conftest.$ac_ext <<EOF
6817 #line 6818 "configure"
6818 #include "confdefs.h"
6819 /* System header to define __stub macros and hopefully few prototypes,
6820     which can conflict with char $ac_func(); below.  */
6821 #include <assert.h>
6822 /* Override any gcc2 internal prototype to avoid an error.  */
6823 /* We use char because int might match the return type of a gcc2
6824     builtin and then its argument prototype would still apply.  */
6825 char $ac_func();
6826
6827 int main() {
6828
6829 /* The GNU C library defines this for functions which it implements
6830     to always fail with ENOSYS.  Some functions are actually named
6831     something starting with __ and the normal name is an alias.  */
6832 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6833 choke me
6834 #else
6835 $ac_func();
6836 #endif
6837
6838 ; return 0; }
6839 EOF
6840 if { (eval echo configure:6841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6841   rm -rf conftest*
6842   eval "ac_cv_func_$ac_func=yes"
6843 else
6844   echo "configure: failed program was:" >&5
6845   cat conftest.$ac_ext >&5
6846   rm -rf conftest*
6847   eval "ac_cv_func_$ac_func=no"
6848 fi
6849 rm -f conftest*
6850 fi
6851
6852 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6853   echo "$ac_t""yes" 1>&6
6854     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6855   cat >> confdefs.h <<EOF
6856 #define $ac_tr_func 1
6857 EOF
6858  
6859 else
6860   echo "$ac_t""no" 1>&6
6861 fi
6862 done
6863
6864 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
6865 echo "configure:6866: checking for working mmap" >&5
6866 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6867   echo $ac_n "(cached) $ac_c" 1>&6
6868 else
6869   if test "$cross_compiling" = yes; then
6870   ac_cv_func_mmap_fixed_mapped=no
6871 else
6872   cat > conftest.$ac_ext <<EOF
6873 #line 6874 "configure"
6874 #include "confdefs.h"
6875
6876 /* Thanks to Mike Haertel and Jim Avera for this test.
6877    Here is a matrix of mmap possibilities:
6878         mmap private not fixed
6879         mmap private fixed at somewhere currently unmapped
6880         mmap private fixed at somewhere already mapped
6881         mmap shared not fixed
6882         mmap shared fixed at somewhere currently unmapped
6883         mmap shared fixed at somewhere already mapped
6884    For private mappings, we should verify that changes cannot be read()
6885    back from the file, nor mmap's back from the file at a different
6886    address.  (There have been systems where private was not correctly
6887    implemented like the infamous i386 svr4.0, and systems where the
6888    VM page cache was not coherent with the filesystem buffer cache
6889    like early versions of FreeBSD and possibly contemporary NetBSD.)
6890    For shared mappings, we should conversely verify that changes get
6891    propogated back to all the places they're supposed to be.
6892
6893    Grep wants private fixed already mapped.
6894    The main things grep needs to know about mmap are:
6895    * does it exist and is it safe to write into the mmap'd area
6896    * how to use it (BSD variants)  */
6897 #include <sys/types.h>
6898 #include <fcntl.h>
6899 #include <sys/mman.h>
6900
6901 /* This mess was copied from the GNU getpagesize.h.  */
6902 #ifndef HAVE_GETPAGESIZE
6903 # ifdef HAVE_UNISTD_H
6904 #  include <unistd.h>
6905 # endif
6906
6907 /* Assume that all systems that can run configure have sys/param.h.  */
6908 # ifndef HAVE_SYS_PARAM_H
6909 #  define HAVE_SYS_PARAM_H 1
6910 # endif
6911
6912 # ifdef _SC_PAGESIZE
6913 #  define getpagesize() sysconf(_SC_PAGESIZE)
6914 # else /* no _SC_PAGESIZE */
6915 #  ifdef HAVE_SYS_PARAM_H
6916 #   include <sys/param.h>
6917 #   ifdef EXEC_PAGESIZE
6918 #    define getpagesize() EXEC_PAGESIZE
6919 #   else /* no EXEC_PAGESIZE */
6920 #    ifdef NBPG
6921 #     define getpagesize() NBPG * CLSIZE
6922 #     ifndef CLSIZE
6923 #      define CLSIZE 1
6924 #     endif /* no CLSIZE */
6925 #    else /* no NBPG */
6926 #     ifdef NBPC
6927 #      define getpagesize() NBPC
6928 #     else /* no NBPC */
6929 #      ifdef PAGESIZE
6930 #       define getpagesize() PAGESIZE
6931 #      endif /* PAGESIZE */
6932 #     endif /* no NBPC */
6933 #    endif /* no NBPG */
6934 #   endif /* no EXEC_PAGESIZE */
6935 #  else /* no HAVE_SYS_PARAM_H */
6936 #   define getpagesize() 8192   /* punt totally */
6937 #  endif /* no HAVE_SYS_PARAM_H */
6938 # endif /* no _SC_PAGESIZE */
6939
6940 #endif /* no HAVE_GETPAGESIZE */
6941
6942 #ifdef __cplusplus
6943 extern "C" { void *malloc(unsigned); }
6944 #else
6945 char *malloc();
6946 #endif
6947
6948 int
6949 main()
6950 {
6951         char *data, *data2, *data3;
6952         int i, pagesize;
6953         int fd;
6954
6955         pagesize = getpagesize();
6956
6957         /*
6958          * First, make a file with some known garbage in it.
6959          */
6960         data = malloc(pagesize);
6961         if (!data)
6962                 exit(1);
6963         for (i = 0; i < pagesize; ++i)
6964                 *(data + i) = rand();
6965         umask(0);
6966         fd = creat("conftestmmap", 0600);
6967         if (fd < 0)
6968                 exit(1);
6969         if (write(fd, data, pagesize) != pagesize)
6970                 exit(1);
6971         close(fd);
6972
6973         /*
6974          * Next, try to mmap the file at a fixed address which
6975          * already has something else allocated at it.  If we can,
6976          * also make sure that we see the same garbage.
6977          */
6978         fd = open("conftestmmap", O_RDWR);
6979         if (fd < 0)
6980                 exit(1);
6981         data2 = malloc(2 * pagesize);
6982         if (!data2)
6983                 exit(1);
6984         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6985         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6986             MAP_PRIVATE | MAP_FIXED, fd, 0L))
6987                 exit(1);
6988         for (i = 0; i < pagesize; ++i)
6989                 if (*(data + i) != *(data2 + i))
6990                         exit(1);
6991
6992         /*
6993          * Finally, make sure that changes to the mapped area
6994          * do not percolate back to the file as seen by read().
6995          * (This is a bug on some variants of i386 svr4.0.)
6996          */
6997         for (i = 0; i < pagesize; ++i)
6998                 *(data2 + i) = *(data2 + i) + 1;
6999         data3 = malloc(pagesize);
7000         if (!data3)
7001                 exit(1);
7002         if (read(fd, data3, pagesize) != pagesize)
7003                 exit(1);
7004         for (i = 0; i < pagesize; ++i)
7005                 if (*(data + i) != *(data3 + i))
7006                         exit(1);
7007         close(fd);
7008         unlink("conftestmmap");
7009         exit(0);
7010 }
7011
7012 EOF
7013 if { (eval echo configure:7014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7014 then
7015   ac_cv_func_mmap_fixed_mapped=yes
7016 else
7017   echo "configure: failed program was:" >&5
7018   cat conftest.$ac_ext >&5
7019   rm -fr conftest*
7020   ac_cv_func_mmap_fixed_mapped=no
7021 fi
7022 rm -fr conftest*
7023 fi
7024
7025 fi
7026
7027 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
7028 if test $ac_cv_func_mmap_fixed_mapped = yes; then
7029   cat >> confdefs.h <<\EOF
7030 #define HAVE_MMAP 1
7031 EOF
7032
7033 fi
7034
7035
7036     echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
7037 echo "configure:7038: checking whether we are using the GNU C Library 2.1 or newer" >&5
7038 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
7039   echo $ac_n "(cached) $ac_c" 1>&6
7040 else
7041   cat > conftest.$ac_ext <<EOF
7042 #line 7043 "configure"
7043 #include "confdefs.h"
7044
7045 #include <features.h>
7046 #ifdef __GNU_LIBRARY__
7047  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
7048   Lucky GNU user
7049  #endif
7050 #endif
7051         
7052 EOF
7053 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7054   egrep "Lucky GNU user" >/dev/null 2>&1; then
7055   rm -rf conftest*
7056   ac_cv_gnu_library_2_1=yes
7057 else
7058   rm -rf conftest*
7059   ac_cv_gnu_library_2_1=no
7060 fi
7061 rm -f conftest*
7062
7063       
7064     
7065 fi
7066
7067 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
7068     
7069     GLIBC21="$ac_cv_gnu_library_2_1"
7070   
7071
7072                                     
7073    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
7074 stdlib.h string.h unistd.h sys/param.h
7075 do
7076 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7077 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7078 echo "configure:7079: checking for $ac_hdr" >&5
7079 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7080   echo $ac_n "(cached) $ac_c" 1>&6
7081 else
7082   cat > conftest.$ac_ext <<EOF
7083 #line 7084 "configure"
7084 #include "confdefs.h"
7085 #include <$ac_hdr>
7086 EOF
7087 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7088 { (eval echo configure:7089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7089 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7090 if test -z "$ac_err"; then
7091   rm -rf conftest*
7092   eval "ac_cv_header_$ac_safe=yes"
7093 else
7094   echo "$ac_err" >&5
7095   echo "configure: failed program was:" >&5
7096   cat conftest.$ac_ext >&5
7097   rm -rf conftest*
7098   eval "ac_cv_header_$ac_safe=no"
7099 fi
7100 rm -f conftest*
7101 fi
7102 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7103   echo "$ac_t""yes" 1>&6
7104     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7105   cat >> confdefs.h <<EOF
7106 #define $ac_tr_hdr 1
7107 EOF
7108  
7109 else
7110   echo "$ac_t""no" 1>&6
7111 fi
7112 done
7113
7114    for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
7115 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
7116 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
7117 do
7118 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7119 echo "configure:7120: checking for $ac_func" >&5
7120 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7121   echo $ac_n "(cached) $ac_c" 1>&6
7122 else
7123   cat > conftest.$ac_ext <<EOF
7124 #line 7125 "configure"
7125 #include "confdefs.h"
7126 /* System header to define __stub macros and hopefully few prototypes,
7127     which can conflict with char $ac_func(); below.  */
7128 #include <assert.h>
7129 /* Override any gcc2 internal prototype to avoid an error.  */
7130 /* We use char because int might match the return type of a gcc2
7131     builtin and then its argument prototype would still apply.  */
7132 char $ac_func();
7133
7134 int main() {
7135
7136 /* The GNU C library defines this for functions which it implements
7137     to always fail with ENOSYS.  Some functions are actually named
7138     something starting with __ and the normal name is an alias.  */
7139 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7140 choke me
7141 #else
7142 $ac_func();
7143 #endif
7144
7145 ; return 0; }
7146 EOF
7147 if { (eval echo configure:7148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7148   rm -rf conftest*
7149   eval "ac_cv_func_$ac_func=yes"
7150 else
7151   echo "configure: failed program was:" >&5
7152   cat conftest.$ac_ext >&5
7153   rm -rf conftest*
7154   eval "ac_cv_func_$ac_func=no"
7155 fi
7156 rm -f conftest*
7157 fi
7158
7159 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7160   echo "$ac_t""yes" 1>&6
7161     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7162   cat >> confdefs.h <<EOF
7163 #define $ac_tr_func 1
7164 EOF
7165  
7166 else
7167   echo "$ac_t""no" 1>&6
7168 fi
7169 done
7170
7171
7172    
7173     
7174   # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
7175 if test "${with_libiconv_prefix+set}" = set; then
7176   withval="$with_libiconv_prefix"
7177   
7178     for dir in `echo "$withval" | tr : ' '`; do
7179       if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
7180       if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
7181     done
7182    
7183 fi
7184
7185
7186   echo $ac_n "checking for iconv""... $ac_c" 1>&6
7187 echo "configure:7188: checking for iconv" >&5
7188 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
7189   echo $ac_n "(cached) $ac_c" 1>&6
7190 else
7191   
7192     am_cv_func_iconv="no, consider installing GNU libiconv"
7193     am_cv_lib_iconv=no
7194     cat > conftest.$ac_ext <<EOF
7195 #line 7196 "configure"
7196 #include "confdefs.h"
7197 #include <stdlib.h>
7198 #include <iconv.h>
7199 int main() {
7200 iconv_t cd = iconv_open("","");
7201        iconv(cd,NULL,NULL,NULL,NULL);
7202        iconv_close(cd);
7203 ; return 0; }
7204 EOF
7205 if { (eval echo configure:7206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7206   rm -rf conftest*
7207   am_cv_func_iconv=yes
7208 else
7209   echo "configure: failed program was:" >&5
7210   cat conftest.$ac_ext >&5
7211 fi
7212 rm -f conftest*
7213     if test "$am_cv_func_iconv" != yes; then
7214       am_save_LIBS="$LIBS"
7215       LIBS="$LIBS -liconv"
7216       cat > conftest.$ac_ext <<EOF
7217 #line 7218 "configure"
7218 #include "confdefs.h"
7219 #include <stdlib.h>
7220 #include <iconv.h>
7221 int main() {
7222 iconv_t cd = iconv_open("","");
7223          iconv(cd,NULL,NULL,NULL,NULL);
7224          iconv_close(cd);
7225 ; return 0; }
7226 EOF
7227 if { (eval echo configure:7228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7228   rm -rf conftest*
7229   am_cv_lib_iconv=yes
7230         am_cv_func_iconv=yes
7231 else
7232   echo "configure: failed program was:" >&5
7233   cat conftest.$ac_ext >&5
7234 fi
7235 rm -f conftest*
7236       LIBS="$am_save_LIBS"
7237     fi
7238   
7239 fi
7240
7241 echo "$ac_t""$am_cv_func_iconv" 1>&6
7242   if test "$am_cv_func_iconv" = yes; then
7243     cat >> confdefs.h <<\EOF
7244 #define HAVE_ICONV 1
7245 EOF
7246
7247     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
7248 echo "configure:7249: checking for iconv declaration" >&5
7249     if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
7250   echo $ac_n "(cached) $ac_c" 1>&6
7251 else
7252   
7253       cat > conftest.$ac_ext <<EOF
7254 #line 7255 "configure"
7255 #include "confdefs.h"
7256
7257 #include <stdlib.h>
7258 #include <iconv.h>
7259 extern
7260 #ifdef __cplusplus
7261 "C"
7262 #endif
7263 #if defined(__STDC__) || defined(__cplusplus)
7264 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
7265 #else
7266 size_t iconv();
7267 #endif
7268
7269 int main() {
7270
7271 ; return 0; }
7272 EOF
7273 if { (eval echo configure:7274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7274   rm -rf conftest*
7275   am_cv_proto_iconv_arg1=""
7276 else
7277   echo "configure: failed program was:" >&5
7278   cat conftest.$ac_ext >&5
7279   rm -rf conftest*
7280   am_cv_proto_iconv_arg1="const"
7281 fi
7282 rm -f conftest*
7283       am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
7284 fi
7285
7286     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
7287     echo "$ac_t""${ac_t:-
7288          }$am_cv_proto_iconv" 1>&6
7289     cat >> confdefs.h <<EOF
7290 #define ICONV_CONST $am_cv_proto_iconv_arg1
7291 EOF
7292
7293   fi
7294   LIBICONV=
7295   if test "$am_cv_lib_iconv" = yes; then
7296     LIBICONV="-liconv"
7297   fi
7298   
7299
7300    
7301   echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
7302 echo "configure:7303: checking for nl_langinfo and CODESET" >&5
7303 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
7304   echo $ac_n "(cached) $ac_c" 1>&6
7305 else
7306   cat > conftest.$ac_ext <<EOF
7307 #line 7308 "configure"
7308 #include "confdefs.h"
7309 #include <langinfo.h>
7310 int main() {
7311 char* cs = nl_langinfo(CODESET);
7312 ; return 0; }
7313 EOF
7314 if { (eval echo configure:7315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7315   rm -rf conftest*
7316   am_cv_langinfo_codeset=yes
7317 else
7318   echo "configure: failed program was:" >&5
7319   cat conftest.$ac_ext >&5
7320   rm -rf conftest*
7321   am_cv_langinfo_codeset=no
7322 fi
7323 rm -f conftest*
7324     
7325 fi
7326
7327 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
7328   if test $am_cv_langinfo_codeset = yes; then
7329     cat >> confdefs.h <<\EOF
7330 #define HAVE_LANGINFO_CODESET 1
7331 EOF
7332
7333   fi
7334
7335    if test $ac_cv_header_locale_h = yes; then
7336     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
7337 echo "configure:7338: checking for LC_MESSAGES" >&5
7338 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
7339   echo $ac_n "(cached) $ac_c" 1>&6
7340 else
7341   cat > conftest.$ac_ext <<EOF
7342 #line 7343 "configure"
7343 #include "confdefs.h"
7344 #include <locale.h>
7345 int main() {
7346 return LC_MESSAGES
7347 ; return 0; }
7348 EOF
7349 if { (eval echo configure:7350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7350   rm -rf conftest*
7351   am_cv_val_LC_MESSAGES=yes
7352 else
7353   echo "configure: failed program was:" >&5
7354   cat conftest.$ac_ext >&5
7355   rm -rf conftest*
7356   am_cv_val_LC_MESSAGES=no
7357 fi
7358 rm -f conftest*
7359 fi
7360
7361 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
7362     if test $am_cv_val_LC_MESSAGES = yes; then
7363       cat >> confdefs.h <<\EOF
7364 #define HAVE_LC_MESSAGES 1
7365 EOF
7366
7367     fi
7368   fi
7369    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
7370 echo "configure:7371: checking whether NLS is requested" >&5
7371         # Check whether --enable-nls or --disable-nls was given.
7372 if test "${enable_nls+set}" = set; then
7373   enableval="$enable_nls"
7374   USE_NLS=$enableval
7375 else
7376   USE_NLS=yes
7377 fi
7378
7379     echo "$ac_t""$USE_NLS" 1>&6
7380     
7381
7382     BUILD_INCLUDED_LIBINTL=no
7383     USE_INCLUDED_LIBINTL=no
7384     INTLLIBS=
7385
7386         if test "$USE_NLS" = "yes"; then
7387       cat >> confdefs.h <<\EOF
7388 #define ENABLE_NLS 1
7389 EOF
7390
7391       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
7392 echo "configure:7393: checking whether included gettext is requested" >&5
7393       # Check whether --with-included-gettext or --without-included-gettext was given.
7394 if test "${with_included_gettext+set}" = set; then
7395   withval="$with_included_gettext"
7396   nls_cv_force_use_gnu_gettext=$withval
7397 else
7398   nls_cv_force_use_gnu_gettext=no
7399 fi
7400
7401       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
7402
7403       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7404       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7405                                 CATOBJEXT=NONE
7406
7407                 
7408         
7409
7410         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
7411 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
7412 echo "configure:7413: checking for libintl.h" >&5
7413 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7414   echo $ac_n "(cached) $ac_c" 1>&6
7415 else
7416   cat > conftest.$ac_ext <<EOF
7417 #line 7418 "configure"
7418 #include "confdefs.h"
7419 #include <libintl.h>
7420 EOF
7421 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7422 { (eval echo configure:7423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7423 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7424 if test -z "$ac_err"; then
7425   rm -rf conftest*
7426   eval "ac_cv_header_$ac_safe=yes"
7427 else
7428   echo "$ac_err" >&5
7429   echo "configure: failed program was:" >&5
7430   cat conftest.$ac_ext >&5
7431   rm -rf conftest*
7432   eval "ac_cv_header_$ac_safe=no"
7433 fi
7434 rm -f conftest*
7435 fi
7436 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7437   echo "$ac_t""yes" 1>&6
7438   echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
7439 echo "configure:7440: checking for GNU gettext in libc" >&5
7440 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
7441   echo $ac_n "(cached) $ac_c" 1>&6
7442 else
7443   cat > conftest.$ac_ext <<EOF
7444 #line 7445 "configure"
7445 #include "confdefs.h"
7446 #include <libintl.h>
7447 extern int _nl_msg_cat_cntr;
7448 int main() {
7449 bindtextdomain ("", "");
7450 return (int) gettext ("") + _nl_msg_cat_cntr
7451 ; return 0; }
7452 EOF
7453 if { (eval echo configure:7454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7454   rm -rf conftest*
7455   gt_cv_func_gnugettext1_libc=yes
7456 else
7457   echo "configure: failed program was:" >&5
7458   cat conftest.$ac_ext >&5
7459   rm -rf conftest*
7460   gt_cv_func_gnugettext1_libc=no
7461 fi
7462 rm -f conftest*
7463 fi
7464
7465 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
7466
7467            if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
7468              echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
7469 echo "configure:7470: checking for GNU gettext in libintl" >&5
7470 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
7471   echo $ac_n "(cached) $ac_c" 1>&6
7472 else
7473   gt_save_LIBS="$LIBS"
7474                 LIBS="$LIBS -lintl $LIBICONV"
7475                 cat > conftest.$ac_ext <<EOF
7476 #line 7477 "configure"
7477 #include "confdefs.h"
7478 #include <libintl.h>
7479 extern int _nl_msg_cat_cntr;
7480 int main() {
7481 bindtextdomain ("", "");
7482 return (int) gettext ("") + _nl_msg_cat_cntr
7483 ; return 0; }
7484 EOF
7485 if { (eval echo configure:7486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7486   rm -rf conftest*
7487   gt_cv_func_gnugettext1_libintl=yes
7488 else
7489   echo "configure: failed program was:" >&5
7490   cat conftest.$ac_ext >&5
7491   rm -rf conftest*
7492   gt_cv_func_gnugettext1_libintl=no
7493 fi
7494 rm -f conftest*
7495                 LIBS="$gt_save_LIBS"
7496 fi
7497
7498 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
7499            fi
7500
7501                                            if test "$gt_cv_func_gnugettext1_libc" = "yes" \
7502               || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
7503                    && test "$PACKAGE" != gettext; }; then
7504              cat >> confdefs.h <<\EOF
7505 #define HAVE_GETTEXT 1
7506 EOF
7507
7508
7509              if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
7510                                        INTLLIBS="-lintl $LIBICONV"
7511              fi
7512
7513              gt_save_LIBS="$LIBS"
7514              LIBS="$LIBS $INTLLIBS"
7515              for ac_func in dcgettext
7516 do
7517 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7518 echo "configure:7519: checking for $ac_func" >&5
7519 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7520   echo $ac_n "(cached) $ac_c" 1>&6
7521 else
7522   cat > conftest.$ac_ext <<EOF
7523 #line 7524 "configure"
7524 #include "confdefs.h"
7525 /* System header to define __stub macros and hopefully few prototypes,
7526     which can conflict with char $ac_func(); below.  */
7527 #include <assert.h>
7528 /* Override any gcc2 internal prototype to avoid an error.  */
7529 /* We use char because int might match the return type of a gcc2
7530     builtin and then its argument prototype would still apply.  */
7531 char $ac_func();
7532
7533 int main() {
7534
7535 /* The GNU C library defines this for functions which it implements
7536     to always fail with ENOSYS.  Some functions are actually named
7537     something starting with __ and the normal name is an alias.  */
7538 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7539 choke me
7540 #else
7541 $ac_func();
7542 #endif
7543
7544 ; return 0; }
7545 EOF
7546 if { (eval echo configure:7547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7547   rm -rf conftest*
7548   eval "ac_cv_func_$ac_func=yes"
7549 else
7550   echo "configure: failed program was:" >&5
7551   cat conftest.$ac_ext >&5
7552   rm -rf conftest*
7553   eval "ac_cv_func_$ac_func=no"
7554 fi
7555 rm -f conftest*
7556 fi
7557
7558 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7559   echo "$ac_t""yes" 1>&6
7560     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7561   cat >> confdefs.h <<EOF
7562 #define $ac_tr_func 1
7563 EOF
7564  
7565 else
7566   echo "$ac_t""no" 1>&6
7567 fi
7568 done
7569
7570              LIBS="$gt_save_LIBS"
7571
7572                      # Extract the first word of "msgfmt", so it can be a program name with args.
7573 set dummy msgfmt; ac_word=$2
7574 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7575 echo "configure:7576: checking for $ac_word" >&5
7576 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
7577   echo $ac_n "(cached) $ac_c" 1>&6
7578 else
7579   case "$MSGFMT" in
7580   /*)
7581   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7582   ;;
7583   *)
7584   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7585   for ac_dir in $PATH; do
7586     test -z "$ac_dir" && ac_dir=.
7587     if test -f $ac_dir/$ac_word; then
7588       if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
7589         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7590         break
7591       fi
7592     fi
7593   done
7594   IFS="$ac_save_ifs"
7595   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
7596   ;;
7597 esac
7598 fi
7599 MSGFMT="$ac_cv_path_MSGFMT"
7600 if test "$MSGFMT" != ":"; then
7601   echo "$ac_t""$MSGFMT" 1>&6
7602 else
7603   echo "$ac_t""no" 1>&6
7604 fi
7605
7606              # Extract the first word of "gmsgfmt", so it can be a program name with args.
7607 set dummy gmsgfmt; ac_word=$2
7608 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7609 echo "configure:7610: checking for $ac_word" >&5
7610 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
7611   echo $ac_n "(cached) $ac_c" 1>&6
7612 else
7613   case "$GMSGFMT" in
7614   /*)
7615   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7616   ;;
7617   ?:/*)                  
7618   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
7619   ;;
7620   *)
7621   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7622   ac_dummy="$PATH"
7623   for ac_dir in $ac_dummy; do 
7624     test -z "$ac_dir" && ac_dir=.
7625     if test -f $ac_dir/$ac_word; then
7626       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7627       break
7628     fi
7629   done
7630   IFS="$ac_save_ifs"
7631   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7632   ;;
7633 esac
7634 fi
7635 GMSGFMT="$ac_cv_path_GMSGFMT"
7636 if test -n "$GMSGFMT"; then
7637   echo "$ac_t""$GMSGFMT" 1>&6
7638 else
7639   echo "$ac_t""no" 1>&6
7640 fi
7641
7642
7643                      # Extract the first word of "xgettext", so it can be a program name with args.
7644 set dummy xgettext; ac_word=$2
7645 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7646 echo "configure:7647: checking for $ac_word" >&5
7647 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
7648   echo $ac_n "(cached) $ac_c" 1>&6
7649 else
7650   case "$XGETTEXT" in
7651   /*)
7652   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7653   ;;
7654   *)
7655   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7656   for ac_dir in $PATH; do
7657     test -z "$ac_dir" && ac_dir=.
7658     if test -f $ac_dir/$ac_word; then
7659       if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
7660         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7661         break
7662       fi
7663     fi
7664   done
7665   IFS="$ac_save_ifs"
7666   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7667   ;;
7668 esac
7669 fi
7670 XGETTEXT="$ac_cv_path_XGETTEXT"
7671 if test "$XGETTEXT" != ":"; then
7672   echo "$ac_t""$XGETTEXT" 1>&6
7673 else
7674   echo "$ac_t""no" 1>&6
7675 fi
7676
7677
7678              CATOBJEXT=.gmo
7679            fi
7680         
7681 else
7682   echo "$ac_t""no" 1>&6
7683 fi
7684
7685
7686         if test "$CATOBJEXT" = "NONE"; then
7687                           nls_cv_use_gnu_gettext=yes
7688         fi
7689       fi
7690
7691       if test "$nls_cv_use_gnu_gettext" = "yes"; then
7692                 INTLOBJS="\$(GETTOBJS)"
7693         # Extract the first word of "msgfmt", so it can be a program name with args.
7694 set dummy msgfmt; ac_word=$2
7695 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7696 echo "configure:7697: checking for $ac_word" >&5
7697 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
7698   echo $ac_n "(cached) $ac_c" 1>&6
7699 else
7700   case "$MSGFMT" in
7701   /*)
7702   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7703   ;;
7704   *)
7705   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7706   for ac_dir in $PATH; do
7707     test -z "$ac_dir" && ac_dir=.
7708     if test -f $ac_dir/$ac_word; then
7709       if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
7710         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7711         break
7712       fi
7713     fi
7714   done
7715   IFS="$ac_save_ifs"
7716   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
7717   ;;
7718 esac
7719 fi
7720 MSGFMT="$ac_cv_path_MSGFMT"
7721 if test "$MSGFMT" != ":"; then
7722   echo "$ac_t""$MSGFMT" 1>&6
7723 else
7724   echo "$ac_t""no" 1>&6
7725 fi
7726
7727         # Extract the first word of "gmsgfmt", so it can be a program name with args.
7728 set dummy gmsgfmt; ac_word=$2
7729 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7730 echo "configure:7731: checking for $ac_word" >&5
7731 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
7732   echo $ac_n "(cached) $ac_c" 1>&6
7733 else
7734   case "$GMSGFMT" in
7735   /*)
7736   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7737   ;;
7738   ?:/*)                  
7739   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
7740   ;;
7741   *)
7742   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7743   ac_dummy="$PATH"
7744   for ac_dir in $ac_dummy; do 
7745     test -z "$ac_dir" && ac_dir=.
7746     if test -f $ac_dir/$ac_word; then
7747       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7748       break
7749     fi
7750   done
7751   IFS="$ac_save_ifs"
7752   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7753   ;;
7754 esac
7755 fi
7756 GMSGFMT="$ac_cv_path_GMSGFMT"
7757 if test -n "$GMSGFMT"; then
7758   echo "$ac_t""$GMSGFMT" 1>&6
7759 else
7760   echo "$ac_t""no" 1>&6
7761 fi
7762
7763         # Extract the first word of "xgettext", so it can be a program name with args.
7764 set dummy xgettext; ac_word=$2
7765 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7766 echo "configure:7767: checking for $ac_word" >&5
7767 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
7768   echo $ac_n "(cached) $ac_c" 1>&6
7769 else
7770   case "$XGETTEXT" in
7771   /*)
7772   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7773   ;;
7774   *)
7775   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7776   for ac_dir in $PATH; do
7777     test -z "$ac_dir" && ac_dir=.
7778     if test -f $ac_dir/$ac_word; then
7779       if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
7780         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7781         break
7782       fi
7783     fi
7784   done
7785   IFS="$ac_save_ifs"
7786   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7787   ;;
7788 esac
7789 fi
7790 XGETTEXT="$ac_cv_path_XGETTEXT"
7791 if test "$XGETTEXT" != ":"; then
7792   echo "$ac_t""$XGETTEXT" 1>&6
7793 else
7794   echo "$ac_t""no" 1>&6
7795 fi
7796
7797         
7798         BUILD_INCLUDED_LIBINTL=yes
7799         USE_INCLUDED_LIBINTL=yes
7800         CATOBJEXT=.gmo
7801         INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
7802         LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
7803       fi
7804
7805                   if test "$GMSGFMT" != ":"; then
7806                         if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
7807           : ;
7808         else
7809           echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
7810           GMSGFMT=":"
7811         fi
7812       fi
7813
7814                   if test "$XGETTEXT" != ":"; then
7815                         if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
7816           : ;
7817         else
7818           echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
7819           XGETTEXT=":"
7820         fi
7821       fi
7822
7823             POSUB=po
7824     fi
7825     
7826
7827
7828             if test "$PACKAGE" = gettext; then
7829       BUILD_INCLUDED_LIBINTL=yes
7830     fi
7831
7832                                             for ac_prog in bison
7833 do
7834 # Extract the first word of "$ac_prog", so it can be a program name with args.
7835 set dummy $ac_prog; ac_word=$2
7836 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7837 echo "configure:7838: checking for $ac_word" >&5
7838 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
7839   echo $ac_n "(cached) $ac_c" 1>&6
7840 else
7841   if test -n "$INTLBISON"; then
7842   ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
7843 else
7844   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7845   ac_dummy="$PATH"
7846   for ac_dir in $ac_dummy; do
7847     test -z "$ac_dir" && ac_dir=.
7848     if test -f $ac_dir/$ac_word; then
7849       ac_cv_prog_INTLBISON="$ac_prog"
7850       break
7851     fi
7852   done
7853   IFS="$ac_save_ifs"
7854 fi
7855 fi
7856 INTLBISON="$ac_cv_prog_INTLBISON"
7857 if test -n "$INTLBISON"; then
7858   echo "$ac_t""$INTLBISON" 1>&6
7859 else
7860   echo "$ac_t""no" 1>&6
7861 fi
7862
7863 test -n "$INTLBISON" && break
7864 done
7865
7866     if test -z "$INTLBISON"; then
7867       ac_verc_fail=yes
7868     else
7869             echo $ac_n "checking version of bison""... $ac_c" 1>&6
7870 echo "configure:7871: checking version of bison" >&5
7871       ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
7872       case $ac_prog_version in
7873         '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
7874         1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
7875            ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
7876         *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
7877       esac
7878       echo "$ac_t""$ac_prog_version" 1>&6
7879     fi
7880     if test $ac_verc_fail = yes; then
7881       INTLBISON=:
7882     fi
7883
7884                 for lang in $ALL_LINGUAS; do
7885       GMOFILES="$GMOFILES $lang.gmo"
7886       POFILES="$POFILES $lang.po"
7887     done
7888
7889         
7890     
7891     
7892     
7893     
7894     
7895     
7896     
7897     
7898
7899         nls_cv_header_intl=
7900     nls_cv_header_libgt=
7901
7902         DATADIRNAME=share
7903     
7904
7905         INSTOBJEXT=.mo
7906     
7907
7908         GENCAT=gencat
7909     
7910   
7911
7912    if test "x$CATOBJEXT" != "x"; then
7913      if test "x$ALL_LINGUAS" = "x"; then
7914        LINGUAS=
7915      else
7916        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
7917 echo "configure:7918: checking for catalogs to be installed" >&5
7918        NEW_LINGUAS=
7919        for presentlang in $ALL_LINGUAS; do
7920          useit=no
7921          for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
7922            # Use the presentlang catalog if desiredlang is
7923            #   a. equal to presentlang, or
7924            #   b. a variant of presentlang (because in this case,
7925            #      presentlang can be used as a fallback for messages
7926            #      which are not translated in the desiredlang catalog).
7927            case "$desiredlang" in
7928              "$presentlang"*) useit=yes;;
7929            esac
7930          done
7931          if test $useit = yes; then
7932            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
7933          fi
7934        done
7935        LINGUAS=$NEW_LINGUAS
7936        echo "$ac_t""$LINGUAS" 1>&6
7937      fi
7938
7939           if test -n "$LINGUAS"; then
7940        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
7941      fi
7942    fi
7943
7944             MKINSTALLDIRS=
7945    if test -n "$ac_aux_dir"; then
7946      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
7947    fi
7948    if test -z "$MKINSTALLDIRS"; then
7949      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
7950    fi
7951    
7952
7953       INTL_LIBTOOL_SUFFIX_PREFIX=
7954    
7955   
7956
7957 if test "$am_cv_func_iconv" != "yes"
7958 then
7959   echo "configure: warning: Configuring without iconv support. See INSTALL for details" 1>&2
7960 else
7961
7962 for ac_hdr in iconv.h
7963 do
7964 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7965 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7966 echo "configure:7967: checking for $ac_hdr" >&5
7967 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7968   echo $ac_n "(cached) $ac_c" 1>&6
7969 else
7970   cat > conftest.$ac_ext <<EOF
7971 #line 7972 "configure"
7972 #include "confdefs.h"
7973 #include <$ac_hdr>
7974 EOF
7975 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7976 { (eval echo configure:7977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7977 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7978 if test -z "$ac_err"; then
7979   rm -rf conftest*
7980   eval "ac_cv_header_$ac_safe=yes"
7981 else
7982   echo "$ac_err" >&5
7983   echo "configure: failed program was:" >&5
7984   cat conftest.$ac_ext >&5
7985   rm -rf conftest*
7986   eval "ac_cv_header_$ac_safe=no"
7987 fi
7988 rm -f conftest*
7989 fi
7990 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7991   echo "$ac_t""yes" 1>&6
7992     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7993   cat >> confdefs.h <<EOF
7994 #define $ac_tr_hdr 1
7995 EOF
7996  echo $ac_n "checking whether iconv.h defines iconv_t""... $ac_c" 1>&6
7997 echo "configure:7998: checking whether iconv.h defines iconv_t" >&5
7998          cat > conftest.$ac_ext <<EOF
7999 #line 8000 "configure"
8000 #include "confdefs.h"
8001 #include <iconv.h>
8002 EOF
8003 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8004   egrep "typedef.*iconv_t" >/dev/null 2>&1; then
8005   rm -rf conftest*
8006   echo "$ac_t""yes" 1>&6
8007                  cat >> confdefs.h <<\EOF
8008 #define HAVE_ICONV_T_DEF 1
8009 EOF
8010
8011 else
8012   rm -rf conftest*
8013   echo "$ac_t""no" 1>&6
8014 fi
8015 rm -f conftest*
8016
8017 else
8018   echo "$ac_t""no" 1>&6
8019 fi
8020 done
8021
8022
8023 echo $ac_n "checking whether this iconv is good enough""... $ac_c" 1>&6
8024 echo "configure:8025: checking whether this iconv is good enough" >&5
8025 if eval "test \"`echo '$''{'mutt_cv_iconv_good'+set}'`\" = set"; then
8026   echo $ac_n "(cached) $ac_c" 1>&6
8027 else
8028   mutt_save_LIBS="$LIBS"
8029         LIBS="$LIBS $LIBICONV"
8030         if test "$cross_compiling" = yes; then
8031   mutt_cv_iconv_good=yes
8032 else
8033   cat > conftest.$ac_ext <<EOF
8034 #line 8035 "configure"
8035 #include "confdefs.h"
8036
8037 #include <iconv.h>
8038 int main()
8039 {
8040   iconv_t cd;
8041   char buf[4];
8042   char *ob;
8043   size_t obl;
8044   ob = buf, obl = sizeof(buf);
8045   return ((cd = iconv_open("UTF-8", "UTF-8")) != (iconv_t)(-1) &&
8046           (iconv(cd, 0, 0, &ob, &obl) ||
8047            !(ob == buf && obl == sizeof(buf)) ||
8048            iconv_close(cd)));
8049 }
8050                 
8051 EOF
8052 if { (eval echo configure:8053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8053 then
8054   mutt_cv_iconv_good=yes
8055 else
8056   echo "configure: failed program was:" >&5
8057   cat conftest.$ac_ext >&5
8058   rm -fr conftest*
8059   mutt_cv_iconv_good=no
8060 fi
8061 rm -fr conftest*
8062 fi
8063
8064         LIBS="$mutt_save_LIBS"
8065 fi
8066
8067 echo "$ac_t""$mutt_cv_iconv_good" 1>&6
8068 if test "$mutt_cv_iconv_good" = no; then
8069   { echo "configure: error: Try using libiconv instead" 1>&2; exit 1; }
8070 fi
8071
8072 echo $ac_n "checking whether iconv is non-transcribing""... $ac_c" 1>&6
8073 echo "configure:8074: checking whether iconv is non-transcribing" >&5
8074 if eval "test \"`echo '$''{'mutt_cv_iconv_nontrans'+set}'`\" = set"; then
8075   echo $ac_n "(cached) $ac_c" 1>&6
8076 else
8077   mutt_save_LIBS="$LIBS"
8078         LIBS="$LIBS $LIBICONV"
8079         if test "$cross_compiling" = yes; then
8080   mutt_cv_iconv_nontrans=no
8081 else
8082   cat > conftest.$ac_ext <<EOF
8083 #line 8084 "configure"
8084 #include "confdefs.h"
8085
8086 #include <iconv.h>
8087 #include <string.h>
8088 int main()
8089 {
8090   iconv_t cd;
8091   const char *ib;
8092   char *ob;
8093   size_t ibl, obl;
8094   const char *s = "\304\211";
8095   char t[3];
8096   ib = s, ibl = 2, ob = t, obl = 3;
8097   return ((cd = iconv_open("UTF-8", "UTF-8")) == (iconv_t)(-1) ||
8098           iconv(cd, &ib, &ibl, &ob, &obl));
8099 }
8100                 
8101 EOF
8102 if { (eval echo configure:8103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8103 then
8104   mutt_cv_iconv_nontrans=no
8105 else
8106   echo "configure: failed program was:" >&5
8107   cat conftest.$ac_ext >&5
8108   rm -fr conftest*
8109   mutt_cv_iconv_nontrans=yes
8110 fi
8111 rm -fr conftest*
8112 fi
8113
8114         LIBS="$mutt_save_LIBS"
8115 fi
8116
8117 echo "$ac_t""$mutt_cv_iconv_nontrans" 1>&6
8118 if test "$mutt_cv_iconv_nontrans" = yes; then
8119   cat >> confdefs.h <<\EOF
8120 #define ICONV_NONTRANS 1
8121 EOF
8122
8123 else
8124   cat >> confdefs.h <<\EOF
8125 #define ICONV_NONTRANS 0
8126 EOF
8127
8128 fi
8129
8130 CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/intl"
8131
8132 if test "$BUILD_INCLUDED_LIBINTL" = "yes"; then
8133   cat >> confdefs.h <<\EOF
8134 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
8135 EOF
8136
8137 else
8138   for ac_func in bind_textdomain_codeset
8139 do
8140 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8141 echo "configure:8142: checking for $ac_func" >&5
8142 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8143   echo $ac_n "(cached) $ac_c" 1>&6
8144 else
8145   cat > conftest.$ac_ext <<EOF
8146 #line 8147 "configure"
8147 #include "confdefs.h"
8148 /* System header to define __stub macros and hopefully few prototypes,
8149     which can conflict with char $ac_func(); below.  */
8150 #include <assert.h>
8151 /* Override any gcc2 internal prototype to avoid an error.  */
8152 /* We use char because int might match the return type of a gcc2
8153     builtin and then its argument prototype would still apply.  */
8154 char $ac_func();
8155
8156 int main() {
8157
8158 /* The GNU C library defines this for functions which it implements
8159     to always fail with ENOSYS.  Some functions are actually named
8160     something starting with __ and the normal name is an alias.  */
8161 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8162 choke me
8163 #else
8164 $ac_func();
8165 #endif
8166
8167 ; return 0; }
8168 EOF
8169 if { (eval echo configure:8170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8170   rm -rf conftest*
8171   eval "ac_cv_func_$ac_func=yes"
8172 else
8173   echo "configure: failed program was:" >&5
8174   cat conftest.$ac_ext >&5
8175   rm -rf conftest*
8176   eval "ac_cv_func_$ac_func=no"
8177 fi
8178 rm -f conftest*
8179 fi
8180
8181 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8182   echo "$ac_t""yes" 1>&6
8183     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8184   cat >> confdefs.h <<EOF
8185 #define $ac_tr_func 1
8186 EOF
8187  
8188 else
8189   echo "$ac_t""no" 1>&6
8190 fi
8191 done
8192
8193 fi
8194
8195 fi # libiconv
8196
8197
8198 for ac_hdr in wchar.h
8199 do
8200 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8201 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8202 echo "configure:8203: checking for $ac_hdr" >&5
8203 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8204   echo $ac_n "(cached) $ac_c" 1>&6
8205 else
8206   cat > conftest.$ac_ext <<EOF
8207 #line 8208 "configure"
8208 #include "confdefs.h"
8209 #include <$ac_hdr>
8210 EOF
8211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8212 { (eval echo configure:8213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8214 if test -z "$ac_err"; then
8215   rm -rf conftest*
8216   eval "ac_cv_header_$ac_safe=yes"
8217 else
8218   echo "$ac_err" >&5
8219   echo "configure: failed program was:" >&5
8220   cat conftest.$ac_ext >&5
8221   rm -rf conftest*
8222   eval "ac_cv_header_$ac_safe=no"
8223 fi
8224 rm -f conftest*
8225 fi
8226 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8227   echo "$ac_t""yes" 1>&6
8228     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8229   cat >> confdefs.h <<EOF
8230 #define $ac_tr_hdr 1
8231 EOF
8232  
8233 else
8234   echo "$ac_t""no" 1>&6
8235 fi
8236 done
8237
8238
8239 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
8240 echo "configure:8241: checking for wchar_t" >&5
8241 if eval "test \"`echo '$''{'mutt_cv_wchar_t'+set}'`\" = set"; then
8242   echo $ac_n "(cached) $ac_c" 1>&6
8243 else
8244   cat > conftest.$ac_ext <<EOF
8245 #line 8246 "configure"
8246 #include "confdefs.h"
8247
8248 #include <stddef.h>
8249 #include <stdlib.h>
8250 #ifdef HAVE_WCHAR_H
8251 #include <wchar.h>
8252 #endif
8253                 
8254 int main() {
8255  wchar_t wc; return 0; 
8256 ; return 0; }
8257 EOF
8258 if { (eval echo configure:8259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8259   rm -rf conftest*
8260   mutt_cv_wchar_t=yes
8261 else
8262   echo "configure: failed program was:" >&5
8263   cat conftest.$ac_ext >&5
8264   rm -rf conftest*
8265   mutt_cv_wchar_t=no
8266 fi
8267 rm -f conftest*
8268 fi
8269
8270 echo "$ac_t""$mutt_cv_wchar_t" 1>&6
8271
8272 if test "$mutt_cv_wchar_t" = no; then
8273         cat >> confdefs.h <<\EOF
8274 #define wchar_t int
8275 EOF
8276
8277 fi
8278
8279 echo $ac_n "checking for wint_t""... $ac_c" 1>&6
8280 echo "configure:8281: checking for wint_t" >&5
8281 if eval "test \"`echo '$''{'mutt_cv_wint_t'+set}'`\" = set"; then
8282   echo $ac_n "(cached) $ac_c" 1>&6
8283 else
8284   cat > conftest.$ac_ext <<EOF
8285 #line 8286 "configure"
8286 #include "confdefs.h"
8287
8288 #include <stddef.h>
8289 #include <stdlib.h>
8290 #ifdef HAVE_WCHAR_H
8291 #include <wchar.h>
8292 #endif
8293                 
8294 int main() {
8295  wint_t wc; return 0; 
8296 ; return 0; }
8297 EOF
8298 if { (eval echo configure:8299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8299   rm -rf conftest*
8300   mutt_cv_wint_t=yes
8301 else
8302   echo "configure: failed program was:" >&5
8303   cat conftest.$ac_ext >&5
8304   rm -rf conftest*
8305   mutt_cv_wint_t=no
8306 fi
8307 rm -f conftest*
8308 fi
8309
8310 echo "$ac_t""$mutt_cv_wint_t" 1>&6
8311
8312 if test "$mutt_cv_wint_t" = no; then
8313         cat >> confdefs.h <<\EOF
8314 #define wint_t int
8315 EOF
8316
8317 fi
8318
8319 for ac_hdr in wctype.h
8320 do
8321 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8322 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8323 echo "configure:8324: checking for $ac_hdr" >&5
8324 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8325   echo $ac_n "(cached) $ac_c" 1>&6
8326 else
8327   cat > conftest.$ac_ext <<EOF
8328 #line 8329 "configure"
8329 #include "confdefs.h"
8330 #include <$ac_hdr>
8331 EOF
8332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8333 { (eval echo configure:8334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8334 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8335 if test -z "$ac_err"; then
8336   rm -rf conftest*
8337   eval "ac_cv_header_$ac_safe=yes"
8338 else
8339   echo "$ac_err" >&5
8340   echo "configure: failed program was:" >&5
8341   cat conftest.$ac_ext >&5
8342   rm -rf conftest*
8343   eval "ac_cv_header_$ac_safe=no"
8344 fi
8345 rm -f conftest*
8346 fi
8347 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8348   echo "$ac_t""yes" 1>&6
8349     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8350   cat >> confdefs.h <<EOF
8351 #define $ac_tr_hdr 1
8352 EOF
8353  
8354 else
8355   echo "$ac_t""no" 1>&6
8356 fi
8357 done
8358
8359 for ac_func in iswalnum iswalpha  iswcntrl iswdigit
8360 do
8361 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8362 echo "configure:8363: checking for $ac_func" >&5
8363 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8364   echo $ac_n "(cached) $ac_c" 1>&6
8365 else
8366   cat > conftest.$ac_ext <<EOF
8367 #line 8368 "configure"
8368 #include "confdefs.h"
8369 /* System header to define __stub macros and hopefully few prototypes,
8370     which can conflict with char $ac_func(); below.  */
8371 #include <assert.h>
8372 /* Override any gcc2 internal prototype to avoid an error.  */
8373 /* We use char because int might match the return type of a gcc2
8374     builtin and then its argument prototype would still apply.  */
8375 char $ac_func();
8376
8377 int main() {
8378
8379 /* The GNU C library defines this for functions which it implements
8380     to always fail with ENOSYS.  Some functions are actually named
8381     something starting with __ and the normal name is an alias.  */
8382 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8383 choke me
8384 #else
8385 $ac_func();
8386 #endif
8387
8388 ; return 0; }
8389 EOF
8390 if { (eval echo configure:8391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8391   rm -rf conftest*
8392   eval "ac_cv_func_$ac_func=yes"
8393 else
8394   echo "configure: failed program was:" >&5
8395   cat conftest.$ac_ext >&5
8396   rm -rf conftest*
8397   eval "ac_cv_func_$ac_func=no"
8398 fi
8399 rm -f conftest*
8400 fi
8401
8402 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8403   echo "$ac_t""yes" 1>&6
8404     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8405   cat >> confdefs.h <<EOF
8406 #define $ac_tr_func 1
8407 EOF
8408  
8409 else
8410   echo "$ac_t""no" 1>&6
8411 fi
8412 done
8413
8414 for ac_func in iswgraph iswlower iswprint iswpunct iswspace iswupper
8415 do
8416 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8417 echo "configure:8418: checking for $ac_func" >&5
8418 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8419   echo $ac_n "(cached) $ac_c" 1>&6
8420 else
8421   cat > conftest.$ac_ext <<EOF
8422 #line 8423 "configure"
8423 #include "confdefs.h"
8424 /* System header to define __stub macros and hopefully few prototypes,
8425     which can conflict with char $ac_func(); below.  */
8426 #include <assert.h>
8427 /* Override any gcc2 internal prototype to avoid an error.  */
8428 /* We use char because int might match the return type of a gcc2
8429     builtin and then its argument prototype would still apply.  */
8430 char $ac_func();
8431
8432 int main() {
8433
8434 /* The GNU C library defines this for functions which it implements
8435     to always fail with ENOSYS.  Some functions are actually named
8436     something starting with __ and the normal name is an alias.  */
8437 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8438 choke me
8439 #else
8440 $ac_func();
8441 #endif
8442
8443 ; return 0; }
8444 EOF
8445 if { (eval echo configure:8446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8446   rm -rf conftest*
8447   eval "ac_cv_func_$ac_func=yes"
8448 else
8449   echo "configure: failed program was:" >&5
8450   cat conftest.$ac_ext >&5
8451   rm -rf conftest*
8452   eval "ac_cv_func_$ac_func=no"
8453 fi
8454 rm -f conftest*
8455 fi
8456
8457 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8458   echo "$ac_t""yes" 1>&6
8459     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8460   cat >> confdefs.h <<EOF
8461 #define $ac_tr_func 1
8462 EOF
8463  
8464 else
8465   echo "$ac_t""no" 1>&6
8466 fi
8467 done
8468
8469 for ac_func in iswxdigit towupper towlower
8470 do
8471 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8472 echo "configure:8473: checking for $ac_func" >&5
8473 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8474   echo $ac_n "(cached) $ac_c" 1>&6
8475 else
8476   cat > conftest.$ac_ext <<EOF
8477 #line 8478 "configure"
8478 #include "confdefs.h"
8479 /* System header to define __stub macros and hopefully few prototypes,
8480     which can conflict with char $ac_func(); below.  */
8481 #include <assert.h>
8482 /* Override any gcc2 internal prototype to avoid an error.  */
8483 /* We use char because int might match the return type of a gcc2
8484     builtin and then its argument prototype would still apply.  */
8485 char $ac_func();
8486
8487 int main() {
8488
8489 /* The GNU C library defines this for functions which it implements
8490     to always fail with ENOSYS.  Some functions are actually named
8491     something starting with __ and the normal name is an alias.  */
8492 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8493 choke me
8494 #else
8495 $ac_func();
8496 #endif
8497
8498 ; return 0; }
8499 EOF
8500 if { (eval echo configure:8501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8501   rm -rf conftest*
8502   eval "ac_cv_func_$ac_func=yes"
8503 else
8504   echo "configure: failed program was:" >&5
8505   cat conftest.$ac_ext >&5
8506   rm -rf conftest*
8507   eval "ac_cv_func_$ac_func=no"
8508 fi
8509 rm -f conftest*
8510 fi
8511
8512 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8513   echo "$ac_t""yes" 1>&6
8514     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8515   cat >> confdefs.h <<EOF
8516 #define $ac_tr_func 1
8517 EOF
8518  
8519 else
8520   echo "$ac_t""no" 1>&6
8521 fi
8522 done
8523
8524
8525 echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
8526 echo "configure:8527: checking for mbstate_t" >&5
8527 if eval "test \"`echo '$''{'mutt_cv_mbstate_t'+set}'`\" = set"; then
8528   echo $ac_n "(cached) $ac_c" 1>&6
8529 else
8530   cat > conftest.$ac_ext <<EOF
8531 #line 8532 "configure"
8532 #include "confdefs.h"
8533
8534 #include <stddef.h>
8535 #include <stdlib.h>
8536 #ifdef HAVE_WCHAR_H
8537 #include <wchar.h>
8538 #endif
8539                 
8540 int main() {
8541  mbstate_t s; return 0; 
8542 ; return 0; }
8543 EOF
8544 if { (eval echo configure:8545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8545   rm -rf conftest*
8546   mutt_cv_mbstate_t=yes
8547 else
8548   echo "configure: failed program was:" >&5
8549   cat conftest.$ac_ext >&5
8550   rm -rf conftest*
8551   mutt_cv_mbstate_t=no
8552 fi
8553 rm -f conftest*
8554 fi
8555
8556 echo "$ac_t""$mutt_cv_mbstate_t" 1>&6
8557
8558 if test "$mutt_cv_mbstate_t" = no; then
8559         cat >> confdefs.h <<\EOF
8560 #define mbstate_t int
8561 EOF
8562
8563 fi
8564
8565 wc_funcs=maybe
8566 # Check whether --with-wc-funcs or --without-wc-funcs was given.
8567 if test "${with_wc_funcs+set}" = set; then
8568   withval="$with_wc_funcs"
8569   wc_funcs=$withval
8570 fi
8571
8572
8573 if test "$wc_funcs" != yes -a "$wc_funcs" != no; then
8574         echo $ac_n "checking for wchar_t functions""... $ac_c" 1>&6
8575 echo "configure:8576: checking for wchar_t functions" >&5
8576 if eval "test \"`echo '$''{'mutt_cv_wc_funcs'+set}'`\" = set"; then
8577   echo $ac_n "(cached) $ac_c" 1>&6
8578 else
8579   mutt_cv_wc_funcs=no
8580                 cat > conftest.$ac_ext <<EOF
8581 #line 8582 "configure"
8582 #include "confdefs.h"
8583
8584 #define _XOPEN_SOURCE 1
8585 #include <stddef.h>
8586 #include <stdlib.h>
8587 #ifdef HAVE_WCTYPE_H
8588 #include <wctype.h>
8589 #endif
8590 #ifdef HAVE_WCHAR_H
8591 #include <wchar.h>
8592 #endif
8593 int main() {
8594 mbrtowc(0, 0, 0, 0); wctomb(0, 0); wcwidth(0);
8595         iswprint(0); iswspace(0); towlower(0); towupper(0); iswalnum(0)
8596 ; return 0; }
8597 EOF
8598 if { (eval echo configure:8599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8599   rm -rf conftest*
8600   mutt_cv_wc_funcs=yes
8601 else
8602   echo "configure: failed program was:" >&5
8603   cat conftest.$ac_ext >&5
8604 fi
8605 rm -f conftest*
8606 fi
8607
8608 echo "$ac_t""$mutt_cv_wc_funcs" 1>&6
8609         wc_funcs=$mutt_cv_wc_funcs
8610 fi
8611
8612 if test $wc_funcs = yes; then
8613         cat >> confdefs.h <<\EOF
8614 #define HAVE_WC_FUNCS 1
8615 EOF
8616
8617 fi
8618
8619 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
8620 echo "configure:8621: checking for nl_langinfo and CODESET" >&5
8621 if eval "test \"`echo '$''{'mutt_cv_langinfo_codeset'+set}'`\" = set"; then
8622   echo $ac_n "(cached) $ac_c" 1>&6
8623 else
8624   cat > conftest.$ac_ext <<EOF
8625 #line 8626 "configure"
8626 #include "confdefs.h"
8627 #include <langinfo.h>
8628 int main() {
8629 char* cs = nl_langinfo(CODESET);
8630 ; return 0; }
8631 EOF
8632 if { (eval echo configure:8633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8633   rm -rf conftest*
8634   mutt_cv_langinfo_codeset=yes
8635 else
8636   echo "configure: failed program was:" >&5
8637   cat conftest.$ac_ext >&5
8638   rm -rf conftest*
8639   mutt_cv_langinfo_codeset=no
8640 fi
8641 rm -f conftest*
8642 fi
8643
8644 echo "$ac_t""$mutt_cv_langinfo_codeset" 1>&6
8645 if test $mutt_cv_langinfo_codeset = yes; then
8646   cat >> confdefs.h <<\EOF
8647 #define HAVE_LANGINFO_CODESET 1
8648 EOF
8649
8650 fi
8651
8652 echo $ac_n "checking for nl_langinfo and YESEXPR""... $ac_c" 1>&6
8653 echo "configure:8654: checking for nl_langinfo and YESEXPR" >&5
8654 if eval "test \"`echo '$''{'mutt_cv_langinfo_yesexpr'+set}'`\" = set"; then
8655   echo $ac_n "(cached) $ac_c" 1>&6
8656 else
8657   cat > conftest.$ac_ext <<EOF
8658 #line 8659 "configure"
8659 #include "confdefs.h"
8660 #include <langinfo.h>
8661 int main() {
8662 char* cs = nl_langinfo(YESEXPR);
8663 ; return 0; }
8664 EOF
8665 if { (eval echo configure:8666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8666   rm -rf conftest*
8667   mutt_cv_langinfo_yesexpr=yes
8668 else
8669   echo "configure: failed program was:" >&5
8670   cat conftest.$ac_ext >&5
8671   rm -rf conftest*
8672   mutt_cv_langinfo_yesexpr=no
8673 fi
8674 rm -f conftest*
8675 fi
8676
8677 echo "$ac_t""$mutt_cv_langinfo_yesexpr" 1>&6
8678 if test $mutt_cv_langinfo_yesexpr = yes; then
8679   cat >> confdefs.h <<\EOF
8680 #define HAVE_LANGINFO_YESEXPR 1
8681 EOF
8682
8683 fi
8684
8685
8686   # Check whether --with-libesmtp or --without-libesmtp was given.
8687 if test "${with_libesmtp+set}" = set; then
8688   withval="$with_libesmtp"
8689    if test "$with_libesmtp" != "no"
8690       then
8691         mutt_libesmtp_check_path="$PATH"
8692
8693         if test "$with_libesmtp" != "yes"
8694         then
8695           mutt_libesmtp_check_path="$tmp_path:$withval/bin"
8696         fi
8697
8698                 # Extract the first word of "libesmtp-config", so it can be a program name with args.
8699 set dummy libesmtp-config; ac_word=$2
8700 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8701 echo "configure:8702: checking for $ac_word" >&5
8702 if eval "test \"`echo '$''{'ac_cv_path_mutt_libesmtp_config_path'+set}'`\" = set"; then
8703   echo $ac_n "(cached) $ac_c" 1>&6
8704 else
8705   case "$mutt_libesmtp_config_path" in
8706   /*)
8707   ac_cv_path_mutt_libesmtp_config_path="$mutt_libesmtp_config_path" # Let the user override the test with a path.
8708   ;;
8709   ?:/*)                  
8710   ac_cv_path_mutt_libesmtp_config_path="$mutt_libesmtp_config_path" # Let the user override the test with a dos path.
8711   ;;
8712   *)
8713   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8714   ac_dummy="$mutt_libesmtp_check_path"
8715   for ac_dir in $ac_dummy; do 
8716     test -z "$ac_dir" && ac_dir=.
8717     if test -f $ac_dir/$ac_word; then
8718       ac_cv_path_mutt_libesmtp_config_path="$ac_dir/$ac_word"
8719       break
8720     fi
8721   done
8722   IFS="$ac_save_ifs"
8723   test -z "$ac_cv_path_mutt_libesmtp_config_path" && ac_cv_path_mutt_libesmtp_config_path="no"
8724   ;;
8725 esac
8726 fi
8727 mutt_libesmtp_config_path="$ac_cv_path_mutt_libesmtp_config_path"
8728 if test -n "$mutt_libesmtp_config_path"; then
8729   echo "$ac_t""$mutt_libesmtp_config_path" 1>&6
8730 else
8731   echo "$ac_t""no" 1>&6
8732 fi
8733
8734
8735         if test "$mutt_libesmtp_config_path" = "no"
8736         then
8737           { echo "configure: error: libesmtp-config binary not found." 1>&2; exit 1; }
8738         fi
8739
8740                 mutt_libesmtp_cflags=`$mutt_libesmtp_config_path --cflags`
8741         mutt_libesmtp_libs=`$mutt_libesmtp_config_path --libs`
8742
8743                 temp_CFLAGS="$CFLAGS"
8744         CFLAGS="$CFLAGS $mutt_libesmtp_cflags"
8745         ac_safe=`echo "libesmtp.h" | sed 'y%./+-%__p_%'`
8746 echo $ac_n "checking for libesmtp.h""... $ac_c" 1>&6
8747 echo "configure:8748: checking for libesmtp.h" >&5
8748 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8749   echo $ac_n "(cached) $ac_c" 1>&6
8750 else
8751   cat > conftest.$ac_ext <<EOF
8752 #line 8753 "configure"
8753 #include "confdefs.h"
8754 #include <libesmtp.h>
8755 EOF
8756 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8757 { (eval echo configure:8758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8758 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8759 if test -z "$ac_err"; then
8760   rm -rf conftest*
8761   eval "ac_cv_header_$ac_safe=yes"
8762 else
8763   echo "$ac_err" >&5
8764   echo "configure: failed program was:" >&5
8765   cat conftest.$ac_ext >&5
8766   rm -rf conftest*
8767   eval "ac_cv_header_$ac_safe=no"
8768 fi
8769 rm -f conftest*
8770 fi
8771 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8772   echo "$ac_t""yes" 1>&6
8773   :
8774 else
8775   echo "$ac_t""no" 1>&6
8776 { echo "configure: error: Could not find libesmtp.h" 1>&2; exit 1; }
8777 fi
8778
8779         CFLAGS="$temp_CFLAGS"
8780
8781                 temp_CFLAGS="$CFLAGS"
8782         temp_LIBS="$LIBS"
8783         CFLAGS="$CFLAGS $mutt_libesmtp_cflags"
8784         LIBS="$LIBS $mutt_libesmtp_libs"
8785         echo $ac_n "checking for smtp_create_session in -lesmtp""... $ac_c" 1>&6
8786 echo "configure:8787: checking for smtp_create_session in -lesmtp" >&5
8787 ac_lib_var=`echo esmtp'_'smtp_create_session | sed 'y%./+-%__p_%'`
8788 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8789   echo $ac_n "(cached) $ac_c" 1>&6
8790 else
8791   ac_save_LIBS="$LIBS"
8792 LIBS="-lesmtp  $LIBS"
8793 cat > conftest.$ac_ext <<EOF
8794 #line 8795 "configure"
8795 #include "confdefs.h"
8796 /* Override any gcc2 internal prototype to avoid an error.  */
8797 /* We use char because int might match the return type of a gcc2
8798     builtin and then its argument prototype would still apply.  */
8799 char smtp_create_session();
8800
8801 int main() {
8802 smtp_create_session()
8803 ; return 0; }
8804 EOF
8805 if { (eval echo configure:8806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8806   rm -rf conftest*
8807   eval "ac_cv_lib_$ac_lib_var=yes"
8808 else
8809   echo "configure: failed program was:" >&5
8810   cat conftest.$ac_ext >&5
8811   rm -rf conftest*
8812   eval "ac_cv_lib_$ac_lib_var=no"
8813 fi
8814 rm -f conftest*
8815 LIBS="$ac_save_LIBS"
8816
8817 fi
8818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8819   echo "$ac_t""yes" 1>&6
8820     ac_tr_lib=HAVE_LIB`echo esmtp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8821     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8822   cat >> confdefs.h <<EOF
8823 #define $ac_tr_lib 1
8824 EOF
8825
8826   LIBS="-lesmtp $LIBS"
8827
8828 else
8829   echo "$ac_t""no" 1>&6
8830 { echo "configure: error: Could not find libesmtp" 1>&2; exit 1; }
8831 fi
8832
8833         CFLAGS="$temp_CFLAGS"
8834         LIBS="$temp_LIBS"
8835
8836                         use_libesmtp=yes
8837       fi
8838     
8839   
8840 fi
8841
8842
8843 if test x$use_libesmtp = xyes; then
8844     CFLAGS="$CFLAGS $mutt_libesmtp_cflags"
8845     MUTTLIBS="$MUTTLIBS $mutt_libesmtp_libs"
8846     MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_libesmtp.o"
8847
8848     cat >> confdefs.h <<\EOF
8849 #define USE_LIBESMTP 1
8850 EOF
8851
8852 fi
8853
8854 trap '' 1 2 15
8855 cat > confcache <<\EOF
8856 # This file is a shell script that caches the results of configure
8857 # tests run on this system so they can be shared between configure
8858 # scripts and configure runs.  It is not useful on other systems.
8859 # If it contains results you don't want to keep, you may remove or edit it.
8860 #
8861 # By default, configure uses ./config.cache as the cache file,
8862 # creating it if it does not exist already.  You can give configure
8863 # the --cache-file=FILE option to use a different cache file; that is
8864 # what configure does when it calls configure scripts in
8865 # subdirectories, so they share the cache.
8866 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8867 # config.status only pays attention to the cache file if you give it the
8868 # --recheck option to rerun configure.
8869 #
8870 EOF
8871 # The following way of writing the cache mishandles newlines in values,
8872 # but we know of no workaround that is simple, portable, and efficient.
8873 # So, don't put newlines in cache variables' values.
8874 # Ultrix sh set writes to stderr and can't be redirected directly,
8875 # and sets the high bit in the cache file unless we assign to the vars.
8876 (set) 2>&1 |
8877   case `(ac_space=' '; set | grep ac_space) 2>&1` in
8878   *ac_space=\ *)
8879     # `set' does not quote correctly, so add quotes (double-quote substitution
8880     # turns \\\\ into \\, and sed turns \\ into \).
8881     sed -n \
8882       -e "s/'/'\\\\''/g" \
8883       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8884     ;;
8885   *)
8886     # `set' quotes correctly as required by POSIX, so do not add quotes.
8887     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8888     ;;
8889   esac >> confcache
8890 if cmp -s $cache_file confcache; then
8891   :
8892 else
8893   if test -w $cache_file; then
8894     echo "updating cache $cache_file"
8895     cat confcache > $cache_file
8896   else
8897     echo "not updating unwritable cache $cache_file"
8898   fi
8899 fi
8900 rm -f confcache
8901
8902 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8903
8904 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8905 # Let make expand exec_prefix.
8906 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8907
8908 # Any assignment to VPATH causes Sun make to only execute
8909 # the first set of double-colon rules, so remove it if not needed.
8910 # If there is a colon in the path, we need to keep it.
8911 if test "x$srcdir" = x.; then
8912   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
8913 fi
8914
8915 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8916
8917 DEFS=-DHAVE_CONFIG_H
8918
8919 # Without the "./", some shells look in PATH for config.status.
8920 : ${CONFIG_STATUS=./config.status}
8921
8922 echo creating $CONFIG_STATUS
8923 rm -f $CONFIG_STATUS
8924 cat > $CONFIG_STATUS <<EOF
8925 #! /bin/sh
8926 # Generated automatically by configure.
8927 # Run this file to recreate the current configuration.
8928 # This directory was configured as follows,
8929 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8930 #
8931 # $0 $ac_configure_args
8932 #
8933 # Compiler output produced by configure, useful for debugging
8934 # configure, is in ./config.log if it exists.
8935
8936 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8937 for ac_option
8938 do
8939   case "\$ac_option" in
8940   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8941     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8942     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8943   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8944     echo "$CONFIG_STATUS generated by autoconf version 2.13"
8945     exit 0 ;;
8946   -help | --help | --hel | --he | --h)
8947     echo "\$ac_cs_usage"; exit 0 ;;
8948   *) echo "\$ac_cs_usage"; exit 1 ;;
8949   esac
8950 done
8951
8952 ac_given_srcdir=$srcdir
8953 ac_given_INSTALL="$INSTALL"
8954
8955 trap 'rm -fr `echo "Makefile intl/Makefile m4/Makefile
8956         po/Makefile.in doc/Makefile contrib/Makefile
8957         muttbug.sh
8958         imap/Makefile
8959         Muttngrc.head
8960         doc/instdoc.sh config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8961 EOF
8962 cat >> $CONFIG_STATUS <<EOF
8963
8964 # Protect against being on the right side of a sed subst in config.status.
8965 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8966  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8967 $ac_vpsub
8968 $extrasub
8969 s%@SHELL@%$SHELL%g
8970 s%@CFLAGS@%$CFLAGS%g
8971 s%@CPPFLAGS@%$CPPFLAGS%g
8972 s%@CXXFLAGS@%$CXXFLAGS%g
8973 s%@FFLAGS@%$FFLAGS%g
8974 s%@DEFS@%$DEFS%g
8975 s%@LDFLAGS@%$LDFLAGS%g
8976 s%@LIBS@%$LIBS%g
8977 s%@exec_prefix@%$exec_prefix%g
8978 s%@prefix@%$prefix%g
8979 s%@program_transform_name@%$program_transform_name%g
8980 s%@bindir@%$bindir%g
8981 s%@sbindir@%$sbindir%g
8982 s%@libexecdir@%$libexecdir%g
8983 s%@datadir@%$datadir%g
8984 s%@sysconfdir@%$sysconfdir%g
8985 s%@sharedstatedir@%$sharedstatedir%g
8986 s%@localstatedir@%$localstatedir%g
8987 s%@libdir@%$libdir%g
8988 s%@includedir@%$includedir%g
8989 s%@oldincludedir@%$oldincludedir%g
8990 s%@infodir@%$infodir%g
8991 s%@mandir@%$mandir%g
8992 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8993 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
8994 s%@INSTALL_DATA@%$INSTALL_DATA%g
8995 s%@PACKAGE@%$PACKAGE%g
8996 s%@VERSION@%$VERSION%g
8997 s%@ACLOCAL@%$ACLOCAL%g
8998 s%@AUTOCONF@%$AUTOCONF%g
8999 s%@AUTOMAKE@%$AUTOMAKE%g
9000 s%@AUTOHEADER@%$AUTOHEADER%g
9001 s%@MAKEINFO@%$MAKEINFO%g
9002 s%@SET_MAKE@%$SET_MAKE%g
9003 s%@host@%$host%g
9004 s%@host_alias@%$host_alias%g
9005 s%@host_cpu@%$host_cpu%g
9006 s%@host_vendor@%$host_vendor%g
9007 s%@host_os@%$host_os%g
9008 s%@CC@%$CC%g
9009 s%@CPP@%$CPP%g
9010 s%@U@%$U%g
9011 s%@ANSI2KNR@%$ANSI2KNR%g
9012 s%@RANLIB@%$RANLIB%g
9013 s%@build@%$build%g
9014 s%@build_alias@%$build_alias%g
9015 s%@build_cpu@%$build_cpu%g
9016 s%@build_vendor@%$build_vendor%g
9017 s%@build_os@%$build_os%g
9018 s%@AR@%$AR%g
9019 s%@DBX@%$DBX%g
9020 s%@GDB@%$GDB%g
9021 s%@SDB@%$SDB%g
9022 s%@DEBUGGER@%$DEBUGGER%g
9023 s%@SENDMAIL@%$SENDMAIL%g
9024 s%@OPS@%$OPS%g
9025 s%@PGPAUX_TARGET@%$PGPAUX_TARGET%g
9026 s%@SMIMEAUX_TARGET@%$SMIMEAUX_TARGET%g
9027 s%@SUBVERSION@%$SUBVERSION%g
9028 s%@ISPELL@%$ISPELL%g
9029 s%@LIBOBJS@%$LIBOBJS%g
9030 s%@DOTLOCK_TARGET@%$DOTLOCK_TARGET%g
9031 s%@docdir@%$docdir%g
9032 s%@DOTLOCK_GROUP@%$DOTLOCK_GROUP%g
9033 s%@DOTLOCK_PERMISSION@%$DOTLOCK_PERMISSION%g
9034 s%@BUILD_IMAP_TRUE@%$BUILD_IMAP_TRUE%g
9035 s%@BUILD_IMAP_FALSE@%$BUILD_IMAP_FALSE%g
9036 s%@KRB5CFGPATH@%$KRB5CFGPATH%g
9037 s%@USE_GSS_TRUE@%$USE_GSS_TRUE%g
9038 s%@USE_GSS_FALSE@%$USE_GSS_FALSE%g
9039 s%@USE_SSL_TRUE@%$USE_SSL_TRUE%g
9040 s%@USE_SSL_FALSE@%$USE_SSL_FALSE%g
9041 s%@USE_GNUTLS_TRUE@%$USE_GNUTLS_TRUE%g
9042 s%@USE_GNUTLS_FALSE@%$USE_GNUTLS_FALSE%g
9043 s%@USE_SASL_TRUE@%$USE_SASL_TRUE%g
9044 s%@USE_SASL_FALSE@%$USE_SASL_FALSE%g
9045 s%@MUTTLIBS@%$MUTTLIBS%g
9046 s%@MUTT_LIB_OBJECTS@%$MUTT_LIB_OBJECTS%g
9047 s%@LIBIMAP@%$LIBIMAP%g
9048 s%@LIBIMAPDEPS@%$LIBIMAPDEPS%g
9049 s%@ALLOCA@%$ALLOCA%g
9050 s%@GLIBC21@%$GLIBC21%g
9051 s%@LIBICONV@%$LIBICONV%g
9052 s%@USE_NLS@%$USE_NLS%g
9053 s%@MSGFMT@%$MSGFMT%g
9054 s%@GMSGFMT@%$GMSGFMT%g
9055 s%@XGETTEXT@%$XGETTEXT%g
9056 s%@INTLBISON@%$INTLBISON%g
9057 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
9058 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
9059 s%@CATALOGS@%$CATALOGS%g
9060 s%@CATOBJEXT@%$CATOBJEXT%g
9061 s%@GMOFILES@%$GMOFILES%g
9062 s%@INTLLIBS@%$INTLLIBS%g
9063 s%@INTLOBJS@%$INTLOBJS%g
9064 s%@POFILES@%$POFILES%g
9065 s%@POSUB@%$POSUB%g
9066 s%@DATADIRNAME@%$DATADIRNAME%g
9067 s%@INSTOBJEXT@%$INSTOBJEXT%g
9068 s%@GENCAT@%$GENCAT%g
9069 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
9070 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
9071 s%@mutt_libesmtp_config_path@%$mutt_libesmtp_config_path%g
9072
9073 CEOF
9074 EOF
9075
9076 cat >> $CONFIG_STATUS <<\EOF
9077
9078 # Split the substitutions into bite-sized pieces for seds with
9079 # small command number limits, like on Digital OSF/1 and HP-UX.
9080 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9081 ac_file=1 # Number of current file.
9082 ac_beg=1 # First line for current file.
9083 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9084 ac_more_lines=:
9085 ac_sed_cmds=""
9086 while $ac_more_lines; do
9087   if test $ac_beg -gt 1; then
9088     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9089   else
9090     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9091   fi
9092   if test ! -s conftest.s$ac_file; then
9093     ac_more_lines=false
9094     rm -f conftest.s$ac_file
9095   else
9096     if test -z "$ac_sed_cmds"; then
9097       ac_sed_cmds="sed -f conftest.s$ac_file"
9098     else
9099       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9100     fi
9101     ac_file=`expr $ac_file + 1`
9102     ac_beg=$ac_end
9103     ac_end=`expr $ac_end + $ac_max_sed_cmds`
9104   fi
9105 done
9106 if test -z "$ac_sed_cmds"; then
9107   ac_sed_cmds=cat
9108 fi
9109 EOF
9110
9111 cat >> $CONFIG_STATUS <<EOF
9112
9113 CONFIG_FILES=\${CONFIG_FILES-"Makefile intl/Makefile m4/Makefile
9114         po/Makefile.in doc/Makefile contrib/Makefile
9115         muttbug.sh
9116         imap/Makefile
9117         Muttngrc.head
9118         doc/instdoc.sh"}
9119 EOF
9120 cat >> $CONFIG_STATUS <<\EOF
9121 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9122   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9123   case "$ac_file" in
9124   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9125        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9126   *) ac_file_in="${ac_file}.in" ;;
9127   esac
9128
9129   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9130
9131   # Remove last slash and all that follows it.  Not all systems have dirname.
9132   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9133   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9134     # The file is in a subdirectory.
9135     test ! -d "$ac_dir" && mkdir "$ac_dir"
9136     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9137     # A "../" for each directory in $ac_dir_suffix.
9138     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9139   else
9140     ac_dir_suffix= ac_dots=
9141   fi
9142
9143   case "$ac_given_srcdir" in
9144   .)  srcdir=.
9145       if test -z "$ac_dots"; then top_srcdir=.
9146       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9147   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9148   *) # Relative path.
9149     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9150     top_srcdir="$ac_dots$ac_given_srcdir" ;;
9151   esac
9152
9153   case "$ac_given_INSTALL" in
9154   [/$]*) INSTALL="$ac_given_INSTALL" ;;
9155   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9156   esac
9157
9158   echo creating "$ac_file"
9159   rm -f "$ac_file"
9160   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9161   case "$ac_file" in
9162   *Makefile*) ac_comsub="1i\\
9163 # $configure_input" ;;
9164   *) ac_comsub= ;;
9165   esac
9166
9167   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9168   sed -e "$ac_comsub
9169 s%@configure_input@%$configure_input%g
9170 s%@srcdir@%$srcdir%g
9171 s%@top_srcdir@%$top_srcdir%g
9172 s%@INSTALL@%$INSTALL%g
9173 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9174 fi; done
9175 rm -f conftest.s*
9176
9177 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9178 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9179 #
9180 # ac_d sets the value in "#define NAME VALUE" lines.
9181 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
9182 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
9183 ac_dC='\3'
9184 ac_dD='%g'
9185 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9186 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9187 ac_uB='\([      ]\)%\1#\2define\3'
9188 ac_uC=' '
9189 ac_uD='\4%g'
9190 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9191 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9192 ac_eB='$%\1#\2define\3'
9193 ac_eC=' '
9194 ac_eD='%g'
9195
9196 if test "${CONFIG_HEADERS+set}" != set; then
9197 EOF
9198 cat >> $CONFIG_STATUS <<EOF
9199   CONFIG_HEADERS="config.h"
9200 EOF
9201 cat >> $CONFIG_STATUS <<\EOF
9202 fi
9203 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9204   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9205   case "$ac_file" in
9206   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9207        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9208   *) ac_file_in="${ac_file}.in" ;;
9209   esac
9210
9211   echo creating $ac_file
9212
9213   rm -f conftest.frag conftest.in conftest.out
9214   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9215   cat $ac_file_inputs > conftest.in
9216
9217 EOF
9218
9219 # Transform confdefs.h into a sed script conftest.vals that substitutes
9220 # the proper values into config.h.in to produce config.h.  And first:
9221 # Protect against being on the right side of a sed subst in config.status.
9222 # Protect against being in an unquoted here document in config.status.
9223 rm -f conftest.vals
9224 cat > conftest.hdr <<\EOF
9225 s/[\\&%]/\\&/g
9226 s%[\\$`]%\\&%g
9227 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9228 s%ac_d%ac_u%gp
9229 s%ac_u%ac_e%gp
9230 EOF
9231 sed -n -f conftest.hdr confdefs.h > conftest.vals
9232 rm -f conftest.hdr
9233
9234 # This sed command replaces #undef with comments.  This is necessary, for
9235 # example, in the case of _POSIX_SOURCE, which is predefined and required
9236 # on some systems where configure will not decide to define it.
9237 cat >> conftest.vals <<\EOF
9238 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9239 EOF
9240
9241 # Break up conftest.vals because some shells have a limit on
9242 # the size of here documents, and old seds have small limits too.
9243
9244 rm -f conftest.tail
9245 while :
9246 do
9247   ac_lines=`grep -c . conftest.vals`
9248   # grep -c gives empty output for an empty file on some AIX systems.
9249   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9250   # Write a limited-size here document to conftest.frag.
9251   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9252   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9253   echo 'CEOF
9254   sed -f conftest.frag conftest.in > conftest.out
9255   rm -f conftest.in
9256   mv conftest.out conftest.in
9257 ' >> $CONFIG_STATUS
9258   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9259   rm -f conftest.vals
9260   mv conftest.tail conftest.vals
9261 done
9262 rm -f conftest.vals
9263
9264 cat >> $CONFIG_STATUS <<\EOF
9265   rm -f conftest.frag conftest.h
9266   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
9267   cat conftest.in >> conftest.h
9268   rm -f conftest.in
9269   if cmp -s $ac_file conftest.h 2>/dev/null; then
9270     echo "$ac_file is unchanged"
9271     rm -f conftest.h
9272   else
9273     # Remove last slash and all that follows it.  Not all systems have dirname.
9274       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9275       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9276       # The file is in a subdirectory.
9277       test ! -d "$ac_dir" && mkdir "$ac_dir"
9278     fi
9279     rm -f $ac_file
9280     mv conftest.h $ac_file
9281   fi
9282 fi; done
9283
9284 EOF
9285 cat >> $CONFIG_STATUS <<EOF
9286
9287
9288
9289 EOF
9290 cat >> $CONFIG_STATUS <<\EOF
9291 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
9292 for ac_file in $CONFIG_FILES; do
9293         # Support "outfile[:infile[:infile...]]"
9294         case "$ac_file" in
9295           *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9296         esac
9297         # PO directories have a Makefile.in generated from Makefile.in.in.
9298         case "$ac_file" in */Makefile.in)
9299           # Adjust a relative srcdir.
9300           ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9301           ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9302           ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9303           # In autoconf-2.13 it is called $ac_given_srcdir.
9304           # In autoconf-2.50 it is called $srcdir.
9305           test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9306           case "$ac_given_srcdir" in
9307             .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9308             /*) top_srcdir="$ac_given_srcdir" ;;
9309             *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
9310           esac
9311           if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
9312             rm -f "$ac_dir/POTFILES"
9313             test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
9314             sed -e "/^#/d" -e "/^[      ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
9315             test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
9316             sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
9317           fi
9318           ;;
9319         esac
9320       done
9321
9322 exit 0
9323 EOF
9324 chmod +x $CONFIG_STATUS
9325 rm -fr confdefs* $ac_clean_files
9326 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9327