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