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