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