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