source: trunk/third/cyrus-sasl/configure @ 18842

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